OSDN Git Service

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