OSDN Git Service

gcc/ada/
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2007-12-05  Samuel Tardieu  <sam@rfc1149.net>
2
3         PR ada/21489
4         * exp_ch9.adb (Build_Simple_Entry_Call): Initialize OUT access type
5         parameters of an entry call.
6
7 2007-12-03  Robert Dewar <dewar@adacore.com>
8             Samuel Tardieu  <sam@rfc1149.net>
9
10         PR ada/34287
11         * sem_util.adb (Safe_To_Capture_Value): Do not capture values
12         of variables declared in a library-level package.
13     
14 2007-12-02  Samuel Tardieu  <sam@rfc1149.net>
15
16         * clean.adb (Clean_Library_Directory): Use Empty_String'Access intead
17         of Empty_String'Unchecked_Access.
18
19         * Makefile.in: Add support for sh4-linux.
20
21         * system-linux-sh4.ads: New file.
22
23 2007-12-01  Kostik Belousov  <kostikbel@ukr.net>
24
25         PR ada/33722
26         * env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
27         and its argument must not be free()ed.
28
29 2007-11-29  Eric Botcazou  <ebotcazou@adacore.com>
30
31         * decl.c (make_packable_type): Retrieve the real name of the type.
32         (maybe_pad_type): Simplify similar code.
33
34 2007-11-28  Samuel Tardieu  <sam@rfc1149.net>
35
36         PR ada/15804
37         * par-ch3.adb (P_Variant_Part): Signal an error when anything other
38         than an identifier is used after "case" in a variant_part.
39
40         PR ada/17318
41         * par-ch4.adb (Is_Parameterless_Attribute): New map.
42         (P_Name, Scan_Apostrophe block): Parse left parenthesis following
43         attribute name or not depending on the new map.
44
45         * sem-attr.adb (Analyze_Attribute): Parameterless attributes
46         returning a string or a type will not be called with improper
47         arguments.
48
49         * sem-attr.ads (Attribute_Class_Array): Move to snames.ads.
50
51         * snames.ads (Attribute_Class_Array): Moved from sem-attr.ads.
52
53         PR ada/32792
54         * sem_attr.adb (Analyze_Attribute, Attribute_Integer_Value clause):
55         Signal an error when attribute argument is a fixed-point value of
56         an unknown type.
57
58         PR ada/22559
59         * sem_ch3.adb (Build_Derived_Numeric_Type): Do not set RM_Size on
60         a derived ordinary fixed point type.
61
62         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Recompute
63         RM_Size when a Small clause is found.
64
65 2007-11-26  Andreas Krebbel  <krebbel1@de.ibm.com>
66
67         PR 34081/C++
68         * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
69         Pass 'false' for the new allocate_struct_function parameter.
70         * utils.c (build_function_stub): Likewise.
71
72 2007-11-25  Richard Guenther  <rguenther@suse.de>
73
74         utils.c (gnat_pushlevel): Use BLOCK_CHAIN.
75         (gnat_poplevel): Likewise.
76
77 2007-11-25  Eric Botcazou  <ebotcazou@adacore.com>
78
79         * decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the type has
80         strict alignment, no alignment clause and a known static size, cap
81         the type alignment to the greatest power of 2 factor of the size.
82         (gnat_to_gnu_field): If the field has a component clause, is aliased
83         or of a type with strict alignment, require that its size be equal to
84         that of the type.
85         (validate_size): Use the type size as the minimum size for a type with
86         strict alignment.
87
88 2007-11-23  Samuel Tardieu  <sam@rfc1149.net>
89
90         * s-inmaop-posix.adb, s-intman-vxworks.adb, s-taprop-hpux-dce.adb,
91         s-taprop-irix.adb, s-taprop-linux.adb, s-taprop-lynxos.adb,
92         s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vxworks.adb:
93         Use 'Access instead of 'Unchecked_Access in second and third
94         arguments of pthread_sigmask.
95
96 2007-11-23  Eric Botcazou  <ebotcazou@adacore.com>
97
98         * decl.c (ceil_alignment): New function.
99         (gnat_to_gnu_entity): Use it to set the alignment on atomic types.
100         (make_packable_type): Likewise.
101
102 2007-11-22  Olivier Hainque  <hainque@adacore.com>
103
104         * trans.c (gnat_to_gnu) <case N_Free_Statement>: Reformat lines
105         to fit in 80 columns.
106
107 2007-11-21  Aurelien Jarno <aurelien@aurel32.net>
108
109         * s-osinte-kfreebsd-gnu.ads (To_Target_Priority): New function.
110         * Makefile.in: Add EH_MECHANISM=-gcc to kfreebsd-gnu. Remove SYMLIB.
111
112 2007-11-19  Eric Botcazou  <ebotcazou@adacore.com>
113
114         PR ada/34098
115         * misc.c (gnat_adjust_rli): Delete.
116         (gnat_init): Do not initialize the translation code here.
117         Do not call set_lang_adjust_rli.
118         * trans.c (init_code_table): Make static.
119         (gnat_init_stmt_group): Delete.
120         (gigi): Initialize the translation code entirely here.
121         Emit debug info for the common types here instead of...
122         * utils.c (gnat_init_decl_processing): ...here.
123         * gigi.h (init_code_table): Delete.
124         (gnat_init_stmt_group): Likewise.
125
126 2007-11-16  Olivier Hainque  <hainque@adacore.com>
127
128         * utils2.c (build_call_alloc_dealloc) <if gnu_obj>: Move the code
129         retrieving an allocator return value from a super-aligned address from
130         here to ...
131         * trans.c (gnat_to_gnu) <case N_Free_Statement>: ... here, and don't
132         expect a super-aligned address for a fat or thin pointer.
133         
134 2007-11-14  Eric Botcazou  <ebotcazou@adacore.com>
135
136         * trans.c (call_to_gnu): Always set the source location on the call
137         expression.  If the function returns-by-target, also set it on the
138         address expression.
139
140 2007-11-14  Samuel Tardieu  <sam@rfc1149.net>
141
142         * adaint.c, init.c, initialize.c, link.c: Remove system-specific
143         sections of non-supported Interix target.
144
145         * s-osinte-interix.ads: Removed.
146
147         * i-cstrin.ads (chars_ptr): Make it a C convention type.
148
149 2007-11-13  Samuel Tardieu  <sam@rfc1149.net>
150
151         * a-tasatt.adb: Add a comment at the beginning of the package
152         explaining why in general 'Unchecked_Access must be used instead
153         of 'Access.
154
155         * sem_prag.adb (Process_Convention): Move the test for the
156         entity on which the Convention pragma applies down to also
157         forbid pragma Convention on enumeration literals reached
158         through renamings.
159
160 2007-11-10  Samuel Tardieu  <sam@rfc1149.net>
161
162         * a-tasatt.adb: Revert previous change for this file as it will
163         generate an error when this package is instantiated from a
164         local context.
165
166 2007-11-07  Samuel Tardieu  <sam@rfc1149.net>
167
168         * a-tasatt.adb: Type Wrapper should be declared in comment instead
169         of already declared type Node_Access.
170         Use 'Access instead of 'Unchecked_Access when applicable. Local
171         lifetime is the one of the package.
172         (Set_Value): W is allocated on the heap.
173
174         * g-socket.adb: Use 'Access instead of 'Unchecked_Access when
175         applicable.
176         (Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
177         access type.
178         (Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
179         access type.
180
181         * s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
182         applicable.
183         (elaboration code): Timer_Queue lifetime is the one of the
184         package.
185
186         * tracebak.c (i386 alternative): Remove useless comparaison
187         which is always false; LOWEST_ADDRESS is 0 and is never greater
188         than an unsigned integer.
189
190         * sem_attr.adb (Analyze_Attribute): Remove duplicate identical
191         embedded check for "Ada_Version >= Ada_05".
192
193 2007-11-07  Olivier Hainque  <hainque@adacore.com>
194
195         * decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
196         craft and expand comment.
197
198 2007-11-01  Eric Botcazou  <ebotcazou@adacore.com>
199
200         * lang-specs.h: Move translation of -fRTS= after -gnatez switch.
201
202 2007-10-23  Eric Botcazou  <ebotcazou@adacore.com>
203
204         * misc.c (gnat_handle_option): Replace call to abort with
205         call to gcc_unreachable.
206         (gnat_init): Likewise.
207         (gnat_expand_expr): Likewise.
208         (fp_prec_to_size): Likewise.
209         (fp_size_to_prec): Likewise.
210
211 2007-10-23  Richard Guenther  <rguenther@suse.de>
212
213         PR bootstrap/33608
214         * tracebak.c: #undef abort after including system.h.
215
216 2007-10-20  Danny Smith <dannysmith@users.sourceforge.net>
217
218         * Makefile.in (LIBGNAT_TARGET_PAIRS) Add s-tasinf-mingw.adb,
219         s-tasinf-mingw.ads, a-exetim-mingw.adb, a-exetim-mingw.ads
220         for win32 targets.
221         (EXTRA_GNATRTL_TASKING_OBJS): Add a-exetim.o for win32 targets.
222
223 2007-10-15  Eric Botcazou  <ebotcazou@adacore.com>
224
225         * s-osinte-tru64.adb: (Hide_Yellow_Zone): Add On parameter.
226         Set the protection status of the guard page based on the value of On.
227
228         * s-osinte-tru64.ads: (Hide_Yellow_Zone): Add On parameter.
229
230         * s-taprop-tru64.adb: (Enter_Task): Pass True to Hide_Yellow_Zone.
231         (Exit_Task): Pass False to Hide_Yellow_Zone.
232
233 2007-10-15  Robert Dewar  <dewar@adacore.com>
234
235         * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb, 
236         s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
237         a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb, 
238         checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb, 
239         freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb, 
240         gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb, 
241         mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb, 
242         prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb, 
243         sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb, 
244         s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
245         uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb, 
246         a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb, 
247         a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb, 
248         a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb, 
249         a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb, 
250         a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
251         Minor reformatting.
252         Add Unreferenced and Warnings (Off) pragmas for cases of
253         variables modified calls where they are IN OUT or OUT parameters and
254         the resulting values are not subsequently referenced. In a few cases,
255         we also remove redundant code found by the new warnings.
256
257         * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads, 
258         sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
259         sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
260         sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
261         warning controlled by -gnatw.o that warns on cases of out parameter
262         values being ignored.
263
264 2007-10-15  Geert Bosch  <bosch@adacore.com>
265
266         * adaint.c, socket.c, cal.c: Initial port to arm-mentor-nucleus.
267
268         * expect.c: Initial port to arm-mentor-nucleus.
269         Use kill for __gnat_kill() on VMS.
270
271 2007-10-15  Emmanuel Briot  <briot@adacore.com>
272
273         * ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default
274         value.
275         (Xref_Record): Change type for Line, since in the case of a reference to
276         a predefined entity (as happens for array index types), the line is set
277         to 0.
278         Add support for parsing multiple array index types info, or
279         multiple inherited interfaces info. This information cannot be stored
280         in Xref_Entity_Record, which only supports a single instance of Tref_*,
281         and is therefore stored in the list of references instead. It has a
282         special treatement later on in tools that use this information.
283
284 2007-10-15  Tristan Gingold  <gingold@adacore.com>
285
286         * debug.adb: Document use of -gnatd.a and -gnatd.I
287
288         * layout.adb: On OpenVMS -gnatd.a disables alignment optimization.
289
290 2007-10-15  Javier Miranda  <miranda@adacore.com>
291
292         * exp_attr.adb (Expand_N_Attribute_Reference): Case Access,
293         Unchecked_Access, and Unrestricted_Access. Cleanup code that takes
294         care of access to class-wide interface types plus removal of bizarre
295         conversion of tagged object to access type (reported by Gary
296         Dismukes). After this patch there is no need to perform any
297         additional management on these nodes in Expand_Interface_Actuals.
298
299         * exp_disp.adb (Expand_Interface_Actuals): Code cleanup. Remove code
300         that handles use of 'Access and 'Unchecked_Access applied to
301         actuals covering interface types. Such code is now
302         centralized in Expand_N_Attribute_Reference.
303
304 2007-10-15  Ed Schonberg  <schonberg@adacore.com>
305
306         * exp_ch3.adb (Build_Init_Procedure): Keep separate the initialization
307         of tagged types whose ultimate ancestor is a CPP type.
308         (Freeze_Array_Type): For a packed array type, generate an initialization
309         procedure if the type is public, to handle properly a client that
310         specifies Normalize_Scalars.
311
312 2007-10-15  Hristian Kirtchev  <kirtchev@adacore.com>
313
314         * exp_ch9.adb (Actual_Index_Expression): When the expansion occurs
315         inside a generic body, retrieve the full view of the entry family
316         discrete subtype if available.
317
318 2007-10-15  Thomas Quinot  <quinot@adacore.com>
319
320         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): Do not
321         attempt to generate stubs for hidden primitive operations.
322
323 2007-10-15  Vincent Celier  <celier@adacore.com>
324
325         * mlib-tgt-specific.adb (Support_For_Libraries): New function,
326         returning None, used when there is no platform specific body for
327         MLib.Tgt.Specific.
328
329 2007-10-15  Bob Duff  <duff@adacore.com>
330
331         * sem_case.adb, sem_ch13.adb, lib-sort.adb: Replace use of Heap_Sort_A
332         (passing'Unrestricted_Access of nested subprograms to Sort) with use of
333         the generic Heap_Sort_G, in order to avoid trampolines.
334
335 2007-10-15  Vasiliy Fofanov  <fofanov@adacore.com>
336             Jose Ruiz  <ruiz@adacore.com>
337
338         * vx_stack_info.c: New file.
339
340         * i-forbla-unimplemented.ads: New file.
341
342         * Makefile.in: i-forbla-unimplemented.ads: a variant of i-forbla.ads
343         for unsupported configurations; use it on VMS targets instead of the
344         real one.
345         (EXTRA_LIBGNAT_SRCS,EXTRA_LIBGNAT_OBJS for VxWorks): Include
346         vx_stack_info.{c,o} that contains the routine __gnat_get_stack_info
347         used by VxWorks targets to have access to task-specific data and be
348         able to extract the stack boundaries for stack checking.
349         Use system-vms-ia64.ads on ivms.
350
351         * Make-lang.in: Update dependencies.
352
353         * sysdep.c (__gnat_get_stack_info): Move to a standalone file
354         (vx_stack_info.c).
355
356 2007-10-15  Vincent Celier  <celier@adacore.com>
357
358         * snames.adb, snames.ads: Add new standard name runtime_library_dir
359
360         * prj.ads (Language_Config): Add new component Runtime_Library_Dir
361
362         * prj-attr.adb: Add project level attribute Runtime_Library_Dir
363
364         * prj-env.adb (Create_Mapping_File): Do not put an entry if the path of
365         the source is unknown.
366
367         * prj-ext.adb: Spelling error fix
368
369         * prj-nmsc.adb (Check_Ada_Name): Reject any unit that includes an Ada
370         95 reserved word in its name.
371         (Process_Project_Level_Array_Attributes): Process new attribute
372         Runtime_Library_Dir.
373
374         * prj-part.adb (Parse_Single_Project): Do not check the name of the
375         config project against the user project names.
376
377         * prj-proc.adb (Expression): In multi-language mode, indexes that do
378         not include a dot are always case insensitive.
379         (Process_Declarative_Items): Ditto
380         (Process_Project_Tree_Phase_1): Set Success to False in case an error is
381         detected.
382
383         * prj-util.adb (Value_Of (In_Array)): When Force_Lower_Case_Index is
384         True, compare both indexes in lower case.
385
386 2007-10-15  Robert Dewar  <dewar@adacore.com>
387
388         * rtsfind.adb: (Load_RTU): Turn off style checks for Load call
389
390 2007-10-15  Gary Dismukes  <dismukes@adacore.com>
391
392         * sem_aggr.adb (Resolve_Record_Aggregate): In the case of a box
393         association for an access component, add an association with null as
394         the expression. Remove testing for array subtypes and the setting in
395         that case of Ctyp to the array component type, which prevented proper
396         inclusion of an association for null-initialized arrays. Collapse
397         condition that tests for array subtypes into just a test of
398         Is_Partially_Initialized_Type (which already covers arrays anyway).
399
400 2007-10-15  Hristian Kirtchev  <kirtchev@adacore.com>
401
402         * sem_ch12.adb: Minor code reformatting.
403         (Check_Generic_Child_Unit): Iterate over the homonym chain in order to
404         find the parent package which may have been hidden by local
405         declarations.
406
407 2007-10-15  Gary Dismukes  <dismukes@adacore.com>
408
409         * sem_ch3.adb (Build_Derived_Concurrent_Type): Set the Is_Constrained
410         flag of derived concurrent types, taking into account the flag setting
411         on the parent subtype and any new set of discriminants.
412
413 2007-10-15  Hristian Kirtchev  <kirtchev@adacore.com>
414
415         * sem_ch4.adb: Minor code and comment reformatting.
416         (Analyze_Allocator): When the designated type of an unconstrained
417         allocator is a record with unknown discriminants or an array with
418         unknown range bounds, emit a detailed error message depending on the
419         compilation mode and whether the designated type is limited.
420
421 2007-10-15  Tristan Gingold  <gingold@adacore.com>
422
423         * system-vms-ia64.ads: New file.
424
425         * system-vms_64.ads: Minor comment fix.
426
427 2007-10-15  Ed Schonberg  <schonberg@adacore.com>
428
429         * sem_ch6.adb (Find_Corresponding_Spec): If the previous entity is a
430         body generated for a function with a controlling result that is a null
431         extension, discard the generated body in favor of the current explicit
432         one.
433
434 2007-10-15  Ed Schonberg  <schonberg@adacore.com>
435
436         * sem_disp.adb (Find_Controlling_Arg): Examine the call node before
437         examining its original form, to handle properly operator calls that
438         have been rewritten.
439
440 2007-10-15  Olivier Hainque  <hainque@adacore.com>
441
442         * tb-alvms.c (tb_entry_t, __gnat_backtrace): Store a frame pointer
443         instead of a procedure value in each traceback entry.
444
445         * g-trasym-vms-alpha.adb (Symbolic_Traceback): Pass frame pointer
446         instead of procedure value to TBK$SYMBOLIZE.
447
448         * s-traent-vms.adb (PV_For): Rename as FP_For and access the proper
449         field.
450         (TB_Entry_For): Account for the PV/FP renaming.
451
452         * s-traent-vms.ads (Traceback_Entry): Rename PV component into FP and
453         add comment.
454         (Null_TB_Entry): Account for change of component name.
455         (PV_For): Rename as FP_For.
456
457 2007-10-15  Tristan Gingold  <gingold@adacore.com>
458
459         * trans.c (gnat_to_gnu): Remove the padding structure more often.
460         This optimize assignment to over-aligned record.
461
462 2007-10-15  Emmanuel Briot  <briot@adacore.com>
463
464         * xref_lib.adb (Get_Full_Type): Add support for the 'h' entity type, ie
465         interfaces.
466
467         * xr_tabls.adb (Add_Reference): Add support for the new 'R' reference
468         type, for dispatching calls.
469
470 2007-10-15  Vincent Celier  <celier@adacore.com>
471             Robert Dewar  <dewar@adacore.com>
472
473         * gnat_ugn.texi: Add documentation for switches --version and --help
474         for the GNAT tools gnatbind, gnatlink, gnatmake, gnatchop, gnatname,
475         gnatxref, gnatfind, gnatls, and gnatclean.
476         Document -gnatw.o.
477         Mention attribute Excluded_Source_Dirs
478         Replace obsolescent attribute Locally_Removed_Files with attribute
479         Excluded_Source_Files.
480         Improve documentation of -u (gnatbind)
481         Document how to do reliable stack checking for the environmental task
482         on iVMS.
483
484         * gnat_rm.texi: Rewrite section about No_Implicit_Dynamic_Code.
485         Document attribute Excluded_Source_Files and indicate that attribute
486         Locally_Removed_Files is obsolescent.
487
488 2007-10-15  Thomas Quinot  <quinot@adacore.com>
489
490         * g-soccon-vms.ads: Fix value of MSG_WAITALL.
491
492         * gen-soccon.c: 
493         Update documentation to note that OpenVMS 8.3 or later must be used
494         to generate g-soccon-vms.ads.
495
496         * atree.adb: Add ??? comment
497
498         * exp_util.adb: Minor reformatting.
499         Add ??? comment in Kill_Dead_Code.
500
501 2007-10-15  Robert Dewar  <dewar@adacore.com>
502
503         * errout.ads: Comment clarification
504
505         * exp_ch4.adb (Expand_N_Allocator): Code cleanup.
506         (Expand_N_Op_Eq): Improve handling of array equality with -gnatVa
507
508         * lib.ads: Comment update
509
510         * init.c: Minor reformatting.
511
512         * sem_attr.adb: Minor formatting
513
514         * osint-b.ads: Minor reformatting
515
516         * sem_ch9.adb: Implement -gnatd.I switch
517
518         * g-comlin.adb: (Start): Fix handling of empty command line.
519
520         * gnatcmd.adb (GNATCmd): Do not put the -rules in the -cargs section,
521         even when -rules follows the -cargs section.
522
523 2007-10-08  Ollie Wild  <aaw@google.com>
524
525         * misc.c (LANG_HOOKS_PUSHDECL): Replaced lhd_return_tree with
526         gnat_return_tree.
527         (gnat_init_gcc_eh): Replaced gnat_eh_runtime_type with
528         gnat_return_tree.
529         (gnat_eh_runtime_type): Removed.
530         (gnat_return_tree): New function.
531
532 2007-10-08  Ben Elliston  <bje@au.ibm.com>
533
534         PR ada/33454
535         Revert:
536         2007-08-31  Ben Elliston  <bje@au.ibm.com>
537
538         * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
539         when compiling for powerpc64-*-linux.
540         * system-linux-ppc64.ads: New file.
541
542 2007-09-27  Eric Botcazou  <ebotcazou@adacore.com>
543
544         Mapped location support
545         * back_end.adb (Call_Back_End): Pass information about source
546         files instead of units to gigi.
547         * gigi.h (struct File_Info_Type): New.
548         (gigi): Rename and change type of number_units parameter, change
549         type of file_info_ptr parameter.
550         * trans.c (number_files): New global variable.
551         (gigi): Rename and change type of number_units parameter, change
552         type of file_info_ptr parameter.
553         If mapped location support is enabled, create the isomorphic mapping
554         between source files and line maps.
555         (Sloc_to_locus): If mapped location support is enabled, translate
556         source location into mapped location.
557         (annotate_with_node): Rename into set_expr_location_from_node.
558         Call set_expr_location instead of annotate_with_locus.
559         (Pragma_to_gnu): Adjust for above change.
560         (Loop_Statement_to_gnu): Likewise.
561         (call_to_gnu): Likewise.
562         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
563         (gnat_to_gnu): Likewise.
564         (add_stmt_with_node): Likewise.
565         (add_cleanup): Likewise.
566         * utils.c (gnat_init_decl_processing): Do not set input_line.
567
568 2007-09-26  Hristian Kirtchev  <kirtchev@adacore.com>
569
570         * sem_ch8.adb (Analyze_Use_Type): Code cleanup.
571         (Applicable_Use): Emit a warning when a package tries to use itself.
572         (Use_One_Type): Add variable Is_Known_Used. Emit a warning when a type
573         is already in use or the package where it is declared is in use or is
574         declared in the current package.
575         (Spec_Reloaded_For_Body): New subsidiary routine for Use_One_Type.
576
577         * a-tasatt.adb, s-osprim-vxworks.adb, g-socthi-mingw.adb,
578         s-intman-vms.adb, g-socket.adb, g-thread.adb, s-tarest.adb,
579         s-tassta.adb, s-tporft.adb: Remove redundant 'use type' clause.
580
581 2007-09-26  Hristian Kirtchev  <kirtchev@adacore.com>
582
583         * a-calend-vms.adb, a-calend.adb: 
584         Add a section on leap seconds control along with two entities used to
585         enable and disable leap seconds support. The array Leap_Second_Times is
586         now constant and contains hard time values pre-generated. Remove
587         all elaboration code used to populate the table of leap seconds.
588
589         * bindgen.adb: 
590         Add entity Leap_Seconds_Support to the list of global run-time variables
591         along with a comment on its usage and values.
592         (Gen_Adainit_Ada): Add code to generate the declaration and import of
593         Integer variable Leap_Seconds_Support. Set its value to zero (disabled)
594         or one (enabled) depending on the presence of binder switch "-y".
595         (Gen_Adainit_C): Add code to generate the declaration of external int
596         __gl_leap_seconds_support. Set is value to zero (disabled) or one
597         (enabled) depending on the presence of binder switch "-y".
598
599         * init.c: Add __gl_leap_seconds_support to the list of global values
600         computed by the binder.
601
602 2007-09-26  Jerome Guitton  <guitton@adacore.com>
603
604         * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
605         s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb,
606          s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
607         s-taprop-posix.adb (Stop_Task): New function, dummy implementation.
608
609         * s-taprop.ads, s-taprop-vxworks.adb (Stop_Task): New function.
610
611         * s-tasdeb.adb (Stop_All_Tasks): New function, implementing a run-time
612         function which can be called by the debugger to interrupt the tasks of
613         an Ada application asynchronously, as needed on VxWorks.
614         (Stop_All_Tasks_Handler): Renamed from Stop_All_Tasks.
615
616         * s-tasdeb.ads (Stop_All_Tasks_Handler): New function declaration,
617         renamed from Stop_All_Tasks. Update comments.
618         (Stop_All_tasks): New function declaration.
619
620 2007-09-26  Olivier Hainque  <hainque@adacore.com>
621
622         * adaint.c (if defined (__Lynx__)): Wrap #def/#undef VMOS_DEV around
623         #include <utime.h> and #define GCC_RESOURCE_H before
624         #include <sys/wait.h>.
625         Add more protections in __gnat_translate_vms.
626
627         * expect.c (if defined (__Lynx__)): #define GCC_RESOURCE_H before
628         #include <sys/wait.h>.
629
630 2007-09-26  Thomas Quinot  <quinot@adacore.com>
631             Sergey Rybin  <rybin@adacore.com>
632
633         * gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed.
634
635         * exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
636         where it belongs.
637
638         * opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
639
640         * rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
641         where it belongs.
642
643         * sem_dist.ads: Minor comment fix
644
645         * tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
646
647 2007-09-26  Javier Miranda  <miranda@adacore.com>
648             Eric Botcazou  <ebotcazou@adacore.com>
649
650         * a-tags.adb: 
651         (Get_HT_Link/Set_HT_Link): Updated to handle the additional level of
652          indirection added to the HT_Link component of the TSD. This is required
653          to statically allocate the TSD.
654
655         * a-tags.ads: 
656         Minor reordering of the declarations in the private part. Required to
657         add a level of indirection to the contents of the TSD component HT_Link.
658         This is required to statically allocate the TSD.
659
660         * decl.c (gnat_to_gnu_entity) <object>: Do not exclude objects with
661         Is_Statically_Allocated set from constant objects.
662         Do not make exported constants created by the compiler volatile.
663         (gnat_to_gnu_param): Do not treat an IN parameter whose address is taken
664         as read-only.
665
666         * trans.c (Identifier_to_gnu): For constants, unshare initializers
667         before returning them.
668
669         * exp_disp.ads, exp_disp.adb (Building_Static_DT): Spec moved to the
670         public part of the package.
671         (Make_DT): Move HT_Link component out of the TSD record. For this
672         purpose Make_DT now declares a separate object that stores the
673         HT_Link value, and initializes the TSD component with the address
674         of this new object. The addition of this level of indirection is
675         required to statically allocate the TSD because the TSD cannot
676         have variable components.
677         (Expand_Interface_Conversion): Improve the expanded code.
678         (Expand_Interface_Thunk): Set Is_Thunk in the thunk entity.
679
680         * sem_disp.adb (Check_Dispatching_Operation): In case of a body
681         declaring a primitive operation ---allowed by RM 3.9.2 (13.e/2)---,
682         if we are building static dispatch tables then we must not generate
683         extra code to register the primitive because the dispatch table will
684         be built at the end of the library package; otherwise we notify that
685         we cannot build the static dispatch table.
686
687 2007-09-26  Robert Dewar  <dewar@adacore.com>
688
689         * checks.adb, gnat1drv.adb, sem_util.ads: Improve warnings for address
690         overlays.
691
692         * sem_ch13.ads, sem_ch13.adb: Improve warnings for address overlays
693         (Analyze_Record_Representation_Clause): Suppress junk warning for
694         missing component clause.
695         (Analyze_Attribute_Definition_Clause, case Address): Apply the special
696         tests for controlled type overlay to composites with controlled
697         components.
698         (Analyze_Record_Representation_Clause): Add reference for component name
699
700 2007-09-26  Javier Miranda  <miranda@adacore.com>
701             Gary Dismukes  <dismukes@adacore.com>
702
703         * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True
704         for thunks associated with interface types.
705
706         * einfo.ads: Improve documentatation of Is_Internal
707         (Is_Thunk): New attribute applicable to subprograms. True for thunks
708         associated with interface types.
709         Extensive comment fixes regarding flags that appear in all entities. The
710         documentation is now consistent for all such flags (there were a number
711         of errors in the documentation in this regard).
712
713         * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup.
714
715         * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any
716         of these procedures are passed a function call that already has
717         build-in-place actuals (testing new flag
718         Is_Expanded_Build_In_Place_Call). Set the flag on the function call in
719         the case where processing continues.
720         (Expand_Call): If the call is generated from a thunk body then we
721         propagate the extra actuals associated with the accessibility
722         level of the access type actuals.
723
724         * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field
725         of each extra formal of a protected operation to reference the
726         corresponding extra formal of the subprogram denoted by the
727         operation's Protected_Body_Subprogram.
728         
729         * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
730         N_Function_Call nodes.
731
732 2007-09-26  Robert Dewar  <dewar@adacore.com>
733
734         * exp_ch5.adb: Activate memmove type processing if debug flag d.s is set
735
736         * debug.adb: Add d.s flag.
737
738 2007-09-26  Gary Dismukes  <dismukes@adacore.com>
739
740         * exp_dbug.adb (Debug_Renaming_Declaration): Set Is_Internal on the
741         debug variable so that it won't be initialized when pragma
742         Initialize_Scalars is in effect.
743
744 2007-09-26  Gary Dismukes  <dismukes@adacore.com>
745
746         * freeze.adb (Freeze_Entity): Remove check for preelaborable
747         initialization of a full view. This is moved to
748         Analyze_Package_Specification.
749
750         * sem_ch7.adb (Analyze_Package_Specification): Add check for
751         preelaborable initialization of a full view in entity loop.
752         (Uninstall_Declarations): If entity is a use-visible compilation unit,
753         its child units are use-visible only if they are visible child units.
754
755         * sem_util.adb (Is_Preelaborable_Expression): New function to determine
756         whether an expression can be used within a type declaration that
757         requires preelaborable init.
758         (Check_Components): Replace inline code that does partial checking for
759         preelaborable default expressions with call to
760         Is_Preelaborable_Expression.
761         (Has_Preelaborable_Initialization): In the case of a generic actual
762         subtype, (that is, Is_Generic_Actual is True), return the result of
763         applying Has_Preelaborable_Initialization to the generic actual's base
764         type.
765
766 2007-09-26  Hristian Kirtchev  <kirtchev@adacore.com>
767
768         * g-calend.adb (Has_53_Weeks): Rename to Last_Year_Has_53_Weeks. Add a
769         call to Jan_1_Day _Of_Week to optimize its performance.
770         (Is_Leap): Move the routine to the scope of Week_In_Year.
771         (Jan_1_Day_Of_Week): New routine in Week_In_Year which calculates the
772         weekday on which January 1 falls of Year - 1 and Year + 1. This function
773         avoids calling Time_Of and Split, thus making it more efficent.
774         (Week_In_Year): Reimplemented in oder to follow ISO 8601.
775
776         * g-calend.ads (Week_In_Year): Change comment to reflect new
777         implementation.
778
779 2007-09-26  Emmanuel Briot  <briot@adacore.com>
780
781         * g-comlin.ads, g-comlin.adb (Command_Line_Configuration,
782         Command_Line): New types
783         (Define_Alias, Define_Prefix, Free): New subprograms. These provide
784         support for defining how switches can be grouped on a command line (as
785         is the case for -gnatw... for GNAT), and how simple switches can be
786         used as aliases for more complex switches (-gnatwa is same as
787         -gnatwbcef...)
788         (Set_Command_Line, Add_Switch, Remove_Switch): New subprogram
789         (Start, Current_*): New subprograms
790         Added support for parsing an array of strings in addition to the real
791         command line.
792         (Opt_Parser, Opt_Parser_Data): New type. As a result, some types had to
793          be moved from the body to the private part of the spec.
794         (*): All subprograms now have an extra parameter with default value to
795         specify which parser should be used. For backward compatibility, it
796         defaults to parsing the command line of the application. They were also
797         modified to properly handle cases where each of the argument does not
798         start at index 1 (which is always true for Ada.Command_Line, but not
799         when processing any Argument_List).
800         (Free): New subprogram
801         (Internal_Initialize_Option_Scan, Find_Longuest_Matching_Switch,
802         Argument): New subprograms
803         (Switch_Parameter_Type): New enum, which clarifies the code. The extra
804         special characters like ':', '=',... are now handled in a single place,
805         which makes the code more extensible eventually.
806         (Getopt, Full_Switch): When the switch was returned as part of the
807         special character '*', make sure it is prepended by the switch character
808         ('-' in general), so that the application knows whether "foo" or "-foo"
809         was specified on the command line.
810
811 2007-09-26  Florian Villoing  <villoing@adacore.com>
812
813         * g-dirope.adb (Remove_Dir): In case we are removing directories
814         recursively, make sure that if an exception is raised during the
815         processing, the current working directory is reset to its initial
816         value before propagating the exception.
817
818 2007-09-26  Vincent Celier  <celier@adacore.com>
819
820         * gnatbind.adb: If there are several ALI files specified and there is
821         a main program to bind, the first ALI is expected to contain the main
822         subprogram and the names of the binder generated files will be derived
823         from the first ALI file name.
824         (Gnatbind): Fix insertion character in invocation of Error_Msg
825
826 2007-09-26  Vincent Celier  <celier@adacore.com>
827
828         * gnatcmd.adb (Check_Files): Do not include sources that have been
829         removed by attributes Exclude_Source_Files or Locally_Removed_Files.
830
831 2007-09-26  Ed Schonberg  <schonberg@adacore.com>
832
833         * lib-xref.ads, lib-xref.adb: The entry for array types now carries
834         information about each of its index types, following the type
835         reference for its component type.
836
837 2007-09-26  Vincent Celier  <celier@adacore.com>
838
839         * make.adb: (Kill): New procedure (__gnat_kill imported)
840         (Running_Compile, Outstanding_Compiles): Global variables that
841         were previously local to procedure Compile_Sources.
842         (Sigint_Intercepted): Send signal SIGINT to all outstanding
843         compilation processes.
844
845         (Gnatmake): If project files are used, create the mapping of all the
846         sources, so that the correct paths will be found.
847
848         * prj-env.ads, prj-env.adb (Create_Mapping): New procedure
849
850 2007-09-26  Vincent Celier  <celier@adacore.com>
851
852         * makeutl.ads (Main_Config_Project): Moved to gpr_util.ads
853
854         * prj.ads, prj.adb (Default_Language): Remove function, no longer used
855         Replace components Compiler_Min_Options and Binder_Min_Options with
856         Compiler_Required_Switches and Binder_Required_Switches in record
857         Language_Config.
858         Remove components Default_Language and Config in Project_Tree_Data,
859         no longer used.
860
861         * prj-attr.adb: New attributes Required_Switches (<language>) in
862         packages Compiler and Binder.
863
864         * prj-nmsc.adb: Major rewrite of the processing of configuration
865         attributes for gprbuild. No impact on GNAT tools.
866
867         * prj-proc.ads, prj-proc.adb (Process_Project_Tree_Phase_2): No longer
868         process configuration attributes: this is done in Prj.Nmsc.Check.
869         (Recursive_Process): Make a full copy of packages inherited from project
870         being extended, instead of a shallow copy.
871         (Process_Project_Tree_Phase_1): New procedure
872         (Process_Project_Tree_Phase_1): New procedure
873         (Process): Implementation now uses the two new procedures
874
875         * prj-util.adb (Executable_Of): Get the suffix and the default suffix
876         from the project config, not the tree config that no longer exists.
877
878 2007-09-26  Vincent Celier  <celier@adacore.com>
879
880         * Make-lang.in: Update dependencies..
881
882 2007-09-26  Vincent Celier  <celier@adacore.com>
883
884         * osint.adb, osint.ads: Minor reformatting
885
886         * osint-b.adb, osint-b.ads (Set_Current_File_Name_Index): New procedure
887
888 2007-09-26  Gary Dismukes  <dismukes@adacore.com>
889
890         * par-ch4.adb (P_Record_Or_Array_Component_Association): Change Ada 95
891         message to cite use of <> in aggregate component associations rather
892         than wrongly indicating use of limited aggregates.
893
894 2007-09-26  Robert Dewar  <dewar@adacore.com>
895
896         * sem_attr.adb (Analyze_Access_Attribute): Fix missing set of
897         Address_Taken.
898
899 2007-09-26  Ed Schonberg  <schonberg@adacore.com>
900
901         * sem_ch3.adb (Derive_Subprograms): If the interface parent is a direct
902         ancestor of the derived type, the operations are inherited from the
903         primary dispatch table of the parent.
904         (OK_For_Limited_Init_In_05): Remove old comment. Reject in-place calls
905         when the context is an explicit type conversion.
906
907 2007-09-26  Ed Schonberg  <schonberg@adacore.com>
908
909         * sem_ch4.adb (Analyze_Qualified_Expression): Apply name resolution
910         rule for qualified expressions properly, to detect improper conversions
911         and resolve some cases of overloading.
912
913 2007-09-26  Ed Schonberg  <schonberg@adacore.com>
914
915         * sem_res.adb (Resolve_Call): If the call is dispatching, generate the
916         proper kind of reference to the primitive operation, for better source
917         navigation.
918         (Valid_Conversion): A tagged conversion is legal if both operands are
919         tagged.
920
921 2007-09-26  Robert Dewar  <dewar@adacore.com>
922
923         * sem_warn.adb (Check_References): Catch more cases of unreferenced
924         packages.
925
926 2007-09-26  Vincent Celier  <celier@adacore.com>
927
928         * snames.adb, snames.ads: Change Include_Option to Include_Switches
929
930 2007-09-26  Robert Dewar  <dewar@adacore.com>
931
932         * s-wchstw.adb: provide messages for run time unit exceptions
933
934         * a-witeio.adb: Minor reformatting
935
936         * exp_ch13.adb: Minor reformatting
937
938 2007-09-26  Sergey Rybin  <rybin@adacore.com>
939
940         * vms_data.ads: Revise gnatmetric qualifiers.
941         Add qualified for the new gnatbind option '-y'
942
943         * gnat_ugn.texi: Revise the gnatmetric section.
944         Add entry for new gnatbind option '-y'.
945
946         * gnat_rm.texi: Minor spelling correction.
947         Document restriction on overlaying controlled types
948
949 2007-09-26  Vincent Celier  <celier@adacore.com>
950
951         * makegpr.adb (Link_Executables): Do not fail when the root project has
952         no sources, but is an extending project.
953
954 2007-09-25  Eric Botcazou  <ebotcazou@adacore.com>
955
956         * trans.c: Fix misplaced #define.
957
958 2007-09-22  Eric Botcazou  <ebotcazou@adacore.com>
959
960         * utils2.c (build_unary_op) <ADDR_EXPR> [INDIRECT_REF]: Propagate
961         the TYPE_REF_CAN_ALIAS_ALL flag to the result.
962
963 2007-09-21  Olivier Hainque  <hainque@adacore.com>
964
965         * utils.c (type_for_nonaliased_component_p): Return false for
966         all AGGREGATE_TYPEs.
967
968 2007-09-17  Eric Botcazou  <ebotcazou@adacore.com>
969
970         * decl.c (gnat_to_gnu_entity) <object>: Make again the type of an
971         object covered by 13.3(19) volatile.
972
973 2007-09-12  Eric Botcazou  <ebotcazou@adacore.com>
974
975         PR ada/26797
976         PR ada/32407
977         * utils.c (unchecked_convert): Use a subtype as the intermediate type
978         in the special VIEW_CONVERT_EXPR case.
979
980 2007-09-12  Robert Dewar  <dewar@adacore.com>
981
982         * types.ads, a-charac.ads, freeze.adb: Minor reformatting.
983
984         * a-except.adb, g-hesora.adb, g-speche.adb, lib.adb, lib.ads,
985         lib-load.adb, lib-writ.adb, s-assert.adb, s-carun8.adb,
986         s-casuti.adb, s-crc32.adb, s-exctab.adb, s-htable.adb, s-imgenu.adb,
987         s-mastop.adb, s-memory.adb, s-memory.ads, s-secsta.adb, s-soflin.adb,
988         s-sopco3.adb, s-sopco4.adb, s-sopco5.adb, s-stache.adb, s-stalib.adb,
989         s-stoele.adb, s-strcom.adb, s-strops.adb, s-traceb.adb, s-traent.adb,
990         s-wchcnv.adb, s-wchcon.adb, s-wchjis.adb, s-addope.adb, s-except.adb,
991         s-os_lib.adb, s-string.adb, s-utf_32.adb, a-elchha.adb,
992         a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads, 
993         g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads, 
994         s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb, 
995         s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb, 
996         snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads, 
997         s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads, 
998         s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads, 
999         s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads, 
1000         s-except.ads, s-os_lib.ads, s-string.ads, s-utf_32.ads: Implement
1001         pragma Compiler_Unit and adds it to relevant library units.
1002
1003 2007-09-12  Ed Schonberg  <schonberg@adacore.com>
1004
1005         * sem_aggr.adb (Resolve_Record_Aggregate): An others association with
1006         a box need not correspond to any component.
1007
1008 2007-09-12  Robert Dewar  <dewar@adacore.com>
1009
1010         * g-thread.ads: Document use of "with GNAT.Threads" to ensure loading
1011         the tasking version of the Ada run time when foreign threads are
1012         present and there are no explicit Ada tasks or tasking constructs.
1013
1014         * gnat_rm.texi: Clarify documentation of GNAT.Threads.
1015
1016 2007-09-12  Hristian Kirtchev  <kirtchev@adacore.com>
1017
1018         * bindusg.adb (Display): Correct comment for switch -X. Add a line for
1019         the usage of switch -y.
1020
1021         * switch-b.adb (Scan_Binder_Switches): Set flag Leap_Seconds_Support
1022         when switch -y is present.
1023
1024         * opt.ads: Add binder flag Leap_Seconds_Support used to enable/disable
1025         leap seconds in Ada.Calendar and its children.
1026
1027 2007-09-12  Jose Ruiz  <ruiz@adacore.com>
1028
1029         * a-extiti.ads (Timer): The discriminant is a "not null access
1030         constant" in the Reference Manual.
1031         (Cancel_Handler): Cancelled is an out parameter in the Reference Manual.
1032
1033 2007-09-12  Robert Dewar  <dewar@adacore.com>
1034
1035         * a-swuwha.adb: Remove junk RM header
1036
1037 2007-09-12  Vincent Celier  <celier@adacore.com>
1038
1039         * g-bytswa-x86.adb (Swap2, Swap4, Swap8): Remove explicit "in" mode
1040         indicator
1041
1042         * g-bytswa.ads: Minor reformatting
1043
1044 2007-09-12  Thomas Quinot  <quinot@adacore.com>
1045
1046         * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads: 
1047         Add new constant Thread_Blocking_IO, always True by default, set False
1048         on a per-runtime basis.
1049         (Need_Netdb_Buffer): New constant.
1050
1051 2007-09-12  Arnaud Charlet  <charlet@adacore.com>
1052
1053         * s-dsaser.ads (Get_Local_Partition_Id, Get_Passive_Partition_Id):
1054         Added renames for corresponding functions in System.Partition_Interface.
1055
1056 2007-09-12  Doug Rupp  <rupp@adacore.com>
1057
1058         * Makefile.in: Remove VMS specific System.CRTL packages which are no
1059         longer needed.
1060
1061         * s-crtl-vms64.ads: Removed.
1062
1063 2007-09-12  Olivier Hainque  <hainque@adacore.com>
1064
1065         * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: For a subtype
1066         with discriminant constraints, generalize the code for BIT_FIELDs
1067         to PACKED fields of constant size and propagate DECL_PACKED.
1068
1069 2007-09-11  Eric Botcazou  <ebotcazou@adacore.com>
1070
1071         * decl.c (array_type_has_nonaliased_component): New predicate.
1072         (gnat_to_gnu_field) <E_Array_Type>: Invoke the above predicate to
1073         set the TYPE_NONALIASED_COMPONENT flag on the type.
1074         <E_Array_Subtype>: Likewise.
1075         * gigi.h (type_for_nonaliased_component_p): Declare.
1076         * utils.c (type_for_nonaliased_component_p): New predicate.
1077         (create_field_decl): Invoke the above predicate to set the
1078         DECL_NONADDRESSABLE_P flag on the field.
1079
1080 2007-09-11  Javier Miranda  <miranda@adacore.com>
1081
1082         * einfo.ads, einfo.adb (Dispatch_Table_Wrapper): New attribute. Present
1083         in library level record type entities if we are generating statically
1084         allocated dispatch tables.
1085
1086         * exp_disp.adb (Make_Tags/Make_DT): Replace previous code
1087         importing/exporting the _tag declaration by new code
1088         importing/exporting the dispatch table wrapper. This change allows us
1089         to statically allocate of the TSD.
1090         (Make_DT.Export_DT): New procedure.
1091         (Build_Static_DT): New function.
1092         (Has_DT): New function.
1093
1094         * freeze.adb (Freeze_Static_Object): Code cleanup: Do not reset flags
1095         True_Constant and Current_Value. Required to statically
1096         allocate the dispatch tables.
1097         (Check_Allocator): Make function iterative instead of recursive.
1098         Also return inner allocator node, when present, so that we do not have
1099         to look for that node again in the caller.
1100
1101 2007-09-11  Jan Hubicka <jh@suse.cz>
1102
1103         * misc.c (gnat_expand_body): Kill.
1104         (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
1105
1106 2007-09-10  Robert Dewar  <dewar@adacore.com>
1107
1108         * exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
1109         mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
1110         mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
1111         mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
1112         ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
1113         bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
1114         bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
1115         butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
1116         comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
1117         elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
1118         err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
1119         exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
1120         exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
1121         exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
1122         exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
1123         exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
1124         exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
1125         exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
1126         exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
1127         exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
1128         exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
1129         exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
1130         fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
1131         get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
1132         gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
1133         gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
1134         gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
1135         gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
1136         gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
1137         gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
1138         inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
1139         lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
1140         lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
1141         make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
1142         mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
1143         mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
1144         mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
1145         mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
1146         osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
1147         osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
1148         par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
1149         par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
1150         par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
1151         par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
1152         par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
1153         prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
1154         prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
1155         prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
1156         prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
1157         prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
1158         prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
1159         prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
1160         rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
1161         scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
1162         sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
1163         sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
1164         sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
1165         sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
1166         sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
1167         sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
1168         sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
1169         sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
1170         sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
1171         sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
1172         sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
1173         sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
1174         sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
1175         sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
1176         stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
1177         styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
1178         switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
1179         switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
1180         tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
1181         treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
1182         types.h, uintp.h, urealp.h, usage.adb, usage.ads,
1183         validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
1184         xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
1185         xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
1186         gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
1187         mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
1188         symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
1189         mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
1190         mlib-tgt-vms.ads: Replace headers with GPL v3 headers.
1191
1192 2007-09-10  Emmanuel Briot  <briot@adacore.com>
1193
1194         * s-regpat.adb (Parse_Character_Class): Fix handling of empty character
1195         classes ("[]").
1196
1197 2007-09-10  Vasiliy Fofanov  <fofanov@adacore.com>
1198
1199         * adaint.c (__gnat_translate_vms): new function.
1200
1201 2007-09-10  Gary Dismukes  <dismukes@adacore.com>
1202             Thomas Quinot  <quinot@adacore.com>
1203
1204         * exp_ch3.adb (Predef_Spec_Or_Body): When the type is abstract, only
1205         create an abstract subprogram in the case of 'Input. For 'Output we now
1206         create a real spec/body when the type is abstract, since it can
1207         potentially be called.
1208         (Predefined_Primitive_Bodies): Now allow the creation of a predefined
1209         body for 'Output when the type is abstract (only the creation of the
1210         body for 'Input is excluded when the type is abstract).
1211         (Stream_Operation_OK): Add an additional condition in the return
1212         statement, so that False will be returned for TTS_Stream_Input if the
1213         associated tagged type is an abstract extension. Add comments for
1214         return statement.
1215         (Expand_N_Object_Declaration): For the case of a shared passive
1216         variable, insert init proc call only after the shared variable
1217         procedures have been processed, because the IP call needs to undergo
1218         shared passive variable reference expansion, which requires these
1219         procedures to be available (and elaborated).
1220
1221 2007-09-10  Vincent Celier  <celier@adacore.com>
1222
1223         * prj-env.ads, prj-env.adb (Create_Mapping_File (Language)): Remove
1224         parameter Runtime_Project.
1225
1226 2007-09-10  Ed Schonberg  <schonberg@adacore.com>
1227
1228         * sem_aggr.adb (Build_Record_Aggr_Code): If an aggregate component is
1229         given a box association, the type of the component is discriminated,
1230         and the value of the discriminant is the discriminant of the enclosing
1231         type, retrieve its value from the aggregate itself, where it must have
1232         been supplied.
1233
1234         * sem_ch4.adb (Analyze_One_Call): Further refinement to previous fix,
1235         to remove other spurious ambiguities on arithmetic operations involving
1236         literals and addresses, on systems where Address is a visible integer
1237         type, when the operator is called in functional notation.
1238         (Try_Primitive_Operation): Within an instance, a call in prefixed form
1239         is legal when the types match, even if the operation is currently
1240         hidden.
1241
1242 2007-09-10  Ed Schonberg  <schonberg@adacore.com>
1243
1244         * sem_ch12.adb (Build_Local_Package): A formal package with no
1245         associations is legal if all formals have defaults. It is not
1246         equivalent to a formal declared with a box.
1247
1248 2007-09-10  Sergey Rybin  <rybin@adacore.com>
1249
1250         * vms_data.ads: Add qualifier for the new gnatmetric '-lratio' option
1251
1252 2007-09-10  Sergey Rybin  <rybin@adacore.com>
1253
1254         * gnat_ugn.texi: Add description of the new '-lratio' option
1255         Update 7.3.1 section about availability of the feature.
1256
1257 2007-09-10  Thomas Quinot  <quinot@adacore.com>
1258
1259         * exp_smem.ads, exp_smem.adb (Make_Shared_Var_Procs): Return last
1260         inserted node.
1261
1262 2007-09-10  Olivier Hainque  <hainque@adacore.com>
1263
1264         * Makefile.in: (mips-irix section): Activate build of libgmem.
1265
1266 2007-09-10  Eric Botcazou  <ebotcazou@adacore.com>
1267
1268         * a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
1269         x87 registers.
1270
1271 2007-09-10  Eric Botcazou  <ebotcazou@adacore.com>
1272
1273         * decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
1274         a debug renaming declaration specially.
1275
1276 2007-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1277
1278         * decl.c (gnat_to_gnu_entity) <Object>: Simplify the condition under
1279         which a constant renaming is treated as a normal object declaration.
1280         * trans.c (lvalue_required_p) <N_Slice>: New case, extracted from
1281         the N_Indexed_Component case.
1282         <N_Indexed_Component>: Fall through to above case.
1283         <N_Object_Renaming_Declaration>: Return true for all composite types.
1284
1285 2007-09-08  Eric Botcazou  <ebotcazou@adacore.com>
1286
1287         * decl.c (make_packable_type): If the new type has been given BLKmode,
1288         try again to get an integral mode for it.
1289
1290 2007-09-07  Eric Botcazou  <ebotcazou@adacore.com>
1291
1292         Re-apply accidentally reverted change:
1293
1294         2007-02-07  Andreas Krebbel  <krebbel1@de.ibm.com>
1295
1296         * raise-gcc.c (get_region_description_for, get_call_site_action_for,
1297         get_action_description_for): Replace _Unwind_Word with _uleb128_t 
1298         and _Unwind_SWord with _sleb128_t.
1299
1300 2007-09-06  Eric Botcazou  <ebotcazou@adacore.com>
1301
1302         * trans.c (convert_with_check): Update call to real_2expN.
1303
1304 2007-09-05  Sandra Loosemore  <sandra@codesourcery.com>
1305
1306         * trans.c (Compilation_unit_to_gnu): Use set_cfun.
1307         * utils.c (end_subprog_body): Likewise.
1308
1309 2007-09-03  Nick Clifton  <nickc@redhat.com>
1310
1311         * Make-lang.in: Change copyright header to refer to version 3 of
1312         the GNU General Public License and to point readers at the
1313         COPYING3 file and the FSF's license web page.
1314         * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
1315         Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
1316         namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
1317         treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
1318         Likewise.
1319
1320 2007-08-31  Vincent Celier  <celier@adacore.com>
1321
1322         PR ada/4720
1323
1324         * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb, 
1325         gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
1326         (Check_Version_And_Help): New procedure in package Switch to process
1327         switches --version and --help.
1328         Use Check_Version_And_Help in GNAT tools
1329
1330         * make.adb:  Ditto.
1331         (Compile_Sources): Make sure that sources that are "excluded" are not
1332         compiled.
1333         (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
1334         project file is used.
1335         (Version_Switch): Remove, moved to Switch
1336         (Help_Switch): Remove, moved to Switch
1337         (Display_Version): Remove, moved to Switch
1338
1339         * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
1340         package Switch to process switches --version and --help.
1341         (Display_Version): New procedure
1342
1343         * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
1344
1345 2007-08-31  Javier Miranda  <miranda@adacore.com>
1346
1347         * a-tags.adb (Internal_Tag): Protect the run-time against wrong
1348         internal tags.
1349
1350 2007-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
1351
1352         * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
1353         (Mark_Non_Null): If the node for which we just generated an access check
1354         is a reference to an *in* parameter and the reference appears in the
1355         declarative part of a subprogram body, mark the node as known non null.
1356
1357 2007-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
1358
1359         * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
1360         structure of E_Exception to reflect the new flag.
1361         (Is_Raised, Set_Is_Raised): New inlined routines.
1362         Update the usage of available flag to reflect the addition of Is_Raised.
1363         (Is_Raised, Set_Is_Raised): Bodies of new routines.
1364         (Write_Entity_Flags): Write the status of flag Is_Raised.
1365         (Is_Descendent_Of_Address): New entity flag, to simplify handling of
1366         spurious ambiguities when integer literals appear in the context of an
1367         address type that is a visible integer type.
1368
1369         * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
1370         exceptions never being raised.
1371         (Analyze_Raise_Statement): When analyzing an exception, mark it as being
1372         explicitly raised.
1373
1374 2007-08-31  Javier Miranda  <miranda@adacore.com>
1375
1376         * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
1377         statement when compiling under restriction No_Exceptions_Proparation.
1378
1379 2007-08-31  Ed Schonberg  <schonberg@adacore.com>
1380
1381         * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
1382         initialization aggregate for the type, generate itype references for
1383         thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
1384
1385 2007-08-31  Gary Dismukes  <dismukes@adacore.com>
1386
1387         * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
1388         library-level package renaming, pass the declaration associated with
1389         the renaming's special debug variable to Qualify_Entity_Names to ensure
1390         that its encoded name is properly qualified.
1391
1392         * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
1393         occurring in the list of entities to qualify, and do not attempt to
1394         traverse an entity list in that case. Variables associated with
1395 `       library-level package renamings can now occur in the table.
1396
1397         * exp_dbug.ads: Revise documentation of the encoding for renaming
1398         declarations.
1399
1400 2007-08-31  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1401
1402         * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
1403         access type points to an unconstrained array.
1404
1405 2007-08-31  Hristian Kirtchev  <kirtchev@adacore.com>
1406
1407         * restrict.adb, namet.adb, par-util.adb: Remove redundant type
1408         conversion.
1409
1410         * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
1411         simple redundant qualifications. The check is performed whenever the
1412         expression is a non-overloaded identifier.
1413         (Resolve_Type_Conversion): Enchance the redundant type conversion check
1414         to include loop parameters.
1415         (Valid_Conversion): Avoid generation of spurious error message.
1416
1417 2007-08-31  Bob Duff  <duff@adacore.com>
1418
1419         * par-ch4.adb (P_Simple_Expression): Fold long sequences of
1420         concatenations of string literals into a single literal, in order to
1421         avoid very deep recursion in the front end, which was causing stack
1422         overflow.
1423
1424         * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
1425         string, and the right operand is a string literal (the case of "" &
1426         "..."), optimize by avoiding copying the right operand -- just use the
1427         value of the right operand directly.
1428
1429         * stringt.adb (Store_String_Chars): Optimize by growing the
1430         String_Chars table all at once, rather than appending characters one by
1431         one.
1432         (Write_String_Table_Entry): If the string to be printed is very long,
1433         just print the first few characters, followed by the length. Otherwise,
1434         doing "pn(n)" in the debugger can take an extremely long time.
1435
1436         * sem_prag.adb (Process_Interface_Name): Replace loop doing
1437         Store_String_Char with Store_String_Chars.
1438
1439 2007-08-31  Vincent Celier  <celier@adacore.com>
1440
1441         * prj-attr.adb: Add new attribute Excluded_Source_Files
1442
1443         * prj-nmsc.adb: Use attribute Excluded_Source_Files before
1444         Locally_Removed_Files.
1445
1446         * snames.ads, snames.adb: New standard name Excluded_Source_Files
1447
1448 2007-08-31  Ed Schonberg  <schonberg@adacore.com>
1449
1450         * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
1451         clauses of subunits, ignore limited_with_clauses that are illegal and
1452         have not been fully analyzed.
1453
1454 2007-08-31  Ed Schonberg  <schonberg@adacore.com>
1455
1456         * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
1457         flag, for effiency. It is called when analyzing arithmetic operators
1458         and also for actuals in calls that are universal_integers. The flag is
1459         set for the predefined type address, and for any type or subtype
1460         derived from it.
1461
1462         * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
1463         Universal_Integer, when the formal is a descendent of address and the
1464         call appears in user code.
1465         (Analyze_Selected_Component): if the prefix is a private extension, the
1466         tag component is visible.
1467
1468         * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
1469         entity flag.
1470
1471 2007-08-31  Robert Dewar  <dewar@adacore.com>
1472
1473         * s-fileio.adb (Open): Normalize file name to lower case in non-case
1474         sensitive file name systems to avoid unexpected mismatch in Vista.
1475
1476 2007-08-31  Vincent Celier  <celier@adacore.com>
1477
1478         * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
1479
1480 2007-08-31  Vincent Celier  <celier@adacore.com>
1481
1482         * symbols-vms.adb (Initialize): Read symbol files with continuation
1483         lines
1484         (Finalize): If symbol is long, split the line
1485
1486 2007-08-31  Vincent Celier  <celier@adacore.com>
1487
1488         * fmap.ads: Minor comment updates
1489
1490 2007-08-31  GNAT Script  <nobody@adacore.com>
1491
1492         * Make-lang.in: Makefile automatically updated
1493
1494 2007-08-31  Bob Duff  <duff@adacore.com>
1495
1496         * sinfo.ads: Minor comment fix.
1497
1498 2007-08-31  Thomas Quinot  <quinot@adacore.com>
1499
1500         * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
1501         with implementation.
1502         Documentation cleanup only.
1503
1504 2007-08-31  Sergey Rybin  <rybin@adacore.com>
1505
1506         * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
1507         gnatpp '--separate-stmt-name' option.
1508         Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
1509         option.
1510
1511         * gnat_ugn.texi: Add description for the new gnatpp
1512         '--separate-stmt-name' and '--use-on-new-line' options.
1513
1514 2007-08-31  Ben Elliston  <bje@au.ibm.com>
1515
1516         * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
1517         when compiling for powerpc64-*-linux.
1518         * system-linux-ppc64.ads: New file.
1519
1520 2007-08-22  Krister Walfridsson  <cato@df.lth.se>
1521
1522         * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
1523         NetBSD.
1524
1525 2007-08-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1526
1527         * misc.c (gnat_type_max_size): Constify.
1528
1529 2007-08-16  Gary Dismukes  <dismukes@adacore.com>
1530
1531         * cstand.adb (Create_Standard): Create an entity for a zero-sized type
1532         associated with Standard_Debug_Renaming_Type, to be used as the type of
1533         the special variables whose names provide debugger encodings for
1534         renaming declarations.
1535
1536         * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
1537         (Set_Debug_Renaming_Link): Change to set Node25.
1538         (Write_Field13_Name): Remove case for E_Enumeration_Literal.
1539         (Write_Field25_Name): Add case for E_Variable to output
1540         "Debug_Renaming_Link".
1541         (Write_Field23_Name): Correct the output string for "Limited_View".
1542
1543         * exp_dbug.adb: Add with and use of Tbuild.
1544         (Debug_Renaming_Declaration): Replace creation of an enumeration type
1545         and literal with creation of a variable of type
1546         Standard_Debug_Renaming_Type whose name encodes both the renamed object
1547         and the entity of the renaming declaration.
1548         (Qualify_Entity_Name): Add the delayed qualification of the entity name
1549         part of the name of a variable that has a Debug_Renaming_Link.
1550
1551         * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
1552         special type to be associated with variables that provide debugger
1553         encodings for renaming declarations.
1554
1555 2007-08-16  Gary Dismukes  <dismukes@adacore.com>
1556             Ed Schonberg  <schonberg@adacore.com>
1557             Javier Miranda  <miranda@adacore.com>
1558
1559         * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
1560         ancestor part given by an aggregate to test for an unchecked conversion,
1561         since this can occur in some cases when the ancestor part is a function
1562         call, and we don't want to fall into the recursive call to this
1563         procedure in that case.
1564
1565         * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
1566         stream attributes on limited types to account for user-specified
1567         attributes as well as whether Input (resp. Output) becomes available
1568         due to Read (resp. Write) being available for the type. Change Boolean
1569         variable to the more accurate name
1570         Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
1571         double-"not" predicate at beginning of return statement to more
1572         understandable form.
1573
1574         * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
1575         return has an associated N_Handled_Sequence_Of_Statements, then wrap it
1576         in a block statement and use that as the first statement of the
1577         expanded return rather than incorrectly using the handled sequence as
1578         the first statement.
1579
1580         * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
1581         operation, generate an explicit freeze node for it rather than
1582         generating extra formals, to ensure that gigi has the proper order of
1583         elaboration for anonymous subtypes in the signature of the subprograms.
1584         (Build_In_Place_Formal): Move assertion to beginning of loop.
1585         (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
1586         applied to a function call (occurs for some cases of 'Input).
1587         (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
1588         applied to a function call (occurs for some cases of 'Input).
1589
1590         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
1591         2005, generate an extended return statement enclosing the result object
1592         and 'Read call.
1593
1594         * freeze.adb (Freeze_Record_Type): Extend the current management of
1595         components that are access type with an allocator as default value: add
1596         missing support to the use of qualified expressions of the
1597         allocator (which also cause freezing of the designated type!)
1598         (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
1599         dispatching operation, since extra formals may be needed by calls to
1600         build-in-place functions (such as stream 'Input).
1601
1602         * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
1603         formals for 'Constrained and accessibility level in the case of a
1604         predefined dispatching operation.
1605
1606         * exp_util.adb (Insert_Actions): A protected body is a valid insertion
1607         point, no need to find the parent node.
1608
1609 2007-08-16  Javier Miranda  <miranda@adacore.com>
1610
1611         * exp_attr.adb (Attribute_Priority): Add missing support for entries
1612         and entry barriers.
1613
1614 2007-08-16  Javier Miranda  <miranda@adacore.com>
1615
1616         * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
1617         is not really required and can introduce regression with the debugger.
1618         The original problem is fixed with the patch written for checks.adb.
1619
1620 2007-08-16  Thomas Quinot  <quinot@adacore.com>
1621
1622         * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
1623         Range_Check on Allocated_Table.
1624
1625 2007-08-16  Vincent Celier  <celier@adacore.com>
1626
1627         * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
1628         Including_Non_Switch set to False.
1629         (Gnatmake): For the compiler, call Test_If_Relative_Path with
1630         Including_Non_Switch set to False.
1631
1632         * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
1633         parameter Including_Non_Switch, defaulted to True. When
1634         Including_Non_Switch is False, options that are not switches and
1635         appear as relative path are not converted to absolute paths.
1636
1637 2007-08-16  Nicolas Roche  <roche@adacore.com>
1638
1639         * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
1640         makefiles
1641
1642         * Make-lang.in: Update dependencies
1643
1644 2007-08-16  Hristian Kirtchev  <kirtchev@adacore.com>
1645
1646         * sem_ch10.adb (Has_With_Clause): If the name of the with clause
1647         currently inspected is a selected component, retrieve the entity of
1648         its selector.
1649         (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
1650         from the immediate ancestor of Main_Unit_Entity.
1651         (Install_Limited_Withed_Unit): Do not install the limited view of
1652         package P if P is reachable through an ancestor chain from package C
1653         and C also has a with clause for P in its body.
1654         (Has_Limited_With_Clause): New routine.
1655         (Has_With_Clause): New routine.
1656
1657 2007-08-16  Ed Schonberg  <schonberg@adacore.com>
1658
1659         * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
1660         generic for an enclosing instance is a global reference, even though
1661         its scope is the enclosing instance.
1662
1663 2007-08-16  Gary Dismukes  <dismukes@adacore.com>
1664             Javier Miranda  <miranda@adacore.com>
1665
1666         * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
1667         initialize a limited object.
1668         (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
1669         13/2 and 14/2.
1670         Make sure Has_Complex_Representation is inherited by derived type.
1671
1672 2007-08-16  Robert Dewar  <dewar@adacore.com>
1673
1674         * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
1675         exception case
1676
1677 2007-08-16  Ed Schonberg  <schonberg@adacore.com>
1678
1679         * sem_disp.adb (Check_Dispatching_Operation): If the operation
1680         implements an operation inherited from a progenitor interface, verify
1681         that they are subtype-conformant.
1682
1683 2007-08-16  Hristian Kirtchev  <kirtchev@adacore.com>
1684             Bob Duff  <duff@adacore.com>
1685             Nicolas Setton  <setton@adacore.com>
1686
1687         * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
1688         (Resolve): Alphabetize local variables. Add new variable From_Lib. When
1689         the statement which is being resolved comes from a predefined library
1690         unit, all non-predefined library interpretations are skipped.
1691         (Resolve_Op_Concat): If string concatenation was folded in the parser,
1692         but the "&" is user defined, give an error, because the folding would
1693         be wrong.
1694
1695         * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
1696         the parser has folded a long sequence of concatenations of string
1697         literals.
1698
1699         * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
1700         and "JMP_BUF" variables as artificial.
1701         (N_String_Literal): Do not use alloca for very long string literals. Use
1702         xmalloc/free instead. Otherwise the stack might overflow.
1703
1704         * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
1705         compiler.
1706
1707 2007-08-16  Vincent Celier  <celier@adacore.com>
1708
1709         * vms_conv.adb (Process_Argument): Ensure that project related options
1710         are not put in the -cargs section when using GNAT COMPILE.
1711
1712 2007-08-16  Robert Dewar  <dewar@adacore.com>
1713
1714         * gnat_ugn.texi: Add note on preprocessing (output file not written)
1715
1716 2007-08-16  Thomas Quinot  <quinot@adacore.com>
1717
1718         * a-tags.adb: Minor reformatting.
1719
1720 2007-08-16  Bob Duff  <duff@adacore.com>
1721
1722         * sem_type.ads, sem_ch4.adb: Minor reformatting.
1723
1724 2007-08-14  Thomas Quinot  <quinot@adacore.com>
1725
1726         * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads, 
1727         s-osinte-interix.ads, system-interix.ads: Removed.
1728
1729 2007-08-14  Hristian Kirtchev  <kirtchev@adacore.com>
1730
1731         * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
1732         calls to Check_Within_Time_Bounds.
1733         ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
1734         (Difference): Account for possible rounding of the resulting difference
1735
1736 2007-08-14  Robert Dewar  <dewar@adacore.com>
1737
1738         * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
1739         par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
1740         s-osinte-solaris.adb, s-osinte-solaris.ads,
1741         s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
1742
1743         * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
1744         switch -gnatyS. Enable -gnatyS in GNAT style check mode
1745
1746 2007-08-14  Robert Dewar  <dewar@adacore.com>
1747             Ed Schonberg  <schonberg@adacore.com>
1748
1749         * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads: 
1750         Suppress unmodified in-out parameter warning in some cases
1751         This patch is a also fairly significant change to the way suppressible
1752         checks are handled.
1753
1754         * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
1755         needed for access to concurrent record types generated by the expander.
1756         (Generate_Range_Check): When generating a temporary to capture the
1757         value of a conversion that requires a range check, set the type of the
1758         temporary before rewriting the node, so that the type is always
1759         properly placed for back-end use.
1760         (Apply_Float_Conversion_Check): Handle case where the conversion is
1761         truncating.
1762         (Get_Discriminal): Code reformatting. Climb the scope stack looking
1763         for a protected type in order to examine its discriminants.
1764
1765 2007-08-14  Robert Dewar  <dewar@adacore.com>
1766             Gary Dismukes  <dismukes@adacore.com>
1767             Ed Schonberg  <schonberg@adacore.com>
1768             Thomas Quinot  <quinot@adacore.com>
1769
1770         * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb, 
1771         a-stwisu.adb, a-strsup.adb: Fix warnings for range
1772         tests optimized out.
1773
1774         * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
1775         (Get_Allocator_Final_List): For the case of an anonymous access type
1776         that has a specified Associated_Final_Chain, do not go up to the
1777         enclosing scope.
1778         (Expand_N_Type_Conversion): Test for the case of renamings of access
1779         parameters when deciding whether to apply a run-time accessibility
1780         check.
1781         (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
1782         aggregate code before allocator, and ahead of declaration for
1783         temporary, to prevent access before elaboration when the allocator is
1784         an actual for an access parameter.
1785         (Expand_N_Type_Conversion): On an access type conversion involving an
1786         access parameter, do not apply an accessibility check when the
1787         operand's original node was an attribute other than 'Access. We now
1788         create access conversions for the expansion of 'Unchecked_Access and
1789         'Unrestricted_Access in certain cases and clearly accessibility should
1790         not be checked for those.
1791
1792         * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
1793         includes a type conversion of a packed component that has been expanded,
1794         recover the original expression for the object, and use this expression
1795         in the post-call assignment statement, so that the assignment is made
1796         to the object and not to a back-end temporary.
1797         (Freeze_Subprogram): In case of primitives of tagged types not defined
1798         at the library level force generation of code to register the primitive
1799         in the dispatch table. In addition some code reorganization has been
1800         done to leave the implementation clear.
1801         (Expand_Call): When expanding an inherited implicit conversion,
1802         preserve the type of the inherited function after the intrinsic
1803         operation has been expanded.
1804
1805         * exp_ch2.ads, exp_ch2.adb
1806         (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
1807         of an entry formal appearing in an assignment statement does not assign
1808         to the formal.
1809         (Expand_Current_Value): Instead of calling a routine to determine
1810         whether the prefix of an attribute reference should be optimized or
1811         not, prevent the optimization of such prefixes all together.
1812
1813         * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
1814         component whose prefix is known to be of an access type is an implicit
1815         dereference and does not assign to the prefix.
1816
1817 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
1818             Robert Dewar  <dewar@adacore.com>
1819
1820         * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
1821         itype is visited, make an entry into table to link associated node and
1822         new itype.
1823         Add comments and correct harmless error in Build_NCT_Hash_Tables
1824         (Array_Aggr_Subtype): Associate each itype created for an index type to
1825         the corresponding range construct, and not to the aggregate itself. to
1826         maintain a one-to-one correspondence between itype and its associated
1827         node, to prevent errors when complex expression is copied.
1828         Fix mishandling of multiple levels of parens
1829
1830         * sem_aggr.adb: Create a limited view of an incomplete type, to make
1831         treatment of limited views uniform for all visible declarations in a
1832         limited_withed package.
1833         (New_Copy_Tree): If hash table is being used and itype is visited,
1834         make an entry into table to link associated node and new itype.
1835         (Resolve_Record_Aggregate): Do not add an others box association for a
1836         discriminated record component that has only discriminants, when there
1837         is a box association for the component itself.
1838
1839         * par-ch4.adb: Fix mishandling of multiple levels of parens
1840
1841 2007-08-14  Robert Dewar  <dewar@adacore.com>
1842
1843         * comperr.adb: Fix problem with suppressing warning messages from gigi
1844
1845         * erroutc.ads, erroutc.adb, errout.ads, 
1846         errout.adb (Write_Eol): Remove trailing spaces before writing the line
1847         (Write_Eol_Keep_Blanks): New procedure to write a line, including
1848         possible trailing spaces.
1849         (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
1850         Fix problem with suppressing warning messages from back end
1851         Improve handling of deleted warnings
1852
1853         * gnat1drv.adb: 
1854         Fix problem with suppressing warning messages from back end
1855         Handle setting of Static_Dispatch_Tables flag.
1856
1857         * prepcomp.adb: 
1858         Fix problem with suppressing warning messages from back end
1859
1860         * exp_intr.adb: Improve handling of deleted warnings
1861
1862 2007-08-14  Robert Dewar  <dewar@adacore.com>
1863
1864         * debug.adb: Improve -gnatdI to cover all cases of serialization
1865         Add documentation of dZ, d.t
1866
1867         * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
1868         serialization.
1869         (Sprint_Node_Actual): Generate new output associated with implicit
1870         importation and implicit exportation of object declarations.
1871
1872 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
1873             Robert Dewar  <dewar@adacore.com>
1874             Javier Miranda  <miranda@adacore.com>
1875             Gary Dismukes  <dismukes@adacore.com>
1876
1877         * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
1878         to make treatment of limited views uniform for all visible declarations
1879         in a limited_withed package.
1880         Improve warnings for in out parameters
1881         (Set_Related_Interaface/Related_Interface): Allow the use of this
1882         attribute with constants.
1883         (Write_Field26_Name): Handle attribute Related_Interface in constants.
1884         Warn on duplicate pragma Preelaborable_Initialialization
1885
1886         * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
1887         generation of a freezing node to ensure proper management of null
1888         excluding access types in the backend.
1889         (Create_Extra_Formals): Test base type of the formal when checking for
1890         the need to add an extra accessibility-level formal. Pass the entity E
1891         on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
1892         originally being done in a couple of cases), to ensure that the
1893         Extra_Formals list gets set on the entity E when the first entity is
1894         added.
1895         (Conforming_Types): Add missing calls to Base_Type to the code that
1896         handles anonymous access types. This is required to handle the
1897         general case because Process_Formals builds internal subtype entities
1898         to handle null-excluding access types.
1899         (Make_Controlling_Function_Wrappers): Create wrappers for constructor
1900         functions that need it, even when not marked Requires_Overriding.
1901         Improve warnings for in out parameters
1902         (Analyze_Function_Return): Warn for disallowed null return
1903         Warn on return from procedure with unset out parameter
1904         Ensure consistent use of # in error messages
1905         (Check_Overriding_Indicator): Add in parameter Is_Primitive.
1906         (Analyze_Function_Return): Move call to Apply_Constraint_Check before
1907         the implicit conversion of the expression done for anonymous access
1908         types. This is required to generate the code of the null excluding
1909         check (if required).
1910
1911         * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
1912         A formal parameter is never publicly referenceable outside of its body.
1913         (Check_References): For an unreferenced formal parameter in an accept
1914         statement, use the same warning circuitry as for subprogram formal
1915         parameters.
1916         (Warn_On_Unreferenced_Entity): New subprogram, taken from
1917         Output_Unreferenced_Messages, containing the part of that routine that
1918         is now reused for entry formals as described above.
1919         (Goto_Spec_Entity): New function
1920         (Check_References): Do not give IN OUT warning for dispatching operation
1921         Improve warnings for in out parameters
1922         (Test_Ref): Check that the entity is not undefinite before calling
1923         Scope_Within, in order to avoid infinite loops.
1924         Warn on return from procedure with unset out parameter
1925         Improved warnings for unused variables
1926
1927 2007-08-14  Robert Dewar  <dewar@adacore.com>
1928             Javier Miranda  <miranda@adacore.com>
1929             Gary Dismukes  <dismukes@adacore.com>
1930
1931         * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
1932         (Expand_N_Attribute_Reference): Further unify the handling of the
1933         three forms of access attributes, using common code now for all three
1934         cases. Add a test for the case of applying an access attribute to
1935         an explicit dereference when the context is an access-to-interface
1936         type. In that case we need to apply the conversion to the prefix
1937         of the explicit dereference rather than the prefix of the attribute.
1938         (Attribute_Version, UET_Address): Set entity as internal to ensure
1939         proper dg output of implicit importation.
1940         (Expand_Access_To_Type): Removed.
1941         (Expand_N_Attribute_Reference): Merge the code from the three cases
1942         of access attributes, since the processing is largely identical for
1943         these cases. The substantive fix here is to process the case of a
1944         type name prefix (current instance case) before handling the case
1945         of interface prefixes.
1946
1947 2007-08-14  Thomas Quinot  <quinot@adacore.com>
1948             Ed Schonberg  <schonberg@adacore.com>
1949             Javier Miranda  <miranda@adacore.com>
1950             Robert Dewar  <dewar@adacore.com>
1951
1952         * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
1953         (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
1954         type that is an anonymous access to controlled object, establish
1955         an associated finalization chain to avoid corrupting the global
1956         finalization list when a dynamically allocated object designated
1957         by such a component is deallocated.
1958         (Make_Controlling_Function_Wrappers): Create wrappers for constructor
1959         functions that need it, even when not marked Requires_Overriding.
1960         (Initialize_Tag): Replace call to has_discriminants by call to
1961         Is_Variable_Size_Record in the circuitry that handles the
1962         initialization of secondary tags.
1963         (Is_Variable_Size_Record): New implementation.
1964         (Expand_N_Object_Declaration): Suppress call to init proc if there is a
1965         Suppress_Initialization pragma for a derived type.
1966         (Is_Variable_Size_Record): New subprogram.
1967         (Build_Offset_To_Top_Functions): New implementation that simplifies the
1968         initial version of this routine and also fixes problems causing
1969         incomplete initialization of the table of interfaces.
1970         (Build_Init_Procedure): Improve the generation of code to initialize the
1971         the tag components of secondary dispatch tables.
1972         (Init_Secondary_Tags): New implementation that simplifies the previous
1973         version of this routine.
1974         (Make_DT): Add parameter to indicate when type has been frozen by an
1975         object declaration, for diagnostic purposes.
1976         (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
1977         diagnose attemps to freeze a subprogram when some untagged type of its
1978         profile is a private type whose full view has not been analyzed yet.
1979         (Freeze_Array_Type): Generate init proc for packed array if either
1980         Initialize or Normalize_Scalars is set.
1981         (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
1982         constructing the new profile, copy the null_exclusion indicator for each
1983         parameter, to ensure full conformance of the new body with the spec.
1984
1985         * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
1986         Create wrappers for constructor functions that need it, even when not
1987         marked Requires_Overriding.
1988         (Covers): Handle properly designated types of anonymous access types,
1989         whose non-limited views are themselves incomplete types.
1990         (Add_Entry): Use an entity to store the abstract operation which hides
1991         an interpretation.
1992         (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
1993         (Collect_Interps): Use Empty as an actual for Abstract_Op in the
1994         initialization aggregate.
1995         (Function_Interp_May_Be_Hidden): Rename to
1996         Function_Interp_Has_Abstract_Op.
1997         (Has_Compatible_Type): Remove machinery that skips interpretations if
1998         they are labeled as potentially hidden by an abstract operator.
1999         (Has_Hidden_Interp): Rename to Has_Abstract_Op.
2000         (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
2001         (Write_Overloads): Output the abstract operator if present.
2002         (Add_Entry): Before inserting a new entry into the interpretation table
2003         for a node, determine whether the entry will be disabled by an abstract
2004         operator.
2005         (Binary_Op_Interp_May_Be_Hidden): New routine.
2006         (Collect_Interps): Add value for flag May_Be_Hidden in initialization
2007         aggregate.
2008         (Function_Interp_May_Be_Hidden): New routine.
2009         (Has_Compatible_Type): Do not consider interpretations hidden by
2010         abstract operators when trying to determine whether two types are
2011         compatible.
2012         (Has_Hidden_Interp): New routine.
2013         (Set_May_Be_Hidden_Interp): New routine.
2014         (Write_Overloads): Write the status of flag May_Be_Hidden.
2015
2016 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2017             Javier Miranda  <miranda@adacore.com>
2018
2019         * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
2020         types declared in the declarative part of a nested package body or in
2021         the proper body of a stub.
2022         (Set_All_DT_Position): Add missing check to avoid wrong assignation
2023         of the same dispatch table slot to renamed primitives.
2024         (Make_Select_Specific_Data_Table): Handle private types.
2025         (Tagged_Kind): Handle private types.
2026         (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
2027         output of implicit importation and exportation.
2028         (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
2029         first formal of the thunk is always associated with the controlling
2030         type. In addition perform the following code cleanup: remove formal
2031         Thunk_Alias which is no longer required, cleanup evaluation of the
2032         the controlling type, and update the documentation.
2033         Replace occurrence of Default_Prim_Op_Count by
2034         Max_Predef_Prims. Addition of compile-time check to verify
2035         that the value of Max_Predef_Prims is correct.
2036         (Check_Premature_Freezing): Apply check in Ada95 mode as well.
2037         (Make_DT): Add parameter to indicate when type has been frozen by an
2038         object declaration, for diagnostic purposes.
2039         (Build_Static_Dispatch_Tables): New subprogram that takes care of the
2040         construction of statically allocated dispatch tables.
2041         (Make_DT): In case of library-level tagged types export the declaration
2042         of the primary tag. Remove generation of tags (now done by Make_Tags).
2043         Additional modifications to handle non-static generation of dispatch
2044         tables. Take care of building tables for asynchronous interface types
2045         (Make_Tags): New subprogram that generates the entities associated with
2046         the primary and secondary tags of Typ and fills the contents of Access_
2047         Disp_Table. In case of library-level tagged types imports the forward
2048         declaration of the primary tag that will be declared later by Make_DT.
2049         (Expand_Interface_Conversion): In case of access types to interfaces
2050         replace an itype declaration by an explicit type declaration to avoid
2051         problems associated with the scope of such itype in transient blocks.
2052
2053 2007-08-14  Robert Dewar  <dewar@adacore.com>
2054             Ed Schonberg  <schonberg@adacore.com>
2055             Javier Miranda  <miranda@adacore.com>
2056
2057         * exp_util.ads, exp_util.adb: 
2058         This patch replaces a number of occurrences of explicit tests for N_Null
2059         with calls to Known_Null. This improves tracking of null values, since
2060         Known_Null also catches null constants, and variables currently known to
2061         be null, so we get better tracking.
2062         (Ensure_Defined): create an itype reference only in the scope of the
2063         itype.
2064         (Side_Effect_Free): A selected component of an access type that
2065         denotes a component with a rep clause must be treated as not
2066         side-effect free, because if it is part of a linked structure its
2067         value may be affected by a renaming.
2068         (Expand_Subtype_From_Expr): For limited objects initialized with build
2069         in place function calls, do nothing; otherwise we prematurely introduce
2070         an N_Reference node in the expression initializing the object, which
2071         breaks the circuitry that detects and adds the additional arguments to
2072         the called function. Bug found working in the new patch for statically
2073         allocated dispatch tables.
2074         (Is_Library_Level_Tagged_Type): New subprogram.
2075         (Remove_Side_Effects): If the expression of an elementary type is an
2076         operator treat as a function call.
2077         (Make_Literal_Range): If the index type of the array is not integer, use
2078         attributes properly to compute the constraint on the resulting aggregate
2079         which is a string.
2080
2081         * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
2082         class-wide type whose base type is an incomplete private type, leave
2083         class-wide type unfrozen so that freeze nodes can be generated
2084         properly at a later point.
2085         (Freeze_Entity, array case): Handle case of pragma Pack and component
2086         size attributre clause for same array.
2087
2088 2007-08-14  Vincent Celier  <celier@adacore.com>
2089
2090         * prj.ads, prj.adb: Update Project Manager to new attribute names for
2091         gprbuild.
2092         Allow all valid declarations in configuration project files
2093         (Reset): Initialize all tables and hash tables in the project tree data
2094         Major update of the Project Manager and of the project aware tools,
2095         including gprmake, so that the same sources in the GNAT repository
2096         can be used by gprbuild.
2097         (Slash_Id): Change type to be Path_Name_Type
2098         (Slash): Return a Path_Name_Type instead of a File_Name_Type
2099
2100         * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
2101         gprbuild.
2102         Update Project Manager to new attribute names for ghprbuild
2103         Allow all valid declarations in configuration project files
2104         Major update of the Project Manager and of the project aware tools,
2105         including gprmake, so that the same sources in the GNAT repository
2106         can be used by gprbuild.
2107
2108         * prj-com.ads: 
2109         Major update of the Project Manager and of the project aware tools,
2110         including gprmake, so that the same sources in the GNAT repository
2111         can be used by gprbuild.
2112
2113         * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
2114         insensitive flag for attributes with optional index.
2115         (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
2116         array attribute, put the index in lower case.
2117         Update Project Manager to new attribute names for ghprbuild
2118         Allow all valid declarations in configuration project files
2119         Major update of the Project Manager and of the project aware tools,
2120         including gprmake, so that the same sources in the GNAT repository
2121         can be used by gprbuild.
2122
2123         * prj-env.ads, prj-env.adb: 
2124         Major update of the Project Manager and of the project aware tools,
2125         including gprmake, so that the same sources in the GNAT repository
2126         can be used by gprbuild.
2127         (Get_Reference): Change type of parameter Path to Path_Name_Type
2128
2129         * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
2130         removing '-' from the path to start with the first character of the
2131         next directory.
2132         Major update of the Project Manager and of the project aware tools,
2133         including gprmake, so that the same sources in the GNAT repository
2134         can be used by gprbuild.
2135         Major update of the Project Manager and of the project aware tools,
2136         including gprmake, so that the same sources in the GNAT repository
2137         can be used by gprbuild.
2138
2139         * prj-nmsc.ads, prj-nmsc.adb: 
2140         Update Project Manager to new attribute names for ghprbuild
2141         Allow all valid declarations in configuration project files
2142         (Search_Directories): Detect subunits that are specified with an
2143         attribute Body in package Naming. Do not replace a source/unit in the
2144         same project when the order of the source dirs are known. Detect
2145         duplicate sources/units in the same project when the order of the
2146         source dirs are not known.
2147         (Check_Ada_Name): Allow all identifiers that are not reserved words
2148         in Ada 95.
2149         Major update of the Project Manager and of the project aware tools,
2150         including gprmake, so that the same sources in the GNAT repository
2151         can be used by gprbuild.
2152         (Look_For_Sources): If the list of sources is empty, set the object
2153         directory of non extending project to nil.
2154         Change type of path name variables to be Path_Name_Type
2155         (Locate_Directory): Make sure that on Windows '/' is converted to '\',
2156         otherwise creating missing directories will fail.
2157
2158         * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb, 
2159         prj-part.ads, prj-part.adb:
2160         Major update of the Project Manager and of the project aware tools,
2161         including gprmake, so that the same sources in the GNAT repository
2162         can be used by gprbuild.
2163
2164         * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
2165         insensitive flag for attributes with optional index.
2166         (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
2167         array attribute, put the index in lower case.
2168         (Parse_Variable_Reference): Allow the current project name to be used in
2169         the prefix of an attribute reference.
2170
2171         * prj-util.ads, prj-util.adb
2172         (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
2173         defaulted to False. When True, always check against indexes in lower
2174         case.
2175
2176         * snames.ads, snames.h, snames.adb: 
2177         Update Project Manager to new attribute names for gprbuild
2178         Allow all valid declarations in configuration project files
2179
2180 2007-08-14  Robert Dewar  <dewar@adacore.com>
2181             Ed Schonberg  <schonberg@adacore.com>
2182
2183         * opt.ads: Warning for non-local exception propagation now off by
2184         default
2185         New switch -gnatI to disable representation clauses
2186         Implement new pragma Implicit_Packing
2187
2188         * usage.adb: 
2189         Warning for non-local exception propagation now off by default
2190         Add warning for unchecked conversion of pointers wi different
2191         conventions.
2192         New switch -gnatI to disable representation clauses
2193
2194         * usage.adb: new switch -gnatyS
2195
2196         * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
2197         note that aggregates of anonymous array types are not flagged.
2198         -gnatwc now includes membership tests optimized away
2199         -gnatw.x warnings are now off by default
2200         Added conditional compilation Appendix
2201         Add documentation of -gnatI
2202         Add documentation for new -gnatyS style check
2203         Update documentation about SAL and auto-init on Windows.
2204
2205         * gnat_rm.texi: 
2206         Add documentation for pragma Check_Name and 'Enabled attribute
2207         Document that Eliminate on dispatching operation is ignored
2208         Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
2209         Document pragma Main
2210         Document pragma Implicit_Packing
2211
2212         * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
2213         different conventions
2214         New switch -gnatI to disable representation clauses
2215
2216         * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
2217         recognized, report the invalid characters including "-gnat" instead of
2218         just the first character in the switch.
2219         New switch -gnatI to disable representation clauses
2220         Set Warn_On_Object_Renames_Function true for -gnatg
2221
2222         * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
2223         Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
2224         Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
2225         to switch -aP (add directory to project search dir).
2226
2227         * par-prag.adb: Implement new pragma Implicit_Packing
2228
2229         * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
2230         type as having a non-standard representation, to force expansion on
2231         conversion to related types.
2232         (Analyze_Pragma): Warn on misspelled pragma
2233         (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
2234         Ensure consistent use of # in error messages
2235         Implement pragma Implicit_Packing
2236
2237 2007-08-14  Olivier Hainque  <hainque@adacore.com>
2238             Eric Botcazou  <ebotcazou@adacore.com>
2239
2240         * targtyps.c (get_target_maximum_default_alignment): New function.
2241         Maximum alignment
2242         that the compiler might choose by default for a type or object.
2243         (get_target_default_allocator_alignment): New function. Alignment known
2244         to be honored by the target default allocator.
2245         (get_target_maximum_allowed_alignment): New function. Maximum alignment
2246         we might accept for any type or object on the target.
2247         (get_target_maximum_alignment): Now synonym of maximum_default_alignment
2248
2249         * gigi.h (get_target_maximum_default_alignment): Declare new function.
2250         (get_target_default_allocator_alignment): Likewise.
2251         (get_target_maximum_allowed_alignment): Likewise.
2252
2253         PR ada/19037
2254         * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
2255         result of a function call, first try to use a stabilized reference for
2256         a constant renaming too.
2257         (validate_alignment): Use target_maximum_allowed_alignment instead of
2258         MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
2259         (gnat_to_gnu_entity): Use common nodes directly.
2260         (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
2261         alignment and size for the object.
2262         (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
2263         and N_Procedure_Call_Statement.
2264         (takes_address): Rename to lvalue_required_p, add third parameter
2265         'aliased' and adjust recursive calls.
2266         <N_Indexed_Component>: Update 'aliased' from the array type.
2267         <N_Selected_Component>: New case.
2268         <N_Object_Renaming_Declaration>: New Likewise.
2269         (Identifier_to_gnu): Adjust for above changes.
2270         (maybe_stabilize_reference) <CONST_DECL>: New case.
2271
2272         * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
2273         between type variants.
2274         (build_simple_component_ref): Likewise.
2275         (build_call_alloc_dealloc): Use target_default_allocator_alignment
2276         instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
2277         aligning type circuitry for allocations from the default storage pool.
2278         (build_allocator): Likewise.
2279         (build_simple_component_ref): Manually fold the reference for a
2280         constructor if the record type contains a template.
2281
2282         * utils.c (value_zerop): Delete.
2283         (gnat_init_decl_processing): Emit debug info for common types.
2284         (rest_of_record_type_compilation): If a union contains a field
2285         with a non-constant qualifier, treat it as variable-sized.
2286         (finish_record_type): Give the stub TYPE_DECL a name.
2287         (rest_of_record_type_compilation): Likewise.
2288         (convert) <CONSTRUCTOR>: New case.  Build a new constructor if
2289         types are equivalent array types.
2290         (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
2291         even if the type is not passed by reference.
2292         (static_ctors, static_dtors): Delete.
2293         (end_subprog_body): Do not record constructors and destructors.
2294         (build_global_cdtor): Delete.
2295         (gnat_write_global_declarations): Do not call build_global_cdtor.
2296
2297         * lang-spARGET_VXWORKS_RTP is defined, append -mrtp when
2298         -fRTS=rtp is specified.
2299         If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
2300         specified.
2301
2302         * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
2303         of the personality function with SJLJ exceptions.
2304
2305         * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
2306         the name of the personality function with SJLJ exceptions.
2307
2308 2007-08-14  Robert Dewar  <dewar@adacore.com>
2309             Ed Schonberg  <schonberg@adacore.com>
2310
2311         * par.ads, par.adb: Improve handling of extra right parens.
2312         (Par): Remove flag From_Limited_With_Clause.
2313
2314         * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
2315         Improve handling of extra right parens.
2316
2317 2007-08-14  Robert Dewar  <dewar@adacore.com>
2318
2319         * par-tchk.adb (TF_Semicolon): Improve error recovery
2320
2321 2007-08-14  Robert Dewar  <dewar@adacore.com>
2322             Ed Schonberg  <schonberg@adacore.com>
2323
2324         * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
2325         enumeration type, mark all literals as referenced.
2326         (Eval_Attribute, case 'Image): If the argument is an enumeration
2327         literal and names are available, constant-fold but mark nevertheless as
2328         non-static.
2329         Clean up function names.
2330         (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
2331         comment.
2332         (Requires_Simple_Name_Prefix): Removed.
2333
2334 2007-08-14  Robert Dewar  <dewar@adacore.com>
2335             Ed Schonberg  <schonberg@adacore.com>
2336
2337         * sem_ch11.adb: Improved warnings for unused variables
2338
2339         * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
2340         is a synchronized interface, the derived type is limited.
2341         (Analyze_Object_Declaration): Mark the potential coextensions in the
2342         definition and expression of an object declaration node.
2343         (Build_Derived_Type): For the completion of a private type declaration
2344         with a derived type declaration, chain the parent type's representation
2345         items to the last representation item of the derived type (not the
2346         first one) if they are not present already.
2347         (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
2348         object declaration of forward references to tags.
2349         (Access_Subprogram_Declaration): In Ada2005, anonymous access to
2350         subprogram types can appear as access discriminants of synchronized
2351         types.
2352         (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
2353         given in prefixed form as a selected component.
2354         (Process_Discriminants): If not all discriminants have defaults, place
2355         error message on a default that is present.
2356         (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
2357         extend a synchronized tagged type.
2358         Improved warnings for unused variables
2359         (Is_Visible_Component): Fix a visibility hole on a component inherited
2360         by a private extension when parent is itself declared as a private
2361         extension, and the derivation is in a child unit.
2362         (Find_Hidden_Interface): Move spec from the package body.
2363
2364 2007-08-14  Robert Dewar  <dewar@adacore.com>
2365             Ed Schonberg  <schonberg@adacore.com>
2366
2367         * sem_ch5.adb: Improve warnings on redundant assignments
2368
2369         * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
2370         parameter
2371         (Is_Synchronized_Tagged_Type): New subprogram that returns true
2372         in case of synchronized tagged types (AARM 3.9.4 (6/2)).
2373         (Safe_To_Capture_Value): Can now return True for constants, even if Cond
2374         is set to False. Improves handling of Known_[Not_]Null.
2375         (Wrong_Type): Special case address arithmetic attempt
2376         (Collect_Abstract_Interfaces): Add new formal to allow collecting
2377         abstract interfaces just using the partial view of private types.
2378         (Has_Abstract_Interfaces): Add new formal to allow checking types
2379         covering interfaces using the partial view of private types.
2380         (Is_Fully_Initialized_Type): Special VM case for uTag component. This
2381         component still needs to be defined in this case, but is never
2382         initialized as VMs are using other dispatching mechanisms.
2383         (Abstract_Interface_List): For a protected type, use base type to get
2384         proper declaration.
2385         Improve warnings on redundant assignments
2386         (Is_Variable): Handle properly an implicit dereference of a prefixed
2387         function call.
2388         (Build_Actual_Subtype): If this is an actual subtype for an
2389         unconstrained formal parameter, use the sloc of the body for the new
2390         declaration, to prevent anomalises in the debugger.
2391
2392 2007-08-14  Robert Dewar  <dewar@adacore.com>
2393
2394         * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
2395         dispatching operation
2396
2397 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2398             Gary Dismukes  <dismukes@adacore.com>
2399
2400         * exp_aggr.ads, 
2401         exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
2402         expanded aggregate code before allocator, and ahead of declaration for
2403         temporary, to prevent access before elaboration when the allocator is
2404         an actual for an access parameter.
2405         (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
2406         the TSD and the table of interfaces.
2407         (Convert_To_Assignments): Augment the test for delaying aggregate
2408         expansion for limited return statements to include the case of extended
2409         returns, to prevent creation of an unwanted transient scope.
2410         (Is_Static_Dispatch_Table_Aggregate): New subprogram.
2411         (Expand_Array_Aggregate): Handle aggregates associated with
2412         statically allocated dispatch tables.
2413         (Expand_Record_Aggregate): Handle aggregates associated with
2414         statically allocated dispatch tables.
2415         (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
2416         of anonymous access type.
2417
2418 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2419
2420         * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
2421         is a variable that renames a slice, use the variable itself in the
2422         expannsion when the renamed expression itself may be modified between
2423         the declaration of the renaming and the array assignment.
2424
2425 2007-08-14  Jerome Guitton  <guitton@adacore.com>
2426
2427         * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb, 
2428         s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb, 
2429         s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
2430         New functions; dummy implementations.
2431
2432         * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
2433         functions, used to implement the multi-tasks mode routines on VxWorks.
2434
2435         * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
2436         New functions, thin
2437         binding to the VxWorks routines which have changed between VxWorks 5
2438         and 6.
2439         (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
2440         which are not callable from a RTP.
2441
2442         * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
2443         implemented for the multi-tasks mode on VxWorks 5 and 6.
2444
2445         * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
2446
2447         * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
2448         functions.
2449
2450 2007-08-14  Vincent Celier  <celier@adacore.com>
2451
2452         * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb, 
2453         gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
2454         mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb, 
2455         mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb, 
2456         mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb, 
2457         mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
2458         mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
2459         procedure.
2460         (Major_Id_Name): New function.
2461         mlib-tgt.ads/mlib.tgt.adb:
2462         (Library_Major_Minor_Id_Supported): New function, default returns True
2463         Most mlib-tgt-*.adb that support shared libraries and symbolic links:
2464         (Build_Dynamic_Library): Add support for major/minor ids for shared libs
2465         Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
2466         Implementation of Library_Major_Minor_Id_Supported returns False
2467         clean.adb:
2468         (Clean_Library_Directory): If major/minor ids are supported, clean all
2469         library files.
2470         Major update of the Project Manager and of the project aware tools,
2471         including gprmake, so that the same sources in the GNAT repository
2472         can be used by gprbuild.
2473
2474 2007-08-14  Olivier Hainque  <hainque@adacore.com>
2475
2476         * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
2477         (GCC_ZCX_Support): Switch to True.
2478         
2479         * s-intman-solaris.adb (Notify_Exception): Call
2480         Adjust_Context_For_Raise before raising, as expected for signal
2481         handlers in general.
2482         
2483         * s-intman-posix.adb (Notify_Exception): Remove declaration of
2484         Adjust_Context_For_Raise, moved to the spec of this unit to be visible
2485         to other implementation bodies.
2486         
2487         * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
2488         be visible by multiple implementation bodies.
2489         
2490         * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
2491         only for conditions coming from hardware.
2492         [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
2493         adjustments to signal context prior to exception raise from signal
2494         handler.
2495         (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
2496         mode.
2497         Solaris section: (__gnat_adjust_context_for_raise): New function.
2498         Implementation of the machine context adjustments to perform prior to
2499         raise from a signal handler. Version for both sparc and x86.
2500         (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
2501         (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
2502         prior to raising as expected for any handler, before possible nested
2503         faults to make sure all the contexts in a chain have been adjusted by
2504         the time we propagate.
2505
2506 2007-08-14  Pascal Obry  <obry@adacore.com>
2507
2508         * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
2509         (SYSTEM_INFO): New record.
2510         (SetThreadIdealProcessor): New imported routine needed for supporting
2511         task_info pragma on Windows.
2512
2513         * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
2514         info can be applied to the current host.
2515         (Create_Task): Set the ideal processor if information is present.
2516
2517         * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
2518         a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
2519
2520 2007-08-14  Olivier Hainque  <hainque@adacore.com>
2521
2522         * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
2523         stack size and initial stack pointer value for a given task.
2524         (Enter_Task): Get the stack attributes of the task we are entering and
2525         let the stack checking engine know about them.
2526
2527         * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
2528         Let the stack-checking engine know about the initial sp value and stack
2529         size associated with the current task.
2530         (Set_Stack_Info): If a stack base has been notified for the current
2531         task, honor it. Fallback to the previous less accurate method otherwise.
2532
2533         * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
2534
2535 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2536
2537         * sem_ch10.adb: Create a limited view of an incomplete type, to make
2538         treatment of limited views uniform for all visible declarations in a
2539         limited_withed package.
2540         Set flag indicating that a subprogram body for a child unit has a
2541         generated spec.
2542         (Analyze_Compilation_Unit): If unit is a subprogram body that has no
2543         separate declaration, remove the unit name from visibility after
2544         compilation, so that environment is clean for subsequent compilations.
2545         (Install_Limited_Context_Clauses): Do not install a
2546         limited_private_with_clause unless the current unit is a body or a
2547         private child unit.
2548         (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
2549         in the same fashion.
2550         (Install_Limited_Withed_Unit): Do not install a limited with clause if
2551         it applies to the declaration of the current package body.
2552         (Remove_Private_With_Clauses): If there is a regular with_clause for
2553         the unit, delete Private_With_Clause from context, to prevent improper
2554         hiding when processing subsequent nested packages and instantiations.
2555
2556 2007-08-14  Jose Ruiz  <ruiz@adacore.com>
2557
2558         * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
2559         dir/file, device:/dir/file, and device:drive_letter:/dir/file as
2560         representing absolute path names.
2561         __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
2562
2563         * cstreams.c (__gnat_full_name for VxWorks): Use
2564         __gnat_is_absolute_path to detect whether we need to add the current
2565         directory to normalize the path.
2566
2567 2007-08-14  Javier Miranda  <miranda@adacore.com>
2568
2569         * a-tags.ads, 
2570         a-tags.adb (Displace): Associate a message with the raised CE
2571         exception.
2572         (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
2573         To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
2574         To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
2575         spec.
2576         (Default_Prim_Op_Count): Removed.
2577         (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
2578         Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
2579         Remove pragma Inline_Always.
2580
2581         * rtsfind.ads (Default_Prim_Op_Count): Removed
2582         (Max_Predef_Prims): New entity
2583         (RE_Expanded_Name): Removed
2584         (RE_HT_Link): Removed
2585         (RE_Iface_Tag): Remmoved
2586         (RE_Ifaces_Table): Removed
2587         (RE_Interfaces_Array): Removed
2588         (RE_Interface_Data_Element): Removed
2589         (RE_Nb_Ifaces): Removed
2590         (RE_RC_Offset): Removed
2591         (RE_Static_Offset_To_Top): Removed
2592
2593         * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
2594         formal.
2595         (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
2596         Prim_Op_Count by Max_Predef_Prims.
2597
2598 2007-08-14  Thomas Quinot  <quinot@adacore.com>
2599             Vincent Celier  <celier@adacore.com>
2600
2601         * binde.adb (Elab_All_Links): Remove unnecessary call to
2602         Generic_Separately_Compiled (if a unit satisfies this predicate, there
2603         won't be an associated Afile).
2604         (Elab_All_Links): Fail if a referenced unit cannot be found
2605
2606         * bindgen.adb: 
2607         Fix comments in bindgen regarding consistency checks done in Bcheck:
2608         the checks are made across units within a partition, not across several
2609         partitions.
2610         Fix generation of C binder file for VxWorks.
2611
2612         * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
2613         Generic_May_Lack_ALI, more descriptive of the current use of the
2614         predicate, and update documentation.
2615
2616         * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
2617         reorganization and documentation update for the case of predefined
2618         library generics (for which we do not reference an Afile).
2619
2620 2007-08-14  Robert Dewar  <dewar@adacore.com>
2621
2622         * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
2623         s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
2624         s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
2625         s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
2626         s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
2627         s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
2628         s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
2629         s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
2630         exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
2631         s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
2632         s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
2633         a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
2634         s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
2635         g-altcon.adb: Minor reformatting
2636
2637         ada-tree.h: Delete empty line.
2638
2639         ali.ads: Minor reformatting
2640         Clarification of comments.
2641         Minor spelling correction
2642
2643         * exp_dbug.adb: Add Warnings Off to suppress new warning
2644
2645         * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
2646         formal
2647
2648         * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
2649         value
2650
2651         * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
2652
2653         * a-textio.ads: Reorder the standard input/output/error declarations
2654         for consistency.
2655
2656         * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
2657
2658         * par-ch2.adb: Recognize RM specially in errout
2659         Change 'R'M to RM in all error messages
2660
2661         * scng.adb: Recognize RM specially in errout
2662
2663         * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
2664         N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
2665
2666         * s-direio.adb: Add missing routine header box.
2667
2668         * sem_attr.ads: Add ??? comments
2669
2670         * sem_eval.adb: Recognize RM specially in errout
2671         Change 'R'M to RM in all error messages
2672
2673         * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
2674
2675         * s-tasinf.ads: Fix minor comment typo.
2676
2677         * a-cihama.adb: Minor comment addition
2678
2679         * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
2680         formal
2681
2682         * s-tasinf-tru64.ads: Fix minor comment typo.
2683
2684         * itypes.ads: Comment update.
2685
2686         * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
2687         anymore.
2688
2689         * argv.c: Added protection against null gnat_argv and gnat_envp.
2690
2691         * bcheck.adb (Check_Consistency): Use correct markup character ({) in
2692         warning message when Tolerate_Consistency_Errors is True.
2693
2694         * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
2695         Any_Id, as this subprogram is only applicable to *type* entities (it
2696         sets RM_Size). Instead initialize just Esize and Alignment.
2697
2698 2007-08-14  Bob Duff  <duff@adacore.com>
2699
2700         * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads, 
2701         a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads, 
2702         a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads, 
2703         a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
2704         a-coorse.ads (Next): Applied pragma Inline.
2705         Make all Containers packages Remote_Types (unless they are already
2706         Pure).
2707         (Previous): applied pragma Inline
2708         (Elements_Type): is now a record instead of an array
2709
2710 2007-08-14  Thomas Quinot  <quinot@adacore.com>
2711
2712         * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
2713         of Set_Item.
2714         (Set_Item): When the new item is an element of the currently allocated
2715         table passed by reference, save a copy on the stack if we're going
2716         to reallocate. Also, in Table.Set_Item, make sure we test the proper
2717         variable to determine whether to call Set_Last.
2718
2719         * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
2720         symbols-vms.adb, symbols-processing-vms-alpha.adb,
2721         symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
2722         some occurrences of the pattern
2723            T.Increment_Last;
2724            T.Table (T.Last) := Value;
2725         with a cleaner call to
2726            T.Append (Value);
2727
2728 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2729             Gary Dismukes  <dismukes@adacore.com>
2730             Thomas Quinot  <quinot@adacore.com>
2731
2732         * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
2733         derived type with interface progenitors use the analyzed formal as the
2734         parent of the actual, to create renamings for all the inherited
2735         operations in Derive_Subprograms.
2736         (Collect_Previous_Instances): new procedure within of
2737         Load_Parent_Of_Generic, to instantiate all bodies in the compilation
2738         unit being loaded, to ensure that the generation of global symbols is
2739         consistent in different compilation modes.
2740         (Is_Tagged_Ancestor): New function testing the ancestor relation that
2741         takes progenitor types into account.
2742         (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
2743         traversing over the primitives of the formal and actual types to locate
2744         any abstract subprograms of the actual type that correspond to a
2745         nonabstract subprogram of the formal type's ancestor type(s), and issue
2746         an error if such is found.
2747         (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
2748         Instantiate_Package_Body, Instantiate_Subprogram_Body):
2749         Remove bogus guard around calls to Inherit_Context.
2750         (Reset_Entity): If the entity is the selector of a selected component
2751         that denotes a named number, propagate constant-folding to the generic
2752         template only if the named number is global to the generic unit.
2753         (Set_Instance_Env): Only reset the compilation switches when compiling
2754         a predefined or internal unit.
2755
2756 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2757
2758         * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
2759         parameter to determine whether operation applies to the prefix.
2760         (Complete_Object_Operation): If actual has an access type and
2761         controlling formal is not an in_parameter, reject the actual if it is
2762         an access_to_constant type.
2763         (Try_Primitive_Operation): If the type of the prefix is a formal tagged
2764         type, the candidate operations are found in the scope of declaration of
2765         the type, because the type has no primitive subprograms.
2766         (Analyze_Selected_Component): If prefix is class-wide, and root type is
2767         a private extension, only examine visible components before trying to
2768         analyze as a prefixed call.
2769         Change Entity_List to Type_To_Use, for better readability.
2770         (Has_Fixed_Op): Use base type when checking whether the type of an
2771         operator has a user-defined multiplication/division
2772         (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
2773         user-defined operators are available for fixed-point types.
2774
2775 2007-08-14  Thomas Quinot  <quinot@adacore.com>
2776             Ed Schonberg  <schonberg@adacore.com>
2777
2778         * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
2779         formal At_Any_Place indicating, when True, that we want to test for
2780         availability of the stream attribute at any place (as opposed to the
2781         current visibility context only).
2782         (Missing_Read_Write_Attributes): A stream attribute is missing for the
2783         purpose of enforcing E.2.2(8) only if it is not available at any place.
2784         Take into account the Ada2005 pragma Has_Preelaborable_Initialization
2785         when checking the legality of an extension aggregate in a preelaborable
2786         package. Treat the literal null as a valid default expression in a
2787         component declaration for a type with preelaborable initialization.
2788         A limited interface is a legal progenitor for the designated type of a
2789         remote access to class-wide type.
2790
2791 2007-08-14  Thomas Quinot  <quinot@adacore.com>
2792             Ed Schonberg  <schonberg@adacore.com>
2793
2794         * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
2795         reference): Use correct entity as denoted entity for the selector of
2796         the rewritten node.
2797         (Find_Direct_Name): Add comment about Generate_Reference incorrectly
2798         setting the Referenced_As_LHS flag for entities that are implicitly
2799         dereferenced.
2800         (Find_Type): If the type is an internally generated incomplete type,
2801         mark the full view as referenced, to prevent spurious warnings.
2802         (Find_Selected_Component, Has_Components): Handle properly non-limited
2803         views that are themselves incomplete types.
2804         Handle interfaces visible through limited-with clauses.
2805         (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
2806         subprogram generic actual for which we have generated a renaming.
2807         Warn when the renaming introduces a homonym of
2808         the renamed entity, and the renamed entity is directly visible.
2809
2810 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2811             Hristian Kirtchev  <kirtchev@adacore.com>
2812
2813         * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
2814         appear in the subtree to the current allocator if it is not a static
2815         coextension.
2816         (Resolve_Allocator): Perform cleanup if resolution has determined that
2817         the allocator is not a coextension.
2818         (Resolve): Skip an interpretation hidden by an abstract operator only
2819         when the type of the interpretation matches that of the context.
2820         (Resolve): When looping through all possible interpretations of a node,
2821         do not consider those that are hidden by abstract operators.
2822         (Resolve_Actuals): When verifying that an access to class-wide object
2823         is an actual  for a controlling formal, ignore anonymous access to
2824         subprograms whose return type is an access to class_wide type.
2825         (Resolve_Slice): If the prefix of the slice is a selected component
2826         whose type depends on discriminants, build its actual subtype before
2827         applying range checks on the bounds of the slice.
2828         (Valid_Conversion): In an instance or inlined body, compare root types,
2829         to prevent anomalies between private and public views.
2830         (Resolve): Improve error message for ambiguous fixed multiplication
2831         expressions that involve universal_fixed multiplying operations.
2832
2833 2007-08-14  Javier Miranda  <miranda@adacore.com>
2834             Hristian Kirtchev  <kirtchev@adacore.com>
2835
2836         * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
2837         location to allow the correct generation of errors in case of
2838         restrictions applied to the expanded code.
2839         (Expand_Entry_Barrier): Remove all generated renamings for a barrier
2840         function if the condition does not reference them.
2841         (Expand_Entry_Body_Declarations): Mark the index constant as having a
2842         valid value.
2843
2844 2007-08-14  Thomas Quinot  <quinot@adacore.com>
2845
2846         * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
2847         typecode parameters for a union (in a variant record), remove
2848         extraneous layer of Any wrapping for member label.
2849         (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
2850         elabration statements, register the package with the name server
2851         at the beginning, not at the end, of the elaboration statements so
2852         that they can create remote access to subprogram values that designate
2853         remote subprograms from the package.
2854
2855 2007-08-14  Hristian Kirtchev  <kirtchev@adacore.com>
2856
2857         * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
2858         values to compute the number of seconds since the Unix Epoc in order to
2859         account for Daylight Savings Time. Perform special processing for dates
2860         that are earlier than the Unix Epoc to obtain a negative number.
2861
2862 2007-08-14  Emmanuel Briot  <briot@adacore.com>
2863
2864         * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
2865         switches.
2866
2867 2007-08-14  Eric Botcazou  <ebotcazou@adacore.com>
2868
2869         * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
2870         binder-generated file is not in Ada.
2871         Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
2872         recorded in the ALI file.
2873         Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
2874
2875 2007-08-14  Vincent Celier  <celier@adacore.com>
2876
2877         * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
2878         (Output_Source): Do nothing if parameter is No_Sdep_Id
2879
2880         * make.adb (Gnatmake): Do not rebuild an archive simply because a
2881         shared library it imports has a later time stamp.
2882         (Check): Resolve the symbolic links in the path name of the object
2883         directory.
2884         Check that the ALI file is in the correct object directory
2885         Check if a file name does not correspond to the mapping of units
2886         to file names.
2887         (Display_Version): New procedure
2888         (Initialize): Process switches --version and --help
2889         Use type Path_Name_Type for path name
2890
2891 2007-08-14  Paul Hilfinger  <hilfinger@adacore.com>
2892
2893         * impunit.adb: Re-organize System.Random_Numbers and
2894         GNAT.Random_Numbers and add to builds.
2895
2896         * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
2897
2898         * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
2899
2900         * a-assert.ads, a-assert.adb: New files.
2901
2902 2007-08-14  Gary Dismukes  <dismukes@adacore.com>
2903
2904         * layout.adb (Layout_Type): In the case of access-to-subprogram types,
2905         if AAMP_On_Target is True, then the size of the type encompasses two
2906         addresses (a static link and a subprogram address), except in the case
2907         of library-level access types.
2908
2909 2007-08-14  Vincent Celier  <celier@adacore.com>
2910
2911         * output.ads, output.adb (Write_Eol): Remove trailing spaces before
2912         writing the line.
2913         (Write_Eol_Keep_Blanks): New procedure to write a line, including
2914         possible trailing spaces.
2915         (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
2916
2917 2007-08-14  Javier Miranda  <miranda@adacore.com>
2918
2919         * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
2920         null-excluding access types.
2921
2922 2007-08-14  Javier Miranda  <miranda@adacore.com>
2923
2924         * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
2925         that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
2926         of private types add missing check on matching interfaces in the
2927         partial and full declarations.
2928         (Analyze_Protected_Type): Code cleanup.
2929         (Analyze_Task_Type): Code cleanup.
2930
2931 2007-08-14  Javier Miranda  <miranda@adacore.com>
2932
2933         * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
2934         generated interface thunk.
2935
2936 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
2937
2938         * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
2939         obsolescent warning on application of 'Class to an incomplete type.
2940
2941         * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
2942         prevent obsolescent warning on application of 'Class to an incomplete
2943         type.
2944
2945 2007-08-14  Pascal Obry  <obry@adacore.com>
2946
2947         * s-fileio.adb (Is_Open): Add check for usability of the underlying
2948         file stream.
2949
2950 2007-08-14  Cyrille Comar  <comar@adacore.com>
2951
2952         * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
2953         since it is potentially used in cases implying double finalization of
2954         the same object.
2955
2956 2007-08-14  Jose Ruiz  <ruiz@adacore.com>
2957
2958         * s-tasini.adb (Get_Stack_Info): Move this function to
2959         System.Soft_Links.Tasking because it is common to the full and the
2960         restricted run times.
2961         (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
2962         in SSL.Tasking.Init_Tasking_Soft_Links.
2963
2964         * s-solita.adb (Get_Stack_Info): Function moved from
2965         System.Tasking.Initialization because it is common to the full and the
2966         restricted run times.
2967         (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
2968
2969 2007-08-14  Arnaud Charlet  <charlet@adacore.com>
2970
2971         * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
2972         s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
2973         (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
2974         parameter.
2975
2976         * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
2977         guard to 12K.
2978
2979 2007-08-14  Gary Dismukes  <dismukes@adacore.com>
2980
2981         * s-veboop.adb (SU): New named number initialized to
2982         System.Storage_Unit.
2983         (True_Val): The initialization expression is revised to use SU (=
2984         Storage_Unit) rather than assuming 8 for the component size of an
2985         unpacked Boolean array.
2986
2987 2007-08-14  Tristan Gingold  <gingold@adacore.com>
2988
2989         * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
2990
2991         * tb-ivms.c: New file.
2992
2993         * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
2994
2995 2007-08-14  Geert Bosch  <bosch@adacore.com>
2996
2997         * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
2998         s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
2999         Add required linker pragmas for automatically linking with the gnalasup
3000         linear algebra support library, and the systems math library.
3001         Rename cdot to cdotu and zdot to zdotu.
3002         Update header comment to describe purpose of package.
3003
3004 2007-08-14  Thomas Quinot  <quinot@adacore.com>
3005
3006         * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
3007         an explicitly specified Associated_Final_Chain, use that list.
3008         (Expand_N_Package_Body): Build dispatch tables of library level tagged
3009         types.
3010         (Expand_N_Package_Declaration): Build dispatch tables of library level
3011         tagged types. Minor code cleanup.
3012
3013 2007-08-14  Vincent Celier  <celier@adacore.com>
3014
3015         * gnatchop.adb (Terminate_Program): Remove exception and use
3016         Types.Terminate_Program instead.
3017
3018         * osint.ads, osint.adb (Current_Exit_Status): New global variable
3019         (Find_Program_Name): Added protection against empty name.
3020         (OS_Exit_Through_Exception): New procedure
3021
3022         * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
3023         (OS_Exit_Default): New procedure that contains the previous
3024         implementation of procedure OS_Exit.
3025         (Final_Value): Remove obsolete Interix stuff.
3026
3027 2007-08-14  Thomas Quinot  <quinot@adacore.com>
3028
3029         * g-socket.ads: Reorganize example code so that it also works on
3030         Windows XP.
3031
3032 2007-08-14  Tristan Gingold  <gingold@adacore.com>
3033
3034         * g-trasym.ads: AIX now supports symbolic backtraces.
3035
3036 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
3037
3038         * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
3039         units being loaded to detect circularities. A circularity may be
3040         present even if the current chain of pending units to load starts from
3041         a limited_with_clause.
3042
3043         * lib-load.ads: Change profile of Load_Unit to use a with_clause
3044         rather than a boolean flag, in order to detect circularities in
3045         with_clauses.
3046
3047         * par-load.adb: Use current with_clause in calls to Load_Unit, rather
3048         than propagating the From_Limited_With flag, in order to handle
3049         properly circularities involving with_clauses.
3050
3051 2007-08-14  Nicolas Setton  <setton@adacore.com>
3052
3053         * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
3054         warnings.
3055
3056 2007-08-14  Arnaud Charlet  <charlet@adacore.com>
3057
3058         * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
3059         to build for libgnala.
3060         libgnat: Add rules to build libgnala.a
3061         (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
3062         target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
3063         Add s-osinte-vxworks-kernel.adb to the target pairs of the
3064         kernel run-time lib for VxWorks 6, which would provide a different
3065         implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
3066         x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
3067         running ZCX by default.
3068         Add g-sttsne-locking to LynxOS version.
3069         Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
3070         On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
3071
3072         * system-darwin-x86.ads: New file.
3073
3074         * Make-lang.in: Delete files before copying onto them, so if they are
3075         read-only, the copy won't fail.
3076         Update dependencies
3077
3078 2007-08-14  Pascal Obry  <obry@adacore.com>
3079
3080         * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
3081         naming scheme.
3082
3083 2007-08-14  Vincent Celier  <celier@adacore.com>
3084
3085         * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
3086         (Gcc): Initialize Gcc_Name at the first call
3087
3088 2007-08-14  Ed Schonberg  <schonberg@adacore.com>
3089
3090         * sem_ch7.adb (Analyze_Package_Specification): Do not install private
3091         with_clauses of the enclosing unit when analyzing the package
3092         specification of a nested instance.
3093
3094 2007-08-14  Hristian Kirtchev  <kirtchev@adacore.com>
3095
3096         * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
3097         (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
3098         Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
3099         layout of N_Allocator.
3100
3101 2007-08-14  Thomas Quinot  <quinot@adacore.com>
3102
3103         * rtsfind.adb (Check_RPC): Add PCS version check.
3104
3105         * gnatvsn.ads, gnatvsn.adb: Add PCS version.
3106         (Gnat_Free_Software): New function.
3107
3108         * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
3109         the PCS_Version value from s-parint, used to check that it is consistent
3110         with what exp_dist expects.
3111
3112         * s-parint.ads (PCS_Version): New entity for checking consistency
3113         between exp_dist and PCS.
3114
3115         * gen-soccon.c: (SO_REUSEPORT): New constant.
3116
3117 2007-08-14  Hristian Kirtchev  <kirtchev@adacore.com>
3118
3119         * a-calfor.adb (Image (Duration; Boolean)): Change type of local
3120         variable Sub_Second to Duration in order to accomodate a larger range
3121         of arithmetic operations.
3122
3123 2007-08-14  Bob Duff  <duff@adacore.com>
3124
3125         * g-sttsne-locking.ads: Move comments from spec to body.
3126         * g-sttsne-locking.adb: Move comments from spec to body.
3127         * g-sttsne-vxworks.ads: Removed.
3128         * g-sttsne-vxworks.adb: Removed.
3129
3130 2007-08-11  Ian Lance Taylor  <iant@google.com>
3131
3132         * misc.c (gnat_get_alias_set): Change return type to
3133         alias_set_type.
3134
3135 2007-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3136
3137         * decl.c, utils2.c: Fix whitespace in last change.
3138
3139 2007-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3140
3141         * decl.c (compare_field_bitpos): Constify.
3142         * utils2.c (compare_elmt_bitpos): Likewise.
3143
3144 2007-07-27  Aurelien Jarno  <aurelien@aurel32.net>
3145
3146         * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by 
3147         anonymous access type.
3148         (pthread_sigmask): Now take an access sigset_t.
3149
3150 2007-07-05  Joel Sherrill <joel.sherrill@oarcorp.com>
3151
3152         * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
3153         
3154 2007-06-21  Eric Botcazou  <ebotcazou@adacore.com>
3155
3156         PR tree-optimization/25737
3157         * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
3158
3159 2007-06-15  Andrew Pinski  <andrew_pinski@playstation.sony.com>
3160
3161         * trans.c (Attribute_to_gnu): When subtracting an
3162         offset from a pointer, use POINTER_PLUS_EXPR with
3163         NEGATE_EXPR instead of MINUS_EXPR.
3164         (gnat_to_gnu): Likewise.
3165         * utils.c (convert): When converting between
3166         thin pointers, use POINTER_PLUS_EXPR and sizetype
3167         for the offset.
3168         * utils2.c (known_alignment): POINTER_PLUS_EXPR
3169         have the same semantics as PLUS_EXPR for alignment.
3170         (build_binary_op): Add support for the semantics of
3171         POINTER_PLUS_EXPR's operands.
3172         When adding an offset to a pointer, use POINTER_PLUS_EXPR.
3173
3174 2007-06-11  Rafael Avila de Espindola  <espindola@google.com>
3175
3176         * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
3177         of get_signed_or_unsigned_type.
3178         * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
3179
3180 2007-06-11  Bob Duff  <duff@adacore.com>
3181             Thomas Quinot  <quinot@adacore.com>
3182
3183         * g-stsifd-sockets.adb (Create): Work around strange behavior of
3184         'bind' on windows that causes 'connect' to fail intermittently, by
3185         retrying the 'bind'.
3186         (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3187
3188 2007-06-10  Duncan Sands  <baldrick@free.fr>
3189
3190         * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
3191         than to void, for the fields when making a new fat pointer type.
3192         (gnat_substitute_in_type): Now substitute_in_type.
3193         * gigi.h (gnat_substitute_in_type): Likewise.  Adjust recursive calls.
3194         * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
3195         * utils.c (update_pointer_to): Update fat pointers by updating the
3196         dummy node pointers used for the fields.
3197
3198 2007-06-06  Thomas Quinot  <quinot@adacore.com>
3199             Bob Duff  <duff@adacore.com>
3200
3201         * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
3202         g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads, 
3203         g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads:  Add new
3204         constant Thread_Blocking_IO, always True by default, set False
3205         on a per-runtime basis.
3206         (Need_Netdb_Buffer): New constant.
3207
3208         * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
3209         g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
3210         files.
3211
3212         * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
3213         g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
3214         Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
3215         child package Task_Safe_NetDB
3216         (Host_Error_Messages): Add stub body.
3217         (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3218
3219         * g-soccon-mingw.ads: Add Windows-specific constants.
3220         (Need_Netdb_Buffer): New constant.
3221         (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
3222         wrapper and import inet_addr(3) from the standard sockets library
3223         directly instead.
3224         (In_Addr): Add alignment clause.
3225         (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
3226
3227 2007-06-06  Robert Dewar  <dewar@adacore.com>
3228
3229         * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
3230         s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
3231         s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
3232         s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
3233         s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
3234         s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
3235         a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
3236         a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
3237         a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
3238         g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
3239         g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
3240         i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
3241         s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
3242         s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
3243         s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
3244         s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
3245         s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
3246         s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
3247         s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
3248         s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
3249         s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
3250         s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
3251         s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
3252         s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
3253         s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
3254         s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
3255         s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
3256         s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
3257         s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
3258         s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
3259         s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
3260         a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
3261         Unchecked_* by Ada.Unchecked_*
3262
3263 2007-06-06  Robert Dewar  <dewar@adacore.com>
3264
3265         * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
3266         s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
3267         g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
3268         output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
3269         g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
3270         a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
3271
3272         * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,