OSDN Git Service

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