OSDN Git Service

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