OSDN Git Service

2010-10-21 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / ChangeLog
1 2010-10-21  Robert Dewar  <dewar@adacore.com>
2
3         * sem_ch3.adb: Minor reformatting.
4
5 2010-10-21  Thomas Quinot  <quinot@adacore.com>
6
7         * einfo.ads (Next_Girder_Discriminant): Remove obsolete description for
8         removed routine.
9
10 2010-10-21  Nicolas Roche  <roche@adacore.com>
11
12         * gnatmem.adb, memroot.adb, memroot.ads, gmem.c,
13         gcc-interface/Makefile.in: Remove gnatmem specific files.
14
15 2010-10-21  Thomas Quinot  <quinot@adacore.com>
16
17         * sem_res.adb, exp_ch13.adb: Minor reformatting.
18
19 2010-10-21  Thomas Quinot  <quinot@adacore.com>
20
21         * sem_ch3.adb (Check_Or_Process_Discriminant): Reject illegal attempt
22         to provide a tagged full view as the completion of an untagged partial
23         view if the partial view has a discriminant with default.
24
25 2010-10-21  Arnaud Charlet  <charlet@adacore.com>
26
27         * gcc-interface/Make-lang.in: Update dependencies.
28
29 2010-10-21  Robert Dewar  <dewar@adacore.com>
30
31         * checks.ads, checks.adb (Apply_Predicate_Check): New procedure
32         Minor code reorganization.
33         * einfo.adb (Has_Predicates): Fix assertion.
34         * exp_ch13.adb (Build_Predicate_Function): Move from Sem_Ch13 spec to
35         Exp_Ch13 body.
36         (Expand_N_Freeze_Entity): Call build predicate function.
37         * exp_ch4.adb (Expand_N_Type_Conversion): Add predicate check.
38         * exp_ch5.adb (Expand_N_Assignment_Statement): Add predicate check.
39         * exp_prag.adb (Expand_Pragma_Check): Use all lower case for name of
40         check.
41         * freeze.adb (Freeze_Entity): Move building of predicate function to
42         Exp_Ch13.
43         * sem_ch13.adb (Build_Predicate_Function): Move from Sem_Ch13 to
44         Exp_Ch13.
45         * sem_ch13.ads (Build_Predicate_Function): Move from Sem_Ch13 to
46         Exp_Ch13.
47         * sem_ch3.adb (Analyze_Declarations): Remove call to build predicate
48         function.
49         * sem_res.adb (Resolve_Actuals): Apply predicate check.
50
51 2010-10-21  Robert Dewar  <dewar@adacore.com>
52
53         * einfo.ads, einfo.adb: Replace Predicate_Procedure by
54         Predicate_Functions.
55         * exp_ch4.adb (Expand_N_In): Handle predicates.
56         * exp_util.ads, exp_util.adb (Make_Predicate_Call): New function.
57         (Make_Predicate_Check): New function.
58         * freeze.adb (Freee_Entity): Build predicate function if needed.
59         * sem_ch13.adb (Build_Predicate_Function): New procedure.
60         (Analyze_Aspect_Specifications): No third argument for Predicate pragma
61         built from Predicate aspect.
62         * sem_ch13.ads (Build_Predicate_Function): New procedure.
63         * sem_ch3.adb: Add handling for predicates.
64         * sem_eval.adb (Eval_Membership_Op): Never static if predicate
65         functions around.
66         * sem_prag.adb (Analye_Pragma, case Predicate): Does not take a third
67         argument.
68
69 2010-10-21  Robert Dewar  <dewar@adacore.com>
70
71         * einfo.ads, einfo.adb: Add handling of predicates.
72         Rework handling of invariants.
73         * exp_ch3.adb, exp_ch4.adb, exp_util.adb, sem_ch6.adb: Minor changes to
74         handing of invariants.
75         * par-prag.adb: Add dummy entry for pragma Predicate
76         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for
77         Predicate aspects.
78         * sem_prag.adb: Add implementation of pragma Predicate.
79         * snames.ads-tmpl: Add entries for pragma Predicate.
80
81 2010-10-21  Robert Dewar  <dewar@adacore.com>
82
83         * elists.adb: Minor reformatting.
84
85 2010-10-21  Geert Bosch  <bosch@adacore.com>
86
87         * urealp.adb (UR_Write): Write hexadecimal constants with exponent 1 as
88         decimal constants, and write any others using the exponent notation.
89         Minor reformatting throughout
90         (Store_Ureal_Normalized): New function (minor code reorganization)
91
92 2010-10-21  Robert Dewar  <dewar@adacore.com>
93
94         * einfo.ads, xeinfo.adb: Minor reformatting.
95         * s-stalib.ads: Minor comment fixes.
96
97 2010-10-21  Ed Schonberg  <schonberg@adacore.com>
98
99         * sem_ch6.adb (Enter_Overloaded_Entity): Refine warning message about
100         hiding, to remove noise warnings about hiding predefined operators.
101
102 2010-10-21  Emmanuel Briot  <briot@adacore.com>
103
104         * g-comlin.adb (Add_Switch): Fix handling of switches with no separator
105         when the parameter has length 1.
106
107 2010-10-21  Jose Ruiz  <ruiz@adacore.com>
108
109         * sem_prag.adb (Set_Ravenscar_Profile): Enforce the restrictions of no
110         dependence on Ada.Execution_Time.Timers,
111         Ada.Execution_Time.Group_Budget, and
112         System.Multiprocessors.Dispatching_Domains which are part of the
113         Ravenscar Profile.
114         * impunit.adb (Non_Imp_File_Names_05): Add the file "a-etgrbu" to the
115         list of Ada 2005 files for package Ada.Execution_Time.Group_Budgets.
116         (Non_Imp_File_Names_12): Add the file "s-mudido" to the list of Ada 2012
117         files for package System.Mutiprocessors.Dispatching_Domains.
118
119 2010-10-21  Tristan Gingold  <gingold@adacore.com>
120
121         * ug_words, vms_data.ads: Define the VMS qualifier for -gnateE.
122
123 2010-10-21  Thomas Quinot  <quinot@adacore.com>
124
125         * sem_ch3.ads (Process_Discriminants): Clarify cases where this is
126         called for a completion.
127
128 2010-10-21  Geert Bosch  <bosch@adacore.com>
129
130         * uintp.ads: Expand image buffer to have enough room for 128-bit values
131         * urealp.ads (UR_Write): Write constants in base 16 in hexadecimal
132         notation; either as fixed point literal or in canonical radix 16
133         floating point form.
134
135 2010-10-21  Robert Dewar  <dewar@adacore.com>
136
137         * a-cgaaso.ads, a-tags.ads, exp_ch3.adb, exp_attr.adb, exp_ch4.adb,
138         exp_ch3.ads, exp_ch7.adb, exp_ch9.adb, exp_disp.adb, exp_disp.ads,
139         exp_dist.adb, exp_util.adb, layout.adb, lib-xref.adb, lib.ads,
140         prep.adb, prj-strt.adb, s-ststop.adb, s-taskin.ads, s-tataat.ads,
141         sem_aggr.adb, sem_attr.adb, sem_ch12.adb, sem_ch3.adb, sem_ch4.adb,
142         sem_ch4.ads, sem_ch5.adb, sem_res.adb, sem_util.adb, einfo.adb,
143         g-sothco.ads, make.adb: Minor reformatting
144
145 2010-10-21  Vincent Celier  <celier@adacore.com>
146
147         * vms_data.ads: Add new qualifiers /SRC_INFO= and
148         /UNCHECKED_SHARED_LIB_IMPORTS for GNAT COMPILE.
149         Correct qualifier /SRC_INFO= for GNAT MAKE
150
151 2010-10-21  Ed Schonberg  <schonberg@adacore.com>
152
153         * exp_aggr.adb (Flatten): An association for a subtype may be an
154         expanded name.
155         (Safe_Left_Hand_Side): An unchecked conversion is part of a safe
156         left-hand side if the expression is.
157         (Is_Safe_Index): new predicate
158         * exp_ch3.adb (Expand_Freeze_Enumeration_Type): Indicate that the
159         generated Rep_To_Pos function is a Pure_Function.
160
161 2010-10-21  Robert Dewar  <dewar@adacore.com>
162
163         * gnat_rm.texi: Document Invariant pragma.
164
165 2010-10-21  Javier Miranda  <miranda@adacore.com>
166
167         * exp_ch5.adb: Update comment.
168
169 2010-10-21  Robert Dewar  <dewar@adacore.com>
170
171         * sem_ch13.adb (Build_Invariant_Procedure): Remove commented out code
172         for interfaces, since invariants are not allowed on interfaces in any
173         case.
174
175 2010-10-21  Javier Miranda  <miranda@adacore.com>
176
177         * sem_attr.adb (Resolve_Attribute): After replacing the range attribute
178         node with a range expression ensure that its evaluation will not have
179         side effects.
180         * exp_ch5.adb (Expand_Assign_Array): Propagate the Parent to the
181         unchecked conversion node generated to handle assignment of private
182         types. Required to allow climbing the subtree if Insert_Action is
183         invoked later.
184
185 2010-10-21  Robert Dewar  <dewar@adacore.com>
186
187         * par-ch3.adb (P_Interface_Type_Definition): Allow for possibility of
188         aspect clause presence terminating the type definition.
189
190 2010-10-21  Robert Dewar  <dewar@adacore.com>
191
192         * exp_ch4.adb, exp_intr.adb, par-ch4.adb, scn.adb, sem_ch4.adb,
193         sem_res.adb, sem_util.adb, sinfo.ads, a-except-2005.adb: Minor
194         reformatting.
195         * snames.ads-tmpl: Add note on Name_Some (not a reserved keyword).
196
197 2010-10-21  Geert Bosch  <bosch@adacore.com>
198
199         * ttypef.ads: Further cleanup of Safe_XXX float attributes.
200
201 2010-10-19  Ed Schonberg  <schonberg@adacore.com>
202
203         * exp_ch4.adb, exp_ch4.ads (Expand_Quantified_Expression): New procedure
204         * exp_util.adb (Insert_Actions): Include Quantified_Expression.
205         * expander.adb: Call Expand_Qualified_Expression.
206         * par.adb: New procedure P_Quantified_Expression. Make
207         P_Loop_Parameter_Specification global for use in quantified expressions.
208         * par-ch3.adb (P_Subtype_Mark_Resync): Allow "some" as an identifier if
209         version < Ada2012.
210         * par-ch4.adb: New procedure P_Quantified_Expression.
211         * par-ch5.adb: P_Loop_Parameter_Specification is now global.
212         * scans.adb, scans.ads: Introduce token Some. For now leave as
213         unreserved.
214         * scn.adb (Scan_Reserved_Identifier): For earlier versions of Ada,
215         treat Some as a regular identifier.
216         * sem.adb: Call Analyze_Quantified_Expression.
217         * sem_ch4.adb, sem_ch4.ads: New procedure Analyze_Quantified_Expression.
218         * sem_ch5.adb, sem_ch5.ads: Analyze_Iteration_Scheme is public, for use
219         in quantified expressions.
220         * sem_res.adb: New procedure Resolve_Qualified_Expression.
221         * sinfo.adb, sinfo.ads: New node N_Quantified_Expression
222         * snames.ads-tmpl: New name Some.
223         * sprint.adb: Output quantified_expression.
224
225 2010-10-19  Robert Dewar  <dewar@adacore.com>
226
227         * a-exexda.adb: Minor reformatting
228         Minor code reorganization.
229
230 2010-10-19  Robert Dewar  <dewar@adacore.com>
231
232         * sem_eval.adb: Minor reformatting.
233
234 2010-10-19  Tristan Gingold  <gingold@adacore.com>
235
236         * exp_ch4.adb (Expand_N_And_Op, Expand_N_Or_Op, Expand_N_Xor_Op): Call
237         Expand_Intrinsic_Call if the function is intrinsic.
238         * exp_intr_adb (Expand_Binary_Operator): Handle VMS case for logical
239         binary operator on the unsigned_quadword record.
240         * exp_intr.ads (Expand_Intrinsic_Call): Update comments.
241
242 2010-10-19  Geert Bosch  <bosch@adacore.com>
243
244         * gnat_rm.texi (pragma Float_Representation): Fix typo.
245
246 2010-10-19  Arnaud Charlet  <charlet@adacore.com>
247
248         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateE.
249         * fe.h (Exception_Extra_Info): Declare.
250         * usage.adb (usage): Add -gnateE doc.
251         * checks.adb (Install_Null_Excluding_Check): Use better sloc.
252         * sem_util.adb (Insert_Explicit_Dereference): Ditto.
253         * gnat_ugn.texi: Document -gnateE switch.
254         * a-except.adb (Set_Exception_C_Msg): New parameter Column.
255         * a-except-2005.adb (Set_Exception_C_Msg): New parameter Column.
256         (Raise_Constraint_Error_Msg): Ditto.
257         (Image): New helper function.
258         (Rcheck_00_Ext, Rcheck_05_Ext, Rcheck_12_Ext): New procedure with more
259         detailed exception information.
260         Adjust calls to Set_Exception_C_Msg and Raise_Constraint_Error_Msg.
261         * a-exexda.adb (Set_Exception_C_Msg): New parameter Column.
262         * opt.ads (Exception_Extra_Info): New flag.
263         * gcc-interface/utils.c (gnat_raise_decls_ext): New.
264         * gcc-interface/utils2.c (build_call_raise_range,
265         build_call_raise_column): New functions.
266         * gcc-interface/gigi.h (exception_info_kind, gnat_raise_decls_ext,
267         build_call_raise_range, build_call_raise_column): Declare.
268         gcc-interface/trans.c (build_raise_check): New function.
269         (gigi): Initialize gnat_raise_decls_ext.
270         (gnat_to_gnu): Add initial support for -gnateE switch.
271         * gcc-interface/Make-lang.in: Update dependencies.
272
273 2010-10-19  Geert Bosch  <bosch@adacore.com>
274
275         * ttypef.ads: Change VAXDF_Last to be -VAXDF_First, as type is
276         symmetric.
277
278 2010-10-19  Robert Dewar  <dewar@adacore.com>
279
280         * atree.h (Field29): Fix incorrect definition.
281         * einfo.adb (Invariant_Procedure): New attribute
282         (Has_Invariants): New flag
283         (Has_Inheritable_Invariants): New flag
284         (OK_To_Reference): New flag
285         Minor code reorganization (use Next_Rep_Item function)
286         * einfo.ads (Invariant_Procedure): New attribute
287         (Has_Invariants): New flag
288         (Has_Inheritable_Invariants): New flag
289         (OK_To_Reference): New flag
290         * exp_ch3.adb (Expand_N_Object_Declaration): Add check for invariant
291         * exp_ch4.adb (Expand_N_Type_Conversion): Check invariant on type
292         conversion.  Minor reformatting.
293         * exp_util.ads, exp_util.adb (Make_Invariant_Call): New procedure.
294         * opt.ads (List_Inherited_Aspects): New name for List_Inherited_Pre_Post
295         * par-prag.adb: Add dummy entry for pragma Invariant.
296         * sem_ch13.adb (Build_Invariant_Procedure): New procedure
297         (Analyze_Aspect_Specification): Add support for Invariant aspect
298         * sem_ch13.ads (Build_Invariant_Procedure): New procedure
299         * sem_ch3.adb (Build_Derived_Type): Propagate invariant information
300         (Process_Full_View): Deal with invariants, building invariant procedure
301         Minor reformatting
302         * sem_ch6.adb (Process_PPCs): Add processing of invariants
303         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
304         procedures.
305         * sem_prag.adb: Implement pragma Invariant.
306         * sem_res.adb (Resolve_Entity_Name): Allow type reference if
307         OK_To_Reference set.
308         * sem_warn.adb (List_Inherited_Aspects): New name for
309         List_Inherited_Pre_Post.
310         * snames.ads-tmpl: Add entries for pragma Invariant.
311         * treepr.adb (Print_Entity_Information): Add handling of Field29.
312         * usage.adb: Warning .l/.L applies to invariant as well as pre/post.
313
314 2010-10-19  Javier Miranda  <miranda@adacore.com>
315
316         * par-ch4.adb: Update documentation of Ada 2012 syntax rules for
317         membership test.
318
319 2010-10-19  Bob Duff  <duff@adacore.com>
320
321         * sem_attr.adb (Eval_Attribute): Implement Max_Alignment_For_Allocation
322         attribute.
323         * exp_attr.adb (Expand_N_Attribute_Reference): Add
324         Attribute_Max_Alignment_For_Allocation to the case statement.
325         * snames.ads-tmpl (Name_Max_Alignment_For_Allocation,
326         Attribute_Max_Alignment_For_Allocation): New attribute name.
327
328 2010-10-19  Ed Schonberg  <schonberg@adacore.com>
329
330         * sem_ch3.adb (OK_For_Limited_Init_In_05): a call to an access to
331         parameterless function appears syntactically as an explicit dereference.
332
333 2010-10-19  Thomas Quinot  <quinot@adacore.com>
334
335         * sem_ch8.adb, sem_ch12.adb, opt.ads, sem_ch6.adb, sem_res.adb,
336         i-cexten.ads, exp_disp.adb, exp_ch4.adb, exp_ch9.adb: Minor reformatting
337
338 2010-10-19  Thomas Quinot  <quinot@adacore.com>
339
340         * sem_util.adb (Collect_Primitive_Operations): A function with an
341         anonymous access result designating T is a primitive operation of T.
342
343 2010-10-19  Tristan Gingold  <gingold@adacore.com>
344
345         * init.c: On Alpha/VMS, only adjust PC for HPARITH.
346
347 2010-10-19  Tristan Gingold  <gingold@adacore.com>
348
349         * sem_attr.adb (Eval_Attribute): Handle Attribute_Ref, which can be
350         evaluated on VMS.
351
352 2010-10-19  Ed Schonberg  <schonberg@adacore.com>
353
354         * sem_ch12.adb (Check_Generic_Child_Unit): Handle properly the case of
355         an instantiation of a renaming of the implicit generic child that
356         appears within an instance of its parent.
357
358 2010-10-19  Thomas Quinot  <quinot@adacore.com>
359
360         * exp_ch9.adb: Minor reformatting.
361         * einfo.adb, einfo.ads, atree.adb, atree.ads, exp_dist.adb, atree.h:
362         (Referenced_Object): Remove unused entity attribute.
363         (Direct_Primitive_Operations): Move to Elist10, this is set for all
364         tagged types, including synchronous ones, so can't use field15 which is
365         used as Storage_Size_Variable for task types and Entry_Bodies_Array for
366         protected types.
367         (Add_RACW_Primitive_Declarations_And_Bodies): Remove bogus guard
368         against Concurrent_Types (we must handle the case of a RACW designating
369         a class-wide private synchronous type).
370         Use Direct_Primitive_Operations, not Primitive_Operations, since we
371         really want the former.
372
373 2010-10-19  Bob Duff  <duff@adacore.com>
374
375         * sem_ch8.adb (Pop_Scope): Change "return;" to "raise Program_Error;".
376
377 2010-10-19  Javier Miranda  <miranda@adacore.com>
378
379         * exp_ch4.adb (Expand_Set_Membership.Make_Cond): Add missing support
380         for N_Range nodes.
381
382 2010-10-19  Thomas Quinot  <quinot@adacore.com>
383
384         * einfo.ads, atree.ads: Minor comment fixes.
385
386 2010-10-18  Bob Duff  <duff@adacore.com>
387
388         * sinfo.ads, sinfo.adb: Modify comment about adding fields to be more
389         correct, and to be in a more convenient order.
390         (Default_Storage_Pool): New field of N_Compilation_Unit_Aux, for
391         recording the Default_Storage_Pool for a parent library unit.
392         * einfo.ads (Etype): Document the case in which Etype can be Empty.
393         * sem_prag.adb (Pragma_Default_Storage_Pool): Analyze the new
394         Default_Storage_Pool pragma.
395         * sem.ads (Save_Default_Storage_Pool): Save area for push/pop scopes.
396         * gnat_ugn.texi: Document Default_Storage_Pool as a new configuration
397         pragma.
398         * freeze.adb (Freeze_Entity): When freezing an access type, take into
399         account any Default_Storage_Pool pragma that applies. We have to do
400         this at the freezing point, because up until that point, a Storage_Pool
401         or Storage_Size clause could occur, which should override the
402         Default_Storage_Pool.
403         * par-prag.adb: Add this pragma to the list of pragmas handled entirely
404         during semantics.
405         * sem_ch8.adb (Push_Scope, Pop_Scope): Save and restore the
406         Default_Storage_Pool information.
407         * opt.ads (Default_Pool, Default_Pool_Config): New globals for recording
408         currently-applicable Default_Storage_Pool pragmas.
409         * opt.adb: Save/restore the globals as appropriate.
410         * snames.ads-tmpl (Name_Default_Storage_Pool,
411         Pragma_Default_Storage_Pool): New pragma name.
412
413 2010-10-18  Vincent Celier  <celier@adacore.com>
414
415         * make.adb (Switches_Of): Put the spec and body suffix in canonical
416         case.
417
418 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
419
420         * sem_ch13.adb (Analyze_Aspect_Specifications): If subprogram is at the
421         library level, the pre/postconditions must be treated as global
422         declarations, i.e. placed on the Aux_Decl nodes of the compilation unit.
423         * freeze.adb (Freeze_Expression): If the expression is at library level
424         there is no enclosing record to check.
425
426 2010-10-18  Javier Miranda  <miranda@adacore.com>
427
428         * sem_ch3.ads (Find_Type_Name): Add documentation.
429         * sem_ch3.adb (Analyze_Full_Type_Declaration): Code cleanup because the
430         propagation of the class-wide entity is now done by routine
431         Find_Type_Name to factorize this code.
432         (Analyze_Private_Extension_Declaration): Handle private type that
433         completes an incomplete type.
434         (Tag_Mismatch): Add error message for tag mismatch in a private type
435         declaration that completes an incomplete type.
436         (Find_Type_Name): Handle completion of incomplete type by means of
437         a private declaration. Generate an error if a tagged incomplete type
438         is completed by an untagged private type.
439         * sem_ch7.adb (New_Private_Type): Handle private type that completes an
440         incomplete type.
441         * einfo.ads (Full_View): Add documentation.
442
443 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
444
445         * sem_ch12.adb (Analyze_Formal_Package_Declaration): If the package is
446         a renaming, generate a reference for it before analyzing the renamed
447         entity, to prevent spurious warnings.
448
449 2010-10-18  Jose Ruiz  <ruiz@adacore.com>
450
451         * adaint.c (__gnat_pthread_setaffinity_np,
452         __gnat_pthread_attr_setaffinity_np): Remove wrappers, no longer needed.
453         * s-osinte-linux.ads (pthread_setaffinity_np,
454         pthread_attr_setaffinity_np): Remove use of wrappers.
455         * s-taprop-linux.adb (Create_Task, Initialize): Restore check to verify
456         whether the affinity functionality is available in the OS.
457         * gcc-interface/utils.c: Set TREE_STATIC on functions only when there
458         are defined.
459
460 2010-10-18  Robert Dewar  <dewar@adacore.com>
461
462         * einfo.ads, einfo.adb: Minor reformatting.
463         * gnat_ugn.texi, ug_words: Add missing entries, fix typos.
464
465 2010-10-18  Emmanuel Briot  <briot@adacore.com>
466
467         * g-comlin.adb (Is_In_Config): When the switch accepts either a space
468         or equal, we output an equal every time.
469
470 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
471
472         * sem_res.adb (Resolve_Entry_Call): Handle call to an entry family
473         member when pre/post conditions are present.
474         * exp_ch9.adb (Build_PPC_Wrapper): The PPC_Wrapper for an entry family
475         includes an index parameter, and the name of the enclosed entry call is
476         an indexed component.
477
478 2010-10-18  Robert Dewar  <dewar@adacore.com>
479
480         * einfo.ads, einfo.adb: Minor reformatting.
481
482 2010-10-18  Jose Ruiz  <ruiz@adacore.com>
483
484         * adaint.c (__gnat_pthread_setaffinity_np,
485         __gnat_pthread_attr_setaffinity_np): Add these wrappers which check the
486         availability of the underlying OS functionality before calling.
487         * s-osinte-linux.ads (pthread_setaffinity_np,
488         pthread_attr_setaffinity_np): Call a wrapper instead of the OS function
489         to perform a check of its availability.
490         * s-taprop-linux.adb (Create_Task): Remove the check to verify whether
491         the affinity functionality is available in the OS. Now done in a wrapper
492         * gcc-interface/Makefile.in: Remove vmshandler.asm, unused.
493         * gcc-interface/Make-lang.in: Update dependencies.
494
495 2010-10-18  Robert Dewar  <dewar@adacore.com>
496
497         * sinfo.ads, sinfo.adb: Change Has_Pragma_CPU to Flag14 (Flag10 is
498         standard field).
499
500 2010-10-18  Robert Dewar  <dewar@adacore.com>
501
502         * s-stausa.adb, s-taprop-linux.adb, s-taprop-mingw.adb, s-tassta.ads:
503         Minor reformatting.
504
505 2010-10-18  Robert Dewar  <dewar@adacore.com>
506
507         * exp_strm.adb (Build_Elementary_Input_Call): Check
508         No_Default_Stream_Attributes.
509         (Build_Elementary_Write_Call): Check No_Default_Stream_Attributes
510         * s-rident.ads: Add restriction No_Default_Stream_Attributes
511         Put restriction No_Allocators_After_Elaboration in alpha order
512
513 2010-10-18  Jose Ruiz  <ruiz@adacore.com>
514
515         * exp_ch9.adb (Expand_N_Task_Type_Declaration): Add field corresponding
516         to the affinity when expanding the task declaration.
517         (Make_Task_Create_Call): Add the affinity parameter to the call to
518         create task.
519         * sem_prag.adb (Analyze_Pragma): Add the analysis for pragma CPU,
520         taking into account the case when it applies to a subprogram (only for
521         main and with static expression) or to a task.
522         * par_prag.adb:(Prag): Make pragma CPU a valid one.
523         * snames.ads-tmpl (Name_uCPU, Name_CPU): Add these new name identifiers
524         used by the expander for handling the affinity parameter when creating
525         a task.
526         (Pragma_Id): Add Pragma_CPU as a valid one.
527         * rtsfind.ads (RTU_Id): Make System_Multiprocessors accesible.
528         (RE_Id, RE_Unit_Table): Make the entities RE_CPU_Range and
529         RE_Unspecified_CPU visible.
530         * sinfo.ads, sinfo.adb (Has_Pragma_CPU, Set_Has_Pragma_CPU): Add these
531         two subprograms to set/get the flag indicating whether there is a
532         pragma CPU which applies to the entity.
533         * lib.ads, lib.adb (Unit_Record, Default_Main_CPU, Main_CPU,
534         Set_Main_CPU): Add the field Main_CPU to Unit_Record to store the value
535         of the affinity associated to the main subprogram (if any).
536         Default_Main_CPU is used when no affinity is set. Subprograms
537         Set_Main_CPU and Main_CPU are added to set/get the affinity of the main
538         subprogram.
539         * ali.ads, ali.adb (ALIs_Record): Add field Main_CPU to contain the
540         value of the affinity of the main subprogram.
541         (Scan_ALI): Get the affinity of the main subprogram (encoded as C=XX in
542         the M line).
543         * lib-writ.ads, lib-writ.adb (M_Parameters): Encode the affinity of the
544         main subprogram in the M (main) line using C=XX.
545         * lib-load.adb (Create_Dummy_Package_Unit, Load_Main_Source,
546         Load_Unit): Add new field Main_CPU.
547         * bindgen.adb (Gen_Adainit_Ada, Gen_Adainit_C): Add the code to pass
548         the affinity of the main subprogram to the run time.
549         * s-taskin.ads (Common_ATCB): Add the field Base_CPU to store the
550         affinity.
551         (Unspecified_CPU): Add this constant to identify the case when no
552         affinity is set for tasks.
553         * s-taskin.adb (Initialize_ATCB): Store the value coming from pragma
554         CPU in the common part of the ATCB.
555         (Initialize): Store the value coming from pragma CPU (for the
556         environment task) in the common part of the ATCB.
557         * s-tassta.ads, s-tassta.adb (Create_Task): Add the affinity specified
558         by pragma CPU to the ATCB.
559         * s-tarest.ads, s-tarest.adb (Create_Restricted_Task): Add the affinity
560         specified by pragma CPU to the ATCB.
561         * s-tporft.adb (Register_Foreign_Thread): Add the new affinity
562         parameter to the call to Initialize_ATCB.
563         * s-taprop-linux.adb (Create_Task): Change the attributes of the thread
564         to include the task affinity before creation. Additionally, the
565         affinity selected with Task_Info is also enforced changing the
566         attributes at task creation time, instead of changing it after creation.
567         (Initialize): Change the affinity of the environment task if required
568         by a pragma CPU.
569         * s-osinte-linux.ads (pthread_setaffinity_np): Instead of using a
570         wrapper to check whether the function is available or not, use a weak
571         symbol.
572         (pthread_attr_setaffinity_np): Add the import of this function which is
573         used to change the affinity in the attributes used to create a thread.
574         * adaint.c (__gnat_pthread_attr_setaffinity_np): Remove this wrapper.
575         It was used to check whether the pthread function was available or not,
576         but the use of a weak symbol handles this situation in a cleaner way.
577         * s-taprop-mingw.adb (Create_Task, Initialize): Change the affinity of
578         tasks (including the environment task) if required by a pragma CPU.
579         * s-taprop-solaris.adb (Enter_Task): Change the affinity of tasks
580         (including the environment task) if required by a pragma CPU.
581         * s-taprop-vxworks.adb (Create_Task, Initialize): Change the affinity
582         of tasks (including the environment task) if required by a pragma CPU.
583         * init.c (__gl_main_cpu): Make this value visible to the run time. It
584         will pass the affinity of the environment task.
585
586 2010-10-18  Javier Miranda  <miranda@adacore.com>
587
588         * einfo.adb (Direct_Primitive_Operations): Complete assertion.
589
590 2010-10-18  Vincent Celier  <celier@adacore.com>
591
592         * prj.ads (Source_Data): New Boolean flag In_The_Queue.
593
594 2010-10-18  Tristan Gingold  <gingold@adacore.com>
595
596         * s-stausa.ads: Add the Top parameter to Initialize_Analyzer.
597         * s-stausa.adb: Use the top parameter.  In Fill_Stack, use the
598         stack top if known.
599         * s-tassta.adb (Task_Wrapper): Call Initialize_Analyzer after Enter_Task
600         so that Pri_Stack_Info.Limit can be set and used.
601
602 2010-10-18  Robert Dewar  <dewar@adacore.com>
603
604         * einfo.ads: Minor reformatting.
605         * sem_res.adb (Resolve_Allocator): Add test for violating
606         No_Anonymous_Allocators.
607
608 2010-10-18  Robert Dewar  <dewar@adacore.com>
609
610         * prj-nmsc.adb, prj.adb, sem_res.adb: Minor reformatting.
611
612 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
613
614         * sem_util.adb (Insert_Explicit_Dereference): If operand is a selected
615         component, we generate a reference to the ultimate prefix when it is an
616         entity name. We must place the reference on the identifier for that
617         prefix, and not on the operand itself, to prevent spurious extra
618         references in the ali file.
619
620 2010-10-18  Vincent Celier  <celier@adacore.com>
621
622         * projects.texi: Add documentation for attribute Ignore_Source_Sub_Dirs
623
624 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
625
626         * einfo.ads, einfo.adb: New attribute PPC_Wrapper for entries and entry
627         families. Denotes a procedure that performs pre/postcondition checks
628         and then performs the entry call.
629         * sem_res.adb (Resolve_Entry_Call): If the entry has
630         pre/postconditions, replace call with a call to the PPC_Wrapper of the
631         entry.
632         * exp_ch9.adb (Build_PPC_Wrapper): new procedure.
633         (Expand_N_Entry_Declaration, Expand_N_Protected_Type_Declaration): call
634         Build_PPC_Wrapper for all entries in task and protected definitions.
635
636 2010-10-18  Tristan Gingold  <gingold@adacore.com>
637
638         * init.c: Add __gnat_set_stack_guard_page and __gnat_set_stack_limit.
639         Implement stack limitation on VMS.
640         Minor reformatting.
641
642 2010-10-18  Vincent Celier  <celier@adacore.com>
643
644         * prj.adb (Is_Compilable): Do not modify Source.Compilable until the
645         source record has been initialized.
646
647 2010-10-18  Robert Dewar  <dewar@adacore.com>
648
649         * einfo.adb: Minor code reorganization (Primitive_Operations is a
650         synthesized attribute routine and was in the wrong place).
651
652 2010-10-18  Tristan Gingold  <gingold@adacore.com>
653
654         * init.c: Indentation, and minor changes to more closely follow GNU
655         style rules.  Make more variable statics.
656
657 2010-10-18  Vincent Celier  <celier@adacore.com>
658
659         * prj.adb (Is_Compilable): On first call for a source, cache value in
660         component Compilable.
661         * prj.ads (Source_Data): New component Compilable, to cache the value
662         returned by function Is_Compilable.
663
664 2010-10-18  Vincent Celier  <celier@adacore.com>
665
666         * prj-attr.adb: New project level attribute Ignore_Source_Sub_Dirs.
667         * prj-nmsc.adb (Expand_Subdirectory_Pattern): New string list parameter
668         Ignore.
669         (Recursive_Find_Dirs): Do not consider subdirectories listed in Ignore.
670         (Get_Directories): Call Find_Source_Dirs with the string list
671         indicated by attribute Ignore_Source_Sub_Dirs.
672         * snames.ads-tmpl: New standard name Ignore_Source_Sub_Dirs.
673
674 2010-10-18  Javier Miranda  <miranda@adacore.com>
675
676         * einfo.ads, einfo.adb (Primitive_Operations): New synthesized
677         attribute.
678         (Direct_Primitive_Operations): Renaming of old Primitive_Operations.
679         (Set_Direct_Primitive_Operations): Renaming of old
680         Set_Primitive_Operations. Update documentation
681         * sem_ch3.adb, exp_util.adb, sem_ch7.adb, sem_ch8.adb, exp_ch3.adb:
682         Replace occurrences of Set_Primitive_Operations by
683         Set_Direct_Primitive_Operations.
684         * sem_cat.adb (Validate_RACW_Primitives): No action needed for tagged
685         concurrent types.
686         * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): Do not
687         process primitives of concurrent types.
688         * lib-xref.adb (Generate_Prim_Op_References): Minor code cleanup.
689
690 2010-10-18  Eric Botcazou  <ebotcazou@adacore.com>
691
692         * exp_ch6.adb (Expand_N_Subprogram_Declaration): Use Freeze_Before.
693         (Expand_Protected_Object_Reference): Likewise.
694         * sem_attr.adb (Resolve_Attribute): Likewise.
695         * sem_ch3.adb (Analyze_Subtype_Declaration): Likewise.
696         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Likewise.
697
698 2010-10-18  Arnaud Charlet  <charlet@adacore.com>
699
700         * g-comlin.adb (Get_Switches): Prevent dereferencing null Config.
701
702 2010-10-18  Robert Dewar  <dewar@adacore.com>
703
704         * aspects.ads, aspects.adb: Add entries for aspects
705         Read/Write/Input/Output.
706         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing for
707         handling aspects Read/Write/Input/Output.
708
709 2010-10-18  Robert Dewar  <dewar@adacore.com>
710
711         * sem_util.adb (Note_Possible_Modification): Do not give warning for
712         use of pragma Unmodified unless we are sure this is a modification.
713
714 2010-10-18  Tristan Gingold  <gingold@adacore.com>
715
716         * sysdep.c: Add __gnat_get_stack_bounds.
717         * s-taprop-mingw.adb Call __gnat_get_stack_bounds to set Pri_Stack_Info.
718
719 2010-10-18  Robert Dewar  <dewar@adacore.com>
720
721         * a-assert.ads: Fix bad name in header.
722         * sem_ch4.adb, sem_ch6.adb, sem_ch7.adb, sem_ch10.adb: Minor
723         reformatting.
724         * exp_aggr.adb: Fix typo in comment.
725
726 2010-10-18  Javier Miranda  <miranda@adacore.com>
727
728         * exp_util.adb (Side_Effect_Free): Code clean up.
729
730 2010-10-18  Ed Schonberg  <schonberg@adacore.com>
731
732         * sem_ch8.adb (Is_Primitive_Operator_In_Use): Renamed from
733         Is_Primitive_Operator. When ending the scope of a use package scope, a
734         primitive operator remains in use if the base type has a current use
735         (type) clause.
736
737 2010-10-18  Javier Miranda  <miranda@adacore.com>
738
739         * einfo.ads (Is_Dynamic_Support): Add missing support for limited
740         private types whose full-view is a task type.
741         * sem_util.adb (Enclosing_Subprogram): Add missing support for limited
742         private types whose full-view is a task type.
743         * exp_ch7.adb (Find_Final_List): Minor code cleanup replacing code by
744         function Nearest_Dynamic_Scope which provides the needed functionality.
745
746 2010-10-18  Arnaud Charlet  <charlet@adacore.com>
747
748         * sem_prag.adb (Set_Exported): Do not generate error when exporting a
749         variable with an address clause in codepeer mode.
750
751 2010-10-18  Robert Dewar  <dewar@adacore.com>
752
753         * g-trasym-vms-ia64.adb: Minor reformatting.
754
755 2010-10-18  Thomas Quinot  <quinot@adacore.com>
756
757         * sem_type.adb (Covers): If either argument is Standard_Void_Type and
758         the other isn't, return False early.
759
760 2010-10-18  Ed Falis  <falis@adacore.com>
761
762         * s-vxwext-rtp.ads, s-vxext-rtp.adb: Adapt for missing APIs for RTPs in
763         VxWorks Cert.
764
765 2010-10-18  Robert Dewar  <dewar@adacore.com>
766
767         * sem_disp.ads: Minor comment update.
768
769 2010-10-18  Robert Dewar  <dewar@adacore.com>
770
771         * einfo.ads, einfo.adb (Spec_PPC_List): Is now present in Entries
772         * sem_ch3.adb (Analyze_Declarations): Add processing for delaying
773         visibility analysis of precondition and postcondition pragmas (and
774         Pre/Post aspects).
775         * sem_ch6.adb (Process_PPCs): Add handling of inherited Pre'Class
776         aspects.
777         * sem_ch7.adb (Analyze_Package_Specification): Remove special handling
778         of pre/post conditions (no longer needed).
779         * sem_disp.adb (Inherit_Subprograms): Deal with interface case.
780         * sem_prag.adb (Analyze_PPC_In_Decl_Part): Remove analysis of message
781         argument, since this is now done in the main processing for
782         pre/postcondition pragmas when they are first seen.
783         (Chain_PPC): Pre'Class and Post'Class now handled properly
784         (Chain_PPC): Handle Pre/Post aspects for entries
785         (Check_Precondition_Postcondition): Handle entry declaration case
786         (Check_Precondition_Postcondition): Handle delay of visibility analysis
787         (Check_Precondition_Postcondition): Preanalyze message argument if
788         present.
789
790 2010-10-18  Robert Dewar  <dewar@adacore.com>
791
792         * g-trasym-vms-ia64.adb, prj-nmsc.adb, prj.ads: Minor reformatting.
793
794 2010-10-14  Eric Botcazou  <ebotcazou@adacore.com>
795
796         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Set
797         TREE_THIS_NOTRAP on the INDIRECT_REF node built for the template.
798         * gcc-interface/trans.c (Identifier_to_gnu): Set TREE_THIS_NOTRAP on
799         the INDIRECT_REF node built for objects used by reference.
800         * gcc-interface/utils2.c (build_binary_op): Add short-circuit for
801         constant result. Set TREE_THIS_NOTRAP on ARRAY_REF and ARRAY_RANGE_REF.
802         (gnat_stabilize_reference_1): Propagate the TREE_THIS_NOTRAP flag.
803
804 2010-10-13  Richard Henderson  <rth@redhat.com>
805
806         * gcc-interface/misc.c (gnat_eh_personality): Update call to
807         build_personality_function.
808         * raise-gcc.c (PERSONALITY_FUNCTION): Change to match other languages;
809         use__gnat_personality_{v,sj}0.
810
811 2010-10-12  Vincent Celier  <celier@adacore.com>
812
813         * prj-nmsc.adb (Add_Source): Put source in hash table Source_Files_HT
814         (Process_Exceptions_File_Based): Use hash table Source_Files_HT instead
815         of iterating through all sources of the project.
816         * prj.adb (Free): Reset hash table Source_Files_HT
817         (Reset): Reset hash table Source_Files_HT
818         * prj.ads (Source_Data): New component Next_With_File_Name
819         (Source_Files_Htable): New hash table
820         (Project_Tree_Data): New component Source_Files_HT
821
822 2010-10-12  Tristan Gingold  <gingold@adacore.com>
823
824         * g-trasym-vms-ia64.adb: Use the documented API.
825         * gcc-interface/Makefile.in: Always set NO_REORDER_ADAFLAGS.
826         * gcc-interface/Make-lang.in: Update dependencies.
827
828 2010-10-12  Thomas Quinot  <quinot@adacore.com>
829
830         * rtsfind.ads, exp_dist.adb, exp_dist.ads (Build_General_Calling_Stubs,
831         PolyORB case): Request is now a controlled type: we can declare the
832         request on the stack, and we do not need explicit cleanup actions
833         anymore.
834
835 2010-10-12  Bob Duff  <duff@adacore.com>
836
837         * s-rident.ads (Profile_Info): This variable is now constant.
838
839 2010-10-12  Emmanuel Briot  <briot@adacore.com>
840
841         * g-comlin.adb, g-comlin.ads (Define_Switch): Put back (unused)
842         parameter Separator for backward compatibility.
843
844 2010-10-12  Robert Dewar  <dewar@adacore.com>
845
846         * sem_ch9.adb, par-ch9.adb, impunit.adb: Minor reformatting.
847
848 2010-10-12  Vincent Celier  <celier@adacore.com>
849
850         * debug.adb: Put detailed documentation for gnatmake switch -dm.
851
852 2010-10-12  Vincent Celier  <celier@adacore.com>
853
854         * gnat1drv.adb: When the compiler is invoked for a spec that needs aw
855         body, do not generate an ALI file if neither -gnatc nor -gnatQ is used.
856
857 2010-10-12  Arnaud Charlet  <charlet@adacore.com>
858
859         * g-comlin.adb (Foreach_Switch): Make this procedure generic to avoid
860         using 'Access.
861
862 2010-10-12  Robert Dewar  <dewar@adacore.com>
863
864         * debug.adb: Add comment.
865         * gnatcmd.adb, sem_ch6.adb, switch-m.adb: Minor reformatting.
866
867 2010-10-12  Javier Miranda  <miranda@adacore.com>
868
869         * exp_util.adb (Side_Effect_Free): Return true for object renaming
870         declarations that were previously generated by Remove_Side_Effects.
871
872 2010-10-12  Emmanuel Briot  <briot@adacore.com>
873
874         * xref_lib.adb (Get_Full_Type): Display "private variable" instead of
875         "???" when an entity is defined as "*" in the ALI file.
876         * g-comlin.ads, g-comlin.adb: Fix handling of null parameters.
877         Minor reformatting.
878
879 2010-10-12  Emmanuel Briot  <briot@adacore.com>
880
881         * g-comlin.adb, g-comlin.ads (Display_Help, Getopt, Current_Section,
882         Set_Usage): New subprograms.
883         (Define_Switch): Change profile to add support for help messages and
884         long switches.
885
886 2010-10-12  Javier Miranda  <miranda@adacore.com>
887
888         * sem_ch6.adb (New_Overloaded_Entity): Add missing decoration of
889         attribute Overridden_Operation in predefined dispatching primitives. 
890
891 2010-10-12  Emmanuel Briot  <briot@adacore.com>
892
893         * g-comlin.adb, g-comlin.ads (Add_Switch): Raise an exception when a
894         command line configuration exists and we specify an invalid section.
895
896 2010-10-12  Robert Dewar  <dewar@adacore.com>
897
898         * sem_ch6.adb (Process_PPCs): Fix error in inheriting Pre'Class when no
899         exception messages are generated.
900         (Process_PPCs): Fix error in inheriting Pre'Class.
901
902 2010-10-12  Jose Ruiz  <ruiz@adacore.com>
903
904         * gnatcmd.adb: Use response file for GNATstack.
905         (Check_Files): Pass the list of ci files for GNATstack using a response
906         file to avoid problems with command line length.
907         Factor out the code handling response file into a new procedure named
908         Add_To_Response_File.
909
910 2010-10-12  Vincent Celier  <celier@adacore.com>
911
912         * debug.adb: For gnatmake, document the meaning of -dm
913         * make.adb (Gnatmake): If -dm is used, indicate the maximum number of
914         simultaneous compilations.
915         * switch-m.adb (Scan_Make_Switches): Allow -j0, meaning as many
916         simultaneous compilations as the number of processors.
917
918 2010-10-12  Joseph Myers  <joseph@codesourcery.com>
919
920         * gcc-interface/Make-lang.in (ada/misc.o): Use $(OPTIONS_H)
921         instead of options.h.
922
923 2010-10-12  Robert Dewar  <dewar@adacore.com>
924
925         * gnat_rm.texi: Clarify that 'Old can be used in preconditions and
926         postcondition pragmas.
927
928 2010-10-12  Robert Dewar  <dewar@adacore.com>
929
930         * errout.ads, erroutc.adb: The # insertion now handles from in place of
931         at.
932         * exp_prag.adb (Expand_Pragma_Check): Suppress generated default
933         message if new switch Exception_Locations_Suppressed is set.
934         (Expand_Pragma_Check): Revised wording for default message for case
935         of precondition or postcondition.
936         * namet.ads, namet.adb (Build_Location_String): New procedure.
937         * opt.ads (List_Inherited_Pre_Post): New flag.
938         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Add call to
939         list inherited pre/post aspects.
940         * sem_ch13.adb (Analyze_Aspect_Specification): Improve generation of
941         messages for precondition/postcondition cases.
942         * sem_ch6.adb (Process_PPCs): General cleanup, and list inherited PPC's
943         if flag List_Inherited_Pre_Post is set True.
944         (Process_PPCs): Add initial handling for inherited preconditions
945         (List_Inherited_Pre_Post_Aspects): New procedure
946         * sem_ch6.ads (List_Inherited_Pre_Post_Aspects): New procedure
947         * sem_disp.adb (Inherited_Subprograms): New function
948         * sem_disp.ads (Inherited_Subprograms): New function
949         * sem_prag.adb (Check_Duplicate_Pragma): Clean up handling of
950         pre/postcondition.
951         (Check_Precondition_Postcondition): Check for inherited aspects
952         * sem_warn.adb: Process -gnatw.l/w.L setting List_Inherited_Pre_Post
953         * sinfo.ads, sinfo.adb (Split_PPC): New flag.
954         * sinput.ads, sinput.adb (Build_Location_String): New function.
955         * usage.adb: Add line for -gnatw.l/-gnatw.L
956
957 2010-10-12  Javier Miranda  <miranda@adacore.com>
958
959         * exp_util.adb (Remove_Side_Effects): Remove wrong code.
960
961 2010-10-12  Arnaud Charlet  <charlet@adacore.com>
962
963         * xref_lib.adb: Add handling of j/J letters.
964
965 2010-10-12  Pascal Obry  <obry@adacore.com>
966
967         * adaint.c (__gnat_number_of_cpus): Add implementation for Windows.
968
969 2010-10-12  Arnaud Charlet  <charlet@adacore.com>
970
971         * make.adb (Globalize): New procedure.
972         (Compile): Set Do_Codepeer_Globalize_Step when -gnatC is used.
973         (Gnatmake): Call Globalize when needed.
974         (Process_Restrictions_Or_Restriction_Warnings): Ignore Restrictions
975         pragmas in CodePeer mode.
976         (Adjust_Global_Switches): Set No_Initialize_Scalars in CodePeer mode,
977         to generate simpler and consistent code.
978
979 2010-10-12  Bob Duff  <duff@adacore.com>
980
981         * exp_util.adb (Remove_Side_Effects): Disable previous change,
982         can cause side effects to be duplicated.
983
984 2010-10-12  Robert Dewar  <dewar@adacore.com>
985
986         * sem_ch6.adb (Process_PPCs): Handle inherited postconditions.
987
988 2010-10-12  Arnaud Charlet  <charlet@adacore.com>
989
990         * exp_disp.adb (Set_All_DT_Position): Disable emit error message on
991         abstract inherited private operation in CodePeer mode.
992
993 2010-10-12  Thomas Quinot  <quinot@adacore.com>
994
995         * a-exetim.ads: Minor reformatting.
996         * g-socket.ads (Port_Type): Better definition corresponding to the
997         actual standard range.
998         * exp_ch5.adb: Add comment.
999         * sem_aux.adb: Minor reformatting.
1000
1001 2010-10-12  Ed Schonberg  <schonberg@adacore.com>
1002
1003         * sem_ch12.adb (Copy_Generic_Node): If node is a string literal, remove
1004         string_literal_subtype so that a new one can be constructed in the
1005         scope of the instance.
1006
1007 2010-10-12  Robert Dewar  <dewar@adacore.com>
1008
1009         * exp_ch9.adb (Has_Pragma_Priority): New name for Has_Priority_Pragma
1010         * gnat_rm.texi (pragma Suppress_All): Document new placement rules
1011         * par-prag.adb (P_Pragma, case Suppress_All): Set
1012         Has_Pragma_Suppress_All flag.
1013         * sem_prag.adb (Has_Pragma_Priority): New name for Has_Priority_Pragma
1014         (Analyze_Pragma, case Suppress_All): Remove placement check
1015         (Process_Compilation_Unit_Pragmas): Use Has_Pragma_Suppress_All flag
1016         * sem_prag.ads (Process_Compilation_Unit_Pragmas): Update documentation
1017         * sinfo.adb (Has_Pragma_Suppress_All): New flag
1018         (Has_Pragma_Priority): New name for Has_Priority_Pragma
1019         * sinfo.ads (Has_Pragma_Suppress_All): New flag
1020         (Has_Pragma_Priority): New name for Has_Priority_Pragma
1021
1022 2010-10-12  Arnaud Charlet  <charlet@adacore.com>
1023
1024         * lib-xref.ads: Mark j/J as reserved for C++ classes.
1025
1026 2010-10-12  Jose Ruiz  <ruiz@adacore.com>
1027
1028         * a-exetim-default.ads, a-exetim-posix.adb: New.
1029         * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS for linux): Use the
1030         POSIX Realtime support to implement CPU clocks.
1031         (EXTRA_GNATRTL_TASKING_OBJS for linux): Add the a-exetim.o object
1032         to the tasking library.
1033         (THREADSLIB): Make the POSIX.1b Realtime Extensions library (librt)
1034         available for shared libraries.
1035         * gcc-interface/Make-lang.in: Update dependencies.
1036
1037 2010-10-12  Robert Dewar  <dewar@adacore.com>
1038
1039         * sem_ch13.adb (Analyze_Aspect_Specifications): For Pre/Post, break
1040         apart expressions with AND THEN clauses into separate pragmas.
1041         * sinput.ads, sinput.adab (Get_Logical_Line_Number_Img): New function.
1042
1043 2010-10-12  Robert Dewar  <dewar@adacore.com>
1044
1045         * par-ch13.adb (P_Aspect_Specifications): Fix handling of 'Class
1046         aspects.
1047         * sem_ch13.adb (Analyze_Aspect_Specifications): Fix bad Sloc on aspects
1048         * sem_prag.adb (Fix_Error): Only change pragma names for pragmas from
1049         aspects.
1050         (Check_Optional_Identifier): Handle case of direct arguments
1051         (Chain_PPC): Test for abstract case, giving appropriate messages
1052         * sinfo.ads, sinfo.adb (Class_Present): Allowed on N_Pragma node
1053
1054 2010-10-12  Robert Dewar  <dewar@adacore.com>
1055
1056         * par-endh.adb (Check_End): Don't swallow semicolon or aspects after
1057         END RECORD.
1058         * sem_attr.adb (Eval_Attribute): Code clean up.
1059
1060 2010-10-12  Robert Dewar  <dewar@adacore.com>
1061
1062         * par-ch12.adb (P_Formal_Private_Type_Definition): Improve error
1063         messages and recovery for case of out of order Abstract/Tagged/Private
1064         keywords.
1065         * par-ch3.adb (P_Type_Declaration): Improve error messages and recovery
1066         for case of out of order Abstract/Tagged/Private keywords.
1067
1068 2010-10-12  Ed Schonberg  <schonberg@adacore.com>
1069
1070         * inline.adb (Analyze_Inlined_Bodies): Restrict previous change to case
1071         where child unit is main unit of compilation.
1072
1073 2010-10-12  Robert Dewar  <dewar@adacore.com>
1074
1075         * aspects.ads, aspects.adb (Move_Aspects): New procedure.
1076         * atree.ads, atree.adb: (New_Copy): Does not copy aspect specifications
1077         * sinfo.ads, par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb,
1078         par-endh.adb, par-ch13.adb, par-ch12.adb: Modify grammar to include
1079         aspect specifications.
1080         Recognize aspect specifications for all cases
1081         * par.adb: Recognize aspect specifications for all cases
1082         * sem_ch12.ads, sem_ch12.adb (Copy_Generic_Node): Copies aspect
1083         specifications.
1084         * sem_ch3.adb (Analyze_Subtype_Declaration): Improve patch to freeze
1085         generic actual types (was missing some guards before).
1086         * sem_ch9.adb (Analyze_Single_Protected_Declaration): Copy aspects to
1087         generated object
1088         (Analyze_Single_Task_Declaration): Copy aspects to generated object
1089
1090 2010-10-12  Eric Botcazou  <ebotcazou@adacore.com>
1091
1092         * usage.adb (usage): Adjust line for -gnatn switch.
1093
1094 2010-10-12  Robert Dewar  <dewar@adacore.com>
1095
1096         * sem_attr.adb (Eval_Attribute): Only leave change active for aspect
1097         spec case.
1098
1099 2010-10-12  Ed Schonberg  <schonberg@adacore.com>
1100
1101         * sem_ch6.adb (Analyze_Subprogram_Declaration): If this is a
1102         declaration of a null procedure resolve the types of the profile of the
1103         generated null body now.
1104
1105 2010-10-11  Robert Dewar  <dewar@adacore.com>
1106
1107         * debug.adb: Remove d.A flag to delay address clause (not needed any
1108         more). Add d.A flag to enable tree read/write of aspect spec hash table
1109         * sem_ch13.adb (Analyze_Aspect_Specifications): Properly delay address
1110         clause.
1111         (Rep_Item_Too_Late): No need for special processing for delayed rep
1112         items (and it caused difficulties in the address case).
1113         * tree_gen.adb: Only write aspect spec hash table if -gnatd.A is set
1114         * tree_in.adb: Only write aspect spec hash table if -gnatd.A is set
1115
1116 2010-10-11  Pat Rogers  <rogers@adacore.com>
1117
1118         * gnat_ugn.texi: Minor editing.
1119
1120 2010-10-11  Nathan Froyd  <froydnj@codesourcery.com>
1121
1122         * gcc-interface/utils2.c (gnat_build_constructor): Use VEC_qsort.
1123
1124 2010-10-11  Robert Dewar  <dewar@adacore.com>
1125
1126         * g-htable.ads (Get_First): New procedural version for Simple_HTable
1127         (Get_Next): New procedural version for Simple_HTable
1128         * s-htable.adb (Get_First): New procedural version for Simple_HTable
1129         (Get_Next): New procedural version for Simple_HTable
1130         * s-htable.ads (Get_First): New procedural version for Simple_HTable
1131         (Get_Next): New procedural version for Simple_HTable
1132
1133 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1134
1135         * sem_aggr.adb (Propagate_Discriminants): To gather the components of a
1136         variant part, use the association list of the subaggregate, which
1137         already includes the values of the needed discriminants.
1138
1139 2010-10-11  Robert Dewar  <dewar@adacore.com>
1140
1141         * aspects.ads, aspects.adb: Changes to accomodate aspect delay
1142         (Tree_Write): New procedure.
1143         * atree.ads, atree.adb: Flag3 is now Has_Aspects and applies to all
1144         nodes.
1145         * atree.h: Flag3 is now Has_Aspects and applies to all nodes
1146         * debug.adb: Add debug flag gnatd.A
1147         * einfo.adb (Has_Delayed_Aspects): New flag
1148         (Get_Rep_Item_For_Entity): New function
1149         * einfo.ads (Has_Delayed_Aspects): New flag
1150         (Get_Rep_Item_For_Entity): New function
1151         * exp_ch13.adb (Expand_N_Freeze_Entity): Insert delayed aspects into
1152         tree.
1153         * exp_ch3.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb: New calling
1154         sequence for Freeze_Entity.
1155         * freeze.ads, freeze.adb (Freeze_Entity): Takes node rather than source
1156         ptr. All calls are changed to this new interface.
1157         (Freeze_And_Append): Same change
1158         (Freeze_Entity): Evaluate deferred aspects
1159         * sem_attr.adb: New calling sequence for Freeze_Entity
1160         (Eval_Attribute): Don't try to evaluate attributes of unfrozen types
1161         when we are in spec expression preanalysis mode.
1162         * sem_ch10.adb: New calling sequence for Freeze_Entity
1163         * sem_ch11.adb: Simplify analysis of aspect specifications now that the
1164         flag Has_Aspects applies to all nodes (no need to save aspects).
1165         * sem_ch12.adb: Simplify analysis of aspect specifications now that the
1166         flag Has_Aspects applies to all nodes (no need to save aspects).
1167         * sem_ch13.adb (Analyze_Aspect_Specifications): Major rewrite to
1168         accomodate delaying aspect evaluation to the freeze point.
1169         (Duplicate_Clause): Simplify using Get_Rep_Item_For_Entity, and also
1170         accomodate delayed aspects.
1171         (Rep_Item_Too_Late): Deal with delayed aspects case
1172         * sem_ch13.ads (Rep_Item_Too_Late): Document handling of delayed
1173         aspects.
1174         * sem_ch3.adb (Analyze_Subtype_Declaration): Make sure that generic
1175         actual types are properly frozen (this is needed because of the new
1176         check in Eval_Attribute that declines to evaluate attributes
1177         for unfrozen types).
1178         Simplify analysis of aspect specifications now that the flag
1179         Has_Aspects applies to all nodes (no need to save aspects).
1180         * sem_ch3.ads (Preanalyze_Spec_Expression): Note use for delayed
1181         aspects.
1182         * sem_ch5.adb: Simplify analysis of aspect specifications now that the
1183         flag Has_Aspects applies to all nodes (no need to save aspects).
1184         New calling sequence for Freeze_Entity.
1185         * sem_ch9.adb, sem_ch7.adb, sem_ch6.adb: Simplify analysis of aspect
1186         specifications now that the flag Has_Aspects applies to all nodes
1187         (no need to save aspects).
1188         New calling sequence for Freeze_Entity
1189         * sem_prag.adb (Check_Duplicate_Pragma): Simplify using
1190         Get_Rep_Item_For_Entity
1191         (Get_Pragma_Arg): Moved to Sinfo
1192         * sinfo.ads, sinfo.adb (Aspect_Rep_Item_: New field
1193         (Is_Delayed_Aspect): New flag
1194         (Next_Rep_Item): Document use for aspects
1195         (Get_Pragma_Arg): Moved here from Sem_Prag
1196         * sprint.adb (Sprint_Aspect_Specifications): Now called after semicolon
1197         is output and removes semicolon (simplifies interface).
1198         (Sprint_Node_Actual): Simplify handling of aspects now that Has_Aspects
1199         applies to any node.
1200         * tree_gen.adb: Write contents of Aspect_Specifications hash table
1201         * tree_in.adb: Read and initialize Aspect_Specifications hash table
1202         * treepr.adb (Print_Node): Print Has_Aspects flag
1203         (Print_Node): Print Aspect_Specifications in Has_Aspects set
1204         * xtreeprs.adb: Remove obsolete references to Flag1,2,3
1205
1206 2010-10-11  Robert Dewar  <dewar@adacore.com>
1207
1208         * aspects.ads, aspects.adb: Major revision of this package for 2nd
1209         stage of aspects implementation.
1210         * gcc-interface/Make-lang.in: Add entry for aspects.o
1211         * gcc-interface/Makefile.in: Add aspects.o to GNATMAKE_OBJS
1212         * par-ch13.adb (Aspect_Specifications_Present): New function
1213         (P_Aspect_Specifications): New procedure
1214         * par-ch3.adb (P_Type_Declaration): Handle aspect specifications
1215         (P_Derived_Type_Def_Or_Private_Ext_Decl): Handle aspect specifications
1216         (P_Identifier_Declarations): Handle aspect specifications
1217         (P_Component_Items): Handle aspect specifications
1218         (P_Subtype_Declaration): Handle aspect specifications
1219         * par-ch6.adb (P_Subprogram): Handle aspect specifications
1220         * par-ch9.adb (P_Entry_Declaration): Handle aspect specifications
1221         * par.adb (Aspect_Specifications_Present): New function
1222         (P_Aspect_Specifications): New procedure
1223         * sem.adb (Analyze_Full_Type_Declaration): New name for
1224         Analyze_Type_Declaration.
1225         (Analyze_Formal_Package_Declaration): New name (add _Declaration)
1226         (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration)
1227         (Analyze_Protected_Type_Declaration): New name (add _Declaration)
1228         (Analyze_Single_Protected_Declaration): New name (add _Declaration)
1229         (Analyze_Single_Task_Declaration): New name (add _Declaration)
1230         (Analyze_Task_Type_Declaration): New name (add _Declaration)
1231         * sem_cat.adb (Analyze_Full_Type_Declaration): New name for
1232         Analyze_Type_Declaration.
1233         * sem_ch11.adb (Analyze_Exception_Declaration): Analyze aspect
1234         specifications.
1235         * sem_ch12.adb (Analyze_Formal_Object_Declaration): Handle aspect
1236         specifications.
1237         (Analyze_Formal_Package_Declaration): New name (add _Declaration)
1238         (Analyze_Formal_Package_Declaration): Handle aspect specifications
1239         (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration)
1240         (Analyze_Formal_Subprogram_Declaration): Handle aspect specifications
1241         (Analyze_Formal_Type_Declaration): Handle aspect specifications
1242         (Analyze_Generic_Package_Declaration): Handle aspect specifications
1243         (Analyze_Generic_Subprogram_Declaration): Handle aspect specifications
1244         (Analyze_Package_Instantiation): Handle aspect specifications
1245         (Analyze_Subprogram_Instantiation): Handle aspect specifications
1246         * sem_ch12.ads (Analyze_Formal_Package_Declaration): New name (add
1247         _Declaration).
1248         (Analyze_Formal_Subprogram_Declaration): New name (add _Declaration)
1249         * sem_ch13.adb (Analyze_Aspect_Specifications): New procedure
1250         (Duplicate_Clause): New function, calls to this function are added to
1251         processing for all aspects.
1252         * sem_ch13.ads (Analyze_Aspect_Specifications): New procedure
1253         * sem_ch3.adb (Analyze_Full_Type_Declaration): New name for
1254         Analyze_Type_Declaration.
1255         * sem_ch3.ads (Analyze_Full_Type_Declaration): New name for
1256         Analyze_Type_Declaration.
1257         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Analyze aspect
1258         specifications.
1259         (Analyze_Subprogram_Declaration): Analyze aspect specifications
1260         * sem_ch7.adb (Analyze_Package_Declaration): Analyze aspect
1261         specifications.
1262         (Analyze_Private_Type_Declaration): Analyze aspect specifications
1263         * sem_ch9.adb (Analyze_Protected_Type_Declaration): Analyze aspect
1264         specifications.
1265         (Analyze_Protected_Type_Declaration): New name (add _Declaration)
1266         (Analyze_Single_Protected_Declaration): Analyze aspect specifications
1267         (Analyze_Single_Protected_Declaration): New name (add _Declaration)
1268         (Analyze_Single_Task_Declaration): Analyze aspect specifications
1269         (Analyze_Single_Task_Declaration): New name (add _Declaration)
1270         (Analyze_Task_Type_Declaration): Analyze aspect specifications
1271         (Analyze_Task_Type_Declaration): New name (add _Declaration)
1272         * sem_ch9.ads (Analyze_Protected_Type_Declaration): New name (add
1273         _Declaration).
1274         (Analyze_Single_Protected_Declaration): New name (add _Declaration)
1275         (Analyze_Single_Task_Declaration): New name (add _Declaration)
1276         (Analyze_Task_Type_Declaration): New name (add _Declaration)
1277         * sem_prag.adb: Use Get_Pragma_Arg systematically so that we do not
1278         have to generate unnecessary pragma argument associations (this matches
1279         the doc).
1280         Throughout do changes to accomodate aspect specifications, including
1281         specializing messages, handling the case of not going through all
1282         homonyms, and allowing for cancellation.
1283         * sinfo.ads, sinfo.adb: Clean up obsolete documentation for Flag1,2,3
1284         (Aspect_Cancel): New flag
1285         (From_Aspect_Specification): New flag
1286         (First_Aspect): Removed flag
1287         (Last_Aspect): Removed flag
1288         * sprint.adb (Sprint_Aspect_Specifications): New procedure
1289         (Sprint_Node_Actual): Add calls to Sprint_Aspect_Specifications
1290
1291 2010-10-11  Bob Duff  <duff@adacore.com>
1292
1293         * sem_res.adb (Resolve_Actuals): Minor change to warning messages so
1294         they match in Ada 95, 2005, and 2012 modes, in the case where the
1295         language didn't change. Same thing for the run-time exception message.
1296
1297 2010-10-11  Javier Miranda  <miranda@adacore.com>
1298
1299         * debug.adb Document that switch -gnatd.p enables the CIL verifier.
1300
1301 2010-10-11  Robert Dewar  <dewar@adacore.com>
1302
1303         * s-htable.adb: Minor reformatting.
1304
1305 2010-10-11  Javier Miranda  <miranda@adacore.com>
1306
1307         * debug.adb: Update comment.
1308
1309 2010-10-11  Vincent Celier  <celier@adacore.com>
1310
1311         * gnatcmd.adb (GNATCmd): Set Opt.Unchecked_Shared_Lib_Imports to True
1312         unconditionally as for "gnat make" the projects are not processed in
1313         the GNAT driver.
1314
1315 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1316
1317         * sem_ch10.ads, sem_ch10.adb (Load_Needed_Body): Add parameter to
1318         suppress semantic analysis of the body when inlining, prior to
1319         verifying that the body does not have a with_clause on a descendant
1320         unit.
1321         * inline.adb (Analyze_Inlined_Bodies): Do not inline a body if it has a
1322         with_clause on a descendant. 
1323         (Scope_In_Main_Unit): Simplify.
1324
1325 2010-10-11  Robert Dewar  <dewar@adacore.com>
1326
1327         * exp_ch6.adb, freeze.adb: Minor reformatting.
1328
1329 2010-10-11  Vincent Celier  <celier@adacore.com>
1330
1331         * gnatcmd.adb (GNATCmd): For all tools other than gnatmake, allow
1332         shared library projects to import projects that are not shared library
1333         projects.
1334
1335 2010-10-11  Javier Miranda  <miranda@adacore.com>
1336
1337         * debug.adb: Document that switch -gnatd.o generates the CIL listing.
1338
1339 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1340
1341         * sem_prag.adb (Process_Suppress_Unsuppress): Only ignore
1342         Suppress/Unsuppress pragmas in codepeer mode on user code.
1343
1344 2010-10-11  Javier Miranda  <miranda@adacore.com>
1345
1346         * exp_ch6.adb (Expand_Call): For VM platforms, add missing expansion of
1347         tag check in case of dispatching call through "=".
1348
1349 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1350
1351         * sem_ch3.adb (Access_Subprogram_Declaration): In Ada2012 an incomplete
1352         type is legal in the profile of any basic declaration.
1353         * sem_ch6.adb (Analyze_Return_Type, Process_Formals): In Ada2012 an
1354         incomplete type, including a limited view of a type, is legal in the
1355         profile of any subprogram declaration.
1356         If the type is tagged, its use is also legal in a body.
1357         * sem_ch10.adb (Install_Limited_With_Clause): Do not process context
1358         item if misplaced.
1359         (Install_Limited_Withed_Unit): Refine legality checks when both the
1360         limited and the non-limited view of a package are visible in the
1361         context of a unit.
1362         If this is not an error case, the limited view is ignored.
1363         freeze.adb (Freeze_Entity): In Ada2012, an incomplete type is legal in
1364         access to subprogram declarations
1365
1366 2010-10-11  Robert Dewar  <dewar@adacore.com>
1367
1368         * exp_ch6.adb: Code clean up.
1369         * exp_util.adb: Minor reformatting.
1370
1371 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1372
1373         * sem_ch3.adb, exp_ch6.adb
1374         (Make_Build_In_Place_Call_In_Anonymous_Context,
1375         Make_Build_In_Place_Call_In_Assignment,
1376         Make_Build_In_Place_Call_In_Object_Declaration): Fix calls to
1377         Add_Task_Actuals_To_Build_In_Place_Call in case of No_Task_Hierarchy
1378         restriction.
1379         (Access_Definition): Add missing handling of No_Task_Hierarchy.
1380
1381 2010-10-11  Javier Miranda  <miranda@adacore.com>
1382
1383         * exp_util.adb (Remove_Side_Effects): No action needed for renamings of
1384         class-wide expressions.
1385
1386 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1387
1388         * xr_tabls.adb, sem_res.adb: Minor reformatting
1389
1390 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1391
1392         * gnat_rm.texi, exp_attr.adb, sem_attr.adb, sem_attr.ads,
1393         snames.ads-tmpl (Analyze_Attribute, Expand_N_Attribute_Reference): Add
1394         handling of Attribute_Ref. Add missing blanks in some error messages.
1395         (Attribute_Ref, Name_Ref): Declare.
1396         Document 'Ref attribute.
1397
1398 2010-10-11  Robert Dewar  <dewar@adacore.com>
1399
1400         * sem_attr.adb: Minor reformatting.
1401
1402 2010-10-11  Javier Miranda  <miranda@adacore.com>
1403
1404         * sem_ch8.adb (Attribute_Renaming): Add missing check to avoid loading
1405         package System.Aux_Dec in VM platforms.
1406
1407 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1408
1409         * sem_prag.adb (Process_Suppress_Unsuppress): Ignore
1410         Suppress/Unsuppress pragmas in codepeer mode.
1411         (Analyze_Pragma [Pragma_Suppress_All]): Do not generate error message
1412         in codepeer mode.
1413         * einfo.ads: Fix typo.
1414
1415 2010-10-11  Emmanuel Briot  <briot@adacore.com>
1416
1417         * sinfo.adb: Use GNAT.HTable rather than System.HTable.
1418         * prj-nmsc.adb: Minor reformatting.
1419
1420 2010-10-11  Thomas Quinot  <quinot@adacore.com>
1421
1422         * sem_attr.adb (Type_Key): Code simplification.
1423
1424 2010-10-11  Tristan Gingold  <gingold@adacore.com>
1425
1426         * gcc-interface/utils2.c (maybe_wrap_malloc): Fix crash when allocating
1427         very large object on VMS.
1428
1429 2010-10-11  Javier Miranda  <miranda@adacore.com>
1430
1431         * sem_ch10.adb (Analyze_With_Clause): Add missing test to ensure
1432         availability of attribute Instance_Spec.
1433
1434 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1435
1436         * gnat1drv.adb (Adjust_Global_Switches): Disable codepeer mode if
1437         checking syntax only or in ASIS mode.
1438
1439 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1440
1441         * sem_ch6.adb (Check_Delayed_Subprogram): Abstract subprograms may also
1442         need a freeze node if some type in the profile has one.
1443         * gcc-interface/trans.c (case N_Abstract_Subprogram_Declaration): If
1444         entity has a freeze node, defer elaboration.
1445
1446 2010-10-11  Emmanuel Briot  <briot@adacore.com>
1447
1448         * prj-nmsc.adb (Check_Aggregate_Project): Add support for finding all
1449         aggregated projects.
1450
1451 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1452
1453         * sem_res.adb (Resolve_Entry_Call): Generate 's' reference for entry
1454         call.
1455         * sem_ch6.adb: Diagnose additional error condition.
1456
1457 2010-10-11  Bob Duff  <duff@adacore.com>
1458
1459         * par.adb (Par): Clarify wording of certain error messages.
1460
1461 2010-10-11  Gary Dismukes  <dismukes@adacore.com>
1462
1463         * sem_disp.adb (Check_Dispatching_Operation): Revise test for warning
1464         about nondispatching subprograms to use In_Same_List (reducing use of
1465         Parent links).
1466
1467 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1468
1469         * xr_tabls.adb, sem_res.adb, lib-xref.adb, lib-xref.ads: Use s for
1470         reference in a static call.
1471
1472 2010-10-11  Steve Baird  <baird@adacore.com>
1473
1474         * exp_attr.adb (Expand_N_Attribute_Reference, case Type_Key): Type_Key
1475         attribute should always be transformed into a string literal in
1476         Analyze_Attribute.
1477         * par-ch4.adb: Type_Key attribute's type is String; update value of
1478         Is_Parameterless_Attribute constant to reflect this.
1479         * sem_attr.adb (Analyze_Attribute): Recognize Type_Key attribute and
1480         rewrite it as a string literal (attribute value is always known
1481         statically).
1482         * snames.ads-tmpl: Add entries for Type_Key attribute.
1483
1484 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1485
1486         * lib-xref.adb (Output_References): Common handling for objects and
1487         formals of an anonymous access type.
1488
1489 2010-10-11  Eric Botcazou  <ebotcazou@adacore.com>
1490
1491         * make.adb (Scan_Make_Arg): Also pass -O to both compiler and linker.
1492
1493 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1494
1495         * sem_ch6.adb: Fix check for illegal equality declaration in Ada2012
1496
1497 2010-10-11  Gary Dismukes  <dismukes@adacore.com>
1498
1499         * sem_disp.adb (Check_Dispatching_Operation): When testing for issuing
1500         a warning about subprograms of a tagged type not being dispatching,
1501         limit this to cases where the tagged type and the subprogram are
1502         declared within the same declaration list.
1503
1504 2010-10-11  Jerome Lambourg  <lambourg@adacore.com>
1505
1506         * projects.texi, prj-attr.adb: Add new attribute documentation_dir.
1507
1508 2010-10-11  Bob Duff  <duff@adacore.com>
1509
1510         * par-ch9.adb, sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, impunit.adb,
1511         impunit.ads, sem_ch5.adb, sem_type.adb, exp_imgv.adb, exp_util.adb,
1512         switch-c.adb, exp_attr.adb, exp_ch9.adb, par-ch11.adb, usage.adb,
1513         sem_ch9.adb, sem_ch10.adb, scng.adb, checks.adb, sem_prag.adb,
1514         sem_ch12.adb, par-ch2.adb, freeze.adb, par-ch4.adb, sem_util.adb,
1515         sem_res.adb, sem_attr.adb, par-ch6.adb, exp_ch4.adb, exp_ch6.adb,
1516         sem_ch4.adb, exp_ch8.adb, par-ch10.adb, sem_ch6.adb, par-prag.adb,
1517         exp_disp.adb, par-ch12.adb, sem_ch8.adb, snames.adb-tmpl, opt.ads,
1518         exp_aggr.adb, sem_cat.adb, sem_ch13.adb, par-ch3.adb, exp_strm.adb,
1519         exp_cg.adb, lib-xref.adb, sem_disp.adb, exp_ch3.adb: Use Ada_2005
1520         instead of Ada_05 (Ada_Version_Type).
1521
1522 2010-10-11  Bob Duff  <duff@adacore.com>
1523
1524         * sem_aggr.adb, impunit.adb, impunit.ads, switch-c.adb, usage.adb,
1525         sem_ch10.adb, sem_prag.adb, sem_ch12.adb, par-ch4.adb, par-ch6.adb,
1526         par-ch8.adb, exp_ch4.adb, sem_ch4.adb, sem_ch6.adb, par-prag.adb,
1527         opt.ads, par-ch3.adb, lib-xref.adb: Use Ada_2012 instead of Ada_12
1528         (Ada_Version_Type).
1529
1530 2010-10-11  Javier Miranda  <miranda@adacore.com>
1531
1532         * exp_util.adb (Safe_Prefixed_Reference): If the prefix is an explicit
1533         dereference then do not exclude dereferences of access-to-constant
1534         types to handle them as constant view of variables (and hence remove
1535         side effects when required).
1536         * sem_res.adb (Resolve_Slice): Ensure that side effects in the bounds
1537         are properly handled.
1538
1539 2010-10-11  Robert Dewar  <dewar@adacore.com>
1540
1541         * sem_prag.adb, sem_aggr.adb, sprint.adb: Minor reformatting.
1542
1543 2010-10-11  Javier Miranda  <miranda@adacore.com>
1544
1545         * exp_ch5.ads, exp_ch6.ads (Expand_N_Extended_Return_Statement): Moved
1546         to exp_ch6.
1547         (Expand_N_Simple_Return_Statement): Moved to exp_ch6.
1548         * exp_ch5.adb, exp_ch6.adb (Expand_Non_Function_Return): Moved to
1549         exp_ch6.
1550         (Expand_Simple_Function_Return): Move to exp_ch6.
1551         (Expand_N_Extended_Return_Statement): Moved to exp_ch6.
1552         (Expand_N_Simple_Return_Statement): Moved to exp_ch6.
1553
1554 2010-10-11  Robert Dewar  <dewar@adacore.com>
1555
1556         * snames.ads-tmpl: Add names for aspects.
1557         * aspects.ads, aspects.adb: New.
1558         * gcc-interface/Make-lang.in: Update dependencies.
1559 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1560
1561         * exp_ch6.adb (Expand_Actuals): If an actual is the current instance of
1562         a task type, it must be replaced with a reference to Self.
1563
1564 2010-10-11  Vincent Celier  <celier@adacore.com>
1565
1566         * adaint.h: Add prototype for function __gnat_create_output_file_new.
1567
1568 2010-10-11  Javier Miranda  <miranda@adacore.com>
1569
1570         * sem_aggr.adb (Collect_Aggr_Bounds): Remove side effects of collected
1571         aggregate bounds.
1572
1573 2010-10-11  Arnaud Charlet  <charlet@adacore.com>
1574
1575         * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Do not emit error
1576         for AI05-0033 in CodePeer mode.
1577
1578 2010-10-11  Robert Dewar  <dewar@adacore.com>
1579
1580         * atree.h, atree.ads, atree.adb (Flag3): New flag (replaces Unused_1)
1581         * csinfo.adb: Aspect_Specifications is a new special field
1582         * einfo.adb (Flag3): New unused flag
1583         * exp_util.adb (Insert_Actions): Add processing for
1584         N_Aspect_Specification.
1585         * sem.adb: Add entry for N_Aspect_Specification.
1586         * sinfo.ads, sinfo.adb (N_Aspect_Specification): New node
1587         (Has_Aspect_Specifications): New flag
1588         (Permits_Aspect_Specifications): New function
1589         (Aspect_Specifications): New function
1590         (Set_Aspect_Specifications): New procedure
1591         * sprint.adb (Sprint_Node): Put N_At_Clause in proper alpha order
1592         (Sprint_Node): Add dummy entry for N_Aspect_Specification
1593         * treepr.adb (Flag3): New flag to be listed
1594
1595 2010-10-11  Vincent Celier  <celier@adacore.com>
1596
1597         * adaint.c: Minor reformatting.
1598
1599 2010-10-11  Robert Dewar  <dewar@adacore.com>
1600
1601         * sem_ch6.adb, s-htable.ads: Minor reformatting.
1602
1603 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1604
1605         * sem_ch4.adb (Analyze_Selected_Component): If the selector is
1606         invisible in an instantiation, and both the formal and the actual are
1607         private extensions of the same type, look for the desired component in
1608         the proper view of the parent type.
1609
1610 2010-10-11  Vincent Celier  <celier@adacore.com>
1611
1612         * adaint.c (__gnat_number_of_cpus): Add implementation for Solaris,
1613         AIX, Tru64, Darwin, IRIX and HP-UX.
1614
1615 2010-10-11  Robert Dewar  <dewar@adacore.com>
1616
1617         * a-textio.adb: Minor reformatting
1618
1619 2010-10-11  Robert Dewar  <dewar@adacore.com>
1620
1621         * a-suesen.ads, a-suenst.ads,
1622         a-suesen.adb, a-suenst.adb,
1623         a-suewse.adb, a-suewst.adb,
1624         a-suewse.ads, a-suewst.ads,
1625         a-suezse.ads, a-suezst.ads,
1626         a-suezse.adb, a-suezst.adb: New name for string encoding packages.
1627         * impunit.adb: New names for string encoding units
1628         * Makefile.rtl: New names for string encoding units
1629         * rtsfind.ads: Minor code reorganization.
1630
1631 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1632
1633         * exp_ch5.adb: Code clean up.
1634
1635 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1636
1637         * sem_ch6.adb (Check_Limited_Return): Specialize warning on limited
1638         returns when in a generic context.
1639         (Analyze_Function_Return): ditto.
1640
1641 2010-10-11  Robert Dewar  <dewar@adacore.com>
1642
1643         * s-multip.ads: Fix header.
1644         * sem_ch3.adb, s-multip.adb, a-tigeli.adb: Minor reformatting.
1645
1646 2010-10-11  Vincent Celier  <celier@adacore.com>
1647
1648         * Makefile.rtl: Add s-multip.
1649         * adaint.c: New function __gnat_number_of_cpus, implemented for Linux,
1650         defaulting to 1 for other platforms.
1651         * adaint.h: New function __gnat_number_of_cpus.
1652         * impunit.adb (Non_Imp_File_Names_12): New file list for Ada 2012,
1653         with a single component "s-multip".
1654         * impunit.ads (Kind_Of_Unit): New enumerated value Ada_12_Unit for Ada
1655         2012.
1656         * rtsfind.ads (RTU_Id): New enumerated value System_Multiprocessors
1657         * s-multip.ads, s-multip.adb: New Ada 2012 package.
1658         * sem_ch10.adb (Analyze_With_Clause): Check also Ada 2012 units.
1659
1660 2010-10-11  Javier Miranda  <miranda@adacore.com>
1661
1662         * a-textio.adb: Move new implementation of Get_Line to a subunit.
1663         * a-tigeli.adb: New subunit containing the implementation of Get_Line.
1664
1665 2010-10-11  Ed Schonberg  <schonberg@adacore.com>
1666
1667         * sem_aux.adb: Code clean up.
1668
1669 2010-10-11  Robert Dewar  <dewar@adacore.com>
1670
1671         * sem_ch3.adb, sem_aux.adb, sem_ch6.adb: Minor reformatting
1672
1673 2010-10-11  Robert Dewar  <dewar@adacore.com>
1674
1675         * einfo.adb, atree.h, atree.ads, atree.adb: Define seven new flags
1676         Flag248-Flag254.  Define new field Field29.
1677
1678 2010-10-10  Olivier Hainque  <hainque@adacore.com>
1679             Eric Botcazou  <ebotcazou@adacore.com>
1680
1681         * gcc-interface/lang.opt (gdwarf+): Remove.
1682         * gcc-interface/gigi.h (get_parallel_type): Likewise
1683         * gcc-interface/misc.c (gnat_dwarf_extensions): Likewise.
1684         (gnat_handle_option): Remove OPT_gdwarfplus case.
1685         (gnat_post_options): Remove setting of use_gnu_debug_info_extensions
1686         from gnat_dwarf_extensions.
1687         * gcc-interface/trans.c (gigi): Remove -gdwarf+ initializations.
1688         * gcc-interface/utils.c (get_parallel_type): Remove.
1689
1690 2010-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1691
1692         * gcc-interface/trans.c (gnat_to_gnu) <N_Not_In>: Use
1693         invert_truthvalue_loc instead of invert_truthvalue.
1694         * gcc-interface/utils2.c (build_binary_op) <NE_EXPR>: Likewise.
1695         (build_unary_op) <TRUTH_NOT_EXPR>: Likewise.
1696
1697 2010-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1698
1699         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Add
1700         assertion on the types of the parameters.  Use KIND local variable.
1701         <E_Incomplete_Type>: Likewise.
1702
1703 2010-10-10  Eric Botcazou  <ebotcazou@adacore.com>
1704
1705         * gcc-interface/ada-tree.h (DECL_BY_DOUBLE_REF_P): New macro.
1706         * gcc-interface/gigi.h (annotate_object): Add BY_DOUBLE_REF parameter.
1707         * gcc-interface/decl.c (annotate_object): Likewise and handle it.
1708         (gnat_to_gnu_entity): Adjust calls to annotate_object.
1709         (gnat_to_gnu_param): If fat pointer types are passed by reference on
1710         the target, pass them by explicit reference.
1711         * gcc-interface/misc.c (default_pass_by_ref): Fix type of constant.
1712         * gcc-interface/trans.c (Identifier_to_gnu): Do DECL_BY_DOUBLE_REF_P.
1713         (Subprogram_Body_to_gnu): Adjust call to annotate_object.
1714         (call_to_gnu): Handle DECL_BY_DOUBLE_REF_P.
1715         * gcc-interface/utils.c (convert_vms_descriptor): Add BY_REF parameter
1716         and handle it.
1717         (build_function_stub): Iterate on the parameters of the subprogram in
1718         lieu of on the argument types.  Adjust call to convert_vms_descriptor.
1719
1720 2010-10-09  Eric Botcazou  <ebotcazou@adacore.com>
1721
1722         * gcc-interface/misc.c: Delete prototypes.
1723         (gnat_init_options): Use local variable.
1724         (lang_hooks): Move to the end of the file.
1725
1726 2010-10-08  Joseph Myers  <joseph@codesourcery.com>
1727
1728         * gcc-interface/misc.c (gnat_init_options_struct): New.  Split out
1729         from gnat_init_options.
1730         (LANG_HOOKS_INIT_OPTIONS_STRUCT): Define.
1731
1732 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1733
1734         * sem_aux.adb: Cleanup Is_Immutably_Limited_Type.
1735
1736 2010-10-08  Robert Dewar  <dewar@adacore.com>
1737
1738         * exp_ch3.adb: Minor reformatting.
1739         * exp_ch5.adb: Add comment.
1740
1741 2010-10-08  Robert Dewar  <dewar@adacore.com>
1742
1743         * sem_prag.adb (Check_Duplicate_Pragma): Check for entity match
1744         * gcc-interface/Make-lang.in: Update dependencies.
1745         * einfo.ads: Minor reformatting.
1746
1747 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1748
1749         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, sem_aux.adb,
1750         sem_aux.ads, exp_ch4.adb, exp_ch6.adb, sem_ch6.adb, exp_aggr.adb,
1751         exp_ch3.adb: Change Is_Inherently_Limited_Type to
1752         Is_Immutably_Limited_Type to accord with new RM terminology.
1753         * sem_aux.adb (Is_Immutably_Limited_Type): A type that is a descendant
1754         of a formal limited private type is not immutably limited in a generic
1755         body.
1756
1757 2010-10-08  Robert Dewar  <dewar@adacore.com>
1758
1759         * sem_prag.adb (Check_Duplicate_Pragma): New procedure
1760         Add calls to this new procedure where appropriate
1761
1762 2010-10-08  Vincent Celier  <celier@adacore.com>
1763
1764         * a-textio.adb (Get_Chunk): Code clean up.
1765
1766 2010-10-08  Robert Dewar  <dewar@adacore.com>
1767
1768         * a-strbou.ads, a-strfix.adb, a-strfix.ads, a-strsea.adb, a-strsea.ads,
1769         a-strsup.adb, a-strsup.ads, a-strunb-shared.adb, a-strunb-shared.ads,
1770         a-strunb.adb, a-strunb.ads, a-stwibo.ads, a-stwifi.adb, a-stwifi.ads,
1771         a-stwise.adb, a-stwise.ads, a-stwisu.adb, a-stwisu.ads,
1772         a-stwiun-shared.adb, a-stwiun-shared.ads, a-stwiun.adb, a-stwiun.ads,
1773         a-stzbou.ads, a-stzfix.adb, a-stzfix.ads, a-stzsea.adb, a-stzsea.ads,
1774         a-stzsup.adb, a-stzsup.ads, a-stzunb-shared.adb, a-stzunb-shared.ads,
1775         a-stzunb.adb, a-stzunb.ads (Find_Token): New version with From
1776         parameter.
1777
1778 2010-10-08  Robert Dewar  <dewar@adacore.com>
1779
1780         * sem_cat.adb (Check_Categorization_Dependencies): Remote types
1781         packages can depend on preleborated packages.
1782
1783 2010-10-08  Robert Dewar  <dewar@adacore.com>
1784
1785         * sem_prag.adb (Check_Interrupt_Or_Attach_Handler): Pragmas
1786         Interrupt_Handler and Attach_Handler not allowed in generics.
1787
1788 2010-10-08  Robert Dewar  <dewar@adacore.com>
1789
1790         * ali.adb: Set Allocator_In_Body if AB parameter present on M line
1791         * ali.ads (Allocator_In_Body): New flag
1792         * bcheck.adb (Check_Consistent_Restrictions): Handle case of main
1793         program violating No_Allocators_After_Elaboration restriction.
1794         * gnatbind.adb (No_Restriction_List): Add entries for
1795         No_Anonymous_Allocators, and No_Allocators_After_Elaboration.
1796         * lib-load.adb: Initialize Has_Allocator flag
1797         * lib-writ.adb: Initialize Has_Allocator flag
1798         (M_Parameters): Set AB switch if Has_Allocator flag set
1799         * lib-writ.ads: Document AB flag on M line
1800         * lib.adb (Has_Allocator): New function
1801         (Set_Has_Allocator): New procedure
1802         * lib.ads (Has_Allocator): New function
1803         (Set_Has_Allocator): New procedure
1804         (Has_Allocator): New flag in Unit_Record
1805         * sem_ch4.adb (Analyze_Allocator): Add processing for
1806         No_Allocators_After_Elaboration.
1807
1808 2010-10-08  Geert Bosch  <bosch@adacore.com>
1809
1810         * a-textio.adb (Get_Line): Rewrite to use fgets instead of fgetc.
1811
1812 2010-10-08  Javier Miranda  <miranda@adacore.com>
1813
1814         * sem_prag.adb (Analyze_Pragma): Relax semantic rule of
1815         Java_Constructors because in the JRE library we generate occurrences
1816         in which the "this" parameter is not the first formal.
1817
1818 2010-10-08  Robert Dewar  <dewar@adacore.com>
1819
1820         * par-ch3.adb: Minor reformatting.
1821
1822 2010-10-08  Javier Miranda  <miranda@adacore.com>
1823
1824         * exp_disp.adb (Make_DT): Do not generate dispatch tables for CIL/Java
1825         types.
1826
1827 2010-10-08  Robert Dewar  <dewar@adacore.com>
1828
1829         * par-ch8.adb (P_Use_Type_Clause): Recognize ALL keyword in Ada 2012
1830         mode.
1831         * sinfo.adb (Use_Type_Clause): Add All_Present flag.
1832         * sinfo.ads (Use_Type_Clause): Add All_Present flag.
1833         * s-rident.ads: Add entry for No_Allocators_After_Elaboration,
1834         No_Anonymous_Allocators.
1835
1836 2010-10-08  Vincent Celier  <celier@adacore.com>
1837
1838         * bindgen.adb (Gen_Restrictions_Ada): No new line after last
1839         restriction, so that the last comma is always replaced with a left
1840         parenthesis.
1841
1842 2010-10-08  Javier Miranda  <miranda@adacore.com>
1843
1844         * sem_prag.adb (Analyze_Pragma): Add specific check on the type of the
1845         first formal of delegates.
1846
1847 2010-10-08  Robert Dewar  <dewar@adacore.com>
1848
1849         * sem_aggr.adb: Minor reformatting.
1850
1851 2010-10-08  Robert Dewar  <dewar@adacore.com>
1852
1853         * exp_imgv.adb (Expand_Image_Attribute): Handle special calling
1854         sequence for soft hyphen for Character'Image case.
1855         * rtsfind.ads (Image_Character_05): New entry
1856         * s-imgcha.adb (Image_Character_05): New procedurew
1857         * s-imgcha.ads (Image_Character_05): New procedure
1858         * s-imgwch.adb (Image_Wide_Character): Deal with Ada 2005 soft hyphen
1859         case.
1860         * s-valcha.adb (Value_Character): Recognize SOFT_HYPHEN for 16#AD#
1861         * sem_attr.adb (Eval_Attribute, case Width): Handle soft_hyphen name
1862         properly.
1863
1864 2010-10-08  Robert Dewar  <dewar@adacore.com>
1865
1866         * sem_attr.adb (Eval_Attribute, case Width): Avoid ludicrous long loop
1867         for case of Wide_[Wide_]Character.
1868
1869 2010-10-08  Robert Dewar  <dewar@adacore.com>
1870
1871         * exp_ch3.adb: Minor reformating
1872         Minor code reorganization.
1873
1874 2010-10-08  Javier Miranda  <miranda@adacore.com>
1875
1876         * sem_prag.adb (Analyze_Pragma): Add missing checks on wrong use of
1877         pragmas CIL_Constructor and Java_Constructor.
1878         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not generate the
1879         predefined primitives for CIL/Java tagged types.
1880
1881 2010-10-08  Robert Dewar  <dewar@adacore.com>
1882
1883         * sem_ch6.adb: Minor reformatting.
1884
1885 2010-10-08  Robert Dewar  <dewar@adacore.com>
1886
1887         * gnat1drv.adb: Add call to Validate_Independence.
1888         * par-prag.adb: Add dummy entries for Independent,
1889         Independent_Componentsa.
1890         * sem_ch13.adb (Validate_Independence): New procedure
1891         (Initialize): Initialize address clause and independence check tables
1892         * sem_ch13.ads (Independence_Checks): New table
1893         (Validate_Independence): New procedure
1894         * sem_prag.adb: Add processing for pragma Independent[_Components]
1895         * snames.ads-tmpl: Add entries for pragma Independent[_Components]
1896
1897 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1898
1899         * sem_aggr.adb (Propagate_Discriminants): When expanding an aggregate
1900         component with box initialization, if the component is a variant record
1901         use the values of the discriminants to select the proper variant for
1902         further box initialization.
1903
1904 2010-10-08  Thomas Quinot  <quinot@adacore.com>
1905
1906         * xsnames.adb: Remove obsolete file.
1907         * make.adb, sem_ch8.adb, einfo.ads: Minor reformatting.
1908
1909 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1910
1911         * exp_aggr.adb: Complete previous change.
1912
1913 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1914
1915         * sem_ch6.adb (Check_Return_Subtype): The subtype indication in an
1916         extended return must match statically the return subtype of the
1917         enclosing function if the type is an elementary type or if it is
1918         constrained.
1919
1920 2010-10-08  Vincent Celier  <celier@adacore.com>
1921
1922         * prj-nmsc.adb (Add_Source): Report all duplicate units and source file
1923         names.  Do not report the same duplicate unit several times.
1924         * prj.ads (Source_Data): New Boolean component Duplicate_Unit,
1925         defaulted to False, to avoid reporting the same unit as duplicate
1926         several times.
1927
1928 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1929
1930         * sem_aggr.adb (Resolve_Array_Aggregate): If the expression in an
1931         others choice is a literal, analyze it to enable later optimizations.
1932         * exp_aggr.adb (Expand_Record_Aggregate): An aggregate with static size
1933         and components can be handled by the backend even if it is of a limited
1934         type.
1935
1936 2010-10-08  Arnaud Charlet  <charlet@adacore.com>
1937
1938         * a-rttiev.adb (task Timer): Since this package may be elaborated
1939         before System.Interrupt, we need to call Setup_Interrupt_Mask
1940         explicitly to ensure that this task has the proper signal mask.
1941
1942 2010-10-08  Robert Dewar  <dewar@adacore.com>
1943
1944         * freeze.adb (Freeze_Entity): For array case, move some processing for
1945         pragma Pack, Component_Size clause and atomic/volatile components here
1946         instead of trying to do the job in Sem_Ch13 and Freeze.
1947         * layout.adb: Use new Addressable function
1948         * sem_ch13.adb (Analyze_Attribute_Representation_Clause, case
1949         Component_Size): Move some handling to freeze point in
1950         Freeze.Freeze_Entity.
1951         * sem_prag.adb (Analyze_pragma, case Pack): Move some handling to
1952         freeze point in Freese.Freeze_Entity.
1953         * sem_util.ads, sem_util.adb (Addressable): New function.
1954
1955 2010-10-08  Robert Dewar  <dewar@adacore.com>
1956
1957         * sprint.adb: Minor reformatting.
1958
1959 2010-10-08  Javier Miranda  <miranda@adacore.com>
1960
1961         * exp_ch4.adb (Real_Range_Check): Declare temporary as constant.
1962
1963 2010-10-08  Robert Dewar  <dewar@adacore.com>
1964
1965         * sem_ch3.adb: Minor reformatting.
1966
1967 2010-10-08  Vincent Celier  <celier@adacore.com>
1968
1969         * ali-util.adb (Get_File_Checksum): Make sure that external_as_list is
1970         not a reserved word.
1971         * prj-proc.adb (Expression): Process string list external references.
1972         * prj-strt.adb (External_Reference): Parse external_as_list external
1973         references.
1974         * prj-tree.ads (Expression_Kind_Of): Allowed for N_External_Value nodes
1975         (Set_Expression_Kind_Of): Ditto
1976         * prj.adb (Initialize): Set external_as_list as a reserved word
1977         * projects.texi: Document new string external reference
1978         external_as_list.
1979         * scans.ads (Token_Type): New token Tok_External_As_List
1980         * snames.ads-tmpl: New standard name Name_External_As_List
1981
1982 2010-10-08  Thomas Quinot  <quinot@adacore.com>
1983
1984         * sem_prag.adb: Minor reformatting.
1985
1986 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1987
1988         * sem_ch3.adb (Derived_Type_Declaration): In the private part of an
1989         instance, it is legal to derive from a non-limited actual when the
1990         formal type is untagged limited.
1991         * sem_ch12.adb (Instantiate_Type): For a formal private type, use
1992         analyzed formal as Generic_Parent_Type, to simplify later checks.
1993
1994 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
1995
1996         * sem_res.adb (Insert_Default): If default value is already a
1997         raise_constraint_error do not rewrite it as new raise node, to prevent
1998         infinite loops in the warning removal machinery.
1999
2000 2010-10-08  Robert Dewar  <dewar@adacore.com>
2001
2002         * sem_util.adb, sem_prag.adb: Minor reformatting
2003
2004 2010-10-08  Hristian Kirtchev  <kirtchev@adacore.com>
2005
2006         * gnat_rm.texi: Remove the section on pragma Implemented_By_Entry.
2007         Add section on pragma Implemented.
2008
2009 2010-10-08  Ed Schonberg  <schonberg@adacore.com>
2010
2011         * sem_ch3.adb (Derive_Subprogram): If an abstract extension has a
2012         concrete parent with a concrete constructor, the inherited constructor
2013         is abstract even if the derived type is a null extension.
2014
2015 2010-10-08  Thomas Quinot  <quinot@adacore.com>
2016
2017         * sem_ch4.adb: Minor reformatting.
2018
2019 2010-10-08  Hristian Kirtchev  <kirtchev@adacore.com>
2020
2021         * einfo.adb: Flag 232 (formerly Implemented_By_Entry) is now unused.
2022         (Implemented_By_Entry): Removed.
2023         (Set_Implemented_By_Entry): Removed.
2024         (Write_Entity_Flags): Remove the output for Implemented_By_Entry.
2025         * einfo.ads: Remove Implemented_By_Entry and its usage in entities.
2026         (Implemented_By_Entry): Removed along with its associated pragma.
2027         (Set_Implemented_By_Entry): Removed along with its associated pragma.
2028         * exp_ch9.adb: Alphabetize with and use clauses of Exp_Ch9.
2029         (Build_Dispatching_Call_Equivalent): New routine.
2030         (Build_Dispatching_Requeue): New routine.
2031         (Build_Dispatching_Requeue_To_Any): New routine.
2032         (Build_Normal_Requeue): New routine.
2033         (Build_Skip_Statement): New routine.
2034         (Expand_N_Requeue_Statement): Rewritten. The logic has been split into
2035         several subroutines.
2036         * par-prag.adb: Replace Pragma_Implemented_By_Entry by
2037         Pragma_Implemented.
2038         * sem_ch3.adb (Check_Abstract_Overriding): Perform checks concerning
2039         pragma Implemented.
2040         (Check_Pragma_Implemented): New routines.
2041         (Inherit_Pragma_Implemented): New routine.
2042         * sem_ch9.adb (Analyze_Requeue): Update the predicate which detects a
2043         dispatching requeue.
2044         * sem_prag.adb: Update array Sig_Flags by removing Implemented_By_Entry
2045         and adding Implemented.
2046         (Ada_2012_Pragma): New routine.
2047         (Analyze_Pragma, case Implemented): Perform all necessary checks
2048         concerning pragma Implemented and register the pragma as a
2049         representation item with the procedure_LOCAL_NAME.
2050         (Analyze_Pragma, case Implemented_By_Entry): Removed.
2051         * sem_util.adb (Implementation_Kind): New routine.
2052         * sem_util.ads (Implementation_Kind): New routine.
2053         * snames.ads-tmpl: Remove Name_Implemented_By_Entry and add
2054         Name_Implemented. Remove pragma name Pragma_Implemented_By_Entry and
2055         add Pragma_Implemented. Add special names By_Any, By_Entry and
2056         By_Protected_Procedure.
2057
2058 2010-10-08  Javier Miranda  <miranda@adacore.com>
2059
2060         * exp_ch3.adb (Expand_Freeeze_Record_Type): Code cleanup: remove local
2061         variable Has_Static_DT by invocation of function Building_Static_DT.
2062
2063 2010-10-08  Vincent Celier  <celier@adacore.com>
2064
2065         * g-dirope.adb (Remove_Dir): Do not change the current directory when
2066         doing a recursive remove of a subdirectory.
2067
2068 2010-10-08  Javier Miranda  <miranda@adacore.com>
2069
2070         * exp_ch6.ad (Freeze_Subprogram): Factorize code.
2071         * exp_disp.adb (Make_Secondary_DT): Factorize code.
2072         (Make_DT): Factorize code.
2073
2074 2010-10-08  Robert Dewar  <dewar@adacore.com>
2075
2076         * sem_ch4.adb: Minor reformatting.
2077
2078 2010-10-08  Robert Dewar  <dewar@adacore.com>
2079
2080         * sem_ch6.adb (Check_Conformance): Check null exclusion match for full
2081         conformance.
2082
2083 2010-10-08  Thomas Quinot  <quinot@adacore.com>
2084
2085         * sem_ch12.adb (Instantiate_Object): Rename Formal_Id to Gen_Obj, for
2086         consistency with Gen_T in Instantiate_Type.
2087         Introduce constant A_Gen_Obj to avoid repeated queries for
2088         Defining_Identifier (Analyzed_Formal).
2089
2090 2010-10-08  Vincent Celier  <celier@adacore.com>
2091
2092         * prj-nmsc.adb: Minor comment fix.
2093
2094 2010-10-07  Robert Dewar  <dewar@adacore.com>
2095
2096         * sem_prag.adb, sem_ch13.adb: Implement AI05-0012-1/02.
2097         * gcc-interface/Make-lang.in: Update dependencies.
2098
2099 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2100
2101         * sem_ch12.ad: (Instantiate_Object): For an in-out formal of a child
2102         unit, if the type of the formal is declared in a parent unit and is not
2103         a formal itself, the actual must be located from an enclosing parent
2104         instance by normal visibility.
2105
2106 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2107
2108         * sem_ch4.adb (Analyze_Allocator): In Ada 2012, a null_exclusion
2109         indicator is illegal for an uninitialized allocator.
2110
2111 2010-10-07  Robert Dewar  <dewar@adacore.com>
2112
2113         * sem_prag.adb (Analyze_Attribute_Definition_Clause, case
2114         Component_Size): Complete previous change.
2115
2116 2010-10-07  Vincent Celier  <celier@adacore.com>
2117
2118         * scng.adb (Scan): Call Accumulate_Token_Checksum for Tok_Identifier,
2119         even for keywords, to avoid having the checksum to depend on the Ada
2120         version.
2121
2122 2010-10-07  Gary Dismukes  <dismukes@adacore.com>
2123
2124         * sem_aggr.adb, sem_ch12.adb, sem_ch6.adb, par-ch5.adb,
2125         exp_ch3.adb: Minor reformatting.
2126
2127 2010-10-07  Robert Dewar  <dewar@adacore.com>
2128
2129         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2130         Component_Size): It is now illegal to give an incorrect component size
2131         clause in the case of aliased or atomic components.
2132         * sem_prag.adb (Analyze_Pragma, case Pack): It is now illegal to give
2133         an effective pragma Pack in the case of aliased or atomic components.
2134
2135 2010-10-07  Steve Baird  <baird@adacore.com>
2136
2137         * exp_ch4.adb (Expand_N_Allocator): Do not bypass expansion
2138         in the case of a violation of an active No_Task_Hierarchy restriction.
2139
2140 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2141
2142         * sem_ch12.adb (Validate_Derived_Type_Instance): If a formal derived
2143         type is non-limited, an actual for it cannot be limited.
2144
2145 2010-10-07  Robert Dewar  <dewar@adacore.com>
2146
2147         * einfo.ads (No_Pool_Assigned): Update documentation.
2148         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2149         Storage_Size): We only set No_Pool_Assigned if the expression is a
2150         static constant and zero.
2151         * sem_res.adb (Resolve_Allocator): Allocation from empty storage pool
2152         should be an error not a warning.
2153
2154 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2155
2156         * exp_aggr.adb (Expand_Array_Aggregate): Recognize additional cases
2157         where an aggregate in an assignment can be built directly into the
2158         target, and does not require the creation of a temporary that may
2159         overflow the stack.
2160
2161 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2162
2163         * sem_aggr.adb (Analyze_Record_Aggregate): In Ada2012, a choice list
2164         in a record aggregate can correspond to several components of
2165         anonymous access types, as long as the designated subtypes match.
2166
2167 2010-10-07  Robert Dewar  <dewar@adacore.com>
2168
2169         * gnat_rm.texi, exp_util.adb, sinfo.adb, sinfo.ads, sem_ch12.adb,
2170         sem.adb, gnat_ugn.texi, sem_util.ads, par-ch6.adb, targparm.ads,
2171         restrict.adb, sem_ch6.adb, sem_ch6.ads, sprint.adb, i-c.ads: Change
2172         spelling parametrize(d) => parameterize(d).
2173
2174 2010-10-07  Robert Dewar  <dewar@adacore.com>
2175
2176         * sem_ch12.adb: Add comment.
2177         * sem_ch6.adb: Minor reformatting.
2178
2179 2010-10-07  Robert Dewar  <dewar@adacore.com>
2180
2181         * par-ch3.adb, par-ch6.adb, par-ch7.adb, par-ch9.adb, par-ch10.adb: Add
2182         Pexp to Pf_Rec constants
2183         (P_Subprogram): Expression is always enclosed in parentheses
2184         * par.adb (Pf_Rec): add Pexp flag for parametrized expression
2185         * sinfo.ads (N_Parametrized_Expression): Expression must be in parens
2186
2187 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2188
2189         * sem_ch6.adb (Analyze_Subprogram_Specification): Implement Ada2012
2190         checks on functions that return an abstract type or have a controlling
2191         result whose designated type is an abstract type.
2192         (Check_Private_Overriding): Implement Ada2012 checks on functions
2193         declared in the private part, if an abstract type is involved.
2194         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): In Ada2012,
2195         reject a generic function that returns an abstract type.
2196         * exp_ch5.adb (Expand_Simple_Function_Return): in Ada2012, if a
2197         function has a controlling access result, check that the tag of the
2198         return value matches the designated type of the return expression.
2199
2200 2010-10-07  Robert Dewar  <dewar@adacore.com>
2201
2202         * par-ch6.adb: Fix error in handling of parametrized expressions.
2203         * par-ch4.adb (P_Name): Allow qualified expression as name in Ada 2012
2204         mode.
2205         (P_Simple_Expression): Better message for qualified expression prefix
2206         * s-crc32.adb: Minor reformatting.
2207         * exp_intr.adb (Expand_Unc_Deallocation): Remove test for empty
2208         storage pool (this test is moved to Sem_Intr).
2209         * sem_intr.adb (Check_Intrinsic_Call): Add check for deallocation from
2210         empty storage pool, moved here from Exp_Intr and made into error.
2211         (Check_Intrinsic_Call): Remove assumption in generating not-null free
2212         warning that the name of the instantiation is Free.
2213         * sinput.adb (Tree_Read): Document use of illegal free call allowed in
2214         GNAT mode.
2215         * types.ads: Remove storage size clauses from big types (since we may
2216         need to do deallocations, which are now illegal for empty pools).
2217
2218 2010-10-07  Sergey Rybin  <rybin@adacore.com>
2219
2220         * gnat_ugn.texi: Add missing word.
2221
2222 2010-10-07  Robert Dewar  <dewar@adacore.com>
2223
2224         * exp_util.adb (Insert_Actions): Add handling of
2225         N_Parametrized_Expression.
2226         * par-ch6.adb (P_Subprogram): Add parsing of parametrized expression
2227         * sem.adb: Add entry for N_Parametrized_Expression
2228         * sem_ch6.adb (Analyze_Parametrized_Expression): New procedure
2229         * sem_ch6.ads (Analyze_Parametrized_Expression): New procedure
2230         * sinfo.ads, sinfo.adb: Add N_Parametrized_Expression
2231         * sprint.adb (Sprint_Node): Add handling for N_Parametrized_Expression
2232         * par-ch4.adb: Minor reformatting.
2233
2234 2010-10-07  Robert Dewar  <dewar@adacore.com>
2235
2236         * scng.adb (Skip_Other_Format_Characters): New procedure
2237         (Start_Of_Wide_Character): New procedure
2238         (Scan): Use Start_Of_Wide_Character where appropriate
2239         (Scan): Improve error message for other_format chars in identifier
2240         (Scan): Allow other_format chars between tokens
2241
2242 2010-10-07  Javier Miranda  <miranda@adacore.com>
2243
2244         * exp_util.adb (Safe_Prefixed_Reference): When removing side effects,
2245         Add missing support for explicit dereferences.
2246
2247 2010-10-07  Robert Dewar  <dewar@adacore.com>
2248
2249         * par-ch10.adb, par-ch3.adb, par.adb: Minor reformatting.
2250
2251 2010-10-07  Robert Dewar  <dewar@adacore.com>
2252
2253         * exp_disp.adb, exp_dist.adb, exp_util.ads, exp_util.adb,
2254         exp_ch11.adb: Rename Full_Qualified_Name to Fully_Qualified_Name_String
2255         * sem_util.adb, sem_util.ads (Full_Qualified_Name): Moved to
2256         Exp_Util.Fully_Qualified_Name_String.
2257
2258 2010-10-07  Robert Dewar  <dewar@adacore.com>
2259
2260         * rtsfind.ads: Add entry for Ada.Real_Time.Timing_Events.Set_Handler
2261         * sem_res.adb (Resolve_Call): A call to
2262         Ada.Real_Time.Timing_Events.Set_Handler violates restriction
2263         No_Relative_Delay (AI-0211).
2264
2265 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2266
2267         * sem_ch10.adb: Small change in error message.
2268
2269 2010-10-07  Robert Dewar  <dewar@adacore.com>
2270
2271         * tbuild.ads: Minor reformatting.
2272
2273 2010-10-07  Robert Dewar  <dewar@adacore.com>
2274
2275         * gnatcmd.adb, make.adb, prj-nmsc.adb, sem_elab.adb: Minor reformatting
2276
2277 2010-10-07  Arnaud Charlet  <charlet@adacore.com>
2278
2279         * exp_ch11.adb (Expand_N_Exception_Declaration): Update comments.
2280
2281 2010-10-07  Robert Dewar  <dewar@adacore.com>
2282
2283         * sem_res.adb: Minor reformatting
2284
2285 2010-10-07  Olivier Ramonat  <ramonat@adacore.com>
2286
2287         * gnat_ugn.texi: Minor editing.
2288         * opt.ads: Document that scripts rely on specific formats in opt.ads
2289
2290 2010-10-07  Robert Dewar  <dewar@adacore.com>
2291
2292         * a-wichun.ads, a-wichun.adb (To_Lower_Case): New function
2293         (To_Upper_Case): Fix to be inverse of To_Lower_Case
2294         * a-zchuni.ads, a-zchuni.adb (To_Lower_Case): New function
2295         (To_Upper_Case): Fix to be inverse of To_Lower_Case
2296
2297 2010-10-07  Robert Dewar  <dewar@adacore.com>
2298
2299         * a-wichha.adb, a-wichha.ads, a-zchhan.adb, a-zchhan.ads: New file.
2300         * impunit.adb: Add entries for a-wichha/a-zchhan
2301         * Makefile.rtl: Add entries for a-wichha/a-zchhan
2302
2303 2010-10-07  Vincent Celier  <celier@adacore.com>
2304
2305         * make.adb (Check): Call Check_Source_Info_In_ALI with Project_Tree
2306         * makeutl.adb (Check_Source_Info_In_ALI): If there is at least one
2307         replaced source, check that none of the replaced sources are in the
2308         dependencies.
2309         * makeutl.ads (Check_Source_Info_In_ALI): New parameter Tree
2310         * prj-nmsc.adb (Remove_Source): New parameter Tree. If the source is
2311         replaced with a source with a different file name, put it in the hash
2312         table Replaced_Sources.
2313         (Add_Source): Call Remove_Source with Data.Tree. If there is at least
2314         one replaced source, check if it has the same file name as the current
2315         source; if it has, remove it from the hash table Replaced_Sources.
2316         * prj.adb (Reset): Reset hash table Tree.Replaced_Sources
2317         * prj.ads (Replaced_Source_HTable): New hash table
2318         (Project_Tree_Data): New components Replaced_Sources and
2319         Replaced_Source_Number.
2320
2321 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2322
2323         * sem_elab.adb (Check_A_Call): After inserting elaboration check, set
2324         proper flag to prevent a double elaboration check on the same call.
2325         * exp_util.adb (Insert_Actions): If the enclosing node is an
2326         Expression_With_Actions and it has been analyzed already, find
2327         insertion point further up in the tree.
2328
2329 2010-10-07  Hristian Kirtchev  <kirtchev@adacore.com>
2330
2331         * sem_ch13.adb (Analyze_Record_Representation_Clause): Alphabetize all
2332         local variables. Remove the general restriction which prohibits the
2333         application of record rep clauses to Unchecked_Union types. Add Ada
2334         2012 check to detect improper naming of an Unchecked_Union
2335         discriminant in record rep clause.
2336         * sem_prag.adb: Add with and use clause for Exp_Ch7.
2337         (Analyze_Pragma): Unchecked_Union case: Propagate the Unchecked_Union
2338         type to all invocations of Check_Component and Check_Variant.
2339         (Check_Component): Add formal parameters UU_Typ and In_Variant_Part.
2340         Rewritten.  Add Ada 2012 check to detect improper use of formal
2341         private types and private extensions as component types of an
2342         Unchecked_Union declared inside a generic body.
2343         (Check_Variant): Add formal parameter UU_Typ. Propagate the
2344         Unchecked_Union type to all calls of Check_Component. Signal that the
2345         current component comes from the variant part of an Unchecked_Union
2346         type.
2347         (Inside_Generic_Body): New routine.
2348
2349 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2350
2351         * exp_ch4.adb (Expand_Composite_Equality): When looking for a primitive
2352         equality operation for a record component, verify that both formals
2353         have the same type, and the result type is boolean.
2354
2355 2010-10-07  Vincent Celier  <celier@adacore.com>
2356
2357         * gnatcmd.adb (Check_Files): When looking for the .ci file for a
2358         binder generated file, look for both b~xxx and b__xxx as gprbuild
2359         always uses b__ as the prefix of such files.
2360
2361 2010-10-07  Thomas Quinot  <quinot@adacore.com>
2362
2363         * sem_res.adb: Minor reformatting.
2364
2365 2010-10-07  Arnaud Charlet  <charlet@adacore.com>
2366
2367         * debug.adb: Update -gnatd.J documentation.
2368
2369 2010-10-07  Robert Dewar  <dewar@adacore.com>
2370
2371         * gnat_rm.texi: Document handling of invalid values
2372         * s-utf_32.ads, s-utf_32.adb (UTF_To_Lower_Case): Fix implementation
2373         to match new spec.
2374         (UTF_To_Upper_Case): New function.
2375
2376 2010-10-07  Robert Dewar  <dewar@adacore.com>
2377
2378         * sem_attr.adb: Minor reformatting.
2379         * einfo.ads, einfo.adb (Is_Ada_2012_Only): New flag
2380         * itypes.adb (Create_Null_Excluding_Itype): Set Is_Ada_2012_Only flag
2381         properly.
2382         * lib-xref.adb (Generate_Reference): Warn on use of Ada 2012 entity in
2383         non-Ada 2012 mode.
2384         * opt.ads (Warn_On_Ada_2012_Compatibility): New flag
2385         * sem_ch3.adb (Analye_Subtype_Declaration): Inherit Is_Ada_2012_Only
2386         * sem_ch7.adb (Preserve_Full_Attributes): Preserve Is_Ada_2012_Only
2387         flag.
2388         * sem_prag.adb (Analyze_Pragma, case Ada_12/Ada_2012): Allow form with
2389         argument.
2390         * sem_type.adb (Disambiguate): Deal with Is_Ada_2012_Only.
2391         * sem_warn.adb (Warn_On_Ada_2012_Compatibility): New flag, treated
2392         same as 2005 flag.
2393
2394 2010-10-07  Javier Miranda  <miranda@adacore.com>
2395
2396         * a-tags.ads: Use new support for pragma Ada_2012 with function
2397         Type_Is_Abstract.
2398
2399 2010-10-07  Ed Schonberg  <schonberg@adacore.com>
2400
2401         * par-ch5.adb (P_Sequence_Of_Statements): In Ada2012 a label can end a
2402         sequence of statements.
2403
2404 2010-10-07  Vincent Celier  <celier@adacore.com>
2405
2406         * gnatcmd.adb (Check_Files): Only add a .ci files if it exists
2407
2408 2010-10-07  Javier Miranda  <miranda@adacore.com>
2409
2410         * a-tags.ads, a-tags.adb (Type_Is_Abstract): New subprogram.
2411         * rtsfind.ads (RE_Type_Is_Abstract): New entity.
2412         * exp_disp.adb (Make_DT): Initialize TSD component Type_Is_Abstract.
2413
2414 2010-10-07  Arnaud Charlet  <charlet@adacore.com>
2415
2416         * sem_ch12.adb (Mark_Context): Removed, no longer needed.
2417         (Analyze_Package_Instantiation): No longer analyze systematically a
2418         generic body in CodePeer mode.
2419         * freeze.adb, sem_attr.adb: Update comments.
2420
2421 2010-10-05  Robert Dewar  <dewar@adacore.com>
2422
2423         * par-ch5.adb (Test_Statement_Required): Allow all pragmas in Ada 2012
2424         mode.
2425
2426 2010-10-05  Pascal Obry  <obry@adacore.com>
2427
2428         * gnat_rm.texi: Fix typo.
2429
2430 2010-10-05  Arnaud Charlet  <charlet@adacore.com>
2431
2432         * gnat_ugn.texi: Add note about identifiers with same name and
2433         -fdump-ada-spec.
2434
2435 2010-10-05  Robert Dewar  <dewar@adacore.com>
2436
2437         * sem_ch4.adb: Minor reformatting.
2438         * a-direct.ads: Minor comment update.
2439
2440 2010-10-05  Javier Miranda  <miranda@adacore.com>
2441
2442         * sem_ch3.adb (Add_Internal_Interface_Entities): Removing code that is
2443         no longer required after change in New_Overloaded_Entity.
2444         * sem_ch6.adb (New_Overloaded_Entity): Code reorganization to isolate
2445         the fragment of code that handles derivations of interface primitives.
2446         Add missing dependence on global variable Inside_Freezing_Actions to
2447         ensure the correct management of internal interface entities.
2448         * sem_ch13.adb (Analyze_Freeze_Entity): Add missing increase/decrease
2449         of the global variable Inside_Freezing_Actions to ensure that internal
2450         interface entities are well handled by New_Overloaded_Entity.
2451         * sem_disp.adb (Find_Primitive_Covering_Interface): Add documentation
2452         and complete the algorithm to catch hidden primitives derived of
2453         private type that covers the interface.
2454         * sem_disp.ads (Find_Primitive_Covering_Interface): Add missing
2455         documentation.
2456
2457 2010-10-05  Robert Dewar  <dewar@adacore.com>
2458
2459         * prj-util.adb, prj-util.ads, prj.ads, s-vxwext-rtp.adb, sem_ch4.adb,
2460         sem_ch7.adb, sem_res.adb, sem_type.adb: Minor reformatting.
2461         Minor code reorganization (use Nkind_In).
2462
2463 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2464
2465         * sem_ch10.adb (Analyze_Task_Body_Stub): Diagnose duplicate stub for
2466         task.
2467
2468 2010-10-05  Vincent Celier  <celier@adacore.com>
2469
2470         * gnatbind.adb: If the main library file is not for a suitable main
2471         program, change the error message.
2472
2473 2010-10-05  Vincent Celier  <celier@adacore.com>
2474
2475         * a-direct.ads: Minor spelling error fixes in comments.
2476         * gnat_rm.texi: Add three entries in "Implementation Defined
2477         Characteristics" for the interpretations of the Form parameters in
2478         Ada.Directories.
2479
2480 2010-10-05  Robert Dewar  <dewar@adacore.com>
2481
2482         * exp_ch3.adb, exp_ch5.adb, exp_disp.adb, exp_dist.adb, gnatlink.adb,
2483         makeutl.adb, par-ch6.adb, prj-dect.adb, prj-env.adb, prj-env.ads,
2484         prj-ext.adb, prj-nmsc.adb, prj-part.adb, prj-pp.ads: Minor code
2485         reorganization.
2486         Minor reformatting.
2487
2488 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2489
2490         * sem_res.adb (Check_Parameterless_Call): If the prefix of 'Address is
2491         an explicit dereference of an access to function, the prefix is not
2492         interpreted as a parameterless call.
2493
2494 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2495
2496         * exp_attr.adb: For 'Read and 'Write, use full view of base type if
2497         private.
2498
2499 2010-10-05  Vincent Celier  <celier@adacore.com>
2500
2501         * make.adb (Switches_Of): Allow wild cards in index of attributes
2502         Switches.
2503         * prj-util.adb (Value_Of): When Allow_Wildcards is True, use the index
2504         of the associative array as a glob regular expression.
2505         * prj-util.ads (Value_Of (Index, In_Array)): New Boolean parameter
2506         Allow_Wildcards, defaulted to False.
2507         (Value_Of (Name, Attribute_Or_Array_Name)): Ditto
2508         * projects.texi: Document that attribute Switches (<file name>) may
2509         use wild cards in the index.
2510
2511 2010-10-05  Robert Dewar  <dewar@adacore.com>
2512
2513         * a-direct.adb, a-direct.ads, back_end.adb, checks.adb,
2514         einfo.adb: Minor reformatting.
2515         * debug.adb: Remove obsolete documentation for d.Z flag.
2516
2517 2010-10-05  Vincent Celier  <celier@adacore.com>
2518
2519         * vms_data.ads: Add VMS qualifier /SRC_INFO= corresponding to gnatmake
2520         switch --create-info-file=.
2521         * gnat_ugn.texi: Add documentation for new gnatmake switch
2522         --source-info=
2523
2524 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2525
2526         * sem_ch3.adb: Do not elaborate type definition if syntax error.
2527
2528 2010-10-05  Javier Miranda  <miranda@adacore.com>
2529
2530         * sprint.adb (Sprint_Node_Actual): Improve output of subprogram bodies
2531         to generate the full-qualified names of its corresponding spec.
2532         This facilitates locating the corresponing body when reading
2533         the DG output.
2534
2535 2010-10-05  Thomas Quinot  <quinot@adacore.com>
2536
2537         * exp_dist.adb (Make_Helper_Function_Name): For a tagged type, use
2538         canonical name without serial number only if the helper is becoming a
2539         primitive of the type.
2540
2541 2010-10-05  Javier Miranda  <miranda@adacore.com>
2542
2543         * exp_disp.adb (Make_DT): Minor code reorganization.
2544
2545 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2546
2547         * par-ch6.adb: improve recovery with extra paren in function spec.
2548
2549 2010-10-05  Quentin Ochem  <ochem@adacore.com>
2550
2551         * prj-tree.ads: Project_Path is now aliased.
2552
2553 2010-10-05  Thomas Quinot  <quinot@adacore.com>
2554
2555         * checks.adb: Minor reformatting.
2556
2557 2010-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2558
2559         * mlib-tgt-specific-mingw.adb (No_Argument_List): Delete.
2560         (Shared_Libgcc): New aliased variable.
2561         (Shared_Libgcc_Switch): New constant.
2562         (Build_Dynamic_Library): Pass Shared_Libgcc_Switch to the compiler
2563         * gcc-interface/Makefile.in (gnatlib-shared-win32): Pass -shared-libgcc
2564         to the compiler.
2565         * gcc-interface/Make-lang.in: Update dependencies.
2566         
2567 2010-10-05  Vincent Celier  <celier@adacore.com>
2568
2569         * prj-part.adb (Parse_Simple_Project): When checking if a child project
2570         imports its parent project, also look in projects being extended by
2571         imported projects.
2572
2573 2010-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2574
2575         * gnat_ugn.texi: Adjust instructions in G.10 Building DLLs with GNAT.
2576
2577 2010-10-05  Javier Miranda  <miranda@adacore.com>
2578
2579         * exp_cg.adb (Slot_Number): Add support to handle aliased entities.
2580         (Generate_CG_Output): Switch -gnatd.Z is no longer needed to
2581         activate this output.
2582
2583 2010-10-05  Arnaud Charlet  <charlet@adacore.com>
2584
2585         * back_end.adb (Call_Back_End): Generate an error message when scil
2586         generation is enabled, and no scil back-end (by default) is available.
2587
2588 2010-10-05  Javier Miranda  <miranda@adacore.com>
2589
2590         * debug.adb: Update documentation since -gnatd.Z is no longer required
2591         to generate the call-graph information.
2592
2593 2010-10-05  Javier Miranda  <miranda@adacore.com>
2594
2595         * exp_ch5.adb (Expand_Simple_Function_Return): Rewrite expansion of a
2596         runtime access check by an equivalent expansion that causes
2597         no problems in the VM backend. The original expansion was
2598         not good for the VM backends because when Tagged_Type_Expansion
2599         is disabled the attribute Access_Disp_Table is not available.
2600
2601 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2602
2603         * sem_type.adb (Covers): In a dispatching context, T1 covers T2 if T2
2604         is class-wide and T1 is its specific type.
2605
2606 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2607
2608         * einfo.adb: Add guard to Is_String_Type to prevent cascaded errors.
2609
2610 2010-10-05  Vincent Celier  <celier@adacore.com>
2611
2612         * back_end.ads: Minor spelling error correction.
2613
2614 2010-10-05  Arnaud Charlet  <charlet@adacore.com>
2615
2616         * switch-c.adb, gnat1drv.adb (Scan_Front_End_Switches): Disable
2617         warnings when -gnatC is specified here so that warnings can be
2618         re-enabled  explicitly.
2619         (Adjust_Global_Switches): No longer suppress warnings.
2620
2621 2010-10-05  Vincent Celier  <celier@adacore.com>
2622
2623         * makeutl.adb: Minor reformatting.
2624
2625 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2626
2627         * sem_ch4.adb: add guard in Analyze_One_Call to prevent crash when a
2628         non-discrete type appears as an actual in a call.
2629
2630 2010-10-05  Vincent Celier  <celier@adacore.com>
2631
2632         * make.adb (Scan_Make_Arg): Take into account new switch
2633         --source-info=file.
2634         * makeusg.adb: Add line for new switch --source-info=file.
2635         * makeutl.ads (Source_Info_Option): New constant String for new builder
2636         switch.
2637         * prj-conf.adb: Put subprograms in alphabetical order
2638         (Process_Project_And_Apply_Config): Read/write an eventual source info
2639         file, if necessary.
2640         * prj-nmsc.adb (Look_For_Sources.Get_Sources_From_Source_Info): New
2641         procedure.
2642         (Look_For_Sources): If a source info file was successfully read, get
2643         the source data from the data read from the source info file.
2644         * prj-util.adb (Source_Info_Table): New table
2645         (Source_Info_Project_HTable): New hash table
2646         (Create): New procedure
2647         (Put (File), Put_Line): New procedures
2648         (Write_Source_Info_File): New procedure
2649         (Read_Source_Info_File): New procedure
2650         (Initialize): New procedure
2651         (Source_Info_Of): New procedure
2652         (Next): New procedure
2653         (Close): When file is an out file, fail if the buffer cannot be written
2654         or if the file cannot be close successfully.
2655         (Get_Line): Fail if file is an out file
2656         * prj-util.ads (Create): New procedure
2657         (Put (File), Put_Line): New procedures
2658         (Write_Source_Info_File): New procedure
2659         (Read_Source_Info_File): New procedure
2660         (Source_Info_Data): New record type
2661         (Source_Info_Iterator): New private type
2662         (Initialize): New procedure
2663         (Source_Info_Of): New procedure
2664         (Next): New procedure
2665         * prj.ads (Project_Tree_Data): New components Source_Info_File_Name and
2666         Source_Info_File_Exists.
2667
2668 2010-10-05  Ed Schonberg  <schonberg@adacore.com>
2669
2670         * exp_ch4.adb: Fix typo.
2671
2672 2010-10-05  Thomas Quinot  <quinot@adacore.com>
2673
2674         * lib-writ.adb: Minor reformatting.
2675
2676 2010-10-05  Javier Miranda  <miranda@adacore.com>
2677
2678         * sem_ch3.adb (Access_Definition): Remove useless code.
2679
2680 2010-10-05  Emmanuel Briot  <briot@adacore.com>
2681
2682         * prj-env.adb, prj-env.ads (Set_Path): New subprogram.
2683         (Deep_Copy): Removed, not used.
2684
2685 2010-10-05  Javier Miranda  <miranda@adacore.com>
2686
2687         * sem_ch3.adb (Add_Internal_Interface_Entities): Code reorganization:
2688         move code that searches in the list of primitives of a tagged type for
2689         the entity that will be overridden by user-defined routines.
2690         * sem_disp.adb (Find_Primitive_Covering_Interface): Move here code
2691         previously located in routine Add_Internal_Interface_Entities.
2692         * sem_disp.ads (Find_Primitive_Covering_Interface): Update docs.
2693         * sem_ch6.adb (New_Overloaded_Entity): Add missing check on
2694         availability of attribute Alias.
2695
2696 2010-10-05  Ed Falis  <falis@adacore.com>
2697
2698         * s-taprop-vxworks.adb, s-osinte-vxworks.adb, s-osinte-vxworks.ads,
2699         s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.adb, s-vxwext-rtp.ads:
2700         Move definition of intContext to System.OS_Interface.
2701         Add necessary variants in System.VxWorks.Extensions.
2702
2703 2010-10-05  Doug Rupp  <rupp@adacore.com>
2704
2705         * s-asthan-vms-alpha.adb: On VMS, a task using
2706         pragma AST_Entry exhibits a memory leak when the task terminates
2707         because the vector allocated for the AST interface is not freed. Fixed
2708         by making the vector a controlled type.
2709
2710 2010-10-05  Emmanuel Briot  <briot@adacore.com>
2711
2712         * prj-nmsc.adb (Expand_Subdirectory_Pattern): Check that the prefix in
2713         a "**" pattern properly exists, and report an error otherwise.
2714
2715 2010-10-05  Emmanuel Briot  <briot@adacore.com>
2716
2717         * prj-env.ads: Use GNAT.OS_Lib rather than System.OS_Lib.
2718
2719 2010-10-05  Emmanuel Briot  <briot@adacore.com>
2720
2721         * prj-nmsc.adb, prj-err.adb (Expand_Subdirectory_Pattern): New
2722         subprogram.
2723         Extract some code from Get_Directories, to share with the handling
2724         of aggregate projects (for the Project_Files attributes)
2725
2726 2010-10-05  Emmanuel Briot  <briot@adacore.com>
2727
2728         * gnatcmd.adb, prj-proc.adb, prj-part.adb, prj-ext.adb, prj-ext.ads,
2729         switch-m.adb, clean.adb, prj-nmsc.adb, prj-nmsc.ads, prj-env.adb,
2730         prj-env.ads, prj-tree.adb, prj-tree.ads (Project_Search_Path): New
2731         type.
2732
2733 2010-10-05  Eric Botcazou  <ebotcazou@adacore.com>
2734
2735         * exp_ch5.adb (Make_Field_Expr): Revert previous change (removed).
2736
2737 2010-10-05  Emmanuel Briot  <briot@adacore.com>
2738
2739         * prj-dect.adb, prj-nmsc.adb, prj-attr.adb, snames.ads-tmpl
2740         (Aggregate projects): added support for parsing aggregate projects.
2741         In particular, check the presence and value of the new attributes
2742         related to aggregate projects, ie Project_Files, Project_Path
2743         and External.
2744         (Check_Attribute_Allowed, Check_Package_Allowed,
2745         Rename_Obsolescent_Attributes): new subprogram, extracting code
2746         from existing subprogram to keep their sizes smaller.
2747         (Check_Aggregate_Project, Check_Abstract_Project,
2748         Check_Missing_Sources): new subprograms
2749         (Check): remove comments that duplicated either the name of the
2750         following subprogram call, or the comment on that subprogram.
2751         * prj-part.adb (Check_Extending_All_Imports): New subprogram, extracted
2752         from Parse_Single_Project.
2753         (Check_Aggregate_Imports): new subprogram.
2754
2755 2010-10-05  Vincent Celier  <celier@adacore.com>
2756
2757         * make.adb (Check): When compiling with -gnatc, recompile if the ALI
2758         file has not been generated for the current source, for example if it
2759         has been generated for the spec, but we are compiling the body.
2760
2761 2010-10-05  Bob Duff  <duff@adacore.com>
2762
2763         * xgnatugn.adb: Remove unused procedure.
2764
2765 2010-10-04  Vincent Celier  <celier@adacore.com>
2766
2767         * a-direct.adb (Copy_File): Interpret the Form parameter and call
2768         System.OS_Lib.Copy_File to do the work accordingly. Raise Use_Error if
2769         the Form parameter contains an incorrect value for field preserve= or
2770         mode=.
2771         * a-direct.ads (Create_Directory, Create_Path): Indicate that the Form
2772         parameter is ignored.
2773         (Copy_File): Indicate the interpretation of the Form parameter.
2774
2775 2010-10-04  Vincent Celier  <celier@adacore.com>
2776
2777         * make.adb (Gnatmake): When there are no foreign languages declared and
2778         a main in attribute Main of the main project does not exist or is a
2779         source of another project, fail immediately before attempting
2780         compilation.
2781
2782 2010-10-04  Javier Miranda  <miranda@adacore.com>
2783
2784         * exp_disp.ads (Convert_Tag_To_Interface): New function which must be
2785         used to convert a node referencing a tag to a class-wide interface
2786         type.
2787         * exp_disp.adb (Convert_Tag_To_Interface): New function.
2788         (Expand_Interface_Conversion): Replace invocation of
2789         Unchecked_Conversion by new function Convert_Tag_To_Interface.
2790         (Write_DT): Add support for null primitives.
2791         * exp_ch3.adb (Expand_N_Object_Declaration): For tagged type objects,
2792         cleanup code that handles interface conversions and avoid unchecked
2793         conversion of referenced tag components.
2794         * exp_ch5.adb (Expand_N_Assignment_Statement): Code cleanup. Avoid
2795         unrequired conversions when generating a dispatching call to _assign.
2796         * sprint.adb (Write_Itype): Fix wrong output of not null access itypes.
2797
2798 2010-10-04  Ed Schonberg  <schonberg@adacore.com>
2799
2800         * exp_ch4.adb (Expand_N_Op_Not): Handle properly both operands when the
2801         parent is a binary boolean operation and the operand is an unpacked
2802         array.
2803         (Build_Boolean_Array_Proc_Call): If the operands are both negations,
2804         the operands of the rewritten node are the operands of the negations,
2805         not the negations themselves.
2806
2807 2010-10-04  Robert Dewar  <dewar@adacore.com>
2808
2809         * sem_ch13.adb (Set_Biased): New procedure, now used throughout, adds
2810         name of entity to biased warning msg.
2811         (Analyze_Enumeration_Representation_Clause): Remove attempt to use
2812         biased rep (wrong and never worked anyway).
2813
2814 2010-10-04  Arnaud Charlet  <charlet@adacore.com>
2815
2816         * sem_elab.adb: Minor reformatting.
2817
2818 2010-10-04  Ed Schonberg  <schonberg@adacore.com>
2819
2820         * exp_ch4.adb (Expand_N_Null): Handle properly the case of a subtype of
2821         an access_to_protected subprogram type, and convert null value into
2822         corresponding aggregate.
2823
2824 2010-10-04  Eric Botcazou  <ebotcazou@adacore.com>
2825
2826         * gnat_ugn.texi: Clarify first point of 7.1.5 about pragma Inline.
2827
2828 2010-10-04  Eric Botcazou  <ebotcazou@adacore.com>
2829
2830         * make.adb (Scan_Make_Arg): Pass -Oxxx switches to the linker as well.
2831         * gnatlink.adb (Gnatlink): Filter out -Oxxx switches for CLI, RTX and
2832         AAMP.
2833
2834 2010-10-04  Eric Botcazou  <ebotcazou@adacore.com>
2835
2836         * sem_ch4.adb (Analyze_Indexed_Component_Form): Remove redundant test
2837         for N_Operator_Symbol.
2838         (Indicate_Name_And_Type): Likewise.
2839         * sem_ch8.adb (Analyze_Subprogram_Renaming): Likewise.
2840         * sem_res.adb (Resolve): Likewise.
2841         * sem_type.adb (Add_One_Interp): Likewise.
2842         (Disambiguate): Likewise.
2843         
2844 2010-10-04  Vincent Celier  <celier@adacore.com>
2845
2846         * osint.adb (Read_Library_Info_From_Full): If object timestamp is less
2847         than ALI file timestamp, return null.
2848
2849 2010-10-04  Vincent Celier  <celier@adacore.com>
2850
2851         * prj-makr.adb (Finalize): Invoke Pretty_Print with Max_Length of 79.
2852         * prj-pp.adb (Pretty_Print): New parameter Max_Line_Length, that
2853         replaces global constant with the same name. When a line is too long,
2854         indent properly the next continuation line.
2855         * prj-pp.ads (Pretty_Print): New parameter Max_Line_Length with a range
2856         from 50 to 255, defaulted to 255, to indicate the maximum length of
2857         lines in the project file.
2858
2859 2010-10-04  Eric Botcazou  <ebotcazou@adacore.com>
2860
2861         * sem_ch7.adb (Analyze_Package_Body_Helper) <Has_Referencer>: New
2862         Check_Subprogram_Ref function and Check_Subprogram_Refs instantiation
2863         of Traverse_Func on it to look for subprogram references in a body.
2864         Call Check_Subprogram_Refs on the body of inlined subprograms at the
2865         outer level and keep clearing the Is_Public flag of subprograms as long
2866         as it returns OK.  Do not look at anything else than subprograms once
2867         an inlined subprogram has been seen.
2868
2869 2010-10-04  Javier Miranda  <miranda@adacore.com>
2870
2871         * exp_cg.adb (Expand_N_Assignment_Statement): Restore tag check when
2872         the target object is an interface.
2873         * sem_disp.adb (Propagate_Tag): If the controlling argument is an
2874         interface type then we generate an implicit conversion to force
2875         displacement of the pointer to the object to reference the secondary
2876         dispatch table associated with the interface.
2877
2878 2010-10-04  Robert Dewar  <dewar@adacore.com>
2879
2880         * sem_ch13.adb (Analyze_Enumeration_Representation_Clause): Set
2881         Enumeration_Rep_Expr to point to the literal, not the identifier.
2882         (Analyze_Enumeration_Representation_Clause): Improve error message for
2883         size too small for enum rep value
2884         (Analyze_Enumeration_Representation_Clause): Fix size test to use
2885         proper size (RM_Size, not Esize).
2886
2887 2010-10-04  Robert Dewar  <dewar@adacore.com>
2888
2889         * s-taprop-vxworks.adb, sem_res.adb: Minor reformatting.
2890
2891 2010-10-04  Javier Miranda  <miranda@adacore.com>
2892
2893         * exp_cg.adb (Write_Call_Info): Code clean up.
2894
2895 2010-10-04  Arnaud Charlet  <charlet@adacore.com>
2896
2897         * s-taprop-mingw.adb (Create_Task): Initialize Thread_Id field to 0.
2898
2899 2010-10-04  Robert Dewar  <dewar@adacore.com>
2900
2901         * exp_cg.adb: Minor code reorganization
2902         Minor reformatting.
2903         * exp_ch5.adb, prj-nmsc.adb: Minor reformatting.
2904
2905 2010-10-04  Bob Duff  <duff@adacore.com>
2906
2907         * sem_res.adb (Resolve_Type_Conversion): If a type conversion is needed
2908         to make a qualified expression into a name (syntax-wise), then do not
2909         consider it redundant.
2910
2911 2010-10-04  Thomas Quinot  <quinot@adacore.com>
2912
2913         * sem_warn.ads: Fix typo.
2914
2915 2010-10-04  Javier Miranda  <miranda@adacore.com>
2916
2917         * exp_cg.adb (Is_Predefined_Dispatching_Operation): Handle suffix in
2918         TSS names.
2919         (Write_Call_Info): Add missing support for renamed primitives.
2920
2921 2010-10-04  Thomas Quinot  <quinot@adacore.com>
2922
2923         * exp_ch5.adb (Make_Field_Expr): New subprogram, to factor duplicated
2924         code between Make_Component_List_Assign and Make_Field_Assign.
2925
2926 2010-10-04  Vincent Celier  <celier@adacore.com>
2927
2928         * prj-nmsc.adb (Get_Directories): For non extending projects that
2929         declare that they have no sources, do not create a non existing object
2930         or exec directory if builder switch -p is used.
2931
2932 2010-10-04  Sergey Rybin  <rybin@adacore.com>
2933
2934         * gnat_ugn.texi (gnatcheck): Change the description of the report file
2935         format.
2936
2937 2010-10-04  Ed Falis  <falis@adacore.com>
2938
2939         * s-taprop-vxworks.adb (Is_Task_Context): Import VxWorks intContext to
2940         determine whether Set_True is called from a task or an ISR.
2941         (Set_True): test for being in a task context before trying to
2942         dereference Defer_Abort or Undefer_Abort.
2943
2944 2010-10-04  Robert Dewar  <dewar@adacore.com>
2945
2946         * sem_res.adb, sinput-l.adb: Minor reformatting.
2947
2948 2010-10-04  Hristian Kirtchev  <kirtchev@adacore.com>
2949
2950         * exp_ch5.adb (Expand_N_Assignment_Statement): Do not generate a tag
2951         check when the target object is an interface since the expression of
2952         the right hand side must only cover the interface.
2953
2954 2010-10-04  Vincent Celier  <celier@adacore.com>
2955
2956         * frontend.adb: Set Lib.Parsing_Main_Extended_Source to True before
2957         loading the main source, so that if it is preprocessed and -gnateG is
2958         used, the preprocessed file is written.
2959         * lib.ads (Analysing_Subunit_Of_Main): New global variable to indicate
2960         if a subunit is from the main unit when it is loaded.
2961         * sem_ch10.adb (Analyze_Proper_Body): Set Lib.Analysing_Subunit_Of_Main
2962         to True before loading a subunit.
2963         * sem_ch12.adb (Copy_Generic_Node): Set Lib.Analysing_Subunit_Of_Main
2964         to True when the main is a generic unit before loading one of its
2965         subunits.
2966         * sinput-l.adb (Load_File): If -gnateG is used, write the preprocessed
2967         file only for the main unit (spec, body and subunits).
2968
2969 2010-10-04  Vincent Celier  <celier@adacore.com>
2970
2971         * sinput-l.adb (Load_File): Do not fail when switch -gnateG is
2972         specified and the processed file cannot be written. Just issue a
2973         warning and continue.
2974
2975 2010-10-04  Thomas Quinot  <quinot@adacore.com>
2976
2977         * sem_res.adb: Minor reformatting.
2978
2979 2010-10-04  Ed Schonberg  <schonberg@adacore.com>
2980
2981         * sem_ch8.adb (Analyze_Subprogram_Renaming): If the renamed operation
2982         is an overridden inherited operation, the desired operation is the
2983         overriding one, which is the alias of the visible one.
2984
2985 2010-10-04  Ed Schonberg  <schonberg@adacore.com>
2986
2987         * sem_ch6.adb (Find_Corresponding_Spec): Check that the wrapper body is
2988         present before deleting from the tree, when an inherited function with
2989         a controlling result that returns a null extension is overridden by a
2990         later declaration or body.
2991
2992 2010-10-04  Gary Dismukes  <dismukes@adacore.com>
2993
2994         * checks.adb: Update comment.
2995
2996 2010-09-30  Joseph Myers  <joseph@codesourcery.com>
2997
2998         * gcc-interface/misc.c (optimize, optimize_size): Undefine as macros
2999         and define as variables.
3000         (gnat_post_options): Set optimize and optimize_size variables.
3001
3002 2010-09-29  Joel Sherrill  <joel.sherrill@oarcorp.com>
3003
3004         * g-socket.adb: Move pragma to disable warnings in case multiple errnos
3005         are not defined by target.
3006
3007 2010-09-29  Eric Botcazou  <ebotcazou@adacore.com>
3008
3009         * gcc-interface/utils.c (handle_leaf_attribute): Fix long line.
3010
3011 2010-09-28  Richard Henderson  <rth@redhat.com>
3012
3013         * gcc-interface/misc.c (gnat_eh_personality): Use
3014         targetm.except_unwind_info.
3015
3016 2010-09-28  Jan Hubicka  <jh@suse.cz>
3017
3018         * gcc-interface/utils.c (handle_leaf_attribute): New function.
3019         (gnat_internal_attribute_tables): Add leaf.
3020
3021 2010-09-22  Joseph Myers  <joseph@codesourcery.com>
3022
3023         * gcc-interface/lang.opt (-all-warnings, -include-barrier,
3024         -include-directory, -include-directory=, -no-standard-includes,
3025         -no-standard-libraries): New.
3026
3027 2010-09-20  Eric Botcazou  <ebotcazou@adacore.com>
3028
3029         * gcc-interface/decl.c (gnat_to_gnu_entity): Replace calls to
3030         build_array_type with calls to build_nonshared_array_type.
3031         (substitute_in_type): Likewise.
3032         * gcc-interface/misc.c (LANG_HOOKS_HASH_TYPES): Delete.
3033         (LANG_HOOKS_TYPE_HASH_EQ): Define.
3034         (gnat_post_options): Add 'static' keyword.
3035         (gnat_type_hash_eq): New static function.
3036         * gcc-interface/utils.c (fntype_same_flags_p): New function.
3037         (create_subprog_type): Call it.
3038         (create_index_type): Call build_nonshared_range_type and tidy up.
3039         (create_range_type): Likewise.
3040         * gcc-interface/gigi.h (fntype_same_flags_p): Declare.
3041
3042 2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3043
3044         * gcc-interface/trans.c (gnat_pushdecl): Do not do anything special
3045         for PARM_DECLs.
3046         (end_subprog_body): If the body is a BIND_EXPR, make its associated
3047         block the top-level one.
3048         (build_function_stub): Build a statement group for the whole function.
3049         * gcc-interface/utils.c (Subprogram_Body_to_gnu): If copy-in/copy-out
3050         is used, create the enclosing block early and process first the OUT
3051         parameters.
3052
3053 2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3054
3055         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>: Do
3056         not generate debug info for individual enumerators.
3057
3058 2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3059
3060         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Use record
3061         type instead of enumeral type as the dummy type built for the template
3062         type of fat pointers.
3063
3064 2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3065
3066         * gcc-interface/gigi.h (get_elaboration_procedure): Declare.
3067         (gnat_zaplevel): Likewise.
3068         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force global
3069         binding level for an external constant.
3070         <E_Constant>: Force the local context and create a fake scope before
3071         translating the defining expression of an external constant.
3072         <object>: Treat external constants at the global level explicitly for
3073         renaming declarations.
3074         (elaborate_expression_1): Force the variable to be static if the
3075         expression is global.
3076         * gcc-interface/trans.c (get_elaboration_procedure): New function.
3077         (call_to_gnu): Use it.
3078         (gnat_to_gnu): Likewise.
3079         <N_Object_Declaration>: Do not test Is_Public to force the creation of
3080         an initialization variable.
3081         (add_decl_expr): Discard the statement if the declaration is external.
3082         * gcc-interface/utils.c (gnat_pushdecl): Do not put the declaration in
3083         the current block if it is external.
3084         (create_var_decl_1): Do not test Is_Public to set TREE_STATIC.
3085         (gnat_zaplevel): New global function.
3086
3087 2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3088
3089         * gcc-interface/decl.c (gnat_to_gnu_entity): Explicitly test _LEVEL
3090         variables against zero in all cases.
3091         (rest_of_type_decl_compilation): Likewise.
3092         * gcc-interface/trans.c (gigi): Pass properly typed constants to
3093         create_var_decl.
3094         (call_to_gnu): Fix formatting.
3095         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
3096         (Exception_Handler_to_gnu_zcx): Likewise.
3097         (gnat_to_gnu) <N_Object_Declaration>: Short-circuit handling of
3098         constant
3099         expressions in presence of a freeze node.
3100
3101 2010-09-19  Eric Botcazou  <ebotcazou@adacore.com>
3102
3103         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Constant>: Look into
3104         expressions for external constants that are aggregates.
3105         * gcc-interface/utils2.c (build_simple_component_ref): If the field
3106         is an inherited component in an extension, look through the extension.
3107
3108 2010-09-10  Vincent Celier  <celier@adacore.com>
3109
3110         * projects.texi: Add documentation for package extensions
3111         Add some documentation for attributes Leading_Library_Options and
3112         Linker'Leading_Switches.
3113
3114 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3115
3116         * exp_util.adb (Expand_Subtype_From_Expression): When expansion is
3117         disabled, compute subtype for all string types.
3118
3119 2010-09-10  Robert Dewar  <dewar@adacore.com>
3120
3121         * gnat_ugn.texi: Add documentation for -gnatw.s/S
3122         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3123         Component_Size): Implement warning on overriden size clause.
3124         (Analyze_Record_Representation_Clause): Implement warning on overriden
3125         size clause.
3126         * sem_warn.ads, sem_warn.adb (Warn_On_Overridden_Size): New flag
3127         (-gnatw.s/S).
3128         * ug_words: Add entries for -gnatw.s/S.
3129         * vms_data.ads, usage.adb: Add line for -gnatw.s/-gnatw.S.
3130         * gcc-interface/Make-lang.in: Update dependencies.
3131
3132 2010-09-10  Vincent Celier  <celier@adacore.com>
3133
3134         * prj-dect.adb (Parse_Package_Declaration): Allow a package to extend
3135         a package with the same name from an imported or extended project.
3136         * prj-proc.adb (Process_Declarative_Items): Process package extensions
3137
3138 2010-09-10  Bob Duff  <duff@adacore.com>
3139
3140         * exp_ch6.adb (Expand_Call): Do not perform a null_exclusion check on
3141         'out' parameters.
3142
3143 2010-09-10  Robert Dewar  <dewar@adacore.com>
3144
3145         * sem.adb: Minor reformatting.
3146
3147 2010-09-10  Bob Duff  <duff@adacore.com>
3148
3149         * s-os_lib.ads, g-expect.ads: Add comments.
3150
3151 2010-09-10  Robert Dewar  <dewar@adacore.com>
3152
3153         * exp_ch5.adb: Minor reformatting.
3154
3155 2010-09-10  Thomas Quinot  <quinot@adacore.com>
3156
3157         * scos.ads: Add comments.
3158
3159 2010-09-10  Vincent Celier  <celier@adacore.com>
3160
3161         * gnatcmd.adb (Get_Closure): Remove useless invocation of Close.
3162
3163 2010-09-10  Hristian Kirtchev  <kirtchev@adacore.com>
3164
3165         * exp_ch7.adb, exp_ch6.adb (Expand_Call): Establish a transient scope
3166         for a controlled build-in-place function call which appears in an
3167         anonymous context. The transient scope ensures that the intermediate
3168         function result is cleaned up after the master is left.
3169         (Make_Build_In_Place_Call_In_Anonymous_Context): Remove the creation
3170         of the transient scope. This is now done in Exand_Call which covers
3171         additional cases other than secondary stack release.
3172
3173 2010-09-10  Arnaud Charlet  <charlet@adacore.com>
3174
3175         * sem.adb (Do_Unit_And_Dependents): Add guard.
3176
3177 2010-09-10  Robert Dewar  <dewar@adacore.com>
3178
3179         * exp_ch5.adb: Update comments.
3180         * exp_dist.adb: Minor reformatting.
3181
3182 2010-09-10  Robert Dewar  <dewar@adacore.com>
3183
3184         * sem_ch13.adb (Check_Record_Representation_Clause): Implement record
3185         gap warnings.
3186         * sem_warn.ads, sem_warn.adb (Warn_On_Record_Holes): New warning flag.
3187         * usage.adb: Add lines for -gnatw.h/H
3188         * gnat_ugn.texi: Add documentation for J519-010
3189         Warn on record holes/gaps
3190         * ug_words: Add entries for -gnatw.h/-gnatw.H
3191         * vms_data.ads: Add entries for [NO]AVOIDGAPS
3192
3193 2010-09-10  Gary Dismukes  <dismukes@adacore.com>
3194
3195         * sem_ch6.adb: Update comment.
3196
3197 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3198
3199         * sem_ch3.adb (Build_Derived_Private_Type): Mark generated declaration
3200         of full view analyzed after analyzing the corresponding record
3201         declaration, to prevent spurious name conflicts with original
3202         declaration.
3203
3204 2010-09-10  Jerome Lambourg  <lambourg@adacore.com>
3205
3206         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): In the VM case,
3207         just issue a warning, but continue with the normal processing.
3208
3209 2010-09-10  Robert Dewar  <dewar@adacore.com>
3210
3211         * exp_attr.adb, prj-nmsc.adb, sem_ch4.adb, sem_res.adb: Minor
3212         reformatting.
3213
3214 2010-09-10  Thomas Quinot  <quinot@adacore.com>
3215
3216         * exp_dist.adb (Build_From_Any_Call, Build_To_Any_Call,
3217         Build_TypeCode_Call): For a subtype inserted for the expansion of a
3218         generic actual type, go to the underlying type of the original actual
3219         type.
3220
3221 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3222
3223         * exp_ch5.adb (Expand_Assign_Array_Loop): In CodePeer mode, place a
3224         guard around the increment statement, to prevent an off-by-one-value
3225         on the last iteration.
3226
3227 2010-09-10  Vincent Celier  <celier@adacore.com>
3228
3229         * sem_aggr.adb, exp_prag.adb, sem_ch3.adb, exp_attr.adb,
3230         sem_res.adb, sem_attr.adb, sem_elab.adb, sem_ch4.adb, exp_disp.adb,
3231         exp_aggr.adb, exp_dist.adb: Change all mentions of "at run-time" to
3232         "at run time" in comments and error/warning messages.
3233
3234 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3235
3236         * exp_cg.adb: Handle properly bodies without specs.
3237
3238 2010-09-10  Emmanuel Briot  <briot@adacore.com>
3239
3240         * prj-nmsc.adb (Find_Source_Dirs): When a source directory is not
3241         present, and the user requested to either ignore this or display a
3242         warning (as opposed to an error), we still need to register the
3243         directory.
3244
3245 2010-09-10  Robert Dewar  <dewar@adacore.com>
3246
3247         * errout.adb: Remove tests of Parsing_Main_Subunit, since this test is
3248         now done in In_Extended_Main_Source_Unit.
3249         * errout.ads (Compiler_State[_Type]): Moved from Errout to Lib
3250         (Parsing_Main_Subunit): Moved from Errout to Lib and renamed
3251         as Parsing_Main_Extended_Source.
3252         * frontend.adb: Set Parsing_Main_Extended_Source True for parsing main
3253         unit.
3254         * lib-load.adb (Load_Unit): Add PMES parameter
3255         Set PMES appropriately in all calls to Load_Unit
3256         * lib-load.ads (Load_Unit): Add PMES parameter
3257         * lib.adb (In_Extended_Main_Source_Unit): When called with
3258         Compiler_State set to Parsing, test new flag
3259         Compiling_Main_Extended_Source.
3260         * lib.ads (Compiler_State[_Type]): Moved from Errout to Lib
3261         (Parsing_Main_Subunit): Moved from Errout to Lib and renamed
3262         as Parsing_Main_Extended_Source
3263         * par-load.adb (Load): Set PMES properly in call to Load_Unit
3264
3265 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3266
3267         * exp_cg.adb: Use proper entity to handle overloads.
3268         * sem_res.adb (Check_Parameterless_Call): An operator node without
3269         actuals cannot be a call, and must be treated as a string.
3270
3271 2010-09-10  Robert Dewar  <dewar@adacore.com>
3272
3273         * frontend.adb: Minor reformatting.
3274
3275 2010-09-10  Robert Dewar  <dewar@adacore.com>
3276
3277         * par-ch4.adb (P_Conditional_Expression): Use P_Condition for condition
3278         * par-ch5.adb (P_Condition): Move from body to spec
3279         * par.adb (Ch5.P_Condition): Move from body to spec
3280
3281 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3282
3283         * exp_cg.adb (Write_Call_Info): If a type that has been registered in
3284         the call table is private, use its full view to generate information
3285         on its operations.
3286
3287 2010-09-10  Jose Ruiz  <ruiz@adacore.com>
3288
3289         * exp_cg.adb (Is_Predefined_Dispatching_Operation): When trying the
3290         pattern matching to detect predefined primitive operations take into
3291         account that there can be an extra suffix related to body-nested
3292         package entities.
3293
3294 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3295
3296         * s-pooglo.ads: Add overriding indicators.
3297
3298 2010-09-10  Vincent Celier  <celier@adacore.com>
3299
3300         * vms_data.ads: Add new GNAT BIND qualifiers /32_MALLOC (for -H32) and
3301         /64_MALLOC (for -H64).
3302
3303 2010-09-10  Robert Dewar  <dewar@adacore.com>
3304
3305         * errout.adb (Error_Msg_Internal): Test Parsing_Main_Subunit flag
3306         (Error_Msg_NW): Test Parsing_Main_Subunit flag
3307         * errout.ads (Parsing_Main_Subunit): New flag
3308         * lib-load.adb (Load_Unit): Set Parsing_Main_Subunit flag
3309         * par-ch6.adb: Minor style fix (remove redandant parentheses)
3310         * par-ch9.adb: Minor style fix (remove redundant parens)
3311         * par-load.adb: (Load): Deal with setting Parsing_Main_Subunit
3312
3313 2010-09-10  Vincent Celier  <celier@adacore.com>
3314
3315         * make.adb (Create_Binder_Mapping_File): Remove procedure. Replaced by
3316         function of the same name in Makeutl.
3317         (Gnatmake): Call function Create_Binder_Mapping_File in Makeutl, instead
3318         of removed procedure when creating a binder mapping file.
3319         * makeutl.adb (Create_Binder_Mapping_File): New function. Was a
3320         procedure in Make.
3321         * makeutl.ads (Create_Binder_Mapping_File): New function
3322
3323 2010-09-10  Jose Ruiz  <ruiz@adacore.com>
3324
3325         * exp_cg.adb (Is_Predefined_Dispatching_Operation): Add the "__" scope
3326         separator when trying the pattern matching to detect predefined
3327         primitive operations.
3328
3329 2010-09-10  Robert Dewar  <dewar@adacore.com>
3330
3331         * bindgen.adb, atree.adb: Minor reformatting.
3332
3333 2010-09-10  Ben Brosgol  <brosgol@adacore.com>
3334
3335         * ug_words, gnat_ugn.texi: Revised "Transitioning to 64-Bit GNAT for
3336         OpenVMS" section.
3337
3338 2010-09-10  Doug Rupp  <rupp@adacore.com>
3339
3340         * bindgen.adb: Minor comment fix for -H switch.
3341
3342 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3343
3344         * exp_cg.adb (Register_CG_Node): Determine enclosing subprogram or
3345         library unit now, by traversing tree before context is expanded.
3346         (Write_Call_Info): Use enclosing unit name directly.
3347         * exp_ch9.adb (Expand_N_Accept_Statement): Attach generated block to
3348         tree earlier, to ensure that subsequent declarations are analyzed in a
3349         connected structure.
3350         * exp_intr.adb (Expand_Unc_Deallocation): Ditto for generated statement
3351         list.
3352
3353 2010-09-10  Robert Dewar  <dewar@adacore.com>
3354
3355         * symbols-processing-vms-alpha.adb: Minor reformatting.
3356
3357 2010-09-10  Jerome Lambourg  <lambourg@adacore.com>
3358
3359         * bindgen.adb (Gen_Adainit_Ada): In .NET, don't call
3360         __gnat_install_handler in case the binder is called with -n.
3361
3362 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3363
3364         * exp_ch6.adb (Make_Build_In_Place_In_Object_Declaration): Use proper
3365         sloc for renaming declaration and set Comes_From_Source properly to
3366         ensure that references are properly generated for an object declaration
3367         that is built in place.
3368
3369 2010-09-10  Tristan Gingold  <gingold@adacore.com>
3370
3371         * symbols-processing-vms-alpha.adb: Allow gnatsym to work as a cross
3372         tool.
3373         * gcc-interface/Make-lang.in: Install gnatsym when cross compiling.
3374         * gcc-interface/Makefile.in: gnat.hlp is now generated by
3375         Make-generated.in
3376
3377 2010-09-10  Bob Duff  <duff@adacore.com>
3378
3379         * exp_pakd.adb (Expand_Bit_Packed_Element_Set): For things like ""X(J)
3380         := ...;", remove side effects from the right-hand side, because they
3381         might affect the value of the left-hand side, but the left-hand side is
3382         first READ (so we can do shifting and masking) and then written back,
3383         which would cause the side effects to be incorrectly overwritten.
3384
3385 2010-09-10  Robert Dewar  <dewar@adacore.com>
3386
3387         * sem_ch4.adb: Minor reformatting.
3388         * exp_ch6.adb: Add comment on testing limited on full type
3389         * gnat_rm.texi: Add documentation on Pure_Function.
3390
3391 2010-09-10  Vincent Celier  <celier@adacore.com>
3392
3393         * prj-nmsc.adb (Add_Source): Allow an Ada source to have the same name
3394         as a source of another project and of another language.
3395
3396 2010-09-10  Robert Dewar  <dewar@adacore.com>
3397
3398         * exp_ch3.adb (Expand_N_Object_Declaration): Defend against previous
3399         errors.
3400         * freeze.adb (Check_Unsigned_Type): Ditto.
3401         * sem_aggr.adb (Resolve_Aggr_Expr): Ditto.
3402         * sem_ch3.adb (Convert_Scalar_Bounds): Ditto.
3403         (Set_Scalar_Range_For_Subtype): Ditto.
3404         * sem_eval.adb (Subtypes_Statically_Match): Ditto.
3405
3406 2010-09-10  Robert Dewar  <dewar@adacore.com>
3407
3408         * repinfo.adb (List_Type_Info): List Small and Range for fixed-point
3409         types.
3410         * sprint.adb (Write_Ureal_With_Col_Check_Sloc): Use square brackets
3411         rather than parens for fixed constants.
3412         * sprint.ads: Use square brackets rather than parens for fixed constants
3413         * urealp.adb (UR_Write): Use square brackets rather than parens
3414         (UR_Write): Add Brackets argument
3415         (UR_Write): Add many more special cases to output literals
3416         * urealp.ads (UR_Write): Use square brackets rather than parens
3417         (UR_Write): Add Brackets argument
3418
3419 2010-09-10  Robert Dewar  <dewar@adacore.com>
3420
3421         * sem_ch4.adb: Minor reformatting.
3422
3423 2010-09-10  Richard Guenther  <rguenther@suse.de>
3424
3425         * gcc-interface/utils.c (create_index_type): Use build_range_type.
3426
3427 2010-09-10  Arnaud Charlet  <charlet@adacore.com>
3428
3429         * vms_cmds.ads: New.
3430
3431 2010-09-10  Eric Botcazou  <ebotcazou@adacore.com>
3432
3433         * exp_dbug.ads: Mention enhanced encoding for array types.
3434
3435 2010-09-10  Jerome Lambourg  <lambourg@adacore.com>
3436
3437         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Size clause are
3438         unsupported in VM targets. Display a warning in this case.
3439
3440 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3441
3442         * sprint.adb (Sprint_Node_Actual, case N_Derived_Type_Definition): Do
3443         not reset Sloc when printing keyword "new".
3444
3445 2010-09-10  Vincent Celier  <celier@adacore.com>
3446
3447         * gnatcmd.adb (GNATCmd): Put the command line in environment variable
3448         GNAT_DRIVER_COMMAND_LINE.
3449
3450 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3451
3452         * sem.adb (Do_Unit_And_Dependents): if Withed_Body is set on a context
3453         clause, process the body at once.
3454
3455 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3456
3457         * sem_res.adb (Resolve_Type_Conversion): Do not warn on a redundant
3458         conversion is the expression is a qualified expression used to
3459         disambiguate a function call.
3460
3461 2010-09-10  Vincent Celier  <celier@adacore.com>
3462
3463         * prj-nmsc.adb (Add_Source): Allow an Ada source to have the same name
3464         as a source of another project and of another language.
3465
3466 2010-09-10  Robert Dewar  <dewar@adacore.com>
3467
3468         * prj-util.adb: Minor reformatting.
3469
3470 2010-09-10  Eric Botcazou  <ebotcazou@adacore.com>
3471
3472         * exp_disp.adb: Minor reformatting.
3473
3474 2010-09-10  Arnaud Charlet  <charlet@adacore.com>
3475
3476         * sem_prag.adb (Analyze_Pragma): Ignore Inline_Always pragma in
3477         CodePeer mode.
3478
3479 2010-09-10  Thomas Quinot  <quinot@adacore.com>
3480
3481         * sem_res.adb: Minor reformatting.
3482         * exp_ch9.adb, rtsfind.ads, exp_ch4.adb, exp_ch3.adb: Do not hardcode
3483         magic constants for task master levels (instead, reference
3484         named numbers from System.Tasking).
3485
3486 2010-09-10  Eric Botcazou  <ebotcazou@adacore.com>
3487
3488         * gnatvsn.ads (Ver_Prefix): New constant string.
3489         * bindgen.adb (Gen_Output_File_Ada): Use it in lieu of hardcoded value.
3490         (Gen_Output_File_C): Likewise.
3491         * g-comver.adb (Ver_Prefix): Add cross-reference to Gnatvsn.Ver_Prefix
3492         in comment.
3493         
3494 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3495
3496         * sem.adb (Walk_Library_Items): Do not traverse children of the main
3497         unit, to prevent spurious circularities in the walk order.
3498         (Depends_On_Main): Use elsewhere to prevent circularities when the body
3499         of an ancestor of the main unit depends on a child of the main unit.
3500
3501 2010-09-10  Robert Dewar  <dewar@adacore.com>
3502
3503         * gnatlink.adb, prj-ext.adb, prj-util.adb, s-tporft.adb,
3504         sem_ch3.adb: Minor reformatting.
3505
3506 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3507
3508         * sem_ch3.adb (Derive_Subprograms): An interface primitive operation
3509         that is a renaming must be derived like any other primitive operation,
3510         the renamed operation is not relevant to the derivation.
3511
3512 2010-09-10  Robert Dewar  <dewar@adacore.com>
3513
3514         * sem_aux.ads: Add comment for Is_Inherently_Limited_Type.
3515         * checks.adb: Minor reformatting.
3516
3517 2010-09-10  Robert Dewar  <dewar@adacore.com>
3518
3519         * gnat_ugn.texi: Add section on intent of style checking options.
3520
3521 2010-09-10  Arnaud Charlet  <charlet@adacore.com>
3522
3523         * xref_lib.adb (Get_Full_Type): Fix handling of 'a' char.
3524
3525 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3526
3527         * sem_ch3.adb: Improve error message on derivation from class-wide type
3528
3529 2010-09-10  Steve Baird  <baird@adacore.com>
3530
3531         * gnat1drv.adb (Adjust_Global_Switches): Enable Expression_With_Actions
3532         generation when Generate_SCIL is True.
3533
3534 2010-09-10  Geert Bosch  <bosch@adacore.com>
3535
3536         * gnatlink.adb (Check_ Existing_Executable): New procedure for checking
3537         validity of executable name and removing any existing executable
3538         (Gnatlink): Call Check_Existing_Executable.
3539
3540 2010-09-10  Arnaud Charlet  <charlet@adacore.com>
3541
3542         * s-tporft.adb, s-taskin.ads (Register_Foreign_Thread): Move
3543         initialization of Task_Alternate_Stack here, cleaner since in case of
3544         ranvescar, Restricted_Ada_Task_Control_Block is not initialized
3545         implicitly.
3546
3547 2010-09-10  Thomas Quinot  <quinot@adacore.com>
3548
3549         * s-fileio.adb, a-dirval.adb: Minor reformatting.
3550
3551 2010-09-10  Emmanuel Briot  <briot@adacore.com>
3552
3553         * prj-util.adb (Executable_Of): Fix CE when the project does not
3554         contain a Builder package.
3555
3556 2010-09-10  Vincent Celier  <celier@adacore.com>
3557
3558         * prj-ext.adb (Initialize_Project_Path): Add <prefix>/lib/gpr/<target>
3559         to the project path, if Prefix and Target_Name are defined.
3560         * prj-tree.ads (Project_Node_Tree_Data): New component Target_Name
3561
3562 2010-09-10  Ed Schonberg  <schonberg@adacore.com>
3563
3564         * checks.adb (Ensure_Valid): If the expression is a boolean expression
3565         or short-circuit operation, do no emit a validity check: only the
3566         elementary operands of the expression need checking.
3567
3568 2010-09-10  Ben Brosgol  <brosgol@adacore.com>
3569
3570         * gnat_rm.texi: Document Short_Descriptors.
3571
3572 2010-09-10  Arnaud Charlet  <charlet@adacore.com>
3573
3574         * s-taprop-linux.adb, s-taskin.ads (Task_Alternate_Stack): Default
3575         initialize to Null_Address.
3576         (Enter_Task): Do not set up an alternate stack for foreign threads.
3577
3578 2010-09-10  Robert Dewar  <dewar@adacore.com>
3579
3580         * opt.adb (Short_Descriptors): New flag
3581         (Short_Descriptors_Config): New flag
3582         * opt.ads (Short_Descriptors): New flag
3583         (Short_Descriptors_Config): New flag
3584         * par-prag.adb: Add dummy entry for Short_Descriptors pragma
3585         * sem_prag.adb (Set_Mechanism_Value): Deal with Short_Descriptors.
3586         (Analyze_Pragma): Implement Short_Descriptors pragma
3587         * snames.ads-tmpl: Add entry for Short_Descriptors pragma
3588
3589 2010-09-10  Emmanuel Briot  <briot@adacore.com>
3590
3591         * prj-util.adb, prj-util.ads (Executable_Of): Take into account the
3592         project's Executable_Suffix.
3593
3594 2010-09-10  Robert Dewar  <dewar@adacore.com>
3595
3596         * g-pehage.ads: Minor reformatting
3597
3598         * gnat_ugn.texi: Clarifying comment on -gnatyc
3599         * exp_ch6.adb (Expand_N_Subprogram_Body): Reset Is_Pure if limited
3600         arguments.
3601
3602 2010-09-10  Tristan Gingold  <gingold@adacore.com>
3603
3604         * Make-generated.in (gnat.hlp): New rule.
3605
3606 2010-09-10  Emmanuel Briot  <briot@adacore.com>
3607
3608         * prj-util.adb, prj-util.ads (Executable_Of): New parameter
3609         Include_Suffix.
3610
3611 2010-09-10  Robert Dewar  <dewar@adacore.com>
3612
3613         * einfo.adb: Minor code cleanup: Add assertion to
3614         Set_Corresponding_Protected_Entry.
3615
3616 2010-09-10  Bob Duff  <duff@adacore.com>
3617
3618         * g-pehage.ads, g-pehage.adb (Produce): Add a new flag to allow sending
3619         the output to standard output.
3620
3621 2010-09-09  Vincent Celier  <celier@adacore.com>
3622
3623         * gnat_ugn.texi: Add documentation for new gnatmake switch
3624         --create-map-file.
3625         * make.adb (Map_File): New global variable to store the value of switch
3626         --create-map-file.
3627         (Gnatmake): Add switch -M to gnatlink if switch --create-map-file has
3628         been specified.
3629         (Scan_Make_Arg): Recognize switch --create-map-file
3630         * makeutl.ads (Create_Map_File_Switch): New constant string for new
3631         gnatmake and gprbuild switch --create-map-file.
3632
3633 2010-09-09  Robert Dewar  <dewar@adacore.com>
3634
3635         * sinput-p.ads: Minor comment update.
3636
3637 2010-09-09  Arnaud Charlet  <charlet@adacore.com>
3638
3639         * s-tpobop.adb, s-taenca.adb (Wait_For_Completion_With_Timeout): Reset
3640         Entry_Call.State if needed so that the call is marked as cancelled by
3641         Check_Pending_Actions_For_Entry_Call.
3642         (Timed_Protected_Entry_Call): Adjust calls to Defer/Under_Abort, since
3643         this procedure may be called from a controlled operation
3644         (Initialize/Finalize).
3645
3646 2010-09-09  Vadim Godunko  <godunko@adacore.com>
3647
3648         * impunit.adb: Correct spelling of package's name in the comment.
3649
3650 2010-09-09  Robert Dewar  <dewar@adacore.com>
3651
3652         * gnatcmd.adb, gnatlink.adb, sem_ch12.adb, sem_eval.adb, sinput-p.adb:
3653         Minor reformatting
3654
3655 2010-09-09  Robert Dewar  <dewar@adacore.com>
3656
3657         * impunit.adb: Add entry for a-izteio.
3658         * checks.adb: Add comment.
3659         * debug.adb, exp_disp.adb: Minor reformatting.
3660         * exp_dbug.ads: Minor reformatting throughout (pack block comments).
3661
3662 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3663
3664         * sem_eval.adb (Is_Same_Value): Two occurrences of the same
3665         discriminant cannot be assumed to be the same value because they may
3666         refer to bounds of a component of two different instances of a
3667         discriminated type.
3668
3669 2010-09-09  Gary Dismukes  <dismukes@adacore.com>
3670
3671         * checks.adb (Apply_Arithmetic_Overflow_Check): When converting the
3672         operands of an operator to the type of an enclosing conversion, rewrite
3673         the operator so the conversion can't be flagged as redundant.
3674         Remove useless assignments to Typ and Rtyp.
3675
3676 2010-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3677
3678         * gnat_ugn.texi: Fix another long line.
3679
3680 2010-09-09  Bob Duff  <duff@adacore.com>
3681
3682         * sem_warn.adb (Output_Reference_Error): Don't warn for renames read
3683         but never assigned.
3684
3685 2010-09-09  Matthew Heaney  <heaney@adacore.com>
3686
3687         * a-convec.adb, a-coinve.adb (Clear, Delete, Delete_Last, Finalize,
3688         Merge, Insert, Insert_Space, Move, Reserve_Capacity, Generic_Sorting,
3689         Replace_Element, Reverse_Elements, Swap): Change exception message to
3690         correctly indicate kind of tampering (cursor or element).
3691         * a-cdlili.adb, a-cidlli.adb (Clear, Delete, Delete_First, Delete_Last,
3692         Merge, Generic_Sorting, Insert, Move, Reverse_Elements, Splice,
3693         Swap_Links, Replace_Element, Swap): Ditto.
3694         * a-coorse.adb, a-ciorse.adb (Include, Replace, Replace_Element): Ditto
3695         * a-coorma.adb, a-ciorma.adb (Include, Replace, Replace_Element): Ditto
3696         * a-coormu.adb, a-ciormu.adb (Replace_Element): Ditto
3697         * a-chtgke.adb (Delete_Key_Sans_Free, Generic_Conditional_Insert,
3698         Generic_Replace_Element): Ditto
3699         * a-chtgop.adb (Clear, Move, Reserve_Capacity): Ditto
3700         * a-cohama.adb, a-cihama.adb (Delete, Include, Replace,
3701         Replace_Element): Ditto.
3702         * a-cohase.adb, a-cihase.adb (Delete, Difference, Intersection,
3703         Symmetric_Difference, Union, Include, Replace): Ditto
3704
3705 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3706
3707         * sprint.adb (Write_Id): If the parent node is an expanded name, check
3708         that its entity_or_associated_node is an entity before writing it out.
3709         * exp_disp.adb (Make_Tags); if a type is declared in C++ and has no
3710         constructors, there is no need for a dispatch table pointer because the
3711         table is fully inherited from the C++ code.
3712
3713 2010-09-09  Thomas Quinot  <quinot@adacore.com>
3714
3715         * projects.texi: Fix wrong identifiers on package end lines in project
3716         files examples.
3717         * exp_ch6.adb: Minor reformatting.
3718
3719 2010-09-09  Tristan Gingold  <gingold@adacore.com>
3720
3721         * gnatcmd.adb, vms_conv.ads: Extract Command_Type.
3722
3723 2010-09-09  Eric Botcazou  <ebotcazou@adacore.com>
3724
3725         * gnat_ugn.texi: Fix description of -O3 optimization level.
3726
3727 2010-09-09  Yannick Moy  <moy@adacore.com>
3728
3729         * a-cihama.adb, a-cohama.adb: Fix comments.
3730
3731 2010-09-09  Arnaud Charlet  <charlet@adacore.com>
3732
3733         * i-cexten.ads: Add comments.
3734         (Signed_128): New type, used by some C bindings.
3735         * debug.adb: Update comment.
3736
3737 2010-09-09  Sergey Rybin  <rybin@adacore.com>
3738
3739         * gnat_ugn.texi: For ASIS tools (gnatpp, gnatcheck, gnatelim,
3740         gnatmetric and gnatstub) add a note that '-gnat05' should be used if
3741         the tool should process Ada 2005 sources.
3742
3743 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3744
3745         * sem_ch12.adb (Remove_Parent): If the scope containing the child
3746         instance is a block, examine the enclosing scope to determine if it is
3747         a parent instance.
3748
3749 2010-09-09  Doug Rupp  <rupp@adacore.com>
3750
3751         * sem_prag.adb (pragma Ident): Pass --identification= vice 
3752         IDENTIFICATION=
3753         * gnatlink.adb (Linker_Options): Look for --identification= vice 
3754         IDENTIFICATION=
3755
3756 2010-09-09  Gary Dismukes  <dismukes@adacore.com>
3757
3758         * exp_attr.adb (Expand_N_Attribute_Reference, case Attribute_Old): When
3759         inserting and analyzing the object declaration for the temporary object
3760         created to hold a 'Old value, push the scope for the subprogram where
3761         the object is inserted, so that its Scope (and that of related objects)
3762         will be set properly.
3763
3764 2010-09-09  Vincent Celier  <celier@adacore.com>
3765
3766         * prj.adb (Get_Object_Directory): Return object directory display name
3767         * adaint.c (__gnat_get_file_names_case_sensitive): When environment
3768         variable GNAT_FILE_NAME_CASE_SENSITIVE has a value of "0" or "1",
3769         return this value, otherwise return the default for the platform.
3770
3771 2010-09-09  Arnaud Charlet  <charlet@adacore.com>
3772
3773         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
3774         dependencies. Remove handling of gnatlbr.
3775         Do not remove s-stratt-xdr for the run-time when installing.
3776
3777 2010-09-09  Robert Dewar  <dewar@adacore.com>
3778
3779         * sem_attr.adb: Minor reformatting.
3780
3781 2010-09-09  Thomas Quinot  <quinot@adacore.com>
3782
3783         * socket.c (__gnat_socket_ioctl): On Darwin, the req parameter is an
3784         unsigned long, not an int.
3785
3786 2010-09-09  Vincent Celier  <celier@adacore.com>
3787
3788         * make.adb, mlib-prj.adb, prj.adb, prj-nmsc.adb, mlib-tgt.adb,
3789         prj-conf.adb, prj-env.adb: Use Display_Name instead of Name whenever
3790         we are not checking for equality of path or file names.
3791
3792 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3793
3794         * exp_util.adb (Remove_Side_Effects): If the expression is a packed
3795         array reference, reset the Analyzed flag so that it is properly
3796         expanded when the resulting object declaration is analyzed.
3797
3798 2010-09-09  Vincent Celier  <celier@adacore.com>
3799
3800         * sinput-p.adb (Source_File_Is_Subunit): Return False if X is
3801         No_Source_File.
3802
3803 2010-09-09  Ramon Fernandez  <fernandez@adacore.com>
3804
3805         * sysdep.c: The wrSbc8548 BSP in MILS doesn't know anything about the
3806         VX_SPE_TASK option, so disable it.
3807
3808 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3809
3810         * sem.adb (Walk_Library_Items): Traverse context of subunits of the
3811         main unit.
3812         (Is_Subunit_Of_Main): Handle null nodes properly.
3813
3814 2010-09-09  Robert Dewar  <dewar@adacore.com>
3815
3816         * par-ch2.adb: Update comments.
3817
3818 2010-09-09  Ben Brosgol  <brosgol@adacore.com>
3819
3820         * gnat_rm.texi: Minor wordsmithing of section on pragma Ordered.
3821
3822 2010-09-09  Arnaud Charlet  <charlet@adacore.com>
3823
3824         * par-ch2.adb (Scan_Pragma_Argument_Association): In CodePeer mode,
3825         do not generate an error for compatibility with legacy code.
3826         ignored when generating SCIL.
3827         * sem_attr.adb (Resolve_Attribute): Ignore AI-229 in CodePeer mode.
3828
3829 2010-09-09  Thomas Quinot  <quinot@adacore.com>
3830
3831         * s-strxdr.adb, gnat_rm.texi, s-stratt-xdr.adb, s-stratt.ads: Rename
3832         s-strxdr.adb to s-stratt-xdr.adb
3833
3834 2010-09-09  Robert Dewar  <dewar@adacore.com>
3835
3836         * ali-util.adb (Obsolescent_Check): Removed.
3837         * gprep.adb (Obsolescent_Check): Removed.
3838         Remove Obsolescent_Check parameter in Scng instantiation
3839         * prj-err.adb (Obsolescent_Check): Removed.
3840         * prj-err.ads (Obsolescent_Check): Removed.
3841         Remove Obsolescent_Check parameter in Scng instantiation
3842         * scans.ads (Based_Literal_Uses_Colon): New flag
3843         * scn.adb (Obsolscent_Check_Flag): Removed
3844         (Obsolscent_Check): Removed
3845         (Set_Obsolescent_Check): Removed
3846         (Post_Scan): Add handling for obsolescent features
3847         * scn.ads (Obsolscent_Check): Removed
3848         (Set_Obsolescent_Check): Removed
3849         (Post_Scan): Can no longer be inlined
3850         Remove Obsolescent_Check from instantiation of Scng
3851         * scng.adb (Nlit): Set Based_Literal_Uses_Colon
3852         (Nlit): Remove handling of obsolescent check
3853         (Scan, case '%'): Remove handling of obsolescent check
3854         (Scan, case '|'): Call Post_Scan
3855         (Scan, case '!'): Remove handling of obsolescent check, call Post_Scan
3856         * scng.ads Remove Obsolescent_Check argument from Scng generic
3857         (Post_Scan): Now called for Tok_Vertical_Bar
3858         * sinput-l.adb: Remove calls to Set_Obsolescent_Check
3859
3860 2010-09-09  Doug Rupp  <rupp@adacore.com>
3861
3862         * gnatlbr.adb: Removed.
3863         * gnat_rm.texi, ug_words, gnat_ugn.texi: Remove mention of gnatlbr.
3864
3865 2010-09-09  Robert Dewar  <dewar@adacore.com>
3866
3867         * sem_res.adb (Resolve_Type_Conversion): Catch more cases of redundant
3868         conversions.
3869
3870 2010-09-09  Vincent Celier  <celier@adacore.com>
3871
3872         * gnatlbr.adb: Remove redundant conversions.
3873
3874 2010-09-09  Vincent Celier  <celier@adacore.com>
3875
3876         * prj-proc.adb: Minor comment spelling error fix.
3877         * osint.ads (Env_Vars_Case_Sensitive): Use function
3878         Get_Env_Vars_Case_Sensitive, not Get_File_Names_Case_Sensitive to
3879         compute value.
3880
3881 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3882
3883         * sem_res.adb (Resolve_Equality_Op): Implement Ada2012 rule for
3884         resolution of conditional expressions whose dependent expressions are
3885         anonymous access types.
3886
3887 2010-09-09  Robert Dewar  <dewar@adacore.com>
3888
3889         * a-ststio.adb: Minor code reorganization.
3890         * s-direio.adb, prj.adb, prj-nmsc.adb, sem_type.adb: Remove redundant
3891         conversion.
3892         * types.ads: Minor reformatting.
3893         * binde.adb, vms_conv.adb, gnatls.adb, s-strxdr.adb, uintp.adb: Remove
3894         redundant conversions.
3895         * output.adb: Minor reformatting.
3896         * sem_ch8.adb (Find_Type): Test for redundant base applies to user
3897         types.
3898         * opt.ads: Add pragma Ordered for Verbosity_Level.
3899         * prj.ads: Add pragma Ordered for type Verbosity.
3900
3901 2010-09-09  Vincent Celier  <celier@adacore.com>
3902
3903         * osint.adb (Canonical_Case_File_Name): Use procedure To_Lower in
3904         System.Case_Util
3905         (Canonical_Case_Env_Var_Name): Ditto
3906
3907 2010-09-09  Bob Duff  <duff@adacore.com>
3908
3909         * g-pehage.adb (Allocate): Initialize the allocated elements of IT.
3910
3911 2010-09-09  Robert Dewar  <dewar@adacore.com>
3912
3913         * cstand.adb: Mark Boolean and Character types as Ordered
3914         * einfo.adb (Has_Pragma_Ordered): New flag
3915         * einfo.ads (Has_Pragma_Ordered): New flag
3916         * g-calend.ads: Mark Day_Name as Ordered
3917         * opt.ads: Mark Ada_Version_Type as Ordered
3918         (Warn_On_Unordered_Enumeration_Type): New flag
3919         * par-prag.adb: Add procdessing for pragma Ordered
3920         * s-ficobl.ads (Read_File_Mode): New subtype
3921         * s-fileio.adb: Use Read_File_Mode instead of explicit ranges
3922         * s-taskin.ads: Mark Entry_Call_State as ordered
3923         * sem_ch3.adb (Build_Derived_Enumeration_Type): Inherit
3924         Has_Pragma_Ordered.
3925         * sem_ch6.ads: Mark Conformance_Type as Ordered
3926         * sem_prag.adb: Implement pragma Ordered
3927         * sem_res.adb (Bad_Unordered_Enumeration_Reference): New function
3928         (Resolve_Comparison_Op): Diagnose unordered comparison
3929         (Resolve_Range): Diagnose unordered range
3930         * sem_warn.adb (Warn_On_Unordered_Enumeration_Type): New flag (from
3931         -gnatw.u/U)
3932         * snames.ads-tmpl: Add entry for pragma Ordered
3933         * style.ads (Check_Enumeration_Subrange): Removed
3934         * styleg.adb (Check_Enumeration_Subrange): Removed
3935         * styleg.ads (Check_Enumeration_Subrange): Removed
3936         * stylesw.adb: Remove handling of -gnatyE switch
3937         * stylesw.ads: (Style_Check_Enumeration_Subranges): Removed
3938         * vms_data.ads: Remove -gnatyE entries
3939         Add -gnatw.u entries
3940         * ug_words: Entries for -gnatw.u and -gnatw.U
3941         * gnat_ugn.texi: Document -gnatw.u/-gnatw.U switches
3942         * gnat_rm.texi: Document pragma Ordered.
3943         * s-tasren.adb: Avoid unnecessary comparison on unordered enumeration.
3944         * s-tpobop.adb: Remove comparison on unordered enumeration type.
3945
3946 2010-09-09  Vincent Celier  <celier@adacore.com>
3947
3948         * adaint.c: New function __gnat_get_env_vars_case_sensitive, returns 0
3949         for VMS and Windows, and 1 for all other platforms.
3950         * adaint.h: New function __gnat_get_env_vars_case_sensitive
3951         * osint.ads, osint.adb (Canonical_Case_Env_Var_Name): New procedure.
3952         * prj-ext.adb (Add): Call Canonical_Case_Env_Var_Name instead of
3953         Canonical_Case_File_Name, as we are dealing with environment variables,
3954         not files.
3955
3956 2010-09-09  Robert Dewar  <dewar@adacore.com>
3957
3958         * sem_util.adb: Minor reformatting
3959
3960 2010-09-09  Vincent Celier  <celier@adacore.com>
3961
3962         * vms_data.ads: Add documentation for S_Make_Single.
3963
3964 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3965
3966         * sem_util.adb (Same_Object): include formal parameters.
3967
3968 2010-09-09  Vincent Celier  <celier@adacore.com>
3969
3970         * make.adb (Queue): New package implementing a new impementation of the
3971         queue, taking into account the new switch --single-compile-per-obj-dir.
3972         * makeutl.ads (Single_Compile_Per_Obj_Dir_Switch): New constant String
3973         for gnatmake and gprbuild new switch --single-compile-per-obj-dir.
3974         * opt.ads (One_Compilation_Per_Obj_Dir): New Boolean flag, defauted to
3975         False.
3976         * switch-m.adb (Scan_Make_Switches): Take into account new gnatmake
3977         switch --single-compile-per-obj-dir.
3978         * vms_data.ads: Add qualifier SINGLE_COMPILE_PER_OBJ_DIR for gnatmake
3979         switch --single-compile-per-obj-dir.
3980         * gnat_ugn.texi: Add documentation for new gnatmake switch
3981         --single-compile-per-obj-dir.
3982
3983 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3984
3985         * einfo.adb, einfo.ads: Clarify use of Corresponding_Protected_Entry.
3986
3987 2010-09-09  Javier Miranda  <miranda@adacore.com>
3988
3989         * sem_ch3.adb (Is_Progenitor): Relocated to sem_type.
3990         (Replace_Type): Code cleanup.
3991         * sem_type.ads, sem_type.adb (Is_Progenitor): Relocated from sem_ch3
3992
3993 2010-09-09  Thomas Quinot  <quinot@adacore.com>
3994
3995         * exp_ch8.adb: Minor reformatting.
3996
3997 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
3998
3999         * exp_ch9.adb, einfo.adb, einfo.ads: New attribute
4000         Corresponding_Protected_Entry.
4001
4002 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
4003
4004         * exp_ch3.adb (Build_Untagged_Equality): Do not set alias of implicit
4005         inequality, it is always rewritten as the negation of the corresponding
4006         equality operation.
4007         * exp_ch8.adb (Expand_N_Subprogram_Renaming): If the subprogram renames
4008         the predefined equality of an untagged record, create a body at the
4009         point of the renaming, to capture the current meaning of equality for
4010         the type.
4011
4012 2010-09-09  Robert Dewar  <dewar@adacore.com>
4013
4014         * sem.adb, sem_warn.adb: Minor reformatting.
4015
4016 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
4017
4018         * sem_ch6.adb: Improve error message on untagged equality.
4019         * sem.adb (Semantics): Include subprogram bodies that act as spec.
4020
4021 2010-09-09  Javier Miranda  <miranda@adacore.com>
4022
4023         * sem_ch13.adb, exp_ch13.adb: Undo previous change, unneeded.
4024
4025 2010-09-09  Robert Dewar  <dewar@adacore.com>
4026
4027         * sem_ch13.adb, sem_ch6.adb, exp_ch3.adb: Minor reformatting.
4028
4029 2010-09-09  Robert Dewar  <dewar@adacore.com>
4030
4031         * einfo.adb (Is_Aggregate_Type): New function.
4032         * einfo.ads (Aggregate_Kind): New enumeration subtype
4033         (Is_Aggregate_Type): New function.
4034         * sem_type.adb (Is_Array_Class_Record_Type): Removed, replaced by
4035         Is_Aggregate_Typea.
4036
4037 2010-09-09  Robert Dewar  <dewar@adacore.com>
4038
4039         * exp_ch11.adb, frontend.adb, sem_attr.adb, sem_ch10.adb, sem_ch3.adb,
4040         sem_ch4.adb, sem_ch9.adb, sem_res.adb: Use Restriction_Check_Needed
4041         where appropriate.
4042         * restrict.ads, restrict.adb: Ditto.
4043         (Restriction_Check_Needed): New function
4044
4045 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
4046
4047         * exp_ch9.ads (Find_Master_Scope): New function, extracted from
4048         Build_Master_Entity, to find the proper scope for the master entity of
4049         a type that may contain tasks, in the presence of transient scopes.
4050         * exp_ch9.adb (Build_Master_Entity) Use new function.
4051         * exp_ch3.adb (Build_Class_Wide_Master): ditto.
4052
4053 2010-09-09  Vincent Celier  <celier@adacore.com>
4054
4055         * prj-attr.adb: Add new attributes Leading_Library_Options and
4056         Linker'Leading_Switches.
4057         * snames.ads-tmpl: Add new standard names Leading_Library_Options and
4058         Leading_Switches.
4059
4060 2010-09-09  Javier Miranda  <miranda@adacore.com>
4061
4062         * sem_ch3.adb (Derive_Subprogram): The code that checks if a
4063         dispatching primitive covers some interface primitive is incomplete.
4064         Replace such code by the invocation of a new subprogram that provides
4065         this functionality.
4066         * sem_ch6.ads (Is_Interface_Conformant): Add missing documentation.
4067         * sem_ch6.adb (Check_Missing_Return): Minor reformating
4068         (Check_Convention): Complete if-statement conditition when reporting
4069         errors (to avoid assertion failure).
4070         * sem_ch13.adb (Make_Null_Procedure_Specs): This routine was previously
4071         located in exp_ch3. Relocated inside Analyze_Freeze_Entity.
4072         (Analyze_Freeze_Entity): Invoke routine that adds the spec of non
4073         overridden null interface primitives.
4074         * sem_type.adb (Is_Ancestor): If the parent of the partial view of a
4075         private type is an interface then use the parent of its full view to
4076         climb to its ancestor type.
4077         * sem_disp.ads, sem_disp.adb (Covers_Some_Interface): New subprogram.
4078         (Check_Dispatching_Operation): Extend assertion to handle wrappers of
4079         null interface primitives.
4080         (Is_Null_Interface_Primitive): New subprogram.
4081         * exp_ch3.adb (Make_Null_Procedure_Specs): Removed.
4082         (Expand_Freeze_Record_Type): Do not generate specs of null interface
4083         subprograms because they are now generated by Analyze_Freeze_Entity.
4084
4085 2010-09-09  Robert Dewar  <dewar@adacore.com>
4086
4087         * a-calfor.adb, sem_ch3.adb: Minor reformatting.
4088
4089 2010-09-09  Robert Dewar  <dewar@adacore.com>
4090
4091         * bindgen.adb (Gen_Restrictions_Ada): Avoid explicit enumeration ranges
4092         (Gen_Restrictions_C): Avoid explicit enumeration ranges
4093         (Set_String_Replace): New procedure
4094         * casing.ads (Known_Casing): New subtype declaration
4095         * prj-attr.ads (All_Case_Insensitive_Associative_Array): New subtype
4096         declaration
4097         * prj-dect.adb (Parse_Attribute_Declaration): Avoid enumeration range
4098         * prj-nmsc.adb (Check_Naming): Avoid unnecessary enumeration range
4099         * prj-strt.adb (Attribute_Reference): Avoid enumeration range test
4100         * prj.adb (Known_Casing): Moved to Casing spec (avoid enum range)
4101         * sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order): Avoid enumeration
4102         ranges.
4103         * sem_res.adb (Resolve_Range): Check for enumeration subrange style
4104         rule.
4105         * sem_type.adb (Is_Array_Class_Record_Type): New.
4106         * style.ads (Check_Enumeration_Subrange): New procedure
4107         * styleg.adb (Check_Enumeration_Subrange): New procedure
4108         * styleg.ads (Check_Enumeration_Subrange): New procedure
4109         * stylesw.adb Add handling for Style_Check_Enumeration_Subranges
4110         * stylesw.ads (Style_Check_Enumeration_Subranges): New flag
4111         * usage.adb: Add line for -gnatyE
4112         * vms_data.ads: Add entries for [NO]ENUMERATION_RANGES
4113         Add missing entry for NOBOOLEAN_OPERATORS
4114         * gnat_ugn.texi: Add documentation for -gnatyE
4115
4116 2010-09-09  Robert Dewar  <dewar@adacore.com>
4117
4118         * namet.adb (Initialize): Is now a dummy procedure
4119         (Reinitialize): New procedure
4120         Call Reinitialize from package initialization
4121         * namet.ads (Initialize): Is now a dummy procedure
4122         (Reinitialize): New procedure
4123         * clean.adb, gnat1drv.adb, gnatbind.adb, gnatcmd.adb, gnatlink.adb,
4124         gnatls.adb, gprep.adb, make.adb, prj-makr.adb: Remove obsolete call to
4125         Namet.Initialize.
4126
4127 2010-09-09  Bob Duff  <duff@adacore.com>
4128
4129         * sem_elab.adb, s-os_lib.ads: Minor comment fixes.
4130
4131 2010-09-09  Robert Dewar  <dewar@adacore.com>
4132
4133         * s-bitops.adb (Raise_Error): Add exception message
4134
4135 2010-09-09  Robert Dewar  <dewar@adacore.com>
4136
4137         * par-ch5.adb (Test_Statement_Required): Deal with Ada 2012 allowing no
4138         null statement after label.
4139         * sinfo.ads: Minor comment updates.
4140
4141 2010-09-09  Robert Dewar  <dewar@adacore.com>
4142
4143         * nlists.ads, nlists.adb (In_Same_List): New function.
4144         Use Node_Or_Entity_Id where appropriate.
4145         * par-labl.adb, sem_ch6.adb, sem_type.adb: Use In_Same_List.
4146
4147 2010-09-09  Robert Dewar  <dewar@adacore.com>
4148
4149         * restrict.ads, restrict.adb (Check_Wide_Character_Restriction): New
4150         procedure.
4151         * sem_ch3.adb: Use Check_Wide_Character_Restriction
4152         (Enumeration_Type_Declaration): Check violation of No_Wide_Characters
4153         * sem_ch8.adb (Find_Direct_Name): Check violation of No_Wide_Characters
4154         (Find_Expanded_Name): Check violation of No_Wide_Characters
4155
4156 2010-09-09  Robert Dewar  <dewar@adacore.com>
4157
4158         * par-ch5.adb: Minor reformatting.
4159
4160 2010-09-09  Robert Dewar  <dewar@adacore.com>
4161
4162         * prj-env.adb: Minor code reorganization.
4163         * par-ch3.adb: Minor reformatting.
4164         * gcc-interface/Make-lang.in: Update dependencies.
4165
4166 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
4167
4168         * exp_ch9.adb (Build_Activation_Chain_Entity): The construct enclosing
4169         a task declaration can be an entry body.
4170
4171 2010-09-09  Javier Miranda  <miranda@adacore.com>
4172
4173         * exp_disp.adb (Make_DT): Decorate as "static" variables containing
4174         tags of library level tagged types.
4175         (Make_Tags): Disable backend optimizations about aliasing for
4176         declarations of access to dispatch tables.
4177
4178 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
4179
4180         * sem_ch12.adb (Reset_Entity): If the entity is an itype created as a
4181         subtype for a null-excluding access type, recover the original
4182         subtype_mark to get the proper visibility on the original name.
4183
4184 2010-09-09  Ed Schonberg  <schonberg@adacore.com>
4185
4186         * exp_ch3.adb (Build_Untagged_Equality): For Ada2012, new procedure to
4187         create the primitive equality operation for an untagged record. The
4188         operation is the predefined equality if no record component has a
4189         user-defined equality, or if there is a user-defined equality for the
4190         type as a whole, or when the type is derived and it has an inherited
4191         equality. Otherwise the body of the operations is built as for tagged
4192         types.
4193         (Expand_Freeze_Record_Type): Call Build_Untagged_Equality when needed.
4194         (Make_Eq_Body): New function to create the expanded body of the
4195         equality operation for tagged and untagged records.  In both cases the
4196         operation composes, and the primitive operation of each record
4197         component is used to generate the equality function for the type.
4198         * exp_ch4.adb (Expand_Composite_Equality): In Ada2012, if a component
4199         has an abstract equality defined, replace its call with a
4200         Raise_Program_Error.
4201         * sem_ch6.adb (New_Overloaded_Entity): if Ada2012, verify that a
4202         user-defined equality operator for an untagged record type does not
4203         happen after type is frozen, and appears in the visible part if partial
4204         view of type is not limited.
4205
4206 2010-09-09  Tristan Gingold  <gingold@adacore.com>
4207
4208         * gnatlbr.adb: Make Create_Directory more portable: use __gnat_mkdir.
4209
4210 2010-09-09  Bob Duff  <duff@adacore.com>
4211
4212         * gnat_ugn.texi: Remove incorrect statement about -E being the default.
4213
4214 2010-09-09  Pascal Obry  <obry@adacore.com>
4215
4216         * gnat_ugn.texi: Update doc on windows related topics.
4217
4218 2010-09-09  Geert Bosch  <bosch@adacore.com>
4219
4220         * s-fatgen.adb: Update comments.
4221
4222 2010-09-09  Robert Dewar  <dewar@adacore.com>
4223
4224         * par-ch4.adb (Box_Error): New procedure.
4225
4226 2010-09-09  Thomas Quinot  <quinot@adacore.com>
4227
4228         * sem.adb: Minor reformatting.
4229
4230 2010-09-09  Pascal Obry  <obry@adacore.com>
4231
4232         * prj-env.adb: Style fix, use /and then/ and /or else/.
4233         * gnat_ugn.texi: Fix typos.
4234
4235 2010-09-03  Joseph Myers  <joseph@codesourcery.com>
4236
4237         PR ada/45499
4238         * gcc-interface/misc.c (gnat_init_options): Allow options with
4239         empty canonical form.  Generate a single save_argv element from -I
4240         options.
4241
4242 2010-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4243
4244         * gcc-interface/utils.c (gnat_pushdecl): Remove test for PARM_DECLs.
4245         Attach fake PARM_DECLs to the topmost block of the function.
4246
4247 2010-08-30  Eric Botcazou  <ebotcazou@adacore.com>
4248
4249         * gcc-interface/trans.c (call_to_gnu): Also force the return slot opt
4250         for the call to a function whose return type was unconstrained.
4251
4252 2010-08-30  Olivier Hainque  <hainque@adacore.com>
4253
4254         * gcc-interface/decl.c (FOREIGN_FORCE_REALIGN_STACK): New macro,
4255         replacement for FORCE_PREFERRED_STACK_BOUNDARY_IN_MAIN.
4256         (gnat_to_gnu_entity) <case ..., E_Procedure>: Use it.
4257
4258 2010-08-21  Eric Botcazou  <ebotcazou@adacore.com>
4259
4260         * tracebak.c: Fix typo in comment.
4261
4262 2010-08-20  Nathan Froyd  <froydnj@codesourcery.com>
4263
4264         * gcc-interface/decl.c: Use FOR_EACH_VEC_ELT.
4265         * gcc-interface/trans.c: Likewise.
4266         * gcc-interface/utils.c: Likewise.
4267
4268 2010-08-18  Eric Botcazou  <ebotcazou@adacore.com>
4269
4270         * tracebak.c (i386): Use GCC unwinder on Linux with GCC > 4.5.
4271
4272 2010-08-10  Robert Dewar  <dewar@adacore.com>
4273
4274         * sem_ch8.adb, sem_ch8.ads: Change name Write_Scopes to ws.
4275         * sem_util.adb: Minor reformatting.
4276
4277 2010-08-10  Javier Miranda  <miranda@adacore.com>
4278
4279         * sem_aggr.adb (Resolve_Extension_Aggregate): Warn on the use of C++
4280         constructors that leave the object partially initialized.
4281         * exp_atag.ads, exp_atags.adb (Build_Inherit_CPP_Prims): New subprogram
4282         that copies from parent of Typ the dispatch table slots of inherited
4283         C++ primitives. It handles primary and secondary dispatch tables.
4284         * einfo.adb (Related_Type): Moved from Node26 to Node27. Required to
4285         use this attribute with E_Variable entities.
4286         (Set_Is_Tag): Relax assertion to allow its use with variables that
4287         store tags.
4288         (Set_Related_Type): Relax assertion to allow its use with variables
4289         that store the tag of a C++ class.
4290         (Write_26_Field_Name): Remove Related_Type.
4291         (Write_27_Field_Name): Add Related_Type.
4292         * einfo.ads (Related_Type): Moved from Node26 to Node27. Available also
4293         with E_Variable entities.
4294         * sem_prag.adb (CPP_Constructor): Warn on duplicated occurrence of this
4295         pragma.
4296         * sem_util.adb (Search_Tag): Add missing support for CPP types.
4297         (Enclosing_CPP_Parent): New subprogram.
4298         (Has_Suffix): New subprogram.
4299         * sem_util.ads (Enclosing_CPP_Parent): New subprogram that returns the
4300         closest ancestor of a type that is a C++ type.
4301         (Has_Suffix): New subprogram. Used in assertions to check the suffix of
4302         internal entities.
4303         * sem_attr.adb (Analyze_Access_Attribute): Check wrong use of current
4304         instance in derivations of C++ types.
4305         * exp_tss.adb (CPP_Init_Proc): New subprogram.
4306         (Is_CPP_Init_Proc): New subprogram.
4307         (Set_TSS): Handle new C++ init routines.
4308         * exp_tss.ads (TSS_CPP_Init): New TSS name. For initialization of C++
4309         dispatch tables.
4310         (CPP_Init_Proc): New subprogram.
4311         (Is_CPP_Init_Proc): New subprogram.
4312         * exp_disp.adb (CPP_Num_Prims): New subprogram.
4313         (Has_CPP_Constructors): New subprogram.
4314         (Make_Secondary_DT, Make_DT): For derivations of CPP types, do not
4315         initialize slots located in the C++ part of the dispatch table.
4316         (Make_Tags): For CPP types declare variables used by the IP routine to
4317         store the C++ tag values after the first invocation of the C++
4318         constructor.
4319         (Build_CPP_Init_DT): New subprogram.
4320         (Set_CPP_Constructors): New implementation that builds an IP for each
4321         CPP constructor. These IP are wrappers of the C++ constructors that,
4322         after the first invocation of the constructor, read the C++ tags from
4323         the object and save them locally. These copies of the C++ tags are used
4324         by the IC routines to initialize tables of Ada derivations of CPP
4325         types.
4326         (Write_DT): Indicate what primitives are imported from C++
4327         * exp_disp.ads (CPP_Num_Prims): New subprogram.
4328         (Has_CPP_Constructors): New subprogram.
4329         * exp_aggr.adb (Build_Record_Aggr_Code): For derivations of C++ types
4330         invoke the IC routine to inherit the slots of the parents.
4331         * sem_ch13.adb (Analyze_Freeze_Entity): Add new warnings on CPP types.
4332         * exp_ch3.adb (Is_Variable_Size_Array): New subprogram.
4333         (Is_Variable_Size_Record): Factorize code calling
4334         Is_Variable_Size_Array.
4335         (Build_CPP_Init_Procedure): New subprogram that builds the tree
4336         corresponding to the procedure that initializes the C++ part of the
4337         dispatch table of an Ada tagged type that is a derivation of a CPP
4338         type.
4339         (Build_Init_Procedure): Adding documentation plus code reorganization
4340         to leave more clear the construction of the IP with C++ types.
4341         (Expand_Freeze_Record_Type): Delay call to Set_CPP_Constructors because
4342         it cannot be called after Make_Tags has been invoked.
4343         (Inherit_CPP_Tag): Removed.
4344         (Init_Secondary_Tags): For derivations of CPP types, warn on tags
4345         located at variable offset.
4346         * freeze.ads: Minor reformating.
4347         * sem_ch8.adb (Write_Scopes): Add pragma export. Required to have it
4348         available in gdb.
4349         * gcc-interface/Make-lang.in: Update dependencies.
4350
4351 2010-08-10  Robert Dewar  <dewar@adacore.com>
4352
4353         * a-chahan.ads: Add comments on handling of obsolescent entries.
4354         * opt.ads: Add Ada_2005 and Ada_2012 renamings for versions.
4355         * restrict.adb (Check_Obsolescent_2005_Entity): New procedure.
4356         * restrict.ads (Check_Obsolescent_2005_Entity): New procedure.
4357         * sem_attr.adb (Analyze_Access_Attribute): Call
4358         Check_Obsolescent_2005_Entity to check for access to obsolescent
4359         Ada.Characters.Handling subprogram.
4360         (Analyze_Attribute, case Class): Applying Class to untagged incomplete
4361         type is obsolescent in Ada 2005.
4362         (Analyze_Attribute, case Constrained): Better placement of flag when
4363         flagged as obsolescent feature.
4364         (Analyze_Attribute, case Storage_Size): Use with tasks is obsolescent
4365         * sem_ch10.adb (Analyze_With_Clause): With of renamings such as Text_IO
4366         is an obsolescent feature.
4367         * sem_ch11.adb (Analyze_Raise_Statement): Numeric_Error is obsolescent
4368         feature.
4369         * sem_ch8.adb (Analyze_Subprogram_Renaming): Call
4370         Check_Obsolescent_2005_Entity to check for renaming obsolete
4371         Ada.Characters.Handling subprogram.
4372         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Check
4373         for obsolescent restrictions in Ada 2005.
4374         (Analyze_Pragma, case Suppress): Entity arg is obsolescent in Ada 2005
4375         (Analyze_Pragma, case Interface): Interface is obsolescent in Ada 2005
4376         * sem_res.adb (Resolve_Call): Call Check_Obsolescent_2005_Entity to
4377         check for obsolescent references to Ada.Characters.Handling subprograms
4378
4379 2010-08-10  Robert Dewar  <dewar@adacore.com>
4380
4381         * einfo.adb, einfo.ads: Fix bad -gnatdt output for incomplete type.
4382
4383 2010-08-10  Robert Dewar  <dewar@adacore.com>
4384
4385         * errout.ads: Add VMS table entries for 2005, 12, 2012 switches
4386         * par-ch4.adb: Change wording of Ada 2012 messages
4387         * vms_data.ads: Add VMS entries for /2005, /12, /2012
4388
4389 2010-08-10  Robert Dewar  <dewar@adacore.com>
4390
4391         * a-suenco.adb (Convert): Fix bug in UTF-16 to UTF-8 conversion for
4392         codes in the range 16#80#..16#7FF#.
4393         * sem_ch10.adb: Minor reformatting.
4394
4395 2010-08-10  Arnaud Charlet  <charlet@adacore.com>
4396
4397         * gnat1drv.adb (Scan_Front_End_Switches): Always perform semantics and
4398         generate ali files in CodePeer mode, so that a gnatmake -c -k will
4399         proceed further when possible
4400         * freeze.adb (Freeze_Static_Object): Fix thinko. Do not generate error
4401         messages when ignoring representation clauses (-gnatI).
4402
4403 2010-08-10  Ed Schonberg  <schonberg@adacore.com>
4404
4405         * exp_ch4.adb (Expand_N_Selected_Component): Do not attempt to
4406         constant-fold discriminant reference if the constraint is an object
4407         with non-static expression. Expression may contain volatile references
4408         in the presence of renamings.
4409
4410 2010-08-10  Vincent Celier  <celier@adacore.com>
4411
4412         * prj-proc.adb (Get_Attribute_Index): If Index is All_Other_Names,
4413         returns Index.
4414         * prj-strt.adb (Attribute_Reference): Recognize 'others' as a valid
4415         index for an associative array where it is allowed.
4416
4417 2010-08-10  Thomas Quinot  <quinot@adacore.com>
4418
4419         * exp_attr.adb: Add comments.
4420
4421 2010-08-10  Jerome Lambourg  <lambourg@adacore.com>
4422
4423         * adaint.c (__gnat_get_file_names_case_sensitive): return 0 on darwin.
4424
4425 2010-08-09  Nathan Froyd  <froydnj@codesourcery.com>
4426
4427         * gcc-interface/utils.c (gnat_poplevel): Use blocks_nreverse.
4428
4429 2010-08-09  Eric Botcazou  <ebotcazou@adacore.com>
4430
4431         * gcc-interface/utils.c (build_vms_descriptor32): Fix formatting.
4432         (build_vms_descriptor): Likewise.
4433
4434 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
4435
4436         * gcc-interface/utils.c (make_descriptor_field): Add tree parameter.
4437         (build_vms_descriptor32): Adjust calls to it for new parameter.
4438         (build_vms_descriptor): Likewise.
4439
4440 2010-08-08  Nathan Froyd  <froydnj@codesourcery.com>
4441
4442         * gcc-interface/decl.c (rec_variant):  Declare.  Declare a VEC of it.
4443         (build_variant_list): Take and return a VEC instead of a tree.
4444         (create_variant_part_from): Take a VEC instead of a tree for
4445         variant_list.  Adjust accordingly.
4446         (gnat_to_gnu_entity): Adjust for changes to previous functions.
4447
4448 2010-08-07  Nathan Froyd  <froydnj@codesourcery.com>
4449
4450         * gcc-interface/decl.c (gnat_to_gnu_entity): Use XALLOCAVEC instead
4451         of alloca.
4452         (components_to_record): Likewise.
4453         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
4454         * gcc-interface/utils.c (max_size): Likewise.
4455         (build_vms_descriptor32): Likewise.
4456         (build_vms_descriptor): Likewise.
4457
4458 2010-08-07  Nathan Froyd  <froydnj@codesourcery.com>
4459
4460         * gcc-interface/decl.c (subst_pair): Declare.  Declare a VEC of it.
4461         (build_subst_list): Return a VEC instead of a tree.
4462         (build_variant_list): Take a VEC for subst_list.  Adjust
4463         accordingly.
4464         (create_field_decl_from): Likewise.
4465         (create_variant_part_from): Likewise.
4466         (copy_and_substitute_in_size): Likewise.
4467         (gnat_to_gnu_entity): Adjust for new interface to build_subst_list.
4468         Free the built vector.
4469
4470 2010-08-06  Eric Botcazou  <ebotcazou@adacore.com>
4471
4472         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Do not build an
4473         allocator for large imported objects.
4474
4475 2010-08-05  Robert Dewar  <dewar@adacore.com>
4476
4477         * gnat1drv.adb: Minor reformatting.
4478
4479 2010-08-05  Ed Schonberg  <schonberg@adacore.com>
4480
4481         * sem.adb (Do_Unit_And_Dependents): If some parent unit is an
4482         instantiation, process its body before the spec of the main unit,
4483         because it may contain subprograms invoked in the spec of main.
4484         * einfo.ads: Add documention of delayed freeze.
4485
4486 2010-08-05  Vincent Celier  <celier@adacore.com>
4487
4488         * prj-nmsc.adb (Process_Linker): Take into account new values for
4489         attribute Response_File_Format.
4490         * prj.ads (Response_File_Format): New enumeration values GCC_GNU,
4491         GCC_Object_List and GCC_Option_List.
4492
4493 2010-08-05  Ed Schonberg  <schonberg@adacore.com>
4494
4495         * exp_ch4.adb (Expand_N_Selected_Component): Do not constant-fold a
4496         selected component that denotes a discriminant if it is the
4497         discriminant of a component of an unconstrained record type.
4498
4499 2010-08-05  Ed Schonberg  <schonberg@adacore.com>
4500
4501         * exp_util.adb (Insert_Actions): If the action appears within a
4502         conditional expression that is already analyzed, insert action further
4503         out.
4504
4505 2010-08-05  Robert Dewar  <dewar@adacore.com>
4506
4507         * exp_ch4.adb: Minor reformatting.
4508
4509 2010-08-05  Thomas Quinot  <quinot@adacore.com>
4510
4511         * exp_ch4.adb: Minor reformatting
4512         * gnat1drv.adb: Minor reformatting.
4513         Minor code reorganization (use Nkind_In).
4514
4515 2010-08-05  Ed Schonberg  <schonberg@adacore.com>
4516
4517         * exp_util.ads, exp_util.adb (Needs_Constant_Address): New predicate to
4518         determine whether the expression in an address clause for an
4519         initialized object must be constant. Code moved from freeze.adb.
4520         (Remove_Side_Effects): When the temporary is initialized with a
4521         reference, indicate that the temporary is a constant as done in all
4522         other cases.
4523         * freeze.adb (Check_Address_Clause): use Needs_Constant_Address.
4524         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
4525         If object does not need a constant address, remove side effects from
4526         address expression, so it is elaborated at the point of the address
4527         clause and not at the freeze point of the object, so that elaboration
4528         order is respected.
4529
4530 2010-08-05  Vincent Celier  <celier@adacore.com>
4531
4532         * prj.adb (Is_Compilable): Return False for header files of non Ada
4533         languages.
4534
4535 2010-08-05  Emmanuel Briot  <briot@adacore.com>
4536
4537         * prj-nmsc.adb: The Missing_Source_Files flag also considers a missing
4538         exec directory as a warning rather than an error.
4539
4540 2010-08-05  Thomas Quinot  <quinot@adacore.com>
4541
4542         * sem_ch6.adb, gnat1drv.adb, exp_ch6.adb, sem_eval.adb: Minor
4543         reformatting.
4544
4545 2010-08-05  Steve Baird  <baird@adacore.com>
4546
4547         * exp_util.adb (Remove_Side_Effects): An access value which designates
4548         a volatile object of a nonvolatile type is prohibited.
4549         Do not call Make_Reference to construct a reference to such an object.
4550
4551 2010-08-05  Robert Dewar  <dewar@adacore.com>
4552
4553         * a-suezse.adb, a-suezse.ads, a-suezen.adb, a-suezen.ads: Removed.
4554         * a-suewse.adb, a-suewse.ads, a-suesen.adb, a-suesen.ads,
4555         a-suewen.adb, a-suewen.ads: New files.
4556         * Makefile.rtl, impunit.adb: Update implementation of Ada 2012 string
4557         encoding packages.
4558         * sem_elab.adb: Minor reformatting.
4559
4560 2010-08-05  Arnaud Charlet  <charlet@adacore.com>
4561
4562         * sem_ch8.adb (Use_One_Type): Protect against empty scopes.
4563         * exp_util.adb (Component_May_Be_Bit_Aligned): Prevent assert failure
4564         in case of null Comp.
4565
4566 2010-08-05  Robert Dewar  <dewar@adacore.com>
4567
4568         * errout.adb, a-suewen.adb, a-suezen.adb: Minor reformatting.
4569
4570 2010-08-05  Gary Dismukes  <dismukes@adacore.com>
4571
4572         * sem_ch4.adb (Analyze_Allocator): Flag errors on allocators of a
4573         nested access type whose designated type has tasks or is a protected
4574         object when the restrictions No_Task_Hierarchy or
4575         No_Local_Protected_Objects apply. Add ??? comment.
4576         * sem_ch9.adb (Analyze_Protected_Type): Give a warning when a protected
4577         type is not a library-level type and No_Local_Protected_Objects applies.
4578         (Analyze_Task_Type): Give a warning when a task type is not a
4579         library-level type and No_Task_Hierarchy applies.
4580
4581 2010-08-05  Arnaud Charlet  <charlet@adacore.com>
4582
4583         * sem.adb: Minor reformatting
4584         * sem_ch4.adb (Analyze_Reference): Disable error message in CodePeer
4585         mode, not useful.
4586
4587 2010-08-04  Eric Botcazou  <ebotcazou@adacore.com>
4588
4589         * gcc-interface/decl.c: Do not undefine IN_GCC_FRONTEND and do not
4590         include expr.h.
4591         (gnat_to_gnu_entity) <object>: Force address of -1 at the tree level
4592         for the debug-only entity.
4593         * gcc-interface/Make-lang.in (ada/decl.o): Adjust dependencies.
4594
4595 2010-08-03  Joseph Myers  <joseph@codesourcery.com>
4596
4597         * gcc-interface/lang-specs.h: Don't pass -a options.
4598
4599 2010-07-28  Joseph Myers  <joseph@codesourcery.com>
4600
4601         * gcc-interface/misc.c (gnat_init_options): Ignore erroneous
4602         options.  Check canonical_option_num_elements on options copied.
4603
4604 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
4605
4606         * gcc-interface/misc.c (gnat_handle_option): Update prototype and
4607         return value type.  Don't check for missing arguments here.
4608
4609 2010-07-27  Joseph Myers  <joseph@codesourcery.com>
4610
4611         * gcc-interface/misc.c (gnat_option_lang_mask): New.
4612         (gnat_init_options): Update prototype.  Reconstruct argv array
4613         from decoded options.
4614
4615 2010-07-23  Eric Botcazou  <ebotcazou@adacore.com>
4616
4617         * gcc-interface/utils.c (update_pointer_to): In the unconstrained array
4618         case, merge the alias set of the old pointer type.
4619
4620 2010-07-23  Eric Botcazou  <ebotcazou@adacore.com>
4621
4622         * gcc-interface/utils.c (gnat_types_compatible_p): Revert latest change
4623         and recurse only for multidimensional array types instead.
4624
4625 2010-07-22  Eric Botcazou  <ebotcazou@adacore.com>
4626
4627         PR ada/44892
4628         * gcc-interface/utils.c (convert): Fix thinko in test.
4629         (unchecked_convert): When converting from a scalar type to a type with
4630         a different size, pad to have the same size on both sides.
4631
4632 2010-07-22  Eric Botcazou  <ebotcazou@adacore.com>
4633
4634         * gcc-interface/utils.c (gnat_types_compatible_p): Don't require strict
4635         equality for the component type of array types.
4636
4637 2010-07-15  Nathan Froyd  <froydnj@codesourcery.com>
4638
4639         * gcc-interface/decl.c: Carefully replace TREE_CHAIN with DECL_CHAIN.
4640         * gcc-interface/trans.c: Likewise.
4641         * gcc-interface/utils.c: Likewise.
4642         * gcc-interface/utils2.c: Likewise.
4643
4644 2010-07-13  Laurent GUERBY  <laurent@guerby.net>
4645
4646         PR bootstrap/44458
4647         * gcc-interface/targtyps.c: Include tm_p.h.
4648         * gcc-interface/Make-lang.in: Update dependencies.
4649
4650 2010-07-09  Eric Botcazou  <ebotcazou@adacore.com>
4651
4652         * gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Deal with
4653         CALL_EXPR.
4654
4655 2010-07-08  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4656
4657         * gcc-interface/utils.c: Include diagnostic-core.h in every file
4658         that includes toplev.h.
4659
4660 2010-07-03  Eric Botcazou  <ebotcazou@adacore.com>
4661
4662         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Enumeration_Type>:
4663         Branch to common code handling the alignment of discrete types.
4664         <E_Signed_Integer_Type>: Likewise.
4665         <E_Modular_Integer_Type>: Likewise.
4666
4667 2010-07-02  Eric Botcazou  <ebotcazou@adacore.com>
4668
4669         * gcc-interface/misc.c (gnat_handle_option): Do not populate gnat_argv.
4670         (gnat_handle_option): Allocate only one element for gnat_argv.
4671         (gnat_init): Do not populate gnat_argv.
4672
4673 2010-06-30  Manuel López-Ibáñez  <manu@gcc.gnu.org>
4674
4675         * gcc-interface/trans.c: Do not include tree-flow.h.
4676         * gcc-interface/Make-lang.in: Adjust dependencies.
4677
4678 2010-06-29  Nathan Froyd  <froydnj@codesourcery.com>
4679
4680         * gcc-interface/gigi.h (gnat_build_constructor): Take a VEC instead
4681         of a TREE_LIST.  Update comment.
4682         * gcc-interface/trans.c (gigi): Build a VEC instead of a TREE_LIST.
4683         Adjust call to gnat_build_constructor.
4684         (Attribute_to_gnu): Likewise.
4685         (gnat_to_gnu): Likewise.
4686         (pos_to_constructor): Likewise.
4687         (extract_values): Likewise.
4688         * gcc-interface/utils.c (build_template): Likewise.
4689         (convert_vms_descriptor64): Likewise.
4690         (convert_vms_descriptor32): Likewise.
4691         (convert_to_fat_pointer): Likewise.
4692         (convert): Likewise.
4693         (unchecked_convert): Likewise.
4694         * gcc-interface/decl.c (gnat_to_gnu_entity): Likewise.
4695         * gcc-interface/utils2.c (build_allocator): Likewise.
4696         (fill_vms_descriptor): Likewise.
4697         (gnat_build_constructor): Take a VEC instead of a TREE_LIST.
4698         (compare_elmt_bitpos): Adjust for parameters being constructor_elts
4699         instead of TREE_LISTs.
4700
4701 2010-06-28  Steven Bosscher  <steven@gcc.gnu.org>
4702
4703         * gcc-interface/misc.c: Do not include except.h.
4704         * gcc-interface/Make-lang.in: Update dependencies.
4705
4706 2010-06-27  Eric Botcazou  <ebotcazou@adacore.com>
4707
4708         * gcc-interface/trans.c: Include tree-flow.h.
4709         (gnu_switch_label_stack): Delete.
4710         (Case_Statement_to_gnu): Do not emit the goto at the end of a case if
4711         its associated block cannot fall through.  Do not emit the final label
4712         if no cases branch to it.
4713         * gcc-interface/Make-lang.in (ada/trans.o): Add $(TREE_FLOW_H).
4714
4715 2010-06-23  Thomas Quinot  <quinot@adacore.com>
4716
4717         * exp_attr.adb (Expand_Access_To_Protected_Op): When rewriting a
4718         reference to a protected subprogram outside of the protected's scope,
4719         ensure the corresponding external subprogram is frozen before the
4720         reference.
4721
4722 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4723
4724         * sem_prag.adb: Fix typo in error message.
4725         * sem.adb: Refine previous change.
4726
4727 2010-06-23  Robert Dewar  <dewar@adacore.com>
4728
4729         * impunit.adb, a-suewen.adb, a-suewen.ads, a-suenco.adb, a-suenco.ads,
4730         a-suezen.adb, a-suezen.ads, a-stuten.adb, a-stuten.ads, Makefile.rtl:
4731         Implement Ada 2012 string encoding packages.
4732
4733 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
4734
4735         * a-stwiun-shared.adb, a-stwiun-shared.ads, a-stzunb-shared.adb,
4736         a-stzunb-shared.ads, a-swunau-shared.adb, a-swuwti-shared.adb,
4737         a-szunau-shared.adb, a-szuzti-shared.adb, a-strunb-shared.adb,
4738         a-strunb-shared.ads, a-stunau-shared.adb, a-suteio-shared.adb: New
4739         files.
4740         * gcc-interface/Makefile.in: Enable use of above files.
4741
4742 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4743
4744         * sem_ch13.adb (Check_Constant_Address_Clauses): Do not check legality
4745         of address clauses if if Ignore_Rep_Clauses is active.
4746         * freeze.adb (Check_Address_Clause): If Ignore_Rep_Clauses is active,
4747         remove address clause from tree so that it does not reach the backend.
4748
4749 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
4750
4751         * exp_attr.adb (Expand_N_Attribute_Reference [Attribute_Valid]): Do not
4752         expand 'Valid from user code in CodePeer mode, will be handled by the
4753         back-end directly.
4754
4755 2010-06-23  Bob Duff  <duff@adacore.com>
4756
4757         * g-comlin.ads: Minor comment improvements.
4758
4759 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4760
4761         * sem_res.adb (Uses_SS): The expression that initializes a controlled
4762         component of a record type may be a user-defined operator that is
4763         rewritten as a function call.
4764
4765 2010-06-23  Bob Duff  <duff@adacore.com>
4766
4767         * g-comlin.ads, sem_ch13.adb: Minor comment fix.
4768
4769 2010-06-23  Eric Botcazou  <ebotcazou@adacore.com>
4770
4771         * exp_ch11.adb (Expand_Local_Exception_Handlers): Propagate the end
4772         label to the new sequence of statements.  Set the sloc of the raise
4773         statement onto the new goto statements.
4774
4775 2010-06-23  Robert Dewar  <dewar@adacore.com>
4776
4777         * a-stuten.ads, a-stuten.adb: New files.
4778         * impunit.adb: Add engtry for Ada.Strings.UTF_Encoding (a-stuten.ads)
4779         * Makefile.rtl: Add entry for a-stuten (Ada.Strings.UTF_Encoding)
4780
4781 2010-06-23  Robert Dewar  <dewar@adacore.com>
4782
4783         * gnat_ugn.texi: Add documentation of -gnat12 switch
4784         Add documentation of -gnatX switch.
4785
4786 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4787
4788         * inline.ads: Include the current Ada_Version in the info for pending
4789         instance bodies, so that declaration and body are compiled with the
4790         same Ada_Version.
4791         * inline.adb: Move with_clause for Opt to spec.
4792         * sem_ch12.adb (Analyze_Package_Instantiation,
4793         Analyze_Subprogram_Instantiation): Save current Ada_Version in
4794         Pending_Instantiation information.
4795         (Instantiate_Package_Body, Instantiate_Subprogram_Body,
4796         Inline_Package_Body): Use the Ada_Version present in the body
4797         information.
4798
4799 2010-06-23  Robert Dewar  <dewar@adacore.com>
4800
4801         * usage.adb: Add documentation for -gnat12 switch.
4802         * errout.ads: Add VMS alias entry for -gnat12 switch
4803         * gnat_rm.texi: Add documentation for pragma Ada_12 and Ada_2012
4804         Add documentation for pragma Extensions_Allowed.
4805         * opt.ads: Add entry for Ada 2012 mode.
4806         * sem_ch4.adb, par-ch3.adb, par-ch4.adb: Use new Ada 2012 mode for 2012
4807         features.
4808         * sem_prag.adb, par-prag.adb: Add processing for pragma Ada_12 and
4809         Ada_2012.
4810         * sem_ch13.adb: Add handling for Ada 2012 mode.
4811         * snames.ads-tmpl: Add entries for pragma Ada_2012 and Ada_12.
4812         * switch-c.adb: Add handling for -gnat12 switch.
4813         Implement -gnat2005 and -gnat2012.
4814         * usage.adb: Add documentation for -gnat12 switch.
4815         * vms_data.ads: Add /12 switch for Ada 2012 mode.
4816
4817 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
4818
4819         * exp_ch4.adb (Expand_N_Allocator): Fix potential crash when using
4820         No_Task_Hierarchy restriction. Add comment.
4821         * exp_ch9.adb, exp_ch3.adb: Update comments.
4822
4823 2010-06-23  Robert Dewar  <dewar@adacore.com>
4824
4825         * sem_ch5.adb (Process_Bounds): Remove some junk initializations.
4826         * sem_res.adb: Add comments.
4827         * sem_util.adb: Minor reformatting. Add comments.
4828         Change increment on Actuals_In_Call table.
4829         * opt.ads: Minor: add 'constant'.
4830
4831 2010-06-23  Javier Miranda  <miranda@adacore.com>
4832
4833         * exp_disp.adb (Make_DT): Initialize the Size_Func component of the
4834         TSD to Null_Address if No_Dispatching_Calls is active.
4835
4836 2010-06-23  Vincent Celier  <celier@adacore.com>
4837
4838         * a-comlin.ads: Indicate that use of this package is not supported
4839         during the elaboration of an auto-initialized Stand-Alone Library.
4840
4841 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4842
4843         * exp_util.adb (Is_Possibly_Misaligned_Object): Do not rely on an
4844         alignment clause on a record type to determine if a component may be
4845         misaligned. The decision must be taken in the back-end where target
4846         alignment information is known.
4847
4848 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
4849
4850         * gnat1drv.adb (Adjust_Global_Switches): Enable some restrictions
4851         systematically in CodePeer mode to simplify generated code.
4852         * restrict.adb (Check_Restriction): Do nothing in CodePeer mode.
4853         * exp_ch4.adb (Expand_N_Allocator): Generate proper code when
4854         No_Task_Hierarchy is set instead of crasshing.
4855
4856 2010-06-23  Thomas Quinot  <quinot@adacore.com>
4857
4858         * sem_util.adb: Minor code cleanup: test for proper entity instead of
4859         testing just Chars attribute when checking whether a given scope is
4860         System.
4861         * exp_ch4.adb, einfo.adb: Minor reformatting.
4862
4863 2010-06-23  Vincent Celier  <celier@adacore.com>
4864
4865         PR ada/44633
4866         * switch-m.adb (Normalize_Compiler_Switches): Take into account
4867         switches -gnatB, -gnatD=nn, -gnatG (incuding -gnatG=nn), -gnatI,
4868         -gnatl=file, -gnatS, -gnatjnn, -gnateI=nn and -gnatWx.
4869
4870 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4871
4872         * sem_res.adb (Resolve_Membership_Op): If left operand is a mixed mode
4873         operation with a universal real operand, and the right operand is a
4874         range with universal bounds, find unique fixed point that may be
4875         candidate, and warn appropriately.
4876
4877 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4878
4879         * sem_res.adb (Resolve_Intrinsic_Operator): Add guards to handle
4880         properly the rare cases where VMS operators are visible through
4881         Extend_System, but the default System is being used and Address is a
4882         private type.
4883         * sem_util.adb: Widen predicate Is_VMS_Operator.
4884
4885 2010-06-23  Vincent Celier  <celier@adacore.com>
4886
4887         * switch-m.adb (Normalize_Compiler_Switches): Take into account -gnatC
4888         and -gnateS.
4889
4890 2010-06-23  Olivier Hainque  <hainque@adacore.com>
4891
4892         * einfo.adb (Has_Foreign_Convention): Consider Intrinsic with
4893         Interface_Name as foreign. These are GCC builtin imports for
4894         which Ada specific processing doesn't apply.
4895
4896 2010-06-23  Thomas Quinot  <quinot@adacore.com>
4897
4898         * sem_ch12.adb: Minor reformatting.
4899
4900 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4901
4902         * sem_util.adb (Is_VMS_Operator): Use scope of system extension to
4903         determine whether an intrinsic subprogram is VMS specific.
4904
4905 2010-06-23  Hristian Kirtchev  <kirtchev@adacore.com>
4906
4907         * treepr.adb (Print_Entity_Info): Output the contents of Field28 if it
4908         is present in the entity.
4909
4910 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
4911
4912         * xr_tabls.adb, xref_lib.adb: Update to latest lib-xref.ads
4913         Fix handling of parameters.
4914         Add protection against unexpected cases.
4915         * sem_ch6.adb (Create_Extra_Formals): Use suffix "L" instead of "A" for
4916         access level, since "A" suffix is already used elsewhere. Similarly,
4917         use suffix "O" instead of "C" for 'Constrained since "C" suffix is used
4918         for xxx'Class.
4919
4920 2010-06-23  Thomas Quinot  <quinot@adacore.com>
4921
4922         * sem_util.adb, sem_util.ads: Minor reformatting.
4923
4924 2010-06-23  Vincent Celier  <celier@adacore.com>
4925
4926         * prj.ads (Gprclean_Flags.Missing_Source_Files): Set to Error to keep
4927         the previous behavior of gprclean when there are missing files.
4928
4929 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4930
4931         * sem_ch12.adb (Load_Body_Of_Generic): In CodePeer mode, a missing
4932         generic body is not a fatal error.
4933         (Mark_Context): Handle properly names of child units.
4934         * sem.adb (Walk_Library_Items.Do_Action): Remove assertion on
4935         instantiations.
4936
4937 2010-06-23  Vincent Celier  <celier@adacore.com>
4938
4939         * ali.adb (Scan_ALI): When ignoring R lines, do not skip the next
4940         non-empty line.
4941
4942 2010-06-23  Bob Duff  <duff@adacore.com>
4943
4944         * g-pehage.ads, g-pehage.adb: Switch default optimization mode to
4945         Memory_Space, because CPU_Time doesn't seem to provide any significant
4946         speed advantage in practice. Cleanup: Get rid of constant
4947         Default_Optimization; doesn't seem to add anything. Use case
4948         statements instead of if statements; seems cleaner.
4949
4950 2010-06-23  Olivier Hainque  <hainque@adacore.com>
4951
4952         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Procedure>: Use
4953         Wshadow instead of Wextra to guard warning on absence of internal
4954         builtin decl for an import.  Fix use of quote in warning text.
4955         (intrin_arglists_compatible_p): Remove processing of integer trailing
4956         args on the Ada side.  Fix use of literal > in warning text.
4957         (intrin_return_compatible_p): Never warn on "function imported as
4958         procedure".  Defer the void/void case to the common type compatibility
4959         check.
4960         (gnat_to_gnu_param): Use void_ptr GCC type for System.Address argument
4961         of GCC builtin imports.
4962
4963 2010-06-23  Olivier Hainque  <hainque@adacore.com>
4964
4965         * gcc-interface/decl.c (intrin_types_incompatible_p): New function,
4966         helper for ...
4967         (intrin_arglists_compatible_p, intrin_return_compatible_p): New
4968         functions, helpers for ...
4969         (intrin_profiles_compatible_p): New function, replacement for ...
4970         (compatible_signatures_p): Removed.
4971         (gnat_to_gnu_entity) <case E_Procedure>: If -Wextra, warn on
4972         attempt to bind an unregistered builtin function.  When we have
4973         one, use it and warn on profile incompatibilities.
4974
4975 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
4976
4977         * gcc-interface/Make-lang.in: Update dependencies.
4978
4979 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
4980
4981         * sem_util.adb (Mark_Coextensions): If the expression in the allocator
4982         for a coextension in an object declaration is a concatenation, treat
4983         coextension as dynamic.
4984
4985 2010-06-23  Javier Miranda  <miranda@adacore.com>
4986
4987         * sem_ch3.adb (Add_Internal_Interface_Entities): Ensure that the
4988         internal entities are added to the scope of the tagged type.
4989         (Derive_Subprograms): Do not stop derivation when we find the first
4990         internal entity that has attribute Interface_Alias. After the change
4991         done to Override_Dispatching_Operations it is no longer true that
4992         these primirives are always located at the end of the list of
4993         primitives.
4994         * einfo.ads (Primitive_Operations): Add documentation.
4995         * exp_disp.adb (Write_DT): Improve output adding to the name of the
4996         primitive a prefix indicating its corresponding tagged type.
4997         * sem_disp.adb (Override_Dispatching_Operations): If the overridden
4998         entity covers the primitive of an interface that is not an ancestor of
4999         this tagged type then the new primitive is added at the end of the list
5000         of primitives.  Required to fulfill the C++ ABI.
5001
5002 2010-06-23  Javier Miranda  <miranda@adacore.com>
5003
5004         * atree.ads (Set_Reporting_Proc): New subprogram.
5005         * atree.adb: Remove dependency on packages Opt and SCIL_LL.
5006         (Allocate_Initialize_Node, Replace, Rewrite): Replace direct calls
5007         to routines of package Scil_ll by indirect call to the registered
5008         subprogram.
5009         (Set_Reporting_Proc): New subprogram. Used to register a subprogram
5010         that is invoked when a node is allocated, replaced or rewritten.
5011         * scil_ll.adb (Copy_SCIL_Node): New routine that takes care of copying
5012         the SCIL node. Used as argument for Set_Reporting_Proc.
5013         (Initialize): Register Copy_SCIL_Node as the reporting routine that
5014         is invoked by atree.
5015
5016 2010-06-23  Thomas Quinot  <quinot@adacore.com>
5017
5018         * sem_ch3.ads: Minor reformatting.
5019
5020 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
5021
5022         * sem_ch12.adb (Analyze_Package_Instantiation): In CodePeer mode,
5023         always analyze the generic body and instance, because it may be needed
5024         downstream.
5025         (Mark_Context): Prepend the with clauses for needed generic units, so
5026         they appear in a better order for CodePeer.
5027         * sem_util.adb, sem_util.ads: Prototype code for AI05-0144.
5028
5029 2010-06-23  Emmanuel Briot  <briot@adacore.com>
5030
5031         * prj.ads, prj-nmsc.adb (Error_Or_Warning): New subprogram.
5032
5033 2010-06-23  Robert Dewar  <dewar@adacore.com>
5034
5035         * g-pehage.adb, exp_ch13.adb: Minor reformatting.
5036
5037 2010-06-23  Thomas Quinot  <quinot@adacore.com>
5038
5039         * a-tags.ads: Fix description of TSD structure.
5040
5041 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
5042
5043         * sem_ch12.adb (Mark_Context): When indicating that the body of a
5044         generic unit is needed prior to the unit containing an instantiation,
5045         search recursively the context of the generic to add other generic
5046         bodies that may be instantiated indirectly through the current instance.
5047
5048 2010-06-23  Robert Dewar  <dewar@adacore.com>
5049
5050         * freeze.adb: Minor reformatting.
5051
5052 2010-06-23  Bob Duff  <duff@adacore.com>
5053
5054         * g-pehage.adb (Trim_Trailing_Nuls): Fix the code to match the comment.
5055
5056 2010-06-23  Vincent Celier  <celier@adacore.com>
5057
5058         * make.adb (Compile_Sources): Complete previous change.
5059
5060 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
5061
5062         * sem_ch6.adb (Add_Extra_Formal): Use suffix "C" in the name of the
5063         Constrained extra formal.
5064
5065 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
5066
5067         * exp_ch13.adb (Expand_Freeze_Actions): If validity checks and
5068         Initialize_Scalars are enabled, compile the generated equality function
5069         for a composite type with full checks enabled, so that validity checks
5070         are performed on individual components.
5071
5072 2010-06-23  Emmanuel Briot  <briot@adacore.com>
5073
5074         * prj.adb, prj.ads, prj-nmsc.adb (Processing_Flags): New flag
5075         Missing_Source_Files.
5076
5077 2010-06-23  Robert Dewar  <dewar@adacore.com>
5078
5079         * exp_ch3.adb, exp_util.adb: Minor reformatting.
5080
5081 2010-06-23  Jose Ruiz  <ruiz@adacore.com>
5082
5083         * a-reatim.adb, a-retide.adb: Move the initialization of the tasking
5084         run time from Ada.Real_Time.Delays to Ada.Real_Time. This way, calls to
5085         Clock (without delays) use a run time which is properly initialized.
5086
5087 2010-06-23  Vincent Celier  <celier@adacore.com>
5088
5089         * make.adb: Do not set Check_Readonly_Files when setting Must_Compile,
5090         when -f -u and a main is specified on the command line. However,
5091         attempt to compile even when the ALI file is read-only when
5092         Must_Compile is True.
5093
5094 2010-06-23  Thomas Quinot  <quinot@adacore.com>
5095
5096         * checks.adb, g-pehage.adb, cstand.adb: Minor code factorization.
5097
5098 2010-06-23  Javier Miranda  <miranda@adacore.com>
5099
5100         * sem_ch3.adb (Add_Internal_Interface_Entities): Generate internal
5101         entities for parent types that are interfaces. Needed in generics to
5102         handle formals that implement interfaces.
5103         (Derive_Subprograms): Add assertion for derivation of tagged types that
5104         do not cover interfaces. For generics, complete code that handles
5105         derivation of type that covers interfaces because the previous
5106         condition was weak (it required only name consistency; arguments were
5107         not checked). Add new code to locate primitives covering interfaces
5108         defined in generic units or instantiatons.
5109         * sem_util.adb (Has_Interfaces): Add missing support for derived types.
5110         * sem_ch6.adb (Check_Overriding_Indicator): Minor code cleanups.
5111         * exp_disp.adb (Make_Select_Specific_Data_Table): Skip primitives of
5112         interfaces that are parents of the type because they share the primary
5113         dispatch table.
5114         (Register_Primitive): Do not register primitives of interfaces that
5115         are parents of the type.
5116         * sem_ch13.adb (Analyze_Freeze_Entity): Add documentation.
5117         * exp_cg.adb (Write_Type_Info): When displaying overriding of interface
5118         primitives skip primitives of interfaces that are parents of the type.
5119
5120 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
5121
5122         * sem_attr.adb (Eval_Attribute): If the prefix is an array, the
5123         attribute cannot be constant-folded if an index type is a formal type,
5124         or is derived from one.
5125         * checks.adb (Determine_Range): ditto.
5126
5127 2010-06-23  Arnaud Charlet  <charlet@adacore.com>
5128
5129         * gnat_ugn.texi, gnatxref.adb: Add support for --ext switch.
5130
5131 2010-06-23  Bob Duff  <duff@adacore.com>
5132
5133         * g-pehage.ads, g-pehage.adb (Put): Fix off-by-one bug.
5134         (Insert): Disallow nul characters.
5135         (misc output routines): Assert no nul characters.
5136
5137 2010-06-23  Ed Schonberg  <schonberg@adacore.com>
5138
5139         * exp_ch4.adb: Use predefined unsigned type in all cases.
5140
5141 2010-06-23  Bob Duff  <duff@adacore.com>
5142
5143         * s-rannum.adb (Reset): Avoid overflow in calculation of Initiator.
5144         * g-pehage.ads: Minor comment fixes.
5145         * g-pehage.adb: Minor: Add some additional debugging printouts under
5146         Verbose flag.
5147
5148 2010-06-23  Robert Dewar  <dewar@adacore.com>
5149
5150         * binde.adb (Better_Choice): Always prefer Pure/Preelab.
5151         (Worse_Choice): Always prefer Pure/Preelab.
5152
5153 2010-06-23  Vincent Celier  <celier@adacore.com>
5154
5155         * a-reatim.adb: Call System.OS_Primitives.Initialize during elaboration
5156
5157 2010-06-23  Robert Dewar  <dewar@adacore.com>
5158
5159         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Properly handle
5160         checking returns in generic case.
5161         (Check_Missing_Return): New procedure.
5162
5163 2010-06-23  Robert Dewar  <dewar@adacore.com>
5164
5165         * bindgen.adb, switch-b.adb: Minor reformatting.
5166
5167 2010-06-23  Javier Miranda  <miranda@adacore.com>
5168
5169         * frontend.adb (Frontend): Add call to initialize the new package
5170         SCIL_LL.
5171         * exp_ch7.adb (Wrap_Transient_Expression): Remove call to
5172         Adjust_SCIL_Node.
5173         (Wrap_Transient_Statement): Remove call to Adjust_SCIL_Node.
5174         * sem_ch5.adb (Analyze_Iteration_Scheme.Process_Bounds): Remove call to
5175         Adjust_SCIL_Node.
5176         * exp_util.adb (Insert_Actions): Remove code for
5177         N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes.
5178         (Remove_Side_Effects): Remove calls to Adjust_SCIL_Node.
5179         * sinfo.adb (SCIL_Entity, SCIL_Tag_Value): Remove checks on
5180         N_SCIL_Tag_Init and N_SCIL_Dispatch_Table_Object_Init in the assertion.
5181         (SCIL_Related_Node, Set_SCIL_Related_Node): Removed.
5182         * sinfo.ads (SCIL_Related_Node): Field removed.
5183         (N_SCIL_Dispatch_Table_Object_Init): Node removed.
5184         (N_SCIL_Tag_Init): Node removed.
5185         * sem_scil.ads, sem_scil.adb (Adjust_SCIL_Node): Removed.
5186         (Check_SCIL_Node): New implementation.
5187         (Find_SCIL_Node): Removed.
5188         * sem.adb (Analyze): Remove management of
5189         N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes.
5190         * sem_util.adb (Insert_Explicit_Dereference): Remove call to
5191         Adjust_SCIL_Node.
5192         * exp_ch4.adb (Expand_N_In): Code cleanup: remove call to
5193         Set_SCIL_Related_Node and avoid adding the SCIL node before the
5194         referenced node using Insert_Action because this is not longer
5195         required.
5196         (Expand_Short_Circuit_Operator): Remove call to SCIL node.
5197         * exp_ch6.adb (Expand_Call): Remove call to Adjust_SCIL_Node.
5198         * sem_ch4.adb (Analyze_Type_Conversion): Remove call to
5199         Adjust_SCIL_Node.
5200         * exp_disp.adb (Expand_Dispatching_Call): Minor code reorganization
5201         because we no longer require to generate the SCIL node before the call.
5202         (Make_DT): Remove generation of SCI_Dispatch_Table_Object_Init node.
5203         Remove calls to Set_SCIL_Related_Node and avoid adding the SCIL
5204         nodes before the referenced node using Insert_Action because this
5205         is not longer required.
5206         * atree.adb (Allocate_Initialize_Node, Replace, Rewrite): Add call to
5207         update the SCIL_Node field.
5208         * sprint.adb (Sprint_Node_Actual): Remove code for
5209         N_SCIL_Dispatch_Table_Object_Init and N_SCIL_Tag_Init nodes.
5210         * treepr.adb (Print_Node): Print the SCIL node field (if available).
5211         * exp_ch3.adb (Build_Init_Procedure): Remove generation of
5212         SCIL_Tag_Init nodes.
5213         * scil_ll.ads, scil_ll.adb: New files.
5214         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
5215         dependencies.
5216
5217 2010-06-23  Robert Dewar  <dewar@adacore.com>
5218
5219         * sem_ch6.adb: Minor reformatting.
5220
5221 2010-06-23  Doug Rupp  <rupp@adacore.com>
5222
5223         * bindusg.adb (Display): Write -Hnn line.
5224         * bindgen.adb (Gen_Adainit_Ada): Write Heap_Size to binder file as 
5225         necessary.
5226         * init.c (__gl_heap_size): Rename from __gl_no_malloc_64 and change
5227         valid values to 32 and 64.
5228         (GNAT$NO_MALLOC_64): Recognize TRUE, 1, FALSE, and 0 in addition to
5229         ENABLE, DISABLE as valid settings.
5230         * switch-b.adb (Scan_Binder_Switches): Process -Hnn switch.
5231         * opt.ads (Heap_Size): New global variable.
5232         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove mostly redundant 
5233         TARGET_MALLOC64 check. Fix comment.
5234
5235 2010-06-23  Robert Dewar  <dewar@adacore.com>
5236
5237         * sem_ch6.adb, exp_ch4.adb, s-rannum.ads, sem.adb, sem_ch12.adb: Minor
5238         reformatting.  Add comments.
5239         * errout.adb (Finalize): Properly adjust warning count when deleting
5240         continuations.
5241
5242 2010-06-22  Robert Dewar  <dewar@adacore.com>
5243
5244         * errout.adb (Finalize): Set Prev pointers.
5245         (Finalize): Delete continuations for deletion by warnings off(str).
5246         * erroutc.ads: Add Prev pointer to error message structure.
5247
5248 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5249
5250         * sem.adb (Do_Unit_And_Dependents): If the spec of the main unit is a
5251         child unit, examine context of parent units to locate instantiated
5252         generics whose bodies may be needed. 
5253         * sem_ch12.adb: (Mark_Context): if the enclosing unit does not have a
5254         with_clause for the instantiated generic, examine the context of its
5255         parents, to set Withed_Body flag, so that it can be visited earlier.
5256         * exp_ch4.adb (Expand_N_Op_Not): If this is a VMS operator applied to
5257         an unsigned type, use a type of the proper size for the intermediate
5258         value, to prevent alignment problems on unchecked conversion.
5259
5260 2010-06-22  Geert Bosch  <bosch@adacore.com>
5261
5262         * s-rannum.ads Change Generator type to be self-referential to allow
5263         Random to update its argument. Use "in" mode for the generator in the
5264         Reset procedures to allow them to be called from the Ada.Numerics
5265         packages without tricks.
5266         * s-rannum.adb: Use the self-referencing argument to get write access
5267         to the internal state of the random generator.
5268         * a-nudira.ads: Make Generator a derived type of
5269         System.Random_Numbers.Generator.
5270         * a-nudira.adb: Remove use of 'Unrestricted_Access.
5271         Put subprograms in alpha order and add headers.
5272         * g-mbdira.ads: Change Generator type to be self-referential.
5273         * g-mbdira.adb: Remove use of 'Unrestricted_Access.
5274
5275 2010-06-22  Robert Dewar  <dewar@adacore.com>
5276
5277         * freeze.adb: Minor reformatting
5278         Minor code reorganization (use Nkind_In and Ekind_In).
5279
5280 2010-06-22  Bob Duff  <duff@adacore.com>
5281
5282         * gnat1drv.adb (Gnat1drv): Remove the messages that recommend using 
5283         -gnatc when a file is compiled that we cannot generate code for, not
5284         helpful and confusing.
5285
5286 2010-06-22  Vincent Celier  <celier@adacore.com>
5287
5288         * switch-m.adb (Normalize_Compiler_Switches): Process correctly
5289         switches -gnatknn.
5290
5291 2010-06-22  Paul Hilfinger  <hilfinger@adacore.com>
5292
5293         * s-rannum.adb: Replace constants with commented symbols.
5294         * s-rannum.ads: Explain significance of the initial value of the data
5295         structure.
5296
5297 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5298
5299         * a-ngcoty.adb: Clarify comment.
5300
5301 2010-06-22  Gary Dismukes  <dismukes@adacore.com>
5302
5303         * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Return without
5304         expansion for indexing packed arrays with small power-of-2 component
5305         sizes when the target is AAMP.
5306         (Expand_Packed_Element_Reference): Return without expansion for
5307         indexing packed arrays with small power-of-2 component sizes when the
5308         target is AAMP.
5309
5310 2010-06-22  Geert Bosch  <bosch@adacore.com>
5311
5312         * exp_ch4.adb (Expand_N_In): Do not substitute a valid check for X in
5313         Float'Range.
5314
5315 2010-06-22  Robert Dewar  <dewar@adacore.com>
5316
5317         * g-mbdira.adb, g-mbflra.adb, a-nuflra.adb, a-nudira.adb: Minor comment
5318         updates.
5319
5320 2010-06-22  Doug Rupp  <rupp@adacore.com>
5321
5322         * system-vms.ads, system-vms-zcx.ads: Remove old unused VMS system
5323         packages.
5324         * system-vms_64.ads, system-vms-ia64.ads: Minor reformatting.
5325         (pragma Ident): Add a default ident string in the private part.
5326
5327 2010-06-22  Robert Dewar  <dewar@adacore.com>
5328
5329         * cstand.adb: Minor reformatting.
5330
5331 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5332
5333         * freeze.adb (Build_And_Analyze_Renamed_Body): For expansion purposes,
5334         recognize the Shift and Rotation intrinsics that are known to the
5335         compiler but have no interface name.
5336
5337 2010-06-22  Geert Bosch  <bosch@adacore.com>
5338
5339         * a-ngcoty.adb ("*"): Rewrite complex multiplication to use proper
5340         scaling in case of overflow or NaN results.
5341
5342 2010-06-22  Robert Dewar  <dewar@adacore.com>
5343
5344         * cstand.adb: Complete previous change.
5345         * g-dirope.ads: Add comment.
5346         * s-stchop.adb, sfn_scan.adb: Minor reformatting.
5347
5348 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5349
5350         * cstand.adb: Add tree nodes for pragma Pack on string types.
5351
5352 2010-06-22  Javier Miranda  <miranda@adacore.com>
5353
5354         * einfo.ads, einfo.adb (Last_Formal): New synthesized attribute.
5355         * exp_util.adb (Find_Prim_Op): Use new attribute to locate the last
5356         formal of a primitive.
5357         * exp_disp.adb (Is_Predefined_Dispatching_Operation,
5358          Is_Predefined_Dispatching_Alias): Use new attribute to locate the last
5359         formal of a primitive.
5360         * exp_cg.adb (Is_Predefined_Dispatching_Operation): Use new attribute
5361         to obtain the last formal of a primitive.
5362
5363 2010-06-22  Geert Bosch  <bosch@adacore.com>
5364
5365         * sysdep.c, init.c, adaint.c, cstreams.c: Remove conditional code
5366         depending on __EMX__ or MSDOS being defined.
5367         * i-cstrea.ads, gnat_rm.texi: Remove mentions of OS/2, DOS and Xenix.
5368         * a-excpol-abort.adb: Update comment indicating users of the file.
5369         * xref_lib.adb, sfn_scan.adb: Remove mention of OS/2, replace NT by
5370         Windows.
5371         * env.c: Remove empty conditional for MSDOS.
5372         * s-stchop.adb, g-dirope.ads, s-fileio.adb, osint.ads: Remove mention
5373         of OS/2 in comment.
5374
5375 2010-06-22  Robert Dewar  <dewar@adacore.com>
5376
5377         * s-rannum.adb: Minor reformatting.
5378
5379 2010-06-22  Javier Miranda  <miranda@adacore.com>
5380
5381         * sem_aux.adb, sem_aux.ads, sem_util.adb, sem_util.ads, sem_elim.adb,
5382         exp_cg.adb: Minor code reorganization: Move routine Ultimate_Alias from
5383         package Sem_Util to package Sem_Aux.
5384
5385 2010-06-22  Javier Miranda  <miranda@adacore.com>
5386
5387         * exp_disp.adb (Make_Secondary_DT, Make_DT): Minor code cleanup:
5388         remove useless restriction on imported routines when building the
5389         dispatch tables.
5390
5391 2010-06-22  Robert Dewar  <dewar@adacore.com>
5392
5393         * cstand.adb (Create_Standard): Set Has_Pragma_Pack for standard string
5394         types.
5395
5396 2010-06-22  Javier Miranda  <miranda@adacore.com>
5397
5398         * sem_ch4.adb (Collect_Generic_Type_Ops): Protect code that handles
5399         generic subprogram declarations to ensure proper context. Add missing
5400         support for generic actuals.
5401         (Try_Primitive_Operation): Add missing support for concurrent types
5402         that have no Corresponding_Record_Type. Required to diagnose errors
5403         compiling
5404         generics or when compiling with no code generation (-gnatc).
5405         * sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): Do not build
5406         the corresponding record type.
5407         * sem_disp.ads, sem_disp.adb (Check_Dispatching_Operation): Complete
5408         documentation. Do minimum decoration when processing a primitive of a
5409         concurrent tagged type that covers interfaces. Required to diagnose
5410         errors in the Object.Operation notation compiling generics or under
5411         -gnatc.
5412         * exp_ch9.ads, exp_ch9.adb (Build_Corresponding_Record): Add missing
5413         propagation of attribute Interface_List to the corresponding record.
5414         (Expand_N_Task_Type_Declaration): Code cleanup.
5415         (Expand_N_Protected_Type_Declaration): Code cleanup.
5416
5417 2010-06-22  Matthew Heaney  <heaney@adacore.com>
5418
5419         * a-convec.adb, a-coinve.adb: Removed 64-bit types Int and UInt.
5420
5421 2010-06-22  Paul Hilfinger  <hilfinger@adacore.com>
5422
5423         * s-rannum.adb (Random_Float_Template): Replace with unbiased version
5424         that is able to produce all representable floating-point numbers in the
5425         unit interval. Remove template parameter Shift_Right, no longer used.
5426         * gnat_rm.texi: Document the period of the pseudo-random number
5427         generator under the description of its algorithm.
5428         * gcc-interface/Make-lang.in: Update dependencies.
5429
5430 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5431
5432         * exp_aggr.adb (Rewrite_Discriminant): Fix predicate used to identify
5433         reference to discriminant (can be an expanded name as well as an
5434         identifier).
5435
5436 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5437
5438         * exp_ch6.adb: Clarify comment.
5439
5440 2010-06-22  Geert Bosch  <bosch@adacore.com>
5441
5442         * exp_imgv.adb (Expand_Image_Attribute): Treat ordinary fixed point
5443         with decimal small as decimal types, avoiding FP arithmetic.
5444         (Has_Decimal_Small): New function.
5445         * einfo.ads, einfo.adb (Aft_Value): New synthesized attributed for
5446         fixed point types.
5447         * sem_attr.adb (Eval_Attribute): Remove Aft_Value function and update
5448         callers to call the new function in Einfo that takes the entity as
5449         parameter.
5450
5451 2010-06-22  Robert Dewar  <dewar@adacore.com>
5452
5453         * sem_ch3.adb, sem_ch8.adb: Minor reformatting.
5454
5455 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5456
5457         * sem_elab.adb: Minor reformatting.
5458
5459 2010-06-22  Vincent Celier  <celier@adacore.com>
5460
5461         * gnatsym.adb: Put the object files in the table in increasing
5462         aphabetical order of base names.
5463
5464 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5465
5466         * sem_ch8.adb (Set_Entity_Or_Discriminal): New procedure used by
5467         Find_Direct_Name and Find_Expanded_Name, to replace a discriminant with
5468         the corresponding discriminal within a record declaration.
5469
5470 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5471
5472         * exp_aggr.adb (Rewrite_Discriminant): Rewriting must occur only for an
5473         expression referring to a discriminal of the type of the aggregate (not
5474         a discriminal of some other unrelated type), and the prefix in the
5475         generated selected component must come from Lhs, not Obj.
5476
5477 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5478
5479         * sem_ch3.adb (Build_Derived_Record_Type): Fix predicate determining
5480         when to freeze the parent type.
5481
5482 2010-06-22  Robert Dewar  <dewar@adacore.com>
5483
5484         * s-rannum.adb, a-nudira.adb, types.ads, freeze.adb, sem_aggr.adb,
5485         exp_aggr.adb: Minor reformatting.
5486         * gnat_rm.texi: Document GNAT.MBBS_Discrete_Random and
5487         GNAT.MBSS_Float_Random.
5488         * g-mbdira.adb, g-mbflra.adb, g-mbdira.ads, g-mbflra.ads: Fix header.
5489
5490 2010-06-22  Paul Hilfinger  <hilfinger@adacore.com>
5491
5492         * a-nudira.adb, a-nudira.ads, a-nuflra.adb, a-nuflra.ads,
5493         gnat_rm.texi, impunit.adb, Makefile.rtl, s-rannum.adb
5494         (Random_Float_Template, Random): New method of creating
5495         uniform floating-point variables that allow the creation of all machine
5496         values in [0 .. 1).  
5497
5498         * g-mbdira.adb, g-mbflra.adb, g-mbdira.ads, g-mbflra.ads: New file.
5499
5500 2010-06-22  Gary Dismukes  <dismukes@adacore.com>
5501
5502         * sem_ch5.adb (Analyze_Assignment): Revise test for illegal assignment
5503         to abstract targets to check that the type is tagged and comes from
5504         source, rather than only testing for targets of interface types. Remove
5505         premature return.
5506
5507 2010-06-22  Vincent Celier  <celier@adacore.com>
5508
5509         * vms_data.ads: Modify the declarations of qualifiers
5510         /UNCHECKED_SHARED_LIB_IMPORTS to allow the generation of gnat.hlp
5511         without error.
5512
5513 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5514
5515         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false if
5516         expansion is disabled.
5517
5518 2010-06-22  Robert Dewar  <dewar@adacore.com>
5519
5520         * makeusg.adb: Minor reformatting.
5521
5522 2010-06-22  Robert Dewar  <dewar@adacore.com>
5523
5524         * types.ads: (Dint): Removed, no longer used anywhere.
5525         * uintp.adb (UI_From_CC): Use UI_From_Int, range is sufficient.
5526         (UI_Mul): Avoid use of UI_From_Dint.
5527         (UI_From_Dint): Removed, not used.
5528         * uintp.ads (UI_From_Dint): Removed, not used.
5529         (Uint_Min/Max_Simple_Mul): New constants.
5530
5531 2010-06-22  Vincent Celier  <celier@adacore.com>
5532
5533         * clean.adb (Parse_Cmd_Line): Recognize switch
5534         --unchecked-shared-lib-imports.
5535         (Usage): Add line for switch --unchecked-shared-lib-imports
5536         * makeusg.adb: Add line for switch --unchecked-shared-lib-imports
5537         * makeutl.ads: (Unchecked_Shared_Lib_Imports): New constant string
5538         moved from GPR_Util.
5539         * switch-m.adb (Scan_Make_Switches): Recognize switch
5540         --unchecked-shared-lib-imports.
5541         * vms_data.ads: Add VMS qualifiers /UNCHECKED_SHARED_LIB_IMPORTS.
5542         * gnat_ugn.texi: Add documentation for new switch
5543         --unchecked-shared-lib-imports.  Add also documentation for --subdirs.
5544
5545 2010-06-22  Javier Miranda  <miranda@adacore.com>
5546
5547         * sem_prag.adb, sem_util.adb, sem_util.ads, sem_attr.adb, exp_ch6.adb,
5548         exp_disp.adb, sem_eval.adb, exp_dist.adb lib-xref.adb: Code cleanup,
5549         this patch replaces duplication of code that traverses the chain of
5550         aliased primitives by a call to routine Ultimate_Alias that
5551         provides this functionality.
5552
5553 2010-06-22  Arnaud Charlet  <charlet@adacore.com>
5554
5555         * fmap.adb, opt.ads, osint.adb, osint.ads, output.ads, scng.adb,
5556         sinput-c.adb, switch-m.ads, tree_io.ads: Use simpler form of
5557         Warnings Off/On.
5558
5559 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5560
5561         * einfo.ads: Minor reformatting.
5562
5563 2010-06-22  Javier Miranda  <miranda@adacore.com>
5564
5565         * exp_disp.adb (Expand_Interface_Thunk): Do not generate thunk of
5566         eliminated primitives.
5567         (Make_DT): Avoid referencing eliminated primitives.
5568         (Register_Primitive): Do not register eliminated primitives in the
5569         dispatch table. Required to add this functionality when the program is
5570         compiled without static dispatch tables (-gnatd.t)
5571
5572 2010-06-22  Emmanuel Briot  <briot@adacore.com>
5573
5574         * fmap.adb, scng.adb, switch-m.ads, sinput-c.adb, opt.ads, output.ads,
5575         tree_io.ads, osint.adb, osint.ads: Use configuration pragmas to prevent
5576         warnings on use of internal GNAT units.
5577
5578 2010-06-22  Jose Ruiz  <ruiz@adacore.com>
5579
5580         * s-taprop-vxworks.adb (Set_Priority): Update comments.
5581
5582 2010-06-22  Paul Hilfinger  <hilfinger@adacore.com>
5583
5584         * s-rannum.adb: Make stylistic change to remove mystery constant in
5585         Extract_Value.  Image_Numeral_Length: new symbolic constant.
5586
5587 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5588
5589         * einfo.ads, einfo.adb: Make Is_Protected_Interface,
5590         Is_Synchronized_Interface, Is_Task_Interface into computable
5591         predicates, to free three flags in entity nodes.
5592         * sem_ch3.adb: Remove setting of these flags.
5593
5594 2010-06-22  Robert Dewar  <dewar@adacore.com>
5595
5596         * uintp.adb, osint.adb, prj-conf.adb, prj-part.adb, prj.adb: Minor
5597         reformatting.
5598         * s-taprop-vxworks.adb: Add comment for Set_Priority.
5599         * impunit.adb (Map_Array): Add entries for s-htable.ads and s-crc32.ads
5600         * projects.texi: Move @cindex to the left margin, since otherwise we
5601         are missing entries in the index.
5602
5603 2010-06-22  Emmanuel Briot  <briot@adacore.com>
5604
5605         * prj-part.adb, prj.adb, tempdir.ads, makeutl.adb: Use
5606         packages from the GNAT hierarchy instead of System when possible.
5607         * gcc-interface/Make-lang.in: Update dependencies.
5608
5609 2010-06-22  Jose Ruiz  <ruiz@adacore.com>
5610
5611         * s-taprop-vxworks.adb (Set_Priority): Remove the code that was
5612         previously in place to reorder the ready queue when a task drops its
5613         priority due to the loss of inherited priority.
5614
5615 2010-06-22  Vincent Celier  <celier@adacore.com>
5616
5617         * projects.texi: Minor spelling error fixes.
5618         Minor reformatting.
5619
5620 2010-06-22  Emmanuel Briot  <briot@adacore.com>
5621
5622         * prj-part.adb, prj-ext.adb, prj.adb, makeutl.adb, prj-conf.adb: Remove
5623         warnings for some with clauses.
5624
5625 2010-06-22  Robert Dewar  <dewar@adacore.com>
5626
5627         * errout.adb (Unwind_Internal_Type): Improve handling of First_Subtype
5628         test to catch more cases where first subtype is the results we want.
5629         * sem_res.adb (Make_Call_Into_Operator): Don't go to First_Subtype in
5630         error case, since Errout will now handle this correctly.
5631         * gcc-interface/Make-lang.in: Add Sem_Aux to list of GNATBIND objects.
5632         Update dependencies.
5633
5634 2010-06-22  Arnaud Charlet  <charlet@adacore.com>
5635
5636         * exp_ch4.adb (Expand_Allocator_Expression): Set Related_Node properly
5637         when calling Make_Temporary.
5638
5639 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5640
5641         * sem_ch3.adb (Access_Subprogram_Declaration): An anonymous access to
5642         subprogram can be associated with an entry body.
5643
5644 2010-06-22  Robert Dewar  <dewar@adacore.com>
5645
5646         * scos.ads: Add note on membership test handling.
5647
5648 2010-06-22  Vincent Celier  <celier@adacore.com>
5649
5650         * projects.texi: Minor spelling fixes.
5651         Minor reformatting.
5652
5653 2010-06-22  Paul Hilfinger  <hilfinger@adacore.com>
5654
5655         * s-rannum.adb: Correct off-by-one error in Extract_Value.
5656
5657 2010-06-22  Vincent Celier  <celier@adacore.com>
5658
5659         * mlib-prj.adb (Display): In non verbose mode, truncate after fourth
5660         argument.
5661         * mlib-utl.adb (Gcc): In non verbose mode, truncate the display of the
5662         gcc command if it is too long.
5663
5664 2010-06-22  Robert Dewar  <dewar@adacore.com>
5665
5666         * errout.adb (Set_Msg_Node): Fix incorrect reference to node.
5667
5668 2010-06-22  Arnaud Charlet  <charlet@adacore.com>
5669
5670         * exp_ch6.adb (Expand_Actuals): Use Actual as the related node when
5671         calling Make_Temporary.
5672
5673 2010-06-22  Robert Dewar  <dewar@adacore.com>
5674
5675         * sem_res.adb, sem_aux.adb, errout.adb: Minor reformatting.
5676
5677 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5678
5679         * sem_res.adb: Additional special-case for VMS.
5680
5681 2010-06-22  Vincent Celier  <celier@adacore.com>
5682
5683         * gnatsym.adb: Minor comment fix.
5684
5685 2010-06-22  Vincent Celier  <celier@adacore.com>
5686
5687         * prj-nmsc.adb (Process_Naming_Scheme): Initialize Lib_Data_Table.
5688
5689 2010-06-22  Robert Dewar  <dewar@adacore.com>
5690
5691         * par-ch4.adb (P_Name): Recognize 'Mod attribute in Ada 95 mode
5692         * sem_attr.adb (Attribute_05): Add Name_Mod so that 'Mod recognized in
5693         Ada 95 mode as an implementation defined attribute.
5694
5695 2010-06-22  Vincent Celier  <celier@adacore.com>
5696
5697         * bindusg.adb (Display): Update line for -R
5698         * switch-b.adb (Scan_Binder_Switches): Allow generation of the binder
5699         generated files when -R is used.
5700
5701 2010-06-22  Vincent Celier  <celier@adacore.com>
5702
5703         * prj-nmsc.adb (Lib_Data_Table): New table.
5704         (Check_Library_Attributes): Check if the same library name is used in
5705         two different projects that do not extend each other.
5706
5707 2010-06-22  Robert Dewar  <dewar@adacore.com>
5708
5709         * lib-writ.ads, errout.adb, einfo.adb, einfo.ads: Minor reformatting.
5710
5711 2010-06-22  Vincent Celier  <celier@adacore.com>
5712
5713         * adaint.c (__gnat_locate_regular_file): If a directory in the path is
5714         empty, make it the current working directory.
5715
5716 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5717
5718         * sem_ch3.adb (Build_Derived_Record_Type): When deriving a tagged
5719         private type with discriminants, make sure the parent type is frozen.
5720
5721 2010-06-22  Eric Botcazou  <ebotcazou@adacore.com>
5722
5723         * exp_attr.adb (Expand_N_Attribute_Reference) <Attribute_Bit>: Deal
5724         with packed array references specially.
5725         * exp_ch4.adb (Expand_N_Indexed_Component): Do not convert a reference
5726         to a component of a bit packed array if it is the prefix of 'Bit.
5727         * exp_pakd.ads (Expand_Packed_Bit_Reference): Declare.
5728         * exp_pakd.adb (Expand_Packed_Bit_Reference): New procedure.  Expand a
5729         'Bit reference, where the prefix involves a packed array reference.
5730         (Get_Base_And_Bit_Offset): New helper, extracted from...
5731         (Expand_Packed_Address_Reference): ...here.  Call above procedure to
5732         get the outer object and offset expression.
5733
5734 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5735
5736         * exp_attr.adb, lib-writ.ads, bindgen.adb: Minor reformatting.
5737         * einfo.adb (Related_Expression, Set_Related_Expression): Add
5738         assertions.
5739
5740 2010-06-22  Javier Miranda  <miranda@adacore.com>
5741
5742         * sem_ch3.adb (Add_Internal_Interface_Entities): Minor code
5743         reorganization to properly check if the operation has been inherited as
5744         an abstract operation.
5745
5746 2010-06-22  Ed Falis  <falis@adacore.com>
5747
5748         * s-osinte-vxworks.ads: Complete previous change.
5749
5750 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5751
5752         * sem_res.adb: Add comment.
5753         * projects.texi, gnat_ugn.texi: Remove macro.
5754
5755 2010-06-22  Vincent Celier  <celier@adacore.com>
5756
5757         * prj-attr.adb: Remove project level attribute Main_Language.
5758
5759 2010-06-22  Robert Dewar  <dewar@adacore.com>
5760
5761         * switch-b.adb, osint-b.adb: Minor reformatting.
5762
5763 2010-06-22  Pascal Obry  <obry@adacore.com>
5764
5765         * g-socthi-mingw.adb (C_Sendmsg): Do not attempt to send data from a
5766         vector if previous send was not fully successful. If only part of
5767         the vector data was sent, we exit the loop.
5768
5769 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5770
5771         * sem_res.adb (Make_Call_Into_Operator): Use First_Subtype for better
5772         error reporting with generic types.
5773
5774 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5775
5776         * bindgen.adb, bindusg.adb, gnatbind.adb, gnat_ugn.texi, opt.ads,
5777         osint-b.adb, osint-b.ads, output.adb, output.ads, switch-b.adb,
5778         vms_data.ads: Add a new command line switch -A to gnatbind to output
5779         the list of all ALI files for the partition.
5780
5781 2010-06-22  Arnaud Charlet  <charlet@adacore.com>
5782
5783         * s-osinte-vxworks.ads: Fix casing.
5784         * s-vxwext-kernel.ads, s-vxwext-rtp.ads: Complete previous
5785         change: Interfaces.C does not provide a long_long type.
5786
5787 2010-06-22  Emmanuel Briot  <briot@adacore.com>
5788
5789         * gnat_ugn.texi, projects.texi: Preprocess projects.texi for VMS and
5790         native user's guide, since this document contains the two versions.
5791         * gcc-interface/Make-lang.in: Update doc dependencies.
5792
5793 2010-06-22  Robert Dewar  <dewar@adacore.com>
5794
5795         * sem_ch3.adb: Minor reformatting.  Minor code reorganization.
5796
5797 2010-06-22  Emmanuel Briot  <briot@adacore.com>
5798
5799         * gnat_ugn.texi, projects.texi: Remove toplevel menu, since we should
5800         not build this file on its own (only through gnat_ugn.texi).
5801         Remove macro definitions and insert simpler version in gnat_ugn.texi.
5802
5803 2010-06-22  Robert Dewar  <dewar@adacore.com>
5804
5805         * ali-util.ads: Minor comment update.
5806         * g-socthi-mingw.adb: Minor reformatting.
5807
5808 2010-06-22  Ed Falis  <falis@adacore.com>
5809
5810         * s-osinte-vxworks.ads: Take sigset_t definition of System.VxWorks.Ext.
5811         * s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads: Define sigset_t
5812         for specific versions of VxWorks.
5813
5814 2010-06-22  Emmanuel Briot  <briot@adacore.com>
5815
5816         * gnat_rm.texi, gnat_ugn.texi, projects.texi: Remove all project files
5817         related sections from user's guide and reference manual, since they
5818         have now been merged together into a separate document (projects.texi).
5819         This removes a lot of duplication where attributes where described
5820         in several places.
5821         The grammar for the project files is now in each of the sections
5822         (packages,expressions,...) instead of being duplicates in two other
5823         sections (one in the user's guide that contained the full grammar,
5824         and various sections in the rm that contained extracts of the same
5825         grammar).
5826         Added the full list of all supported attributes, since existing lists
5827         were incomplete
5828         Rename "associative array" into "indexed attribute"
5829         Remove sections that were duplicates ("External References in
5830         Project Files" and "External Values", and "Project Extensions"
5831         for instance). The list of valid packages in project files is now in
5832         a single place.
5833
5834 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5835
5836         * sem_ch3.adb (Add_Internal_Interface_Entities): If
5837         Find_Primitive_Covering_Interface does not find the operation, it may
5838         be because of a name conflict between the inherited operation and a
5839         local non-overloadable name. In that case look for the operation among
5840         the primitive operations of the type. This search must succeed
5841         regardless of visibility.
5842
5843 2010-06-22  Pascal Obry  <obry@adacore.com>
5844
5845         * g-socthi-mingw.adb: Properly honor MSG_WAITALL in recvmsg.
5846         (C_Recvmsg): Propely honor the MSG_WAITALL flag in Windows
5847         recvmsg emulation.
5848
5849 2010-06-22  Robert Dewar  <dewar@adacore.com>
5850
5851         * sem_ch4.adb (Analyze_Conditional_Expression): Defend against
5852         malformed tree.
5853         * sprint.adb (Sprint_Node_Actual, case N_Conditional_Expression):
5854         Ditto.
5855
5856 2010-06-22  Arnaud Charlet  <charlet@adacore.com>
5857
5858         * s-intman-vxworks.ads: Code clean up.
5859
5860 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5861
5862         * sem_res.adb (Resolve_Slice): When the prefix is an explicit
5863         dereference, construct actual subtype of designated object to generate
5864         proper bounds checks.
5865
5866 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5867
5868         * ali-util.adb, ali-util.ads, gnatbind.adb (Read_ALI): Rename to
5869         Read_Withed_ALIs, which is more descriptive.
5870
5871 2010-06-22  Pascal Obry  <obry@adacore.com>
5872
5873         * g-sothco.ads: Minor reformatting.
5874         * g-socthi-mingw.adb: Remove part of work on the C_Recvmsg and
5875         C_Sendmsg implementation.
5876         (C_Sendmsg): Do not use lock (not needed).
5877         (C_Recvmsg): Likewise and also do not wait for incoming data.
5878
5879 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5880
5881         * uintp.adb: Fix scope error in operator call.
5882
5883 2010-06-22  Vincent Celier  <celier@adacore.com>
5884
5885         * makeutl.adb (Executable_Prefix_Path): on VMS, return "/gnu/".
5886         * prj-conf.adb (Get_Or_Create_Configuration_File): On VMS, if
5887         autoconfiguration is needed, fail indicating that no config project
5888         file can be found, as there is no autoconfiguration on VMS.
5889
5890 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5891
5892         * sem_res.adb (Make_Call_Into_Operator): Diagnose an incorrect scope
5893         for an operator in a functional notation, when operands are universal.
5894
5895 2010-06-22  Arnaud Charlet  <charlet@adacore.com>
5896
5897         * gcc-interface/Make-lang.in: Update dependencies.
5898
5899 2010-06-22  Robert Dewar  <dewar@adacore.com>
5900
5901         * sem_aggr.adb (Resolve_Record_Aggregate): Do style check on component
5902         name.
5903         * sem_ch10.adb (Analyze_Subunit): Do style check on parent unit name.
5904         * sem_ch8.adb (Find_Direct_Name): For non-overloadable entities, do
5905         style check.
5906         * sem_res.adb (Resolve_Entity_Name): Do style check for enumeration
5907         literals.
5908
5909 2010-06-22  Vincent Celier  <celier@adacore.com>
5910
5911         * make.adb (Scan_Make_Arg): No longer pass -nostdlib to the compiler as
5912         it has no effect. Always pass -nostdlib to gnatlink, even on VMS.
5913
5914 2010-06-22  Pascal Obry  <obry@adacore.com>
5915
5916         * g-socthi-mingw.adb: Fix implementation of the vectored sockets on
5917         Windows.
5918         (C_Recvmsg): Make sure the routine is atomic. Also fully
5919         fill vectors in the proper order.
5920         (C_Sendmsg): Make sure the routine is atomic.
5921
5922 2010-06-22  Robert Dewar  <dewar@adacore.com>
5923
5924         * sem_ch8.adb: Update comment.
5925         * sem_res.adb: Minor code reorganization (use Ekind_In).
5926
5927 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5928
5929         * sem_ch8.adb (Add_Implicit_Operator): If the context of the expanded
5930         name is a call, use the number of actuals to determine whether this is
5931         a binary or unary operator, rather than relying on later information
5932         to resolve the overload.
5933
5934 2010-06-22  Robert Dewar  <dewar@adacore.com>
5935
5936         * sem_ch10.adb, sem_aggr.adb: Minor reformatting.
5937
5938 2010-06-22  Robert Dewar  <dewar@adacore.com>
5939
5940         * sem_ch3.adb, sem_disp.adb: Minor code fixes.
5941         * sem_eval.adb: Minor reformatting.
5942
5943 2010-06-22  Vincent Celier  <celier@adacore.com>
5944
5945         * make.adb (Scan_Make_Arg): When invoked with -nostdlib, pass -nostdlib
5946         to gnatlink, except on Open VMS.
5947         * osint.adb (Add_Default_Search_Dirs): Do not suppress the default
5948         object directories if -nostdlib is used.
5949
5950 2010-06-22  Robert Dewar  <dewar@adacore.com>
5951
5952         * sem_util.adb (Is_Delegate): Put in proper alpha order.
5953         * sem_eval.adb: Minor reformatting.
5954
5955 2010-06-22  Robert Dewar  <dewar@adacore.com>
5956
5957         * g-expect-vms.adb, sem_res.adb: Minor reformatting.
5958         * exp_aggr.adb: Minor comment changes and reformatting.
5959         * sem_eval.adb (Find_Universal_Operator_Type): Put in proper alpha
5960         order.
5961         * sem_util.ads: Add some missing pragma Inline's.
5962
5963 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5964
5965         * sem_util.adb (Build_Actual_Subtype): Record original expression in
5966         Related_Expression attribute of the constructed subtype.
5967         * einfo.adb, einfo.ads (Underlying_View): Move to Node28 to free up
5968         Node24 on types for...
5969         (Related_Expression): Make attribute available on types as well.
5970
5971 2010-06-22  Gary Dismukes  <dismukes@adacore.com>
5972
5973         * exp_util.adb (Find_Interface_ADT): Retrieve Designated_Type instead
5974         of Directly_Designated_Type when the type argument is an access type.
5975         (Find_Interface_Tag): Retrieve Designated_Type instead of
5976         Directly_Designated_Type when the type argument is an access type.
5977         (Has_Controlled_Coextensions): Retrieve Designated_Type instead of
5978         Directly_Designated_Type of each access discriminant.
5979         * sem_res.adb (Resolve_Type_Conversion): Retrieve Designated_Type
5980         instead of Directly_Designated_Type when the operand and target types
5981         are access types.
5982
5983 2010-06-22  Thomas Quinot  <quinot@adacore.com>
5984
5985         * exp_aggr.adb (Flatten): Return False if one choice is statically
5986         known to be out of bounds.
5987
5988 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
5989
5990         * sem_res.adb (Resolve_Call): If the call is rewritten as an indexed of
5991         a parameterless function call, preserve parentheses of original
5992         expression, for proper handling by pretty printer.
5993         * sem_attr.adb (Analyze_Attribute, case 'Old): Add guard to Process
5994         procedure, to handle quietly identifiers that have no entity names.
5995         * exp_util.adb (Get_Current_Value_Condition): If the parent of an
5996         elsif_part is missing, it has been rewritten as a nested if, and there
5997         is no useful information on the current value of the variable.
5998
5999 2010-06-22  Gary Dismukes  <dismukes@adacore.com>
6000
6001         * sem_ch3.adb (Build_Discriminal): Set default scopes for newly created
6002         discriminals to the current scope.
6003         * sem_util.adb (Find_Body_Discriminal): Remove setting of discriminal's
6004         scope, which could overwrite a different already set value.
6005
6006 2010-06-22  Ed Schonberg  <schonberg@adacore.com>
6007
6008         * sem_res.adb (Valid_Conversion): If expression is a predefined
6009         operator, use sloc of type of interpretation to improve error message
6010         when operand is of some derived type.
6011         * sem_eval.adb (Is_Mixed_Mode_Operand): New function, use it.
6012
6013 2010-06-22  Emmanuel Briot  <briot@adacore.com>
6014
6015         * g-expect-vms.adb (Expect_Internal): No longer raises an exception, so
6016         that it can set out parameters as well. When a process has died, reset
6017         its Input_Fd to Invalid_Fd, so that when using multiple processes we
6018         can find out which process has died.
6019
6020 2010-06-22  Thomas Quinot  <quinot@adacore.com>
6021
6022         * sem_eval.adb (Find_Universal_Operator_Type): New
6023         subprogram to identify the operand type of an operator on universal
6024         operands, when an explicit scope indication is present. Diagnose the
6025         case where such a call is ambiguous.
6026         (Eval_Arithmetic_Op, Eval_Relational_Op, Eval_Unary_Op):
6027         Use the above to identify the operand type so it can be properly
6028         frozen.
6029         * sem_res.adb (Make_Call_Into_Operator): Remove bogus freeze of operand
6030         type, done in an arbitrary, possibly incorrect type (the presence of
6031         some numeric type in the scope is checked for legality, but when more
6032         than one such type is in the scope, we just pick a random one, not
6033         necessarily the expected one).
6034         * sem_utils.ads, sem_utils.adb (Is_Universal_Numeric_Type): New utility
6035         subprogram.
6036
6037 2010-06-22  Robert Dewar  <dewar@adacore.com>
6038
6039         * sem_eval.adb: Minor reformatting.
6040
6041 2010-06-22  Robert Dewar  <dewar@adacore.com>
6042
6043         * exp_ch4.adb (Expand_N_Conditional_Expression): Use
6044         Expression_With_Actions to clean up the code generated when folding
6045         constant expressions.
6046
6047 2010-06-22  Vincent Celier  <celier@adacore.com>
6048
6049         * g-expect-vms.adb: Add new subprograms Free, First_Dead_Process and
6050         Has_Process.
6051
6052 2010-06-22  Vincent Celier  <celier@adacore.com>
6053
6054         * prj-nmsc.adb (Find_Sources): When a source from a multi-unit file is
6055         found, check if it's path has aready been found, whatever its index.
6056
6057 2010-06-22  Robert Dewar  <dewar@adacore.com>
6058
6059         * atree.adb, gnatbind.adb: Minor reformatting.
6060         Minor code reorganization.
6061
6062 2010-06-21  Robert Dewar  <dewar@adacore.com>
6063
6064         * exp_ch4.adb (Expand_N_Conditional_Expression): Fold if condition
6065         known at compile time.
6066
6067 2010-06-21  Gary Dismukes  <dismukes@adacore.com>
6068
6069         * atree.adb: Fix comment typo.
6070
6071 2010-06-21  Ed Schonberg  <schonberg@adacore.com>
6072
6073         * sem_eval.adb (Test_Ambiguous_Operator): New procedure to check
6074         whether a universal arithmetic expression in a conversion, which is
6075         rewritten from a function call with an expanded name, is ambiguous.
6076
6077 2010-06-21  Vincent Celier  <celier@adacore.com>
6078
6079         * prj-nmsc.adb (Name_Location): New Boolean component Listed, to record
6080         source files in specified list of sources.
6081         (Check_Package_Naming): Remove out parameters Bodies and Specs, as they
6082         are never used.
6083         (Add_Source): Set the Location of the new source
6084         (Process_Exceptions_File_Based): Call Add_Source with the Location
6085         (Get_Sources_From_File): If an exception is found, set its Listed to
6086         True
6087         (Find_Sources): When Source_Files is specified, if an exception is
6088         found, set its Listed to True. Remove any exception that is not in a
6089         specified list of sources.
6090         * prj.ads (Source_Data): New component Location
6091
6092 2010-06-21  Vincent Celier  <celier@adacore.com>
6093
6094         * gnatbind.adb (Closure_Sources): Global table, moved from block.
6095
6096 2010-06-21  Thomas Quinot  <quinot@adacore.com>
6097
6098         * sem_res.adb: Minor reformatting.
6099         * atree.adb: New debugging hook "rr" for node rewrites.
6100
6101 2010-06-21  Robert Dewar  <dewar@adacore.com>
6102
6103         * g-expect.ads, g-expect.adb: Minor reformatting.
6104
6105 2010-06-21  Emmanuel Briot  <briot@adacore.com>
6106
6107         * s-regpat.adb (Next_Pointer_Bytes): New named constant. Code clean up.
6108
6109 2010-06-21  Arnaud Charlet  <charlet@adacore.com>
6110
6111         * gcc-interface/Make-lang.in: Update dependencies.
6112
6113 2010-06-21  Thomas Quinot  <quinot@adacore.com>
6114
6115         * bindgen.ads: Update comments.
6116
6117 2010-06-21  Vincent Celier  <celier@adacore.com>
6118
6119         * gnatbind.adb: Suppress dupicates when listing the sources in the
6120         closure (switch -R).
6121
6122 2010-06-21  Emmanuel Briot  <briot@adacore.com>
6123
6124         * s-regpat.adb (Link_Tail): Fix error when size of the pattern matcher
6125         is too small.
6126
6127 2010-06-21  Emmanuel Briot  <briot@adacore.com>
6128
6129         * g-expect.adb, g-expect.ads (First_Dead_Process, Free, Has_Process):
6130         New subprograms.
6131         (Expect_Internal): No longer raises an exception, so that it can set
6132         out parameters as well. When a process has died, reset its Input_Fd
6133         to Invalid_Fd, so that when using multiple processes we can find out
6134         which process has died.
6135
6136 2010-06-21  Robert Dewar  <dewar@adacore.com>
6137
6138         * s-regpat.adb, s-tpoben.adb, sem_attr.adb, sem_util.adb, sem_util.ads,
6139         checks.adb, sem_res.adb: Minor reformatting. Add comments.
6140
6141 2010-06-21  Ed Schonberg  <schonberg@adacore.com>
6142
6143         * sem_ch6.adb (New_Overloaded_Entity): If the new entity is a
6144         rederivation associated with a full declaration in a private part, and
6145         there is a partial view that derives the same parent subprogram, the
6146         new entity does not become visible. This check must be applied to
6147         interface operations as well.
6148
6149 2010-06-21  Thomas Quinot  <quinot@adacore.com>
6150
6151         * checks.adb: Add comments.
6152         * prj-nmsc.adb: Minor reformatting.
6153
6154 2010-06-21  Thomas Quinot  <quinot@adacore.com>
6155
6156         * sem_ch9.adb, checks.adb, sem_util.adb, sem_util.ads, sem_res.adb,
6157         sem_attr.adb (Get_E_First_Or_Last): Use attribute references on E to
6158         extract bounds, to ensure that we get the proper captured values,
6159         rather than an expression that may have changed value since the point
6160         where the subtype was elaborated.
6161         (Find_Body_Discriminal): New utility subprogram to share code
6162         between...
6163         (Eval_Attribute): For the case of a subtype bound that references a
6164         discriminant of the current concurrent type, insert appropriate
6165         discriminal reference.
6166         (Resolve_Entry.Actual_Index_Type.Actual_Discriminant_Ref): For a
6167         requeue to an entry in a family in the current task, use corresponding
6168         body discriminal. 
6169         (Analyze_Accept_Statement): Rely on expansion of attribute references
6170         to insert proper discriminal references in range check for entry in
6171         family.
6172
6173 2010-06-21  Emmanuel Briot  <briot@adacore.com>
6174
6175         * s-regpat.adb (Compile): Fix handling of big patterns.
6176
6177 2010-06-21  Robert Dewar  <dewar@adacore.com>
6178
6179         * a-tifiio.adb: Minor reformatting.
6180
6181 2010-06-21  Pascal Obry  <obry@adacore.com>
6182
6183         * prj-nmsc.adb (Search_Directories): Use the non-translated directory
6184         path to open it.
6185
6186 2010-06-21  Javier Miranda  <miranda@adacore.com>
6187
6188         * exp_cg.adb (Write_Call_Info): Fill the component sourcename using the
6189         external name.
6190
6191 2010-06-21  Ed Schonberg  <schonberg@adacore.com>
6192
6193         * exp_ch4.adb (Expand_Concatenate): If an object declaration is created
6194         to hold the result, indicate that the target of the declaration does
6195         not need an initialization, to prevent spurious errors when
6196         Initialize_Scalars is enabled.
6197
6198 2010-06-21  Ed Schonberg  <schonberg@adacore.com>
6199
6200         * a-tifiio.adb (Put): In the procedure that performs I/O on a String,
6201         Fore is not bound by line length. The Fore parameter of the internal
6202         procedure that performs the operation is an integer.
6203
6204 2010-06-21  Thomas Quinot  <quinot@adacore.com>
6205
6206         * sem_res.adb, checks.adb: Minor reformatting.
6207
6208 2010-06-21  Emmanuel Briot  <briot@adacore.com>
6209
6210         * s-regpat.adb (Next_Instruction, Get_Next_Offset): Removed, merged
6211         into Get_Next.
6212         (Insert_Operator_Before): New subprogram, avoids duplicated code
6213         (Compile): Avoid doing two compilations when the pattern matcher ends
6214         up being small.
6215
6216 2010-06-21  Emmanuel Briot  <briot@adacore.com>
6217
6218         * s-regpat.adb: Improve debug traces
6219         (Dump): Change output format to keep it smaller.
6220
6221 2010-06-21  Javier Miranda  <miranda@adacore.com>
6222
6223         * exp_cg.adb (Generate_CG_Output): Disable redirection of standard
6224         output to the output file when this routine completes its work.
6225
6226 2010-06-20  Eric Botcazou  <ebotcazou@adacore.com>
6227
6228         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Use while instead of
6229         for loop.  Call build_constructor_from_list directly in the CICO case.
6230
6231 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6232
6233         * freeze.adb (Build_And_Analyze_Renamed_Body): If the renaming
6234         declaration appears in the same unit and ealier than the renamed
6235         entity, retain generated body to prevent order-of-elaboration issues in
6236         gigi.
6237
6238 2010-06-18  Arnaud Charlet  <charlet@adacore.com>
6239
6240         * s-tpoben.adb: Update comments.
6241
6242 2010-06-18  Robert Dewar  <dewar@adacore.com>
6243
6244         * debug.adb: Minor comment change.
6245
6246 2010-06-18  Javier Miranda  <miranda@adacore.com>
6247
6248         * exp_cg.adb: Code clean up.
6249         * debug.adb: Complete documentation of switch -gnatd.Z.
6250         * gcc-interface/misc.c (callgraph_info_file): Declare.
6251
6252 2010-06-18  Javier Miranda  <miranda@adacore.com>
6253
6254         * exp_cg.adb (Homonym_Suffix_Length): Minor code reorganization.
6255
6256 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6257
6258         * sprint.ads: Minor reformatting.
6259         * output.ads: Update obsolete comment.
6260
6261 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6262
6263         * freeze.adb (Build_And_Analyze_Renamed_Body): if the renamed entity is
6264         an external intrinsic operation (e.g. a GCC numeric function) indicate
6265         that the renaming entity has the same characteristics, so a call to it
6266         is properly expanded.
6267
6268 2010-06-18  Javier Miranda  <miranda@adacore.com>
6269
6270         * exp_cg.adb, exp_cg.ads, exp_disp.adb, gnat1drv.adb: Add initial
6271         support for dispatch table/callgraph info generation.
6272         * gcc-interface/Make-lang.in: Update dependencies.
6273
6274 2010-06-18  Robert Dewar  <dewar@adacore.com>
6275
6276         * exp_ch6.adb: Minor reformatting.
6277         * gnatname.adb: Add comment.
6278
6279 2010-06-18  Vincent Celier  <celier@adacore.com>
6280
6281         * gnatname.adb (Scan_Args): When --and is used, make sure that the
6282         dynamic tables in the newly allocated Argument_Data are properly
6283         initialized.
6284
6285 2010-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6286
6287         * gnat1drv.adb: Fix comment.
6288
6289 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6290
6291         * exp_ch6.adb (Expand_Inlined_Call): If the inlined subprogram is a
6292         renaming, re-expand the call with the renamed subprogram if that one
6293         is marked inlined as well.
6294
6295 2010-06-18  Gary Dismukes  <dismukes@adacore.com>
6296
6297         * gnat1drv.adb (Adjust_Global_Switches): Enable
6298         Use_Expression_With_Actions for AAMP and VM targets.
6299
6300 2010-06-18  Vincent Celier  <celier@adacore.com>
6301
6302         * prj-nmsc.adb (Process_Linker): Recognize response file format GCC.
6303
6304 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6305
6306         * exp_ch4.adb: Minor reformatting.
6307
6308 2010-06-18  Javier Miranda  <miranda@adacore.com>
6309
6310         * debug.ads Add documentation on -gnatd.Z.
6311
6312 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6313
6314         * sem_elim.adb: Proper error message on improperly eliminated instances
6315
6316 2010-06-18  Vincent Celier  <celier@adacore.com>
6317
6318         * prj.ads (Response_File_Format): New value GCC.
6319
6320 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6321
6322         * gnat1drv.adb: Minor reformatting.
6323
6324 2010-06-18  Robert Dewar  <dewar@adacore.com>
6325
6326         * make.adb, sem_cat.adb: Minor reformatting.
6327         * sem_eval.adb: Fix typos.
6328
6329 2010-06-18  Pascal Obry  <obry@adacore.com>
6330
6331         * prj-nmsc.adb: Fix source filenames casing in debug output.
6332
6333 2010-06-18  Robert Dewar  <dewar@adacore.com>
6334
6335         * gnatcmd.adb: Minor reformatting.
6336
6337 2010-06-18  Robert Dewar  <dewar@adacore.com>
6338
6339         * sem_eval.adb (Eval_Conditional_Expression): Result is static if
6340         condition and both sub-expressions are static (and result is selected
6341         expression).
6342
6343 2010-06-18  Robert Dewar  <dewar@adacore.com>
6344
6345         * g-pehage.adb: Minor reformatting
6346
6347 2010-06-18  Pascal Obry  <obry@adacore.com>
6348
6349         * prj-nmsc.adb (Search_Directories): Insert canonical filenames into
6350         source hash table.
6351
6352 2010-06-18  Arnaud Charlet  <charlet@adacore.com>
6353
6354         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in: Update
6355         dependencies. Fix target pairs on darwin.
6356         (gnatlib-sjlj, gnatlib-zcx): Pass THREAD_KIND.
6357
6358 2010-06-18  Pascal Obry  <obry@adacore.com>
6359
6360         * make.adb, prj-nmsc.adb: Fix source filenames casing in debug output.
6361
6362 2010-06-18  Vincent Celier  <celier@adacore.com>
6363
6364         * gnatcmd.adb: For gnatcheck, add -gnatec= switch for a global
6365         configuration pragmas file and, if -U is not used, for a local one.
6366
6367 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6368
6369         * sem_elim.adb (Check_Eliminated): Use full information on entity name
6370         when it is given in the pragma by a selected component.
6371         (Check_For_Eliminated_Subprogram): Do no emit error if within a
6372         instance body that is itself within a generic unit.
6373         * sem_ch12.adb (Analyze_Subprogram_Instance): If the subprogram is
6374         eliminated, mark as well the anonymous subprogram that is its alias
6375         and appears within the wrapper package.
6376
6377 2010-06-18  Bob Duff  <duff@adacore.com>
6378
6379         * g-pehage.ads, g-pehage.adb (Produce): Clean up some of the code.
6380         Raise an exception if the output file cannot be opened. Add comments.
6381
6382 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6383
6384         * sem_cat.adb (Validate_Object_Declaration): A variable declaration is
6385         not illegal per E.2.2(7) if it occurs in the private part of a
6386         Remote_Types unit.
6387
6388 2010-06-18  Arnaud Charlet  <charlet@adacore.com>
6389
6390         * par-ch9.adb, sem_aggr.adb, sem_ch3.adb, layout.adb, sem_ch4.adb,
6391         sem_ch5.adb, sem_mech.adb, exp_util.adb, par-ch10.adb, sem_ch6.adb,
6392         par-ch11.adb, sem_ch7.adb, par-prag.adb, exp_disp.adb, par-ch12.adb,
6393         sem_ch8.adb, style.adb, sem_ch9.adb, sem_ch10.adb, prep.adb,
6394         sem_warn.adb, par-util.adb, scng.adb, sem_eval.adb, checks.adb,
6395         sem_prag.adb, sem_ch12.adb, styleg.adb, sem_ch13.adb, par-ch3.adb,
6396         par-tchk.adb, freeze.adb, sfn_scan.adb, par-ch4.adb, sem_util.adb,
6397         sem_res.adb, par-ch5.adb, lib-xref.adb, sem_attr.adb, par-ch6.adb,
6398         sem_disp.adb, prepcomp.adb, par-ch7.adb, sem_elab.adb, exp_ch4.adb,
6399         errout.ads: Update comments. Minor reformatting.
6400
6401         * g-spipat.adb, a-swunau.adb, a-swunau.ads, g-spitbo.adb,
6402         a-szunau.adb, a-szunau.ads, a-stunau.adb, a-stunau.ads,
6403         a-strunb.adb (Big_String. Big_String_Access): New type.
6404
6405         * par-labl.adb, restrict.adb, s-osinte-hpux-dce.ads, sem_ch11.adb,
6406         exp_pakd.adb, s-filofl.ads, par-endh.adb, exp_intr.adb, sem_cat.adb,
6407         sem_case.adb, exp_ch11.adb, s-osinte-linux.ads: Fix copyright notices.
6408
6409 2010-06-18  Geert Bosch  <bosch@adacore.com>
6410
6411         * i-forbla-darwin.adb: Include -lgnala and -lm in linker options for
6412         Darwin.
6413
6414 2010-06-18  Robert Dewar  <dewar@adacore.com>
6415
6416         * gnat1drv.adb (Adjust_Global_Switches): Set Use_Expression_With_Actions
6417         true for gcc.
6418
6419 2010-06-18  Robert Dewar  <dewar@adacore.com>
6420
6421         * sprint.adb: Minor format change for N_Expression_With_Actions.
6422         * repinfo.adb: Minor reformatting.
6423
6424 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6425
6426         * sem_elim.adb (Check_Eliminated): If within a subunit, use
6427         Defining_Entity to obtain the name of the entity in the proper body, to
6428         properly handle both separate packages and subprograms.
6429
6430 2010-06-18  Emmanuel Briot  <briot@adacore.com>
6431
6432         * prj-nmsc.adb (Check_File): New parameter Display_Path.
6433
6434 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6435
6436         * g-socket.adb, g-socket.ads (Null_Selector): New object.
6437
6438 2010-06-18  Pascal Obry  <obry@adacore.com>
6439
6440         * gnat_ugn.texi: Minor clarification.
6441
6442 2010-06-18  Emmanuel Briot  <briot@adacore.com>
6443
6444         * prj-nmsc.adb (Find_Source_Dirs): Minor refactoring to avoid duplicate
6445         code when using the project dir as the source dir.
6446         (Search_Directories): use the normalized name for the source directory,
6447         where symbolic names have potentially been resolved.
6448
6449 2010-06-18  Robert Dewar  <dewar@adacore.com>
6450
6451         * exp_ch4.adb (Expand_N_Conditional_Expression): Clear Actions field
6452         when we create N_Expression_With_Actions node.
6453         (Expand_Short_Circuit): Ditto.
6454
6455 2010-06-18  Robert Dewar  <dewar@adacore.com>
6456
6457         * exp_util.adb: Minor reformatting.
6458
6459 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6460
6461         * types.ads: Clean up obsolete comments
6462         * tbuild.adb: Minor reformatting.
6463         * exp_ch5.adb, sem_intr.adb, sem_ch10.adb, rtsfind.adb, s-shasto.adb,
6464         exp_strm.adb, aa_drive.adb: Minor reformatting.
6465         * sem_res.adb (Is_Predefined_Operator): An operator that is an imported
6466         intrinsic with an Interface_Name denotes an imported back-end builtin,
6467         and must be rewritten into a call, not left in the tree as an operator,
6468         so return False in that case.
6469
6470 2010-06-18  Eric Botcazou  <ebotcazou@adacore.com>
6471
6472         * exp_util.adb (Remove_Side_Effects): Make a copy for an allocator.
6473         
6474 2010-06-18  Robert Dewar  <dewar@adacore.com>
6475
6476         * scos.ads: Add proposed output for case expression
6477
6478 2010-06-18  Jose Ruiz  <ruiz@adacore.com>
6479
6480         * gnat_ugn.texi: Document that, when using the RTX compiler to generate
6481         RTSS modules, we need to use the Microsoft linker.
6482
6483 2010-06-18  Robert Dewar  <dewar@adacore.com>
6484
6485         * checks.adb (Safe_To_Capture_In_Parameter_Value): Deal with case
6486         expression (cannot count on a particular branch being executed).
6487         * exp_ch4.adb (Expand_N_Case_Expression): New procedure.
6488         * exp_ch4.ads (Expand_N_Case_Expression): New procedure.
6489         * exp_util.adb (Insert_Actions): Deal with proper insertion of actions
6490         within case expression.
6491         * expander.adb (Expand): Add call to Expand_N_Case_Expression
6492         * par-ch4.adb Add calls to P_Case_Expression at appropriate points
6493         (P_Case_Expression): New procedure
6494         (P_Case_Expression_Alternative): New procedure
6495         * par.adb (P_Case_Expression): New procedure
6496         * par_sco.adb (Process_Decisions): Add dummy place holder entry for
6497         N_Case_Expression.
6498         * sem.adb (Analyze): Add call to Analyze_Case_Expression
6499         * sem_case.ads (Analyze_Choices): Also used for case expressions now,
6500         this is a documentation change only.
6501         * sem_ch4.ads, sem_ch4.adb (Analyze_Case_Expression): New procedure.
6502         * sem_ch6.adb (Fully_Conformant_Expressions): Add handling of case
6503         expressions.
6504         * sem_eval.ads, sem_eval.adb (Eval_Case_Expression): New procedure.
6505         * sem_res.adb (Resolve_Case_Expression): New procedure.
6506         * sem_scil.adb (Find_SCIL_Node): Add processing for
6507         N_Case_Expression_Alternative.
6508         * sinfo.ads, sinfo.adb (N_Case_Expression): New node.
6509         (N_Case_Expression_Alternative): New node.
6510         * sprint.adb (Sprint_Node_Actual): Add processing for new nodes
6511         N_Case_Expression and N_Case_Expression_Alternative.
6512
6513 2010-06-18  Robert Dewar  <dewar@adacore.com>
6514
6515         * par-ch7.adb, sem_warn.adb, types.ads, par-ch3.adb: Minor
6516         reformatting.
6517         * gnat1drv.adb: Fix typo.
6518
6519 2010-06-18  Robert Dewar  <dewar@adacore.com>
6520
6521         * par-prag.adb (Prag, case Style_Checks): All_Checks sets gnat style
6522         for -gnatg.
6523         * sem_prag.adb (Analyze_Pragma, case Style_Checks): All_Checks sets
6524         gnat style for -gnatg.
6525         * gnat_rm.texi: Add documentation for ALL_CHECKS in GNAT mode.
6526
6527 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6528
6529         * sem_eval.adb (Test_In_Range): New subprogram, factoring duplicated
6530         code between...
6531         (Is_In_Range, Is_Out_Of_Range): Reimplement in terms of call to
6532         Test_In_Range.
6533
6534 2010-06-18  Robert Dewar  <dewar@adacore.com>
6535
6536         * sprint.adb: Minor change in output format for expression wi actions.
6537         * par-ch3.adb: Minor code reorganization.  Minor reformatting.
6538         * sem_ch5.adb: Minor comment fix.
6539
6540 2010-06-18  Robert Dewar  <dewar@adacore.com>
6541
6542         * debug.adb: New debug flag -gnatd.L to control
6543         Back_End_Handles_Limited_Types.
6544         * exp_ch4.adb (Expand_N_Conditional_Expression): Let back end handle
6545         limited case if Back_End_Handles_Limited_Types is True.
6546         (Expand_N_Conditional_Expression): Use N_Expression_With_Actions to
6547         simplify expansion if Use_Expression_With_Actions is True.
6548         * gnat1drv.adb (Adjust_Global_Switches): Set
6549         Back_End_Handles_Limited_Types.
6550         * opt.ads (Back_End_Handles_Limited_Types): New flag.
6551
6552 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6553
6554         * sem_res.adb (Rewrite_Operator_As_Call): Do not rewrite user-defined
6555         intrinsic operator if expansion is not enabled, because in an
6556         instantiation the original operator must be present to verify the
6557         legality of the operation.
6558
6559 2010-06-18  Robert Dewar  <dewar@adacore.com>
6560
6561         * exp_disp.adb, sem_ch12.adb: Minor reformatting
6562
6563 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6564
6565         * exp_util.adb (Make_Subtype_From_Expr): If the unconstrained type is
6566         the class-wide type for a private extension, and the completion is a
6567         subtype, set the type of the class-wide type to the base type of the
6568         full view.
6569
6570 2010-06-18  Robert Dewar  <dewar@adacore.com>
6571
6572         * g-socket.ads, sem_aggr.adb, einfo.ads, sem_elim.adb,
6573         sem_intr.adb, sem_eval.adb: Minor reformatting
6574
6575 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6576
6577         * sem_type.adb (Is_Ancestor): If either type is private, examine full
6578         view.
6579
6580 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6581
6582         * g-socket.adb, g-socket.ads (Check_Selector): Make Selector an IN
6583         parameter rather than IN OUT.
6584
6585 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6586
6587         * exp_ch6.adb: Add extra guard.
6588
6589 2010-06-18  Gary Dismukes  <dismukes@adacore.com>
6590
6591         * sem_util.adb (Object_Access_Level): For Ada 2005, determine the
6592         accessibility level of a function call from the level of the innermost
6593         enclosing dynamic scope.
6594         (Innermost_Master_Scope_Depth): New function to find the depth of the
6595         nearest dynamic scope enclosing a node.
6596
6597 2010-06-18  Tristan Gingold  <gingold@adacore.com>
6598
6599         * adaint.c: Make ATTR_UNSET static as it is not used outside this file.
6600
6601 2010-06-18  Thomas Quinot  <quinot@adacore.com>
6602
6603         * g-socket.ads: Minor reformatting.
6604
6605 2010-06-18  Vincent Celier  <celier@adacore.com>
6606
6607         * make.adb (Must_Compile): New Boolean global variable
6608         (Main_On_Command_Line): New Boolean global variable
6609         (Collect_Arguments_And_Compile): Do compile if Must_Compile is True,
6610         even when the project is externally built.
6611         (Start_Compile_If_Possible): Compile in -aL directories if
6612         Check_Readonly_Files is True. Do compile if Must_Compile is True, even
6613         when the project is externally built.
6614         (Gnatmake): Set Must_Compile and Check_Readonly_Files to True when
6615         invoked with -f -u and one or several mains on the command line.
6616         (Scan_Make_Arg): Set Main_On_Command_Line to True when at least one
6617         main is specified on the command line.
6618
6619 2010-06-18  Ed Schonberg  <schonberg@adacore.com>
6620
6621         * sem_ch6.adb (Build_Body_For_Inline): Handle
6622         extended_return_statements.
6623         * exp_ch6.adb (Expand_Inlined_Call): when possible, inline a body
6624         containing extented_return statements.
6625         * exp_util.adb (Make_CW_Equivalent_Type): If the root type is already
6626         constrained, do not build subtype declaration.
6627
6628 2010-06-18  Robert Dewar  <dewar@adacore.com>
6629
6630         * sem_res.adb (Analyze_Indexed_Component, Analyze_Selected_Component):
6631         Warn on assigning to packed atomic component.
6632
6633 2010-06-18  Robert Dewar  <dewar@adacore.com>
6634
6635         * sem_util.ads: Minor reformatting
6636         * einfo.ads, einfo.adb: Minor doc clarification (scope of decls in
6637         Expression_With_Actions).
6638         * snames.ads-tmpl: Minor comment fix
6639
6640 2010-06-18  Robert Dewar  <dewar@adacore.com>
6641
6642         * sem_prag.adb (Diagnose_Multiple_Pragmas): New procedure
6643         (Set_Imported): Use Import_Interface_Present to control message output
6644         * sinfo.ads, sinfo.adb (Import_Interface_Present): New flag
6645         * gnat_rm.texi: Document that we can have pragma Import and pragma
6646         Interface for the same subprogram.
6647
6648 2010-06-18  Robert Dewar  <dewar@adacore.com>
6649
6650         * lib-xref.adb (Generate_Reference): Fix bad reference to
6651         Has_Pragma_Unreferenced (clients should always use Has_Unreferenced).
6652
6653 2010-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6654
6655         * gcc-interface/trans.c (set_gnu_expr_location_from_node): New static
6656         function.
6657         (gnat_to_gnu) <N_Expression_With_Actions>: New case.
6658         Use set_gnu_expr_location_from_node to set location information on the
6659         result.
6660
6661 2010-06-17  Arnaud Charlet  <charlet@adacore.com>
6662
6663         * gcc-interface/Make-lang.in: Update dependencies.
6664
6665 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6666
6667         * sem_util.adb (Is_Atomic_Object): Predicate does not apply to
6668         subprograms.
6669
6670 2010-06-17  Robert Dewar  <dewar@adacore.com>
6671
6672         * gnat_rm.texi, gnat_ugn.texi: Clean up documentation on warning and
6673         style check messages.
6674         * sem_res.adb (Resolve_Call): Don't call
6675         Check_For_Eliminated_Subprogram if we are analyzing within a spec
6676         expression.
6677
6678 2010-06-17  Robert Dewar  <dewar@adacore.com>
6679
6680         * debug.adb: Add documentation for debug flags .X and .Y
6681         * exp_ch4.adb (Expand_Short_Circuit_Operator): Use
6682         Use_Expression_With_Actions.
6683         * gnat1drv.adb (Adjust_Global_Switches): Set
6684         Use_Expression_With_Actions.
6685         * opt.ads (Use_Expression_With_Actions): New switch.
6686
6687 2010-06-17  Robert Dewar  <dewar@adacore.com>
6688
6689         * exp_intr.adb: Minor code reorganization (use UI_Max)
6690         * sem_intr.adb: use underlying type to check legality.
6691         * einfo.adb (Known_Static_Esize): False for generic types
6692         (Known_Static_RM_Size): False for generic types
6693         * einfo.ads (Known_Static_Esize): False for generic types
6694         (Known_Static_RM_Size): False for generic types
6695
6696 2010-06-17  Robert Dewar  <dewar@adacore.com>
6697
6698         * exp_ch4.ads: Minor code reorganization (specs in alpha order).
6699
6700 2010-06-17  Robert Dewar  <dewar@adacore.com>
6701
6702         * debug.adb: New debug flag -gnatd.X to use Expression_With_Actions
6703         node when expanding short circuit form with actions present for right
6704         opnd.
6705         * exp_ch4.adb: Minor reformatting
6706         (Expand_Short_Circuit_Operator): Use new Expression_With_Actions node
6707         if right opeand has actions present, and debug flag -gnatd.X is set.
6708         * exp_util.adb (Insert_Actions): Handle case of Expression_With_Actions
6709         node.
6710         * nlists.adb (Prepend_List): New procedure
6711         (Prepend_List_To): New procedure
6712         * nlists.ads (Prepend_List): New procedure
6713         (Prepend_List_To): New procedure
6714         * sem.adb: Add processing for Expression_With_Actions
6715         * sem_ch4.adb (Analyze_Expression_With_Actions): New procedure
6716         * sem_ch4.ads (Analyze_Expression_With_Actions): New procedure
6717         * sem_res.adb: Add processing for Expression_With_Actions.
6718         * sem_scil.adb: Add processing for Expression_With_Actions
6719         * sinfo.ads, sinfo.adb (N_Expression_With_Actions): New node.
6720         * sprint.ads, sprint.adb: Add processing for Expression_With_Actions
6721
6722 2010-06-17  Doug Rupp  <rupp@adacore.com>
6723
6724         * sem_intr.adb (Check_Intrinsic_Operator): Check that the types
6725         involved both have underlying integer types.
6726         * exp_intr.adb (Expand_Binary_Operator) New subprogram to expand a call
6727         to an intrinsic operator when the operand types or sizes are not
6728         identical.
6729         * s-auxdec-vms_64.ads: Revert "+" "-" ops back to Address now that
6730         64/32 Address/Integer works.
6731
6732 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6733
6734         * sem_ch12.adb (Mark_Context): Refine placement of Withed_Body flag, so
6735         that it marks a unit as needed by a spec only if the corresponding
6736         instantiation appears in that spec (and not in the corresponding body).
6737         * sem_elim.adb (Check_Eliminated): If we are within a subunit, the name
6738         in the pragma Eliminate has been parsed as a child unit, but the
6739         current compilation unit is in fact the parent in which the subunit is
6740         embedded.
6741
6742 2010-06-17  Vincent Celier  <celier@adacore.com>
6743
6744         * gnat_rm.texi: Fix typo
6745
6746 2010-06-17  Robert Dewar  <dewar@adacore.com>
6747
6748         * sem_util.adb: Minor reformatting
6749
6750 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6751
6752         * sem.adb (Do_Withed_Unit): if the unit in the with_clause is a generic
6753         instance, the clause now denotes the instance body. Traverse the
6754         corresponding spec because there may be no other dependence that will
6755         force the traversal of its own context.
6756
6757 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6758
6759         * sem_ch10.adb (Is_Ancestor_Unit): Subsidiary to
6760         Install_Limited_Context_Clauses, to determine whether a limited_with in
6761         some parent of the current unit designates some other parent, in which
6762         case the limited_with clause must not be installed.
6763         (In_Context): Refine test.
6764
6765 2010-06-17  Gary Dismukes  <dismukes@adacore.com>
6766
6767         * sem_util.adb (Collect_Primitive_Operations): In the of an untagged
6768         type with a dispatching equality operator that is overridden (for a
6769         tagged full type), don't include the overridden equality in the list of
6770         primitives. The overridden equality is detected by testing for an
6771         Aliased field that references the overriding equality.
6772
6773 2010-06-17  Robert Dewar  <dewar@adacore.com>
6774
6775         * freeze.adb: Minor reformatting.
6776
6777 2010-06-17  Joel Brobecker  <brobecker@adacore.com brobecker>
6778
6779         * gnat_ugn.texi: Add a section introducing gdbserver.
6780
6781 2010-06-17  Thomas Quinot  <quinot@adacore.com>
6782
6783         * sem_res.adb, sem_ch4.adb, s-stoele.adb, par-labl.adb: Minor
6784         reformatting.
6785
6786 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6787
6788         * sem_aggr.adb (Valid_Ancestor_Type): handle properly the case of a
6789         constrained discriminated parent that is a private type.
6790         (Analyze_Record_Aggregate): when collecting inherited discriminants,
6791         handle properly an ancestor type that is a constrained private type.
6792
6793 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6794
6795         * sem_util.adb (Enclosing_Subprogram): If the called subprogram is
6796         protected, use the protected_subprogram_body only if the original
6797         subprogram has not been eliminated.
6798
6799 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6800
6801         * freeze.adb (Freeze_Expression): The designated type of an
6802         access_to_suprogram type can only be frozen if all types in its profile
6803         are fully defined.
6804
6805 2010-06-17  Robert Dewar  <dewar@adacore.com>
6806
6807         * par.adb: Minor comment fix
6808         * sem_aggr.adb, sem_ch3.adb: Minor reformatting
6809
6810 2010-06-17  Doug Rupp  <rupp@adacore.com>
6811
6812         * s-auxdec-vms_64.ads: Revert Integer to Long_Integer change, instead
6813         change Address to Short_Address in functions where both must be the
6814         same size for intrinsics to work.
6815
6816 2010-06-17  Thomas Quinot  <quinot@adacore.com>
6817
6818         * sem_ch4.adb (Analyze_Selected_Component): A selected component may
6819         not denote a (private) component of a protected object.
6820
6821 2010-06-17  Bob Duff  <duff@adacore.com>
6822
6823         * par-labl.adb (Try_Loop): Test whether the label and the goto are in
6824         the same list.
6825
6826 2010-06-17  Joel Brobecker  <brobecker@adacore.com brobecker>
6827
6828         * gnat_ugn.texi: Update the documentation about GDB re: exception
6829         catchpoints.
6830
6831 2010-06-17  Arnaud Charlet  <charlet@adacore.com>
6832
6833         * gnatvsn.ads: Bump to 4.6 version.
6834
6835 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6836
6837         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration): The
6838         designated type of the generated pointer is the type of the original
6839         expression, not that of the function call itself, because the return
6840         type may be an untagged  derived type and the function may be an
6841         inherited operation.
6842
6843 2010-06-17  Robert Dewar  <dewar@adacore.com>
6844
6845         * exp_ch4.adb: Minor reformatting.
6846
6847 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6848
6849         * sinfo.ads, sinfo.adb (Inherited_Discriminant): New flag on
6850         N_Component_Association nodes, to indicate that a component association
6851         of an extension aggregate denotes the value of a discriminant of an
6852         ancestor type that has been constrained by the derivation.
6853         * sem_aggr.adb (Discr_Present): use Inherited_Discriminant to prevent a
6854         double expansion of the aggregate appearing in a context that delays
6855         expansion, to prevent double insertion of discriminant values when the
6856         aggregate is reanalyzed.
6857
6858 2010-06-17  Arnaud Charlet  <charlet@adacore.com>
6859
6860         * exp_ch6.adb (Make_Build_In_Place_Call_In_Allocator): Do not use
6861         Allocator as the Related_Node of Return_Obj_Access in call to
6862         Make_Temporary below as this would create a sort of infinite
6863         "recursion".
6864
6865 2010-06-17  Ben Brosgol  <brosgol@adacore.com>
6866
6867         * gnat_ugn.texi: Update gnatcheck doc.
6868
6869 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6870
6871         * sem_ch3.adb (Build_Incomplete_Type_Declaration): If there is an
6872         incomplete view of the type that is not tagged, and the full type is a
6873         tagged extension, create class_wide type now, and warn that the
6874         incomplete view should be tagged as well.
6875
6876 2010-06-17  Vincent Celier  <celier@adacore.com>
6877
6878         * gnatcmd.adb (Non_VMS_Usage): Do not issue usage for gnat sync.
6879         Update the last line of the usage, indicating what commands do not
6880         accept project file switches.
6881         * vms_conv.adb: Do not issue usage line for GNAT SYNC
6882         * vms_data.ads: Fix errors in the qualifiers /LOGFILE and /MAIN of
6883         GNAT ELIM.
6884         * gnat_ugn.texi: Document the relaxed rules for library directories in
6885         externally built library projects.
6886
6887 2010-06-17  Doug Rupp  <rupp@adacore.com>
6888
6889         * s-auxdec-vms_64.ads: Make boolean and arithmetic operations intrinsic
6890         where possible.
6891         * s-auxdec-vms-alpha.adb: Remove kludges for aforemention.
6892         * gcc-interface/Makefile.in: Update VMS target pairs.
6893
6894 2010-06-17  Vasiliy Fofanov  <fofanov@adacore.com>
6895
6896         * adaint.c: Reorganized in order to avoid use of GetProcessId to stay
6897         compatible with Windows NT 4.0 which doesn't provide this function.
6898
6899 2010-06-17  Vincent Celier  <celier@adacore.com>
6900
6901         * ali-util.adb (Time_Stamp_Mismatch): In Verbose mode, if there is
6902         different timestamps but the checksum is the same, issue a short
6903         message saying so.
6904
6905 2010-06-17  Arnaud Charlet  <charlet@adacore.com>
6906
6907         * s-interr.adb (Finalize): If the Abort_Task signal is set to system,
6908         it means that we cannot reset interrupt handlers since this would
6909         require potentially sending the abort signal to the Server_Task.
6910
6911 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6912
6913         * exp_ch4.adb: expand NOT for VMS types.
6914         * sem_util.adb: Use OpenVMS_On_Target for IS_VMS_Operator.
6915
6916 2010-06-17  Sergey Rybin  <rybin@adacore.com>
6917
6918         * vms_data.ads: Add qualifier for '--no-elim-dispatch' gnatelim option.
6919         * gnat_ugn.texi (gnatelim): add description for --no-elim-dispatch
6920         option.
6921
6922 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6923
6924         * exp_ch6.adb (Expand_Call): Do not expand a call to an internal
6925         protected operation if the subprogram has been eliminated.
6926
6927 2010-06-17  Vincent Celier  <celier@adacore.com>
6928
6929         * prj-nmsc.adb (Check_Library_Attributes): Allow the different
6930         directories associated with a library to be any directory when the
6931         library project is externally built.
6932
6933 2010-06-17  Vincent Celier  <celier@adacore.com>
6934
6935         * make.adb (Check): If switch -m is used, deallocate the memory that
6936         may be allocated when computing the checksum.
6937
6938 2010-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6939
6940         * g-socthi-mingw.adb (C_Recvmsg): Add 'use type' clause for C.size_t;
6941         (C_Sendmsg): Likewise.
6942
6943 2010-06-17  Thomas Quinot  <quinot@adacore.com>
6944
6945         * sem_res.adb: Update comments.
6946
6947 2010-06-17  Vincent Celier  <celier@adacore.com>
6948
6949         * back_end.adb (Scan_Compiler_Arguments): Process last argument
6950
6951 2010-06-17  Robert Dewar  <dewar@adacore.com>
6952
6953         * exp_ch3.adb, exp_ch6.adb, exp_smem.adb, exp_util.adb: Use Ekind_In.
6954         * layout.adb, freeze.adb: Use Make_Temporary.
6955
6956 2010-06-17  Jerome Lambourg  <lambourg@adacore.com>
6957
6958         * exp_ch11.adb (Expand_N_Raise_Statement): Expand raise statements in
6959         .NET/JVM normally as this is now perfectly supported by the backend.
6960
6961 2010-06-17  Pascal Obry  <obry@adacore.com>
6962
6963         * gnat_rm.texi: Fix minor typo, remove duplicate blank lines.
6964
6965 2010-06-17  Vincent Celier  <celier@adacore.com>
6966
6967         * make.adb (Collect_Arguments_And_Compile): Create include path file
6968         only when -x is specified.
6969         (Gnatmake): Ditto
6970         * opt.ads (Use_Include_Path_File): New Boolean flag, initialized to
6971         False.
6972         * prj-env.adb (Set_Ada_Paths): New Boolean parameters Include_Path and
6973         Objects_Path, defaulted to True. Only create include path file if
6974         Include_Path is True, only create objects path file if Objects_Path is
6975         True.
6976         * prj-env.ads (Set_Ada_Paths): New Boolean parameters Include_Path and
6977         Objects_Path, defaulted to True.
6978         * switch-m.adb (Scan_Make_Switches): Set Use_Include_Path_File to True
6979         when -x is used.
6980
6981 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
6982
6983         * exp_disp.adb (Build_Interface_Thunk): Use base type of formal to
6984         determine whether it has the controlling type, when the formal is an
6985         access parameter.
6986
6987 2010-06-17  Eric Botcazou  <ebotcazou@adacore.com>
6988
6989         * s-crtl.ads (ssize_t): New type.
6990         (read): Fix signature.
6991         (write): Likewise.
6992         * g-socthi.ads: Add 'with System.CRTL' clause.  Remove ssize_t and
6993         'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
6994         (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
6995         (C_Sendmsg): Likewise.
6996         * g-socthi.adb (Syscall_Recvmsg): Likewise.
6997         (Syscall_Sendmsg): Likewise.
6998         (C_Recvmsg): Likewise.
6999         (C_Sendmsg): Likewise.
7000         * g-socthi-mingw.ads: Add 'with System.CRTL' clause.  Remove ssize_t
7001         and 'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
7002         (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
7003         (C_Sendmsg): Likewise.
7004         * g-socthi-mingw.adb (C_Recvmsg): Likewise.
7005         (C_Sendmsg): Likewise.
7006         * g-socthi-vms.ads: Add 'with System.CRTL' clause.  Remove ssize_t and
7007         'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
7008         (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
7009         (C_Sendmsg): Likewise.
7010         * g-socthi-vms.adb (C_Recvmsg): Likewise.
7011         (C_Sendmsg): Likewise.
7012         * g-socthi-vxworks.ads Add 'with System.CRTL' clause.  Remove ssize_t
7013         and 'use type' directive for C.size_t, add one for System.CRTL.ssize_t.
7014         (C_Recvmsg): Replace ssize_t with System.CRTL.ssize_t.
7015         (C_Sendmsg): Likewise.
7016         * g-socthi-vxworks.adb (C_Recvmsg): Likewise.
7017         (C_Sendmsg): Likewise.
7018         * g-sercom-linux.adb (Read): Use correct types to call 'read'.
7019         (Write): Likewise to call 'write'.
7020         * s-os_lib.adb (Read): Use correct type to call System.CRTL.read.
7021         (Write): Use correct type to call System.CRTL.write.
7022         * s-tasdeb.adb (Write): Likewise.
7023
7024 2010-06-17  Vincent Celier  <celier@adacore.com>
7025
7026         * prj-proc.adb (Copy_Package_Declarations): Change argument name
7027         Naming_Restricted to Restricted. If Restricted is True, do not copy the
7028         value of attribute Linker_Options.
7029
7030 2010-06-17  Eric Botcazou  <ebotcazou@adacore.com>
7031
7032         * gcc-interface/trans.c (push_stack, pop_stack): Delete.
7033         (Case_Statement_to_gnu): Adjust.
7034         (Loop_Statement_to_gnu): Likewise.
7035         (Subprogram_Body_to_gnu): Likewise.
7036         (Handled_Sequence_Of_Statements_to_gnu): Likewise.
7037         (Compilation_Unit_to_gnu): Likewise.
7038
7039 2010-06-17  Robert Dewar  <dewar@adacore.com>
7040
7041         * exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_pakd.adb, exp_prag.adb,
7042         exp_sel.adb, exp_util.adb, sem_ch10.adb, sem_ch12.adb, sem_ch13.adb,
7043         sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch8.adb, sem_ch9.adb,
7044         sem_dist.adb, sem_util.adb: Use Make_Temporary
7045         * itypes.ads, tbuild.ads: Minor comment update
7046         * exp_ch9.adb, exp_dist.adb: Minor reformatting
7047
7048 2010-06-17  Thomas Quinot  <quinot@adacore.com>
7049
7050         * exp_imgv.adb, exp_ch7.ads: Minor reformatting.
7051
7052 2010-06-17  Robert Dewar  <dewar@adacore.com>
7053
7054         * exp_ch9.adb, exp_disp.adb, exp_dist.adb: Use Make_Temporary.
7055
7056 2010-06-17  Thomas Quinot  <quinot@adacore.com>
7057
7058         * sprint.adb (pg): Set Dump_Freeze_Null, to be consistent with -gnatdg.
7059
7060 2010-06-17  Robert Dewar  <dewar@adacore.com>
7061
7062         * exp_ch6.adb, exp_ch7.adb, exp_ch5.adb: Use Make_Temporary
7063         * tbuild.ads (Make_Temporary): More comment updates
7064         * tbuild.adb: Minor reformatting
7065
7066 2010-06-17  Robert Dewar  <dewar@adacore.com>
7067
7068         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch11.adb,
7069         exp_ch3.adb, exp_ch4.adb: Minor code reorganization.
7070         Use Make_Temporary.
7071         * tbuild.ads, tbuild.adb (Make_Temporary): Clean up, use Entity_Id
7072         instead of Node_Id.
7073         (Make_Temporary): Add more extensive documentation
7074
7075 2010-06-17  Robert Dewar  <dewar@adacore.com>
7076
7077         * sem_intr.adb, sem_prag.adb, sem_res.adb, sem_type.adb, sem_util.adb,
7078         sem_warn.adb, sem_eval.adb: Minor reformatting.  Use Ekind_In.
7079         (Set_Slice_Subtype): Explicitly freeze the slice's itype at the point
7080         where the slice's actions are inserted.
7081         (Decompose_Expr): Account for possible rewriting of slice bounds
7082         resulting from side effects suppression caused by the above freezing,
7083         so that folding of bounds is preserved by such rewriting.
7084
7085 2010-06-17  Robert Dewar  <dewar@adacore.com>
7086
7087         * einfo.ads, einfo.adb (Get_Record_Representation_Clause): New
7088         function.
7089         * freeze.adb (Freeze_Record_Type): Add call to
7090         Check_Record_Representation_Clause.
7091         * sem_ch13.adb (Check_Record_Representation_Clause): New function
7092         (Analyze_Record_Representation_Clause): Split out overlap code into
7093         this new function.
7094         (Check_Component_Overlap): Moved inside
7095         Check_Record_Representation_Clause.
7096         * sem_ch13.ads (Check_Record_Representation_Clause): New function.
7097
7098 2010-06-17  Robert Dewar  <dewar@adacore.com>
7099
7100         * back_end.adb, sem_res.adb, switch-c.adb, sem_scil.adb: Minor
7101         reformatting.
7102         * sem_attr.adb, sem_cat.adb, sem_disp.adb, sem_elab.adb, sem_elim.adb,
7103         sem_eval.adb: Use Ekind_In
7104
7105 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
7106
7107         * sem_ch8.adb: better error message for illegal inherited discriminant
7108
7109 2010-06-17  Vincent Celier  <celier@adacore.com>
7110
7111         * bindusg.adb: Remove lines for -A and -C
7112         * gnat_ugn.texi: Remove all documentation and examples of switches -A
7113         and -C for gnatbind and gnatlink.
7114         * gnatlink.adb (Usage): Remove lines for -A and -C
7115         * switch-b.adb (Scan_Binder_Switches): Issue warning when switch -C is
7116         specified.
7117         * gcc-interface/Make-lang.in: Update dependencies.
7118
7119 2010-06-17  Vincent Celier  <celier@adacore.com>
7120
7121         * back_end.adb (Scan_Compiler_Arguments): Put all arguments in new
7122         local Argument_List variable Args.
7123         * switch-c.adb (Scan_Front_End_Switches): New Argument_List argument
7124         Args.
7125         (Switch_Subsequently_Cancelled): New Argument_List argument Args. Look
7126         for subsequent switches in Args.
7127         * switch-c.ads (Scan_Front_End_Switches): New Argument_List argument
7128         Args.
7129         * gcc-interface/Make-lang.in: Update dependencies.
7130
7131 2010-06-17  Robert Dewar  <dewar@adacore.com>
7132
7133         * einfo.adb: Minor code fix, allow E_Class_Wide_Type for
7134         Equivalent_Type to match documentation.
7135
7136 2010-06-17  Robert Dewar  <dewar@adacore.com>
7137
7138         * sem_ch6.adb, sem_ch7.adb: Minor reformatting.
7139         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_ch10.adb, sem_ch12.adb,
7140         sem_ch4.adb, sem_ch8.adb, sem_ch13.adb: Make use of Ekind_In.
7141
7142 2010-06-17  Thomas Quinot  <quinot@adacore.com>
7143
7144         * sem_res.adb (Set_Slice_Subtype): Always freeze the slice's itype.
7145
7146 2010-06-17  Thomas Quinot  <quinot@adacore.com>
7147
7148         * freeze.adb (Freeze_Expression): Short circuit operators are valid
7149         freeze node insertion points.
7150
7151 2010-06-17  Robert Dewar  <dewar@adacore.com>
7152
7153         * switch-c.ads, switch-c.adb, sem_ch13.adb: Minor reformatting.
7154         * sem_ch12.adb: Add pragmas Assert and Check to previous change.
7155
7156 2010-06-17  Gary Dismukes  <dismukes@adacore.com>
7157
7158         * layout.adb (Layout_Type): Broaden test for setting an array type's
7159         Component_Size to include all scalar types, not just discrete types
7160         (components of real types were missed).
7161         * sem_ch3.adb (Constrain_Index): Add missing setting of First_Literal
7162         on the itype created for an index (consistent with Make_Index and
7163         avoids possible Assert_Failures).
7164
7165 2010-06-17  Robert Dewar  <dewar@adacore.com>
7166
7167         * atree.ads, atree.adb: Add 6-parameter version of Ekind_In
7168         * einfo.adb: Minor code reformatting (use Ekind_In)
7169
7170 2010-06-17  Robert Dewar  <dewar@adacore.com>
7171
7172         * sem_warn.adb (Test_Ref): Abandon scan if access subprogram parameter
7173         found.
7174
7175 2010-06-17  Vincent Celier  <celier@adacore.com>
7176
7177         * back_end.adb: Minor comment updates
7178         * switch-c.adb: Remove dependencies on gcc C sources
7179         * gcc-interface/Make-lang.in: Add a-comlin.o to the object file list
7180         for the compiler.
7181
7182 2010-06-17  Ed Schonberg  <schonberg@adacore.com>
7183
7184         * sem_ch12.adb: propagate Pragma_Enabled flag to generic.
7185         * get_scos.adb: Set C2 flag in decision entry of pragma to 'e'.
7186         * par_sco.ads, par_sco.adb (Set_SCO_Pragma_Enabled): New procedure
7187         Remove use of Node field in SCOs table
7188         (Output_Header): Set 'd' to initially disable pragma entry
7189         * put_scos.adb (Put_SCOs): New flag indicating if pragma is enabled
7190         * scos.ads, scos.adb: Remove Node field from internal SCOs table.
7191         Use C2 field of pragma decision header to indicate enabled.
7192         * sem_prag.adb: Add calls to Set_SCO_Pragma_Enabled.
7193         * gcc-interface/Make-lang.in: Update dependencies.
7194
7195 2010-06-17  Vincent Celier  <celier@adacore.com>
7196
7197         * back_end.adb (Next_Arg): Moved to procedure Scan_Compiler_Arguments
7198         (Scan_Compiler_Arguments): Call Scan_Front_End_Switches with Next_Arg
7199         (Switch_Subsequently_Cancelled): Function moved to the body of Switch.C
7200         * back_end.ads (Scan_Front_End_Switches): Function moved to the body of
7201         Switch.C.
7202         * switch-c.adb: Copied a number of global declarations from
7203         back_end.adb.
7204         (Len_Arg): New function copied from back_end.adb
7205         (Switch_Subsequently_Cancelled): New function moved from back_end.adb
7206         (Scan_Front_End_Switches): New parameter Arg_Rank used to call
7207         Switch_Subsequently_Cancelled.
7208         * switch-c.ads (Scan_Front_End_Switches): New parameter Arg_Rank.
7209         * gcc-interface/Makefile.in: Add line so that shared libgnat is linked
7210         with -lexc on Tru64.
7211
7212 2010-06-17  Robert Dewar  <dewar@adacore.com>
7213
7214         * prj.ads, prj.adb: Minor reformatting
7215
7216 2010-06-17  Thomas Quinot  <quinot@adacore.com>
7217
7218         * put_scos.adb: Do not generate a blank line in SCOs when omitting the
7219         CP line for a disabled pragma.
7220
7221 2010-06-17  Emmanuel Briot  <briot@adacore.com>
7222
7223         * prj-proc.adb, prj.adb, prj.ads (Check_Or_Set_Typed_Variable): New
7224         subprogram.
7225         (Process_Declarative_Item): An invalid value in an typed variable
7226         declaration is no longer always fatal.
7227
7228 2010-06-16  Arnaud Charlet  <charlet@adacore.com>
7229
7230         * get_scos.adb, par_sco.adb, par_sco.ads, put_scos.adb, scos.adb,
7231         scos.ads, exp_ch4.adb, sem_warn.adb: Code clean up, update
7232         documentation.
7233
7234 2010-06-16  Javier Miranda  <miranda@adacore.com>
7235
7236         * exp_disp.adb (Expand_Dispatching_Call): Adjust the decoration of the
7237         node referenced by the SCIL node of dispatching "=" to skip the tags
7238         comparison.
7239
7240 2010-06-16  Ed Schonberg  <schonberg@adacore.com>
7241
7242         * sem_ch5.adb (Analyze_Exit_Statement): Return if no enclosing loop,
7243         to prevent cascaded errors and compilation aborts.
7244
7245 2010-06-16  Robert Dewar  <dewar@adacore.com>
7246
7247         * back_end.adb (Switch_Subsequently_Cancelled): New function
7248         Move declarations to package body level to support this change
7249         * back_end.ads (Switch_Subsequently_Cancelled): New function
7250         * gnat_ugn.texi: Document -gnat-p switch
7251         * switch-c.adb (Scan_Front_End_Switches): Implement -gnat-p switch
7252         * ug_words: Add entry for -gnat-p (UNSUPPRESS_ALL)
7253         * usage.adb: Add line for -gnat-p switch
7254         * vms_data.ads: Add entry for UNSUPPRESS_ALL (-gnat-p)
7255
7256 2010-06-16  Robert Dewar  <dewar@adacore.com>
7257
7258         * sem_warn.adb (Check_Infinite_Loop_Warning): Declaration counts as
7259         modification.
7260
7261 2010-06-16  Robert Dewar  <dewar@adacore.com>
7262
7263         * exp_disp.adb: Minor reformatting
7264
7265 2010-06-16  Ed Schonberg  <schonberg@adacore.com>
7266
7267         * sem_ch3.adb (Complete_Private_Subtype): Inherit class_wide type from
7268         base type only if it was not previously created for the partial view.
7269
7270 2010-06-16  Thomas Quinot  <quinot@adacore.com>
7271
7272         * tbuild.ads: Minor comment fix
7273
7274 2010-06-15  Nathan Froyd  <froydnj@codesourcery.com>
7275
7276         * gcc-interface/trans.c (gnu_stack_free_list): Delete.
7277         (gnu_except_ptr_stack): Change type to VEC.  Update comment.
7278         (gnu_elab_proc_stack): Likewise.
7279         (gnu_return_label_stack): Likewise.
7280         (gnu_loop_label_stack): Likewise.
7281         (gnu_switch_label_stack): Likewise.
7282         (gnu_constraint_label_stack): Likewise.
7283         (gnu_storage_error_label_stack): Likewise.
7284         (gnu_program_error_label_stack): Likewise.
7285         (push_exception_label_stack): Take a VEC ** instead of a tree *.
7286         (push_stack): Likewise.  Remove unused second parameter.  Update
7287         callers.
7288         (pop_stack): Take a VEC * instead of a tree *.  Update callers.
7289         (gigi): Initialize stacks as VECs.
7290         (Identifier_to_gnu): Use VEC_last instead of TREE_VALUE.
7291         (Case_Statement_to_gnu): Likewise.
7292         (Subprogram_Body_to_gnu): Likewise.
7293         (call_to_gnu): Likewise.
7294         (Exception_Handler_to_gnu_sjlj): Likewise.
7295         (gnat_to_gnu): Likewise.
7296         (get_exception_label): Likewise.
7297
7298 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7299
7300         * sem_ch3.adb (Build_Derived_Record_Type): if derived type is an
7301         anonymous base generated when the parent is a constrained discriminated
7302         type, propagate interface list to first subtype because it may appear
7303         in a current instance within the extension part of the derived type
7304         declaration, and its own subtype declaration has not been elaborated
7305         yet.
7306         * exp_disp.adb (Build_Interface_Thunk): Use base type of formal to
7307         determine whether it has the controlling type.
7308
7309 2010-06-14  Jerome Lambourg  <lambourg@adacore.com>
7310
7311         * exp_ch11.adb (Expand_N_Raise_Statement): Make sure that the explicit
7312         raise of CE, SE and PE have the reason correctly set and are properly
7313         expanded before stopping the expansions of .NET/JVM exceptions.
7314
7315 2010-06-14  Robert Dewar  <dewar@adacore.com>
7316
7317         * opt.ads (Check_Policy_List): Add some clarifying comments
7318         * sem_prag.adb (Analyze_Pragma, case Check): Set Pragma_Enabled flag
7319         on rewritten Assert pragma.
7320
7321 2010-06-14  Gary Dismukes  <dismukes@adacore.com>
7322
7323         * sem_ch6.adb (Check_Overriding_Indicator): Add a special check for
7324         controlled operations, so that they will be treated as overriding even
7325         if the overridden subprogram is marked Is_Hidden, as long as the
7326         overridden subprogram's parent subprogram is not hidden.
7327
7328 2010-06-14  Robert Dewar  <dewar@adacore.com>
7329
7330         * debug.adb: Entry for gnatw.d no longer specific for while loops
7331         * einfo.adb (First_Exit_Statement): New attribute for E_Loop
7332         * einfo.ads (First_Exit_Statement): New attribute for E_Loop
7333         * sem_ch5.adb (Analyze_Loop_Statement): Check_Infinite_Loop_Warning has
7334         new calling sequence to include test for EXIT WHEN.
7335         (Analyze_Exit_Statement): Chain EXIT statement into exit statement
7336         chain
7337         * sem_warn.ads, sem_warn.adb (Check_Infinite_Loop_Warning): Now handles
7338         EXIT WHEN case.
7339         * sinfo.adb (Next_Exit_Statement): New attribute of N_Exit_Statement
7340         node.
7341         * sinfo.ads (N_Pragma): Correct comment on Sloc field (points to
7342         PRAGMA, not to pragma identifier).
7343         (Next_Exit_Statement): New attribute of N_Exit_Statement node
7344
7345 2010-06-14  Robert Dewar  <dewar@adacore.com>
7346
7347         * sem_res.adb (Resolve_Short_Circuit): Fix sloc of "assertion/check
7348         would fail" msg.
7349
7350 2010-06-14  Robert Dewar  <dewar@adacore.com>
7351
7352         * par-ch2.adb (Scan_Pragma_Argument_Association): Clarify message for
7353         missing pragma argument identifier.
7354
7355 2010-06-14  Robert Dewar  <dewar@adacore.com>
7356
7357         * atree.ads, atree.adb (Ekind_In): New functions.
7358
7359 2010-06-14  Robert Dewar  <dewar@adacore.com>
7360
7361         * exp_ch4.adb (Expand_N_Op_Expon): Optimize 2**N in stand alone context
7362
7363 2010-06-14  Robert Dewar  <dewar@adacore.com>
7364
7365         * usage.adb (Usage): Redo documentation of -gnatwa.
7366
7367 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7368
7369         * sem_ch8.adb (Find_Type): The attribute 'class cannot be applied to
7370         an untagged incomplete type that is a limited view.
7371
7372 2010-06-14  Sergey Rybin  <rybin@adacore.com>
7373
7374         * gnat_ugn.texi: Add description of '-cargs gcc_switches' to gnatstub
7375         and gnatppa.
7376
7377 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7378
7379         * exp_ch4.adb (Expand_Short_Circuit_Operator): New subprogram,
7380         factoring duplicated code between...
7381         (Expand_N_And_Than, Expand_N_Or_Else): Remove duplicated code.
7382         * a-envvar.ads: Minor reformatting
7383
7384 2010-06-14  Arnaud Charlet  <charlet@adacore.com>
7385
7386         * ali.adb, ali.ads, lib-xref.ads: Document new '+' letter for C/C++
7387         static entities.
7388         (Scan_ALI): Take into account new Visibility field.
7389         (Visibility_Kind): New type.
7390         (Xref_Entity_Record): Replace Lib field by Visibility.
7391
7392         * gcc-interface/Make-lang.in: Update dependencies.
7393
7394 2010-06-14  Pascal Obry  <obry@adacore.com>
7395
7396         * raise.h: Remove unused defintions.
7397
7398 2010-06-14  Bob Duff  <duff@adacore.com>
7399
7400         * par-ch10.adb (P_Subunit): If the next token after "separate(X)" is
7401         Tok_Not or Tok_Overriding, call P_Subprogram. We had previously given
7402         the incorrect error "proper body expected".
7403         * par-ch6.adb (P_Subprogram): Suppress "overriding indicator not
7404         allowed here" error in case of subunits, which was triggered by the
7405         above change to P_Subunit.
7406
7407 2010-06-14  Sergey Rybin  <rybin@adacore.com>
7408
7409         * gnat_ugn.texi, vms_data.ads: Update gnatelim doc.
7410
7411 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7412
7413         * lib-util.adb: Minor code reorganization.
7414
7415 2010-06-14  Robert Dewar  <dewar@adacore.com>
7416
7417         * ali.adb (Scan_ALI): Implement reading and storing of N lines
7418         (Known_ALI_Lines): Add entry for 'N' (notes)
7419         * ali.ads (Notes): New table to store Notes information
7420         * alloc.ads: Add entries for Notes table
7421         * lib-util.adb (Write_Info_Int): New procedure
7422         (Write_Info_Slit): New procedure
7423         (Write_Info_Uint): New procedure
7424         * lib-util.ads (Write_Info_Int): New procedure
7425         (Write_Info_Slit): New procedure
7426         (Write_Info_Uint): New procedure
7427         * lib-writ.adb (Write_Unit_Information): Output N (notes) lines
7428         * lib-writ.ads: Update documentation for N (Notes) lines
7429         * lib.adb (Store_Note): New procedure
7430         * lib.ads (Notes): New table
7431         (Store_Note): New procedure
7432         * sem_prag.adb: Call Store_Note for affected pragmas
7433
7434 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7435
7436         * socket.c: Fix wrong condition in #ifdef
7437         * g-socket.adb, g-sothco.ads: Functions imported from socket.c that
7438         take or return char* values can't use Interfaces.C.Strings.chars_ptr,
7439         because on VMS this type is a 32-bit pointer which is not compatible
7440         with the default for C pointers for code compiled with gcc on that
7441         platform.
7442
7443 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7444
7445         * sem_util (Is_VMS_Operator): New predicate to determine whether an
7446         operator is an intrinsic operator declared in the DEC system extension.
7447         * sem_res.adb (Resolve_Logical_Op): operation is legal on signed types
7448         if the operator is a VMS intrinsic.
7449         * sem_eval.adb (Eval_Logical_Op): Operation is legal and be
7450         constant-folded if the operands are signed and the operator is a VMS
7451         intrinsic.
7452
7453 2010-06-14  Robert Dewar  <dewar@adacore.com>
7454
7455         * g-socket.adb, gnatcmd.adb: Minor reformatting.
7456
7457 2010-06-14  Pascal Obry  <obry@adacore.com>
7458
7459         * s-finimp.adb: Fix typo.
7460         * raise.h: Remove duplicate blank line.
7461
7462 2010-06-14  Vincent Celier  <celier@adacore.com>
7463
7464         * prj-nmsc.adb (Add_Sources): Always set the object file and the
7465         switches file names, as the configuration of the language may change
7466         in an extending project.
7467         (Process_Naming_Scheme): For sources of projects that are extended, set
7468         the configuration of the language from the highest extending project
7469         where the language is declared.
7470
7471 2010-06-14  Gary Dismukes  <dismukes@adacore.com>
7472
7473         * sem_res.adb (Resolve_Call): For infinite recursion check, test
7474         whether the called subprogram is inherited from a containing
7475         subprogram.
7476         (Same_Or_Aliased_Subprograms): New function
7477
7478 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7479
7480         * sem_ch8.adb (End_Use_Type): Before indicating that an operator is not
7481         use-visible, check whether it is a primitive for more than one type.
7482
7483 2010-06-14  Robert Dewar  <dewar@adacore.com>
7484
7485         * sem_ch3.adb (Copy_And_Swap): Copy Has_Pragma_Unmodified flag.
7486
7487         * sem_ch7.adb (Preserve_Full_Attributes): Preserve
7488         Has_Pragma_Unmodified flag.
7489
7490 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7491
7492         * g-sttsne-locking.adb, g-sttsne-locking.ads, g-sttsne.ads,
7493         g-sttsne-vxworks.adb, g-sttsne-dummy.ads: Removed. Mutual exclusion is
7494         now done in GNAT.Sockets if necessary.
7495         * gsocket.h, g-socket.adb, g-sothco.ads (GNAT.Sockets.Get_XXX_By_YYY):
7496         Ensure mutual exclusion for netdb operations if the target platform
7497         requires it.
7498         (GNAT.Sockets.Thin_Common): New binding for getXXXbyYYY, treating
7499         struct hostent as an opaque type to improve portability.
7500         * s-oscons-tmplt.c, socket.c: For the case of Vxworks, emulate
7501         gethostbyYYY using proprietary VxWorks API so that a uniform interface
7502         is available for the Ada side.
7503         * gcc-interface/Makefile.in: Remove g-sttsne-*
7504         * gcc-interface/Make-lang.in: Update dependencies.
7505
7506 2010-06-14  Vincent Celier  <celier@adacore.com>
7507
7508         * gnatcmd.adb (Mapping_File): New function.
7509
7510 2010-06-14  Javier Miranda  <miranda@adacore.com>
7511
7512         * sem_ch3.adb (Derive_Subprograms): Remove over-restrictive assertion.
7513
7514 2010-06-14  Arnaud Charlet  <charlet@adacore.com>
7515
7516         * ali.adb: Fix typo.
7517         * s-auxdec-vms-alpha.adb, scng.ads: Minor reformatting.
7518
7519 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7520
7521         * sem_ch12.adb: Make Mark_Context transitive, and apply to subprogram
7522         instances.
7523
7524         * sem_ch8.adb (Find_Expanded_Name): If a candidate compilation unit in
7525         the context does not have a homonym of the selector, emit default
7526         error message.
7527
7528 2010-06-14  Robert Dewar  <dewar@adacore.com>
7529
7530         * sem.adb, sem_ch12.adb, sem_util.adb: Minor reformatting and
7531         comment addition.
7532
7533 2010-06-14  Arnaud Charlet  <charlet@adacore.com>
7534
7535         * lib-xref.ads: Doc updates:
7536          - Allocate 'Q' for #include entity kind
7537          - Free 'Z'
7538          - Allocate 'g' for regular macros
7539          - Allocate 'G' for function-like macros
7540
7541 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7542
7543         * sinfo.ads, sinfo.adb (Withed_Body): New attribute of a with_clause.
7544         Indicates that there is an instantiation in the current unit that
7545         loaded the body of the unit denoted by the with_clause.
7546         * sem_ch12.adb (Mark_Context): When instanting a generic body, check
7547         whether a with_clause in the current context denotes the unit that
7548         holds the generic declaration, and mark the with_clause accordingly.
7549         (Instantiate_Package_Body): call Mark_Context.
7550         * sem.adb (Process_Bodies_In_Context): Use Withed_Body to determine
7551         whether a given body should be traversed before the spec of the main
7552         unit.
7553
7554 2010-06-14  Ed Falis  <falis@adacore.com>
7555
7556         * sysdep.c: Fix 653 build against vThreads headers.
7557
7558 2010-06-14  Robert Dewar  <dewar@adacore.com>
7559
7560         * sinfo.ads: Minor reformatting.
7561
7562 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7563
7564         * sem_ch6.adb (Analyze_Subprogram_Body): Do not check conformance when
7565         the spec has been generated for a body without spec that carries an
7566         Inline_Always pragma.
7567
7568 2010-06-14  Arnaud Charlet  <charlet@adacore.com>
7569
7570         * lib-xref.ads: Documentation change: allocate 'Z' letter to C/C++
7571         macro.
7572
7573 2010-06-14  Jerome Lambourg  <lambourg@adacore.com>
7574
7575         * exp_dbug.adb (Debug_Renaming_Declaration): Do not output any debug
7576         declaration for VMs, as those are useless and might lead to duplicated
7577         local variable names in the generated code.
7578         * gcc-interface/Make-lang.in: Update dependencies.
7579
7580 2010-06-14  Robert Dewar  <dewar@adacore.com>
7581
7582         * opt.ads, sem.adb, sem_elab.adb: Minor reformatting
7583
7584 2010-06-14  Robert Dewar  <dewar@adacore.com>
7585
7586         * exp_aggr.adb (Has_Address_Clause): Moved to Exp_Util, and there it
7587         is renamed as Has_Following_Address_Clause.
7588         * exp_ch3.adb (Needs_Simple_Initialization): Add Consider_IS argument
7589         to allow the caller to avoid Initialize_Scalars having an effect.
7590         (Expand_N_Object_Declaration): Do not do Initialize_Scalars stuff for
7591         scalars with an address clause specified.
7592         * exp_ch3.ads (Needs_Simple_Initialization): Add Consider_IS argument
7593         to allow the caller to avoid Initialize_Scalars having an effect.
7594         * exp_util.adb (Has_Following_Address_Clause): Moved here from Exp_Aggr
7595         (where it was called Has_Address_Clause).
7596         * exp_util.ads (Has_Following_Address_Clause): Moved here from Exp_Aggr
7597         (where it was called Has_Address_Clause).
7598         * freeze.adb (Warn_Overlay): Suppress message about overlaying causing
7599         problems for Initialize_Scalars (since we no longer initialize objects
7600         with an address clause.
7601
7602 2010-06-14  Robert Dewar  <dewar@adacore.com>
7603
7604         * exp_prag.adb (Expand_Pragma_Check): Set Loc of generated code from
7605         condition.
7606
7607 2010-06-14  Gary Dismukes  <dismukes@adacore.com>
7608
7609         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Debug_Info_Needed
7610         on the entity of an implicitly generated postcondition procedure.
7611
7612 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7613
7614         * sem_ch7.adb (Preserve_Full_Attributes): Propagate
7615         Discriminant_Constraint elist from full view to private view.
7616
7617 2010-06-14  Robert Dewar  <dewar@adacore.com>
7618
7619         * sem_res.adb: Minor reformatting.
7620
7621 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7622
7623         * sem.adb: New version of unit traversal.
7624
7625         * sem_elab.adb (Check_Internal_Call): Do not place a call appearing
7626         within a generic unit in the table of delayed calls.
7627
7628 2010-06-14  Robert Dewar  <dewar@adacore.com>
7629
7630         * gnatcmd.adb, sem_util.adb, exp_ch3.adb: Minor reformatting
7631
7632 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7633
7634         * sem_ch12.adb (Save_References): If an identifier has been rewritten
7635         during analysis as an explicit dereference, keep the reference implicit
7636         in the generic, but preserve the entity if global. This prevents
7637         malformed generic trees in the presence of some nested generics.
7638
7639 2010-06-14  Sergey Rybin  <rybin@adacore.com>
7640
7641         * gnat_ugn.texi: For the GNAT driver, clarify the effect of calling the
7642         tool with '-files=' option. Also fix some small errors (wrong brackets)
7643
7644 2010-06-14  Vincent Celier  <celier@adacore.com>
7645
7646         * gnatbind.adb: Call Scan_ALI with Directly_Scanned set to True for all
7647         the ALI files on the command line.
7648
7649         * ali.adb (Scan_ALI): Set component Directly_Scanned of the unit(s) to
7650         the same value as the parameter of the same name.
7651         * ali.ads (Scan_ALI): New Boolean parameter Directly_Scanned, defaulted
7652         to False.
7653         * bindgen.adb (Gen_Versions_Ada): Never emit version symbols for
7654         Stand-Alone Library interfaces. When binding Stand-Alone Libraries,
7655         emit version symbols only for the units of the library.
7656         (Gen_Versions_C): Ditto.
7657
7658 2010-06-14  Gary Dismukes  <dismukes@adacore.com>
7659
7660         * sem_ch4.adb: Fix typo.
7661
7662 2010-06-14  Vasiliy Fofanov  <fofanov@adacore.com>
7663
7664         * s-oscons-tmplt.c (IOV_MAX): redefine on Tru64 and VMS since the
7665         vector IO doesn't work at default value properly.
7666
7667 2010-06-14  Doug Rupp  <rupp@adacore.com>
7668
7669         * s-stoele.adb: Remove unnecessary qualification of To_Address for VMS.
7670
7671 2010-06-14  Vincent Celier  <celier@adacore.com>
7672
7673         * gnatcmd.adb (Check_Files): Do not invoke the tool with all the
7674         sources of the project if a switch -files= is used.
7675
7676 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7677
7678         * exp_attr.adb: Minor reformatting.
7679
7680 2010-06-14  Gary Dismukes  <dismukes@adacore.com>
7681
7682         * gnat_ugn.texi: Minor typo fixes and wording changes.
7683
7684 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7685
7686         * sem_ch4.adb (Analyze_One_Call): If the call has been rewritten from a
7687         prefixed form, do not re-analyze first actual, which may need an
7688         implicit dereference.
7689         * sem_ch6.adb (Analyze_Procedure_Call): If the call is given in
7690         prefixed notation, the analysis will rewrite the node, and possible
7691         errors appear in the rewritten name of the node.
7692         * sem_res.adb: If a call is ambiguous because its first parameter is
7693         an overloaded call, report list of candidates, to clarify ambiguity of
7694         enclosing call.
7695
7696 2010-06-14  Doug Rupp  <rupp@adacore.com>
7697
7698         * s-auxdec-vms-alpha.adb: New package body implementing legacy
7699         VAX instructions with Asm insertions.
7700         * s-auxdec-vms_64.ads: Inline VAX queue functions
7701         * s-stoele.adb: Resolve some ambiguities in To_Addresss with s-suxdec
7702         that show up only on VMS.
7703         * gcc-interface/Makefile.in: Provide translation for
7704         s-auxdec-vms-alpha.adb.
7705
7706 2010-06-14  Olivier Hainque  <hainque@adacore.com>
7707
7708         * initialize.c (VxWorks section): Update comments.
7709
7710 2010-06-14  Robert Dewar  <dewar@adacore.com>
7711
7712         * a-convec.adb, sem_prag.adb, checks.adb: Minor reformatting.
7713
7714 2010-06-14  Eric Botcazou  <ebotcazou@adacore.com>
7715
7716         * init.c: Code clean up.
7717
7718 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7719
7720         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Address): Do
7721         not insert address clause in table for later validation if type of
7722         entity is generic, to prevent possible spurious errors. 
7723
7724         * sem_ch8.adb: Code clean up.
7725
7726 2010-06-14  Ben Brosgol  <brosgol@adacore.com>
7727
7728         * gnat_ugn.texi: Expanded @ovar macro inline to solve problem with
7729         texi2pdf and texi2html.
7730         Document how to change scheduling properties on HP-UX.
7731
7732 2010-06-14  Thomas Quinot  <quinot@adacore.com>
7733
7734         * g-socket.ads: Remove misleading comments.
7735
7736 2010-06-14  Jerome Lambourg  <lambourg@adacore.com>
7737
7738         * sem_prag.adb (Check_Duplicated_Export_Name): Remove check for
7739         CLI_Target as this prevents proper detection of exported names
7740         duplicates when the exported language is different to CIL.
7741         (Process_Interface_Name): Add check for CIL convention exports,
7742         replacing the old one from Check_Duplicated_Export_Name.
7743
7744 2010-06-14  Matthew Heaney  <heaney@adacore.com>
7745
7746         * a-coinve.adb, a-convec.adb (operator "&"): Check both that new length
7747         and new last satisfy constraints.
7748         (Delete_Last): prevent overflow for subtraction of index values
7749         (To_Vector): prevent overflow for addition of index values
7750
7751 2010-06-14  Ed Schonberg  <schonberg@adacore.com>
7752
7753         * sem_ch4.adb (Complete_Object_Operation): After analyzing the
7754         rewritten call, preserve the resulting type to prevent spurious errors,
7755         when the call is implicitly dereferenced in the context of an in-out
7756         actual.
7757
7758         * checks.adb (Apply_Discriminant_Check): If the target of the
7759         assignment is a renaming of a heap object, create constrained type for
7760         it to apply check.
7761
7762 2010-06-14  Pascal Obry  <obry@adacore.com>
7763
7764         * prj-proc.adb: Fix copy of object directory for extending projects.
7765
7766 2010-06-14  Jose Ruiz  <ruiz@adacore.com>
7767
7768         * init.c (__gnat_alternate_stack): Define this space for PowerPC linux
7769         (__gnat_install_handler, PowerPC linux): Activate the alternative
7770         signal stack.
7771
7772 2010-06-13  Gerald Pfeifer  <gerald@pfeifer.com>
7773
7774         * gnat_rm.texi: Move to GFDL version 1.3.
7775         * gnat-style.texi: Ditto.
7776         * gnat_ugn.texi: Ditto.
7777
7778 2010-06-12  Kai Tietz  <kai.tietz@onevision.com>
7779
7780         PR ada/43731
7781         * gcc-interface/Makefile.in: Add rules for multilib x86/x64
7782         mingw targets.
7783
7784 2010-06-11  Alexandre Oliva  <aoliva@redhat.com>
7785
7786         * gcc-interface/utils.c (update_pointer_to): Initialize last.
7787
7788 2010-06-09  Eric Botcazou  <ebotcazou@adacore.com>
7789
7790         * gcc-interface/ada-tree.h: Fix formatting nits.
7791
7792 2010-06-08  Laurynas Biveinis  <laurynas.biveinis@gmail.com>
7793
7794         * gcc-interface/utils.c (init_gnat_to_gnu): Use typed GC
7795         allocation.
7796         (init_dummy_type): Likewise.
7797         (gnat_pushlevel): Likewise.
7798
7799         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7800         (Subprogram_Body_to_gnu): Likewise.
7801         (Compilation_Unit_to_gnu): Likewise.
7802         (start_stmt_group): Likewise.
7803         (extract_encoding): Likewise.
7804         (decode_name): Likewise.
7805
7806         * gcc-interface/misc.c (gnat_printable_name): Likewise.
7807
7808         * gcc-interface/decl.c (annotate_value): Likewise.
7809
7810         * gcc-interface/ada-tree.h (struct lang_type): Add variable_size
7811         GTY option.
7812         (struct lang_decl): Likewise.
7813         (SET_TYPE_LANG_SPECIFIC): Use typed GC allocation.
7814         (SET_DECL_LANG_SPECIFIC): Likewise.
7815
7816 2010-06-04  Eric Botcazou  <ebotcazou@adacore.com>
7817
7818         * gnatlink.adb (gnatlink): Remove support for -fsjlj switch.
7819         * gcc-interface/lang-specs.h: Likewise.
7820
7821 2010-06-03  H.J. Lu  <hongjiu.lu@intel.com>
7822
7823         PR c++/44294
7824         * gcc-interface/decl.c (MAX_FIXED_MODE_SIZE): Removed.
7825
7826 2010-06-01  Arnaud Charlet  <charlet@adacore.com>
7827
7828         * gnat_ugn.texi: Improve doc on -fdump-ada-spec, mention limitations.
7829
7830 2010-05-30  Eric Botcazou  <ebotcazou@adacore.com>
7831
7832         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Task_Type>: Reuse the
7833         TYPE_DECL of the equivalent type instead of building a new one.
7834
7835 2010-05-30  Eric Botcazou  <ebotcazou@adacore.com>
7836
7837         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust warning message.
7838         Fix nits in comments.
7839         * gcc-interface/misc.c (gnat_init_gcc_eh): Likewise.
7840         * gcc-interface/trans.c (gigi): Likewise.
7841         (Attribute_to_gnu): Likewise.
7842         (Case_Statement_to_gnu): Likewise.
7843         (gnat_to_gnu): Adjust warning message.
7844         * gcc-interface/utils.c (create_var_decl_1): Fix nits in comments.
7845         (build_vms_descriptor32): Likewise.
7846
7847 2010-05-27  Steven Bosscher  <steven@gcc.gnu.org>
7848
7849         * gcc-interface/decl.c: Pretend to be a backend file by undefining
7850         IN_GCC_FRONTEND (still need rtl.h here).
7851
7852 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
7853
7854         * gcc-interface/trans.c: Do not include rtl.h, insclude libfuncs.h.
7855         (gigi): Adjust call to set_stack_check_libfunc.
7856
7857 2010-05-26  Steven Bosscher  <steven@gcc.gnu.org>
7858
7859         * gcc-interface/utils.c: Do not include rtl.h.
7860
7861 2010-05-25  Steven Bosscher  <steven@gcc.gnu.org>
7862
7863         * gcc-interface/utils.c: Do not include function.h, pointer-set.h,
7864         and gimple.h.  Explain why rtl.h has to be included.
7865         (handle_vector_size_attribute): Call reconstruct_complex_type directly.
7866         * gcc-interface/targtyps.c: Do not include tm_p.h
7867         * gcc-interface/utils2.c: Do not include flags.h.
7868         * gcc-interface/trans.c: Do not include expr.h.  Include rtl.h instead,
7869         and explain why it has to be included.
7870         * gcc-interface/misc.c: Do not include expr.h, libfuncs.h, cgraph.h,
7871         and optabs.h.
7872         Include function.h and explain why.  Explain why except.h is included.
7873         (enumerate_modes): Remove unused function. 
7874         * gcc-interface/gigi.h (enumerate_modes): Remove prototype.
7875         * gcc-interface/Make-lang.in: Update dependencies.
7876
7877 2010-05-25  Joseph Myers  <joseph@codesourcery.com>
7878
7879         * gcc-interface/misc.c (internal_error_function): Add context
7880         parameter.  Use it to access show_column flag and instead of using
7881         global_dc.  Call warn_if_plugins.
7882         * gcc-interface/Make-lang.in (ada/misc.o): Update dependencies.
7883
7884 2010-05-19  Eric Botcazou  <ebotcazou@adacore.com>
7885
7886         * gcc-interface/misc.c (LANG_HOOKS_DEEP_UNSHARING): Redefine.
7887         * gcc-interface/trans.c (unshare_save_expr): Delete.
7888         (gigi): Do not unshare trees under SAVE_EXPRs here.
7889
7890 2010-05-18  Nathan Froyd  <froydnj@codesourcery.com>
7891
7892         * gcc-interface/trans.c (call_to_gnu): Use build_call_vec instead of
7893         build_call_list.
7894         * gcc-interface/utils.c (build_function_stub): Likewise.
7895
7896 2010-05-16  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7897
7898         * gcc-interface/misc.c (gnat_handle_option): Remove special logic
7899         for Wuninitialized without -O.
7900         
7901 2010-05-16  Eric Botcazou  <ebotcazou@adacore.com>
7902
7903         * gcc-interface/gigi.h (enum standard_datatypes): Add new value
7904         ADT_exception_data_name_id.
7905         (exception_data_name_id): New define.
7906         * gcc-interface/trans.c (gigi): Initialize it.
7907         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use the standard
7908         exception type for standard exception definitions.  Do not make them
7909         volatile.
7910         <E_Record_Type>: Equate fields of types associated with an exception
7911         definition to those of the standard exception type.
7912
7913 2010-05-13  Andreas Schwab  <schwab@linux-m68k.org>
7914
7915         * tracebak.c (__gnat_backtrace): Mark top_stack with ATTRIBUTE_UNUSED.
7916
7917 2010-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7918
7919         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Access_Type>: Tidy up
7920         code, improve comments and fix formatting nits.
7921
7922 2010-05-12  Eric Botcazou  <ebotcazou@adacore.com>
7923
7924         * gcc-interface/utils.c (update_pointer_to): Return early if the old
7925         pointer already points to the new type.  Chain the old pointer and its
7926         variants at the end of new pointer's chain after updating them.
7927
7928 2010-05-10  Eric Botcazou  <ebotcazou@adacore.com>
7929
7930         * exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables
7931         built for interfaces.
7932         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Use
7933         imported_p instead of Is_Imported when considering constants.
7934         Do not promote alignment of exported objects.
7935         <E_Record_Subtype>: Strip all suffixes for dispatch table entities.
7936
7937 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
7938
7939         * exp_disp.adb (Make_Tags): Mark the imported view of dispatch tables.
7940         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Variable>: Make imported
7941         constants really constant.
7942         <E_Record_Subtype>: Strip the suffix for dispatch table entities.
7943
7944 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
7945
7946         * gcc-interface/decl.c (make_aligning_type): Declare the type.
7947
7948 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
7949
7950         * gcc-interface/decl.c (gnat_to_gnu_entity): Create variables for size
7951         expressions of variant part of record types declared at library level.
7952
7953 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
7954
7955         * gcc-interface/gigi.h (create_field_decl): Move PACKED parameter.
7956         * gcc-interface/utils.c (create_field_decl): Move PACKED parameter.
7957         (rest_of_record_type_compilation): Adjust call to create_field_decl.
7958         (make_descriptor_field): Likewise and pass correctly typed constants.
7959         (build_unc_object_type): Likewise.
7960         (unchecked_convert): Likewise.
7961         * gcc-interface/decl.c (elaborate_expression_2): New static function.
7962         (gnat_to_gnu_entity): Use it to make alignment factors explicit.
7963         Adjust call to create_field_decl.
7964         (make_aligning_type): Likewise.
7965         (make_packable_type): Likewise.
7966         (maybe_pad_type): Likewise.
7967         (gnat_to_gnu_field): Likewise.
7968         (components_to_record): Likewise.
7969         (create_field_decl_from): Likewise.
7970         (create_variant_part_from): Remove superfluous test.
7971         * gcc-interface/trans.c (gigi): Adjust call to create_field_decl.
7972
7973 2010-05-08  Eric Botcazou  <ebotcazou@adacore.com>
7974
7975         * gcc-interface/gigi.h (build_unc_object_type): Add DEBUG_INFO_P param.
7976         (build_unc_object_type_from_ptr): Likewise.
7977         * gcc-interface/utils.c (build_unc_object_type): Add DEBUG_INFO_P param
7978         and pass it to create_type_decl.  Declare the type.  Simplify.
7979         (build_unc_object_type_from_ptr): Add DEBUG_INFO_P parameter and pass
7980         it to build_unc_object_type.
7981         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust to above change.
7982         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7983         (gnat_to_gnu): Likewise.
7984         * gcc-interface/utils2.c (build_allocator): Likewise.
7985
7986 2010-05-07  Eric Botcazou  <ebotcazou@adacore.com>
7987
7988         PR 40989
7989         * gcc-interface/misc.c (gnat_handle_option): Fix long line.
7990
7991 2010-05-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7992
7993         * gcc-interface/Makefile.in: Removed mips-sgi-irix5* support.
7994
7995 2010-05-06  Manuel López-Ibáñez  <manu@gcc.gnu.org>
7996
7997         PR 40989
7998         * gcc-interface/misc.c (gnat_handle_option): Add argument kind.
7999
8000 2010-05-02  Giuseppe Scrivano  <gscrivano@gnu.org>
8001
8002         * gnathtml.pl: Use 755 as mask for new directories.
8003
8004 2010-04-28  Eric Botcazou  <ebotcazou@adacore.com>
8005
8006         * gcc-interface/trans.c (gnat_gimplify_expr) <ADDR_EXPR>: Uniquize
8007         constant constructors before taking their address.
8008
8009 2010-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8010
8011         * exp_dbug.ads: Fix outdated description.  Mention link between XVS
8012         and XVZ objects.
8013         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: Set
8014         XVZ variable as unit size of XVS type.
8015         (maybe_pad_type): Likewise.
8016
8017 2010-04-25  Eric Botcazou  <ebotcazou@adacore.com>
8018
8019         * gcc-interface/trans.c (gnat_to_gnu) <N_Assignment_Statement>: Do not
8020         use memmove if the array type is bit-packed.
8021
8022 2010-04-18  Eric Botcazou  <ebotcazou@adacore.com>
8023
8024         * gcc-interface/misc.c (gnat_init): Remove second argument in call to
8025         build_common_tree_nodes.
8026
8027 2010-04-18  Ozkan Sezer  <sezeroz@gmail.com>
8028
8029         * gsocket.h: Make sure that winsock2.h is included before windows.h.
8030
8031 2010-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8032
8033         * gcc-interface/utils2.c (build_unary_op) <ATTR_ADDR_EXPR>: Do not
8034         issue warning.
8035
8036 2010-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8037
8038         * uintp.h (UI_Lt): Declare.
8039         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Do the size
8040         computation in sizetype.
8041         <E_Array_Subtype>: Use unified handling for all index types.  Do not
8042         generate MAX_EXPR-based expressions, only COND_EXPR-based ones.  Add
8043         bypass for PATs.
8044         (annotate_value): Change test for negative values.
8045         (validate_size): Apply test for negative values on GNAT nodes.
8046         (set_rm_size): Likewise.
8047         * gcc-interface/misc.c (gnat_init): Set unsigned types for sizetypes.
8048         * gcc-interface/utils.c (rest_of_record_type_compilation): Change test
8049         for negative values.
8050         (max_size) <MINUS_EXPR>: Do not reassociate a COND_EXPR on the LHS.
8051         (builtin_type_for_size): Adjust definition of signed_size_type_node.
8052         * gcc-interface/utils2.c (compare_arrays): Optimize comparison of
8053         lengths against zero.
8054
8055 2010-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8056
8057         * back-end.adb (Call_Back_End): Pass Standard_Character to gigi.
8058         * gcc-interface/gigi.h (gigi): Add standard_character parameter.
8059         (CHAR_TYPE_SIZE, SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, 
8060         LONG_LONG_TYPE_SIZE, FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE,
8061         LONG_DOUBLE_TYPE_SIZE, SIZE_TYPE): Delete.
8062         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Call
8063         rm_size.
8064         * gcc-interface/misc.c (gnat_init): Set signedness of char as per
8065         flag_signed_char.  Tag sizetype with "size_type" moniker.
8066         * gcc-interface/trans.c (gigi): Add standard_character parameter.
8067         Remove useless built-in types.  Equate unsigned_char_type_node to
8068         Standard.Character.  Use it instead of char_type_node throughout.
8069         (Attribute_to_gnu): Likewise.
8070         (gnat_to_gnu): Likewise.
8071         * gcc-interface/utils2.c (build_call_raise): Likewise.
8072
8073 2010-04-17  Eric Botcazou  <ebotcazou@adacore.com>
8074
8075         * gcc-interface/gigi.h (enum standard_datatypes): Add new values
8076         ADT_sbitsize_one_node and ADT_sbitsize_unit_node.
8077         (sbitsize_one_node): New macro.
8078         (sbitsize_unit_node): Likewise.
8079         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Fix
8080         latent bug in the computation of subrange_p.  Fold wider_p predicate.
8081         (cannot_be_superflat_p): Use an explicitly signed 64-bit type to do
8082         the final comparison.
8083         (make_aligning_type): Build real negation and use sizetype throughout
8084         the offset computation.
8085         (maybe_pad_type): Do not issue the warning when the new size expression
8086         is too complex.
8087         (annotate_value) <INTEGER_CST>: Simplify code handling negative values.
8088         * gcc-interface/misc.c (gnat_init): Initialize sbitsize_one_node and
8089         sbitsize_unit_node.
8090         * gcc-interface/trans.c (Attribute_to_gnu) <Attr_Pool_Address>: Fold
8091         double negation.
8092         (gnat_to_gnu) <N_Free_Statement>: Likewise.
8093         * gcc-interface/utils.c (convert): Use sbitsize_unit_node.
8094         * gcc-interface/utils2.c (compare_arrays): Compute real lengths and use
8095         constants in sizetype.  Remove dead code and tweak comments.  Generate
8096         equality instead of inequality comparisons for zero length tests.
8097
8098 2010-04-16  Eric Botcazou  <ebotcazou@adacore.com>
8099
8100         * gcc-interface/gigi.h (gnat_init_decl_processing): Delete.
8101         * gcc-interface/decl.c (gnat_to_gnu_entity): Constify a few variables.
8102         <object>: Do not create the fake PARM_DECL if no debug info is needed.
8103         Do not create the corresponding VAR_DECL of a CONST_DECL for debugging
8104         purposes if no debug info is needed.
8105         Fix formatting.  Reorder and add comments.
8106         * gcc-interface/trans.c (gnat_to_gnu) <N_Attribute_Reference>: Constify
8107         variable and remove obsolete comment.
8108         * gcc-interface/utils.c (convert_vms_descriptor64): Tweak comment.
8109         (convert_vms_descriptor32): Likewise.
8110         (convert): Remove dead code.
8111         <UNCONSTRAINED_ARRAY_REF>: Pass the field instead of its name to build
8112         the reference to the P_ARRAY pointer.
8113         <POINTER_TYPE>: Likewise.
8114         (maybe_unconstrained_array) <UNCONSTRAINED_ARRAY_TYPE>: Likewise.
8115         (gnat_init_decl_processing): Delete, move contents to...
8116         * gcc-interface/misc.c (gnat_init): ...here.
8117
8118 2010-04-16  Eric Botcazou  <ebotcazou@adacore.com>
8119
8120         * gcc-interface/trans.c (unchecked_conversion_nop): Handle function
8121         calls.  Return true for conversion from a record subtype to its type.
8122
8123 2010-04-16  Eric Botcazou  <ebotcazou@adacore.com>
8124
8125         * gcc-interface/decl.c (gnat_to_gnu_entity): Use boolean_type_node in
8126         lieu of integer_type_node for boolean operations.
8127         (choices_to_gnu): Likewise.
8128         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
8129         (Loop_Statement_to_gnu): Likewise.
8130         (establish_gnat_vms_condition_handler): Likewise.
8131         (Exception_Handler_to_gnu_sjlj): Likewise.
8132         (gnat_to_gnu): Likewise.
8133         (build_unary_op_trapv): Likewise.
8134         (build_binary_op_trapv): Likewise.
8135         (emit_range_check): Likewise.
8136         (emit_index_check): Likewise.
8137         (convert_with_check): Likewise.
8138         * gcc-interface/utils.c (convert_vms_descriptor64): Likewise.
8139         (convert_vms_descriptor32): Likewise.
8140         (convert_vms_descriptor): Likewise.
8141         * gcc-interface/utils2.c (nonbinary_modular_operation): Likewise.
8142         (compare_arrays): Use boolean instead of integer constants.
8143         (build_binary_op) <TRUTH_ANDIF_EXPR, TRUTH_ORIF_EXPR, TRUTH_AND_EXPR,
8144         TRUTH_OR_EXPR, TRUTH_XOR_EXPR>: New case.  Check that the result type
8145         is a boolean type.
8146         <GE_EXPR, LE_EXPR, GT_EXPR, LT_EXPR>: Remove obsolete assertion.
8147         <EQ_EXPR, NE_EXPR>: Check that the result type is a boolean type.
8148         <PREINC/PREDECREMENT_EXPR, POSTINC/POSTDECREMENT_EXPR>: Delete.
8149         <TRUTH_NOT_EXPR>: Check that the result type is a boolean type.
8150         (build_unary_op): Use boolean_type_node in lieu of integer_type_node
8151         for boolean operations.
8152         (fill_vms_descriptor): Likewise.  Fix formatting nits.
8153
8154 2010-04-16  Eric Botcazou  <ebotcazou@adacore.com>
8155
8156         * gcc-interface/ada-tree.def (LOOP_STMT): Change to 4-operand nodes.
8157         * gcc-interface/ada-tree.h (LOOP_STMT_TOP_COND, LOOP_STMT_BOT_COND):
8158         Merge into...
8159         (LOOP_STMT_COND): ...this.
8160         (LOOP_STMT_BOTTOM_COND_P): New flag.
8161         (LOOP_STMT_TOP_UPDATE_P): Likewise.
8162         * gcc-interface/trans.c (can_equal_min_or_max_val_p): New function.
8163         (can_equal_min_val_p): New static inline function.
8164         (can_equal_max_val_p): Likewise.
8165         (Loop_Statement_to_gnu): Use build4 in lieu of build5 and adjust to
8166         new LOOP_STMT semantics.  Use two different strategies depending on
8167         whether optimization is enabled to translate the loop.
8168         (gnat_gimplify_stmt) <LOOP_STMT>: Adjust to new LOOP_STMT semantics.
8169
8170 2010-04-16  Eric Botcazou  <ebotcazou@adacore.com>
8171
8172         * uintp.adb (UI_From_Dint): Remove useless code.
8173         (UI_From_Int): Likewise.
8174         * uintp.h: Reorder declarations.
8175         (UI_From_gnu): Declare.
8176         (UI_Base): Likewise.
8177         (Vector_Template): Likewise.
8178         (Vector_To_Uint): Likewise.
8179         (Uint_0): Remove.
8180         (Uint_1): Likewise.
8181         * gcc-interface/gigi.h: Tweak comments.
8182         * gcc-interface/cuintp.c (UI_From_gnu): New global function.
8183         * gcc-interface/decl.c (maybe_pad_type): Do not warn if either size
8184         overflows.
8185         (annotate_value) <INTEGER_CST>: Call UI_From_gnu.
8186         * gcc-interface/trans.c (post_error_ne_num): Call post_error_ne.
8187         (post_error_ne_tree): Call UI_From_gnu and post_error_ne.
8188         * gcc-interface/utils.c (max_size) <tcc_binary>: Do not special-case
8189         TYPE_MAX_VALUE.
8190
8191 2010-04-16  Eric Botcazou  <ebotcazou@adacore.com>
8192
8193         * gcc-interface/decl.c (make_type_from_size) <INTEGER_TYPE>: Just copy
8194         TYPE_NAME.
8195         * gcc-interface/trans.c (smaller_packable_type_p): Rename into...
8196         (smaller_form_type_p): ...this.  Change parameter and variable names.
8197         (call_to_gnu): Use the nominal type of the parameter to create the
8198         temporary if it's a smaller form of the actual type.
8199         (addressable_p): Return false if the actual type is integral and its
8200         size is greater than that of the expected type.
8201
8202 2010-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8203
8204         * gcc-interface/cuintp.c (UI_To_gnu): Fix long line.
8205         * gcc-interface/gigi.h (MARK_VISITED): Skip objects of constant class.
8206         (process_attributes): Delete.
8207         (post_error_ne_num): Change parameter name.
8208         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not force debug info
8209         with -g3.  Remove a couple of obsolete lines.  Minor tweaks.
8210         If type annotating mode, operate on trees to compute the adjustment to
8211         the sizes of tagged types.  Fix long line.
8212         (cannot_be_superflat_p): Tweak head comment.
8213         (annotate_value): Fold local constant.
8214         (set_rm_size): Fix long line.
8215         * gcc-interface/trans.c (Identifier_to_gnu): Rework comments.
8216         (Attribute_to_gnu): Fix long line.
8217         <Attr_Size>: Remove useless assertion.
8218         Reorder statements.  Use size_binop routine.
8219         (Loop_Statement_to_gnu): Use build5 in lieu of build_nt.
8220         Create local variables for the label and the test.  Tweak comments.
8221         (Subprogram_Body_to_gnu): Reset cfun to NULL.
8222         (Compilation_Unit_to_gnu): Use the Sloc of the Unit node.
8223         (process_inlined_subprograms): Integrate into...
8224         (Compilation_Unit_to_gnu): ...this.
8225         (gnat_to_gnu): Fix long line.
8226         (post_error_ne_num): Change parameter name.
8227         * gcc-interface/utils.c (process_attributes): Static-ify.
8228         <ATTR_MACHINE_ATTRIBUTE>: Set input_location before proceeding.
8229         (create_type_decl): Add comment.
8230         (create_var_decl_1): Process the attributes after adding the VAR_DECL
8231         to the current binding level.
8232         (create_subprog_decl): Likewise for the FUNCTION_DECL.
8233         (end_subprog_body): Do not reset cfun to NULL.
8234         (build_vms_descriptor32): Fix long line.
8235         (build_vms_descriptor): Likewise.
8236         (handle_nonnull_attribute): Likewise.
8237         (convert_vms_descriptor64): Likewise.
8238         * gcc-interface/utils2.c (fill_vms_descriptor): Fix long line.
8239         (gnat_protect_expr): Fix thinko.
8240
8241 2010-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8242
8243         * gcc-interface/trans.c (gigi): Set DECL_IGNORED_P on EH functions.
8244         (gnat_to_gnu) <N_Op_Eq>: Restore the value of input_location
8245         before translating the top-level node.
8246         (lvalue_required_p) <N_Function_Call>: Return 1 if !constant.
8247         <N_Object_Declaration>: Likewise.
8248         <N_Assignment_Statement>: Likewise.
8249         <N_Unchecked_Type_Conversion>: Likewise.
8250         (call_to_gnu): Remove kludge.
8251         (gnat_to_gnu) <N_Return_Statement>: When not optimizing, force labels
8252         associated with user returns to be preserved.
8253         (gnat_to_gnu): Add special code to deal with boolean rvalues.
8254         * gcc-interface/utils2.c (compare_arrays): Set input_location on all
8255         comparisons.
8256         (build_unary_op) <ADDR_EXPR>: Call build_fold_addr_expr.
8257         <INDIRECT_REF>: Call build_fold_indirect_ref.
8258
8259 2010-04-15  Joel Sherrill  <joel.sherrill@oarcorp.com>
8260
8261         * g-socket.adb: A target can have multiple missing errno's.  This
8262         will result in multiple errno's being defined as -1.  Because of this
8263         we can not use a case but must use a series of if's to avoid 
8264         a duplicate case error in GNAT.Sockets.Resolve_Error.
8265
8266 2010-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8267
8268         * gcc-interface/trans.c (call_to_gnu): Open a nesting level if this is
8269         a statement.  Otherwise, if at top-level, push the processing of the
8270         elaboration routine.  In the misaligned case, issue the error messages
8271         again on entry and create the temporary explicitly.  Do not issue them
8272         for CONSTRUCTORs.
8273         For a function call, emit the range check if necessary.
8274         In the copy-in copy-out case, create the temporary for the return
8275         value explicitly.
8276         Do not unnecessarily convert by-ref parameters to the formal's type.
8277         Remove obsolete guards in conditions.
8278         (gnat_to_gnu) <N_Assignment_Statement>: For a function call, pass the
8279         target to call_to_gnu in all cases.
8280         (gnat_gimplify_expr) <ADDR_EXPR>: Remove handling of SAVE_EXPR.
8281         (addressable_p) <CONSTRUCTOR>: Return false if not static.
8282         <COMPOUND_EXPR>: New case.
8283         * gcc-interface/utils2.c (build_unary_op) <ADDR_EXPR>: Fold a compound
8284         expression if it has unconstrained array type.
8285         (gnat_mark_addressable) <COMPOUND_EXPR>: New case.
8286         (gnat_stabilize_reference) <COMPOUND_EXPR>: Stabilize operands on an
8287         individual basis.
8288
8289 2010-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8290
8291         * gcc-interface/trans.c (gigi): Do not start statement group.
8292         (Compilation_Unit_to_gnu): Set current_function_decl to NULL.
8293         Start statement group and push binding level here...
8294         (gnat_to_gnu) <N_Compilation_Unit>: ...and not here.
8295         Do not push fake contexts at top level.  Remove redundant code.
8296         (call_to_gnu): Rename a local variable and constify another.
8297         * gcc-interface/utils.c (gnat_pushlevel): Fix formatting nits.
8298         (set_current_block_context): Set it as the group's block.
8299         (gnat_init_decl_processing): Delete unrelated init code.
8300         (end_subprog_body): Use NULL_TREE.
8301
8302 2010-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8303
8304         * gcc-interface/trans.c (call_to_gnu): Do not unnecessarily force
8305         side-effects of actual parameters before the call.
8306
8307 2010-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8308
8309         * gcc-interface/decl.c (validate_size): Reorder, remove obsolete test
8310         and warning.
8311         (set_rm_size): Reorder and remove obsolete test.
8312
8313 2010-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8314
8315         * gcc-interface/gigi.h: Reorder declarations and tweak comments.
8316         (gigi): Adjust ATTRIBUTE_UNUSED markers.
8317         * gcc-interface/gadaint.h: New file.
8318         * gcc-interface/trans.c: Include it in lieu of adaint.h.  Reorder.
8319         (__gnat_to_canonical_file_spec): Remove declaration.
8320         (number_names): Delete.
8321         (number_files): Likewise.
8322         (gigi): Adjust.
8323         * gcc-interface/Make-lang.in (ada/trans.o): Adjust dependencies to
8324         above change.
8325
8326 2010-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8327
8328         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Class_Wide_Type>: Fix
8329         comment.
8330         * gcc-interface/trans.c (process_freeze_entity): Use local copy of
8331         Ekind.  Return early for class-wide types.  Do not compute initializer
8332         unless necessary.  Reuse the tree for an associated class-wide type
8333         only if processing its root type.
8334
8335 2010-04-13  Joel Sherrill  <joel.sherrill@oarcorp.com>
8336
8337         * gsocket.h: Run-time can no longer be built without network
8338         OS headers available.  Changing RTEMS GNAT build procedure to
8339         reflect this and letting run-time build use network .h files.
8340
8341 2010-04-13  Duncan Sands  <baldrick@free.fr>
8342
8343         * gcc-interface/misc.c (gnat_eh_type_covers): Remove.
8344         * gcc-interface/trans.c (Exception_Handler_to_gnu_zcx): Update comment.
8345
8346 2010-04-13  Eric Botcazou  <ebotcazou@adacore.com>
8347
8348         * gcc-interface/gigi.h (standard_datatypes): Add ADT_parent_name_id.
8349         (parent_name_id): New macro.
8350         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Record_Type>: Use it.
8351         * gcc-interface/trans.c (gigi): Initialize it.
8352         (lvalue_required_p) <N_Type_Conversion>: New case.
8353         <N_Qualified_Expression>: Likewise.
8354         <N_Allocator>: Likewise.
8355         * gcc-interface/utils.c (convert): Try to properly upcast tagged types.
8356
8357 2010-04-13  Eric Botcazou  <ebotcazou@adacore.com>
8358
8359         * gcc-interface/ada-tree.h (TYPE_BY_REFERENCE_P): Delete.
8360         (DECL_CONST_ADDRESS_P): New macro.
8361         (SET_DECL_ORIGINAL_FIELD_TO_FIELD): Likewise.
8362         (SAME_FIELD_P): Likewise.
8363         * gcc-interface/decl.c (constructor_address_p): New static function.
8364         (gnat_to_gnu_entity) <object>: Set DECL_CONST_ADDRESS_P according to
8365         the return value of above function.
8366         (gnat_to_gnu_entity) <E_Record_Type>: Force BLKmode for all types
8367         passed by reference.
8368         <E_Record_Subtype>: Likewise.
8369         Set TREE_ADDRESSABLE on the type if it passed by reference.
8370         (make_packable_type): Use SET_DECL_ORIGINAL_FIELD_TO_FIELD.
8371         (create_field_decl_from): Likewise.
8372         (substitute_in_type): Likewise.
8373         (purpose_member_field): Use SAME_FIELD_P.
8374         * gcc-interface/misc.c (must_pass_by_ref): Test TREE_ADDRESSABLE.
8375         * gcc-interface/trans.c (lvalue_required_p): Add ADDRESS_OF_CONSTANT
8376         parameter and adjust recursive calls.
8377         <N_Explicit_Dereference>: New case.
8378         <N_Object_Declaration>: Return 1 if the object is of a class-wide type.
8379         Adjust calls to lvalue_required_p.  Do not return the initializer of a
8380         DECL_CONST_ADDRESS_P constant if an lvalue is required for it.
8381         (call_to_gnu): Delay issuing error message for a misaligned actual and
8382         avoid the associated back-end assertion.  Test TREE_ADDRESSABLE.
8383         (gnat_gimplify_expr) <ADDR_EXPR>: Handle non-static constructors.
8384         * gcc-interface/utils.c (make_dummy_type): Set TREE_ADDRESSABLE if the
8385         type is passed by reference.
8386         (convert) <CONSTRUCTOR>: Convert in-place in more cases.
8387         * gcc-interface/utils2.c (build_cond_expr): Drop TYPE_BY_REFERENCE_P.
8388         (build_simple_component_ref): Use SAME_FIELD_P.
8389
8390 2010-04-12  Eric Botcazou  <ebotcazou@adacore.com>
8391
8392         * gcc-interface/trans.c (Identifier_to_gnu): Use boolean variable.
8393         (call_to_gnu): Test gigi's flag TYPE_BY_REFERENCE_P instead of calling
8394         front-end's predicate Is_By_Reference_Type.  Use consistent order and
8395         remove ??? comment.  Use original conversion in all cases, if any.
8396         * gcc-interface/utils.c (make_dummy_type): Minor tweak.
8397         (convert): Use local copy in more cases.
8398         <INDIRECT_REF>: Remove deactivated code.
8399         (unchecked_convert): Use a couple of local copies.
8400
8401 2010-04-11  Eric Botcazou  <ebotcazou@adacore.com>
8402
8403         * gcc-interface/trans.c (lvalue_required_for_attribute_p): New static
8404         function.
8405         (lvalue_required_p) <N_Attribute_Reference>: Call it.
8406         (gnat_to_gnu) <N_Selected_Component>: Prevent build_component_ref from
8407         folding the result only if lvalue_required_for_attribute_p is true.
8408         * gcc-interface/utils.c (maybe_unconstrained_array): Pass correctly
8409         typed constant to build_component_ref.
8410         (unchecked_convert): Likewise.
8411         * gcc-interface/utils2.c (maybe_wrap_malloc): Likewise.
8412         (build_allocator): Likewise.
8413
8414 2010-04-11  Eric Botcazou  <ebotcazou@adacore.com>
8415
8416         * gcc-interface/utils2.c (build_cond_expr): Take the address and
8417         dereference if the result type is passed by reference.
8418
8419 2010-04-11  Eric Botcazou  <ebotcazou@adacore.com>
8420
8421         * gcc-interface/trans.c (Case_Statement_to_gnu): Bool-ify variable.
8422         (gnat_to_gnu) <N_Null_Statement>: When not optimizing, generate a
8423         goto to the next statement.
8424
8425 2010-04-09  Eric Botcazou  <ebotcazou@adacore.com>
8426
8427         * gcc-interface/gigi.h (maybe_variable): Delete.
8428         (protect_multiple_eval): Likewise.
8429         (maybe_stabilize_reference): Likewise.
8430         (gnat_save_expr): Declare.
8431         (gnat_protect_expr): Likewise.
8432         (gnat_stabilize_reference): Likewise.
8433         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Use
8434         gnat_stabilize_reference.
8435         (maybe_variable): Delete.
8436         (elaborate_expression_1): Use gnat_save_expr.
8437         * gcc-interface/trans.c (Attribute_to_gnu): Use gnat_protect_expr.
8438         (call_to_gnu): Pass NULL to gnat_stabilize_reference.
8439         (gnat_to_gnu) <N_Object_Declaration>: Use gnat_save_expr.
8440         <N_Slice>: Use gnat_protect_exp.
8441         <N_Selected_Component>: Pass NULL to gnat_stabilize_reference.
8442         <N_In>: Use gnat_protect_expr.
8443         Pass NULL to gnat_stabilize_reference.
8444         (build_unary_op_trapv): Use gnat_protect_expr.
8445         (build_binary_op_trapv): Likewise.
8446         (emit_range_check): Likewise.
8447         (emit_index_check): Likewise.
8448         (convert_with_check): Likewise.
8449         (protect_multiple_eval): Move to utils2.c file.
8450         (maybe_stabilize_reference): Merge into...
8451         (gnat_stabilize_reference): ...this.  Move to utils2.c file.
8452         (gnat_stabilize_reference_1): Likewise.
8453         * gcc-interface/utils.c (convert_to_fat_pointer): Use gnat_protect_expr
8454         instead of protect_multiple_eval.
8455         * gcc-interface/utils2.c (compare_arrays): Likewise.
8456         (nonbinary_modular_operation): Likewise.
8457         (maybe_wrap_malloc): Likewise.
8458         (build_allocator): Likewise.
8459         (gnat_save_expr): New function.
8460         (gnat_protect_expr): Rename from protect_multiple_eval.  Early return
8461         in common cases.  Propagate TREE_READONLY onto dereferences.
8462         (gnat_stabilize_reference_1): Move from trans.c file.
8463         (gnat_stabilize_reference): Likewise.
8464
8465 2010-04-09  Eric Botcazou  <ebotcazou@adacore.com>
8466
8467         * gcc-interface/gigi.h (gnat_mark_addressable): Rename parameter.
8468         * gcc-interface/decl.c (maybe_variable): Do not set TREE_STATIC on _REF
8469         node.  Use the type of the operand to set TREE_READONLY.
8470         * gcc-interface/trans.c (Identifier_to_gnu): Do not set TREE_STATIC on
8471         _REF node.  Do not overwrite TREE_READONLY.
8472         (call_to_gnu): Rename local variable and fix various nits.  In the
8473         copy-in/copy-out case, build the SAVE_EXPR manually.
8474         (convert_with_check): Call protect_multiple_eval in lieu of save_expr
8475         and fold the computations.
8476         (protect_multiple_eval): Always save entire fat pointers.
8477         (maybe_stabilize_reference): Minor tweaks.
8478         (gnat_stabilize_reference_1): Likewise.  Do not deal with tcc_constant,
8479         tcc_type and tcc_statement.
8480         * gcc-interface/utils.c (convert_to_fat_pointer): Call
8481         protect_multiple_eval in lieu of save_expr.
8482         (convert): Minor tweaks.
8483         (maybe_unconstrained_array): Do not set TREE_STATIC on _REF node.
8484         (builtin_type_for_size): Call gnat_type_for_size directly.
8485         * gcc-interface/utils2.c (contains_save_expr_p): Delete.
8486         (contains_null_expr): Likewise
8487         (gnat_build_constructor): Do not call it.
8488         (compare_arrays): Deal with all side-effects, use protect_multiple_eval
8489         instead of gnat_stabilize_reference to protect the operands.
8490         (nonbinary_modular_operation): Call protect_multiple_eval in lieu of
8491         save_expr.
8492         (maybe_wrap_malloc): Likewise.
8493         (build_allocator): Likewise.
8494         (build_unary_op) <INDIRECT_REF>: Do not set TREE_STATIC on _REF node.
8495         (gnat_mark_addressable): Rename parameter.
8496
8497 2010-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8498
8499         * gcc-interface/ada-tree.h (TYPE_RETURNS_UNCONSTRAINED_P): Rename into.
8500         (TYPE_RETURN_UNCONSTRAINED_P): ...this.
8501         (TYPE_RETURNS_BY_REF_P): Rename into.
8502         (TYPE_RETURN_BY_DIRECT_REF_P): ...this.
8503         (TYPE_RETURNS_BY_TARGET_PTR_P): Delete.
8504         * gcc-interface/gigi.h (create_subprog_type): Adjust parameter names.
8505         (build_return_expr): Likewise.
8506         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>:
8507         Rename local variables.  If the return Mechanism is By_Reference, pass
8508         return_by_invisible_ref_p to create_subprog_type instead of toggling
8509         TREE_ADDRESSABLE.  Test return_by_invisible_ref_p in order to annotate
8510         the mechanism.  Use regular return for contrained types with non-static
8511         size and return by invisible reference for unconstrained return types
8512         with default discriminants.  Update comment.
8513         * gcc-interface/trans.c (Subprogram_Body_to_gnu): If the function
8514         returns by invisible reference, turn the RESULT_DECL into a pointer.
8515         Do not handle DECL_BY_REF_P in the CICO case here.
8516         (call_to_gnu): Remove code handling return by target pointer.  For a
8517         function call, if the return type has non-constant size, generate the
8518         assignment with an INIT_EXPR.
8519         (gnat_to_gnu) <N_Return_Statement>: Remove dead code in the CICO case.
8520         If the function returns by invisible reference, build the copy return
8521         operation manually.
8522         (add_decl_expr): Initialize the variable with an INIT_EXPR.
8523         * gcc-interface/utils.c (create_subprog_type): Adjust parameter names.
8524         Adjust for renaming of macros.  Copy the node only when necessary.
8525         (create_subprog_decl): Do not toggle TREE_ADDRESSABLE on the return
8526         type, only change DECL_BY_REFERENCE on the RETURN_DECL.
8527         (convert_from_reference): Delete.
8528         (is_byref_result): Likewise.
8529         (gnat_genericize_r): Likewise.
8530         (gnat_genericize): Likewise.
8531         (end_subprog_body): Do not call gnat_genericize.
8532         * gcc-interface/utils2.c (build_binary_op) <INIT_EXPR>: New case.
8533         (build_return_expr): Adjust parameter names, logic and comment.
8534
8535 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
8536
8537         * exp_pakd.adb (Create_Packed_Array_Type): Always use a modular type
8538         if the size is small enough.  Propagate the alignment if there is an
8539         alignment clause on the original array type.
8540         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>
8541         Deal with under-aligned packed array types.  Copy the size onto the
8542         justified modular type and don't lay it out again.  Likewise for the
8543         padding type built for other under-aligned subtypes.
8544         * gcc-interface/utils.c (finish_record_type): Do not set a default mode
8545         on the type.
8546
8547 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
8548
8549         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Procedure>: Set default
8550         alignment on the RETURN type built for the Copy-In Copy-Out mechanism.
8551
8552 2010-04-07  Eric Botcazou  <ebotcazou@adacore.com>
8553
8554         * gcc-interface/trans.c (call_to_gnu): In the return-by-target-ptr case
8555         do not set the result type if there is a specified target and do not
8556         convert the result in any cases.
8557         (protect_multiple_eval): Make direct SAVE_EXPR for CALL_EXPR.
8558         (maybe_stabilize_reference) <COMPOUND_EXPR>: Merge with CALL_EXPR.
8559
8560 2010-03-10  Eric Botcazou  <ebotcazou@adacore.com>
8561
8562         * gcc-interface/Makefile.in (SPARC/Solaris): Use sparcv8plus.
8563
8564 2010-02-27  Eric Botcazou  <ebotcazou@adacore.com>
8565
8566         PR ada/42253
8567         * gcc-interface/utils2.c (build_binary_op) <EQ_EXPR>: Assert that fat
8568         pointer base types are variant of each other.  Apply special treatment
8569         for null to fat pointer types in all cases.
8570
8571 2010-01-28  Pascal Obry  <obry@adacore.com>
8572
8573         * s-win32.ads: Add some missing constants.
8574
8575 2010-01-28  Vincent Celier  <celier@adacore.com>
8576
8577         * prj-attr-pm.adb (Add_Attribute): Do nothing if To_Package is
8578         Unknown_Package.
8579
8580 2010-01-28  Robert Dewar  <dewar@adacore.com>
8581
8582         * gnat_rm.texi: Minor correction
8583
8584 2010-01-27  Pascal Obry  <obry@adacore.com>
8585
8586         * g-awk.adb: ensure that an AWK session is reusable.
8587
8588 2010-01-27  Vasiliy Fofanov  <fofanov@adacore.com>
8589
8590         * g-regist.adb (For_Every_Key): Fix previous change.
8591         Minor reformatting.
8592
8593 2010-01-27  Thomas Quinot  <quinot@adacore.com>
8594
8595         * lib-writ.ads: Current version of spec for new N (note) ALI lines
8596
8597 2010-01-27  Yannick Moy  <moy@adacore.com>
8598
8599         * a-cdlili.adb (Insert): Correct exception message when cursor
8600         designates wrong list.
8601
8602 2010-01-27  Vincent Celier  <celier@adacore.com>
8603
8604         * gnatcmd.adb: When there is only one main specified, the package
8605         support Switches (<main>) and attribute Switches is specified for the
8606         main, use these switches, instead of Default_Switches ("Ada").
8607
8608 2010-01-27  Robert Dewar  <dewar@adacore.com>
8609
8610         * sem_prag.adb, par-prag.adb, snames.ads-tmpl: pragma Dimension initial
8611         implementation.
8612         * exp_disp.adb: Minor reformatting
8613
8614 2010-01-27  Tristan Gingold  <gingold@adacore.com>
8615
8616         * seh_init.c: Use __ImageBase instead of _ImageBase.
8617
8618 2010-01-27  Javier Miranda  <miranda@adacore.com>
8619
8620         * exp_disp.ads, exp_disp.adb (Expand_Interface_Thunk): Modify the
8621         profile of interface thunks. The type of the controlling formal is now
8622         the covered interface type (instead of the target tagged type).
8623
8624 2010-01-27  Sergey Rybin  <rybin@adacore.com>
8625
8626         * gnat_rm.texi, gnat_ugn.texi: Update gnatcheck doc.
8627
8628 2010-01-27  Robert Dewar  <dewar@adacore.com>
8629
8630         * sinput.ads, sinput.adb (Sloc_Range): Applies to all nodes, formal
8631         changed from Expr to N.
8632
8633 2010-01-26  Thomas Quinot  <quinot@adacore.com>
8634
8635         * gnat_ugn.texi: Adjust documentation of -gnatz switches.
8636         * usage.adb: Replace line for -gnatz with two lines for -gnatzc and
8637         -gnatzr.
8638
8639 2010-01-26  Vincent Celier  <celier@adacore.com>
8640
8641         * prj-attr.adb: Add new attribute Library_Install_Name_Option
8642         Replace attribute Run_Path_Origin_Supported with Run_Path_Origin
8643         * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process
8644         attributes Run_Path_Option and Library_Install_Name_Option.
8645         * prj.ads (Project_Configuration): Replace component
8646         Run_Path_Origin_Supported with component Run_Path_Origin. Add new
8647         component Library_Install_Name_Option.
8648         * snames.ads-tmpl: Add new standard name Library_Install_Name_Option
8649         Replace Run_Path_Origin_Supported with Run_Path_Origin
8650
8651 2010-01-26  Ed Schonberg  <schonberg@adacore.com>
8652
8653         * sem_ch8.adb (Use_One_Package): Within an instance, an actual package
8654         is not hidden by a homograph declared in another actual package.
8655
8656 2010-01-26  Robert Dewar  <dewar@adacore.com>
8657
8658         * par_sco.adb (Traverse_Declarations_Or_Statements): Only generate
8659         decisions for pragmas Assert, Check, Precondition, Postcondition if
8660         -gnata set.
8661         * scos.ads: Update comments.
8662         * get_scos.adb, put_scos.adb: Minor fix to code reading statement SCOs.
8663         Also remove obsolete code for CT (exit point) SCOs.
8664
8665 2010-01-26  Thomas Quinot  <quinot@adacore.com>
8666
8667         * switch-c.adb: Fix handling of -gnatz*
8668
8669 2010-01-26  Robert Dewar  <dewar@adacore.com>
8670
8671         * par_sco.adb (Traverse_Declarations_Or_Statements): Separate F/W
8672         qualifiers for FOR/WHILE loops
8673         * scos.ads: Use separate type letters F/W for for/while loops
8674
8675 2010-01-26  Robert Dewar  <dewar@adacore.com>
8676
8677         * get_scos.adb (Get_SCOs): Implement new form of CS entries (multiple
8678         entries per line, one for each statement in the sequence).
8679         * par_sco.adb (Traverse_Declarations_Or_Statements): Increase array
8680         size from 100 to 10_000 for SC_Array to avoid any real possibility of
8681         overflow. Output decisions in for loops.
8682         Exclude labels from CS lines.
8683         * scos.ads: Clarify that label is not included in the entry point
8684
8685 2010-01-26  Robert Dewar  <dewar@adacore.com>
8686
8687         * par_sco.adb (Traverse_Declarations_Or_Statments): Implement new
8688         format of statement sequence SCO entries (one location/statement).
8689         * put_scos.adb (Put_SCOs): Implement new format of CS lines
8690         * scos.ads: Update comments.
8691         * sem_eval.adb: Minor reformatting.
8692
8693 2010-01-26  Robert Dewar  <dewar@adacore.com>
8694
8695         * par_sco.ads, par_sco.adb (Set_Statement_Entry): New handling of exits
8696         (Extend_Statement_Sequence): New procedures
8697         (Traverse_Declarations_Or_Statements): New handling for exits.
8698
8699 2010-01-26  Robert Dewar  <dewar@adacore.com>
8700
8701         * par_sco.adb (Traverse_Declarations_Or_Statements): Add processing for
8702         Case.
8703
8704 2010-01-26  Robert Dewar  <dewar@adacore.com>
8705
8706         * par_sco.adb (Is_Logical_Operator): Exclude AND/OR/XOR
8707         * scos.ads: Clarify handling of logical operators
8708
8709 2010-01-26  Arnaud Charlet  <charlet@adacore.com>
8710
8711         * s-tpoben.adb: Update comments.
8712
8713 2010-01-26  Robert Dewar  <dewar@adacore.com>
8714
8715         * freeze.adb (Set_Small_Size): Don't set size if alignment clause
8716         present.
8717
8718 2010-01-26  Robert Dewar  <dewar@adacore.com>
8719
8720         * scos.ads: Clean up documentation, remove obsolete XOR references
8721 2010-01-26  Vincent Celier  <celier@adacore.com>
8722
8723         * gnat_ugn.texi: Complete documentation on the restrictions for
8724         combined options in -gnatxxx switches.
8725         Fix typo.
8726
8727 2010-01-26  Arnaud Charlet  <charlet@adacore.com>
8728
8729         * s-tpoben.adb (Initialize_Protection_Entries): If a PO is created from
8730         a controlled operation, abort is already deferred at this point, so we
8731         need to use Defer_Abort_Nestable.
8732
8733 2010-01-26  Vincent Celier  <celier@adacore.com>
8734
8735         * prj-conf.adb (Get_Config_Switches): Check for a default language for
8736         a project extending a project with no languages.
8737
8738 2010-01-26  Vincent Celier  <celier@adacore.com>
8739
8740         * switch-c.adb (Scan_Front_End_Switches): Take into account options
8741         that follow -gnatef.
8742         Allow -gnateG to be followed by other options.
8743
8744 2010-01-26  Robert Dewar  <dewar@adacore.com>
8745
8746         * s-commun.ads, s-osprim-mingw.adb, s-stchop-vxworks.adb, sem_aggr.adb,
8747         s-vxwext.adb, sem_ch10.adb, sem_eval.adb, sem_prag.adb: Minor
8748         reformatting.
8749
8750 2010-01-26  Vasiliy Fofanov  <fofanov@adacore.com>
8751
8752         * g-regist.adb, g-regist.ads (For_Every_Key): New generic procedure
8753         that allows to iterate over all subkeys of a key.
8754
8755 2010-01-26  Ed Falis  <falis@adacore.com>
8756
8757         * sysdep.c: enable NFS for VxWorks MILS
8758         * env.c: enable __gnat_environ for VxWorks MILS
8759         * gcc-interface/Makefile.in: Add VxWorks MILS target pairs.
8760
8761 2010-01-25  Bob Duff  <duff@adacore.com>
8762
8763         * sem_aggr.adb (Resolve_Array_Aggregate): Check for the case where this
8764         is an internally-generated positional aggregate, and the bounds are
8765         already correctly set. We don't want to overwrite those bounds with
8766         bounds determined by context.
8767
8768 2010-01-25  Robert Dewar  <dewar@adacore.com>
8769
8770         * g-sercom.ads, gnatcmd.adb, gnatlink.adb, a-ststio.adb, exp_ch6.adb,
8771         exp_ch9.adb, g-sechas.ads: Minor reformatting.
8772
8773 2010-01-25  Thomas Quinot  <quinot@adacore.com>
8774
8775         * s-commun.adb (Last_Index): Count must be converted to SEO (a signed
8776         integer type) before subtracting 1, otherwise the computation may wrap
8777         (because size_t is modular) and cause the conversion to fail.
8778
8779 2010-01-25  Ed Falis  <falis@adacore.com>
8780
8781         * sysdep.c, init.c: Adapt to support full run-time on VxWorks MILS.
8782
8783 2010-01-25  Vincent Celier  <celier@adacore.com>
8784
8785         * prj-attr.adb: New attribute Run_Path_Origin_Required
8786         * prj-nmsc.adb (Process_Project_Level_Simple_Attributes): Process new
8787         attribute Run_Path_Origin_Required.
8788         * prj.ads (Project_Configuration): New component
8789         Run_Path_Origin_Supported.
8790         * snames.ads-tmpl: New standard name Run_Path_Origin_Required
8791
8792 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
8793
8794         * sem_aggr.adb (Resolve_Array_Aggregate): If the bounds in a choice
8795         have errors, do not continue resolution of the aggregate.
8796         * sem_eval.adb (Eval_Indexed_Component): Do not attempt to evaluate if
8797         the array type indicates an error.
8798
8799 2010-01-25  Bob Duff  <duff@adacore.com>
8800
8801         * sinfo.ads: Minor comment fixes.
8802
8803 2010-01-25  Bob Duff  <duff@adacore.com>
8804
8805         * exp_ch4.adb, exp_aggr.adb: Minor comment fixes and code clean up.
8806
8807 2010-01-25  Arnaud Charlet  <charlet@adacore.com>
8808
8809         * gnatvsn.ads (Current_Year): Update.
8810
8811 2010-01-25  Florian Villoing  <villoing@adacore.com>
8812
8813         * gnat_ugn.texi: Fix typo.
8814
8815 2010-01-25  Thomas Quinot  <quinot@adacore.com>
8816
8817         * scos.ads: Update specification.
8818
8819 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
8820
8821         * sem_ch6.adb (Process_PPCs): If a postcondition is present and the
8822         enclosing subprogram has no previous spec, attach postcondition
8823         procedure to the defining entity for the body.
8824
8825 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
8826
8827         * exp_aggr.adb (Build_Record_Aggr_Code); Do not generate call to
8828         initialization procedure of the ancestor part of an extension aggregate
8829         if it is an interface type.
8830
8831 2010-01-25  Vincent Celier  <celier@adacore.com>
8832
8833         * gnatlink.adb (Process_Binder_File): The directory for the shared
8834         version of libgcc in the run path options is found in the subdirectory
8835         indicated by __gnat_default_libgcc_subdir.
8836         * link.c: Declare new const char * __gnat_default_libgcc_subdir for
8837         each platform.
8838
8839 2010-01-25  Ed Schonberg  <schonberg@adacore.com>
8840
8841         * sem_prag.adb: More flexible pragma Annotate.
8842
8843 2010-01-22  Eric Botcazou  <ebotcazou@adacore.com>
8844
8845         * system-linux-armel.ads (Stack_Check_Probes): Set to True.
8846         * system-linux-armeb.ads (Stack_Check_Probes): Likewise.
8847
8848 2010-01-18  Eric Botcazou  <ebotcazou@adacore.com>
8849
8850         * gcc-interface/utils.c (create_var_decl_1): Fix formatting nits.
8851
8852 2010-01-18  Jan Hubicka  <jh@suse.cz>
8853
8854         PR middle-end/42068
8855         * gcc-interface/utils.c (create_var_decl_1): Do not set COMMON flag for
8856         unit local variables.
8857
8858 2010-01-17  Laurent GUERBY  <laurent@guerby.net>
8859
8860         * gcc-interface/Makefile.in: Fix typo in arm*-*-linux-gnueabi.
8861
8862 2010-01-11  Mikael Pettersson  <mikpe@it.uu.se>
8863
8864         * gcc-interface/Makefile.in: Add arm*-*-linux-gnueabi.
8865         * system-linux-armeb.ads, system-linux-armel.ads: New files.
8866
8867 2010-01-09  Simon Wright  <simon@pushface.org>
8868
8869         PR ada/42626
8870         * gcc-interface/Makefile.in (gnatlib-shared-darwin): Add missing
8871         end-quote.
8872
8873
8874 \f
8875 Copyright (C) 2010 Free Software Foundation, Inc.
8876
8877 Copying and distribution of this file, with or without modification,
8878 are permitted in any medium without royalty provided the copyright
8879 notice and this notice are preserved.