1 2008-06-20 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
4 * s-osinte-hpux-dce.ads (SA_ONSTACK): Define.
6 2008-06-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8 * gnat_rm.texi (Implementation Defined Characteristics)
9 (Standard Library Routines): Use @smallexample for indented
10 text. Drop Indentation outside examples.
11 * gnat_ugn.texi: Likewise.
13 2008-06-13 Olivier Hainque <hainque@adacore.com>
15 * decl.c (FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN): Define to 0
17 (gnat_to_gnu_entity) <case E_Function/Procedure>: Request stack
18 realignment with force_align_arg_pointer attribute on foreign
19 convention subprograms if FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN.
21 2008-06-13 Olivier Hainque <hainque@adacore.com>
23 * utils.c (rest_of_record_type_compilation): When computing
24 encodings for the components of a variable size type, early
25 strip conversions on the current position expression to make
26 sure it's shape is visible. Use remove_conversions for this
29 2008-06-12 Eric Botcazou <ebotcazou@adacore.com>
31 * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: In the case of a
32 constrained subtype of a discriminated type, discard the fields that
33 are beyond its limits according to its size.
35 2008-06-10 Olivier Hainque <hainque@adacore.com>
37 * utils.c (create_subprog_decl): If this is for the 'main' entry
38 point according to the asm name, redirect main_identifier_node.
40 2008-06-09 Eric Botcazou <ebotcazou@adacore.com>
42 * decl.c (components_to_record): Adjust the packedness for the
43 qualified union as well.
45 2008-06-09 Arnaud Charlet <charlet@adacore.com>
47 * Make-lang.in: Use -gnatwns instead of -gnatws to make sytyle
50 2008-06-07 Samuel Tardieu <sam@rfc1149.net>
52 * sem_res.adb (Large_Storage_Type): A type is large if it
53 requires as many bits as Positive to store its values and its
54 bounds are known at compile time.
55 * sem_ch13.adb (Minimum_Size): Note that this function returns
56 0 if the size is not known at compile time.
58 2008-06-06 Nicolas Setton <setton@adacore.com>
59 Olivier Hainque <hainque@adacore.com>
61 * ada-tree.h (DECL_PARALLEL_TYPE): New language specific
62 attribute, parallel descriptive type attached to another
63 type for debug info generation purposes.
64 * utils.c (add_parallel_type): New function, register
65 parallel type to be attached to a type.
66 (get_parallel_type): New function, fetch a registered
67 parallel type, if any.
68 (rest_of_record_type_compilation): Register the parallel
69 type we make for variable size records.
70 * gigi.h (add_parallel_type, get_parallel_type): Declare.
71 * decl.c (gnat_to_gnu_entity, maybe_pad_type): Register the
72 parallel debug types we make.
73 * trans.c (extract_encoding, decode_name): New functions.
74 (gigi): If the DWARF attribute extensions are available, setup
76 * lang.opt: Register language specific processing request
78 * misc.c (gnat_dwarf_extensions): New global variable. How much
79 do we want of our DWARF extensions. 0 by default.
80 (gnat_handle_option) <OPT_gdwarf_>: Increment gnat_dwarf_extensions.
81 (gnat_post_options): Map gnat_dwarf_extensions to the
82 commonuse_gnu_debug_info_extensions for later processing.
84 2008-06-04 Samuel Tardieu <sam@rfc1149.net>
86 * einfo.ads, einfo.adb: Remove unused flag Function_Returns_With_DSP.
88 2008-06-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
90 * Makefile.in (common_tools): Fix typos in $(exeext) extension.
91 * gnat_ugn.texi (Style Checking)
92 (Adding the Results of Compiler Checks to gnatcheck Output)
93 (Example of Binder Output File): Fix typos.
94 * ali.ads, einfo.ads, exp_ch4.adb, exp_ch6.adb,
95 exp_dbug.ads, exp_dist.adb, exp_smem.adb, g-socket.ads,
96 s-osinte-rtems.ads, s-shasto.ads, s-stausa.adb,
97 s-stausa.ads, sem_cat.adb, sem_ch12.adb, sem_ch3.adb,
98 sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_util.ads,
99 sinfo.ads, utils.c: Fix typos in comments.
100 * sem_ch6.adb, vms_data.ads: Fix typos in strings.
102 2008-05-29 Thomas Quinot <quinot@adacore.com>
104 * sem_eval.adb: Minor reformatting
106 2008-05-29 Ed Schonberg <schonberg@adacore.com>
108 * sem_ch6.adb (Analyze_Subprogram_Specification): if the return type
109 is abstract, do not apply abstractness check on subprogram if this is
110 a renaming declaration.
112 2008-05-29 Arnaud Charlet <charlet@adacore.com>
115 * osint.ads, osint.adb (Program_Name): New parameter "Prog" to
116 allow recognition of program suffix in addition to prefix.
118 * gnatchop.adb (Locate_Executable): Add support for prefix.
120 * make.adb, gnatcmd.adb, gnatlink.adb, prj-makr.adb,
121 mlib-utl.adb: Adjust calls to Program_Name.
123 2008-05-29 Robert Dewar <dewar@adacore.com>
125 * sem_ch3.adb: Minor reformatting
126 * sem_prag.adb: Minor reformatting
127 * sem_res.adb: Minor reformatting
128 * sinput-p.ads: Minor reformatting
130 2008-05-29 Javier Miranda <miranda@adacore.com>
133 (Abstract_Interface_List): Add missing support for full type-declaration
134 associated with synchronized types.
136 2008-05-29 Robert Dewar <dewar@adacore.com>
138 * sem_eval.adb (Is_Same_Value): Take care of several more cases
140 2008-05-28 Ed Schonberg <schonberg@adacore.com>
142 * sem_ch5.adb (Analyze_Assignment): If the name is of a local anonymous
143 access type, wrap the expression in a conversion to force an
146 * sem_aggr.adb (Aggegate_Constraint_Checks): Apply conversion to force
147 accessibility checks even when expansion is disabled in order to
148 generate messages in the presence of previous errors or in
151 2008-05-28 Eric Botcazou <ebotcazou@adacore.com>
153 * system-lynxos-ppc.ads (Always_Compatible_Rep): Set to False.
154 * system-lynxos-x86.ads (Always_Compatible_Rep): Set to False.
156 2008-05-28 Vincent Celier <celier@adacore.com>
159 * gnat_ugn.texi: Document restriction introduced on 2007-04-20 in
160 preprocessing expressions
162 2008-05-28 Vincent Celier <celier@adacore.com>
164 * sinput-p.adb (Source_File_Is_Subunit): Allow special character used
167 * sinput-p.ads: Minor comment update and reformatting
169 2008-05-28 Ed Schonberg <schonberg@adacore.com>
171 * sem_res.adb (Valid_Conversion): An anonymous access_to_subprogram
172 type has a deeper level than any master only when it is the type of an
175 2008-05-28 Javier Miranda <miranda@adacore.com>
177 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add documentation.
179 2008-05-28 Javier Miranda <miranda@adacore.com>
181 * sem_util.ads (Find_Overridden_Synchronized_Primitive): Removed.
182 * sem_util.adb (Find_Overridden_Synchronized_Primitive): Removed.
183 * sem_ch6.adb (Check_Synchronized_Overriding): Remove one formal.
184 Add code that was previously located in
185 Find_Overridden_Synchronized_Primitive because it is only used here.
187 2008-05-28 Sergey Rybin <rybin@adacore.com>
189 * sem_prag.adb (Process_Extended_Import_Export_Subprogram_Pragma): Set
190 Entity field for formal_parameter_NAME in MECHANISM_ASSOCIATION.
192 2008-05-28 Robert Dewar <dewar@adacore.com>
195 Add missing restrictions, and properly label all GNAT defined ones
198 Add entry for Ada_Real_Time.Timing_Events.Timing_Event
199 Add entry for Ada.Task_Termination.Set_Specific_Handler
200 Add entry for Ada.Task_Termination.Specific_Handler
203 Add missing restrictions and properly mark all gnat defined ones
206 (Analyze_Object_Declaration): Check No_Local_Timing_Events restriction
209 (Resolve_Call): Check violation of No_Specific_Termination_Handlers
211 * gnat_rm.texi: Add missing restrictions, and properly label all
214 2008-05-28 Robert Dewar <dewar@adacore.com>
217 (Check_Restriction): violation of restriction No_Finalization is
218 treated as a serious error to stop expansion
220 2008-05-28 Robert Dewar <dewar@adacore.com>
222 * exp_util.adb: Minor reformatting
223 * exp_util.ads: Minor reformatting.
225 2008-05-28 Arnaud Charlet <charlet@adacore.com>
227 * Make-lang.in: Remove gprmake.
229 * gprmake.adb, makegpr.ads, makegpr.adb: Removed.
231 2008-05-28 Ed Schonberg <schonberg@adacore.com>
233 * sem_ch3.adb (Diagnose_Interface): Cleanup error messages involving
234 improper progenitor names, and avoid cascaded errors.
236 2008-05-28 Robert Dewar <dewar@adacore.com>
238 * gnat_rm.texi: Add note on Old giving warning when applied to constant
240 * sem_attr.adb (Analyze_Attribute, case Old): Give warning if prefix is
243 2008-05-28 Robert Dewar <dewar@adacore.com>
245 * exp_fixd.adb (Build_Multiply): Correct one-off error in computing
248 2008-05-28 Robert Dewar <dewar@adacore.com>
251 (Expand_Simple_Function_Return): Copy unaligned result into temporary
253 2008-05-28 Javier Miranda <miranda@adacore.com>
255 * sem_ch3.adb (Derive_Progenitor_Primitives): Add missing support
256 for user-defined predefined primitives.
258 * sem_util.adb (Matches_Prefixed_View_Profile): Ditto.
259 (Find_Overridden_Synchronized_Primitive): Ditto.
261 * sem_ch6.adb (Check_Synchronized_Overriding): Ditto.
263 2008-05-27 Arnaud Charlet <charlet@adacore.com>
265 * a-ststio.adb, s-direio.adb:
266 Further code clean up of previous change.
269 2008-05-27 Vincent Celier <celier@adacore.com>
271 * prj-nmsc.adb: Minor reformatting
273 2008-05-27 Bob Duff <duff@adacore.com>
275 * sem_ch3.adb (Build_Incomplete_Type_Declaration): In the case of an
276 untagged private type with a tagged full type, where the full type has
277 a self reference, create the corresponding class-wide type early, in
278 case the self reference is "access T'Class".
280 2008-05-27 Ed Schonberg <schonberg@adacore.com>
282 * exp_aggr.adb (Build_Array_Aggr_Code): If component type includes
283 tasks and context is an object declaration. create master entity before
286 2008-05-27 Robert Dewar <dewar@adacore.com>
288 * mlib-prj.adb: Minor reformatting
290 * prj-part.adb: Minor reformatting
292 * prj.ads: Minor reformatting
294 * exp_ch3.adb: Minor reformatting.
296 * sem_ch3.ads: Minor reformatting
298 * sem_eval.adb: Minor reformatting
300 2008-05-27 Vincent Celier <celier@adacore.com>
303 <prefix>-gnat stack spawns gnatstack, not <prefix>-gnatstack
305 2008-05-27 Ed Schonberg <schonberg@adacore.com>
307 * exp_aggr.adb (Expand_Array_Aggregate): If the aggregate contains
308 tasks, create an activation chain now, before the expansion into
309 assignments and build-in-place calls that require the presence of an
311 (Backend_Processing_Possible): If the component type is inherently
312 limited, the aggregate must be expanded into individual built-in-place
315 * sem_ch6.adb (Build_Extra_Formals): Use underlying type of result to
316 determine whether an allocation extra parameter must be built, to
317 handle case of a private type whose full type is a discriminated type
320 2008-05-27 Bob Duff <duff@adacore.com>
323 Document the new behavior regarding trampolines.
325 2008-05-27 Arnaud Charlet <charlet@adacore.com>
327 * a-direio.adb, a-sequio.adb: Replace address clause by
328 unrestricted_access, simpler and compatible with .NET.
330 2008-05-27 Vincent Celier <celier@adacore.com>
333 (Project_Path_Name_Of.Try_Path): Do not use Locate_Regular_File to find
334 a project file, so that symbolic links are not resolved.
336 2008-05-27 Arnaud Charlet <charlet@adacore.com>
338 * a-ztexio.adb, a-textio.adb, a-witeio.adb, s-direio.adb:
339 Replace heavy address clause by 'Unrestricted_Access, cleaner and more
340 portable across GNAT targets, since this kind of address clause is not
341 supported by VM back-ends (.NET/JGNAT).
343 2008-05-27 Arnaud Charlet <charlet@adacore.com>
345 * bindgen.adb: Update comments.
347 * s-tasinf-mingw.adb: Add "with" of System.OS_Interface
349 2008-05-27 Vincent Celier <celier@adacore.com>
351 * gnatcmd.adb, prj-proc.adb, make.adb, mlib-prj.adb, prj.adb,
352 prj.ads, makegpr.adb, makeutl.adb, clean.adb, prj-nmsc.adb,
353 mlib-tgt.adb, prj-env.adb, prj-env.ads:
354 (Path_Information): New record type
355 Use component of type Path_Information when there are two paths, one in
356 canonical format and one in display format.
357 Update the project manager to these new components.
359 2008-05-27 Robert Dewar <dewar@adacore.com>
361 * makeutl.adb: Minor reformatting
362 * prj-nmsc.adb: Minor reformatting
363 * s-stausa.adb: Minor reformatting
364 * s-stausa.ads: Minor reformatting
365 * sem_ch6.adb: Minor reformatting
367 2008-05-27 Thomas Quinot <quinot@adacore.com>
369 * sem_res.adb: Minor comment fixes
371 2008-05-27 Thomas Quinot <quinot@adacore.com>
373 * makeutl.adb: Minor code reorganization
375 * exp_aggr.adb: Add ??? comment
378 * exp_ch6.adb: Minor reformatting
380 2008-05-27 Quentin Ochem <ochem@adacore.com>
382 * s-stausa.adb (Initialize): Updated result initialization, and
383 initialization of environment stack.
384 (Fill_Stack): Improved computation of the pattern zone, taking into
385 account already filled at the calling point.
386 (Get_Usage_Range): Now uses Min_Measure and Max_Measure instead of
387 Measure and Overflow_Guard.
388 (Report_Result): Fixed computation of the result using new fields of
391 * s-stausa.ads (Initialize_Analyzer): Replaced Size / Overflow_Guard
392 params by more explicit Stack_Size / Max_Pattern_Size params.
393 (Stack_Analyzer): Added distinct Stack_Size & Pattern_Size fields.
394 Added Stack_Used_When_Filling field.
395 (Task_Result): Replaced Measure / Overflow_Guard by more explicit
396 Min_Measure and Max_Measure fields.
398 * s-tassta.adb (Task_Wrapper): Updated call to Initialize_Analyzer.
400 2008-05-27 Vincent Celier <celier@adacore.com>
403 (Check_File): Make sure that a unit that replaces the same unit in a
404 project being extended is properly processed.
406 2008-05-27 Ed Schonberg <schonberg@adacore.com>
409 (Get_Discr_Value): Remove obsolete code that failed to find the value
410 of a discriminant for an inherited task component appearing in a type
413 2008-05-27 Thomas Quinot <quinot@adacore.com>
415 (System.File_IO.{Close, Delete, Reset}):
416 Change File parameter from "in out AFCB_Ptr" to "access AFCB_Ptr".
418 (Ada.*_IO.{Close, Delete, Reset, Set_Mode}):
419 Pass File parameter by reference.
421 2008-05-27 Vincent Celier <celier@adacore.com>
424 (Process_Sources_In_Multi_Language_Mode): Check that there are not two
425 sources of the same project that have the same object file name.
426 (Find_Explicit_Sources): Always remove a source exception that was not
429 2008-05-27 Thomas Quinot <quinot@adacore.com>
431 * sem_ch3.adb: Minor reformatting
433 2008-05-27 Ed Schonberg <schonberg@adacore.com>
436 (Is_Interface_Conformant): Handle properly a primitive operation that
437 overrides an interface function with a controlling access result.
438 (Type_Conformance): If Skip_Controlling_Formals is true, when matching
439 inherited and overriding operations, omit as well the conformance check
440 on result types, to prevent spurious errors.
442 2008-05-27 Vincent Celier <celier@adacore.com>
444 * makeutl.ads, makeutl.adb:
445 (Set_Location): New procedure
446 (Get_Location): New function
447 (Update_Main): New procedure
449 2008-05-27 Vincent Celier <celier@adacore.com>
452 (Check_Library): Allow standard project to be extended as a static
454 (Get_Mains): Do not inherit attribute Main in an extending library
457 2008-05-27 Eric Botcazou <ebotcazou@adacore.com>
459 * system-darwin-ppc.ads (Always_Compatible_Rep): Set to False.
460 * system-darwin-x86.ads (Always_Compatible_Rep): Likewise.
461 * system-freebsd-x86.ads (Always_Compatible_Rep): Likewise.
462 * system-linux-ppc.ads (Always_Compatible_Rep): Likewise.
463 * system-linux-x86_64.ads (Always_Compatible_Rep): Likewise.
464 * system-linux-x86.ads (Always_Compatible_Rep): Likewise.
465 * system-mingw.ads (Always_Compatible_Rep): Likewise.
466 * system-solaris-sparc.ads (Always_Compatible_Rep): Likewise.
467 * system-solaris-sparcv9.ads (Always_Compatible_Rep): Likewise.
468 * system-solaris-x86.ads (Always_Compatible_Rep): Likewise.
470 2008-05-27 Ed Schonberg <schonberg@adacore.com>
472 * sem_attr.adb: add guard to previous patch.
474 2008-05-27 Ed Schonberg <schonberg@adacore.com>
476 * exp_disp.adb (Build_Dispatch_Tables): For a private type completed by
477 a synchronized tagged type, do not attempt to build dispatch table for
478 full view. The table is built for the corresponding record type, which
479 has its own declaration.
481 2008-05-27 Gary Dismukes <dismukes@adacore.com>
483 * sem_ch3.adb (Fixup_Bad_Constraint): Set the Etype on the bad subtype
484 to the known type entity E, rather than setting it to Any_Type. Fixes
485 possible blowup in function Base_Init_Proc, as called from Freeze_Entity
486 for objects whose type had an illegal constraint.
488 2008-05-27 Vincent Celier <celier@adacore.com>
491 Add succinct documentation for attribute Excluded_Source_List_File
493 2008-05-27 Vincent Celier <celier@adacore.com>
495 * prj-attr.adb: Add new project level attribute Map_File_Option
497 * prj-nmsc.adb (Process_Linker): Process new attribute Map_File_Option
499 * prj.ads: Minor reformatting and comment update
500 (Project_Configuration): New component Map_File_Option
502 * snames.adb: New standard name Map_File_Option
504 * snames.ads: New standard name Map_File_Option
506 2008-05-27 Vincent Celier <celier@adacore.com>
508 * xsnames.adb: Remove unused variable Oname
510 2008-05-27 Doug Rupp <rupp@adacore.com>
513 (Expand_N_Function_Call): Fix comments. Minor reformatting.
516 (Expand_Vax_Foreign_Return): Fix comments.
518 2008-05-27 Thomas Quinot <quinot@adacore.com>
520 * exp_dist.adb: Minor reformating
522 2008-05-26 Gary Dismukes <dismukes@adacore.com>
524 * exp_ch3.adb (Expand_N_Object_Declaration): Remove checks for
525 No_Default_Initialization, which is now delayed until the freeze point
526 of the object. Add a comment about deferral of the check.
528 * freeze.adb (Freeze_Entity): The check for No_Default_Initialization
529 on objects is moved here.
531 2008-05-26 Eric Botcazou <ebotcazou@adacore.com>
533 * s-casi16.adb (Uhalf): Rewrite it as integer with small alignment.
534 (Compare_Array_S16): Adjust for above change.
535 * s-casi32.adb (Uword): Likewise.
536 (Compare_Array_S32): Likewise.
537 * s-casi64.adb (Uword): Likewise.
538 (Compare_Array_S64): Likewise.
539 * s-caun16.adb (Uhalf): Likewise.
540 (Compare_Array_U16): Likewise.
541 * s-caun32.adb (Uword): Likewise.
542 (Compare_Array_U32): Likewise.
543 * s-caun64.adb (Uword): Likewise.
544 (Compare_Array_U64): Likewise.
546 2008-05-26 Robert Dewar <dewar@adacore.com>
548 * exp_ch6.adb: Add ??? comment for previous change
550 * exp_vfpt.adb: Minor reformatting
552 * exp_vfpt.ads: Add ??? comment for last change
554 * sem_attr.adb: Add some ??? comments for previous change
556 * s-vaflop.ads: Add comments for previous change
558 2008-05-26 Doug Rupp <rupp@adacore.com>
560 * s-vaflop-vms-alpha.adb:
561 Remove System.IO use clause, to prevent spurious ambiguities when
562 package is access through rtsfind.
564 2008-05-26 Sergey Rybin <rybin@adacore.com>
566 * tree_io.ads (ASIS_Version_Number): Update because of the changes
569 2008-05-26 Ed Schonberg <schonberg@adacore.com>
572 (Resolve_Attribute, case 'address): S (A .. B)' address can be safely
573 converted to S (A)'address only if A .. B is known to be a non-null
576 2008-05-26 Doug Rupp <rupp@adacore.com>
579 (Return_D, Return_F, Return_G): New functions.
582 (Return_D, Return_F, Return_G): New functions.
585 (Expand_Vax_Foreign_Return): New procedure
588 (Expand_Vax_Foreign_Return): New procedure
591 (RE_Return_D, RE_Return_F, RE_Return_G): New RE_Ids
592 (RE_Return_D, RE_Return_F, RE_Return_G): New RE_Unit_Table elements
596 (Expand_N_Function_Call): Call Expand_Vax_Foreign_Return.
598 * s-vaflop-vms-alpha.adb:
599 (Return_D, Return_F, Return_G): New functions.
601 2008-05-26 Gary Dismukes <dismukes@adacore.com>
603 * exp_ch3.adb (Build_Array_Init_Proc): Only set Init_Proc to a dummy
604 init proc entity when there is actual default initialization associated
605 with the component type, to avoid spurious errors on objects of scalar
606 array types that are marked Is_Public when No_Default_Initialization
609 2008-05-26 Thomas Quinot <quinot@adacore.com>
611 * rtsfind.ads, rtsfind.adb:
612 (RE_Get_RACW): New runtime library entity provided by PolyORB s-parint.
613 (Check_RPC): Support per-PCS-kind API versioning.
615 exp_dist.ads, exp_dist.adb:
616 (Build_Stub_Tag, Get_Stub_Elements): New utility subprograms.
617 (PolyORB_Support.Add_RACW_From_Any): Offload common code to new runtime
618 library function Get_RACW.
619 (PolyORB_Support.Add_RACW_To_Any): Offload common code to new runtime
620 library function Get_Reference.
621 (PolyORB_Support.Add_RACW_Read_Attribute): Use Get_RACW instead of going
622 through an intermediate Any.
623 (PolyORB_Support.Add_RACW_Write_Attribute): Use Get_Reference instead of
624 going through an intermediate Any.
626 * sem_dist.adb: Minor reformatting.
628 2008-05-26 Javier Miranda <miranda@adacore.com>
630 * einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias.
631 (Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
632 (Is_Internal): Adding documentation on internal entities that have
633 attribute Interface_Alias (old attribute Abstract_Interface_Alias)
635 * einfo.adb (Abstract_Interface_Alias): Renamed as Interface_Alias.
636 (Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
637 Added assertion to force entities with this attribute to have
638 attribute Is_Internal set to True.
639 (Next_Tag_Component): Simplify assertion using attribute Is_Tag.
641 * sem_ch3.adb (Derive_Interface_Subprograms): This subprogram has been
642 renamed as Derive_Progenitor_Subprograms. In addition, its code is
643 a new implementation.
644 (Add_Interface_Tag_Components): Remove special management of
645 synchronized interfaces.
646 (Analyze_Interface_Declaration): Minor reformating
647 (Build_Derived_Record_Type): Minor reformating
648 (Check_Abstract_Overriding): Avoid reporting error in case of abstract
649 predefined primitive inherited from interface type because the body of
650 internally generated predefined primitives of tagged types are generated
652 (Derive_Subprogram): Avoid generating an internal name if the parent
653 subprogram overrides an interface primitive.
654 (Derive_Subprograms): New implementation that keeps separate the
655 management of tagged types not implementing interfaces, from tagged
656 types that implement interfaces.
657 (Is_Progenitor): New implementation.
658 (Process_Full_View): Add documentation
659 (Record_Type_Declaration): Replace call to Derive_Interface_Subprograms
660 by call to Derive_Progenitor_Subprograms.
662 * sem_ch6.ads (Is_Interface_Conformant): New subprogram.
663 (Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
664 Skip_Controlling_Formals.
666 * sem_ch6.adb (Is_Interface_Conformant): New subprogram.
667 (Check_Conventions): New implementation. Remove local subprogram
668 Skip_Check. Remove formal Search_From of routine Check_Convention.
669 (Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
670 Skip_Controlling_Formals.
671 (New_Overloaded_Entity): Enable addition of predefined dispatching
675 (Find_Primitive_Covering_Interface): New subprogram.
677 * sem_disp.adb (Check_Dispatching_Operation): Disable registering
678 the task body procedure as a primitive of the corresponding tagged
680 (Check_Operation_From_Private_Type): Avoid adding twice an entity
681 to the list of primitives.
682 (Find_Primitive_Covering_Interface): New subprogram.
683 (Override_Dispatching_Operation): Add documentation.
685 * sem_type.adb (Covers): Minor reformatings
687 * sem_util.ads (Collect_Abstract_Interfaces): Renamed as
690 (Has_Abstract_Interfaces): Renamed as Has_Interfaces.
691 (Implements_Interface): New subprogram.
692 (Is_Parent): Removed.
693 (Primitive_Names_Match): New subprogram.
694 (Remove_Homonym): Moved here from Derive_Interface_Subprograms.
695 (Ultimate_Alias): New subprogram.
697 * sem_util.adb (Collect_Abstract_Interfaces): Renamed as
699 Remove special management for synchronized types. Rename formal. Remove
700 internal subprograms Interface_Present_In_Parent and Add_Interface.
701 (Has_Abstract_Interfaces): Renamed as Has_Interfaces. Replace assertion
702 on non-record types by code to return false in such case.
703 (Implements_Interface): New subprogram.
704 (Is_Parent): Removed. No special management is now required for
705 synchronized types covering interfaces.
706 (Primitive_Names_Match): New subprogram.
707 (Remove_Homonym): Moved here from Derive_Interface_Subprograms.
708 (Ultimate_Alias): New subprogram.
710 * exp_ch3.adb (Add_Internal_Interface_Entities): New subprogram.
711 Add internal entities associated with secondary dispatch tables to
712 the list of tagged type primitives that are not interfaces.
713 (Freeze_Record_Type): Add new call to Add_Internal_Interface_Entities
714 (Make_Predefined_Primitive_Specs): Code reorganization to improve
715 the management of predefined equality operator. In addition, if
716 the type has an equality function corresponding with a primitive
717 defined in an interface type, the inherited equality is abstract
718 as well, and no body can be created for it.
720 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved from
721 exp_util to exp_disp.
722 (Is_Predefined_Interface_Primitive): New subprogram. Returns True if
723 an entity corresponds with one of the predefined primitives required
724 to implement interfaces.
725 Update copyright notice.
727 * exp_disp.adb (Set_All_DT_Position): Add assertion. Exclude from the
728 final check on abstract subprograms all the primitives associated with
729 interface primitives because they must be visible in the public and
731 (Write_DT): Use Find_Dispatching_Type to locate the name of the
732 interface type. This allows the use of this routine, for debugging
733 purposes, when the tagged type is not fully decorated.
734 (Is_Predefined_Dispatching_Operation): Moved from exp_util to exp_disp.
735 Factorize code calling new subprogram Is_Predefined_Interface_Primitive.
736 (Is_Predefined_Interface_Primitive): New subprogram. Returns True if an
737 entity corresponds with one of the predefined primitives required to
738 implement interfaces.
740 * exp_util.adb (Find_Interface_ADT): New implementation
741 (Find_Interface): Removed.
743 * sprint.adb (Sprint_Node_Actual): Generate missing output for the
744 list of interfaces associated with nodes
745 N_Formal_Derived_Type_Definition and N_Private_Extension_Declaration.
747 2008-05-26 Thomas Quinot <quinot@adacore.com>
749 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on
750 condition for assignment to temporary.
752 2008-05-26 Ed Schonberg <schonberg@adacore.com>
754 * exp_ch4.adb (Expand_Concatenate_Other): Add explicit constraint
755 checks on the upper bound if the index type is a modular type, to
756 prevent wrap-around computations when size is close to upper bound of
759 2008-05-26 Robert Dewar <dewar@adacore.com>
761 * sem_ch3.adb: Minor reformatting
763 2008-05-26 Ed Schonberg <schonberg@adacore.com>
765 * sem_ch12.adb (Remove_Parent): Use specification of instance
766 to retrieve generic parent,
767 to handle properly the case where the instance is a child unit.
768 Add guard to handle properly wrapper packages.
771 2008-05-26 Thomas Quinot <quinot@adacore.com>
773 * sinfo.ads: Minor reformatting
775 2008-05-26 Hristian Kirtchev <kirtchev@adacore.com>
777 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code reformatting.
778 Generate a tag check when the result subtype of a function, defined by
779 an access definition, designates a specific tagged type.
780 (Make_Tag_Check): New routine.
782 2008-05-26 Arnaud Charlet <charlet@adacore.com>
784 * ceinfo.adb, csinfo.adb: Remove warnings. Update headers.
786 2008-05-26 Eric Botcazou <ebotcazou@adacore.com>
788 * gigi.h (gigi): Remove bogus ATTRIBUTE_UNUSED marker.
789 (builtin_decl_for): Likewise.
790 * trans.c (gigi): Likewise.
791 * utils.c (def_builtin_1): Fix formatting.
793 2008-05-26 Hristian Kirtchev <kirtchev@adacore.com>
795 * exp_ch3.adb (Build_Init_Statements): Alphabetize local variables.
796 Create the statements which map a string name to protected or task
799 * exp_ch9.adb: Add with and use clause for Stringt.
800 Minor code reformatting.
801 (Build_Entry_Names): New routine.
802 (Make_Initialize_Protection, Make_Task_Create_Call): Generate a value
803 for flag Build_Entry_Names which controls the allocation of the data
804 structure for the string names of entries.
806 * exp_ch9.ads (Build_Entry_Names): New subprogram.
808 * exp_util.adb (Entry_Names_OK): New function.
810 * exp_util.ads (Entry_Names_OK): New function.
812 * rtsfind.ads: Add RO_PE_Set_Entry_Name and RO_TS_Set_Entry_Name to
813 enumerations RE_Id and RE_Unit_Table.
815 * s-taskin.adb Add with and use clause for Ada.Unchecked_Deallocation.
816 (Free_Entry_Names_Array): New routine.
818 * s-taskin.ads: Comment reformatting.
819 Add types String_Access, Entry_Names_Array, Entry_Names_Array_Access.
820 Add component Entry_Names to record Ada_Task_Control_Block.
821 (Free_Entry_Names_Array): New routine.
823 * s-tassta.adb (Create_Task): If flag Build_Entry_Names is set,
824 dynamically allocate an array
825 of string pointers. This structure holds string entry names.
826 (Free_Entry_Names): New routine.
827 (Free_Task, Vulnerable_Free_Task): Deallocate the entry names array.
828 (Set_Entry_Names): New routine.
831 (Create_Task): Add formal Build_Entry_Names. The flag is used to
832 control the allocation of the data structure which stores entry names.
833 (Set_Entry_Name): New routine.
836 Add with and use clause for Ada.Unchecked_Conversion.
837 (Finalize): Deallocate the entry names array.
838 (Free_Entry_Names): New routine.
839 (Initialize_Protection_Entries): When flag Build_Entry_Names is set,
840 create an array of string pointers to hold the entry names.
841 (Set_Entry_Name): New routine.
844 Add field Entry_Names to record Protection_Entries.
845 (Initialize_Protection_Entries): Add formal Build_Entry_Names.
846 (Set_Entry_Name): New routine.
848 2008-05-26 Vincent Celier <celier@adacore.com>
851 (Process_Project_Level_Simple_Attributes): process attribute Library_GCC
854 (Project_Configuration): New component Shared_Lib_Driver
856 2008-05-26 Ed Schonberg <schonberg@adacore.com>
859 (Cleanup_Scopes): For a protected operation, transfer finalization list
860 to protected body subprogram, to force cleanup actions when needed.
862 2008-05-26 Robert Dewar <dewar@adacore.com>
864 * sem_cat.adb: Minor reformatting
866 * gnatname.adb: Minor reformatting
868 * osint.ads: Minor reformatting
870 * s-carun8.ads: Minor reformatting
872 * g-heasor.ads: Minor comment fix (unit is now pure)
874 2008-05-26 Robert Dewar <dewar@adacore.com>
877 (Expand_Current_Value): Properly type generated integer literal
879 2008-05-26 Sergey Rybin <rybin@adacore.com>
881 * gnat_ugn.texi: Add description for the new gnatcheck rule -
882 Separate_Numeric_Error_Handlers.
884 2008-05-26 Pascal Obry <obry@adacore.com>
886 * sem_aggr.adb: Minor reformatting.
888 2008-05-26 Jose Ruiz <ruiz@adacore.com>
891 (To_Target_Priority): Setting the time slice value to 0 or greater sets
892 the scheduling policy to FIFO within priorities or round-robin
894 Hence, the priority must be set in this case to the one selected by the
897 2008-05-26 Ed Schonberg <schonberg@adacore.com>
900 (Remove_Parent): If the enclosing scope is an instance whose generic
901 parent is declared within some parent scope of the just completed
902 instance, make full views of the entities in that parent visible, when
905 2008-05-26 Kai Tietz <kai.tietz@onevision.com>
907 * mingw32.h (STD_MINGW): Set to true for target w64.
909 2008-05-25 Eric Botcazou <ebotcazou@adacore.com>
911 * trans.c (Attribute_to_gnu) <Code_Address>: Set TREE_NO_TRAMPOLINE
912 instead of TREE_STATIC on the ADDR_EXPR.
914 2008-05-24 Eric Botcazou <ebotcazou@adacore.com>
916 * trans.c (gnat_to_gnu): Do not set source location info on NOP_EXPRs.
917 (Sloc_to_locus): Do not overwrite known GCC locations when translating
918 GNAT standard locations.
920 2008-05-23 Eric Botcazou <ebotcazou@adacore.com>
922 * gigi.h (mark_visited): Declare.
923 * decl.c (gnat_to_gnu_entity): Use mark_visited instead of marking
924 only the topmost node of expressions.
925 (elaborate_expression_1): Look deeper for read-only variables.
926 * trans.c (add_decl_expr): Use mark_visited instead of marking by hand.
927 (mark_visited): Move logic to mark_visited_r. Invoke walk_tree.
928 (mark_visited_r): New function.
930 2008-05-23 Vincent Celier <celier@adacore.com>
932 * snames.adb: New standard name Excluded_Source_List_File.
934 * snames.ads: New standard name Excluded_Source_List_File.
936 * prj-attr.adb: New project level attribute Excluded_Source_List_File.
938 * prj-nmsc.adb: (Find_Excluded_Sources): New parameter Project.
939 Get excluded sources from
940 file indicated by attribute Excluded_Source_List_File, when present and
941 neither Excluded_Source_Files nor Locally_Removed_Files are declared.
943 2008-05-23 Robert Dewar <dewar@adacore.com>
945 * exp_dist.adb: Minor reformatting
947 2008-05-23 Ed Schonberg <schonberg@adacore.com>
949 * sem_attr.adb (Resolve_Attribute, case 'address): If the prefix is a
950 slice, convert it to an indexed component, which is equivalent, more
951 efficient, and usable even if the slice itself is not addressable.
953 2008-05-23 Olivier Hainque <hainque@adacore.com>
955 * gnat_ugn.texi (Calling Conventions): Document that the Intrinsic
956 convention also allows access to named compiler built-in subprograms
957 such as the GCC __builtin family.
959 2008-05-23 Vincent Celier <celier@adacore.com>
961 * prj-nmsc.adb (Check_Naming_Schemes): Check a file for spec, body and
962 sep. If there are several possibilities, choose the one with the
965 2008-05-23 Vincent Celier <celier@adacore.com>
967 * gnatlink.adb (Process_Args): Do not disable scanning of ALI file for
968 back end switches when executable specified with --GCC= is same as
969 default, even if there are additional options.
972 Document when the back end switches from the ALI file are taken into
973 account when gnatlink is invoked with --GCC=
975 2008-05-23 Thomas Quinot <quinot@adacore.com>
978 (copy_File): Do not open destination file if source file is unreadable.
980 2008-05-23 Eric Botcazou <ebotcazou@adacore.com>
982 * utils.c (handle_type_generic_attribute): Adjust to accept
983 fixed arguments before an elipsis.
985 2008-05-21 Thomas Quinot <quinot@adacore.com>
987 * g-sothco.ads, g-sothco.adb: New files.
989 2008-05-20 Thomas Quinot <quinot@adacore.com>
991 * Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.
993 * g-sttsne-vxworks.adb: Add missing dependency on Sockets.Constants.
994 Add missing "with" of Ada.Unchecked_Conversion
996 * g-soccon-linux-ppc.ads, g-soccon-linux-64.ads, g-soccon-lynxos.ads,
997 g-soccon-linux-x86.ads, g-soccon-hpux-ia64.ads,
998 g-soccon-solaris-64.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
999 g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
1000 g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-vxworks.ads,
1001 g-socthi-vxworks.adb, g-soccon-freebsd.ads, g-soccon.ads:
1002 Move common code out of GNAT.Sockets.Thin implementations and into
1004 New constant SIZEOF_fd_set
1005 New flag Has_Sockaddr_Len
1006 New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6
1008 * g-stsifd-sockets.adb
1009 (Create): Remove call to Set_Length; use Set_Family to set the family
1010 and (on appropriate platforms) length fields in struct sockaddr.
1012 * g-socthi.adb, g-socthi.ads, g-socthi-vms.ads, g-socthi-vms.adb,
1013 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.adb,
1014 g-soccon-darwin.ads, g-soccon-darwin.ads: New constant SIZEOF_fd_set
1015 Move common code out of GNAT.Sockets.Thin implementations and into
1018 * g-socket.ads, g-socket.adb:
1019 Move common code out of GNAT.Sockets.Thin implementations and into
1021 (Connect_Socket, Accept_Socket): Provide new versions of these two
1022 routines that operate with a user specified timeout.
1023 (Bind_Socket, Connect_Socket, Send_Socket): Remove calls to Set_Length,
1024 this is now handled automatically by Set_Family on platforms that
1028 Move common code out of GNAT.Sockets.Thin implementations and into
1030 (SIZEOF_sockaddr_in6): On platforms where IPv6 is not supported, define
1031 this constant to 0 (not -1) because we use it to initialize an
1032 unsigned_char value.
1033 Align values for numeric constants only.
1034 Handle the case of systems that do not support AF_INET6.
1035 New constant SIZEOF_fd_set
1036 New flag Has_Sockaddr_Len
1037 New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6
1039 * gsocket.h: New flag Has_Sockaddr_Len
1040 New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6
1042 2008-05-20 Santiago Uruena <uruena@adacore.com>
1044 * i-cobol.ads: Interfaces.COBOL should be preelaborate.
1046 2008-05-20 Arnaud Charlet <charlet@adacore.com>
1048 * s-linux-hppa.ads (atomic_lock_t): Put back proper alignment now that
1049 the underlying issue with malloc/free has been fixed. Remove associated
1052 Related to PR ada/24533
1054 2008-05-20 Robert Dewar <dewar@adacore.com>
1056 * ali.adb: Correct casing of ASCII.NUL
1058 * styleg-c.adb (Check_Identifier): Handle case of names in ASCII
1061 2008-05-20 Robert Dewar <dewar@adacore.com>
1062 Gary Dismukes <dismukes@adacore.com>
1064 * checks.adb (Apply_Arithmetic_Overflow_Check): Avoid intermediate
1065 overflow if result converted to wider integer type.
1066 (Apply_Type_Conversion_Checks): Don't emit checks on conversions to
1067 discriminated types when discriminant checks are suppressed.
1069 2008-05-20 Vincent Celier <celier@adacore.com>
1071 * cstand.adb (Print_Standard): Issue the correct Size clause for type
1072 Wide_Wide_Character.
1074 2008-05-20 Tristan Gingold <gingold@adacore.com>
1076 * decl.c: Do not emit a variable for a object that has an address
1077 representation clause whose value is known at compile time.
1078 When a variable has an address clause whose value is known at compile
1079 time, refer to this variable by using directly the address instead of
1080 dereferencing a pointer.
1082 2008-05-20 Robert Dewar <dewar@adacore.com>
1085 * einfo.ads, einfo.adb (Non_Binary_Modulus): Applies to all types and
1086 subtypes, always False for non-modular types.
1087 Shared_Var_Assign_Proc (node22) and Shared_Var_Read_Proc (node 15)
1088 entry nodes have been replaced by Shared_Var_Procs_Instance (node22)
1089 for Shared_Storage package.
1090 (Is_RACW_Stub_Type): New entity flag.
1093 (Expand_N_Op_Expon): Avoid incorrect optimization of a*(2**b) in the
1094 case where we have a modular type with a non-binary modules.
1095 Comments reformattings.
1097 * sem_intr.adb: Simplify code not that Non_Binary_Modulus applies to
1100 2008-05-20 Javier Miranda <miranda@adacore.com>
1103 (Build_Record_Aggr_Code): Fix wrong tests checking progenitors. Previous
1104 tests did not covered the case in which the type of the aggregate has
1105 no progenitors but some its parents has progenitors.
1107 2008-05-20 Gary Dismukes <dismukes@adacore.com>
1108 Hristian Kirtchev <kirtchev@adacore.com>
1111 (Expand_N_Object_Declaration): Correct the condition which triggers the
1112 generation of a call to Displace when initializing a class-wide object.
1113 (Build_Dcheck_Functions): Build discriminant-checking for null variants
1114 when Frontend_Layout_On_Target is true to ensure that they're available
1115 for calling when a record variant size function is built in Layout.
1117 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1119 * exp_ch5.adb (Expand_Assign_Record): Within an initialization
1120 procedure for a derived type retrieve the discriminant values from the
1121 parent using the corresponding discriminant.
1122 (Expand_N_Assignment_Statement): Skip generation of implicit
1123 if-statement associated with controlled types if we are
1124 compiling with restriction No_Finalization.
1126 2008-05-20 Vincent Celier <celier@adacore.com>
1128 * prj.adb (Hash (Project_Id)): New function
1129 (Project_Empty): Add new component Interfaces_Defined
1131 * prj.ads (Source_Data): New component Object_Linked
1132 (Language_Config): New components Object_Generated and Objects_Linked
1133 (Hash (Project_Id)): New function
1134 (Source_Data): New Boolean components In_Interfaces and
1135 Declared_In_Interfaces.
1136 (Project_Data): New Boolean component Interfaces_Defined
1139 New project level attribute Object_Generated and Objects_Linked
1140 Add new project level attribute Interfaces
1142 * prj-dect.adb: Use functions Present and No throughout
1143 (Parse_Variable_Declaration): If a string type is specified as a simple
1144 name and is not found in the current project, look for it also in the
1145 ancestors of the project.
1148 Replace procedure Make with procedures Initialize, Process and Finalize
1149 to implement H414-023: process different directories with different
1151 Use functions Present and No throughout
1154 Replace procedure Make with procedures Initialize, Process and Finalize
1157 (Add_Source): Set component Object_Exists and Object_Linked accordnig to
1158 the language configuration.
1159 (Process_Project_Level_Array_Attributes): Process new attributes
1160 Object_Generated and Object_Linked.
1161 (Report_No_Sources): New Boolean parameter Continuation, defaulted to
1162 False, to indicate that the erreor/warning is a continuation.
1163 (Check): Call Report_No_Sources with Contnuation = True after the first
1165 (Error_Msg): Process successively contnuation character and warning
1167 (Find_Explicit_Sources): Check that all declared sources have been found
1168 (Check_File): Indicate in hash table Source_Names when a declared source
1170 (Check_File): Set Other_Part when found
1171 (Find_Explicit_Sources): In multi language mode, check if all exceptions
1172 to the naming scheme have been found. For Ada, report an error if an
1173 exception has not been found. Otherwise, disregard the exception.
1174 (Check_Interfaces): New procedure
1175 (Add_Source): When Other_Part is defined, set mutual pointers in spec
1177 (Check): In multi-language mode, call Check_Interfaces
1178 (Process_Sources_In_Multi_Language_Mode): Set In_Interfaces to False
1179 for an excluded source.
1180 (Remove_Source): A source replacing a source in the interfaces is also
1183 * prj-pars.adb: Use function Present
1185 * prj-part.adb: Use functions Present and No throughout
1186 (Parse_Single_Project): Set the parent project for child projects
1187 (Create_Virtual_Extending_Project): Register project with no qualifier
1188 (Parse_Single_Project): Allow an abstract project to be extend several
1189 times. Do not allow an abstract project to extend a non abstract
1192 * prj-pp.adb: Use functions Present and No throughout
1193 (Print): Take into account the full associative array attribute
1196 * prj-proc.adb: Use functions Present and No throughout
1197 (Expression): Call itself with the same From_Project_Node for the
1198 default value of an external reference.
1200 * prj-strt.adb: Use functions Present and No throughout
1201 (Parse_Variable_Reference): If a variable is specified as a simple name
1202 and is not found in the current project, look for it also in the
1203 ancestors of the project.
1205 * prj-tree.ads, prj-tree.adb (Present): New function
1207 Use functions Present and No throughout
1208 (Parent_Project_Of): New function
1209 (Set_Parent_Project_Of): New procedure
1211 * snames.ads, snames.adb:
1212 Add new standard names Object_Generated and Objects_Linked
1214 2008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
1216 * exp_ch6.adb (Expand_Call): Add guard to ensure that both the parent
1217 and the derived type are of the same kind.
1218 (Expand_Call): Generate type conversions for actuals of
1219 record or array types when the parent and the derived types differ in
1220 size and/or packed status.
1222 2008-05-20 Javier Miranda <miranda@adacore.com>
1223 Ed Schonberg <schonberg@adacore.com>
1225 * exp_disp.adb (Make_DT, Make_Secondary_DT, Make_Tags): Avoid
1226 generating dispatch tables of locally defined tagged types statically.
1227 Remove implicit if-statement that is no longer required.
1228 (Expand_Dispatching_Call): If this is a call to an instance of the
1229 generic dispatching constructor, the type of the first argument may be
1230 a subtype of Tag, so always use the base type to recognize this case.
1232 2008-05-20 Thomas Quinot <quinot@adacore.com>
1235 (GARLIC_Support.Add_RACW_Read_Attribute): When a zero value is received,
1236 and the RACW is null-excluding, raise CONSTRAINT_ERROR instead of
1237 assigning NULL into the result, to avoid a spurious warning.
1238 (Add_RACW_Features, case Same_Scope): Add assertion that designated type
1240 (Add_Stub_Type): Set entity flag Is_RACW_Stub_Type on generated stub
1242 (Build_From_Any_Function, Build_To_Any_Function,
1243 Build_TypeCode_Function): For a type that has user-specified stream
1244 attributes, use an opaque sequence of octets as the representation.
1246 2008-05-20 Kevin Pouget <pouget@adacore.com>
1248 * exp_smem.ads, exp_smem.adb: Construction of access and assign
1249 routines has been replaced by an instantiation of
1250 System.Shared_Storage.Shared_Var_Procs generic package, while expanding
1251 shared variable declaration.
1252 Calls to access and assign routines have been replaced by calls to
1253 Read/Write routines of System.Shared_Storage.Shared_Var_Procs
1254 instantiated package.
1256 * rtsfind.ads: RE_Shared_Var_Procs entry has been added in RE_Unit_Table
1257 It identifies the new generic package added in s-shasto.
1259 * s-shasto.adb, s-shasto.ads: A new generic package has been added, it
1260 is instantiated for each shared passive variable. It provides
1261 supporting procedures called upon each read or write access by the
1265 For this runtime unit (always compiled in GNAT mode), we allow
1266 stream attributes references for limited types for the case where
1267 shared passive objects are implemented using stream attributes,
1268 which is the default in GNAT's persistent storage implementation.
1270 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1273 (Freeze_Enumeration_Type): For a subtype that inherits a foreign
1274 convention from its base type, do not set the type to that of integer,
1275 because it may inherit a size clause.
1276 Warn on a size clause with a size different
1277 from that of Integer, if the type has convention C.
1279 2008-05-20 Vincent Celier <celier@adacore.com>
1282 (Scan_Args): Rewrite to take into account new switch --and to separate
1283 arguments into sections.
1284 (Gnatname): Call Prj.Makr.Initialize, then Prj.Makr.Process for each
1285 section, then Finalize.
1287 2008-05-20 Tristan Gingold <gingold@adacore.com>
1289 * init.c: Enable stack probing on ppc-linux.
1291 * tracebak.c: Add symbolic traceback for ppc-linux.
1293 * system-linux-ppc.ads: Enable stack probing on ppc-linux.
1295 2008-05-20 Arnaud Charlet <charlet@adacore.com>
1298 (common-tools): New rule, to avoid parallel build failure on gnat tools.
1299 Reenable parallel builds on this Makefile.
1301 * Make-lang.in: Update dependencies.
1303 2008-05-20 Robert Dewar <dewar@adacore.com>
1305 * opt.ads (Treat_Restrictions_As_Warnings): New switch
1307 * sem_prag.adb, par-prag.adb, restrict.ads: Implement flag
1308 Treat_Restrictions_As_Warnings.
1310 * switch-c.adb: Recognize new switch -gnatr
1312 * usage.adb: Add line for -gnatr
1314 2008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
1317 (P_Access_Definition): Change the error message when parsing "access
1318 all" in Ada 95 mode. The message no longer forces the user to recompile
1319 in 05 mode only to discover that anonymous access types are not allowed
1322 2008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
1325 (P_Protected): Update the error message on missing "-gnat05" switch when
1326 using interfaces in conjunction with protected types. Remove the
1327 incorrect error message associated with the presence of "private" after
1330 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1332 * sem_aggr.adb: Update comments.
1333 Improve previous change for PR ada/17985
1335 2008-05-20 Thomas Quinot <quinot@adacore.com>
1338 (Set_Categorization_From_Scope): Do not set In_Remote_Types unless in
1339 the visible part of the spec of a remote types unit.
1340 (Validate_Remote_Access_Object_Type_Declaration):
1341 New local subprogram Is_Valid_Remote_Object_Type, replaces
1342 Is_Recursively_Limited_Private.
1343 (Validate_RACW_Primitives): Enforce E.2.2(14) rules: the types of all
1344 non-controlling formals (and the return type, even though this is not
1345 explicit in the standard) must support external streaming.
1346 (Validate_RCI_Subprogram_Declaration): Enforce E.2.3(14) rules: same
1347 as above for of RAS types and RCI subprograms. (The return type is not
1349 Update comments related to RACWs designating limited interfaces per
1350 ARG ruling on AI05-060.
1352 * sem_util.ads, sem_util.adb
1353 (Is_Remote_Access_To_Class_Wide_Type): Only rely on Is_Remote_Types and
1354 Is_Remote_Call_Interface to identify RACW types in a stable and
1355 consistent way. We used to rely in this predicate on the privateness of
1356 the designated type and its ancestors, but depending on the currently
1357 visible private parts, this caused false negatives. We now uniformly
1358 rely on checks made at the point where the RACW type is declared.
1359 (Inspect_Deferred_Constant_Completion): Moved from Sem_Ch7.
1361 2008-05-20 Javier Miranda <miranda@adacore.com>
1362 Ed Schonberg <schonberg@adacore.com>
1363 Hristian Kirtchev <kirtchev@adacore.com>
1366 (Analyze_Object_Declaration): Fix over-conservative condition
1367 restricting use of predefined assignment with tagged types that have
1369 (Analyze_Object_Declaration): Relax the check regarding deferred
1370 constants declared in scopes other than packages since they can be
1371 completed with pragma Import.
1372 Add missing escaping of all-caps word 'CPP' in error messages.
1373 (Build_Discriminated_Subtype): Do not inherit representation clauses
1374 from parent type if subtype already carries them, because they are
1375 inherited earlier during derivation and already include those that may
1376 come from a partial view.
1378 * sem_ch9.adb, sem_ch5.adb, sem_ch6.adb (Analyze_Subprogram_Body):
1379 Check the declarations of a subprogram body for proper deferred
1380 constant completion.
1382 * sem_ch7.ads, sem_ch7.adb
1383 (Inspect_Deferred_Constant_Completion): Moved to sem_util.
1385 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1386 Thomas Quinot <quinot@adacore.com>
1389 (Try_Indexed_Call): Handle properly a construct of the form F(S) where
1390 F is a parameterless function that returns an array, and S is a subtype
1392 (Analyze_Call): Insert dereference when the prefix is a parameterless
1393 function that returns an access to subprogram and the call has
1395 Reject a non-overloaded call whose name resolves to denote
1396 a primitive operation of the stub type generated to support a remote
1397 access-to-class-wide type.
1399 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1402 (Note_Redundant_Use): Diagnose a redundant use within a subprogram body
1403 when there is a use clause for the same entity in the context.
1404 (Analyze_Subprogram_Renaming): A renaming_as_body is legal if it is
1405 created for a stream attribute of an abstract type or interface type.
1407 2008-05-20 Thomas Quinot <quinot@adacore.com>
1409 * sem_dist.ads, sem_dist.adb (Is_RACW_Stub_Type_Operation): New
1413 (Add_One_Interp): Ignore any interpretation that is a primitive
1414 operation of an RACW stub type (these primitives are only executed
1415 through dispatching, never through static calls).
1416 (Collect_Interps): When only one interpretation has been found, set N's
1417 Entity and Etype to that interpretation, otherwise Entity and Etype may
1418 still refer to an interpretation that was ignored by Add_One_Interp,
1419 in which case would end up with being marked as not overloaded but with
1420 an Entity attribute not pointing to its (unique) correct interpretation.
1422 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1425 (Eval_Slice): Warn when a slice whose discrete range is a subtype name
1426 denotes the whole array of its prefix.
1428 2008-05-20 Robert Dewar <dewar@adacore.com>
1430 * sem_res.adb (Resolve_Op_Not): Warn on double negation
1432 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1435 (Print_Itype): Do not modify the sloc of the component type of a
1436 (packed) array itype, because it is an unrelated type whose source
1437 location is independent of the point of creation of the itype itself.
1439 2008-05-20 Thomas Quinot <quinot@adacore.com>
1441 * uintp.adb, urealp.adb: Replace calls to Increment_Last + Set with
1444 2008-05-20 Robert Dewar <dewar@adacore.com>
1445 Vincent Celier <celier@adacore.com>
1447 * vms_data.ads: Add entry for -gnatr
1448 Put GNAT SYNC section in proper alpha order
1449 Add VMS qualifier /DISPLAY_PROGRESS equivalent to gnatmake switch -d
1451 * gnat_ugn.texi: Add documentation for new gnatname switch --and
1452 Update the style checks section
1453 Add documentation of -gnatr
1454 Add to the "Adding the Results of Compiler Checks to gnatcheck Output"
1455 subsection the explanation how compiler checks should be disabled for
1457 Update the list of Ada 95 reserved words used by in the project language
1458 Add documentation for project qualifiers.
1459 Document that abstract projects may be extended by different projects in
1460 the same project tree.
1461 Add documentation for gnatmake switch -d
1463 * ug_words: Add -gnatyy VMS equivalence string.
1464 Add entry for -gnatr
1466 2008-05-20 Bob Duff <duff@adacore.com>
1469 (Set_Handler): Remove code from both of these that implements
1470 RM-D.15(15/2), because it causes a race condition and potential
1472 (Process_Queued_Events): Add comment explaining "exception when others
1473 => null". Add clarifying ".all", even though implicit .all is legal
1476 2008-05-20 Arnaud Charlet <charlet@adacore.com>
1478 * s-winext.ads: Replace representation clause by pragma Pack. Gives
1479 equivalent representation, but has the advantage of allowing
1480 compilation of this file under 64 bits platforms.
1482 * s-os_lib.adb (Normalize_Pathname): Mark Cur_Dir constant.
1484 * s-osinte-irix.ads: (Alternate_Stack_Size): Add dummy declaration.
1487 Don't define dummy implementation of convert_addresses on ppc-linux.
1489 2008-05-20 Ed Schonberg <schonberg@adacore.com>
1492 (Expand_Ctrl_Function_Call): Do not attach result to finalization list
1493 if expression is aggregate component.
1495 2008-05-20 Robert Dewar <dewar@adacore.com>
1497 * g-byorma.adb, gnatlink.adb, prepcomp.adb, sinfo.ads,
1498 sem_ch12.adb: Update comments. Minor reformatting.
1502 * s-unstyp.ads: Fixed some typos in comments.
1504 2008-05-20 Arnaud Charlet <charlet@adacore.com>
1506 * s-taspri-vxworks.ads (Task_Address, Task_Address_Size): New
1509 * g-socthi-vxworks.ads: Update to latest socket changes.
1511 * a-caldel-vms.adb: Resync with a-caldel spec.
1513 * exp_ch9.ads, sem_ch8.ads, inline.adb: Minor reformatting.
1516 2008-05-17 Eric Botcazou <ebotcazou@adacore.com>
1518 * trans.c (gnat_to_gnu) <N_Validate_Unchecked_Conversion>: Account
1519 for dummy types pointed to by the converted pointer types.
1521 2008-05-15 Eric Botcazou <ebotcazou@adacore.com>
1523 * trans.c (add_decl_expr): At toplevel, mark the TYPE_ADA_SIZE field
1524 of records and unions.
1525 (gnat_to_gnu) <N_Validate_Unchecked_Conversion>: Fix formatting.
1527 2008-05-14 Samuel Tardieu <sam@rfc1149.net>
1528 Robert Dewar <dewar@adacore.com>
1530 * sem_attr.adb (Analyze_Attribute, Attribute_Old case): Add
1531 restrictions to the prefix of 'Old.
1532 * sem_util.ads, sem_util.adb (In_Parameter_Specification): New.
1533 * gnat_rm.texi ('Old): Note that 'Old cannot be applied to local
1536 2008-05-13 Eric Botcazou <ebotcazou@adacore.com>
1540 * utils.c (convert) <INTEGER_TYPE>: When converting an additive
1541 expression to an integral type with lower precision, use NOP_EXPR
1542 directly in a couple of special cases.
1544 2008-05-12 Samuel Tardieu <sam@rfc1149.net>
1545 Ed Schonberg <schonberg@adacore.com>
1547 * sem_ch3.adb (Build_Derived_Record_Type): Accept statically matching
1548 constraint expressions.
1550 2008-05-12 Tomas Bily <tbily@suse.cz>
1552 * utils2.c (known_alignment, contains_save_expr_p)
1553 (gnat_mark_addressable): Use CASE_CONVERT.
1554 * decl.c (annotate_value): Likewise.
1555 * trans.c (maybe_stabilize_reference): Likewise.
1556 * utils2.c (build_binary_op): Use CONVERT_EXPR_P.
1557 * utils.c (rest_of_record_type_compilation): Likewise.
1558 * trans.c (protect_multiple_eval, Attribute_to_gnu)
1559 (protect_multiple_eval): Likewise.
1561 2008-05-08 Andreas Schwab <schwab@suse.de>
1563 * utils.c (handle_pure_attribute, init_gigi_decls): Rename
1564 DECL_IS_PURE to DECL_PURE_P.
1566 2008-05-05 Eric Botcazou <ebotcazou@adacore.com>
1568 * decl.c (maybe_pad_type): Add ??? comment.
1570 2008-05-03 Eric Botcazou <ebotcazou@adacore.com>
1572 * decl.c (components_to_record): Zero the alignment of the qualified
1573 union built for the variant part upon creating it.
1575 2008-05-03 Eric Botcazou <ebotcazou@adacore.com>
1577 * decl.c (maybe_pad_type): Try to get a form of the type with integral
1578 mode even if the alignment is not a factor of the original size. But
1579 make sure to create the inner field with the original size. Reorder.
1580 * trans.c (addressable_p) <COMPONENT_REF>: Treat the field of a padding
1581 record as always addressable.
1582 * utils.c (convert): Deal specially with conversions between original
1583 and packable versions of a record type.
1584 * utils2.c (build_binary_op) <MODIFY_EXPR>: Be more restrictive when
1585 recognizing an assignment between padded objects.
1587 2008-05-01 Eric Botcazou <ebotcazou@adacore.com>
1589 * decl.c (make_packable_type): Resize the last component to its RM size
1590 only if it is of an aggregate type.
1591 * trans.c (call_to_gnu): Fix nit in comment.
1592 (gnat_to_gnu): Likewise.
1594 2008-04-30 Samuel Tardieu <sam@rfc1149.net>
1596 * Makefile.in: Adapt sh4-linux target.
1598 2008-04-29 Ed Schonberg <schonberg@adacore.com>
1601 * sem_ch3.adb (Find_Type_Name): Refuse completion of an incomplete
1602 tagged type by an untagged protected or task type.
1604 2008-04-28 Eric Botcazou <ebotcazou@adacore.com>
1605 Tristan Gingold <gingold@adacore.com>
1608 * decl.c (gnat_to_gnu_entity) <object>: Do not promote alignment
1609 of aliased objects with an unconstrained nominal subtype.
1610 Cap the promotion to the effective alignment of the word mode.
1612 2008-04-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1614 * Make-lang.in (ada.tags, check-acats, ada/treeprs.ads)
1615 (ada/einfo.h, ada/sinfo.h, ada/nmake.adb, ada/nmake.ads):
1616 Use '&&' instead of ';'.
1618 2008-04-24 Olivier Hainque <hainque@adacore.com>
1620 * trans.c (Attribute_to_gnu) <case Attr_Length>: Length computation
1621 doesn't require signed arithmetic anymore.
1623 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
1625 * trans.c (Attribute_to_gnu): Don't set TREE_INVARIANT.
1626 (call_to_gnu): Don't set TREE_INVARIANT.
1627 * utils2.c (gnat_build_constructor): Don't set TREE_INVARIANT.
1629 2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
1631 * s-osinte-rtems.adb: Add sigalstack function.
1632 * s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack
1633 function. Add Alternate_Stack and Alternate_Stack_Size.
1634 Add missing process_shared field to pthread_condattr_t
1635 and change ss_low_priority to int from timespec.
1637 2008-04-22 Samuel Tardieu <sam@rfc1149.net>
1639 * i-forbla.adb: Link against -llapack and -lblas by default
1640 instead of the private -lgnalasup.
1642 2008-04-21 Olivier Hainque <hainque@adacore.com>
1644 Access to most C builtins from Ada
1645 * utils.c: #include "langhooks.h" and define GCC_DIAG_STYLE.
1646 (handle_pure_attribute, handle_novops_attribute,
1647 handle_nonnull_attribute, handle_sentinel_attribute,
1648 handle_noreturn_attribute, handle_malloc_attribute,
1649 handle_type_generic_attribute): New attribute handlers, from C fe.
1650 (gnat_internal_attribute_table): Map the new handlers.
1651 (gnat_init_decl_processing): Move call to gnat_install_builtins to ...
1652 (init_gigi_decls): ... here.
1653 (handle_const_attribute, handle_nothrow_attribute, builtin_decl_for):
1654 Move to a section dedicated to builtins processing.
1655 (build_void_list_node, builtin_type_for_size): New functions.
1656 (def_fn_type, get_nonnull_operand): Likewise.
1657 (install_builtin_elementary_type, install_builtin_function_types,
1658 install_builtin_attributes): Likewise.
1659 (fake_attribute_handler): Fake handler for attributes we don't
1661 (def_builtin_1): New function, worker for DEF_BUILTIN.
1662 (install_builtin_functions): New function.
1663 (gnat_install_builtins): Move to the builtins processing section.
1664 Now calling the newly introduced installers.
1666 2008-04-20 Eric Botcazou <ebotcazou@adacore.com>
1668 * decl.c (gnat_to_gnu_entity) <object>: Also promote the alignment of
1669 constant objects, but not exceptions.
1670 * trans.c (add_decl_expr): Use gnat_types_compatible_p for type
1672 * utils.c (create_var_decl_1): Likewise.
1673 * utils2.c (build_binary_op) <MODIFY_EXPR>: Also use the padded view of
1674 the type when copying to padded object and the source is a constructor.
1676 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1678 * decl.c (gnat_to_gnu_entity) <object>: When trying to promote the
1679 alignment, reset it to zero if it would end up not being greater
1680 than that of the type.
1682 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1684 * decl.c (maybe_pad_type): Only generate the XVS parallel type if
1685 the padded type has a variable size.
1687 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1689 * decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Use the return by
1690 target pointer mechanism as soon as the size is not constant.
1692 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1694 * gigi.h (create_var_decl_1): Declare.
1695 (create_var_decl): Turn into a macro invoking create_var_decl_1.
1696 (create_true_var_decl): Likewise.
1697 * utils.c (create_var_decl_1): Make global and reorder parameters.
1698 (create_var_decl): Delete.
1699 (create_true_var_decl): Likewise.
1701 2008-04-17 Eric Botcazou <ebotcazou@adacore.com>
1703 * decl.c (gnat_to_gnu_entity) <object>: Promote the alignment of
1705 * fe.h (Debug_Flag_Dot_A): Delete.
1706 * debug.adb (-gnatd.a): Update documentation.
1708 2008-04-17 Samuel Tardieu <sam@rfc1149.net>
1710 * g-socket.ads, g-socket.adb (Get_Address): Make Stream a
1711 "not null" parameter.
1713 2008-04-17 Samuel Tardieu <sam@rfc1149.net>
1715 * g-socket.adb: Add a message "IPv6 not supported" to the
1716 Socket_Error exception.
1718 2008-04-16 Samuel Tardieu <sam@rfc1149.net>
1721 * sem_ch12.adb (Instantiate_Type): Check whether the full view of
1722 the type is known instead of the underlying type.
1724 2008-04-15 Ed Schonberg <schonberg@adacore.com>
1727 * exp_ch5.adb (Expand_Assign_Record): Within an initialization
1728 procedure for a derived type retrieve the discriminant values from
1729 the parent using the corresponding discriminant.
1731 2008-04-15 Samuel Tardieu <sam@rfc1149.net>
1732 Gary Dismukes <dismukes@adacore.com>
1735 * sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
1736 which is not an entity (and hence not a package).
1737 (End_Use_Package): Ditto.
1739 2008-04-15 Ed Schonberg <schonberg@adacore.com>
1742 * sem_ch12.adb (Analyze_Formal_Subprogram): The default can be any
1743 protected operation that matches the signature, not only an entry, a
1744 regular subprogram or a literal.
1746 2008-04-15 Eric Botcazou <ebotcazou@adacore.com>
1748 * ada-tree.h (DECL_BY_COMPONENT_PTR_P): Use DECL_LANG_FLAG_3.
1749 * decl.c (gnat_to_gnu_entity) <object>: Call maybe_pad_type only
1750 if a size or alignment is specified. Do not take into account
1751 alignment promotions for the computation of the object's size.
1752 <type>: Call maybe_pad_type only if a size or alignment is specified.
1753 (maybe_pad_type): Really reuse the RM_Size of the original type if
1755 * trans.c (Attribute_to_gnu): Fix a couple of nits.
1756 * utils2.c (build_binary_op) <MODIFY_EXPR>: Merge related conditional
1757 statements. Use the padded view of the type when copying between
1758 padded objects of the same underlying type.
1760 2008-04-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1762 * vms_data.ads: Fix typo in constant.
1763 * gen-soccon.c: Fix typo in error string.
1764 * gnat_rm.texi (Pragma Optimize_Alignment, Pragma Postcondition):
1766 * a-calcon.ads, a-calend-vms.adb, a-calend.adb, a-crdlli.ads,
1767 bcheck.adb, checks.adb, einfo.ads, errout.adb, erroutc.adb,
1768 erroutc.ads, exp_attr.adb, exp_ch11.adb, exp_ch2.adb,
1769 exp_ch5.adb, exp_ch9.adb, exp_ch9.ads, exp_pakd.adb,
1770 exp_util.adb, fmap.adb, g-soccon-linux-mips.ads,
1771 g-soccon-rtems.ads, g-timsta.adb, g-timsta.ads, lib-writ.ads,
1772 mlib-tgt-specific-linux.adb, mlib-tgt-specific-tru64.adb,
1773 s-interr-vxworks.adb, s-interr.adb, s-osinte-lynxos.ads,
1774 s-rident.ads, s-taprop-solaris.adb, s-tassta.adb, s-win32.ads,
1775 sem_aggr.adb, sem_attr.ads, sem_ch10.adb, sem_ch13.ads,
1776 sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb,
1777 sem_prag.ads, sem_res.adb, sem_util.adb, sem_util.ads,
1778 sinfo.ads: Fix typos in comments.
1780 2008-04-14 Robert Dewar <dewar@adacore.com>
1782 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Extend error
1783 to every non-object and change error message.
1785 2008-04-14 Robert Dewar <dewar@adacore.com>
1787 * sem_util.ads, sem_util.adb (In_Subprogram): Remove.
1788 * sem_attr.adb (Anayze_Attribute): Check for Current_Subprogram
1791 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
1794 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Refuse to
1795 apply pragma Linker_Section on type.
1797 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
1800 * sem_prag.adb (Error_Pragma_Ref): New.
1801 (Process_Convention): Specialized message for non-local
1802 subprogram renaming. Detect the problem in homonyms as well.
1804 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
1807 * sem_util.ads, sem_util.adb (Denotes_Variable): New function.
1808 * sem_ch12.adb (Instantiate_Object): Use it.
1809 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ensure that
1810 storage pool denotes a variable as per RM 13.11(15).
1812 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
1814 * sem_util.ads, sem_util.adb (In_Subprogram): New function.
1815 * sem_attr.adb (Analyze_Attribute, Attribute_Old case): Use it.
1817 2008-04-14 Rolf Ebert <rolf.ebert.gcc@gmx.de>
1820 * xgnatugn.adb (Put_Line): New procedure, ensuring Unix
1821 line endings even on non-Unix platforms.
1823 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
1826 * xref_lib.adb (Parse_Identifier_Info): Correctly parse and ignore the
1827 renaming information.
1829 2008-04-13 Samuel Tardieu <sam@rfc1149.net>
1832 * sem_aggr.adb (Valid_Ancestor_Type): A type is not an ancestor of
1835 2008-04-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1837 * sfn_scan.adb, sfn_scan.ads, sinfo.ads,
1838 sinput-d.ads, sinput-l.adb, sinput-l.ads, sinput.ads,
1839 snames.ads, sprint.adb, stand.ads, stringt.ads,
1840 styleg.adb, styleg.ads, stylesw.adb, stylesw.ads,
1841 switch.ads, sysdep.c, table.adb, table.ads,
1842 targparm.ads, tb-gcc.c, tbuild.ads, tracebak.c,
1843 trans.c, tree_io.adb, treepr.adb, types.adb, types.ads,
1844 uintp.adb, uintp.ads, utils.c, utils2.c, validsw.ads,
1845 vms_conv.adb, vms_conv.ads, vms_data.ads, widechar.adb,
1846 widechar.ads, xeinfo.adb, xgnatugn.adb, xr_tabls.adb,
1847 xr_tabls.ads, xref_lib.adb, xref_lib.ads, xsinfo.adb:
1850 * sem_ch10.adb, sem_ch10.ads,
1851 sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads,
1852 sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1853 sem_ch6.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
1854 sem_elab.adb, sem_elab.ads, sem_elim.ads, sem_eval.adb,
1855 sem_eval.ads, sem_intr.adb, sem_mech.adb, sem_mech.ads,
1856 sem_prag.adb, sem_prag.ads, sem_res.adb, sem_res.ads,
1857 sem_type.adb, sem_util.adb, sem_util.ads, sem_warn.adb,
1858 sem_warn.ads: Fix comment typos.
1860 * s-secsta.adb, s-sequio.ads, s-shasto.ads,
1861 s-soflin.ads, s-stalib.ads, s-stausa.adb,
1862 s-stausa.ads, s-strxdr.adb, s-taenca.adb, s-taenca.ads,
1863 s-taprob.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
1864 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-posix.adb,
1865 s-taprop-solaris.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1866 s-taprop-vxworks.adb, s-taprop.ads, s-tarest.adb,
1867 s-tarest.ads, s-tasini.adb, s-tasini.ads, s-taskin.ads,
1868 s-tasque.ads, s-tassta.adb, s-tassta.ads, s-tasuti.ads,
1869 s-tpoben.adb, s-tpoben.ads, s-tpobop.adb,
1870 s-tpopsp-posix.adb, s-tpopsp-rtems.adb, s-tposen.adb,
1871 s-tposen.ads, s-traceb-hpux.adb, s-traces.ads,
1872 s-trafor-default.ads, s-unstyp.ads, s-utf_32.ads,
1873 s-vaflop.adb, s-vaflop.ads, s-valrea.adb, s-valuti.adb,
1874 s-wchstw.ads, s-wchwts.adb, s-wchwts.ads, scans.ads,
1875 scn.adb, scng.adb, seh_init.c, sem.ads, sem_aggr.adb,
1876 sem_attr.adb, sem_attr.ads, sem_case.adb, sem_case.ads,
1877 sem_cat.adb, sem_cat.ads: Fix comment typos.
1879 2008-04-12 Joel Sherrill <joel@oarcorp.com>
1882 * g-soccon-rtems.ads: Add IP_PKTINFO as unsupported.
1884 2008-04-12 Arnaud Charlet <charlet@adacore.com>
1886 * s-linux-hppa.ads: Fix syntax errors.
1888 2008-04-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1890 * gnat_ugn.texi: Fix typos.
1891 * raise-gcc.c, repinfo.adb, repinfo.ads, restrict.adb,
1892 restrict.ads, rtsfind.adb, rtsfind.ads, s-arit64.ads,
1893 s-asthan-vms-alpha.adb, s-auxdec.ads, s-casuti.ads,
1894 s-fatflt.ads, s-fatgen.adb, s-fatlfl.ads,
1895 s-fatllf.ads, s-fatsfl.ads, s-filofl.ads,
1896 s-finimp.adb, s-finroo.ads, s-fishfl.ads,
1897 s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1898 s-hibaen.ads, s-htable.ads, s-imgcha.adb,
1899 s-imgenu.ads, s-imgint.adb, s-imgrea.adb,
1900 s-inmaop-dummy.adb, s-inmaop.ads, s-interr-vms.adb,
1901 s-interr-vxworks.adb, s-interr.adb, s-interr.ads,
1902 s-intman-vxworks.ads, s-intman.ads, s-mastop-irix.adb,
1903 s-os_lib.adb, s-os_lib.ads, s-osinte-aix.ads,
1904 s-osinte-darwin.ads, s-osinte-freebsd.ads,
1905 s-osinte-hpux.ads, s-osinte-lynxos-3.adb,
1906 s-osinte-lynxos-3.ads, s-osinte-lynxos.ads,
1907 s-osinte-rtems.ads, s-osinte-solaris-posix.ads,
1908 s-osprim-mingw.adb, s-osprim-vms.adb, s-parame-ae653.ads,
1909 s-parame-hpux.ads, s-parame-vms-alpha.ads,
1910 s-parame-vms-ia64.ads, s-parame-vms-restrict.ads,
1911 s-parame-vxworks.ads, s-parame.ads, s-parint.adb,
1912 s-parint.ads, s-poosiz.adb, s-proinf-irix-athread.ads,
1913 s-proinf.ads, s-regexp.adb, s-regpat.adb, s-regpat.ads,
1914 s-rident.ads: Fix comment typos.
1916 2008-04-09 Samuel Tardieu <sam@rfc1149.net>
1919 * sem_ch6.adb (Build_Body_To_Inline): Do not save and restore
1920 environment if generic instance is a top-level one.
1922 2008-04-09 Doug Rupp <rupp@adacore.com>
1924 * decl.c (validate_size): Set minimum size for fat pointers same as
1925 access types. Code clean ups.
1927 * gmem.c (xstrdup32): New macro for 32bit dup on VMS, noop otherwise
1928 (__gnat_gmem_a2l_initialize): Dup exename into 32 bit memory on VMS
1930 * s-auxdec-vms_64.ads, s-auxdec.ads (Short_Address_Size): New constant
1932 * s-crtl.ads (malloc32) New function, alias for malloc
1933 (realloc32) New function, alias for realloc
1935 * socket.c (__gnat_new_socket_set): Malloc fd_set in 32 bits on VMS
1937 * utils2.c (build_call_alloc_dealloc): Return call to short malloc if
1938 allocator size is 32 and default pointer size is 64.
1939 (find_common_type): Document assumption on t1/t2 vs lhs/rhs. Force use of
1940 lhs type if smaller, whatever the modes.
1942 * gigi.h (malloc32_decl): New macro definition
1944 * utils.c (init_gigi_decls): New malloc32_decl
1945 Various code clean ups.
1947 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
1948 Task_Address vice System.Address.
1950 * s-taspri-vms.ads: Import System.Aux_DEC
1951 (Task_Address): New subtype of System.Aux_DEC.Short_Address
1952 (Task_Address_Size): New constant size of System.Aux_DEC.Short_Address
1954 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
1955 Task_Address vice System.Address.
1957 * s-inmaop-vms.adb: Import System.Task_Primitives
1958 (To_Address): Unchecked convert to Task_Address vice System.Address
1960 * s-taprop-vms.adb (Timed_Delay): Always set the timer even if delay
1962 (To_Task_ID) Unchecked convert from Task_Adddress vice System.Address
1963 (To_Address) Unchecked convert to Task_Address vice System.Address
1965 * s-tpopde-vms.adb: Remove unnecessary warning pragmas
1967 * g-socthi-vms.ads: Add 32bit size clauses on socket access types.
1969 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1971 * gigi.h (standard_datatypes): Add ADT_fdesc_type and ADT_null_fdesc.
1972 (fdesc_type_node): Define.
1973 (null_fdesc_node): Likewise.
1974 * decl.c (gnat_to_gnu_entity) <E_Access_Subprogram_Type>: If the target
1975 uses descriptors for vtables and the type comes from a dispatch table,
1976 return the descriptor type.
1977 * trans.c (Attribute_to_gnu) <Attr_Unrestricted_Access>: If the target
1978 uses descriptors for vtables and the type comes from a dispatch table,
1979 build a descriptor in the static case and copy the existing one in the
1981 (gnat_to_gnu) <N_Null>: If the target uses descriptors for vtables and
1982 the type is a pointer-to-subprogram coming from a dispatch table,
1983 return the null descriptor.
1984 <N_Unchecked_Type_Conversion>: If the target uses descriptors for
1985 vtables, the source type is the descriptor type and the target type
1986 is a pointer type, first build the pointer.
1987 * utils.c (init_gigi_decls): If the target uses descriptors for vtables
1988 build the descriptor type and the null descriptor.
1990 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1992 * decl.c (prepend_attributes): Fix typo.
1993 * trans.c (Pragma_to_gnu): Likewise.
1994 * utils.c (gnat_genericize): Likewise.
1996 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1997 Richard Kenner <kenner@adacore.com>
1999 * ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Only set it when bit-packed.
2000 * decl.c (gnat_to_gnu_entity): Adjust for above change.
2001 <E_Record_Type>: Try to get a better form of the component for
2002 packing, even if it has an integral mode.
2003 <E_Record_Subtype>: Likewise.
2004 * trans.c (gnat_to_gnu): Do not require BLKmode for the special
2005 exception suppressing the final conversion between record types.
2007 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
2009 * decl.c (gnat_to_gnu_entity) <object>: If -gnatd.a and not optimizing
2010 alignment for space, promote the alignment of non-scalar variables with
2011 no size and alignment.
2012 * gigi.h (gnat_types_compatible_p): Declare.
2013 * misc.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Set to above predicate.
2014 * trans.c (gnat_to_gnu): Revert revision 129339 change. Minor cleanup.
2015 * utils.c (gnat_types_compatible_p) : New predicate.
2016 (convert): Use it throughout to test for cases where a mere view
2017 conversion is sufficient.
2018 * utils2.c (build_binary_op): Minor tweaks.
2019 (build_unary_op): Likewise.
2021 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
2023 * decl.c (adjust_packed): Expand comment.
2025 2008-04-08 Arnaud Charlet <charlet@adacore.com>
2027 * s-tasuti.ads: Use Task_Address instead of System.Address.
2029 * makeutl.adb (Path_Or_File_Name): New function
2031 * nlists.ads, itypes.ads: Update comments.
2033 * s-crtl.ads (malloc32, realloc32): New functions.
2035 * s-auxdec.ads (Short_Address_Size): New constant.
2037 * a-taside.adb, s-tasdeb.adb: Use Task_Address.
2039 * s-ststop.ads, s-ststop.adb: New file.
2041 * exp_tss.ads, s-taprop-lynxos.adb: Update comments.
2044 2008-04-08 Pascal Obry <obry@adacore.com>
2046 * g-sercom.ads, g-sercom.adb (Data_Rate): Add B115200.
2047 (Stop_Bits_Number): New type.
2048 (Parity_Check): Likewise.
2049 (Set): Add parameter to set the number of stop bits and
2050 the parity. Parameter timeout is now a duration instead
2053 * g-sercom-linux.adb:
2054 Implement the stop bits and parity support for GNU/Linux.
2055 Fix handling of timeout, it must be given in tenth of seconds.
2057 * g-sercom-mingw.adb:
2058 Implement the stop bits and parity support for Windows.
2059 Use new s-win32.ads unit instead of declaring Win32 services
2060 directly into this body.
2061 Update handling of timeout as now a duration.
2063 * s-win32.ads, s-winext.ads: New files.
2065 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
2066 Arnaud Charlet <charlet@adacore.com>
2068 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads: Removed.
2070 s-taspri-posix-noaltstack.ads, s-linux.ads, s-linux-alpha.ads,
2071 s-linux-hppa.ads: New files. Disable alternate stack on ia64-hpux.
2073 * s-osinte-lynxos-3.ads,
2074 (Alternate_Stack): Remove when not needed. Simplify declaration
2076 (Alternate_Stack_Size): New constant.
2078 s-osinte-mingw.ads, s-taprop-mingw.adb: Code clean up: avoid use of
2079 'Unrestricted_Access.
2081 * s-osinte-hpux.ads, s-osinte-solaris-posix.ads, s-osinte-aix.ads,
2082 s-osinte-lynxos.ads, s-osinte-freebsd.ads s-osinte-darwin.ads,
2083 s-osinte-tru64.ads, s-osinte-irix.ads, s-osinte-linux.ads,
2084 s-osinte-solaris.ads, s-osinte-vms.ads
2085 (SA_ONSTACK): New constant.
2086 (stack_t): New record type.
2087 (sigaltstack): New imported function.
2088 (Alternate_Stack): New imported variable.
2089 (Alternate_Stack_Size): New constant.
2091 * system-linux-x86_64.ads: (Stack_Check_Probes): Set to True.
2093 * s-taspri-lynxos.ads, s-taspri-solaris.ads, s-taspri-tru64.ads,
2094 s-taspri-hpux-dce.ads, s-taspri-dummy.ads, s-taspri-posix.ads,
2095 s-taspri-vms.ads (Task_Address): New subtype of System.Address
2096 (Task_Address_Size): New constant size of System.Address
2097 (Alternate_Stack_Size): New constant.
2099 * s-taprop-posix.adb, s-taprop-linux.adb (Get_Stack_Attributes): Delete.
2100 (Enter_Task): Do not notify stack to System.Stack_Checking.Operations.
2101 Establish the alternate stack if the platform makes use of n alternate
2102 signal stack for stack overflows.
2103 (Create_Task): Take into account the alternate stack in the stack size.
2104 (Initialize): Save the address of the alternate stack into the ATCB for
2105 the environment task.
2106 (Create_Task): Fix assertions for NPTL library (vs old LinuxThreads).
2108 * s-parame.adb (Minimum_Stack_Size): Increase value to 16K
2110 * system-linux-x86.ads: (Stack_Check_Probes): Set to True.
2112 * s-intman-posix.adb:
2113 (Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an
2114 alternate signal stack for stack overflows.
2116 * init.c (__gnat_adjust_context_for_raise, Linux version): On i386 and
2117 x86-64, adjust the saved value of the stack pointer if the signal was
2118 raised by a stack checking probe.
2119 (HP-UX section): Use global __gnat_alternate_stack as signal handler
2120 stack and only for SIGSEGV.
2121 (Linux section): Likewise on x86 and x86-64.
2123 (__gnat_map_signal): Now static.
2124 (__gnat_error_handler): Not static any more.
2125 (__gnat_adjust_context_for_raise): New function. Signal context
2126 adjustment for PPC && !VTHREADS && !RTP, as required by the zcx
2127 propagation circuitry.
2128 (__gnat_error_handler): Second argument of a sigaction handler is a
2129 pointer, not an int, and is unused.
2130 Adjust signal context before mapping to exception.
2131 Install signal handlers for LynxOS case.
2133 * s-taskin.ads (Common_ATCB): New field Task_Alternate_Stack.
2134 (Task_Id): Set size to Task_Address_Size
2135 (To_Task_id): Unchecked convert from Task_Address vice System.Address
2136 (To_Address): Unchecked convert to Task_Address vice System.Address
2138 * s-tassta.adb (Task_Wrapper): Define the alternate stack and save its
2139 address into the ATCB if the platform makes use of an alternate signal
2140 stack for stack overflows.
2141 (Free_Task): Add call to Finalize_Attributes_Link.
2142 Add argument Relative_Deadline to pass the value specified for
2143 the task. This is not yet used for any target.
2145 * s-tassta.ads (Create_Task): Add argument Relative_Deadline to pass
2146 the value specified for the task.
2148 2008-04-08 Arnaud Charlet <charlet@adacore.com>
2150 (s-osinte-vxworks6.ads): Removed, merged with s-osinte-vxworks.ads/.adb
2151 (s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads,
2152 s-vxwext-rtp.adb): New files.
2154 * s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-osinte-vxworks.adb:
2155 Minor updates to accomodate changes above.
2157 2008-04-08 Pascal Obry <obry@adacore.com>
2159 * a-exetim-mingw.adb, s-gloloc-mingw.adb, s-taprop-mingw.adb,
2160 s-tasinf-mingw.ad{s,b}, s-taspri-mingw.ads:
2161 Use new s-win32.ads unit instead of declaration
2162 from s-osinte-mingw.ads.
2164 * s-osinte-mingw.ads:
2165 Move all non tasking based interface to s-win32.ads.
2167 * s-osprim-mingw.adb:
2168 Remove duplicated declarations and use s-win32.ads
2171 2008-04-08 Vincent Celier <celier@adacore.com>
2172 Arnaud Charlet <charlet@adacore.com>
2174 * mlib-tgt-aix.adb, mlib-tgt-darwin.adb, mlib-tgt-hpux.adb,
2175 mlib-tgt-irix.adb, mlib-tgt-linux.adb, mlib-tgt-lynxos.adb,
2176 mlib-tgt-solaris.adb, mlib-tgt-tru64.adb, mlib-tgt-vms.adb,
2177 mlib-tgt-vms.ads, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
2178 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb: Renamed into...
2180 * mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
2181 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-irix.adb,
2182 mlib-tgt-specific-linux.adb, mlib-tgt-specific-lynxos.adb,
2183 mlib-tgt-specific-solaris.adb, mlib-tgt-specific-tru64.adb,
2184 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads,
2185 mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2186 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb,
2187 mlib-tgt-specific-mingw.adb: New names.
2190 On VxWorks platforms use s-stchop-limit.ads for s-stchop.ads
2192 (EXTRA_GNATRTL_NONTASKING_OBJS): Add s-win32.o
2193 Files mlib-tgt-*.adb have been renamed mlib-tgt-specific-*.adb
2194 Minor updates for VMS
2196 * gnatbl.c: Removed.
2198 2008-04-08 Thomas Quinot <quinot@adacore.com>
2200 * g-expect-vms.adb, a-textio.adb, a-witeio.adb, exp_dbug.adb,
2201 g-expect.adb, g-locfil.adb, gnatchop.adb, gnatdll.adb, gnatlbr.adb,
2202 gnatmem.adb, g-regist.adb, i-vxwork.ads, mlib-utl.adb, i-vxwork-x86.ads,
2203 a-ztexio.adb, g-enblsp-vms-alpha.adb, g-enblsp-vms-ia64.adb,
2204 s-os_lib.adb, s-regpat.adb, s-regpat.ads: Fix incorrect casing of
2205 ASCII.NUL throughout.
2207 2008-04-08 Arnaud Charlet <charlet@adacore.com>
2208 Matthew Heaney <heaney@adacore.com>
2210 * a-cgcaso.adb, a-convec.adb: (Swap, Sift): Avoid use of complex
2213 * a-cgaaso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads,
2214 a-crdlli.ads, a-coormu.ads, a-ciormu.ads: modified header to conform
2215 to convention for non-RM specs.
2216 Add descriptive header, and documented each operation
2217 document each operation
2219 2008-04-08 Robert Dewar <dewar@adacore.com>
2220 Bob Duff <duff@adacore.com>
2221 Gary Dismukes <dismukes@adacore.com>
2222 Ed Schonberg <schonberg@adacore.com>
2224 * alloc.ads: Add entries for Obsolescent_Warnings table
2226 * einfo.ads, einfo.adb: Minor reformatting.
2227 (Is_Discriminal): New subprogram.
2228 (Is_Prival): New subprogram.
2229 (Is_Protected_Component): New subprogram.
2230 (Is_Protected_Private): Removed.
2231 (Object_Ref, Set_Object_Ref): Removed.
2232 (Prival, Set_Prival): Change assertion.
2233 (Privals_Chain, Set_Privals_Chain): Removed.
2234 (Prival_Link, Set_Prival_Link): New subprogram.
2235 (Protected_Operation, Set_Protected_Operation): Removed.
2236 (Protection_Object, Set_Protection_Object): New subprogram.
2237 (Write_Field17_Name): Remove case for Object_Ref.
2238 (Write_Field20_Name): Add case for Prival_Link.
2239 (Write_Field22_Name): Remove case for Protected_Operation,
2241 Add case for Protection_Object.
2242 (Can_Use_Internal_Rep): Make this into a [base type only] attribute,
2244 (Overlays_Constant): New flag
2245 (Is_Constant_Object): New predicate
2246 (Is_Standard_Character_Type): New predicate
2247 (Optimize_Alignment_Space): New flag
2248 (Optimize_Alignment_Time): New flag
2249 (Has_Postconditions): New flag
2250 (Obsolescent_Warrning): Field removed
2251 (Spec_PPC_List): New field
2252 (Relative_Deadline_Variable, Set_Relative_Deadline_Variable): Add
2253 subprograms to get and set the relative deadline associated to a task.
2255 * exp_attr.adb (May_Be_External_Call): Account for the case where the
2256 Access attribute is part of a named parameter association.
2257 (Expand_Access_To_Protected_Op): Test for the attribute occurring
2258 within an init proc and use that directly as the scope rather than
2259 traversing up to the protected operation's enclosing scope. Only apply
2260 assertion on Is_Open_Scopes in the case the scope traversal is done.
2261 For the init proc case use the address of the first formal (_init) as
2262 the protected object reference.
2263 Implement Invalid_Value attribute
2264 (Expand_N_Attribute_Reference): Case Attribute_Unrestricted_Access.
2265 contents of the dispatch table there is no need to duplicate the
2266 itypes associated with record types (i.e. the implicit full view
2268 Implement Enum_Val attribute
2269 (Expand_N_Attribute_Reference, case Old): Properly handle appearence
2270 within _Postconditions procedure
2271 (Expand_N_Attribute_Reference, case Result): Implement new attribute
2273 * exp_ch5.adb (Expand_N_Simple_Return_Statement): Handle case in which
2274 a return statement calls a function that is not available in
2275 configurable runtime.
2276 (Analyze_If_Statement): don't optimize simple True/False cases in -O0
2277 (Expand_Non_Function_Return): Generate call to _Postconditions proc
2278 (Expand_Simple_Function_Return): Ditto
2280 * frontend.adb: Add call to Sem_Aux.Initialize
2282 * sem_aux.ads, sem_aux.adb: New file.
2284 * par-prag.adb: Add entries for pragmas Precondition/Postcondition
2285 Add new Pragma_Relative_Deadline.
2286 Add support for pragmas Check and Check_Policy
2288 * sem_attr.ads, sem_attr.adb (Check_Not_CPP_Type): New subprogram.
2289 (Check_Stream_Attribute): Add missing check (not allowed in CPP types)
2290 (Analyze_Attribute): In case of attributes 'Alignment and 'size add
2291 missing check because they are not allowed in CPP tagged types.
2292 Add Sure parameter to Note_Possible_Modification calls
2293 Add implementation of Invalid_Value attribute
2294 Implement new attribute Has_Tagged_Values
2295 Implement Enum_Val attribute
2296 (Analyze_Attribute, case Range): Set Name_Req True for prefix of
2297 generated attributes.
2298 (Analyze_Attribute, case Result): If prefix of the attribute is
2299 overloaded, it always resolves to the enclosing function.
2300 (Analyze_Attribute, case Result): Properly deal with analysis when
2301 Postconditions are not active.
2302 (Resolve_Attribute, case Result): Properly deal with appearence during
2303 preanalysis in spec.
2304 Add processing for attribute Result
2306 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Code cleanup
2308 (Analyze_Subprogram_Body): Install private_with_clauses when the body
2310 (Check_Inline_Pragma): recognize an inline pragma that appears within
2311 the subprogram body to which it applies.
2312 (Analyze_Function_Return): Check that type of the expression of a return
2313 statement in a function with a class-wide result is not declared at a
2314 deeper level than the function.
2315 (Process_PPCs): Deal with enabling/disabling, using PPC_Enabled flag
2316 (Verify_Overriding_Indicator): Handle properly subprogram bodies for
2317 user- defined operators.
2318 (Install_Formals): Moved to spec to allow use from Sem_Prag for
2319 analysis of precondition/postcondition pragmas.
2320 (Analyze_Subprogram_Body.Last_Real_Spec_Entity): New name for
2321 Last_Formal, along with lots of comments on what this is about
2322 (Analyze_Subprogram_Body): Fix case where we move entities from the
2323 spec to the body when there are no body entities (now possible with
2324 precondition and postcondition pragmas).
2325 (Process_PPCs): New procedure
2326 (Analyze_Subprogram_Body): Add call to Process_PPCs
2328 * sem_ch8.adb (Use_One_Type): refine warning on a redundant use_type
2330 (Pop_Scope): Restore Check_Policy_List on scope exit
2331 (Push_Scope): Save Check_Policy_List on scope entry
2332 Change name In_Default_Expression => In_Spec_Expression
2333 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2334 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2335 (Analyze_Object_Renaming): Allow 'Reference as object
2336 (Analyze_Pragma, case Restriction_Warnings): Call GNAT_Pragma
2337 (Process_Restrictions_Or_Restriction_Warnings): Check for bad spelling
2338 of restriction identifier.
2339 Add Sure parameter to Note_Possible_Modication calls
2341 * sem_prag.ads, sem_prag.adb (Analyze_Pragma, case Stream_Convert):
2342 Don't check for primitive operations when calling Rep_Item_Too_Late.
2343 (Process_Import_Or_Interface): Do not place flag on formal
2345 (Analyze_Pragma, case Export): If the entity is a deferred constant,
2346 propagate information to full view, which is the one elaborated by the
2348 (Make_Inline): the pragma is effective if it applies to an internally
2349 generated subprogram declaration for a body that carries the pragma.
2350 (Analyze_Pragma, case Optimize_Alignment): Set new flag
2351 Optimize_Alignment_Local.
2352 (Analyze_PPC_In_Decl_Part): New procedure
2353 (Get_Pragma_Arg): Moved to outer level
2354 (Check_Precondition_Postcondition): Change to allow new visibility
2355 rules for package spec
2356 (Analyze_Pragma, case Check_Policy): Change placement rules to be
2357 same as pragma Suppress/Unsuppress.
2358 Change name In_Default_Expression => In_Spec_Expression
2359 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2360 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2361 (Check_Precondition_Postcondition): Do proper visibility preanalysis
2362 for the case of these pragmas appearing in the spec.
2363 (Check_Enabled): New function
2364 (Initialize): New procedure
2365 (Tree_Read): New procedure
2366 (Tree_Write): New procedure
2367 (Check_Precondition_Postcondition): New procedure
2368 Implement pragmas Check and Check_Policy
2369 Merge Assert processing with Check
2371 * sem_warn.adb (Warn_On_Known_Condition): Handle pragma Check
2372 New warning flag -gnatw.e
2374 * sinfo.ads, sinfo.adb (Has_Relative_Deadline_Pragma): New function
2375 returning whether a task (or main procedure) has a pragma
2377 (Set_Has_Relative_Deadline_Pragma): Procedure to indicate that a task
2378 (or main procedure) has a pragma Relative_Deadline.
2379 Add Next_Pragma field to N_Pragma node
2380 (PPC_Enabled): New flag
2381 (Next_Pragma): Now used for Pre/Postcondition processing
2383 * snames.h, snames.ads, snames.adb: New standard name
2385 Add entry for 'Invalid_Value attribute
2386 Add entry for new attribute Has_Tagged_Values
2387 Add entry for Enum_Val attribute
2388 Add new standard names Aggregate, Configuration and Library.
2391 Add Pragma_Precondition
2392 Add Pragma_Postcondition
2393 Add Attribute_Result
2394 New standard name Archive_Builder_Append_Option
2395 (Preset_Names): Add _relative_deadline and relative_deadline definitions
2396 There was also a missing non_preemptive_within_priorities.
2397 (Get_Pragma_Id, Is_Pragma_Name): Add support for pragma
2399 Add support for pragmas Check and Check_Policy
2401 * tree_gen.adb: Call Sem_Aux.Tree_Write
2403 * tree_in.adb: Call Sem_Aux.Tree_Read
2405 * exp_ch11.adb (Expand_N_Raise_Statement): New Build_Location calling
2408 * exp_intr.adb (Expand_Source_Info): New Build_Location calling
2411 * exp_prag.adb (Expand_Pragma_Relative_Deadline): New procedure.
2412 (Expand_N_Pragma): Call the appropriate procedure for expanding pragma
2414 (Expand_Pragma_Check): New procedure
2416 * sinput.ads, sinput.adb (Build_Location_String): Now appends to name
2419 * sinfo.adb (PPC_Enabled): New flag
2421 2008-04-08 Robert Dewar <dewar@adacore.com>
2422 Gary Dismukes <dismukes@adacore.com>
2423 Javier Miranda <miranda@adacore.com>
2424 Ed Schonberg <schonberg@adacore.com>
2426 * fe.h: Remove global Optimize_Alignment flag, no longer used
2428 * layout.adb: Test Optimize_Alignment flags rather than global switch
2430 * lib.ads, lib.adb: New OA_Setting field in library record
2432 * lib-load.adb: New OA_Setting field in library record
2434 * lib-writ.ads, lib-writ.adb (Collect_Withs, Write_With_Lines): Place
2435 units mentioned in limited_with_ clauses in the ali file, with an
2437 New Ox fields in U line
2439 * opt.adb: New flag Optimize_Alignment_Local
2440 (Check_Policy_List[_Config]): New flags
2442 * opt.ads (Invalid_Value_Used): New flag
2443 New switch Optimize_Alignment_Local
2444 (Warn_On_Parameter_Order): New flag
2445 (Check_Policy_List[_Config]): New flags
2447 * ali.ads, ali.adb: Add indicator 'Y' to mark mark the presence of
2448 limited_with clauses.
2449 New data structures for Optimize_Alignment
2451 * bcheck.adb (Check_Consistent_Restriction_No_Default_Initialization):
2453 (Check_Consistent_Optimize_Alignment): Rework for new structure
2454 (Check_Consistent_Restrictions): Fix incorrect error message
2456 sem_ch10.adb (Decorate_Tagged_Type): Set the Parent field of a newly
2457 created class-wide type (to the Parent field of the specific type).
2458 (Install_Siblings): Handle properly private_with_clauses on subprogram
2459 bodies and on generic units.
2460 (Analyze_With_Clause, Install_Limited_Withed_Unit): Guard against an
2461 illegal limited_with_clause that names a non-existent package.
2462 (Check_Body_Required): Determine whether a unit named a limited_with
2463 clause needs a body.
2464 (Analyze_Context): A limited_with_clause is illegal on a unit_renaming.
2465 Capture Optimize_Alignment settings to set new OA_Setting field in
2467 (Build_Limited_Views): Include task and protected type declarations.
2469 * sem_ch3.ads, sem_ch3.adb (Analyze_Object_Declaration): Handle the
2470 case of a possible constant redeclaration where the current object is
2471 an entry index constant.
2472 (Analyze_Object_Declaration): Generate an error in case of CPP
2473 class-wide object initialization.
2474 (Analyze_Object_Declaration): Add extra information on warnings for
2475 declaration of unconstrained objects.
2476 (Access_Type_Declaration): Set Associated_Final_Chain to Empty, to avoid
2477 conflicts with the setting of Stored_Constraint in the case where the
2478 access type entity has already been created as an E_Incomplete_Type due
2479 to a limited with clause.
2480 Use new Is_Standard_Character_Type predicate
2481 (Analyze_Object_Declaration): Apply access_constant check only after
2482 expression has been resolved, given that it may be overloaded with
2483 several access types.
2484 (Constant_Redeclaration): Additional legality checks for deferred
2485 constant declarations tha involve anonymous access types and/or null
2486 exclusion indicators.
2487 (Analyze_Type_Declaration): Set Optimize_Alignment flags
2488 (Analyze_Subtype_Declaration): Ditto
2489 (Analyze_Object_Declaration): Ditto
2490 (Analyze_Object_Declaration): Don't count tasks in generics
2491 Change name In_Default_Expression => In_Spec_Expression
2492 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2493 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2494 (Process_Discriminants): Additional check for illegal use of default
2495 expressions in access discriminant specifications in a type that is not
2497 (Check_Abstract_Overriding): If an inherited function dispaches on an
2498 access result, it must be overridden, even if the type is a null
2500 (Derive_Subprogram): The formals of the derived subprogram have the
2501 names and defaults of the parent subprogram, even if the type is
2502 obtained from the actual subprogram.
2503 (Derive_Subprogram): In the presence of interfaces, a formal of an
2504 inherited operation has the derived type not only if it descends from
2505 the type of the formal of the parent operation, but also if it
2506 implements it. This is relevant for the renamings created for the
2507 primitive operations of the actual for a formal derived type.
2508 (Is_Progenitor): New predicate, to determine whether the type of a
2509 formal in the parent operation must be replaced by the derived type.
2511 * sem_util.ads, sem_util.adb (Has_Overriding_Initialize): Make
2512 predicate recursive to handle components that have a user-defined
2513 Initialize procedure. Handle controlled derived types whose ancestor
2514 has a user-defined Initialize procedured.
2515 (Note_Possible_Modification): Add Sure parameter, generate warning if
2516 sure modification of constant
2517 Use new Is_Standard_Character_Type predicate
2518 (Find_Parameter_Type): when determining whether a protected operation
2519 implements an interface operation, retrieve the type of the formal from
2520 the entity when the formal is an access parameter or an
2521 anonymous-access-to-subprogram.
2522 Move Copy_Parameter_List to sem_util, for use when building stubbed
2524 (Has_Access_Values): Tagged types now return False
2525 (Within_HSS_Or_If): New procedure
2526 (Set_Optimize_Alignment_Flags): New procedure
2527 Change name In_Default_Expression => In_Spec_Expression
2528 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2529 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2531 2008-04-08 Tristan Gingold <gingold@adacore.com>
2533 * s-fileio.adb: Name_Error shouldn't be raised for a tempory file.
2535 2008-04-08 Tristan Gingold <gingold@adacore.com>
2539 * cuintp.c: Fix 16 bits issue for AVR.
2540 On AVR, integer is 16 bits, so it can't be used to do math with
2542 So use long_integer instead.
2544 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2546 * a-calend-vms.ads, a-calend-vms.adb: Add with and use clause for
2547 System.OS_Primitives.
2548 Change type of various constants, parameters and local variables from
2549 Time to representation type OS_Time.
2550 (To_Ada_Time, To_Unix_Time): Correct sign of origin shift.
2551 Remove the declaration of constant Mili_F from several routines. New
2552 body for internal package Conversions_Operations.
2553 (Time_Of): Add default parameters for several formals.
2555 * a-caldel.adb: Minor reformatting
2557 * a-calend.ads, a-calend.adb: New body for internal package
2558 Conversions_Operations.
2559 (Time_Of): Add default parameters for several formals.
2561 * Makefile.rtl: Add a-ststop
2562 Add Ada.Calendar.Conversions to the list of runtime files.
2565 * a-calcon.adb, a-calcon.ads: New files.
2567 2008-04-08 Jose Ruiz <ruiz@adacore.com>
2568 Tristan Gingold <gingold@adacore.com>
2570 * s-interr-dummy.adb, s-interr-vms.adb, s-interr-sigaction.adb
2571 (Install_Restricted_Handlers): New procedure
2572 which is a simplified version of Install_Handlers that does not store
2573 previously installed.
2575 * s-interr-vxworks.adb: Fix ACATS cxc3001
2576 On VxWorks interrupts can't be detached.
2577 (Install_Restricted_Handlers): New procedure.
2579 * s-interr.ads, s-interr.adb (Install_Restricted_Handlers): New
2582 2008-04-08 Olivier Hainque <hainque@adacore.com>
2584 * s-intman-vxworks.ads, s-intman-vxworks.adb
2585 (Map_And_Raise_Exception): Remove. Was an import of only part of the
2586 required services already implemented elsewhere.
2587 (Notify_Exception): Delete body, import __gnat_error_handler instead.
2588 (Initialize): Add SA_SIGINFO to the sa_flags, to get the sigcontext
2589 argument passed to the handler, which we need for ZCX propagation
2592 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2594 * adaint.h, adaint.c (__gnat_current_time_string): New routine.
2596 * g-timsta.adb, g-timsta.ads: New files.
2598 2008-04-08 Robert Dewar <dewar@adacore.com>
2600 * a-except-2005.ads, a-except-2005.adb, a-except.ads, a-except.adb
2601 (Raise_Exception): In accordance with AI-446, raise CE for Null_Id
2602 (Raise_Exception_Always): Fix documentation accordingly
2604 2008-04-08 Robert Dewar <dewar@adacore.com>
2606 * a-strbou.ads, a-strbou.adb (From_String): New procedure (for use by
2609 * sem_ch13.ads (Rep_Item_Too_Late): Document that Stream_Convert sets
2612 2008-04-08 Javier Miranda <miranda@adacore.com>
2613 Robert Dewar <dewar@adacore.com>
2614 Ed Schonberg <schonberg@adacore.com>
2616 * a-tags.adb (Register_Interface_Offset): New subprogram.
2617 (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment).
2618 (To_Predef_Prims_Table_Ptr): Removed.
2619 (Acc_Size): Removed.
2620 (To_Acc_Size): Removed.
2621 (Parent_Size): Modified to the call the subprogram returning the size of
2622 the parent by means of the new TSD component Size_Func.
2624 * a-tags.ads (Offset_To_Top_Ptr): New access type declaration.
2625 (DT_Offset_To_Top_Offset): New constant value that is used to generate
2626 code referencing the Offset_To_Top component of the dispatch table's
2628 (Prim_Ptr): New declaration of access to procedure. Used to avoid the
2629 use of 'address to initialize dispatch table slots.
2630 (Size_Func): New component of the TSD. Used by the run-time to call the
2631 size primitive of the tagged type.
2633 * checks.adb (Apply_Access_Check): Avoid check when accessing the
2634 Offset_To_Top component of a dispatch table.
2635 (Null_Exclusion_Static_Checks): If the non-null access type appears in a
2636 deferred constant declaration. do not add a null expression, to prevent
2637 spurious errors when full declaration is analyzed.
2638 (Apply_Discriminant_Check): If both discriminant constraints share a
2639 node which is not static but has no side effects, do not generate a
2640 check for that discriminant.
2641 (Generate_Index_Checks): Set Name_Req to true in call to duplicate
2642 subexpr, since the prefix of an attribute is a name.
2644 * checks.ads: Fix nit in comment.
2646 * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec
2647 and body of predefined primitives in case of CPP tagged type
2649 (Freeze_Type): Deal properly with no storage pool case
2650 (Make_Predefined_Primitive_Specs): Generate specification of abstract
2651 primitive Deep_Adjust if a nonlimited interface is derived from a
2653 (Build_Dcheck_Functions): Create discriminant-checking functions only
2654 for variants that have some component(s).
2655 (Build_Slice_Assignment): In expanded code for slice assignment, handle
2656 properly the case where the slice bounds extend to the last value of the
2657 underlying representation.
2658 (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value
2659 (Is_Variable_Size_Record): An array component has a static size if
2660 index bounds are enumeration literals.
2662 * exp_disp.adb (Make_DT): Use the first subtype to determine whether
2663 an external tag has been specified for the type.
2664 (Building_Static_DT): Add missing support for private types.
2665 (Make_DT): Add declaration of Parent_Typ to ensure consistent access
2666 to the entity associated with the parent of Typ. This is done to
2667 avoid wrong access when the parent is a private type.
2668 (Expand_Interface_Conversion): Improve error message when the
2669 configurable runtime has no support for dynamic interface conversion.
2670 (Expand_Interface_Thunk): Add missing support to interface types in
2671 configurable runtime.
2672 (Expand_Dispatching_Call): remove obsolete code.
2673 (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and
2674 ensure that all subtypes and aggregates associated with dispatch
2675 tables have the attribute Is_Dispatch_Table_Entity set to true.
2676 (Register_Primitive): Rename one variable to improve code reading.
2677 Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o
2678 of the pointer to the 'size primitive in the TSD.
2680 * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity.
2681 (RE_Offset_To_Top_Ptr): New entity.
2682 (RE_Register_Interface_Offset): New entity.
2683 (RE_Set_Dynamic_Offset_To_Top): New entity.
2684 (RE_Set_Offset_To_Top): Removed entity.
2685 (RE_Prim_Ptr): New entity
2686 (RE_Size_Func): New entity
2687 (RE_Size_Ptr): New entity
2688 (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF.
2689 (Ada_Dispatching_Child): Define this new subrange.
2690 (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock,
2691 RE_Time_Span, and RE_Time_Span_Zero).
2692 (RE_Unit_Table): Add new required run-time calls
2694 * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching
2697 * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram.
2698 (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that
2699 initializes the Offset_To_Top component of a dispatch table.
2700 (Build_Predef_Prims): Removed.
2701 (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by
2703 (Build_Set_Size_Function): New subprogram.
2705 * exp_ch13.adb: Do not generate storage variable for storage_size zero
2706 (Expand): Handle setting/restoring flag Inside_Freezing_Actions
2708 2008-04-08 Robert Dewar <dewar@adacore.com>
2710 * a-ztdeau.adb, a-tideau.adb, a-wtdeau.adb (Puts_Dec): Fix error in
2711 computing Fore when Exp > 0
2713 2008-04-08 Robert Dewar <dewar@adacore.com>
2715 * back_end.adb: Remove Big_String_Ptr declarations (now in Types)
2717 * errout.adb: Remove Big_String_Ptr declarations (now in Types)
2718 Change name Is_Style_Msg to Is_Style_Or_Info_Msg
2720 * fmap.adb: Remove Big_String declarations (now in Types)
2721 (No_Mapping_File): New Boolean global variable
2722 (Initialize): When mapping file cannot be read, set No_Mapping_File to
2724 (Update_Mapping_File): Do nothing if No_Mapping_File is True. If the
2725 tables were empty before adding entries, open the mapping file
2726 with Truncate = True, instead of delete/re-create.
2728 * fname-sf.adb: Remove Big_String declarations (now in Types)
2730 * s-strcom.adb, g-dyntab.ads, g-table.ads, s-carsi8.adb,
2731 s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for
2734 * table.ads: Add for Table_Ptr'Storage_Size use 0
2736 * types.ads: Add Big_String declarations
2737 Add Size_Clause of zero for big pointer types
2739 2008-04-08 Vincent Celier <celier@adacore.com>
2741 * clean.adb (Parse_Cmd_Line): Recognize switch --subdirs=
2742 (Usage): Add line for switch --subdirs=
2743 Add new switch -eL, to follow symbolic links when processing project
2746 * gnatcmd.adb: Process switches -eL and --subdirs=
2747 (Non_VMS_Usage): Output "gnaampcmd" instead of "gnat", and call
2748 Program_Name to get proper tool names when AAMP_On_Target is set.
2749 (Gnatcmd): Call Add_Default_Search_Dirs and Get_Target_Parameters to get
2750 AAMP_On_Target set properly for use of GNAAMP tools (this is needed by
2751 Osint.Program_Name).
2753 * gnatname.adb: (Scan_Args): Recognize switches -eL and --subdirs=
2754 (Usage): Add lines for switches -eL and --subdirs=
2756 * makeusg.adb: Add line for switch --subdirs=
2759 (Source_Data): New Boolean component Compiled, defaulted to True
2760 (Empty_File_Name: New global variable in private part, initialized in
2761 procedure Initialize.
2762 (Subdirs_Option): New constant string
2763 (Subdirs): New String_Ptr global variable
2764 (Language_Config): New component Include_Compatible_Languages
2765 (Project_Qualifier): New type for project qualifiers
2766 (Project_Data): New component Qualifier
2767 (Project_Configuration): New component Archive_Builder_Append_Option
2769 * prj-nmsc.adb (Get_Unit_Exceptions): When a unit is already in
2770 another imported project indicate the name of this imported project.
2771 (Check_File): When a unit is in two project files, indicate the project
2772 names and the paths of the source files for each project.
2773 (Add_Source): Set Compiled to False if compiler driver is empty. Only
2774 set object, dependency and switches file names if Compiled is True.
2775 (Process_Compiler): Allow the empty string for value of attribute Driver
2776 (Get_Directories): When Subdirs is not null and Object_Dir is not
2777 specified, locate and create if necessary the actual object dir.
2778 (Locate_Directory): When Subdirs is not empty and Create is not the
2779 empty string, locate and create if necessary the actual directory
2780 as a subdirectory of directory Name.
2781 (Check_Library_Attributes.Check_Library): Allow a project where the only
2782 "sources" are header files of file based languages to be imported by
2783 library projects, in multi-language mode (gprbuild).
2784 (Check_Library_Attributes.Check_Library): In multi-language mode
2785 (gprbuild), allow a library project to import a project with no
2786 sources, even when this is not declared explicitly.
2787 (Check_If_Externally_Built): A virtual project extending an externally
2788 built project is also externally built.
2789 (Check_Library_Attributes): For a virtual project extending a library
2790 project, inherit the library directory.
2791 (Process_Project_Level_Array_Attributes): Process new attribute
2792 Inherit_Source_Path.
2793 For projects with specified qualifiers "standard", "library" or
2794 "abstract", check that the project conforms to the qualifier.
2795 (Process_Project_Level_Simple_Attributes): Process new attribute
2796 Archive_Builder_Append_Option.
2798 * switch-m.adb: (Scan_Make_Switches): Process switch --subdirs=
2799 (Normalize_Compiler_Switches): Only keep compiler switches that are
2800 passed to gnat1 by the gcc driver and that are stored in the ALI file
2802 Do not take into account switc -save-temps
2804 * makegpr.adb (Compile_Link_With_Gnatmake): Transmit switch -eL if
2805 gprmake is called with -eL.
2806 (Scan_Arg): Recognize switch -eL
2807 (Usage): Add line for switch -eL
2809 * prj.adb (Initialize): Initialize Empty_File_Name
2810 (Project_Empty): New component Qualifier
2812 * prj-attr.ads, prj-attr.adb: New project level attribute
2813 Inherit_Source_Path.
2814 New project level attribute Archive_Builder_Append_Option
2816 * prj-dect.adb: Replace System.Strings by GNAT.Strings.
2818 * prj-ext.adb (Initialize_Project_Path): In Multi_Language mode, add
2819 <prefix>/lib/gnat in the project path, after <prefix>/share/gpr, for
2820 upward compatibility.
2822 * prj-part.adb (Project_Path_Name_Of.Try_Path): In high verbosity, put
2823 each Trying ..." on different lines.
2824 (Parse_Single_Project): Recognize project qualifiers. Fail in qualifier
2825 is "configuration" when not in configuration. Fail when in configuration
2826 when a specified qualifier is other than "configuration".
2828 * prj-proc.adb (Process_Declarative_Items): Link new elements of copied
2829 full associative array together.
2830 (Recursive_Process): Put the project qualifier in the project data
2832 * prj-tree.ads, prj-tree.adb: (Project_Qualifier_Of): New function
2833 (Set_Project_Qualifier_Of): New procedure
2835 2008-04-08 Robert Dewar <dewar@adacore.com>
2837 * errout.ads: Update comments for new handling of info: messages
2839 * erroutc.adb (Matches): New procedure
2840 (Warning_Specifically_Suppressed): Modified to handle multiple * chars
2841 (Is_Style_Or_Info_Msg): New name for Is_Style_Msg, now set for
2842 info messages as well as style messages.
2844 * erroutc.ads: Remove unneeded fields from Specific_Warning_Entry
2846 * sem_elab.adb (Supply_Bodies): Create actual bodies for stubbed
2848 (Check_A_Call): Special "info: " warnings now have ? in the text
2849 (Elab_Warning): Use info message in static case
2851 2008-04-08 Ed Schonberg <schonberg@adacore.com>
2853 * exp_aggr.adb (Static_Array_Aggregate): Use Max_Aggr_Size to determine
2854 whether an array aggregate with static bounds and scalar components
2855 should be expanded into a static constant.
2857 2008-04-08 Gary Dismukes <dismukes@adacore.com>
2858 Ed Schonberg <schonberg@adacore.com>
2859 Robert Dewar <dewar@adacore.com>
2861 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Add tests of
2862 Has_Stream_Attribute_ Definition when checking for available stream
2863 attributes on parameters of a limited type in Ada 2005. Necessary for
2864 proper recognition of visible stream attribute clauses.
2865 (Has_Stream_Attribute_Definition): If the type is derived from a
2866 private type, then use the derived type's underlying type for checking
2867 whether it has stream attributes.
2868 (Validate_Object_Declaration): The check for a user-defined Initialize
2869 procedure applies also to types with controlled components or a
2870 controlled ancestor.
2871 Reject an object declaration in a preelaborated unit if the type is a
2872 controlled type with an overriding Initialize procedure.
2873 (Validate_Remote_Access_To_Class_Wide_Type): Return without further
2874 checking when the parent of a dereference is a selected component and
2875 the name has not been analyzed.
2877 * sem_ch4.adb (Analyze_Selected_Component): Add checking for selected
2878 prefixes that are invalid explicit dereferences of remote
2879 access-to-class-wide values, first checking whether the selected
2880 component is a prefixed form of call to a tagged operation.
2881 (Analyze_Call): Remove code that issues an error for limited function
2882 calls in illegal contexts, as we now support all of the contexts that
2883 were forbidden here.
2884 Allow a function call that returns a task.and appears as the
2885 prefix of a selected component.
2886 (Analyze_Reference): Give error message if we try to make a 'Reference
2887 for an object that is atomic/aliased without its type having the
2888 corresponding attribute.
2889 (Analyze_Call): Remove condition checking for attributes to allow
2890 calls to functions with inherently limited results as prefixes of
2891 attributes. Remove related comment about Class attributes.
2892 (Analyze_Selected_Component): If the prefix is a remote type, check
2893 whether this is a prefixed call before reporting an error.
2894 (Complete_Object_Operation): If the controlling formal is an access to
2895 variable reject an actual that is a constant or an access to one.
2896 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
2897 primitive operations from base type.
2899 * exp_ch4.adb (Expand_N_Indexed_Component): Test for prefix that is a
2901 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
2902 (Expand_N_Selected_Component): Test for prefix that is a build-in-place
2903 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
2904 (Expand_N_Slice): Test for prefix that is a build-in-place function call
2905 and call Make_Build_In_Place_Call_In_Anonymous_Context.
2906 (Analyze_Call): Remove code that issues an error for limited function
2907 calls in illegal contexts, as we now support all of the contexts that
2908 were forbidden here.
2909 New calling sequence for Get_Simple_Init_Val
2910 (Expand_Boolean_Operator): Add call to Silly_Boolean_Array_Xor_Test
2911 (Expand_N_Op_Not): Add call to Silly_Boolan_Array_Not_Test
2913 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2914 Ed Schonberg <schonberg@adacore.com>
2915 Robert Dewar <dewar@adacore.com>
2917 * exp_ch2.adb: Minor reformatting.
2918 (Expand_Entry_Index_Parameter): Set the type of the identifier.
2919 (Expand_Entry_Reference): Add call to Expand_Protected_Component.
2920 (Expand_Protected_Component): New routine.
2921 (Expand_Protected_Private): Removed.
2922 Add Sure parameter to Note_Possible_Modification calls
2924 * sem_ch12.ads, sem_ch12.adb (Analyze_Subprogram_Instantiation): The
2925 generated subprogram declaration must inherit the overriding indicator
2926 from the instantiation node.
2927 (Validate_Access_Type_Instance): If the designated type of the actual is
2928 a limited view, use the available view in all cases, not only if the
2929 type is an incomplete type.
2930 (Instantiate_Object): Actual is illegal if the formal is null-excluding
2931 and the actual subtype does not exclude null.
2932 (Process_Default): Handle properly abstract formal subprograms.
2933 (Check_Formal_Package_Instance): Handle properly defaulted formal
2934 subprograms in a partially parameterized formal package.
2935 Add Sure parameter to Note_Possible_Modification calls
2936 (Validate_Derived_Type_Instance): if the formal is non-limited, the
2937 actual cannot be limited.
2938 (Collect_Previous_Instances): Generate instance bodies for subprograms
2941 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Small): Don't
2943 Add Sure parameter to Note_Possible_Modification calls
2944 (Analyze_At_Clause): Preserve Comes_From_Source on Rewrite call
2945 (Analyze_Attribute_Definition_Clause, case Attribute_Address): Check for
2946 constant overlaid by variable and issue warning.
2947 Use new Is_Standard_Character_Type predicate
2948 (Analyze_Record_Representation_Clause): Check that the specified
2949 Last_Bit is not less than First_Bit - 1.
2950 (Analyze_Attribute_Definition_Clause, case Address): Check for
2951 self-referential address clause
2953 * sem_ch5.ads, sem_ch5.adb (Diagnose_Non_Variable_Lhs): Rewrite the
2954 detection mechanism when the lhs is a prival.
2955 (Analyze_Assignment): Call Check_Unprotected_Access to detect
2956 assignment of a pointer to protected data, to an object declared
2957 outside of the protected object.
2958 (Analyze_Loop_Statement): Check for unreachable code after loop
2959 Add Sure parameter to Note_Possible_Modication calls
2960 Protect analysis from previous syntax error such as a scope mismatch
2962 (Analyze_Assignment_Statement): The assignment is illegal if the
2963 left-hand is an interface.
2965 * sem_res.ads, sem_res.adb (Resolve_Arithmetic_Op): For mod/rem check
2966 violation of restriction No_Implicit_Conditionals
2967 Add Sure parameter to Note_Possible_Modication calls
2968 Use new Is_Standard_Character_Type predicate
2969 (Make_Call_Into_Operator): Preserve Comes_From_Source when rewriting
2970 call as operator. Fixes problems (e.g. validity checking) which
2971 come from the result looking as though it does not come from source).
2972 (Resolve_Call): Check case of name in named parameter if style checks
2974 (Resolve_Call): Exclude calls to Current_Task as entry formal defaults
2975 from the checking that such calls should not occur from an entry body.
2976 (Resolve_Call): If the return type of an Inline_Always function
2977 requires the secondary stack, create a transient scope for the call
2978 if the body of the function is not available for inlining.
2979 (Resolve_Actuals): Apply Ada2005 checks to view conversions of arrays
2980 that are actuals for in-out formals.
2981 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
2982 primitive operations from base type.
2983 (Analyze_Selected_Component): If the context is a call to a protected
2984 operation the parent may be an indexed component prior to expansion.
2985 (Resolve_Actuals): If an actual is of a protected subtype, use its
2986 base type to determine whether a conversion to the corresponding record
2988 (Resolve_Short_Circuit): Handle pragma Check
2990 * sem_eval.adb: Minor code reorganization (usea Is_Constant_Object)
2991 Use new Is_Standard_Character_Type predicate
2992 (Eval_Relational_Op): Catch more cases of string comparison
2994 2008-04-08 Robert Dewar <dewar@adacore.com>
2995 Gary Dismukes <dismukes@adacore.com>
2997 * s-rident.ads: Add No_Default_Initialization restriction
3000 (Has_Non_Null_Base_Init_Proc): Handle No_Default_Initialization case
3001 (Set_TSS): Handle No_Default_Initialization case
3003 * exp_ch6.adb (Expand_N_Subprogram_Body): Handle restriction
3004 No_Default_Initialization
3005 (Expand_N_Subprogram_Body): Remove redundant initialization of out
3006 parameters when Normalize_Scalars is active.
3007 (Add_Final_List_Actual_To_Build_In_Place_Call): Add formal Sel_Comp
3008 Fix casing error in formal parameter name in call
3009 (Register_Predefined_DT_Entry): Replace occurrences of RE_Address by
3010 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
3011 dispatching call on VM targets.
3013 2008-04-08 Gary Dismukes <dismukes@adacore.com>
3014 Thomas Quinot <quinot@adacore.com>
3016 * exp_ch7.adb (Find_Final_List): Change the test for generating a
3017 selected component from an access type's Associated_Final_Chain to
3018 check for the presence of that field, rather than assuming it exists
3019 for all named access types.
3020 (Make_Clean): New formal Chained_Cleanup_Action allowing to specify a
3021 procedure to call at the end of the generated cleanup procedure.
3022 (Expand_Cleanup_Actions): When a new cleanup procedure is generated, and
3023 and an At_End_Proc already exists in the handled sequence of statements
3024 for which cleanup actions are being expanded, the original cleanup
3025 action must be preserved.
3027 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
3028 Ed Schonberg <schonberg@adacore.com>
3029 Robert Dewar <dewar@adacore.com>
3030 Gary Dismukes <dismukes@adacore.com>
3032 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry,
3033 Build_Unprotected_Subprogram_Body): Generate debug info for
3034 declarations related to the handling of private data in task and
3036 (Debug_Private_Data_Declarations): New subprogram.
3037 (Install_Private_Data_Declarations): Remove all debug info flagging.
3038 This is now done by Debug_Private_Data_Declarations at the correct
3040 (Build_Simple_Entry_Call): If the task name is a function call, expand
3041 the prefix into an object declaration, and make the surrounding block a
3043 (Build_Master_Entity): An internal block is a master if it wraps a call.
3044 Code reformatting, update comments. Code clean up.
3045 (Make_Task_Create_Call): Use 'Unrestricted_Access instead of 'Address.
3046 (Replicate_Entry_Formals): If the formal is an access parameter or
3047 anonymous access to subprogram, copy the original tree to create new
3048 entities for the formals of the subprogram.
3049 (Expand_N_Task_Type_Declaration): Create a Relative_Deadline variable
3050 for tasks to store the value passed using pragma Relative_Deadline.
3051 (Make_Task_Create_Call): Add the Relative_Deadline argument to the
3052 run-time call to create a task.
3053 (Build_Wrapper_Spec): If the controlling argument of the interface
3054 operation is an access parameter with a non-null indicator, use the
3055 non-null indicator on the wrapper.
3057 * sem_ch9.adb (Analyze_Protected_Type): Only retrieve the full view when
3058 present, which it may not be in the case where the type entity is an
3059 incomplete view brought in by a limited with.
3060 (Analyze_Task_Type): Only retrieve the full view when present, which it
3061 may not be in the case where the type entity is an incomplete view brought
3062 in by a limited with.
3063 (Analyze_Protected_Definition): Set Is_Frozen on all itypes generated for
3064 private components of a protected type, to prevent the generation of freeze
3065 nodes for which there is no proper scope of elaboration.
3067 * exp_util.ads, exp_util.adb
3068 (Remove_Side_Effects): If the expression is a function call that returns a
3069 task, expand into a declaration to invoke the build_in_place machinery.
3070 (Find_Protection_Object): New routine.
3071 (Remove_Side_Effects): Also make a copy of the value
3072 for attributes whose result is of an elementary type.
3073 (Silly_Boolean_Array_Not_Test): New procedure
3074 (Silly_Boolean_Array_Xor_Test): New procedure
3075 (Is_Volatile_Reference): New function
3076 (Remove_Side_Effects): Use Is_Volatile_Reference
3077 (Possible_Bit_Aligned_Component): Handle slice case properly
3079 * exp_pakd.adb (Expand_Packed_Not): Move silly true/true or false/false
3080 case test to Exp_Util
3081 (Expand_Packed_Xor): Move silly true/true case test to Exp_Util
3083 2008-04-08 Thomas Quinot <quinot@adacore.com>
3085 * exp_dist.ads, exp_dist.adb: Fix casing error in formal parameter name
3087 (Add_RACW_Features): When processing an RACW in another unit than the
3088 main unit, set Body_Decls to No_List to indicate that the bodies of
3089 the type's TSS must not be generated.
3090 (GARLIC_Support.Add_RACW_Read_Attribute,
3091 GARLIC_Support.Add_RACW_Write_Attribute): Do not generate bodies if
3092 Body_Decls is No_List.
3093 (PolyORB_Support.Add_RACW_Read_Attribute,
3094 PolyORB_Support.Add_RACW_Write_Attribute,
3095 PolyORB_Support.Add_RACW_From_Any,
3096 PolyORB_Support.Add_RACW_To_Any,
3097 PolyORB_Support.Add_RACW_TypeCode): Same.
3098 (Transmit_As_Unconstrained): New function.
3099 (Build_Ordered_Parameters_List): Use the above to order parameters.
3100 (GARLIC_Support.Build_General_Calling_Stubs):
3101 Use the above to determine which parameters to unmarshall using 'Input
3102 at the point where their temporary is declared (as opposed to later on
3104 (PolyORB_Support.Build_General_Calling_Stubs):
3105 Use the above to determine which parameters to unmarshall using From_Any
3106 at the point where their temporary is declared (as opposed to later on
3107 with an assignment).
3109 2008-04-08 Ed Schonberg <schonberg@adacore.com>
3111 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): If this is
3112 an Input function for an access type, do not perform default
3113 initialization on the local variable that receives the value, to
3114 prevent spurious warnings when the type is null-excluding.
3116 2008-04-08 Robert Dewar <dewar@adacore.com>
3117 Ed Schonberg <schonberg@adacore.com>
3119 * freeze.adb (Freeze_Entity): Improve warnings on access types in pure
3121 (Size_Known): Generic formal scalar types have known at compile
3122 time size, so remove check.
3123 Fix casing error in formal parameter name in call
3124 (Freeze_Subprogram): If the subprogram is a user-defined operator,
3125 recheck its overriding indication.
3127 2008-04-08 Vincent Celier <celier@adacore.com>
3129 * gnat1drv.adb: Send all messages indicating an error to standard error
3131 2008-04-08 Robert Dewar <dewar@adacore.com>
3133 * gnatbind.adb (Restriction_Could_Be_Set): New procedure
3134 (List_Applicable_Restrictions): Do not list existing restrictions
3136 2008-04-08 Thomas Quinot <quinot@adacore.com>
3138 * g-socket.ads, g-socket.adb: Improve documentation of GNAT.Sockets:
3139 add a pointer to generic sockets literature
3140 do not mention that the given example is "typical" usage.
3141 Remove obsolete comment about multicast not being supported on Windows.
3142 (Connect_Socket): Make Server mode IN rather than IN OUT
3143 since this formal is never modified.
3145 2008-04-08 Robert Dewar <dewar@adacore.com>
3147 * sprint.adb (Write_Itype): Handle Itypes whose Parent field points to
3148 the declaration for some different entity.
3149 (Sprint_Node_Actual, case N_Derived_Type_Definition): When an interface
3150 list is precent (following the parent subtype indication), display
3151 appropriate "and" keyword.
3153 * itypes.adb: Remove unnecessary calls to Init_Size_Align and Init_Esize
3154 Remove unnecessary calls to Init_Size_Align and Init_Esize.
3155 Add notes on use of Parent field of an Itype
3157 2008-04-08 Ed Schonberg <schonberg@adacore.com>
3158 Robert Dewar <dewar@adacore.com>
3159 Gary Dismukes <dismukes@adacore.com>
3161 * lib-xref.adb (Is_On_LHS): Remove dead code
3162 (Output_Overriden_Op): If the overridden operation is itself inherited,
3163 list the ancestor operation, which is the one whose body or absstract
3164 specification is actually being overridden. For source navigation
3167 * sem_ch7.adb (Is_Primitive_Of): use base type to determine whether
3168 operation is primitive for the type.
3169 (Declare_Inherited_Private_Subprograms): If the new operation overrides
3170 an inherited private subprogram, set properly the Overridden_Operation
3171 attribute, for better cross-reference information.
3172 (Analyze_Package_Specification): Do late analysis of spec PPCs
3173 (Install_Private_Declaration, Uninstall_Declarations): Save/restore
3174 properly the full view and underlying full views of a private type in a
3175 child unit, whose full view is derived from a private type in a parent
3176 unit, and whose own full view becomes visible in the child body.
3178 * sem_disp.adb (Check_Dispatching_Operation): When a body declares a
3179 primitive operation after the type has been frozen, add an explicit
3180 reference to the type and the operation, because other primitive
3181 references have been emitted already.
3182 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
3183 dispatching call on VM targets.
3185 2008-04-08 Vincent Celier <celier@adacore.com>
3186 Thomas Quinot <quinot@adacore.com>
3188 * make.adb: (Gnatmake_Called): Remove, no longer necessary
3189 (Compile_Surces): Call Delete_Temp_Config_Files only if Gnatmake_Called
3190 is True and Debug_Flag_N is False. Debug_Flag_N means "keep temp files".
3191 (Insert_Project_Sources): Take into account index in multi-unit source
3193 After building a library project, delete all temporary files.
3194 (Initialize): Reset current output after parsing project file.
3195 (Collect_Arguments_And_Compile): Never insert in the queue the sources
3196 of library projects that are externally built.
3197 Put file name in error and inform messages if -df is used
3198 (Display): If invoked with -d7, do not display path names, but only
3201 * makeutl.ads (Path_Or_File_Name): New function
3202 (Path_Or_File_Name): New function
3204 2008-04-08 Arnaud Charlet <charlet@adacore.com>
3206 * Make-lang.in: Disable warnings during first stage of bootstrap
3208 Update dependencies.
3210 2008-04-08 Vincent Celier <celier@adacore.com>
3212 * mlib-prj.adb (Build_Library): Compare with ALI file name in canonical
3213 case to decide if ALI object file is included in library.
3214 (Build_Library): Never attempt to build a library if the project is
3217 2008-04-08 Thomas Quinot <quinot@adacore.com>
3219 * nlists.adb (Is_Non_Empty_List): Remove redundant test. First
3220 (No_List) is defined to return Empty.
3222 2008-04-08 Jose Ruiz <ruiz@adacore.com>
3224 * osint.ads, osint.adb (Get_Libraries_From_Registry): Improve
3227 (Read_Default_Search_Dirs): Do not consider spaces as path separators
3228 because spaces may be part of legal paths.
3230 2008-04-08 Robert Dewar <dewar@adacore.com>
3232 * par-ch11.adb (P_Exception_Handler): Check indentation level for
3235 2008-04-08 Ed Schonberg <schonberg@adacore.com>
3237 * par-ch3.adb (P_Type_Declaration) Reject the keyword "synchronized"
3238 in a type declaration, if this is not an interface declaration or
3239 private type extension.
3241 2008-04-08 Vincent Celier <celier@adacore.com>
3243 * prj-util.adb (Executable_Of): New String parameter Language. When
3244 Ada_Main is False and Language is not empty, attempt to remove the body
3245 suffix or the spec suffix of the language to get the base of the
3246 executable file name.
3247 (Put): New Boolean parameter Lower_Case, defauilted to False. When
3248 Lower_Case is True, put the value in lower case in the name list.
3249 (Executable_Of): If there is no executable suffix in the configuration,
3250 then do not modify Executable_Extension_On_Target.
3252 * prj-util.ads (Executable_Of): New String parameter Language,
3253 defaulted to the empty string.
3254 (Put): New Boolean parameter Lower_Case, defauilted to False
3256 2008-04-08 Robert Dewar <dewar@adacore.com>
3258 * scng.adb (Scan_Identifier): Handle case of identifier starting with
3259 wide character using UTF-8 encoding.
3261 2008-04-08 Javier Miranda <miranda@adacore.com>
3263 * sem.adb (Analyze): Consider case in which we analyze an empty node
3264 that was generated by a call to a runtime function that is not
3265 available under the configurable runtime.
3267 * sem.ads (Inside_Freezing_Actions): New flag.
3268 (Save_Check_Policy_List): New field in scope stack entry
3270 2008-04-08 Ed Schonberg <schonberg@adacore.com>
3271 Robert Dewar <dewar@adacore.com>
3273 * sem_aggr.adb (Analyze_N_Extension_Aggregate): Add legality checks for
3274 the ancestor part of an extension aggregate for a limited type.
3275 (Resolve_Array_Aggregate): Issue warning for sliding of aggregate with
3276 enumeration index bounds.
3277 (Resolve_Array_Aggregate): Add circuit for diagnosing missing choices
3278 when array is too short.
3279 (Check_Expr_OK_In_Limited_Aggregate): Move function
3280 Check_Non_Limited_Type from Resolve_Record_Aggregate to top level (and
3282 (Resolve_Array_Aggregate.Resolve_Aggr_Expr):
3283 Check_Expr_OK_In_Limited_Aggregates called to check for illegal limited
3284 component associations.
3285 (Check_Non_Limited_Type): Moved to outer level and renamed.
3286 (Resolve_Record_Aggregate): In an extension aggregate, an association
3287 with a box initialization can only designate a component of the
3288 extension, not a component inherited from the given ancestor
3290 * sem_case.adb: Use new Is_Standard_Character_Type predicate
3292 2008-04-08 Robert Dewar <dewar@adacore.com>
3294 * s-imgdec.adb (Set_Decimal_Digits): Fix error when input is zero with
3296 (Set_Decimal_Digits): Properly handle Aft=0 (equivalent to Aft=1)
3297 Properly handle case where Aft > Scale and input number is less than
3300 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
3302 * s-stoele.ads, s-soflin.ads: Move the location of
3303 Dummy_Communication_Block from System.Storage_Elements to
3306 * s-tpobop.ads: Add comment on usage of Dummy_Communication_Block to
3307 emulate Communication_Block in certain scenarios.
3309 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
3311 * s-strxdr.adb, s-stratt.ads, s-stratt.adb (Block_IO_OK): New
3313 Add new subtype S_WWC, unchecked conversion routines From_WWC and
3315 (I_WWC, O_WWC): New routines for input and output of
3316 Wide_Wide_Character.
3318 2008-04-08 Robert Dewar <dewar@adacore.com>
3320 * stringt.adb (Write_String_Table_Entry): Handle wide characters