OSDN Git Service

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