]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/ChangeLog
df-scan.c (struct df_scan_problem_data): Remove the mw_link_pool alloc pool.
[gcc.git] / gcc / ada / ChangeLog
CommitLineData
4b92fd3c
ST
12008-06-07 Samuel Tardieu <sam@rfc1149.net>
2
3 * sem_res.adb (Large_Storage_Type): A type is large if it
4 requires as many bits as Positive to store its values and its
5 bounds are known at compile time.
6 * sem_ch13.adb (Minimum_Size): Note that this function returns
7 0 if the size is not known at compile time.
8
968c8001
OH
92008-06-06 Nicolas Setton <setton@adacore.com>
10 Olivier Hainque <hainque@adacore.com>
11
12 * ada-tree.h (DECL_PARALLEL_TYPE): New language specific
13 attribute, parallel descriptive type attached to another
14 type for debug info generation purposes.
15 * utils.c (add_parallel_type): New function, register
16 parallel type to be attached to a type.
17 (get_parallel_type): New function, fetch a registered
18 parallel type, if any.
19 (rest_of_record_type_compilation): Register the parallel
20 type we make for variable size records.
21 * gigi.h (add_parallel_type, get_parallel_type): Declare.
22 * decl.c (gnat_to_gnu_entity, maybe_pad_type): Register the
23 parallel debug types we make.
24 * trans.c (extract_encoding, decode_name): New functions.
25 (gigi): If the DWARF attribute extensions are available, setup
26 to use them.
27 * lang.opt: Register language specific processing request
28 for -gdwarf+.
29 * misc.c (gnat_dwarf_extensions): New global variable. How much
30 do we want of our DWARF extensions. 0 by default.
31 (gnat_handle_option) <OPT_gdwarf_>: Increment gnat_dwarf_extensions.
32 (gnat_post_options): Map gnat_dwarf_extensions to the
33 commonuse_gnu_debug_info_extensions for later processing.
34
b30199b8
ST
352008-06-04 Samuel Tardieu <sam@rfc1149.net>
36
37 * einfo.ads, einfo.adb: Remove unused flag Function_Returns_With_DSP.
38
30783513
RW
392008-06-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
40
41 * Makefile.in (common_tools): Fix typos in $(exeext) extension.
42 * gnat_ugn.texi (Style Checking)
43 (Adding the Results of Compiler Checks to gnatcheck Output)
44 (Example of Binder Output File): Fix typos.
45 * ali.ads, einfo.ads, exp_ch4.adb, exp_ch6.adb,
46 exp_dbug.ads, exp_dist.adb, exp_smem.adb, g-socket.ads,
47 s-osinte-rtems.ads, s-shasto.ads, s-stausa.adb,
48 s-stausa.ads, sem_cat.adb, sem_ch12.adb, sem_ch3.adb,
49 sem_ch4.adb, sem_ch6.adb, sem_ch8.adb, sem_util.ads,
50 sinfo.ads, utils.c: Fix typos in comments.
51 * sem_ch6.adb, vms_data.ads: Fix typos in strings.
52
fb8368fd
AC
532008-05-29 Thomas Quinot <quinot@adacore.com>
54
55 * sem_eval.adb: Minor reformatting
56
572008-05-29 Ed Schonberg <schonberg@adacore.com>
58
59 * sem_ch6.adb (Analyze_Subprogram_Specification): if the return type
60 is abstract, do not apply abstractness check on subprogram if this is
61 a renaming declaration.
62
632008-05-29 Arnaud Charlet <charlet@adacore.com>
64
65 PR ada/864
66 * osint.ads, osint.adb (Program_Name): New parameter "Prog" to
67 allow recognition of program suffix in addition to prefix.
68
69 * gnatchop.adb (Locate_Executable): Add support for prefix.
70
71 * make.adb, gnatcmd.adb, gnatlink.adb, prj-makr.adb,
72 mlib-utl.adb: Adjust calls to Program_Name.
73
fff3f472
AC
742008-05-29 Robert Dewar <dewar@adacore.com>
75
76 * sem_ch3.adb: Minor reformatting
77 * sem_prag.adb: Minor reformatting
78 * sem_res.adb: Minor reformatting
79 * sinput-p.ads: Minor reformatting
80
812008-05-29 Javier Miranda <miranda@adacore.com>
82
83 * sem_util.adb:
84 (Abstract_Interface_List): Add missing support for full type-declaration
85 associated with synchronized types.
86
872008-05-29 Robert Dewar <dewar@adacore.com>
88
89 * sem_eval.adb (Is_Same_Value): Take care of several more cases
90
acca98c0
AC
912008-05-28 Ed Schonberg <schonberg@adacore.com>
92
93 * sem_ch5.adb (Analyze_Assignment): If the name is of a local anonymous
94 access type, wrap the expression in a conversion to force an
95 accessibility check.
96
97 * sem_aggr.adb (Aggegate_Constraint_Checks): Apply conversion to force
98 accessibility checks even when expansion is disabled in order to
99 generate messages in the presence of previous errors or in
100 semantics-only mode.
101
1022008-05-28 Eric Botcazou <ebotcazou@adacore.com>
103
104 * system-lynxos-ppc.ads (Always_Compatible_Rep): Set to False.
105 * system-lynxos-x86.ads (Always_Compatible_Rep): Set to False.
106
1072008-05-28 Vincent Celier <celier@adacore.com>
108
109 PR ada/34446
110 * gnat_ugn.texi: Document restriction introduced on 2007-04-20 in
111 preprocessing expressions
112
1132008-05-28 Vincent Celier <celier@adacore.com>
114
115 * sinput-p.adb (Source_File_Is_Subunit): Allow special character used
116 for preprocessing
117
118 * sinput-p.ads: Minor comment update and reformatting
119
1202008-05-28 Ed Schonberg <schonberg@adacore.com>
121
122 * sem_res.adb (Valid_Conversion): An anonymous access_to_subprogram
123 type has a deeper level than any master only when it is the type of an
124 access parameter.
125
8250171b
AC
1262008-05-28 Javier Miranda <miranda@adacore.com>
127
128 * sem_ch3.adb (Derive_Progenitor_Subprograms): Add documentation.
129
1302008-05-28 Javier Miranda <miranda@adacore.com>
131
132 * sem_util.ads (Find_Overridden_Synchronized_Primitive): Removed.
133 * sem_util.adb (Find_Overridden_Synchronized_Primitive): Removed.
134 * sem_ch6.adb (Check_Synchronized_Overriding): Remove one formal.
135 Add code that was previously located in
136 Find_Overridden_Synchronized_Primitive because it is only used here.
137
1382008-05-28 Sergey Rybin <rybin@adacore.com>
139
140 * sem_prag.adb (Process_Extended_Import_Export_Subprogram_Pragma): Set
141 Entity field for formal_parameter_NAME in MECHANISM_ASSOCIATION.
142
00ea9517
RD
1432008-05-28 Robert Dewar <dewar@adacore.com>
144
145 * restrict.ads:
146 Add missing restrictions, and properly label all GNAT defined ones
147
148 * rtsfind.ads:
149 Add entry for Ada_Real_Time.Timing_Events.Timing_Event
150 Add entry for Ada.Task_Termination.Set_Specific_Handler
151 Add entry for Ada.Task_Termination.Specific_Handler
152
153 * s-rident.ads:
154 Add missing restrictions and properly mark all gnat defined ones
155
156 * sem_ch3.adb:
157 (Analyze_Object_Declaration): Check No_Local_Timing_Events restriction
158
159 * sem_res.adb:
160 (Resolve_Call): Check violation of No_Specific_Termination_Handlers
161
162 * gnat_rm.texi: Add missing restrictions, and properly label all
163 GNAT defined ones
164
1652008-05-28 Robert Dewar <dewar@adacore.com>
166
167 * restrict.adb:
168 (Check_Restriction): violation of restriction No_Finalization is
169 treated as a serious error to stop expansion
170
1712008-05-28 Robert Dewar <dewar@adacore.com>
172
173 * exp_util.adb: Minor reformatting
174 * exp_util.ads: Minor reformatting.
175
0b795892
AC
1762008-05-28 Arnaud Charlet <charlet@adacore.com>
177
178 * Make-lang.in: Remove gprmake.
179
180 * gprmake.adb, makegpr.ads, makegpr.adb: Removed.
181
5840819a
AC
1822008-05-28 Ed Schonberg <schonberg@adacore.com>
183
184 * sem_ch3.adb (Diagnose_Interface): Cleanup error messages involving
185 improper progenitor names, and avoid cascaded errors.
186
1872008-05-28 Robert Dewar <dewar@adacore.com>
188
189 * gnat_rm.texi: Add note on Old giving warning when applied to constant
190
191 * sem_attr.adb (Analyze_Attribute, case Old): Give warning if prefix is
192 a constant
193
1942008-05-28 Robert Dewar <dewar@adacore.com>
195
196 * exp_fixd.adb (Build_Multiply): Correct one-off error in computing
197 size
198
1992008-05-28 Robert Dewar <dewar@adacore.com>
200
201 * exp_ch5.adb:
202 (Expand_Simple_Function_Return): Copy unaligned result into temporary
203
8c3dd7a8
JM
2042008-05-28 Javier Miranda <miranda@adacore.com>
205
206 * sem_ch3.adb (Derive_Progenitor_Primitives): Add missing support
207 for user-defined predefined primitives.
208
209 * sem_util.adb (Matches_Prefixed_View_Profile): Ditto.
210 (Find_Overridden_Synchronized_Primitive): Ditto.
211
212 * sem_ch6.adb (Check_Synchronized_Overriding): Ditto.
213
35b80405
AC
2142008-05-27 Arnaud Charlet <charlet@adacore.com>
215
216 * a-ststio.adb, s-direio.adb:
217 Further code clean up of previous change.
218 Update comments.
219
2202008-05-27 Vincent Celier <celier@adacore.com>
221
222 * prj-nmsc.adb: Minor reformatting
223
2242008-05-27 Bob Duff <duff@adacore.com>
225
226 * sem_ch3.adb (Build_Incomplete_Type_Declaration): In the case of an
227 untagged private type with a tagged full type, where the full type has
228 a self reference, create the corresponding class-wide type early, in
229 case the self reference is "access T'Class".
230
2312008-05-27 Ed Schonberg <schonberg@adacore.com>
232
233 * exp_aggr.adb (Build_Array_Aggr_Code): If component type includes
234 tasks and context is an object declaration. create master entity before
235 expansion.
236
2372008-05-27 Robert Dewar <dewar@adacore.com>
238
239 * mlib-prj.adb: Minor reformatting
240
241 * prj-part.adb: Minor reformatting
242
243 * prj.ads: Minor reformatting
244
245 * exp_ch3.adb: Minor reformatting.
246
247 * sem_ch3.ads: Minor reformatting
248
249 * sem_eval.adb: Minor reformatting
250
d5c998a9
AC
2512008-05-27 Vincent Celier <celier@adacore.com>
252
253 * gnatcmd.adb:
254 <prefix>-gnat stack spawns gnatstack, not <prefix>-gnatstack
255
2562008-05-27 Ed Schonberg <schonberg@adacore.com>
257
258 * exp_aggr.adb (Expand_Array_Aggregate): If the aggregate contains
259 tasks, create an activation chain now, before the expansion into
260 assignments and build-in-place calls that require the presence of an
261 activation chain.
262 (Backend_Processing_Possible): If the component type is inherently
263 limited, the aggregate must be expanded into individual built-in-place
264 assignments.
265
266 * sem_ch6.adb (Build_Extra_Formals): Use underlying type of result to
267 determine whether an allocation extra parameter must be built, to
268 handle case of a private type whose full type is a discriminated type
269 with defaults.
270
2712008-05-27 Bob Duff <duff@adacore.com>
272
273 * gnat_rm.texi:
274 Document the new behavior regarding trampolines.
275
2762008-05-27 Arnaud Charlet <charlet@adacore.com>
277
278 * a-direio.adb, a-sequio.adb: Replace address clause by
279 unrestricted_access, simpler and compatible with .NET.
280
2812008-05-27 Vincent Celier <celier@adacore.com>
282
283 * prj-part.adb:
284 (Project_Path_Name_Of.Try_Path): Do not use Locate_Regular_File to find
285 a project file, so that symbolic links are not resolved.
286
2872008-05-27 Arnaud Charlet <charlet@adacore.com>
288
289 * a-ztexio.adb, a-textio.adb, a-witeio.adb, s-direio.adb:
290 Replace heavy address clause by 'Unrestricted_Access, cleaner and more
291 portable across GNAT targets, since this kind of address clause is not
292 supported by VM back-ends (.NET/JGNAT).
293
79d2a727
AC
2942008-05-27 Arnaud Charlet <charlet@adacore.com>
295
296 * bindgen.adb: Update comments.
297
298 * s-tasinf-mingw.adb: Add "with" of System.OS_Interface
299
3002008-05-27 Vincent Celier <celier@adacore.com>
301
302 * gnatcmd.adb, prj-proc.adb, make.adb, mlib-prj.adb, prj.adb,
303 prj.ads, makegpr.adb, makeutl.adb, clean.adb, prj-nmsc.adb,
304 mlib-tgt.adb, prj-env.adb, prj-env.ads:
305 (Path_Information): New record type
306 Use component of type Path_Information when there are two paths, one in
307 canonical format and one in display format.
308 Update the project manager to these new components.
309
0f99f391
AC
3102008-05-27 Robert Dewar <dewar@adacore.com>
311
312 * makeutl.adb: Minor reformatting
313 * prj-nmsc.adb: Minor reformatting
314 * s-stausa.adb: Minor reformatting
315 * s-stausa.ads: Minor reformatting
316 * sem_ch6.adb: Minor reformatting
317
3182008-05-27 Thomas Quinot <quinot@adacore.com>
319
320 * sem_res.adb: Minor comment fixes
321
d18af35f
AC
3222008-05-27 Thomas Quinot <quinot@adacore.com>
323
324 * makeutl.adb: Minor code reorganization
325
326 * exp_aggr.adb: Add ??? comment
327 Fix typo
328
329 * exp_ch6.adb: Minor reformatting
330
3312008-05-27 Quentin Ochem <ochem@adacore.com>
332
333 * s-stausa.adb (Initialize): Updated result initialization, and
334 initialization of environment stack.
335 (Fill_Stack): Improved computation of the pattern zone, taking into
336 account already filled at the calling point.
337 (Get_Usage_Range): Now uses Min_Measure and Max_Measure instead of
338 Measure and Overflow_Guard.
339 (Report_Result): Fixed computation of the result using new fields of
340 Stack_Analyzer.
341
342 * s-stausa.ads (Initialize_Analyzer): Replaced Size / Overflow_Guard
343 params by more explicit Stack_Size / Max_Pattern_Size params.
344 (Stack_Analyzer): Added distinct Stack_Size & Pattern_Size fields.
345 Added Stack_Used_When_Filling field.
346 (Task_Result): Replaced Measure / Overflow_Guard by more explicit
347 Min_Measure and Max_Measure fields.
348
349 * s-tassta.adb (Task_Wrapper): Updated call to Initialize_Analyzer.
350
3512008-05-27 Vincent Celier <celier@adacore.com>
352
353 * prj-nmsc.adb:
354 (Check_File): Make sure that a unit that replaces the same unit in a
355 project being extended is properly processed.
356
3572008-05-27 Ed Schonberg <schonberg@adacore.com>
358
359 * sem_ch3.adb:
360 (Get_Discr_Value): Remove obsolete code that failed to find the value
361 of a discriminant for an inherited task component appearing in a type
362 extension.
363
3642008-05-27 Thomas Quinot <quinot@adacore.com>
365
366 (System.File_IO.{Close, Delete, Reset}):
367 Change File parameter from "in out AFCB_Ptr" to "access AFCB_Ptr".
368
369 (Ada.*_IO.{Close, Delete, Reset, Set_Mode}):
370 Pass File parameter by reference.
371
aeff280b
AC
3722008-05-27 Vincent Celier <celier@adacore.com>
373
374 * prj-nmsc.adb:
375 (Process_Sources_In_Multi_Language_Mode): Check that there are not two
376 sources of the same project that have the same object file name.
377 (Find_Explicit_Sources): Always remove a source exception that was not
378 found.
379
3802008-05-27 Thomas Quinot <quinot@adacore.com>
381
382 * sem_ch3.adb: Minor reformatting
383
3842008-05-27 Ed Schonberg <schonberg@adacore.com>
385
386 * sem_ch6.adb:
387 (Is_Interface_Conformant): Handle properly a primitive operation that
388 overrides an interface function with a controlling access result.
389 (Type_Conformance): If Skip_Controlling_Formals is true, when matching
390 inherited and overriding operations, omit as well the conformance check
391 on result types, to prevent spurious errors.
392
3932008-05-27 Vincent Celier <celier@adacore.com>
394
395 * makeutl.ads, makeutl.adb:
396 (Set_Location): New procedure
397 (Get_Location): New function
398 (Update_Main): New procedure
399
7bf402c1
AC
4002008-05-27 Vincent Celier <celier@adacore.com>
401
402 * prj-nmsc.adb:
403 (Check_Library): Allow standard project to be extended as a static
404 library project.
405 (Get_Mains): Do not inherit attribute Main in an extending library
406 project.
407
4082008-05-27 Eric Botcazou <ebotcazou@adacore.com>
409
410 * system-darwin-ppc.ads (Always_Compatible_Rep): Set to False.
411 * system-darwin-x86.ads (Always_Compatible_Rep): Likewise.
412 * system-freebsd-x86.ads (Always_Compatible_Rep): Likewise.
413 * system-linux-ppc.ads (Always_Compatible_Rep): Likewise.
414 * system-linux-x86_64.ads (Always_Compatible_Rep): Likewise.
415 * system-linux-x86.ads (Always_Compatible_Rep): Likewise.
416 * system-mingw.ads (Always_Compatible_Rep): Likewise.
417 * system-solaris-sparc.ads (Always_Compatible_Rep): Likewise.
418 * system-solaris-sparcv9.ads (Always_Compatible_Rep): Likewise.
419 * system-solaris-x86.ads (Always_Compatible_Rep): Likewise.
420
52268145
AC
4212008-05-27 Ed Schonberg <schonberg@adacore.com>
422
423 * sem_attr.adb: add guard to previous patch.
424
4252008-05-27 Ed Schonberg <schonberg@adacore.com>
426
427 * exp_disp.adb (Build_Dispatch_Tables): For a private type completed by
428 a synchronized tagged type, do not attempt to build dispatch table for
429 full view. The table is built for the corresponding record type, which
430 has its own declaration.
431
4322008-05-27 Gary Dismukes <dismukes@adacore.com>
433
434 * sem_ch3.adb (Fixup_Bad_Constraint): Set the Etype on the bad subtype
435 to the known type entity E, rather than setting it to Any_Type. Fixes
436 possible blowup in function Base_Init_Proc, as called from Freeze_Entity
437 for objects whose type had an illegal constraint.
438
4392008-05-27 Vincent Celier <celier@adacore.com>
440
441 * gnat_ugn.texi:
442 Add succinct documentation for attribute Excluded_Source_List_File
443
4442008-05-27 Vincent Celier <celier@adacore.com>
445
446 * prj-attr.adb: Add new project level attribute Map_File_Option
447
448 * prj-nmsc.adb (Process_Linker): Process new attribute Map_File_Option
449
450 * prj.ads: Minor reformatting and comment update
451 (Project_Configuration): New component Map_File_Option
452
453 * snames.adb: New standard name Map_File_Option
454
455 * snames.ads: New standard name Map_File_Option
456
4572008-05-27 Vincent Celier <celier@adacore.com>
458
459 * xsnames.adb: Remove unused variable Oname
460
4612008-05-27 Doug Rupp <rupp@adacore.com>
462
463 * exp_ch6.adb:
464 (Expand_N_Function_Call): Fix comments. Minor reformatting.
465
466 * exp_vfpt.ads:
467 (Expand_Vax_Foreign_Return): Fix comments.
468
4692008-05-27 Thomas Quinot <quinot@adacore.com>
470
471 * exp_dist.adb: Minor reformating
472
094d7cfa
AC
4732008-05-26 Gary Dismukes <dismukes@adacore.com>
474
475 * exp_ch3.adb (Expand_N_Object_Declaration): Remove checks for
476 No_Default_Initialization, which is now delayed until the freeze point
477 of the object. Add a comment about deferral of the check.
478
479 * freeze.adb (Freeze_Entity): The check for No_Default_Initialization
480 on objects is moved here.
481
4822008-05-26 Eric Botcazou <ebotcazou@adacore.com>
483
484 * s-casi16.adb (Uhalf): Rewrite it as integer with small alignment.
485 (Compare_Array_S16): Adjust for above change.
486 * s-casi32.adb (Uword): Likewise.
487 (Compare_Array_S32): Likewise.
488 * s-casi64.adb (Uword): Likewise.
489 (Compare_Array_S64): Likewise.
490 * s-caun16.adb (Uhalf): Likewise.
491 (Compare_Array_U16): Likewise.
492 * s-caun32.adb (Uword): Likewise.
493 (Compare_Array_U32): Likewise.
494 * s-caun64.adb (Uword): Likewise.
495 (Compare_Array_U64): Likewise.
496
4972008-05-26 Robert Dewar <dewar@adacore.com>
498
499 * exp_ch6.adb: Add ??? comment for previous change
500
501 * exp_vfpt.adb: Minor reformatting
502
503 * exp_vfpt.ads: Add ??? comment for last change
504
505 * sem_attr.adb: Add some ??? comments for previous change
506
507 * s-vaflop.ads: Add comments for previous change
508
5092008-05-26 Doug Rupp <rupp@adacore.com>
510
511 * s-vaflop-vms-alpha.adb:
512 Remove System.IO use clause, to prevent spurious ambiguities when
513 package is access through rtsfind.
514
5152008-05-26 Sergey Rybin <rybin@adacore.com>
516
517 * tree_io.ads (ASIS_Version_Number): Update because of the changes
518 made in front-end
519
9019f3fc
AC
5202008-05-26 Ed Schonberg <schonberg@adacore.com>
521
522 * sem_attr.adb:
523 (Resolve_Attribute, case 'address): S (A .. B)' address can be safely
524 converted to S (A)'address only if A .. B is known to be a non-null
525 range.
526
5272008-05-26 Doug Rupp <rupp@adacore.com>
528
529 * s-vaflop.adb:
530 (Return_D, Return_F, Return_G): New functions.
531
532 * s-vaflop.ads:
533 (Return_D, Return_F, Return_G): New functions.
534
535 * exp_vfpt.adb:
536 (Expand_Vax_Foreign_Return): New procedure
537
538 * exp_vfpt.ads:
539 (Expand_Vax_Foreign_Return): New procedure
540
541 * rtsfind.ads:
542 (RE_Return_D, RE_Return_F, RE_Return_G): New RE_Ids
543 (RE_Return_D, RE_Return_F, RE_Return_G): New RE_Unit_Table elements
544
545 * exp_ch6.adb:
546 Import Exp_Vfpt
547 (Expand_N_Function_Call): Call Expand_Vax_Foreign_Return.
548
549 * s-vaflop-vms-alpha.adb:
550 (Return_D, Return_F, Return_G): New functions.
551
5522008-05-26 Gary Dismukes <dismukes@adacore.com>
553
554 * exp_ch3.adb (Build_Array_Init_Proc): Only set Init_Proc to a dummy
555 init proc entity when there is actual default initialization associated
556 with the component type, to avoid spurious errors on objects of scalar
557 array types that are marked Is_Public when No_Default_Initialization
558 applies.
559
d693e39d
TQ
5602008-05-26 Thomas Quinot <quinot@adacore.com>
561
562 * rtsfind.ads, rtsfind.adb:
563 (RE_Get_RACW): New runtime library entity provided by PolyORB s-parint.
564 (Check_RPC): Support per-PCS-kind API versioning.
565
566 exp_dist.ads, exp_dist.adb:
567 (Build_Stub_Tag, Get_Stub_Elements): New utility subprograms.
568 (PolyORB_Support.Add_RACW_From_Any): Offload common code to new runtime
569 library function Get_RACW.
570 (PolyORB_Support.Add_RACW_To_Any): Offload common code to new runtime
571 library function Get_Reference.
572 (PolyORB_Support.Add_RACW_Read_Attribute): Use Get_RACW instead of going
573 through an intermediate Any.
574 (PolyORB_Support.Add_RACW_Write_Attribute): Use Get_Reference instead of
575 going through an intermediate Any.
576
577 * sem_dist.adb: Minor reformatting.
578
ad89bc8d
AC
5792008-05-26 Javier Miranda <miranda@adacore.com>
580
581 * einfo.ads (Abstract_Interface_Alias): Renamed as Interface_Alias.
582 (Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
583 (Is_Internal): Adding documentation on internal entities that have
584 attribute Interface_Alias (old attribute Abstract_Interface_Alias)
585
586 * einfo.adb (Abstract_Interface_Alias): Renamed as Interface_Alias.
587 (Set_Abstract_Interface_Alias): Renamed as Set_Interface_Alias.
588 Added assertion to force entities with this attribute to have
589 attribute Is_Internal set to True.
590 (Next_Tag_Component): Simplify assertion using attribute Is_Tag.
591
592 * sem_ch3.adb (Derive_Interface_Subprograms): This subprogram has been
593 renamed as Derive_Progenitor_Subprograms. In addition, its code is
594 a new implementation.
595 (Add_Interface_Tag_Components): Remove special management of
596 synchronized interfaces.
597 (Analyze_Interface_Declaration): Minor reformating
598 (Build_Derived_Record_Type): Minor reformating
599 (Check_Abstract_Overriding): Avoid reporting error in case of abstract
600 predefined primitive inherited from interface type because the body of
601 internally generated predefined primitives of tagged types are generated
602 later by Freeze_Type
603 (Derive_Subprogram): Avoid generating an internal name if the parent
604 subprogram overrides an interface primitive.
605 (Derive_Subprograms): New implementation that keeps separate the
606 management of tagged types not implementing interfaces, from tagged
607 types that implement interfaces.
608 (Is_Progenitor): New implementation.
609 (Process_Full_View): Add documentation
610 (Record_Type_Declaration): Replace call to Derive_Interface_Subprograms
611 by call to Derive_Progenitor_Subprograms.
612
613 * sem_ch6.ads (Is_Interface_Conformant): New subprogram.
614 (Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
615 Skip_Controlling_Formals.
616
617 * sem_ch6.adb (Is_Interface_Conformant): New subprogram.
618 (Check_Conventions): New implementation. Remove local subprogram
619 Skip_Check. Remove formal Search_From of routine Check_Convention.
620 (Check_Subtype_Conformant, Subtype_Conformant): Adding new argument
621 Skip_Controlling_Formals.
622 (New_Overloaded_Entity): Enable addition of predefined dispatching
623 operations.
624
625 * sem_disp.ads
626 (Find_Primitive_Covering_Interface): New subprogram.
627
628 * sem_disp.adb (Check_Dispatching_Operation): Disable registering
629 the task body procedure as a primitive of the corresponding tagged
630 type.
631 (Check_Operation_From_Private_Type): Avoid adding twice an entity
632 to the list of primitives.
633 (Find_Primitive_Covering_Interface): New subprogram.
634 (Override_Dispatching_Operation): Add documentation.
635
636 * sem_type.adb (Covers): Minor reformatings
637
638 * sem_util.ads (Collect_Abstract_Interfaces): Renamed as
639 Collect_Interfaces.
640 Rename formal.
641 (Has_Abstract_Interfaces): Renamed as Has_Interfaces.
642 (Implements_Interface): New subprogram.
643 (Is_Parent): Removed.
644 (Primitive_Names_Match): New subprogram.
645 (Remove_Homonym): Moved here from Derive_Interface_Subprograms.
646 (Ultimate_Alias): New subprogram.
647
648 * sem_util.adb (Collect_Abstract_Interfaces): Renamed as
649 Collect_Interfaces.
650 Remove special management for synchronized types. Rename formal. Remove
651 internal subprograms Interface_Present_In_Parent and Add_Interface.
652 (Has_Abstract_Interfaces): Renamed as Has_Interfaces. Replace assertion
653 on non-record types by code to return false in such case.
654 (Implements_Interface): New subprogram.
655 (Is_Parent): Removed. No special management is now required for
656 synchronized types covering interfaces.
657 (Primitive_Names_Match): New subprogram.
658 (Remove_Homonym): Moved here from Derive_Interface_Subprograms.
659 (Ultimate_Alias): New subprogram.
660
661 * exp_ch3.adb (Add_Internal_Interface_Entities): New subprogram.
662 Add internal entities associated with secondary dispatch tables to
663 the list of tagged type primitives that are not interfaces.
664 (Freeze_Record_Type): Add new call to Add_Internal_Interface_Entities
665 (Make_Predefined_Primitive_Specs): Code reorganization to improve
666 the management of predefined equality operator. In addition, if
667 the type has an equality function corresponding with a primitive
668 defined in an interface type, the inherited equality is abstract
669 as well, and no body can be created for it.
670
671 * exp_disp.ads (Is_Predefined_Dispatching_Operation): Moved from
672 exp_util to exp_disp.
673 (Is_Predefined_Interface_Primitive): New subprogram. Returns True if
674 an entity corresponds with one of the predefined primitives required
675 to implement interfaces.
676 Update copyright notice.
677
678 * exp_disp.adb (Set_All_DT_Position): Add assertion. Exclude from the
679 final check on abstract subprograms all the primitives associated with
680 interface primitives because they must be visible in the public and
681 private part.
682 (Write_DT): Use Find_Dispatching_Type to locate the name of the
683 interface type. This allows the use of this routine, for debugging
684 purposes, when the tagged type is not fully decorated.
685 (Is_Predefined_Dispatching_Operation): Moved from exp_util to exp_disp.
686 Factorize code calling new subprogram Is_Predefined_Interface_Primitive.
687 (Is_Predefined_Interface_Primitive): New subprogram. Returns True if an
688 entity corresponds with one of the predefined primitives required to
689 implement interfaces.
690
691 * exp_util.adb (Find_Interface_ADT): New implementation
692 (Find_Interface): Removed.
693
694 * sprint.adb (Sprint_Node_Actual): Generate missing output for the
695 list of interfaces associated with nodes
696 N_Formal_Derived_Type_Definition and N_Private_Extension_Declaration.
697
6982008-05-26 Thomas Quinot <quinot@adacore.com>
699
700 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add missing guard on
701 condition for assignment to temporary.
702
c878b2ef
AC
7032008-05-26 Ed Schonberg <schonberg@adacore.com>
704
705 * exp_ch4.adb (Expand_Concatenate_Other): Add explicit constraint
706 checks on the upper bound if the index type is a modular type, to
707 prevent wrap-around computations when size is close to upper bound of
708 type.
709
7102008-05-26 Robert Dewar <dewar@adacore.com>
711
712 * sem_ch3.adb: Minor reformatting
713
39281edf
AC
7142008-05-26 Ed Schonberg <schonberg@adacore.com>
715
716 * sem_ch12.adb (Remove_Parent): Use specification of instance
717 to retrieve generic parent,
718 to handle properly the case where the instance is a child unit.
719 Add guard to handle properly wrapper packages.
720 Minor reformatting
721
7222008-05-26 Thomas Quinot <quinot@adacore.com>
723
724 * sinfo.ads: Minor reformatting
725
7262008-05-26 Hristian Kirtchev <kirtchev@adacore.com>
727
728 * exp_ch4.adb (Expand_N_Type_Conversion): Minor code reformatting.
729 Generate a tag check when the result subtype of a function, defined by
730 an access definition, designates a specific tagged type.
731 (Make_Tag_Check): New routine.
732
d6ca724c
AC
7332008-05-26 Arnaud Charlet <charlet@adacore.com>
734
735 * ceinfo.adb, csinfo.adb: Remove warnings. Update headers.
736
c654b659
EB
7372008-05-26 Eric Botcazou <ebotcazou@adacore.com>
738
739 * gigi.h (gigi): Remove bogus ATTRIBUTE_UNUSED marker.
740 (builtin_decl_for): Likewise.
741 * trans.c (gigi): Likewise.
742 * utils.c (def_builtin_1): Fix formatting.
743
1c331d2d
AC
7442008-05-26 Hristian Kirtchev <kirtchev@adacore.com>
745
746 * exp_ch3.adb (Build_Init_Statements): Alphabetize local variables.
747 Create the statements which map a string name to protected or task
748 entry indix.
749
750 * exp_ch9.adb: Add with and use clause for Stringt.
751 Minor code reformatting.
752 (Build_Entry_Names): New routine.
753 (Make_Initialize_Protection, Make_Task_Create_Call): Generate a value
754 for flag Build_Entry_Names which controls the allocation of the data
755 structure for the string names of entries.
756
757 * exp_ch9.ads (Build_Entry_Names): New subprogram.
758
759 * exp_util.adb (Entry_Names_OK): New function.
760
761 * exp_util.ads (Entry_Names_OK): New function.
762
763 * rtsfind.ads: Add RO_PE_Set_Entry_Name and RO_TS_Set_Entry_Name to
764 enumerations RE_Id and RE_Unit_Table.
765
766 * s-taskin.adb Add with and use clause for Ada.Unchecked_Deallocation.
767 (Free_Entry_Names_Array): New routine.
768
769 * s-taskin.ads: Comment reformatting.
770 Add types String_Access, Entry_Names_Array, Entry_Names_Array_Access.
771 Add component Entry_Names to record Ada_Task_Control_Block.
772 (Free_Entry_Names_Array): New routine.
773
774 * s-tassta.adb (Create_Task): If flag Build_Entry_Names is set,
775 dynamically allocate an array
776 of string pointers. This structure holds string entry names.
777 (Free_Entry_Names): New routine.
778 (Free_Task, Vulnerable_Free_Task): Deallocate the entry names array.
779 (Set_Entry_Names): New routine.
780
781 * s-tassta.ads:
782 (Create_Task): Add formal Build_Entry_Names. The flag is used to
783 control the allocation of the data structure which stores entry names.
784 (Set_Entry_Name): New routine.
785
786 * s-tpoben.adb:
787 Add with and use clause for Ada.Unchecked_Conversion.
788 (Finalize): Deallocate the entry names array.
789 (Free_Entry_Names): New routine.
790 (Initialize_Protection_Entries): When flag Build_Entry_Names is set,
791 create an array of string pointers to hold the entry names.
792 (Set_Entry_Name): New routine.
793
794 * s-tpoben.ads:
795 Add field Entry_Names to record Protection_Entries.
796 (Initialize_Protection_Entries): Add formal Build_Entry_Names.
797 (Set_Entry_Name): New routine.
798
7992008-05-26 Vincent Celier <celier@adacore.com>
800
801 * prj-nmsc.adb:
802 (Process_Project_Level_Simple_Attributes): process attribute Library_GCC
803
804 * prj.ads:
805 (Project_Configuration): New component Shared_Lib_Driver
806
8072008-05-26 Ed Schonberg <schonberg@adacore.com>
808
809 * inline.adb:
810 (Cleanup_Scopes): For a protected operation, transfer finalization list
811 to protected body subprogram, to force cleanup actions when needed.
812
8132008-05-26 Robert Dewar <dewar@adacore.com>
814
815 * sem_cat.adb: Minor reformatting
816
817 * gnatname.adb: Minor reformatting
818
819 * osint.ads: Minor reformatting
820
821 * s-carun8.ads: Minor reformatting
822
823 * g-heasor.ads: Minor comment fix (unit is now pure)
824
8252008-05-26 Robert Dewar <dewar@adacore.com>
826
827 * exp_ch2.adb:
828 (Expand_Current_Value): Properly type generated integer literal
829
8302008-05-26 Sergey Rybin <rybin@adacore.com>
831
832 * gnat_ugn.texi: Add description for the new gnatcheck rule -
833 Separate_Numeric_Error_Handlers.
834
8352008-05-26 Pascal Obry <obry@adacore.com>
836
837 * sem_aggr.adb: Minor reformatting.
838
8392008-05-26 Jose Ruiz <ruiz@adacore.com>
840
841 * s-osinte-aix.adb:
842 (To_Target_Priority): Setting the time slice value to 0 or greater sets
843 the scheduling policy to FIFO within priorities or round-robin
844 respectively.
845 Hence, the priority must be set in this case to the one selected by the
846 user.
847
8482008-05-26 Ed Schonberg <schonberg@adacore.com>
849
850 * sem_ch12.adb:
851 (Remove_Parent): If the enclosing scope is an instance whose generic
852 parent is declared within some parent scope of the just completed
853 instance, make full views of the entities in that parent visible, when
854 applicable.
855
a28e8f45
KT
8562008-05-26 Kai Tietz <kai.tietz@onevision.com>
857
858 * mingw32.h (STD_MINGW): Set to true for target w64.
859
3651f7ad
EB
8602008-05-25 Eric Botcazou <ebotcazou@adacore.com>
861
862 * trans.c (Attribute_to_gnu) <Code_Address>: Set TREE_NO_TRAMPOLINE
863 instead of TREE_STATIC on the ADDR_EXPR.
864
58272d79
EB
8652008-05-24 Eric Botcazou <ebotcazou@adacore.com>
866
867 * trans.c (gnat_to_gnu): Do not set source location info on NOP_EXPRs.
868 (Sloc_to_locus): Do not overwrite known GCC locations when translating
869 GNAT standard locations.
870
4c8125f4
EB
8712008-05-23 Eric Botcazou <ebotcazou@adacore.com>
872
873 * gigi.h (mark_visited): Declare.
874 * decl.c (gnat_to_gnu_entity): Use mark_visited instead of marking
875 only the topmost node of expressions.
b86c6d94 876 (elaborate_expression_1): Look deeper for read-only variables.
4c8125f4
EB
877 * trans.c (add_decl_expr): Use mark_visited instead of marking by hand.
878 (mark_visited): Move logic to mark_visited_r. Invoke walk_tree.
879 (mark_visited_r): New function.
880
d1ba4e42
AC
8812008-05-23 Vincent Celier <celier@adacore.com>
882
b86c6d94 883 * snames.adb: New standard name Excluded_Source_List_File.
d1ba4e42 884
b86c6d94 885 * snames.ads: New standard name Excluded_Source_List_File.
d1ba4e42 886
b86c6d94 887 * prj-attr.adb: New project level attribute Excluded_Source_List_File.
d1ba4e42 888
b86c6d94 889 * prj-nmsc.adb: (Find_Excluded_Sources): New parameter Project.
d1ba4e42
AC
890 Get excluded sources from
891 file indicated by attribute Excluded_Source_List_File, when present and
892 neither Excluded_Source_Files nor Locally_Removed_Files are declared.
893
8942008-05-23 Robert Dewar <dewar@adacore.com>
895
896 * exp_dist.adb: Minor reformatting
897
8982008-05-23 Ed Schonberg <schonberg@adacore.com>
899
900 * sem_attr.adb (Resolve_Attribute, case 'address): If the prefix is a
901 slice, convert it to an indexed component, which is equivalent, more
902 efficient, and usable even if the slice itself is not addressable.
903
9042008-05-23 Olivier Hainque <hainque@adacore.com>
905
906 * gnat_ugn.texi (Calling Conventions): Document that the Intrinsic
907 convention also allows access to named compiler built-in subprograms
908 such as the GCC __builtin family.
909
ffd0dd6c
AC
9102008-05-23 Vincent Celier <celier@adacore.com>
911
912 * prj-nmsc.adb (Check_Naming_Schemes): Check a file for spec, body and
913 sep. If there are several possibilities, choose the one with the
914 longer prefix.
915
9162008-05-23 Vincent Celier <celier@adacore.com>
917
918 * gnatlink.adb (Process_Args): Do not disable scanning of ALI file for
919 back end switches when executable specified with --GCC= is same as
920 default, even if there are additional options.
921
922 * gnat_ugn.texi:
923 Document when the back end switches from the ALI file are taken into
924 account when gnatlink is invoked with --GCC=
925
9262008-05-23 Thomas Quinot <quinot@adacore.com>
927
928 * s-os_lib.adb:
929 (copy_File): Do not open destination file if source file is unreadable.
930
3fda3252
EB
9312008-05-23 Eric Botcazou <ebotcazou@adacore.com>
932
933 * utils.c (handle_type_generic_attribute): Adjust to accept
934 fixed arguments before an elipsis.
935
92c708d2
TQ
9362008-05-21 Thomas Quinot <quinot@adacore.com>
937
938 * g-sothco.ads, g-sothco.adb: New files.
939
93a7c573
AC
9402008-05-20 Thomas Quinot <quinot@adacore.com>
941
942 * Makefile.rtl (GNAT.Sockets.Thin_Common): New unit.
943
944 * g-sttsne-vxworks.adb: Add missing dependency on Sockets.Constants.
945 Add missing "with" of Ada.Unchecked_Conversion
946
947 * g-soccon-linux-ppc.ads, g-soccon-linux-64.ads, g-soccon-lynxos.ads,
948 g-soccon-linux-x86.ads, g-soccon-hpux-ia64.ads,
949 g-soccon-solaris-64.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
950 g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
951 g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-vxworks.ads,
952 g-socthi-vxworks.adb, g-soccon-freebsd.ads, g-soccon.ads:
953 Move common code out of GNAT.Sockets.Thin implementations and into
954 Thin_Common.
955 New constant SIZEOF_fd_set
956 New flag Has_Sockaddr_Len
957 New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6
958
959 * g-stsifd-sockets.adb
960 (Create): Remove call to Set_Length; use Set_Family to set the family
961 and (on appropriate platforms) length fields in struct sockaddr.
962
963 * g-socthi.adb, g-socthi.ads, g-socthi-vms.ads, g-socthi-vms.adb,
964 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi-vxworks.adb,
965 g-soccon-darwin.ads, g-soccon-darwin.ads: New constant SIZEOF_fd_set
966 Move common code out of GNAT.Sockets.Thin implementations and into
967 Thin_Common.
968
969 * g-socket.ads, g-socket.adb:
970 Move common code out of GNAT.Sockets.Thin implementations and into
971 Thin_Common.
972 (Connect_Socket, Accept_Socket): Provide new versions of these two
973 routines that operate with a user specified timeout.
974 (Bind_Socket, Connect_Socket, Send_Socket): Remove calls to Set_Length,
975 this is now handled automatically by Set_Family on platforms that
976 require it.
977
978 * gen-soccon.c:
979 Move common code out of GNAT.Sockets.Thin implementations and into
980 Thin_Common.
981 (SIZEOF_sockaddr_in6): On platforms where IPv6 is not supported, define
982 this constant to 0 (not -1) because we use it to initialize an
983 unsigned_char value.
984 Align values for numeric constants only.
985 Handle the case of systems that do not support AF_INET6.
986 New constant SIZEOF_fd_set
987 New flag Has_Sockaddr_Len
988 New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6
989
990 * gsocket.h: New flag Has_Sockaddr_Len
991 New constants SIZEOF_sockaddr_in, SIZEOF_sockaddr_in6
992
9932008-05-20 Santiago Uruena <uruena@adacore.com>
994
995 * i-cobol.ads: Interfaces.COBOL should be preelaborate.
996
9972008-05-20 Arnaud Charlet <charlet@adacore.com>
998
999 * s-linux-hppa.ads (atomic_lock_t): Put back proper alignment now that
1000 the underlying issue with malloc/free has been fixed. Remove associated
1001 comments.
1002 Minor reformatting.
1003 Related to PR ada/24533
1004
10052008-05-20 Robert Dewar <dewar@adacore.com>
1006
1007 * ali.adb: Correct casing of ASCII.NUL
1008
1009 * styleg-c.adb (Check_Identifier): Handle case of names in ASCII
1010 properly.
1011
10122008-05-20 Robert Dewar <dewar@adacore.com>
1013 Gary Dismukes <dismukes@adacore.com>
1014
1015 * checks.adb (Apply_Arithmetic_Overflow_Check): Avoid intermediate
1016 overflow if result converted to wider integer type.
1017 (Apply_Type_Conversion_Checks): Don't emit checks on conversions to
1018 discriminated types when discriminant checks are suppressed.
1019
10202008-05-20 Vincent Celier <celier@adacore.com>
1021
1022 * cstand.adb (Print_Standard): Issue the correct Size clause for type
1023 Wide_Wide_Character.
1024
10252008-05-20 Tristan Gingold <gingold@adacore.com>
1026
1027 * decl.c: Do not emit a variable for a object that has an address
1028 representation clause whose value is known at compile time.
1029 When a variable has an address clause whose value is known at compile
1030 time, refer to this variable by using directly the address instead of
1031 dereferencing a pointer.
1032
10332008-05-20 Robert Dewar <dewar@adacore.com>
1034
1035 PR ada/30740
1036 * einfo.ads, einfo.adb (Non_Binary_Modulus): Applies to all types and
1037 subtypes, always False for non-modular types.
1038 Shared_Var_Assign_Proc (node22) and Shared_Var_Read_Proc (node 15)
1039 entry nodes have been replaced by Shared_Var_Procs_Instance (node22)
1040 for Shared_Storage package.
1041 (Is_RACW_Stub_Type): New entity flag.
1042
1043 * exp_ch4.adb
1044 (Expand_N_Op_Expon): Avoid incorrect optimization of a*(2**b) in the
1045 case where we have a modular type with a non-binary modules.
1046 Comments reformattings.
1047
1048 * sem_intr.adb: Simplify code not that Non_Binary_Modulus applies to
1049 all types.
1050
10512008-05-20 Javier Miranda <miranda@adacore.com>
1052
1053 * exp_aggr.adb
1054 (Build_Record_Aggr_Code): Fix wrong tests checking progenitors. Previous
1055 tests did not covered the case in which the type of the aggregate has
1056 no progenitors but some its parents has progenitors.
1057
10582008-05-20 Gary Dismukes <dismukes@adacore.com>
1059 Hristian Kirtchev <kirtchev@adacore.com>
1060
1061 * exp_ch3.adb
1062 (Expand_N_Object_Declaration): Correct the condition which triggers the
1063 generation of a call to Displace when initializing a class-wide object.
1064 (Build_Dcheck_Functions): Build discriminant-checking for null variants
1065 when Frontend_Layout_On_Target is true to ensure that they're available
1066 for calling when a record variant size function is built in Layout.
1067
10682008-05-20 Ed Schonberg <schonberg@adacore.com>
1069
1070 * exp_ch5.adb (Expand_Assign_Record): Within an initialization
1071 procedure for a derived type retrieve the discriminant values from the
1072 parent using the corresponding discriminant.
1073 (Expand_N_Assignment_Statement): Skip generation of implicit
1074 if-statement associated with controlled types if we are
1075 compiling with restriction No_Finalization.
1076
10772008-05-20 Vincent Celier <celier@adacore.com>
1078
1079 * prj.adb (Hash (Project_Id)): New function
1080 (Project_Empty): Add new component Interfaces_Defined
1081
1082 * prj.ads (Source_Data): New component Object_Linked
1083 (Language_Config): New components Object_Generated and Objects_Linked
1084 (Hash (Project_Id)): New function
1085 (Source_Data): New Boolean components In_Interfaces and
1086 Declared_In_Interfaces.
1087 (Project_Data): New Boolean component Interfaces_Defined
1088
1089 * prj-attr.adb:
1090 New project level attribute Object_Generated and Objects_Linked
1091 Add new project level attribute Interfaces
1092
1093 * prj-dect.adb: Use functions Present and No throughout
1094 (Parse_Variable_Declaration): If a string type is specified as a simple
1095 name and is not found in the current project, look for it also in the
1096 ancestors of the project.
1097
1098 * prj-makr.adb:
1099 Replace procedure Make with procedures Initialize, Process and Finalize
1100 to implement H414-023: process different directories with different
1101 patterns.
1102 Use functions Present and No throughout
1103
1104 * prj-makr.ads:
1105 Replace procedure Make with procedures Initialize, Process and Finalize
1106
1107 * prj-nmsc.adb
1108 (Add_Source): Set component Object_Exists and Object_Linked accordnig to
1109 the language configuration.
1110 (Process_Project_Level_Array_Attributes): Process new attributes
1111 Object_Generated and Object_Linked.
1112 (Report_No_Sources): New Boolean parameter Continuation, defaulted to
1113 False, to indicate that the erreor/warning is a continuation.
1114 (Check): Call Report_No_Sources with Contnuation = True after the first
1115 call.
1116 (Error_Msg): Process successively contnuation character and warning
1117 character.
1118 (Find_Explicit_Sources): Check that all declared sources have been found
1119 (Check_File): Indicate in hash table Source_Names when a declared source
1120 is found.
1121 (Check_File): Set Other_Part when found
1122 (Find_Explicit_Sources): In multi language mode, check if all exceptions
1123 to the naming scheme have been found. For Ada, report an error if an
1124 exception has not been found. Otherwise, disregard the exception.
1125 (Check_Interfaces): New procedure
1126 (Add_Source): When Other_Part is defined, set mutual pointers in spec
1127 and body.
1128 (Check): In multi-language mode, call Check_Interfaces
1129 (Process_Sources_In_Multi_Language_Mode): Set In_Interfaces to False
1130 for an excluded source.
1131 (Remove_Source): A source replacing a source in the interfaces is also
1132 in the interfaces.
1133
1134 * prj-pars.adb: Use function Present
1135
1136 * prj-part.adb: Use functions Present and No throughout
1137 (Parse_Single_Project): Set the parent project for child projects
1138 (Create_Virtual_Extending_Project): Register project with no qualifier
1139 (Parse_Single_Project): Allow an abstract project to be extend several
1140 times. Do not allow an abstract project to extend a non abstract
1141 project.
1142
1143 * prj-pp.adb: Use functions Present and No throughout
1144 (Print): Take into account the full associative array attribute
1145 declarations.
1146
1147 * prj-proc.adb: Use functions Present and No throughout
1148 (Expression): Call itself with the same From_Project_Node for the
1149 default value of an external reference.
1150
1151 * prj-strt.adb: Use functions Present and No throughout
1152 (Parse_Variable_Reference): If a variable is specified as a simple name
1153 and is not found in the current project, look for it also in the
1154 ancestors of the project.
1155
1156 * prj-tree.ads, prj-tree.adb (Present): New function
1157 (No): New function
1158 Use functions Present and No throughout
1159 (Parent_Project_Of): New function
1160 (Set_Parent_Project_Of): New procedure
1161
1162 * snames.ads, snames.adb:
1163 Add new standard names Object_Generated and Objects_Linked
1164
11652008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
1166
1167 * exp_ch6.adb (Expand_Call): Add guard to ensure that both the parent
1168 and the derived type are of the same kind.
1169 (Expand_Call): Generate type conversions for actuals of
1170 record or array types when the parent and the derived types differ in
1171 size and/or packed status.
1172
11732008-05-20 Javier Miranda <miranda@adacore.com>
1174 Ed Schonberg <schonberg@adacore.com>
1175
1176 * exp_disp.adb (Make_DT, Make_Secondary_DT, Make_Tags): Avoid
1177 generating dispatch tables of locally defined tagged types statically.
1178 Remove implicit if-statement that is no longer required.
1179 (Expand_Dispatching_Call): If this is a call to an instance of the
1180 generic dispatching constructor, the type of the first argument may be
1181 a subtype of Tag, so always use the base type to recognize this case.
1182
11832008-05-20 Thomas Quinot <quinot@adacore.com>
1184
1185 * exp_dist.adb
1186 (GARLIC_Support.Add_RACW_Read_Attribute): When a zero value is received,
1187 and the RACW is null-excluding, raise CONSTRAINT_ERROR instead of
1188 assigning NULL into the result, to avoid a spurious warning.
1189 (Add_RACW_Features, case Same_Scope): Add assertion that designated type
1190 is not frozen.
1191 (Add_Stub_Type): Set entity flag Is_RACW_Stub_Type on generated stub
1192 type.
1193 (Build_From_Any_Function, Build_To_Any_Function,
1194 Build_TypeCode_Function): For a type that has user-specified stream
1195 attributes, use an opaque sequence of octets as the representation.
1196
11972008-05-20 Kevin Pouget <pouget@adacore.com>
1198
1199 * exp_smem.ads, exp_smem.adb: Construction of access and assign
1200 routines has been replaced by an instantiation of
1201 System.Shared_Storage.Shared_Var_Procs generic package, while expanding
1202 shared variable declaration.
1203 Calls to access and assign routines have been replaced by calls to
1204 Read/Write routines of System.Shared_Storage.Shared_Var_Procs
1205 instantiated package.
1206
1207 * rtsfind.ads: RE_Shared_Var_Procs entry has been added in RE_Unit_Table
1208 It identifies the new generic package added in s-shasto.
1209
1210 * s-shasto.adb, s-shasto.ads: A new generic package has been added, it
1211 is instantiated for each shared passive variable. It provides
1212 supporting procedures called upon each read or write access by the
1213 expanded code.
1214
1215 * sem_attr.adb:
1216 For this runtime unit (always compiled in GNAT mode), we allow
1217 stream attributes references for limited types for the case where
1218 shared passive objects are implemented using stream attributes,
1219 which is the default in GNAT's persistent storage implementation.
1220
12212008-05-20 Ed Schonberg <schonberg@adacore.com>
1222
1223 * freeze.adb
1224 (Freeze_Enumeration_Type): For a subtype that inherits a foreign
1225 convention from its base type, do not set the type to that of integer,
1226 because it may inherit a size clause.
1227 Warn on a size clause with a size different
1228 from that of Integer, if the type has convention C.
1229
12302008-05-20 Vincent Celier <celier@adacore.com>
1231
1232 * gnatname.adb
1233 (Scan_Args): Rewrite to take into account new switch --and to separate
1234 arguments into sections.
1235 (Gnatname): Call Prj.Makr.Initialize, then Prj.Makr.Process for each
1236 section, then Finalize.
1237
12382008-05-20 Tristan Gingold <gingold@adacore.com>
1239
1240 * init.c: Enable stack probing on ppc-linux.
1241
1242 * tracebak.c: Add symbolic traceback for ppc-linux.
1243
1244 * system-linux-ppc.ads: Enable stack probing on ppc-linux.
1245
12462008-05-20 Arnaud Charlet <charlet@adacore.com>
1247
1248 * Makefile.in
1249 (common-tools): New rule, to avoid parallel build failure on gnat tools.
1250 Reenable parallel builds on this Makefile.
1251
1252 * Make-lang.in: Update dependencies.
1253
12542008-05-20 Robert Dewar <dewar@adacore.com>
1255
1256 * opt.ads (Treat_Restrictions_As_Warnings): New switch
1257
1258 * sem_prag.adb, par-prag.adb, restrict.ads: Implement flag
1259 Treat_Restrictions_As_Warnings.
1260
1261 * switch-c.adb: Recognize new switch -gnatr
1262
1263 * usage.adb: Add line for -gnatr
1264
12652008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
1266
1267 * par-ch3.adb
1268 (P_Access_Definition): Change the error message when parsing "access
1269 all" in Ada 95 mode. The message no longer forces the user to recompile
1270 in 05 mode only to discover that anonymous access types are not allowed
1271 to have "all".
1272
12732008-05-20 Hristian Kirtchev <kirtchev@adacore.com>
1274
1275 * par-ch9.adb
1276 (P_Protected): Update the error message on missing "-gnat05" switch when
1277 using interfaces in conjunction with protected types. Remove the
1278 incorrect error message associated with the presence of "private" after
1279 a "with".
1280
12812008-05-20 Ed Schonberg <schonberg@adacore.com>
1282
1283 * sem_aggr.adb: Update comments.
1284 Improve previous change for PR ada/17985
1285
12862008-05-20 Thomas Quinot <quinot@adacore.com>
1287
1288 * sem_cat.adb
1289 (Set_Categorization_From_Scope): Do not set In_Remote_Types unless in
1290 the visible part of the spec of a remote types unit.
1291 (Validate_Remote_Access_Object_Type_Declaration):
1292 New local subprogram Is_Valid_Remote_Object_Type, replaces
1293 Is_Recursively_Limited_Private.
1294 (Validate_RACW_Primitives): Enforce E.2.2(14) rules: the types of all
1295 non-controlling formals (and the return type, even though this is not
1296 explicit in the standard) must support external streaming.
1297 (Validate_RCI_Subprogram_Declaration): Enforce E.2.3(14) rules: same
1298 as above for of RAS types and RCI subprograms. (The return type is not
1299 checked yet).
1300 Update comments related to RACWs designating limited interfaces per
1301 ARG ruling on AI05-060.
1302
1303 * sem_util.ads, sem_util.adb
1304 (Is_Remote_Access_To_Class_Wide_Type): Only rely on Is_Remote_Types and
1305 Is_Remote_Call_Interface to identify RACW types in a stable and
1306 consistent way. We used to rely in this predicate on the privateness of
1307 the designated type and its ancestors, but depending on the currently
1308 visible private parts, this caused false negatives. We now uniformly
1309 rely on checks made at the point where the RACW type is declared.
1310 (Inspect_Deferred_Constant_Completion): Moved from Sem_Ch7.
1311
13122008-05-20 Javier Miranda <miranda@adacore.com>
1313 Ed Schonberg <schonberg@adacore.com>
1314 Hristian Kirtchev <kirtchev@adacore.com>
1315
1316 * sem_ch3.adb
1317 (Analyze_Object_Declaration): Fix over-conservative condition
1318 restricting use of predefined assignment with tagged types that have
1319 convention CPP.
1320 (Analyze_Object_Declaration): Relax the check regarding deferred
1321 constants declared in scopes other than packages since they can be
1322 completed with pragma Import.
1323 Add missing escaping of all-caps word 'CPP' in error messages.
1324 (Build_Discriminated_Subtype): Do not inherit representation clauses
1325 from parent type if subtype already carries them, because they are
1326 inherited earlier during derivation and already include those that may
1327 come from a partial view.
1328
1329 * sem_ch9.adb, sem_ch5.adb, sem_ch6.adb (Analyze_Subprogram_Body):
1330 Check the declarations of a subprogram body for proper deferred
1331 constant completion.
1332
1333 * sem_ch7.ads, sem_ch7.adb
1334 (Inspect_Deferred_Constant_Completion): Moved to sem_util.
1335
13362008-05-20 Ed Schonberg <schonberg@adacore.com>
1337 Thomas Quinot <quinot@adacore.com>
1338
1339 * sem_ch4.adb
1340 (Try_Indexed_Call): Handle properly a construct of the form F(S) where
1341 F is a parameterless function that returns an array, and S is a subtype
1342 mark.
1343 (Analyze_Call): Insert dereference when the prefix is a parameterless
1344 function that returns an access to subprogram and the call has
1345 parameters.
1346 Reject a non-overloaded call whose name resolves to denote
1347 a primitive operation of the stub type generated to support a remote
1348 access-to-class-wide type.
1349
13502008-05-20 Ed Schonberg <schonberg@adacore.com>
1351
1352 * sem_ch8.adb
1353 (Note_Redundant_Use): Diagnose a redundant use within a subprogram body
1354 when there is a use clause for the same entity in the context.
1355 (Analyze_Subprogram_Renaming): A renaming_as_body is legal if it is
1356 created for a stream attribute of an abstract type or interface type.
1357
13582008-05-20 Thomas Quinot <quinot@adacore.com>
1359
1360 * sem_dist.ads, sem_dist.adb (Is_RACW_Stub_Type_Operation): New
1361 subprogram.
1362
1363 * sem_type.adb
1364 (Add_One_Interp): Ignore any interpretation that is a primitive
1365 operation of an RACW stub type (these primitives are only executed
1366 through dispatching, never through static calls).
1367 (Collect_Interps): When only one interpretation has been found, set N's
1368 Entity and Etype to that interpretation, otherwise Entity and Etype may
1369 still refer to an interpretation that was ignored by Add_One_Interp,
1370 in which case would end up with being marked as not overloaded but with
1371 an Entity attribute not pointing to its (unique) correct interpretation.
1372
13732008-05-20 Ed Schonberg <schonberg@adacore.com>
1374
1375 * sem_eval.adb
1376 (Eval_Slice): Warn when a slice whose discrete range is a subtype name
1377 denotes the whole array of its prefix.
1378
13792008-05-20 Robert Dewar <dewar@adacore.com>
1380
1381 * sem_res.adb (Resolve_Op_Not): Warn on double negation
1382
13832008-05-20 Ed Schonberg <schonberg@adacore.com>
1384
1385 * sprint.adb
1386 (Print_Itype): Do not modify the sloc of the component type of a
1387 (packed) array itype, because it is an unrelated type whose source
1388 location is independent of the point of creation of the itype itself.
1389
13902008-05-20 Thomas Quinot <quinot@adacore.com>
1391
1392 * uintp.adb, urealp.adb: Replace calls to Increment_Last + Set with
1393 Append.
1394
13952008-05-20 Robert Dewar <dewar@adacore.com>
1396 Vincent Celier <celier@adacore.com>
1397
1398 * vms_data.ads: Add entry for -gnatr
1399 Put GNAT SYNC section in proper alpha order
1400 Add VMS qualifier /DISPLAY_PROGRESS equivalent to gnatmake switch -d
1401
1402 * gnat_ugn.texi: Add documentation for new gnatname switch --and
1403 Update the style checks section
1404 Add documentation of -gnatr
1405 Add to the "Adding the Results of Compiler Checks to gnatcheck Output"
1406 subsection the explanation how compiler checks should be disabled for
1407 gnatcheck.
1408 Update the list of Ada 95 reserved words used by in the project language
1409 Add documentation for project qualifiers.
1410 Document that abstract projects may be extended by different projects in
1411 the same project tree.
1412 Add documentation for gnatmake switch -d
1413
1414 * ug_words: Add -gnatyy VMS equivalence string.
1415 Add entry for -gnatr
1416
14172008-05-20 Bob Duff <duff@adacore.com>
1418
1419 * a-rttiev.adb
1420 (Set_Handler): Remove code from both of these that implements
1421 RM-D.15(15/2), because it causes a race condition and potential
1422 deadlock.
1423 (Process_Queued_Events): Add comment explaining "exception when others
1424 => null". Add clarifying ".all", even though implicit .all is legal
1425 here.
1426
14272008-05-20 Arnaud Charlet <charlet@adacore.com>
1428
1429 * s-winext.ads: Replace representation clause by pragma Pack. Gives
1430 equivalent representation, but has the advantage of allowing
1431 compilation of this file under 64 bits platforms.
1432
1433 * s-os_lib.adb (Normalize_Pathname): Mark Cur_Dir constant.
1434
1435 * s-osinte-irix.ads: (Alternate_Stack_Size): Add dummy declaration.
1436
1437 * adaint.c:
1438 Don't define dummy implementation of convert_addresses on ppc-linux.
1439
14402008-05-20 Ed Schonberg <schonberg@adacore.com>
1441
1442 * exp_ch7.adb
1443 (Expand_Ctrl_Function_Call): Do not attach result to finalization list
1444 if expression is aggregate component.
1445
14462008-05-20 Robert Dewar <dewar@adacore.com>
1447
1448 * g-byorma.adb, gnatlink.adb, prepcomp.adb, sinfo.ads,
1449 sem_ch12.adb: Update comments. Minor reformatting.
1450
1451 * exp_ch2.adb: Typo
1452
1453 * s-unstyp.ads: Fixed some typos in comments.
1454
1b686dc4
AC
14552008-05-20 Arnaud Charlet <charlet@adacore.com>
1456
1457 * s-taspri-vxworks.ads (Task_Address, Task_Address_Size): New
1458 type/constant.
1459
1460 * g-socthi-vxworks.ads: Update to latest socket changes.
1461
1462 * a-caldel-vms.adb: Resync with a-caldel spec.
1463
6357e162
AC
1464 * exp_ch9.ads, sem_ch8.ads, inline.adb: Minor reformatting.
1465 Update comments.
1466
74c11a6c
EB
14672008-05-17 Eric Botcazou <ebotcazou@adacore.com>
1468
1469 * trans.c (gnat_to_gnu) <N_Validate_Unchecked_Conversion>: Account
1470 for dummy types pointed to by the converted pointer types.
1471
f730e42f
EB
14722008-05-15 Eric Botcazou <ebotcazou@adacore.com>
1473
1474 * trans.c (add_decl_expr): At toplevel, mark the TYPE_ADA_SIZE field
1475 of records and unions.
1476 (gnat_to_gnu) <N_Validate_Unchecked_Conversion>: Fix formatting.
1477
eaa2f8c7
ST
14782008-05-14 Samuel Tardieu <sam@rfc1149.net>
1479 Robert Dewar <dewar@adacore.com>
1480
1481 * sem_attr.adb (Analyze_Attribute, Attribute_Old case): Add
1482 restrictions to the prefix of 'Old.
1483 * sem_util.ads, sem_util.adb (In_Parameter_Specification): New.
1484 * gnat_rm.texi ('Old): Note that 'Old cannot be applied to local
1485 variables.
1486
f80cddcb
EB
14872008-05-13 Eric Botcazou <ebotcazou@adacore.com>
1488
1489 PR ada/24880
1490 PR ada/26635
1491 * utils.c (convert) <INTEGER_TYPE>: When converting an additive
1492 expression to an integral type with lower precision, use NOP_EXPR
1493 directly in a couple of special cases.
1494
ea0a7f39
ST
14952008-05-12 Samuel Tardieu <sam@rfc1149.net>
1496 Ed Schonberg <schonberg@adacore.com>
1497
1498 * sem_ch3.adb (Build_Derived_Record_Type): Accept statically matching
1499 constraint expressions.
1500
751d1520
TB
15012008-05-12 Tomas Bily <tbily@suse.cz>
1502
ea0a7f39
ST
1503 * utils2.c (known_alignment, contains_save_expr_p)
1504 (gnat_mark_addressable): Use CASE_CONVERT.
1505 * decl.c (annotate_value): Likewise.
1506 * trans.c (maybe_stabilize_reference): Likewise.
1507 * utils2.c (build_binary_op): Use CONVERT_EXPR_P.
1508 * utils.c (rest_of_record_type_compilation): Likewise.
1509 * trans.c (protect_multiple_eval, Attribute_to_gnu)
1510 (protect_multiple_eval): Likewise.
751d1520 1511
a1b66071
AS
15122008-05-08 Andreas Schwab <schwab@suse.de>
1513
1514 * utils.c (handle_pure_attribute, init_gigi_decls): Rename
1515 DECL_IS_PURE to DECL_PURE_P.
1516
bba74577
EB
15172008-05-05 Eric Botcazou <ebotcazou@adacore.com>
1518
1519 * decl.c (maybe_pad_type): Add ??? comment.
1520
8f85525e
EB
15212008-05-03 Eric Botcazou <ebotcazou@adacore.com>
1522
1523 * decl.c (components_to_record): Zero the alignment of the qualified
1524 union built for the variant part upon creating it.
1525
88f36b7e
EB
15262008-05-03 Eric Botcazou <ebotcazou@adacore.com>
1527
1528 * decl.c (maybe_pad_type): Try to get a form of the type with integral
1529 mode even if the alignment is not a factor of the original size. But
1530 make sure to create the inner field with the original size. Reorder.
1531 * trans.c (addressable_p) <COMPONENT_REF>: Treat the field of a padding
1532 record as always addressable.
1533 * utils.c (convert): Deal specially with conversions between original
1534 and packable versions of a record type.
1535 * utils2.c (build_binary_op) <MODIFY_EXPR>: Be more restrictive when
1536 recognizing an assignment between padded objects.
1537
8665c7ca
EB
15382008-05-01 Eric Botcazou <ebotcazou@adacore.com>
1539
1540 * decl.c (make_packable_type): Resize the last component to its RM size
1541 only if it is of an aggregate type.
1542 * trans.c (call_to_gnu): Fix nit in comment.
1543 (gnat_to_gnu): Likewise.
1544
ea342909
ST
15452008-04-30 Samuel Tardieu <sam@rfc1149.net>
1546
1547 * Makefile.in: Adapt sh4-linux target.
1548
af4133b2
ST
15492008-04-29 Ed Schonberg <schonberg@adacore.com>
1550
1551 PR ada/35792
1552 * sem_ch3.adb (Find_Type_Name): Refuse completion of an incomplete
1553 tagged type by an untagged protected or task type.
1554
805100b5
EB
15552008-04-28 Eric Botcazou <ebotcazou@adacore.com>
1556 Tristan Gingold <gingold@adacore.com>
1557
1558 PR ada/36007
1559 * decl.c (gnat_to_gnu_entity) <object>: Do not promote alignment
1560 of aliased objects with an unconstrained nominal subtype.
1561 Cap the promotion to the effective alignment of the word mode.
1562
99c2eec1
RW
15632008-04-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1564
1565 * Make-lang.in (ada.tags, check-acats, ada/treeprs.ads)
1566 (ada/einfo.h, ada/sinfo.h, ada/nmake.adb, ada/nmake.ads):
1567 Use '&&' instead of ';'.
1568
22a81267
OH
15692008-04-24 Olivier Hainque <hainque@adacore.com>
1570
1571 * trans.c (Attribute_to_gnu) <case Attr_Length>: Length computation
1572 doesn't require signed arithmetic anymore.
1573
51eed280
PB
15742008-04-23 Paolo Bonzini <bonzini@gnu.org>
1575
1576 * trans.c (Attribute_to_gnu): Don't set TREE_INVARIANT.
1577 (call_to_gnu): Don't set TREE_INVARIANT.
1578 * utils2.c (gnat_build_constructor): Don't set TREE_INVARIANT.
1579
d9126ef8
JS
15802008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
1581
1582 * s-osinte-rtems.adb: Add sigalstack function.
1583 * s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack
1584 function. Add Alternate_Stack and Alternate_Stack_Size.
1585 Add missing process_shared field to pthread_condattr_t
1586 and change ss_low_priority to int from timespec.
1587
0a58c87e
ST
15882008-04-22 Samuel Tardieu <sam@rfc1149.net>
1589
1590 * i-forbla.adb: Link against -llapack and -lblas by default
1591 instead of the private -lgnalasup.
1592
009890be
OH
15932008-04-21 Olivier Hainque <hainque@adacore.com>
1594
1595 Access to most C builtins from Ada
1596 * utils.c: #include "langhooks.h" and define GCC_DIAG_STYLE.
1597 (handle_pure_attribute, handle_novops_attribute,
1598 handle_nonnull_attribute, handle_sentinel_attribute,
1599 handle_noreturn_attribute, handle_malloc_attribute,
1600 handle_type_generic_attribute): New attribute handlers, from C fe.
1601 (gnat_internal_attribute_table): Map the new handlers.
1602 (gnat_init_decl_processing): Move call to gnat_install_builtins to ...
1603 (init_gigi_decls): ... here.
1604 (handle_const_attribute, handle_nothrow_attribute, builtin_decl_for):
1605 Move to a section dedicated to builtins processing.
1606 (build_void_list_node, builtin_type_for_size): New functions.
1607 (def_fn_type, get_nonnull_operand): Likewise.
1608 (install_builtin_elementary_type, install_builtin_function_types,
1609 install_builtin_attributes): Likewise.
1610 (fake_attribute_handler): Fake handler for attributes we don't
1611 support in Ada.
1612 (def_builtin_1): New function, worker for DEF_BUILTIN.
1613 (install_builtin_functions): New function.
1614 (gnat_install_builtins): Move to the builtins processing section.
1615 Now calling the newly introduced installers.
1616
e871a873
EB
16172008-04-20 Eric Botcazou <ebotcazou@adacore.com>
1618
1619 * decl.c (gnat_to_gnu_entity) <object>: Also promote the alignment of
1620 constant objects, but not exceptions.
1621 * trans.c (add_decl_expr): Use gnat_types_compatible_p for type
1622 compatibility test.
1623 * utils.c (create_var_decl_1): Likewise.
1624 * utils2.c (build_binary_op) <MODIFY_EXPR>: Also use the padded view of
1625 the type when copying to padded object and the source is a constructor.
1626
98ae7998
EB
16272008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1628
1629 * decl.c (gnat_to_gnu_entity) <object>: When trying to promote the
1630 alignment, reset it to zero if it would end up not being greater
1631 than that of the type.
1632
3569056b
EB
16332008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1634
1635 * decl.c (maybe_pad_type): Only generate the XVS parallel type if
1636 the padded type has a variable size.
1637
9a089d8b
EB
16382008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1639
1640 * decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Use the return by
1641 target pointer mechanism as soon as the size is not constant.
1642
0cb5c2a7
EB
16432008-04-18 Eric Botcazou <ebotcazou@adacore.com>
1644
1645 * gigi.h (create_var_decl_1): Declare.
1646 (create_var_decl): Turn into a macro invoking create_var_decl_1.
1647 (create_true_var_decl): Likewise.
1648 * utils.c (create_var_decl_1): Make global and reorder parameters.
1649 (create_var_decl): Delete.
1650 (create_true_var_decl): Likewise.
1651
90d6701e
EB
16522008-04-17 Eric Botcazou <ebotcazou@adacore.com>
1653
1654 * decl.c (gnat_to_gnu_entity) <object>: Promote the alignment of
1655 objects by default.
1656 * fe.h (Debug_Flag_Dot_A): Delete.
1657 * debug.adb (-gnatd.a): Update documentation.
1658
35485e12
ST
16592008-04-17 Samuel Tardieu <sam@rfc1149.net>
1660
1661 * g-socket.ads, g-socket.adb (Get_Address): Make Stream a
1662 "not null" parameter.
1663
111c1cd9
ST
16642008-04-17 Samuel Tardieu <sam@rfc1149.net>
1665
1666 * g-socket.adb: Add a message "IPv6 not supported" to the
1667 Socket_Error exception.
1668
35c91e05
ST
16692008-04-16 Samuel Tardieu <sam@rfc1149.net>
1670
1671 PR ada/29015
1672 * sem_ch12.adb (Instantiate_Type): Check whether the full view of
1673 the type is known instead of the underlying type.
1674
b48a6531
ST
16752008-04-15 Ed Schonberg <schonberg@adacore.com>
1676
1677 PR ada/22387
1678 * exp_ch5.adb (Expand_Assign_Record): Within an initialization
1679 procedure for a derived type retrieve the discriminant values from
1680 the parent using the corresponding discriminant.
1681
462c31ef
ST
16822008-04-15 Samuel Tardieu <sam@rfc1149.net>
1683 Gary Dismukes <dismukes@adacore.com>
1684
1685 PR ada/28733
1686 * sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
1687 which is not an entity (and hence not a package).
1688 (End_Use_Package): Ditto.
1689
8abe457a
ST
16902008-04-15 Ed Schonberg <schonberg@adacore.com>
1691
1692 PR ada/16086
1693 * sem_ch12.adb (Analyze_Formal_Subprogram): The default can be any
1694 protected operation that matches the signature, not only an entry, a
1695 regular subprogram or a literal.
1696
29f4754f
EB
16972008-04-15 Eric Botcazou <ebotcazou@adacore.com>
1698
1699 * ada-tree.h (DECL_BY_COMPONENT_PTR_P): Use DECL_LANG_FLAG_3.
1700 * decl.c (gnat_to_gnu_entity) <object>: Call maybe_pad_type only
1701 if a size or alignment is specified. Do not take into account
1702 alignment promotions for the computation of the object's size.
1703 <type>: Call maybe_pad_type only if a size or alignment is specified.
1704 (maybe_pad_type): Really reuse the RM_Size of the original type if
1705 requested.
1706 * trans.c (Attribute_to_gnu): Fix a couple of nits.
1707 * utils2.c (build_binary_op) <MODIFY_EXPR>: Merge related conditional
1708 statements. Use the padded view of the type when copying between
1709 padded objects of the same underlying type.
1710
f3d0f304
RW
17112008-04-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1712
1713 * vms_data.ads: Fix typo in constant.
1714 * gen-soccon.c: Fix typo in error string.
1715 * gnat_rm.texi (Pragma Optimize_Alignment, Pragma Postcondition):
1716 Fix typos.
1717 * a-calcon.ads, a-calend-vms.adb, a-calend.adb, a-crdlli.ads,
1718 bcheck.adb, checks.adb, einfo.ads, errout.adb, erroutc.adb,
1719 erroutc.ads, exp_attr.adb, exp_ch11.adb, exp_ch2.adb,
1720 exp_ch5.adb, exp_ch9.adb, exp_ch9.ads, exp_pakd.adb,
1721 exp_util.adb, fmap.adb, g-soccon-linux-mips.ads,
1722 g-soccon-rtems.ads, g-timsta.adb, g-timsta.ads, lib-writ.ads,
1723 mlib-tgt-specific-linux.adb, mlib-tgt-specific-tru64.adb,
1724 s-interr-vxworks.adb, s-interr.adb, s-osinte-lynxos.ads,
1725 s-rident.ads, s-taprop-solaris.adb, s-tassta.adb, s-win32.ads,
1726 sem_aggr.adb, sem_attr.ads, sem_ch10.adb, sem_ch13.ads,
1727 sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb,
1728 sem_prag.ads, sem_res.adb, sem_util.adb, sem_util.ads,
1729 sinfo.ads: Fix typos in comments.
1730
2efcad9f
RD
17312008-04-14 Robert Dewar <dewar@adacore.com>
1732
1733 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Extend error
1734 to every non-object and change error message.
1735
8f3723e0
RD
17362008-04-14 Robert Dewar <dewar@adacore.com>
1737
1738 * sem_util.ads, sem_util.adb (In_Subprogram): Remove.
1739 * sem_attr.adb (Anayze_Attribute): Check for Current_Subprogram
1740 directly.
1741
32f7efe1
ST
17422008-04-14 Samuel Tardieu <sam@rfc1149.net>
1743
1744 PR ada/18680
1745 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Refuse to
1746 apply pragma Linker_Section on type.
1747
b039b10e
ST
17482008-04-14 Samuel Tardieu <sam@rfc1149.net>
1749
1750 PR ada/16098
1751 * sem_prag.adb (Error_Pragma_Ref): New.
1752 (Process_Convention): Specialized message for non-local
1753 subprogram renaming. Detect the problem in homonyms as well.
1754
cb572b75
ST
17552008-04-14 Samuel Tardieu <sam@rfc1149.net>
1756
1757 PR ada/15915
1758 * sem_util.ads, sem_util.adb (Denotes_Variable): New function.
1759 * sem_ch12.adb (Instantiate_Object): Use it.
1760 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ensure that
1761 storage pool denotes a variable as per RM 13.11(15).
1762
17972da7
ST
17632008-04-14 Samuel Tardieu <sam@rfc1149.net>
1764
1765 * sem_util.ads, sem_util.adb (In_Subprogram): New function.
1766 * sem_attr.adb (Analyze_Attribute, Attribute_Old case): Use it.
1767
57f80aa9
RE
17682008-04-14 Rolf Ebert <rolf.ebert.gcc@gmx.de>
1769
1770 PR ada/20822
1771 * xgnatugn.adb (Put_Line): New procedure, ensuring Unix
1772 line endings even on non-Unix platforms.
1773
9ff231e2
ST
17742008-04-14 Samuel Tardieu <sam@rfc1149.net>
1775
1776 PR ada/35050
1777 * xref_lib.adb (Parse_Identifier_Info): Correctly parse and ignore the
1778 renaming information.
1779
92d4508a
ST
17802008-04-13 Samuel Tardieu <sam@rfc1149.net>
1781
1782 PR ada/17985
1783 * sem_aggr.adb (Valid_Ancestor_Type): A type is not an ancestor of
1784 itself.
1785
12a13f01
RW
17862008-04-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1787
3354f96d
RW
1788 * sfn_scan.adb, sfn_scan.ads, sinfo.ads,
1789 sinput-d.ads, sinput-l.adb, sinput-l.ads, sinput.ads,
1790 snames.ads, sprint.adb, stand.ads, stringt.ads,
1791 styleg.adb, styleg.ads, stylesw.adb, stylesw.ads,
1792 switch.ads, sysdep.c, table.adb, table.ads,
1793 targparm.ads, tb-gcc.c, tbuild.ads, tracebak.c,
1794 trans.c, tree_io.adb, treepr.adb, types.adb, types.ads,
1795 uintp.adb, uintp.ads, utils.c, utils2.c, validsw.ads,
1796 vms_conv.adb, vms_conv.ads, vms_data.ads, widechar.adb,
1797 widechar.ads, xeinfo.adb, xgnatugn.adb, xr_tabls.adb,
1798 xr_tabls.ads, xref_lib.adb, xref_lib.ads, xsinfo.adb:
1799 Fix comment typos.
1800
f3d57416
RW
1801 * sem_ch10.adb, sem_ch10.ads,
1802 sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads,
1803 sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
1804 sem_ch6.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
1805 sem_elab.adb, sem_elab.ads, sem_elim.ads, sem_eval.adb,
1806 sem_eval.ads, sem_intr.adb, sem_mech.adb, sem_mech.ads,
1807 sem_prag.adb, sem_prag.ads, sem_res.adb, sem_res.ads,
1808 sem_type.adb, sem_util.adb, sem_util.ads, sem_warn.adb,
1809 sem_warn.ads: Fix comment typos.
1810
12a13f01
RW
1811 * s-secsta.adb, s-sequio.ads, s-shasto.ads,
1812 s-soflin.ads, s-stalib.ads, s-stausa.adb,
1813 s-stausa.ads, s-strxdr.adb, s-taenca.adb, s-taenca.ads,
1814 s-taprob.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
1815 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-posix.adb,
1816 s-taprop-solaris.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
1817 s-taprop-vxworks.adb, s-taprop.ads, s-tarest.adb,
1818 s-tarest.ads, s-tasini.adb, s-tasini.ads, s-taskin.ads,
1819 s-tasque.ads, s-tassta.adb, s-tassta.ads, s-tasuti.ads,
1820 s-tpoben.adb, s-tpoben.ads, s-tpobop.adb,
1821 s-tpopsp-posix.adb, s-tpopsp-rtems.adb, s-tposen.adb,
1822 s-tposen.ads, s-traceb-hpux.adb, s-traces.ads,
1823 s-trafor-default.ads, s-unstyp.ads, s-utf_32.ads,
1824 s-vaflop.adb, s-vaflop.ads, s-valrea.adb, s-valuti.adb,
1825 s-wchstw.ads, s-wchwts.adb, s-wchwts.ads, scans.ads,
1826 scn.adb, scng.adb, seh_init.c, sem.ads, sem_aggr.adb,
1827 sem_attr.adb, sem_attr.ads, sem_case.adb, sem_case.ads,
1828 sem_cat.adb, sem_cat.ads: Fix comment typos.
1829
2b699ab1
JS
18302008-04-12 Joel Sherrill <joel@oarcorp.com>
1831
1832 PR ada/35825
1833 * g-soccon-rtems.ads: Add IP_PKTINFO as unsupported.
1834
1e273538
AC
18352008-04-12 Arnaud Charlet <charlet@adacore.com>
1836
1837 * s-linux-hppa.ads: Fix syntax errors.
1838
276e95ca
RW
18392008-04-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1840
1841 * gnat_ugn.texi: Fix typos.
1842 * raise-gcc.c, repinfo.adb, repinfo.ads, restrict.adb,
1843 restrict.ads, rtsfind.adb, rtsfind.ads, s-arit64.ads,
1844 s-asthan-vms-alpha.adb, s-auxdec.ads, s-casuti.ads,
1845 s-fatflt.ads, s-fatgen.adb, s-fatlfl.ads,
1846 s-fatllf.ads, s-fatsfl.ads, s-filofl.ads,
1847 s-finimp.adb, s-finroo.ads, s-fishfl.ads,
1848 s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1849 s-hibaen.ads, s-htable.ads, s-imgcha.adb,
1850 s-imgenu.ads, s-imgint.adb, s-imgrea.adb,
1851 s-inmaop-dummy.adb, s-inmaop.ads, s-interr-vms.adb,
1852 s-interr-vxworks.adb, s-interr.adb, s-interr.ads,
1853 s-intman-vxworks.ads, s-intman.ads, s-mastop-irix.adb,
1854 s-os_lib.adb, s-os_lib.ads, s-osinte-aix.ads,
1855 s-osinte-darwin.ads, s-osinte-freebsd.ads,
1856 s-osinte-hpux.ads, s-osinte-lynxos-3.adb,
1857 s-osinte-lynxos-3.ads, s-osinte-lynxos.ads,
1858 s-osinte-rtems.ads, s-osinte-solaris-posix.ads,
1859 s-osprim-mingw.adb, s-osprim-vms.adb, s-parame-ae653.ads,
1860 s-parame-hpux.ads, s-parame-vms-alpha.ads,
1861 s-parame-vms-ia64.ads, s-parame-vms-restrict.ads,
1862 s-parame-vxworks.ads, s-parame.ads, s-parint.adb,
1863 s-parint.ads, s-poosiz.adb, s-proinf-irix-athread.ads,
1864 s-proinf.ads, s-regexp.adb, s-regpat.adb, s-regpat.ads,
1865 s-rident.ads: Fix comment typos.
1866
ce4e59c4
ST
18672008-04-09 Samuel Tardieu <sam@rfc1149.net>
1868
1869 PR ada/28305
1870 * sem_ch6.adb (Build_Body_To_Inline): Do not save and restore
1871 environment if generic instance is a top-level one.
1872
6d21c8af
DR
18732008-04-09 Doug Rupp <rupp@adacore.com>
1874
1875 * decl.c (validate_size): Set minimum size for fat pointers same as
1876 access types. Code clean ups.
1877
1878 * gmem.c (xstrdup32): New macro for 32bit dup on VMS, noop otherwise
1879 (__gnat_gmem_a2l_initialize): Dup exename into 32 bit memory on VMS
1880
1881 * s-auxdec-vms_64.ads, s-auxdec.ads (Short_Address_Size): New constant
1882
1883 * s-crtl.ads (malloc32) New function, alias for malloc
1884 (realloc32) New function, alias for realloc
1885
1886 * socket.c (__gnat_new_socket_set): Malloc fd_set in 32 bits on VMS
1887
1888 * utils2.c (build_call_alloc_dealloc): Return call to short malloc if
1889 allocator size is 32 and default pointer size is 64.
1890 (find_common_type): Document assumption on t1/t2 vs lhs/rhs. Force use of
1891 lhs type if smaller, whatever the modes.
1892
1893 * gigi.h (malloc32_decl): New macro definition
1894
1895 * utils.c (init_gigi_decls): New malloc32_decl
1896 Various code clean ups.
1897
1898 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
1899 Task_Address vice System.Address.
1900
1901 * s-taspri-vms.ads: Import System.Aux_DEC
1902 (Task_Address): New subtype of System.Aux_DEC.Short_Address
1903 (Task_Address_Size): New constant size of System.Aux_DEC.Short_Address
1904
1905 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
1906 Task_Address vice System.Address.
1907
1908 * s-inmaop-vms.adb: Import System.Task_Primitives
1909 (To_Address): Unchecked convert to Task_Address vice System.Address
1910
1911 * s-taprop-vms.adb (Timed_Delay): Always set the timer even if delay
1912 expires now.
1913 (To_Task_ID) Unchecked convert from Task_Adddress vice System.Address
1914 (To_Address) Unchecked convert to Task_Address vice System.Address
1915
1916 * s-tpopde-vms.adb: Remove unnecessary warning pragmas
1917
1918 * g-socthi-vms.ads: Add 32bit size clauses on socket access types.
1919
581edf92
EB
19202008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1921
1922 * gigi.h (standard_datatypes): Add ADT_fdesc_type and ADT_null_fdesc.
1923 (fdesc_type_node): Define.
1924 (null_fdesc_node): Likewise.
1925 * decl.c (gnat_to_gnu_entity) <E_Access_Subprogram_Type>: If the target
1926 uses descriptors for vtables and the type comes from a dispatch table,
1927 return the descriptor type.
1928 * trans.c (Attribute_to_gnu) <Attr_Unrestricted_Access>: If the target
1929 uses descriptors for vtables and the type comes from a dispatch table,
1930 build a descriptor in the static case and copy the existing one in the
1931 non-static case.
1932 (gnat_to_gnu) <N_Null>: If the target uses descriptors for vtables and
1933 the type is a pointer-to-subprogram coming from a dispatch table,
1934 return the null descriptor.
1935 <N_Unchecked_Type_Conversion>: If the target uses descriptors for
1936 vtables, the source type is the descriptor type and the target type
1937 is a pointer type, first build the pointer.
1938 * utils.c (init_gigi_decls): If the target uses descriptors for vtables
1939 build the descriptor type and the null descriptor.
1940
e1da2b17
EB
19412008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1942
1943 * decl.c (prepend_attributes): Fix typo.
1944 * trans.c (Pragma_to_gnu): Likewise.
1945 * utils.c (gnat_genericize): Likewise.
1946
2b3dffa6
EB
19472008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1948 Richard Kenner <kenner@adacore.com>
1949
1950 * ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Only set it when bit-packed.
1951 * decl.c (gnat_to_gnu_entity): Adjust for above change.
1952 <E_Record_Type>: Try to get a better form of the component for
1953 packing, even if it has an integral mode.
1954 <E_Record_Subtype>: Likewise.
1955 * trans.c (gnat_to_gnu): Do not require BLKmode for the special
1956 exception suppressing the final conversion between record types.
1957
ba3f46d0
EB
19582008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1959
1960 * decl.c (gnat_to_gnu_entity) <object>: If -gnatd.a and not optimizing
1961 alignment for space, promote the alignment of non-scalar variables with
1962 no size and alignment.
1963 * gigi.h (gnat_types_compatible_p): Declare.
1964 * misc.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Set to above predicate.
1965 * trans.c (gnat_to_gnu): Revert revision 129339 change. Minor cleanup.
1966 * utils.c (gnat_types_compatible_p) : New predicate.
1967 (convert): Use it throughout to test for cases where a mere view
1968 conversion is sufficient.
1969 * utils2.c (build_binary_op): Minor tweaks.
1970 (build_unary_op): Likewise.
1971
373140ef
EB
19722008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1973
1974 * decl.c (adjust_packed): Expand comment.
1975
ea081ad7
AC
19762008-04-08 Arnaud Charlet <charlet@adacore.com>
1977
1978 * s-tasuti.ads: Use Task_Address instead of System.Address.
1979
1980 * makeutl.adb (Path_Or_File_Name): New function
1981
1982 * nlists.ads, itypes.ads: Update comments.
1983
1984 * s-crtl.ads (malloc32, realloc32): New functions.
1985
1986 * s-auxdec.ads (Short_Address_Size): New constant.
1987
1988 * a-taside.adb, s-tasdeb.adb: Use Task_Address.
1989
1990 * s-ststop.ads, s-ststop.adb: New file.
1991
1992 * exp_tss.ads, s-taprop-lynxos.adb: Update comments.
1993 Minor reformatting.
1994
d563d3f0
AC
19952008-04-08 Pascal Obry <obry@adacore.com>
1996
1997 * g-sercom.ads, g-sercom.adb (Data_Rate): Add B115200.
1998 (Stop_Bits_Number): New type.
1999 (Parity_Check): Likewise.
2000 (Set): Add parameter to set the number of stop bits and
2001 the parity. Parameter timeout is now a duration instead
2002 of a plain integer.
2003
2004 * g-sercom-linux.adb:
2005 Implement the stop bits and parity support for GNU/Linux.
2006 Fix handling of timeout, it must be given in tenth of seconds.
2007
2008 * g-sercom-mingw.adb:
2009 Implement the stop bits and parity support for Windows.
2010 Use new s-win32.ads unit instead of declaring Win32 services
2011 directly into this body.
2012 Update handling of timeout as now a duration.
2013
2014 * s-win32.ads, s-winext.ads: New files.
2015
20162008-04-08 Eric Botcazou <ebotcazou@adacore.com>
2017 Arnaud Charlet <charlet@adacore.com>
2018
2019 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads: Removed.
2020
2021 s-taspri-posix-noaltstack.ads, s-linux.ads, s-linux-alpha.ads,
2022 s-linux-hppa.ads: New files. Disable alternate stack on ia64-hpux.
2023
2024 * s-osinte-lynxos-3.ads,
2025 (Alternate_Stack): Remove when not needed. Simplify declaration
2026 otherwise.
2027 (Alternate_Stack_Size): New constant.
2028
2029 s-osinte-mingw.ads, s-taprop-mingw.adb: Code clean up: avoid use of
2030 'Unrestricted_Access.
2031
2032 * s-osinte-hpux.ads, s-osinte-solaris-posix.ads, s-osinte-aix.ads,
2033 s-osinte-lynxos.ads, s-osinte-freebsd.ads s-osinte-darwin.ads,
2034 s-osinte-tru64.ads, s-osinte-irix.ads, s-osinte-linux.ads,
2035 s-osinte-solaris.ads, s-osinte-vms.ads
2036 (SA_ONSTACK): New constant.
2037 (stack_t): New record type.
2038 (sigaltstack): New imported function.
2039 (Alternate_Stack): New imported variable.
2040 (Alternate_Stack_Size): New constant.
2041
2042 * system-linux-x86_64.ads: (Stack_Check_Probes): Set to True.
2043
2044 * s-taspri-lynxos.ads, s-taspri-solaris.ads, s-taspri-tru64.ads,
ea081ad7
AC
2045 s-taspri-hpux-dce.ads, s-taspri-dummy.ads, s-taspri-posix.ads,
2046 s-taspri-vms.ads (Task_Address): New subtype of System.Address
d563d3f0
AC
2047 (Task_Address_Size): New constant size of System.Address
2048 (Alternate_Stack_Size): New constant.
2049
2050 * s-taprop-posix.adb, s-taprop-linux.adb (Get_Stack_Attributes): Delete.
2051 (Enter_Task): Do not notify stack to System.Stack_Checking.Operations.
2052 Establish the alternate stack if the platform makes use of n alternate
2053 signal stack for stack overflows.
2054 (Create_Task): Take into account the alternate stack in the stack size.
2055 (Initialize): Save the address of the alternate stack into the ATCB for
2056 the environment task.
2057 (Create_Task): Fix assertions for NPTL library (vs old LinuxThreads).
2058
ea081ad7 2059 * s-parame.adb (Minimum_Stack_Size): Increase value to 16K
d563d3f0
AC
2060
2061 * system-linux-x86.ads: (Stack_Check_Probes): Set to True.
2062
2063 * s-intman-posix.adb:
2064 (Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an
2065 alternate signal stack for stack overflows.
2066
2067 * init.c (__gnat_adjust_context_for_raise, Linux version): On i386 and
2068 x86-64, adjust the saved value of the stack pointer if the signal was
2069 raised by a stack checking probe.
2070 (HP-UX section): Use global __gnat_alternate_stack as signal handler
2071 stack and only for SIGSEGV.
2072 (Linux section): Likewise on x86 and x86-64.
2073 [VxWorks section]
2074 (__gnat_map_signal): Now static.
2075 (__gnat_error_handler): Not static any more.
2076 (__gnat_adjust_context_for_raise): New function. Signal context
2077 adjustment for PPC && !VTHREADS && !RTP, as required by the zcx
2078 propagation circuitry.
2079 (__gnat_error_handler): Second argument of a sigaction handler is a
2080 pointer, not an int, and is unused.
2081 Adjust signal context before mapping to exception.
2082 Install signal handlers for LynxOS case.
2083
2084 * s-taskin.ads (Common_ATCB): New field Task_Alternate_Stack.
2085 (Task_Id): Set size to Task_Address_Size
2086 (To_Task_id): Unchecked convert from Task_Address vice System.Address
2087 (To_Address): Unchecked convert to Task_Address vice System.Address
2088
2089 * s-tassta.adb (Task_Wrapper): Define the alternate stack and save its
2090 address into the ATCB if the platform makes use of an alternate signal
2091 stack for stack overflows.
2092 (Free_Task): Add call to Finalize_Attributes_Link.
2093 Add argument Relative_Deadline to pass the value specified for
2094 the task. This is not yet used for any target.
2095
2096 * s-tassta.ads (Create_Task): Add argument Relative_Deadline to pass
2097 the value specified for the task.
2098
20992008-04-08 Arnaud Charlet <charlet@adacore.com>
2100
2101 (s-osinte-vxworks6.ads): Removed, merged with s-osinte-vxworks.ads/.adb
2102 (s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads,
2103 s-vxwext-rtp.adb): New files.
2104
2105 * s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-osinte-vxworks.adb:
2106 Minor updates to accomodate changes above.
2107
21082008-04-08 Pascal Obry <obry@adacore.com>
2109
2110 * a-exetim-mingw.adb, s-gloloc-mingw.adb, s-taprop-mingw.adb,
2111 s-tasinf-mingw.ad{s,b}, s-taspri-mingw.ads:
2112 Use new s-win32.ads unit instead of declaration
2113 from s-osinte-mingw.ads.
2114
2115 * s-osinte-mingw.ads:
2116 Move all non tasking based interface to s-win32.ads.
2117
2118 * s-osprim-mingw.adb:
2119 Remove duplicated declarations and use s-win32.ads
2120 unit instead.
2121
21222008-04-08 Vincent Celier <celier@adacore.com>
2123 Arnaud Charlet <charlet@adacore.com>
2124
2125 * mlib-tgt-aix.adb, mlib-tgt-darwin.adb, mlib-tgt-hpux.adb,
2126 mlib-tgt-irix.adb, mlib-tgt-linux.adb, mlib-tgt-lynxos.adb,
2127 mlib-tgt-solaris.adb, mlib-tgt-tru64.adb, mlib-tgt-vms.adb,
2128 mlib-tgt-vms.ads, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
2129 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb: Renamed into...
2130
2131 * mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
2132 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-irix.adb,
2133 mlib-tgt-specific-linux.adb, mlib-tgt-specific-lynxos.adb,
2134 mlib-tgt-specific-solaris.adb, mlib-tgt-specific-tru64.adb,
2135 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads,
2136 mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2137 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb,
2138 mlib-tgt-specific-mingw.adb: New names.
2139
2140 * Makefile.in:
2141 On VxWorks platforms use s-stchop-limit.ads for s-stchop.ads
2142 Get rid of gnatbl.
2143 (EXTRA_GNATRTL_NONTASKING_OBJS): Add s-win32.o
2144 Files mlib-tgt-*.adb have been renamed mlib-tgt-specific-*.adb
2145 Minor updates for VMS
2146
ea081ad7
AC
2147 * gnatbl.c: Removed.
2148
d563d3f0
AC
21492008-04-08 Thomas Quinot <quinot@adacore.com>
2150
2151 * g-expect-vms.adb, a-textio.adb, a-witeio.adb, exp_dbug.adb,
2152 g-expect.adb, g-locfil.adb, gnatchop.adb, gnatdll.adb, gnatlbr.adb,
2153 gnatmem.adb, g-regist.adb, i-vxwork.ads, mlib-utl.adb, i-vxwork-x86.ads,
2154 a-ztexio.adb, g-enblsp-vms-alpha.adb, g-enblsp-vms-ia64.adb,
2155 s-os_lib.adb, s-regpat.adb, s-regpat.ads: Fix incorrect casing of
2156 ASCII.NUL throughout.
2157
21582008-04-08 Arnaud Charlet <charlet@adacore.com>
2159 Matthew Heaney <heaney@adacore.com>
2160
2161 * a-cgcaso.adb, a-convec.adb: (Swap, Sift): Avoid use of complex
2162 renaming.
2163
2164 * a-cgaaso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads,
2165 a-crdlli.ads, a-coormu.ads, a-ciormu.ads: modified header to conform
2166 to convention for non-RM specs.
2167 Add descriptive header, and documented each operation
2168 document each operation
2169
21702008-04-08 Robert Dewar <dewar@adacore.com>
2171 Bob Duff <duff@adacore.com>
2172 Gary Dismukes <dismukes@adacore.com>
2173 Ed Schonberg <schonberg@adacore.com>
2174
2175 * alloc.ads: Add entries for Obsolescent_Warnings table
2176
2177 * einfo.ads, einfo.adb: Minor reformatting.
2178 (Is_Discriminal): New subprogram.
2179 (Is_Prival): New subprogram.
2180 (Is_Protected_Component): New subprogram.
2181 (Is_Protected_Private): Removed.
2182 (Object_Ref, Set_Object_Ref): Removed.
2183 (Prival, Set_Prival): Change assertion.
2184 (Privals_Chain, Set_Privals_Chain): Removed.
2185 (Prival_Link, Set_Prival_Link): New subprogram.
2186 (Protected_Operation, Set_Protected_Operation): Removed.
2187 (Protection_Object, Set_Protection_Object): New subprogram.
2188 (Write_Field17_Name): Remove case for Object_Ref.
2189 (Write_Field20_Name): Add case for Prival_Link.
2190 (Write_Field22_Name): Remove case for Protected_Operation,
2191 Privals_Chain.
2192 Add case for Protection_Object.
2193 (Can_Use_Internal_Rep): Make this into a [base type only] attribute,
2194 so clients
2195 (Overlays_Constant): New flag
2196 (Is_Constant_Object): New predicate
2197 (Is_Standard_Character_Type): New predicate
2198 (Optimize_Alignment_Space): New flag
2199 (Optimize_Alignment_Time): New flag
2200 (Has_Postconditions): New flag
2201 (Obsolescent_Warrning): Field removed
2202 (Spec_PPC_List): New field
2203 (Relative_Deadline_Variable, Set_Relative_Deadline_Variable): Add
2204 subprograms to get and set the relative deadline associated to a task.
2205
2206 * exp_attr.adb (May_Be_External_Call): Account for the case where the
2207 Access attribute is part of a named parameter association.
2208 (Expand_Access_To_Protected_Op): Test for the attribute occurring
2209 within an init proc and use that directly as the scope rather than
2210 traversing up to the protected operation's enclosing scope. Only apply
2211 assertion on Is_Open_Scopes in the case the scope traversal is done.
2212 For the init proc case use the address of the first formal (_init) as
2213 the protected object reference.
2214 Implement Invalid_Value attribute
2215 (Expand_N_Attribute_Reference): Case Attribute_Unrestricted_Access.
2216 contents of the dispatch table there is no need to duplicate the
2217 itypes associated with record types (i.e. the implicit full view
2218 of private types).
2219 Implement Enum_Val attribute
2220 (Expand_N_Attribute_Reference, case Old): Properly handle appearence
2221 within _Postconditions procedure
2222 (Expand_N_Attribute_Reference, case Result): Implement new attribute
2223
2224 * exp_ch5.adb (Expand_N_Simple_Return_Statement): Handle case in which
2225 a return statement calls a function that is not available in
2226 configurable runtime.
2227 (Analyze_If_Statement): don't optimize simple True/False cases in -O0
2228 (Expand_Non_Function_Return): Generate call to _Postconditions proc
2229 (Expand_Simple_Function_Return): Ditto
2230
2231 * frontend.adb: Add call to Sem_Aux.Initialize
2232
2233 * sem_aux.ads, sem_aux.adb: New file.
2234
2235 * par-prag.adb: Add entries for pragmas Precondition/Postcondition
2236 Add new Pragma_Relative_Deadline.
2237 Add support for pragmas Check and Check_Policy
2238
2239 * sem_attr.ads, sem_attr.adb (Check_Not_CPP_Type): New subprogram.
2240 (Check_Stream_Attribute): Add missing check (not allowed in CPP types)
2241 (Analyze_Attribute): In case of attributes 'Alignment and 'size add
2242 missing check because they are not allowed in CPP tagged types.
2243 Add Sure parameter to Note_Possible_Modification calls
2244 Add implementation of Invalid_Value attribute
2245 Implement new attribute Has_Tagged_Values
2246 Implement Enum_Val attribute
2247 (Analyze_Attribute, case Range): Set Name_Req True for prefix of
2248 generated attributes.
2249 (Analyze_Attribute, case Result): If prefix of the attribute is
2250 overloaded, it always resolves to the enclosing function.
2251 (Analyze_Attribute, case Result): Properly deal with analysis when
2252 Postconditions are not active.
2253 (Resolve_Attribute, case Result): Properly deal with appearence during
2254 preanalysis in spec.
2255 Add processing for attribute Result
2256
2257 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Code cleanup
2258 for operators.
2259 (Analyze_Subprogram_Body): Install private_with_clauses when the body
2260 acts as a spec.
2261 (Check_Inline_Pragma): recognize an inline pragma that appears within
2262 the subprogram body to which it applies.
2263 (Analyze_Function_Return): Check that type of the expression of a return
2264 statement in a function with a class-wide result is not declared at a
2265 deeper level than the function.
2266 (Process_PPCs): Deal with enabling/disabling, using PPC_Enabled flag
2267 (Verify_Overriding_Indicator): Handle properly subprogram bodies for
2268 user- defined operators.
2269 (Install_Formals): Moved to spec to allow use from Sem_Prag for
2270 analysis of precondition/postcondition pragmas.
2271 (Analyze_Subprogram_Body.Last_Real_Spec_Entity): New name for
2272 Last_Formal, along with lots of comments on what this is about
2273 (Analyze_Subprogram_Body): Fix case where we move entities from the
2274 spec to the body when there are no body entities (now possible with
2275 precondition and postcondition pragmas).
2276 (Process_PPCs): New procedure
2277 (Analyze_Subprogram_Body): Add call to Process_PPCs
2278
2279 * sem_ch8.adb (Use_One_Type): refine warning on a redundant use_type
2280 clause.
2281 (Pop_Scope): Restore Check_Policy_List on scope exit
2282 (Push_Scope): Save Check_Policy_List on scope entry
2283 Change name In_Default_Expression => In_Spec_Expression
2284 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2285 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2286 (Analyze_Object_Renaming): Allow 'Reference as object
2287 (Analyze_Pragma, case Restriction_Warnings): Call GNAT_Pragma
2288 (Process_Restrictions_Or_Restriction_Warnings): Check for bad spelling
2289 of restriction identifier.
2290 Add Sure parameter to Note_Possible_Modication calls
2291
2292 * sem_prag.ads, sem_prag.adb (Analyze_Pragma, case Stream_Convert):
2293 Don't check for primitive operations when calling Rep_Item_Too_Late.
2294 (Process_Import_Or_Interface): Do not place flag on formal
2295 subprograms.
2296 (Analyze_Pragma, case Export): If the entity is a deferred constant,
2297 propagate information to full view, which is the one elaborated by the
2298 back-end.
2299 (Make_Inline): the pragma is effective if it applies to an internally
2300 generated subprogram declaration for a body that carries the pragma.
2301 (Analyze_Pragma, case Optimize_Alignment): Set new flag
2302 Optimize_Alignment_Local.
2303 (Analyze_PPC_In_Decl_Part): New procedure
2304 (Get_Pragma_Arg): Moved to outer level
2305 (Check_Precondition_Postcondition): Change to allow new visibility
2306 rules for package spec
2307 (Analyze_Pragma, case Check_Policy): Change placement rules to be
2308 same as pragma Suppress/Unsuppress.
2309 Change name In_Default_Expression => In_Spec_Expression
2310 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2311 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2312 (Check_Precondition_Postcondition): Do proper visibility preanalysis
2313 for the case of these pragmas appearing in the spec.
2314 (Check_Enabled): New function
2315 (Initialize): New procedure
2316 (Tree_Read): New procedure
2317 (Tree_Write): New procedure
2318 (Check_Precondition_Postcondition): New procedure
2319 Implement pragmas Check and Check_Policy
2320 Merge Assert processing with Check
2321
2322 * sem_warn.adb (Warn_On_Known_Condition): Handle pragma Check
2323 New warning flag -gnatw.e
2324
2325 * sinfo.ads, sinfo.adb (Has_Relative_Deadline_Pragma): New function
2326 returning whether a task (or main procedure) has a pragma
2327 Relative_Deadline.
2328 (Set_Has_Relative_Deadline_Pragma): Procedure to indicate that a task
2329 (or main procedure) has a pragma Relative_Deadline.
2330 Add Next_Pragma field to N_Pragma node
2331 (PPC_Enabled): New flag
2332 (Next_Pragma): Now used for Pre/Postcondition processing
2333
2334 * snames.h, snames.ads, snames.adb: New standard name
2335 Inherit_Source_Path
2336 Add entry for 'Invalid_Value attribute
2337 Add entry for new attribute Has_Tagged_Values
2338 Add entry for Enum_Val attribute
2339 Add new standard names Aggregate, Configuration and Library.
2340 Add _Postconditions
2341 Add _Result
2342 Add Pragma_Precondition
2343 Add Pragma_Postcondition
2344 Add Attribute_Result
2345 New standard name Archive_Builder_Append_Option
2346 (Preset_Names): Add _relative_deadline and relative_deadline definitions
2347 There was also a missing non_preemptive_within_priorities.
2348 (Get_Pragma_Id, Is_Pragma_Name): Add support for pragma
2349 Relative_Deadline.
2350 Add support for pragmas Check and Check_Policy
2351
2352 * tree_gen.adb: Call Sem_Aux.Tree_Write
2353
2354 * tree_in.adb: Call Sem_Aux.Tree_Read
2355
2356 * exp_ch11.adb (Expand_N_Raise_Statement): New Build_Location calling
2357 sequence
2358
2359 * exp_intr.adb (Expand_Source_Info): New Build_Location calling
2360 sequence
2361
2362 * exp_prag.adb (Expand_Pragma_Relative_Deadline): New procedure.
2363 (Expand_N_Pragma): Call the appropriate procedure for expanding pragma
2364 Relative_Deadline.
2365 (Expand_Pragma_Check): New procedure
2366
2367 * sinput.ads, sinput.adb (Build_Location_String): Now appends to name
2368 buffer.
2369
2370 * sinfo.adb (PPC_Enabled): New flag
2371
23722008-04-08 Robert Dewar <dewar@adacore.com>
2373 Gary Dismukes <dismukes@adacore.com>
2374 Javier Miranda <miranda@adacore.com>
2375 Ed Schonberg <schonberg@adacore.com>
2376
2377 * fe.h: Remove global Optimize_Alignment flag, no longer used
2378
2379 * layout.adb: Test Optimize_Alignment flags rather than global switch
2380
2381 * lib.ads, lib.adb: New OA_Setting field in library record
2382
2383 * lib-load.adb: New OA_Setting field in library record
2384
2385 * lib-writ.ads, lib-writ.adb (Collect_Withs, Write_With_Lines): Place
2386 units mentioned in limited_with_ clauses in the ali file, with an
2387 'Y' marker.
2388 New Ox fields in U line
2389
2390 * opt.adb: New flag Optimize_Alignment_Local
2391 (Check_Policy_List[_Config]): New flags
2392
2393 * opt.ads (Invalid_Value_Used): New flag
2394 New switch Optimize_Alignment_Local
2395 (Warn_On_Parameter_Order): New flag
2396 (Check_Policy_List[_Config]): New flags
2397
2398 * ali.ads, ali.adb: Add indicator 'Y' to mark mark the presence of
2399 limited_with clauses.
2400 New data structures for Optimize_Alignment
2401
2402 * bcheck.adb (Check_Consistent_Restriction_No_Default_Initialization):
2403 New procedure
2404 (Check_Consistent_Optimize_Alignment): Rework for new structure
2405 (Check_Consistent_Restrictions): Fix incorrect error message
2406
2407 sem_ch10.adb (Decorate_Tagged_Type): Set the Parent field of a newly
2408 created class-wide type (to the Parent field of the specific type).
2409 (Install_Siblings): Handle properly private_with_clauses on subprogram
2410 bodies and on generic units.
2411 (Analyze_With_Clause, Install_Limited_Withed_Unit): Guard against an
2412 illegal limited_with_clause that names a non-existent package.
2413 (Check_Body_Required): Determine whether a unit named a limited_with
2414 clause needs a body.
2415 (Analyze_Context): A limited_with_clause is illegal on a unit_renaming.
2416 Capture Optimize_Alignment settings to set new OA_Setting field in
2417 library record.
2418 (Build_Limited_Views): Include task and protected type declarations.
2419
2420 * sem_ch3.ads, sem_ch3.adb (Analyze_Object_Declaration): Handle the
2421 case of a possible constant redeclaration where the current object is
2422 an entry index constant.
2423 (Analyze_Object_Declaration): Generate an error in case of CPP
2424 class-wide object initialization.
2425 (Analyze_Object_Declaration): Add extra information on warnings for
2426 declaration of unconstrained objects.
2427 (Access_Type_Declaration): Set Associated_Final_Chain to Empty, to avoid
2428 conflicts with the setting of Stored_Constraint in the case where the
2429 access type entity has already been created as an E_Incomplete_Type due
2430 to a limited with clause.
2431 Use new Is_Standard_Character_Type predicate
2432 (Analyze_Object_Declaration): Apply access_constant check only after
2433 expression has been resolved, given that it may be overloaded with
2434 several access types.
2435 (Constant_Redeclaration): Additional legality checks for deferred
2436 constant declarations tha involve anonymous access types and/or null
2437 exclusion indicators.
2438 (Analyze_Type_Declaration): Set Optimize_Alignment flags
2439 (Analyze_Subtype_Declaration): Ditto
2440 (Analyze_Object_Declaration): Ditto
2441 (Analyze_Object_Declaration): Don't count tasks in generics
2442 Change name In_Default_Expression => In_Spec_Expression
2443 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2444 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2445 (Process_Discriminants): Additional check for illegal use of default
2446 expressions in access discriminant specifications in a type that is not
2447 explicitly limited.
2448 (Check_Abstract_Overriding): If an inherited function dispaches on an
2449 access result, it must be overridden, even if the type is a null
2450 extension.
2451 (Derive_Subprogram): The formals of the derived subprogram have the
2452 names and defaults of the parent subprogram, even if the type is
2453 obtained from the actual subprogram.
2454 (Derive_Subprogram): In the presence of interfaces, a formal of an
2455 inherited operation has the derived type not only if it descends from
2456 the type of the formal of the parent operation, but also if it
2457 implements it. This is relevant for the renamings created for the
2458 primitive operations of the actual for a formal derived type.
2459 (Is_Progenitor): New predicate, to determine whether the type of a
2460 formal in the parent operation must be replaced by the derived type.
2461
2462 * sem_util.ads, sem_util.adb (Has_Overriding_Initialize): Make
2463 predicate recursive to handle components that have a user-defined
2464 Initialize procedure. Handle controlled derived types whose ancestor
2465 has a user-defined Initialize procedured.
2466 (Note_Possible_Modification): Add Sure parameter, generate warning if
2467 sure modification of constant
2468 Use new Is_Standard_Character_Type predicate
2469 (Find_Parameter_Type): when determining whether a protected operation
2470 implements an interface operation, retrieve the type of the formal from
2471 the entity when the formal is an access parameter or an
2472 anonymous-access-to-subprogram.
2473 Move Copy_Parameter_List to sem_util, for use when building stubbed
2474 subprogram bodies.
2475 (Has_Access_Values): Tagged types now return False
2476 (Within_HSS_Or_If): New procedure
2477 (Set_Optimize_Alignment_Flags): New procedure
2478 Change name In_Default_Expression => In_Spec_Expression
2479 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
2480 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
2481
24822008-04-08 Tristan Gingold <gingold@adacore.com>
2483
2484 * s-fileio.adb: Name_Error shouldn't be raised for a tempory file.
2485
24862008-04-08 Tristan Gingold <gingold@adacore.com>
2487
2488PR ada/10768
2489
2490 * cuintp.c: Fix 16 bits issue for AVR.
2491 On AVR, integer is 16 bits, so it can't be used to do math with
2492 Base (=32768).
2493 So use long_integer instead.
2494
24952008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2496
2497 * a-calend-vms.ads, a-calend-vms.adb: Add with and use clause for
2498 System.OS_Primitives.
2499 Change type of various constants, parameters and local variables from
2500 Time to representation type OS_Time.
2501 (To_Ada_Time, To_Unix_Time): Correct sign of origin shift.
2502 Remove the declaration of constant Mili_F from several routines. New
2503 body for internal package Conversions_Operations.
2504 (Time_Of): Add default parameters for several formals.
2505
2506 * a-caldel.adb: Minor reformatting
2507
2508 * a-calend.ads, a-calend.adb: New body for internal package
2509 Conversions_Operations.
2510 (Time_Of): Add default parameters for several formals.
2511
2512 * Makefile.rtl: Add a-ststop
2513 Add Ada.Calendar.Conversions to the list of runtime files.
2514 Add g-timsta
2515
2516 * a-calcon.adb, a-calcon.ads: New files.
2517
25182008-04-08 Jose Ruiz <ruiz@adacore.com>
2519 Tristan Gingold <gingold@adacore.com>
2520
2521 * s-interr-dummy.adb, s-interr-vms.adb, s-interr-sigaction.adb
2522 (Install_Restricted_Handlers): New procedure
2523 which is a simplified version of Install_Handlers that does not store
2524 previously installed.
2525
2526 * s-interr-vxworks.adb: Fix ACATS cxc3001
2527 On VxWorks interrupts can't be detached.
2528 (Install_Restricted_Handlers): New procedure.
2529
2530 * s-interr.ads, s-interr.adb (Install_Restricted_Handlers): New
2531 procedure.
2532
25332008-04-08 Olivier Hainque <hainque@adacore.com>
2534
2535 * s-intman-vxworks.ads, s-intman-vxworks.adb
2536 (Map_And_Raise_Exception): Remove. Was an import of only part of the
2537 required services already implemented elsewhere.
2538 (Notify_Exception): Delete body, import __gnat_error_handler instead.
2539 (Initialize): Add SA_SIGINFO to the sa_flags, to get the sigcontext
2540 argument passed to the handler, which we need for ZCX propagation
2541 purposes.
2542
25432008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2544
2545 * adaint.h, adaint.c (__gnat_current_time_string): New routine.
2546
2547 * g-timsta.adb, g-timsta.ads: New files.
2548
25492008-04-08 Robert Dewar <dewar@adacore.com>
2550
2551 * a-except-2005.ads, a-except-2005.adb, a-except.ads, a-except.adb
2552 (Raise_Exception): In accordance with AI-446, raise CE for Null_Id
2553 (Raise_Exception_Always): Fix documentation accordingly
2554
25552008-04-08 Robert Dewar <dewar@adacore.com>
2556
2557 * a-strbou.ads, a-strbou.adb (From_String): New procedure (for use by
2558 Stream_Convert)
2559
2560 * sem_ch13.ads (Rep_Item_Too_Late): Document that Stream_Convert sets
2561 FOnly
2562
25632008-04-08 Javier Miranda <miranda@adacore.com>
2564 Robert Dewar <dewar@adacore.com>
2565 Ed Schonberg <schonberg@adacore.com>
2566
2567 * a-tags.adb (Register_Interface_Offset): New subprogram.
2568 (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment).
2569 (To_Predef_Prims_Table_Ptr): Removed.
2570 (Acc_Size): Removed.
2571 (To_Acc_Size): Removed.
2572 (Parent_Size): Modified to the call the subprogram returning the size of
2573 the parent by means of the new TSD component Size_Func.
2574
2575 * a-tags.ads (Offset_To_Top_Ptr): New access type declaration.
2576 (DT_Offset_To_Top_Offset): New constant value that is used to generate
2577 code referencing the Offset_To_Top component of the dispatch table's
2578 prologue.
2579 (Prim_Ptr): New declaration of access to procedure. Used to avoid the
2580 use of 'address to initialize dispatch table slots.
2581 (Size_Func): New component of the TSD. Used by the run-time to call the
2582 size primitive of the tagged type.
2583
2584 * checks.adb (Apply_Access_Check): Avoid check when accessing the
2585 Offset_To_Top component of a dispatch table.
2586 (Null_Exclusion_Static_Checks): If the non-null access type appears in a
2587 deferred constant declaration. do not add a null expression, to prevent
2588 spurious errors when full declaration is analyzed.
2589 (Apply_Discriminant_Check): If both discriminant constraints share a
2590 node which is not static but has no side effects, do not generate a
2591 check for that discriminant.
2592 (Generate_Index_Checks): Set Name_Req to true in call to duplicate
2593 subexpr, since the prefix of an attribute is a name.
2594
2595 * checks.ads: Fix nit in comment.
2596
2597 * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec
2598 and body of predefined primitives in case of CPP tagged type
2599 derivations.
2600 (Freeze_Type): Deal properly with no storage pool case
2601 (Make_Predefined_Primitive_Specs): Generate specification of abstract
2602 primitive Deep_Adjust if a nonlimited interface is derived from a
2603 limited interface.
2604 (Build_Dcheck_Functions): Create discriminant-checking functions only
2605 for variants that have some component(s).
2606 (Build_Slice_Assignment): In expanded code for slice assignment, handle
2607 properly the case where the slice bounds extend to the last value of the
2608 underlying representation.
2609 (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value
2610 (Is_Variable_Size_Record): An array component has a static size if
2611 index bounds are enumeration literals.
2612
2613 * exp_disp.adb (Make_DT): Use the first subtype to determine whether
2614 an external tag has been specified for the type.
2615 (Building_Static_DT): Add missing support for private types.
2616 (Make_DT): Add declaration of Parent_Typ to ensure consistent access
2617 to the entity associated with the parent of Typ. This is done to
2618 avoid wrong access when the parent is a private type.
2619 (Expand_Interface_Conversion): Improve error message when the
2620 configurable runtime has no support for dynamic interface conversion.
2621 (Expand_Interface_Thunk): Add missing support to interface types in
2622 configurable runtime.
2623 (Expand_Dispatching_Call): remove obsolete code.
2624 (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and
2625 ensure that all subtypes and aggregates associated with dispatch
2626 tables have the attribute Is_Dispatch_Table_Entity set to true.
2627 (Register_Primitive): Rename one variable to improve code reading.
2628 Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o
2629 of the pointer to the 'size primitive in the TSD.
2630
2631 * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity.
2632 (RE_Offset_To_Top_Ptr): New entity.
2633 (RE_Register_Interface_Offset): New entity.
2634 (RE_Set_Dynamic_Offset_To_Top): New entity.
2635 (RE_Set_Offset_To_Top): Removed entity.
2636 (RE_Prim_Ptr): New entity
2637 (RE_Size_Func): New entity
2638 (RE_Size_Ptr): New entity
2639 (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF.
2640 (Ada_Dispatching_Child): Define this new subrange.
2641 (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock,
2642 RE_Time_Span, and RE_Time_Span_Zero).
2643 (RE_Unit_Table): Add new required run-time calls
2644
2645 * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching
2646 children.
2647
2648 * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram.
2649 (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that
2650 initializes the Offset_To_Top component of a dispatch table.
2651 (Build_Predef_Prims): Removed.
2652 (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by
2653 its actual code.
2654 (Build_Set_Size_Function): New subprogram.
2655
2656 * exp_ch13.adb: Do not generate storage variable for storage_size zero
2657 (Expand): Handle setting/restoring flag Inside_Freezing_Actions
2658
26592008-04-08 Robert Dewar <dewar@adacore.com>
2660
2661 * a-ztdeau.adb, a-tideau.adb, a-wtdeau.adb (Puts_Dec): Fix error in
2662 computing Fore when Exp > 0
2663
26642008-04-08 Robert Dewar <dewar@adacore.com>
2665
2666 * back_end.adb: Remove Big_String_Ptr declarations (now in Types)
2667
2668 * errout.adb: Remove Big_String_Ptr declarations (now in Types)
2669 Change name Is_Style_Msg to Is_Style_Or_Info_Msg
2670
2671 * fmap.adb: Remove Big_String declarations (now in Types)
2672 (No_Mapping_File): New Boolean global variable
2673 (Initialize): When mapping file cannot be read, set No_Mapping_File to
2674 False.
2675 (Update_Mapping_File): Do nothing if No_Mapping_File is True. If the
2676 tables were empty before adding entries, open the mapping file
2677 with Truncate = True, instead of delete/re-create.
2678
2679 * fname-sf.adb: Remove Big_String declarations (now in Types)
2680
2681 * s-strcom.adb, g-dyntab.ads, g-table.ads, s-carsi8.adb,
2682 s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for
2683 big pointer types
2684
2685 * table.ads: Add for Table_Ptr'Storage_Size use 0
2686
2687 * types.ads: Add Big_String declarations
2688 Add Size_Clause of zero for big pointer types
2689
26902008-04-08 Vincent Celier <celier@adacore.com>
2691
2692 * clean.adb (Parse_Cmd_Line): Recognize switch --subdirs=
2693 (Usage): Add line for switch --subdirs=
2694 Add new switch -eL, to follow symbolic links when processing project
2695 files.
2696
2697 * gnatcmd.adb: Process switches -eL and --subdirs=
2698 (Non_VMS_Usage): Output "gnaampcmd" instead of "gnat", and call
2699 Program_Name to get proper tool names when AAMP_On_Target is set.
2700 (Gnatcmd): Call Add_Default_Search_Dirs and Get_Target_Parameters to get
2701 AAMP_On_Target set properly for use of GNAAMP tools (this is needed by
2702 Osint.Program_Name).
2703
2704 * gnatname.adb: (Scan_Args): Recognize switches -eL and --subdirs=
2705 (Usage): Add lines for switches -eL and --subdirs=
2706
2707 * makeusg.adb: Add line for switch --subdirs=
2708
2709 * prj.ads:
2710 (Source_Data): New Boolean component Compiled, defaulted to True
2711 (Empty_File_Name: New global variable in private part, initialized in
2712 procedure Initialize.
2713 (Subdirs_Option): New constant string
2714 (Subdirs): New String_Ptr global variable
2715 (Language_Config): New component Include_Compatible_Languages
2716 (Project_Qualifier): New type for project qualifiers
2717 (Project_Data): New component Qualifier
2718 (Project_Configuration): New component Archive_Builder_Append_Option
2719
2720 * prj-nmsc.adb (Get_Unit_Exceptions): When a unit is already in
2721 another imported project indicate the name of this imported project.
2722 (Check_File): When a unit is in two project files, indicate the project
2723 names and the paths of the source files for each project.
2724 (Add_Source): Set Compiled to False if compiler driver is empty. Only
2725 set object, dependency and switches file names if Compiled is True.
2726 (Process_Compiler): Allow the empty string for value of attribute Driver
2727 (Get_Directories): When Subdirs is not null and Object_Dir is not
2728 specified, locate and create if necessary the actual object dir.
2729 (Locate_Directory): When Subdirs is not empty and Create is not the
2730 empty string, locate and create if necessary the actual directory
2731 as a subdirectory of directory Name.
2732 (Check_Library_Attributes.Check_Library): Allow a project where the only
2733 "sources" are header files of file based languages to be imported by
2734 library projects, in multi-language mode (gprbuild).
2735 (Check_Library_Attributes.Check_Library): In multi-language mode
2736 (gprbuild), allow a library project to import a project with no
2737 sources, even when this is not declared explicitly.
2738 (Check_If_Externally_Built): A virtual project extending an externally
2739 built project is also externally built.
2740 (Check_Library_Attributes): For a virtual project extending a library
2741 project, inherit the library directory.
2742 (Process_Project_Level_Array_Attributes): Process new attribute
2743 Inherit_Source_Path.
2744 For projects with specified qualifiers "standard", "library" or
2745 "abstract", check that the project conforms to the qualifier.
2746 (Process_Project_Level_Simple_Attributes): Process new attribute
2747 Archive_Builder_Append_Option.
2748
2749 * switch-m.adb: (Scan_Make_Switches): Process switch --subdirs=
2750 (Normalize_Compiler_Switches): Only keep compiler switches that are
2751 passed to gnat1 by the gcc driver and that are stored in the ALI file
2752 by gnat1.
2753 Do not take into account switc -save-temps
2754
2755 * makegpr.adb (Compile_Link_With_Gnatmake): Transmit switch -eL if
2756 gprmake is called with -eL.
2757 (Scan_Arg): Recognize switch -eL
2758 (Usage): Add line for switch -eL
2759
2760 * prj.adb (Initialize): Initialize Empty_File_Name
2761 (Project_Empty): New component Qualifier
2762
2763 * prj-attr.ads, prj-attr.adb: New project level attribute
2764 Inherit_Source_Path.
2765 New project level attribute Archive_Builder_Append_Option
2766
2767 * prj-dect.adb: Replace System.Strings by GNAT.Strings.
2768
2769 * prj-ext.adb (Initialize_Project_Path): In Multi_Language mode, add
2770 <prefix>/lib/gnat in the project path, after <prefix>/share/gpr, for
2771 upward compatibility.
2772
2773 * prj-part.adb (Project_Path_Name_Of.Try_Path): In high verbosity, put
2774 each Trying ..." on different lines.
2775 (Parse_Single_Project): Recognize project qualifiers. Fail in qualifier
2776 is "configuration" when not in configuration. Fail when in configuration
2777 when a specified qualifier is other than "configuration".
2778
2779 * prj-proc.adb (Process_Declarative_Items): Link new elements of copied
2780 full associative array together.
2781 (Recursive_Process): Put the project qualifier in the project data
2782
2783 * prj-tree.ads, prj-tree.adb: (Project_Qualifier_Of): New function
2784 (Set_Project_Qualifier_Of): New procedure
2785
27862008-04-08 Robert Dewar <dewar@adacore.com>
2787
2788 * errout.ads: Update comments for new handling of info: messages
2789
2790 * erroutc.adb (Matches): New procedure
2791 (Warning_Specifically_Suppressed): Modified to handle multiple * chars
2792 (Is_Style_Or_Info_Msg): New name for Is_Style_Msg, now set for
2793 info messages as well as style messages.
2794
2795 * erroutc.ads: Remove unneeded fields from Specific_Warning_Entry
2796
2797 * sem_elab.adb (Supply_Bodies): Create actual bodies for stubbed
2798 subprograms.
2799 (Check_A_Call): Special "info: " warnings now have ? in the text
2800 (Elab_Warning): Use info message in static case
2801
28022008-04-08 Ed Schonberg <schonberg@adacore.com>
2803
2804 * exp_aggr.adb (Static_Array_Aggregate): Use Max_Aggr_Size to determine
2805 whether an array aggregate with static bounds and scalar components
2806 should be expanded into a static constant.
2807
28082008-04-08 Gary Dismukes <dismukes@adacore.com>
2809 Ed Schonberg <schonberg@adacore.com>
2810 Robert Dewar <dewar@adacore.com>
2811
2812 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Add tests of
2813 Has_Stream_Attribute_ Definition when checking for available stream
2814 attributes on parameters of a limited type in Ada 2005. Necessary for
2815 proper recognition of visible stream attribute clauses.
2816 (Has_Stream_Attribute_Definition): If the type is derived from a
2817 private type, then use the derived type's underlying type for checking
2818 whether it has stream attributes.
2819 (Validate_Object_Declaration): The check for a user-defined Initialize
2820 procedure applies also to types with controlled components or a
2821 controlled ancestor.
2822 Reject an object declaration in a preelaborated unit if the type is a
2823 controlled type with an overriding Initialize procedure.
2824 (Validate_Remote_Access_To_Class_Wide_Type): Return without further
2825 checking when the parent of a dereference is a selected component and
2826 the name has not been analyzed.
2827
2828 * sem_ch4.adb (Analyze_Selected_Component): Add checking for selected
2829 prefixes that are invalid explicit dereferences of remote
2830 access-to-class-wide values, first checking whether the selected
2831 component is a prefixed form of call to a tagged operation.
2832 (Analyze_Call): Remove code that issues an error for limited function
2833 calls in illegal contexts, as we now support all of the contexts that
2834 were forbidden here.
2835 Allow a function call that returns a task.and appears as the
2836 prefix of a selected component.
2837 (Analyze_Reference): Give error message if we try to make a 'Reference
2838 for an object that is atomic/aliased without its type having the
2839 corresponding attribute.
2840 (Analyze_Call): Remove condition checking for attributes to allow
2841 calls to functions with inherently limited results as prefixes of
2842 attributes. Remove related comment about Class attributes.
2843 (Analyze_Selected_Component): If the prefix is a remote type, check
2844 whether this is a prefixed call before reporting an error.
2845 (Complete_Object_Operation): If the controlling formal is an access to
2846 variable reject an actual that is a constant or an access to one.
2847 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
2848 primitive operations from base type.
2849
2850 * exp_ch4.adb (Expand_N_Indexed_Component): Test for prefix that is a
2851 build-in-place
2852 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
2853 (Expand_N_Selected_Component): Test for prefix that is a build-in-place
2854 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
2855 (Expand_N_Slice): Test for prefix that is a build-in-place function call
2856 and call Make_Build_In_Place_Call_In_Anonymous_Context.
2857 (Analyze_Call): Remove code that issues an error for limited function
2858 calls in illegal contexts, as we now support all of the contexts that
2859 were forbidden here.
2860 New calling sequence for Get_Simple_Init_Val
2861 (Expand_Boolean_Operator): Add call to Silly_Boolean_Array_Xor_Test
2862 (Expand_N_Op_Not): Add call to Silly_Boolan_Array_Not_Test
2863
28642008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2865 Ed Schonberg <schonberg@adacore.com>
2866 Robert Dewar <dewar@adacore.com>
2867
2868 * exp_ch2.adb: Minor reformatting.
2869 (Expand_Entry_Index_Parameter): Set the type of the identifier.
2870 (Expand_Entry_Reference): Add call to Expand_Protected_Component.
2871 (Expand_Protected_Component): New routine.
2872 (Expand_Protected_Private): Removed.
2873 Add Sure parameter to Note_Possible_Modification calls
2874
2875 * sem_ch12.ads, sem_ch12.adb (Analyze_Subprogram_Instantiation): The
2876 generated subprogram declaration must inherit the overriding indicator
2877 from the instantiation node.
2878 (Validate_Access_Type_Instance): If the designated type of the actual is
2879 a limited view, use the available view in all cases, not only if the
2880 type is an incomplete type.
2881 (Instantiate_Object): Actual is illegal if the formal is null-excluding
2882 and the actual subtype does not exclude null.
2883 (Process_Default): Handle properly abstract formal subprograms.
2884 (Check_Formal_Package_Instance): Handle properly defaulted formal
2885 subprograms in a partially parameterized formal package.
2886 Add Sure parameter to Note_Possible_Modification calls
2887 (Validate_Derived_Type_Instance): if the formal is non-limited, the
2888 actual cannot be limited.
2889 (Collect_Previous_Instances): Generate instance bodies for subprograms
2890 as well.
2891
2892 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Small): Don't
2893 try to set RM_Size.
2894 Add Sure parameter to Note_Possible_Modification calls
2895 (Analyze_At_Clause): Preserve Comes_From_Source on Rewrite call
2896 (Analyze_Attribute_Definition_Clause, case Attribute_Address): Check for
2897 constant overlaid by variable and issue warning.
2898 Use new Is_Standard_Character_Type predicate
2899 (Analyze_Record_Representation_Clause): Check that the specified
2900 Last_Bit is not less than First_Bit - 1.
2901 (Analyze_Attribute_Definition_Clause, case Address): Check for
2902 self-referential address clause
2903
2904 * sem_ch5.ads, sem_ch5.adb (Diagnose_Non_Variable_Lhs): Rewrite the
2905 detection mechanism when the lhs is a prival.
2906 (Analyze_Assignment): Call Check_Unprotected_Access to detect
2907 assignment of a pointer to protected data, to an object declared
2908 outside of the protected object.
2909 (Analyze_Loop_Statement): Check for unreachable code after loop
2910 Add Sure parameter to Note_Possible_Modication calls
2911 Protect analysis from previous syntax error such as a scope mismatch
2912 or a missing begin.
2913 (Analyze_Assignment_Statement): The assignment is illegal if the
2914 left-hand is an interface.
2915
ea081ad7
AC
2916 * sem_res.ads, sem_res.adb (Resolve_Arithmetic_Op): For mod/rem check
2917 violation of restriction No_Implicit_Conditionals
d563d3f0
AC
2918 Add Sure parameter to Note_Possible_Modication calls
2919 Use new Is_Standard_Character_Type predicate
2920 (Make_Call_Into_Operator): Preserve Comes_From_Source when rewriting
2921 call as operator. Fixes problems (e.g. validity checking) which
2922 come from the result looking as though it does not come from source).
2923 (Resolve_Call): Check case of name in named parameter if style checks
2924 are enabled.
2925 (Resolve_Call): Exclude calls to Current_Task as entry formal defaults
2926 from the checking that such calls should not occur from an entry body.
2927 (Resolve_Call): If the return type of an Inline_Always function
2928 requires the secondary stack, create a transient scope for the call
2929 if the body of the function is not available for inlining.
2930 (Resolve_Actuals): Apply Ada2005 checks to view conversions of arrays
2931 that are actuals for in-out formals.
2932 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
2933 primitive operations from base type.
2934 (Analyze_Selected_Component): If the context is a call to a protected
2935 operation the parent may be an indexed component prior to expansion.
2936 (Resolve_Actuals): If an actual is of a protected subtype, use its
2937 base type to determine whether a conversion to the corresponding record
2938 is needed.
2939 (Resolve_Short_Circuit): Handle pragma Check
2940
2941 * sem_eval.adb: Minor code reorganization (usea Is_Constant_Object)
2942 Use new Is_Standard_Character_Type predicate
2943 (Eval_Relational_Op): Catch more cases of string comparison
2944
29452008-04-08 Robert Dewar <dewar@adacore.com>
2946 Gary Dismukes <dismukes@adacore.com>
2947
2948 * s-rident.ads: Add No_Default_Initialization restriction
2949
2950 * exp_tss.adb:
2951 (Has_Non_Null_Base_Init_Proc): Handle No_Default_Initialization case
2952 (Set_TSS): Handle No_Default_Initialization case
2953
2954 * exp_ch6.adb (Expand_N_Subprogram_Body): Handle restriction
2955 No_Default_Initialization
2956 (Expand_N_Subprogram_Body): Remove redundant initialization of out
2957 parameters when Normalize_Scalars is active.
2958 (Add_Final_List_Actual_To_Build_In_Place_Call): Add formal Sel_Comp
2959 Fix casing error in formal parameter name in call
2960 (Register_Predefined_DT_Entry): Replace occurrences of RE_Address by
2961 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
2962 dispatching call on VM targets.
2963
29642008-04-08 Gary Dismukes <dismukes@adacore.com>
2965 Thomas Quinot <quinot@adacore.com>
2966
2967 * exp_ch7.adb (Find_Final_List): Change the test for generating a
2968 selected component from an access type's Associated_Final_Chain to
2969 check for the presence of that field, rather than assuming it exists
2970 for all named access types.
2971 (Make_Clean): New formal Chained_Cleanup_Action allowing to specify a
2972 procedure to call at the end of the generated cleanup procedure.
2973 (Expand_Cleanup_Actions): When a new cleanup procedure is generated, and
2974 and an At_End_Proc already exists in the handled sequence of statements
2975 for which cleanup actions are being expanded, the original cleanup
2976 action must be preserved.
2977
29782008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
2979 Ed Schonberg <schonberg@adacore.com>
2980 Robert Dewar <dewar@adacore.com>
2981 Gary Dismukes <dismukes@adacore.com>
2982
2983 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry,
2984 Build_Unprotected_Subprogram_Body): Generate debug info for
2985 declarations related to the handling of private data in task and
2986 protected types.
2987 (Debug_Private_Data_Declarations): New subprogram.
2988 (Install_Private_Data_Declarations): Remove all debug info flagging.
2989 This is now done by Debug_Private_Data_Declarations at the correct
2990 stage of expansion.
2991 (Build_Simple_Entry_Call): If the task name is a function call, expand
2992 the prefix into an object declaration, and make the surrounding block a
2993 task master.
2994 (Build_Master_Entity): An internal block is a master if it wraps a call.
2995 Code reformatting, update comments. Code clean up.
2996 (Make_Task_Create_Call): Use 'Unrestricted_Access instead of 'Address.
2997 (Replicate_Entry_Formals): If the formal is an access parameter or
2998 anonymous access to subprogram, copy the original tree to create new
2999 entities for the formals of the subprogram.
3000 (Expand_N_Task_Type_Declaration): Create a Relative_Deadline variable
3001 for tasks to store the value passed using pragma Relative_Deadline.
3002 (Make_Task_Create_Call): Add the Relative_Deadline argument to the
3003 run-time call to create a task.
3004 (Build_Wrapper_Spec): If the controlling argument of the interface
3005 operation is an access parameter with a non-null indicator, use the
3006 non-null indicator on the wrapper.
3007
3008 * sem_ch9.adb (Analyze_Protected_Type): Only retrieve the full view when
3009 present, which it may not be in the case where the type entity is an
3010 incomplete view brought in by a limited with.
3011 (Analyze_Task_Type): Only retrieve the full view when present, which it
3012 may not be in the case where the type entity is an incomplete view brought
3013 in by a limited with.
3014 (Analyze_Protected_Definition): Set Is_Frozen on all itypes generated for
3015 private components of a protected type, to prevent the generation of freeze
3016 nodes for which there is no proper scope of elaboration.
3017
3018 * exp_util.ads, exp_util.adb
3019 (Remove_Side_Effects): If the expression is a function call that returns a
3020 task, expand into a declaration to invoke the build_in_place machinery.
3021 (Find_Protection_Object): New routine.
3022 (Remove_Side_Effects): Also make a copy of the value
3023 for attributes whose result is of an elementary type.
3024 (Silly_Boolean_Array_Not_Test): New procedure
3025 (Silly_Boolean_Array_Xor_Test): New procedure
3026 (Is_Volatile_Reference): New function
3027 (Remove_Side_Effects): Use Is_Volatile_Reference
3028 (Possible_Bit_Aligned_Component): Handle slice case properly
3029
3030 * exp_pakd.adb (Expand_Packed_Not): Move silly true/true or false/false
3031 case test to Exp_Util
3032 (Expand_Packed_Xor): Move silly true/true case test to Exp_Util
3033
30342008-04-08 Thomas Quinot <quinot@adacore.com>
3035
3036 * exp_dist.ads, exp_dist.adb: Fix casing error in formal parameter name
3037 in call
3038 (Add_RACW_Features): When processing an RACW in another unit than the
3039 main unit, set Body_Decls to No_List to indicate that the bodies of
3040 the type's TSS must not be generated.
3041 (GARLIC_Support.Add_RACW_Read_Attribute,
3042 GARLIC_Support.Add_RACW_Write_Attribute): Do not generate bodies if
3043 Body_Decls is No_List.
3044 (PolyORB_Support.Add_RACW_Read_Attribute,
3045 PolyORB_Support.Add_RACW_Write_Attribute,
3046 PolyORB_Support.Add_RACW_From_Any,
3047 PolyORB_Support.Add_RACW_To_Any,
3048 PolyORB_Support.Add_RACW_TypeCode): Same.
3049 (Transmit_As_Unconstrained): New function.
3050 (Build_Ordered_Parameters_List): Use the above to order parameters.
3051 (GARLIC_Support.Build_General_Calling_Stubs):
3052 Use the above to determine which parameters to unmarshall using 'Input
3053 at the point where their temporary is declared (as opposed to later on
3054 with a 'Read call).
3055 (PolyORB_Support.Build_General_Calling_Stubs):
3056 Use the above to determine which parameters to unmarshall using From_Any
3057 at the point where their temporary is declared (as opposed to later on
3058 with an assignment).
3059
30602008-04-08 Ed Schonberg <schonberg@adacore.com>
3061
3062 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): If this is
3063 an Input function for an access type, do not perform default
3064 initialization on the local variable that receives the value, to
3065 prevent spurious warnings when the type is null-excluding.
3066
30672008-04-08 Robert Dewar <dewar@adacore.com>
3068 Ed Schonberg <schonberg@adacore.com>
3069
3070 * freeze.adb (Freeze_Entity): Improve warnings on access types in pure
3071 units.
3072 (Size_Known): Generic formal scalar types have known at compile
3073 time size, so remove check.
3074 Fix casing error in formal parameter name in call
3075 (Freeze_Subprogram): If the subprogram is a user-defined operator,
3076 recheck its overriding indication.
3077
30782008-04-08 Vincent Celier <celier@adacore.com>
3079
3080 * gnat1drv.adb: Send all messages indicating an error to standard error
3081
30822008-04-08 Robert Dewar <dewar@adacore.com>
3083
3084 * gnatbind.adb (Restriction_Could_Be_Set): New procedure
3085 (List_Applicable_Restrictions): Do not list existing restrictions
3086
30872008-04-08 Thomas Quinot <quinot@adacore.com>
3088
3089 * g-socket.ads, g-socket.adb: Improve documentation of GNAT.Sockets:
3090 add a pointer to generic sockets literature
3091 do not mention that the given example is "typical" usage.
3092 Remove obsolete comment about multicast not being supported on Windows.
3093 (Connect_Socket): Make Server mode IN rather than IN OUT
3094 since this formal is never modified.
3095
30962008-04-08 Robert Dewar <dewar@adacore.com>
3097
3098 * sprint.adb (Write_Itype): Handle Itypes whose Parent field points to
3099 the declaration for some different entity.
3100 (Sprint_Node_Actual, case N_Derived_Type_Definition): When an interface
3101 list is precent (following the parent subtype indication), display
3102 appropriate "and" keyword.
3103
3104 * itypes.adb: Remove unnecessary calls to Init_Size_Align and Init_Esize
3105 Remove unnecessary calls to Init_Size_Align and Init_Esize.
3106 Add notes on use of Parent field of an Itype
3107
31082008-04-08 Ed Schonberg <schonberg@adacore.com>
3109 Robert Dewar <dewar@adacore.com>
3110 Gary Dismukes <dismukes@adacore.com>
3111
3112 * lib-xref.adb (Is_On_LHS): Remove dead code
3113 (Output_Overriden_Op): If the overridden operation is itself inherited,
3114 list the ancestor operation, which is the one whose body or absstract
3115 specification is actually being overridden. For source navigation
3116 purposes.
3117
3118 * sem_ch7.adb (Is_Primitive_Of): use base type to determine whether
3119 operation is primitive for the type.
3120 (Declare_Inherited_Private_Subprograms): If the new operation overrides
3121 an inherited private subprogram, set properly the Overridden_Operation
3122 attribute, for better cross-reference information.
3123 (Analyze_Package_Specification): Do late analysis of spec PPCs
3124 (Install_Private_Declaration, Uninstall_Declarations): Save/restore
3125 properly the full view and underlying full views of a private type in a
3126 child unit, whose full view is derived from a private type in a parent
3127 unit, and whose own full view becomes visible in the child body.
3128
3129 * sem_disp.adb (Check_Dispatching_Operation): When a body declares a
3130 primitive operation after the type has been frozen, add an explicit
3131 reference to the type and the operation, because other primitive
3132 references have been emitted already.
3133 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
3134 dispatching call on VM targets.
3135
31362008-04-08 Vincent Celier <celier@adacore.com>
3137 Thomas Quinot <quinot@adacore.com>
3138
3139 * make.adb: (Gnatmake_Called): Remove, no longer necessary
3140 (Compile_Surces): Call Delete_Temp_Config_Files only if Gnatmake_Called
3141 is True and Debug_Flag_N is False. Debug_Flag_N means "keep temp files".
3142 (Insert_Project_Sources): Take into account index in multi-unit source
3143 files.
3144 After building a library project, delete all temporary files.
3145 (Initialize): Reset current output after parsing project file.
3146 (Collect_Arguments_And_Compile): Never insert in the queue the sources
3147 of library projects that are externally built.
3148 Put file name in error and inform messages if -df is used
3149 (Display): If invoked with -d7, do not display path names, but only
3150 file names.
3151
3152 * makeutl.ads (Path_Or_File_Name): New function
3153 (Path_Or_File_Name): New function
3154
31552008-04-08 Arnaud Charlet <charlet@adacore.com>
3156
3157 * Make-lang.in: Disable warnings during first stage of bootstrap
3158 Get rid of gnatbl.
3159 Update dependencies.
3160
31612008-04-08 Vincent Celier <celier@adacore.com>
3162
3163 * mlib-prj.adb (Build_Library): Compare with ALI file name in canonical
3164 case to decide if ALI object file is included in library.
3165 (Build_Library): Never attempt to build a library if the project is
3166 externally built.
3167
31682008-04-08 Thomas Quinot <quinot@adacore.com>
3169
3170 * nlists.adb (Is_Non_Empty_List): Remove redundant test. First
3171 (No_List) is defined to return Empty.
3172
31732008-04-08 Jose Ruiz <ruiz@adacore.com>
3174
3175 * osint.ads, osint.adb (Get_Libraries_From_Registry): Improve
3176 documentation.
3177 Update comments.
3178 (Read_Default_Search_Dirs): Do not consider spaces as path separators
3179 because spaces may be part of legal paths.
3180
31812008-04-08 Robert Dewar <dewar@adacore.com>
3182
3183 * par-ch11.adb (P_Exception_Handler): Check indentation level for
3184 handler
3185
31862008-04-08 Ed Schonberg <schonberg@adacore.com>
3187
3188 * par-ch3.adb (P_Type_Declaration) Reject the keyword "synchronized"
3189 in a type declaration, if this is not an interface declaration or
3190 private type extension.
3191
31922008-04-08 Vincent Celier <celier@adacore.com>
3193
3194 * prj-util.adb (Executable_Of): New String parameter Language. When
3195 Ada_Main is False and Language is not empty, attempt to remove the body
3196 suffix or the spec suffix of the language to get the base of the
3197 executable file name.
3198 (Put): New Boolean parameter Lower_Case, defauilted to False. When
3199 Lower_Case is True, put the value in lower case in the name list.
3200 (Executable_Of): If there is no executable suffix in the configuration,
3201 then do not modify Executable_Extension_On_Target.
3202
3203 * prj-util.ads (Executable_Of): New String parameter Language,
3204 defaulted to the empty string.
3205 (Put): New Boolean parameter Lower_Case, defauilted to False
3206
32072008-04-08 Robert Dewar <dewar@adacore.com>
3208
3209 * scng.adb (Scan_Identifier): Handle case of identifier starting with
3210 wide character using UTF-8 encoding.
3211
32122008-04-08 Javier Miranda <miranda@adacore.com>
3213
3214 * sem.adb (Analyze): Consider case in which we analyze an empty node
3215 that was generated by a call to a runtime function that is not
3216 available under the configurable runtime.
3217
3218 * sem.ads (Inside_Freezing_Actions): New flag.
3219 (Save_Check_Policy_List): New field in scope stack entry
3220
32212008-04-08 Ed Schonberg <schonberg@adacore.com>
3222 Robert Dewar <dewar@adacore.com>
3223
3224 * sem_aggr.adb (Analyze_N_Extension_Aggregate): Add legality checks for
3225 the ancestor part of an extension aggregate for a limited type.
3226 (Resolve_Array_Aggregate): Issue warning for sliding of aggregate with
3227 enumeration index bounds.
3228 (Resolve_Array_Aggregate): Add circuit for diagnosing missing choices
3229 when array is too short.
3230 (Check_Expr_OK_In_Limited_Aggregate): Move function
3231 Check_Non_Limited_Type from Resolve_Record_Aggregate to top level (and
3232 change name).
3233 (Resolve_Array_Aggregate.Resolve_Aggr_Expr):
3234 Check_Expr_OK_In_Limited_Aggregates called to check for illegal limited
3235 component associations.
3236 (Check_Non_Limited_Type): Moved to outer level and renamed.
3237 (Resolve_Record_Aggregate): In an extension aggregate, an association
3238 with a box initialization can only designate a component of the
3239 extension, not a component inherited from the given ancestor
3240
3241 * sem_case.adb: Use new Is_Standard_Character_Type predicate
3242
32432008-04-08 Robert Dewar <dewar@adacore.com>
3244
3245 * s-imgdec.adb (Set_Decimal_Digits): Fix error when input is zero with
3246 negative scale
3247 (Set_Decimal_Digits): Properly handle Aft=0 (equivalent to Aft=1)
3248 Properly handle case where Aft > Scale and input number is less than
3249 one.
3250
32512008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
3252
3253 * s-stoele.ads, s-soflin.ads: Move the location of
3254 Dummy_Communication_Block from System.Storage_Elements to
3255 System.Soft_Links.
3256
3257 * s-tpobop.ads: Add comment on usage of Dummy_Communication_Block to
3258 emulate Communication_Block in certain scenarios.
3259
32602008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
3261
3262 * s-strxdr.adb, s-stratt.ads, s-stratt.adb (Block_IO_OK): New
3263 subprogram.
3264 Add new subtype S_WWC, unchecked conversion routines From_WWC and
3265 To_WWC.
3266 (I_WWC, O_WWC): New routines for input and output of
3267 Wide_Wide_Character.
3268
32692008-04-08 Robert Dewar <dewar@adacore.com>
3270
3271 * stringt.adb (Write_String_Table_Entry): Handle wide characters
3272 properly
3273
32742008-04-08 Robert Dewar <dewar@adacore.com>
3275
3276 * styleg.adb (Check_Comment): Allow special char after -- in
3277 non-end-of-line case
3278
32792008-04-08 Robert Dewar <dewar@adacore.com>
3280
3281 * stylesw.adb: Implement -gnaty + - y options
3282 (Set_GNAT_Style_Check_Options): Includ I in style check string
3283
3284 * stylesw.ads: Add comments for new style switch options
3285
32862008-04-08 Sergey Rybin <rybin@adacore.com>
3287
3288 * tree_io.ads: Increase ASIS_Version_Number because of adding Sem_Aux
3289 to the set of the GNAT components needed by ASIS.
3290
32912008-04-08 Bob Duff <duff@adacore.com>
3292
3293 * types.h: Change CE_Null_Exception_Id to the correct value (8, was 9).
3294
32952008-04-08 Tristan Gingold <gingold@adacore.com>
3296
3297 * vxaddr2line.adb: Use Unsigned_32 instead of Integer for address type.
3298 Improve error message generation.
3299
33002008-04-08 Vincent Celier <celier@adacore.com>
3301
3302 * a-direct.adb (Start_Search): Check for Name_Error before checking for
3303 Use_Error, as specified in the RM. Check if directory is open and raise
3304 Use_Error if it is not.
3305
33062008-04-08 Vincent Celier <celier@adacore.com>
3307 Robert Dewar <dewar@adacore.com>
3308
3309 * vms_conv.adb (Output_Version): Print "GNAAMP" instead of "GNAT when
3310 AAMP_On_Target is set.
3311
3312 * vms_data.ads: Add NOxxx to style check switch list
3313 Add entry COMPONENTS for -gnatVe
3314 Add VMS qualifiers for -eL (/FOLLOW_LINKS_FOR_FILES) and --subdirs=
3315 (/SUBDIRS=).
3316 (GCC_Switches): Add /ALL_BACK_END_WARNINGS.
3317 Add qualifiers for gnatmetric coupling options
3318 Add note that -gnata enables all checks
3319 Add entries [NO]PARAMETER_ORDER for -gnatw.p[P]
3320 Fix inconsistency for VMS qualifier for the gnatpp '-rnb' option
3321 New warning flag -gnatw.e
3322
3323 * usage.adb: Add entries for -gnaty+ -gnaty- -gnatyy
3324 Add entry for -gnatyN (forgotten before)
3325 Line for new warning switch -gnatw.p
3326 New warning flag -gnatw.e
3327
3328 * gnat_ugn.texi: Add documentation fpr project file switch -aP
3329 Document -gnaty - + y
3330 Replace occurences of "package specification" with "package spec"
3331 Define preprocessing symbols in documentation of gnatprep
3332 Clarify reason for distinguishing overflow checking
3333 Add documentation for project-aware tool switches -eL and --subdirs=
3334 Complete list of configuration pragmas
3335 Specify that, even when gnatmake switch -x is used, mains on the command
3336 line need to be sources of project files.
3337 Editing of gnatcheck/gnatmetric doc.
3338 Add documentation for -gnatw.p/-gnatw.P
3339 Add missing documentation for -fno-inline-functions.
3340 Add documentation for -gnatw.e
3341
3342 * gnat_rm.texi: Add documentation for No_Default_Initialization
3343 Replace occurences of "package specification" with "package spec"
3344 Document use of * in Warnings Off string
3345 Update documentation of alignment/component clauses.
3346 Add documentation for Invalid_Value
3347 Document new consistency rule for Optimize_Alignment
3348 Add documentation for Precondition and Postcondition pragmas
3349 Add documentation for Check and Check_Policy pragmas
3350 Document new Enum_Val attribute
3351 Remove requirement for static string in pragma Assert
3352 Add documentation on GNAT.Time_Stamp
3353
3354 * ug_words: add entry for -gnatVe
3355 Add entries for -gnat.p[P] /WARNINGS=[NO]PARAMETER_ORDER
3356 Add entry for -gnatw.e
3357
3358 * debug.adb: Add missing documentation for d.a flag
3359 Document new -gnatd.a switch.
3360 Add documentation for new gnatmake debug switch -df
3361
33622008-04-08 Thomas Quinot <quinot@adacore.com>
3363
3364 * gen-soccon.c: Bump year in copyright notices.
3365
3366 * g-soccon-vxworks.ads: Add new constant IP_PKTINFO
3367
33682008-04-08 Eric Botcazou <ebotcazou@adacore.com>
3369
3370 * ctrl_c.c: Improve handling of ctrl-c on LynxOS and Windows.
3371 Minor reformatting.
3372
33732008-04-08 Robert Dewar <dewar@adacore.com>
3374 Bob Duff <duff@adacore.com>
3375
3376 * impunit.adb: Add Interfaces.Java.JNI, System.Strings.Stream_Ops,
3377 Ada.Calendar.Conversions, Ada.Dispatching.EDF, GNAT.Time_Stamp
3378
3379 * s-intman-mingw.adb: Minor comment fix -- spell 'explicitly' correctly
3380
3381 * g-trasym.adb: Minor comment fix -- spell 'explicitly' correctly
3382
3383 * g-trasym.ads: Minor comment improvements
3384
3385 * s-stalib.adb: Minor comment fix -- spell 'explicitly' correctly
3386
3387 * a-sequio.ads, a-direio.ads: improve message for tagged type
3388
3389 * a-strunb.ads: Minor reformatting
3390
3391 * a-tifiio.adb: Minor reformatting
3392
3393 * atree.adb (Fix_Parents): Use clearer names for formals
3394 Cleanup and simplify code
3395 Use named notation in calls
3396
3397 * exp_fixd.adb (Do_Multiply_Fixed_Universal): Use named notation in
3398 confusing calls
3399
3400 * uintp.adb: Used named notation for some confusing calls
3401
3402 * bindusg.adb: Minor change in one line of output
3403
3404 * cstand.adb: Minor reformatting of src representation of Standard
3405
3406 * a-assert.ads: Add comment.
3407
3408 * g-decstr.adb: Fix bad indentation
3409
3410 * expander.ads, expander.adb: Code clean up.
3411
3412 * sem_dist.ads: Minor comment improvement
3413
3414 * sem_type.adb, g-dirope.ads, g-exctra.ads, s-valwch.adb,
3415 s-wchstw.adb, targparm.ads, widechar.adb: Minor reformatting
3416
3417 * i-cstrin.adb: Fix casing error in formal parameter name in call
3418
34192008-04-08 Ed Schonberg <schonberg@adacore.com>
3420
3421 * binde.adb (Gather_All_Links, Gather_Dependencies): units that are
3422 mentioned in limited_with_clauses to do create semantic dependencies
3423 even though they appear in the ali file.
3424
34252008-04-08 Emmanuel Briot <briot@adacore.com>
3426
3427 * g-comlin.ads, g-comlin.adb (Expansion): Remove unreachable return
3428 statement.
3429 (Get_Configuration): New subprogram.
3430
3431 * prj-pp.ads, prj-pp.adb (Pretty_Print): new parameters Id and Id_Tree
3432 These optional parameters help preserve the casing of the project's name
3433 when pretty-printing.
3434
34352008-04-08 Jerome Lambourg <lambourg@adacore.com>
3436 Arnaud Charlet <charlet@adacore.com>
3437
3438 * bindgen.adb (Gen_Adainit_Ada): If the main program is a CIL function,
3439 then use __gnat_set_exit_status to report the returned status code.
3440
3441 * comperr.adb (Compiler_Abort): Convert most bug boxes into clean error
3442 messages on .NET, since some constructs of the language are not
3443 properly supported.
3444
3445 * gnatlink.adb (Gnatlink): In case the command line is too long for the
3446 .NET linker, gnatlink now concatenate all .il files and pass this to
3447 ilasm.
3448
d8ec5bf2
AJ
34492008-04-07 Aurelien Jarno <aurelien@aurel32.net>
3450 Xavier Grave <grave@ipno.in2p3.fr>
3451
3452 * Makefile.in: Add make ifeq define for mips/mipsel support.
3453 * g-soccon-linux-mips.ads, system-linux-mipsel.ads,
3454 system-linux-mips.ads: New files.
3455
7437c8d4
AJ
34562008-04-07 Aurelien Jarno <aurelien@aurel32.net>
3457
3458 * sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to
3459 detect systems using GNU libc.
3460 * gsocket.h: ditto.
3461 * socket.c: ditto.
3462 * adaint.c: ditto.
3463 * link.c: ditto.
3464
1dab7b35
AJ
34652008-04-07 Aurelien Jarno <aurelien@aurel32.net>
3466
3467 * s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
3468 constant constant for sysconf call.
3469 (bit_field): New packed boolean type used by cpu_set_t.
3470 (cpu_set_t): New type corresponding to the C type with
3471 the same name. Note that on the Ada side we use a bit
3472 field array for the affinity mask. There is not need
3473 for the C macro for setting individual bit.
3474 (pthread_setaffinity_np): New imported routine.
3475 * Makefile.in: Use s-tasinf-linux.ads and s-tasinf-linux.adb
3476 on GNU/kFreeBSD.
3477
39fcde8f
EB
34782008-04-07 Eric Botcazou <ebotcazou@adacore.com>
3479
3480 * utils2.c (build_binary_op): Fold ARRAY_REF and ARRAY_RANGE_REF too.
3481
9dd9bf80
EB
34822008-04-07 Eric Botcazou <ebotcazou@adacore.com>
3483
3484 * gigi.h (create_subprog_type): Remove returns_with_dsp parameter.
3485 * decl.c (gnat_to_gnu_entity): Adjust for above new prototype.
3486 * utils.c (create_subprog_type): Remove returns_with_dsp parameter.
3487 * trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with
3488 Return by Depressed Stack Pointer.
3489
2d091b12
EB
34902008-04-06 Eric Botcazou <ebotcazou@adacore.com>
3491
3492 * decl.c (is_variable_size): Do not unconditionally return false
3493 on non-strict alignment platforms.
3494
1bde5bc4
EB
34952008-04-06 Eric Botcazou <ebotcazou@adacore.com>
3496
3497 * decl.c (rest_of_type_decl_compilation_no_defer): New local function
3498 used to process all the variants of the specified type.
3499 (gnat_to_gnu_entity): Invoke rest_of_type_decl_compilation for enumeral
3500 types too. Call rest_of_type_decl_compilation_no_defer if undeferring.
3501 (rest_of_type_decl_compilation): Likewise.
3502 * utils.c (gnat_pushdecl): Propagate the name to all variants of type.
3503
9ff420f1
PB
35042008-04-03 Paolo Bonzini <bonzini@gnu.org>
3505
1bde5bc4
EB
3506 * gigi.h (insert_block): Kill.
3507 * utils.c (insert_block): Kill.
9ff420f1 3508
bf1e48d1
EB
35092008-04-02 Eric Botcazou <ebotcazou@adacore.com>
3510
3511 * decl.c (gnat_to_gnu_entity) <object>: For a constant object whose
3512 type has self-referential size, get the size from the initializing
3513 expression directly if it is also a constant whose nominal type
3514 has self-referential size.
3515
a6a0635e
JDA
35162008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
3517
51e5c7b5
JDA
3518 PR ada/33688
3519 * g-soccon-darwin.ads: Define new constant IP_PKTINFO.
3520
a6a0635e
JDA
3521 PR ada/33857
3522 * env.c: Always include crt_externs.h if __APPLE__ is defined.
3523 (__gnat_setenv): Use setenv instead of putenv if __APPLE__ is defined.
3524
4d22f5b1
AJ
35252008-04-01 Andreas Jaeger <aj@suse.de>
3526
3527 * g-soccon-linux-ppc.ads: Add new constants SO_REUSEPORT and
3528 IP_PKTINFO.
3529
dec55d76
RW
35302008-03-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3531
3532 * g-table.adb, g-tasloc.adb, g-traceb.ads,
3533 g-trasym.adb, g-utf_32.adb, gen-soccon.c, gigi.h, gmem.c,
3534 gnatbind.adb, gnatchop.adb, gnatcmd.adb,
3535 gnatcmd.ads, gnatdll.adb, gnatfind.adb,
3536 gnatlink.adb, gnatmem.adb, gprep.adb,
3537 i-cstrea-vms.adb, i-cstrin.adb, i-pacdec.ads,
3538 i-vxwork.ads, impunit.adb, init.c, initialize.c, inline.adb,
3539 layout.adb, lib-writ.adb, lib-writ.ads, lib-xref.adb,
3540 lib-xref.ads, lib.adb, link.c, live.ads,
3541 make.adb, makegpr.adb, makeutl.adb, math_lib.adb,
3542 mdll-utl.adb, mdll.ads, memroot.adb, memroot.ads,
3543 misc.c, mlib-prj.adb, mlib-tgt-hpux.adb,
3544 mlib-tgt-linux.adb, mlib-tgt-tru64.adb, mlib-tgt.ads,
3545 namet.adb, namet.h, nlists.adb, nlists.ads,
3546 nlists.h, opt.ads, osint-b.ads, osint-c.adb,
3547 osint-c.ads, osint.adb, osint.ads, output.ads,
3548 par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb,
3549 par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb,
3550 par-endh.adb, par-labl.adb, par-prag.adb,
3551 par-sync.adb, par-tchk.adb, par-util.adb,
3552 par.adb, prep.adb, prep.ads, prepcomp.adb, prj-attr.ads,
3553 prj-dect.adb, prj-env.adb, prj-ext.adb, prj-nmsc.adb,
3554 prj-nmsc.ads, prj-pp.adb, prj-proc.adb,
3555 prj-strt.ads, prj-tree.ads, prj.adb, prj.ads: Fix comment typos.
3556
5a864002
EB
35572008-03-31 Eric Botcazou <ebotcazou@adacore.com>
3558
3559 * decl.c (gnat_to_gnu_entity) <object>: Do not force a non-null
3560 size if it has overflowed.
3561
2566855a 35622008-03-31 Olivier Hainque <hainque@adacore.com>
5a864002 3563 Eric Botcazou <ebotcazou@adacore.com>
2566855a
OH
3564
3565 * utils2.c (find_common_type): Document assumption on t1/t2 vs
3566 lhs/rhs. Force use of lhs type if smaller, whatever the modes.
3567
e14c931f
RW
35682008-03-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3569
3570 * a-textio.ads, a-witeio.ads, a-ztexio.ads, ali.ads,
3571 einfo.ads, erroutc.adb, erroutc.ads, exp_attr.adb,
3572 exp_imgv.adb, exp_intr.adb, exp_pakd.adb,
3573 exp_pakd.ads, exp_prag.adb, exp_smem.adb,
3574 exp_tss.ads, exp_util.adb, exp_util.ads,
3575 exp_vfpt.adb, freeze.adb, freeze.ads,
3576 frontend.adb, g-alleve.adb, g-altcon.adb,
3577 g-altive.ads, g-alveop.ads, g-alvevi.ads,
3578 g-arrspl.adb, g-busorg.ads, g-calend.adb,
3579 g-calend.ads, g-casuti.ads, g-cgideb.adb,
3580 g-comlin.adb, g-comlin.ads, g-curexc.ads,
3581 g-debpoo.adb, g-debpoo.ads, g-decstr.adb,
3582 g-dirope.adb, g-dirope.ads, g-dynhta.ads,
3583 g-dyntab.adb, g-encstr.ads, g-excact.ads,
3584 g-except.ads, g-expect.ads, g-heasor.adb,
3585 g-hesora.adb, g-hesorg.adb, g-htable.ads,
3586 g-locfil.ads, g-md5.adb, g-md5.ads,
3587 g-memdum.ads, g-moreex.ads, g-os_lib.adb,
3588 g-pehage.adb, g-pehage.ads, g-regexp.adb,
3589 g-regexp.ads, g-regpat.adb, g-regpat.ads,
3590 g-soccon-aix.ads, g-soccon-darwin.ads,
3591 g-soccon-freebsd.ads, g-soccon-hpux-ia64.ads,
3592 g-soccon-hpux.ads, g-soccon-irix.ads,
3593 g-soccon-linux-64.ads, g-soccon-linux-ppc.ads,
3594 g-soccon-linux-x86.ads, g-soccon-lynxos.ads,
3595 g-soccon-mingw.ads, g-soccon-solaris-64.ads,
3596 g-soccon-solaris.ads, g-soccon-tru64.ads,
3597 g-soccon-vms.ads, g-soccon-vxworks.ads,
3598 g-soccon.ads, g-socket.adb, g-socket.ads,
3599 g-socthi-mingw.adb, g-socthi-vms.adb,
3600 g-socthi-vxworks.adb, g-soliop-mingw.ads,
3601 g-soliop-solaris.ads, g-soliop.ads, g-spipat.adb,
3602 g-spipat.ads, g-string.adb, g-stsifd-sockets.adb: Fix comment
3603 typos.
3604
2bc894d9
EB
36052008-03-27 Eric Botcazou <ebotcazou@adacore.com>
3606
3607 * decl.c (gnat_to_gnu_entity) <E_Procedure>: Also set the public flag
3608 if the procedure is imported.
3609
640bd0bf
AC
36102008-03-26 Arnaud Charlet <charlet@adacore.com>
3611
3612 * adaint.c: Fix warnings.
3613
0afae63b
AC
36142008-03-26 Arnaud Charlet <charlet@adacore.com>
3615
3616 * g-dirope.ads, g-dirope.adb: (Dir_Type_Value): Moved to spec.
3617
afc5f979
AC
36182008-03-26 Arnaud Charlet <charlet@adacore.com>
3619
3620 * a-witeio.adb: Fix problem with Current_Output (introduce Self).
3621 Fix problem of status check for null file
3622
c5d31169
AC
36232008-03-26 Arnaud Charlet <charlet@adacore.com>
3624
3625 * s-proinf-irix-athread.ads, s-vxwork-mips.ads,
3626 s-traces.ads, s-vxwork-arm.ads, s-vxwork-ppc.ads, s-vxwork-sparcv9.ads,
3627 s-tasinf-mingw.ads, s-tasinf-linux.ads, s-tasdeb.ads, mlib-tgt.ads,
3628 i-cstrin.ads, uintp.adb, g-catiio.adb, s-vmexta.ads,
3629 s-trafor-default.ads, s-vxwork-m68k.ads: Minor reformatting. Update
3630 comments.
3631
b501b251
AC
36322008-03-26 Thomas Quinot <quinot@adacore.com>
3633
2bc894d9 3634 PR ada/33688
b501b251
AC
3635 * g-socket.ads, g-socket.adb (Options, Set_Socket_Option,
3636 Get_Socket_Option): Add support for Receive_Packet_Info.
3637
3638 * g-soccon.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
3639 g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
3640 g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-freebsd.ads,
3641 g-soccon-hpux-ia64.ads, g-soccon-solaris-64.ads, g-soccon-darwin.ads,
3642 g-soccon-lynxos.ads, g-soccon-linux-64.ads, g-soccon-linux-x86.ads: Add
3643 new constants SO_REUSEPORT and IP_PKTINFO
3644
36452008-03-26 Robert Dewar <dewar@adacore.com>
3646
3647 * a-taster.adb, s-shasto.adb, s-soflin.adb, s-taasde.adb, s-taenca.adb,
3648 a-sytaco.adb, a-sytaco.ads, a-tasatt.adb, a-taside.adb,
3649 a-intnam-lynxos.ads, a-retide.adb, a-intnam-tru64.ads, a-intnam-aix.ads,
3650 a-intnam-irix.ads, a-intnam-hpux.ads, a-intnam-linux.ads,
3651 a-intnam-solaris.ads, a-caldel-vms.adb, a-intnam-vms.ads,
3652 a-excpol-abort.adb, a-intnam-mingw.ads, s-interr.adb, s-interr.ads,
3653 s-intman.ads, s-gloloc.adb, s-osinte-lynxos-3.ads,
3654 s-interr-sigaction.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
3655 a-intnam-freebsd.ads, s-osinte-freebsd.ads, s-osinte-lynxos.ads,
3656 s-taspri-lynxos.ads, s-osinte-tru64.ads, s-osinte-tru64.ads,
3657 s-taspri-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads,
3658 s-osinte-hpux-dce.ads, s-taprop-hpux-dce.adb, s-taspri-hpux-dce.ads,
3659 s-osinte-linux.ads, s-osinte-dummy.ads, s-taprop-dummy.adb,
3660 s-taspri-dummy.ads, s-interr-dummy.adb, s-osinte-solaris.ads,
3661 s-osinte-mingw.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
3662 s-inmaop-vms.adb, s-interr-vms.adb, s-intman-vms.ads, s-osinte-vms.ads,
3663 s-osinte-vms.ads, s-taprop-vms.adb, s-taspri-vms.ads,
3664 s-taspri-mingw.ads, s-interr-vxworks.adb, s-inmaop-posix.adb,
3665 s-intman-vxworks.ads, s-osinte-vxworks.ads, s-osprim-vxworks.adb,
3666 s-taspri-vxworks.ads, s-taspri-posix.ads, a-caldel.adb, a-calend.adb,
3667 a-elchha.adb, a-dynpri.adb, a-except.adb, a-except.ads, a-interr.ads,
3668 a-textio.adb, a-tigeau.ads, atree.adb, s-taprob.adb, s-taprop.ads,
3669 s-tarest.adb, s-tarest.ads, s-tasini.adb, s-taskin.adb, s-taskin.ads,
3670 s-tasque.adb, s-tasren.adb, s-tasren.ads, s-tassta.adb, s-tassta.ads,
3671 s-tasuti.adb, s-tataat.adb, s-tataat.ads, s-tpoben.adb, s-tpoben.ads,
3672 s-tpobop.adb, s-tpobop.ads, s-tposen.adb, s-tposen.ads, s-valrea.adb,
3673 s-valuti.adb, a-intnam-darwin.ads, s-osinte-darwin.ads, s-solita.adb,
3674 a-ztinau.ads, s-osinte-linux-hppa.ads, a-except-2005.adb,
3675 a-except-2005.ads, a-rttiev.adb, s-osinte-vxworks6.ads, s-regexp.adb,
3676 s-tasloc.adb: Minor reformatting.
3677 Update comments.
3678 Remove "used for" sections from comments.
3679
36802008-03-26 Robert Dewar <dewar@adacore.com>
3681
3682 * s-tpopsp-posix.adb, s-tpopsp-solaris.adb, s-tpopsp-posix-foreign.adb,
3683 s-tpopsp-lynxos.adb, s-tpopde-vms.ads, s-tpopde-vms.adb,
3684 s-tpopsp-vxworks.adb, s-casi16.adb, s-caun16.adb, s-inmaop.ads,
3685 s-tadeca.adb, s-tadeca.ads, s-tadert.adb, s-tadert.ads, s-tpinop.adb,
3686 s-tpinop.ads, s-tporft.adb, a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb,
3687 a-crbtgk.ads, a-crbtgk.adb, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
3688 a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
3689 a-cgcaso.adb, a-cgaaso.adb, a-ciormu.adb, a-cihase.adb, a-swuwha.ads,
3690 a-rbtgso.ads, a-cgaaso.ads, a-cgaaso.ads, a-ciorma.adb, a-chtgke.ads,
3691 a-chtgke.adb, a-llfzti.ads, a-ztenau.adb, a-ztenau.ads, a-stzhas.ads,
3692 a-szbzha.ads, a-szbzha.adb, a-crdlli.ads, a-crdlli.ads, a-crdlli.adb,
3693 i-forbla-darwin.adb, i-forbla.ads, s-regexp.adb, a-nllrar.ads,
3694 a-nlrear.ads, a-nucoar.ads, a-nurear.ads, i-forlap.ads, s-gearop.adb,
3695 s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb, s-gecola.ads,
3696 s-gerebl.adb, s-gerela.ads, a-swuwha.adb, i-forbla-unimplemented.ads,
3697 double spaced if it fits on one line and otherwise single spaced.
3698
36992008-03-26 Arnaud Charlet <charlet@adacore.com>
3700
3701 * s-taprop-irix.adb, s-taprop-tru64.adb, s-taprop-lynxos.adb,
3702 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-vxworks.adb,
3703 s-taprop-posix.adb (Create_Task): Do not attempt to set task priority
3704 or task info if the thread could not be created.
3705
37062008-03-26 Arnaud Charlet <charlet@adacore.com>
3707
3708 * gnatvsn.ads (Library_Version): Bump to 4.4.
3709 (Current_Year): Bump to 2008.
3710
37112008-03-26 Robert Dewar <dewar@adacore.com>
3712
3713 * ali.ads, ali.adb (Optimize_Alignment_Setting): New field in ALI record
3714
3715 * bcheck.adb (Check_Consistent_Optimize_Alignment): New procedure
3716
3717 * debug.adb: Add debug flags d.r and d.v
3718 Add debug flag .T (Optimize_Alignment (Time))
3719 Add debug flag .S (Optimize_Alignment (Space))
3720
3721 * freeze.adb (Freeze_Record_Type): Set OK_To_Reorder_Components
3722 depending on setting of relevant debug flags.
3723 Replace use of Warnings_Off by Has_Warnings_Off
3724 (Freeze_Entity): In circuit for warning on suspicious convention
3725 actuals, do not give warning if subprogram has same entity as formal
3726 type, or if subprogram does not come from source.
3727 (Freeze_Entity): Don't reset Is_Packed for fully rep speced record
3728 if Optimize_Alignment set to Space.
3729
3730 * frontend.adb: Add call to Sem_Warn.Initialize
3731 Add call to Sem_Warn.Output_Unused_Warnings_Off_Warnings
3732 Reset Optimize_Alignment mode from debug switches .S and .T
3733
3734 * layout.adb (Layout_Composite_Object): Rewritten for
3735 Optimize_Aligment pragma.
3736
3737 * lib-writ.ads, lib-writ.adb: New Ox parameter for Optimize_Alignment
3738 mode.
3739
3740 * opt.ads, opt.adb: (Optimize_Alignment): New global switch
3741
3742 * par-prag.adb (N_Pragma): Chars field removed, use Chars
3743 (Pragma_Identifier (.. instead, adjustments throughout to accomodate
3744 this change. Add entry for pragma Optimize_Alignment
3745
3746 * sem_prag.adb (N_Pragma): Chars field removed, use Chars
3747 (Pragma_Identifier (..
3748 instead, adjustments throughout to accomodate this change.
3749 (Process_Compile_Time_Warning_Or_Error): Use !! for generated msg
3750 (Favor_Top_Level): Use new function Is_Access_Subprogram_Type
3751 Add implementation of pragma Optimize_Alignment
3752
37532008-03-26 Vincent Celier <celier@adacore.com>
3754
3755 * a-szuzti.adb, a-swuwti.adb, a-suteio.adb (functions Get_Line):
3756 Improve memory usage to avoid use of stack.
3757
37582008-03-26 Robert Dewar <dewar@adacore.com>
3759
3760 * a-teioed.ads: Correct value of Default_Fill
3761
3762 * a-teioed.adb (Image): Use Fill_Character instead of '*' to fill
3763
37642008-03-26 Robert Dewar <dewar@adacore.com>
3765
3766 * a-ztexio.adb, a-ztexio.ads, a-witeio.ads, a-witeio.adb: Fix problem
3767 with Current_Output (introduce Self).
3768
37692008-03-26 Robert Dewar <dewar@adacore.com>
3770
3771 * checks.adb (Ensure_Valid): Capture valid status if possible
3772 (eliminate checks)
3773
37742008-03-26 Robert Dewar <dewar@adacore.com>
3775
3776 * stand.ads: Deal with reordering of package standard declarations
3777
3778 * cstand.adb: Put package Standard declarations in proper order
3779
37802008-03-26 Robert Dewar <dewar@adacore.com>
3781
3782 * einfo.ads, einfo.adb (N_Pragma): Chars field removed, use Chars
3783 (Pragma_Identifier (.. instead.
3784 (OK_To_Reorder_Components): New flag
3785 (Has_Entries): Code cleanup.
3786 (Warnings_Off_Used): New flag
3787 (Warnings_Off_Used_Unmodified): New flag
3788 (Warnings_Off_Used_Unreferenced): New flag
3789 (Has_Warnings_Off): New function
3790 (Has_Unmodified): New function
3791 (Has_Unreferenced): New function
3792 (Is_Trivial_Subprogram): New flag
3793 (Is_Static_Dispatch_Table_Entity): New attribute.
3794 Change name Access_Subprogram_Type_Kind to Access_Subprogram_Kind
3795 (more consistent with other similar names)
3796 (Access_Subprogram_Type): New classification function
3797
37982008-03-26 Robert Dewar <dewar@adacore.com>
3799
3800 * errout.ads: Document new !! insertion sequence
3801
3802 * errout.adb (N_Pragma): Chars field removed, use Chars
3803 (Pragma_Identifier (.. instead.
3804 Replace use of Warnings_Off by Has_Warnings_Off
3805 (Error_Msg_Internal): Don't delete warning ending in !!
3806
38072008-03-26 Robert Dewar <dewar@adacore.com>
3808
3809 * par.adb (Check_No_Right_Paren): Removed no longer used
3810
3811 * par-ch10.adb (N_Pragma): Chars field removed, use Chars
3812 (Pragma_Identifier (.. instead.
3813
3814 * par-ch10.adb (P_Subunit): Improvement in error recovery and message
3815
3816 * par-tchk.adb, par-ch5.adb, par-ch6.adb, par-ch3.adb,
3817 par-ch4.adb: Minor improvements in error recovery and messages.
3818
3819 * erroutc.adb (Test_Style_Warning_Serious_Msg): Treat style msgs as
3820 non-serious
3821
3822 * par-ch9.adb: Minor improvements in error recovery and messages
3823 (P_Protected): Better error recovery for "protected type x;"
3824
3825 * par-util.adb: Minor improvements in error recovery and messages
3826 (Check_No_Right_Paren): Removed no longer used
3827
38282008-03-26 Ed Schonberg <schonberg@adacore.com>
3829
3830 * exp_aggr.adb (Replace_Type): When checking for self-reference, verify
3831 that the prefix of an attribute is the type of the aggregate being
3832 expanded.
3833
38342008-03-26 Javier Miranda <miranda@adacore.com>
3835 Robert Dewar <dewar@adacore.com>
3836
3837 * exp_attr.adb (N_Pragma): Chars field removed.
3838 (Expand_N_Attribute_Reference): If the designated type associated with
3839 attribute 'Unrestricted_Access is a subprogram entity then replace it
3840 by an E_Subprogram_Type itype.
3841 Implement attribute Old
3842
3843 * sem_attr.ads (Attribute_Class_Array): Move to snames.ads
3844
3845 * sem_attr.adb (Build_Access_Subprogram_Itype): Add documentation.
3846 Replace call to
3847 New_Internal_Entity by call to Create_Itype to centralize calls
3848 building itypes, ad propagate the convention of the designated
3849 subprogram. In addition, disable the machinery cleaning constant
3850 indications from all entities in current scope when 'Unrestricted_Access
3851 corresponds with a node initializing a dispatch table slot.
3852 (Analyze_Attribute): Parameterless attributes returning a string or a
3853 type will not be called with improper arguments, so we can remove junk
3854 code that was dealing with this case.
3855 Implement attribute Old
3856
3857 * snames.ads, snames.h, snames.adb: Add entries for attribute Old
3858 Add entry for pragma Optimize_Alignment
3859 New standard names Sync and Synchronize
3860
38612008-03-26 Robert Dewar <dewar@adacore.com>
3862 Arnaud Charlet <charlet@adacore.com>
3863
3864 * exp_ch11.adb (Expand_At_End_Handler): Set From_At_End flag on raise
3865 stmt.
3866 (No_Exception_Propagation_Active): New function.
3867 (Expand_Exception_Handlers): Use No_Exception_Propagation_Active.
3868 Update comments, and review all uses of No_Exception_Propagation, which
3869 are now correct and in sync with what gigi expects.
3870
3871 * restrict.ads, restrict.adb (No_Exception_Propagation_Active): New
3872 function.
3873 (Expand_Exception_Handlers): Use No_Exception_Propagation_Active.
3874 Update comments, and review all uses of No_Exception_Propagation, which
3875 are now correct and in sync with what gigi expects.
3876
38772008-03-26 Ed Schonberg <schonberg@adacore.com>
3878
3879 * sem_ch3.adb (Access_Definition): If the access type is the return
3880 result of a protected function, create an itype reference for it
3881 because usage will be in an inner scope from the point of declaration.
3882 (Build_Derived_Record_Type): Inherit Reverse_Bit_Order and
3883 OK_To_Reorder_Components.
3884 (Make_Index): If an overloaded range includes a universal integer
3885 interpretation, resolve to Standard.Integer.
3886 (Analyze_Subtype_Indication): Copy Convention to subtype
3887 (Check_Abstract_Interfaces): Complete semantic checks on the legality of
3888 limited an synchronized progenitors in type declaration and private
3889 extension declarations.
3890
3891 * exp_ch13.adb (Expand_N_Freeze_Entity): If the scope of the entity is a
3892 protected subprogram body, determine proper scope from subprogram
3893 declaration.
3894
38952008-03-26 Robert Dewar <dewar@adacore.com>
3896
3897 * exp_ch4.adb (Expand_N_Op_Concat): Remove special tests for
3898 No_Run_Time_Mode
3899
39002008-03-26 Gary Dismukes <dismukes@adacore.com>
3901
3902 * exp_ch5.adb (Expand_N_Extended_Return_Statement): Suppress generation
3903 of a heap allocator for a limited unconstrained function return when
3904 resstriction No_Allocators is active.
3905 (Analyze_Allocator): The restriction No_Allocators is now only checked
3906 on allocators that have Comes_From_Source set, as per RM-H.4(7).
3907
3908 * sem_ch4.adb (Expand_N_Extended_Return_Statement): Suppress generation
3909 of a heap allocator for a limited unconstrained function return when
3910 resstriction No_Allocators is active.
3911 (Analyze_Allocator): The restriction No_Allocators is now only checked
3912 on allocators that have Comes_From_Source set, as per RM-H.4(7).
3913 (Has_Fixed_Op): If the name in a function call is Standard."*" and the
3914 operands are fixed-point types, the universal_fixed predefined operation
3915 is used, regardless of whether the operand type (s) have a primitive
3916 operation of the same name.
3917
39182008-03-26 Javier Miranda <miranda@adacore.com>
3919
3920 * exp_disp.adb (Make_DT, Make_Secondary_DT): Set attribute
3921 Is_Static_Dispatch_Table
3922 (Build_Dispatch_Tables): Replace calls to Exchange_Entities() by calls
3923 to Exchange_Declarations to exchange the private and full-view. Bug
3924 found working in this issue.
3925 (Expand_Dispatching_Call): Propagate the convention of the subprogram
3926 to the subprogram pointer type.
3927 (Make_Secondary_DT): Replace generation of Prim'Address by
3928 Address (Prim'Unrestricted_Access)
3929 (Make_DT): Replace generation of Prim'Address by
3930 Address (Prim'Unrestricted_Access)
3931 (Make_Disp_*_Bodies): When compiling for a restricted profile, use
3932 simple call form for single entry.
3933 (Make_DT): Handle new contents of Access_Disp_Table (access to dispatch
3934 tables of predefined primitives).
3935 (Make_Secondary_DT): Add support to handle access to dispatch tables of
3936 predefined primitives.
3937 (Make_Tags): Add entities to Access_Dispatch_Table associated with
3938 access to dispatch tables containing predefined primitives.
3939
3940 * exp_ch6.adb (N_Pragma): Chars field removed, use Chars
3941 (Pragma_Identifier (.. instead, adjustments throughout to accomodate
3942 this change.
3943 (Register_Predefined_DT_Entry): Updated to handle the new contents
3944 of attribute Access_Disp_Table (pointers to dispatch tables containing
3945 predefined primitives).
3946
3947 * exp_util.ads, exp_util.adb (Corresponding_Runtime_Package): New
3948 subprogram.
3949 (Find_Interface_ADT): Updated to skip the new contents of attribute
3950 Access_Dispatch_Table (pointers to dispatch tables containing predefined
3951 primitives).
3952
3953 * sem_util.adb (Has_Abstract_Interfaces): Add missing support for
3954 concurrent types.
3955 (Set_Convention): Use new function Is_Access_Subprogram_Type
3956 (Collect_Interfaces_Info): Updated to skip the new contents of attribute
3957 Access_Dispatch_Table (pointers to dispatch tables containing predefined
3958 primitives).
3959
3960 * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims): Improve
3961 expanded code avoiding calls to Build_Predef_Prims.
3962 (Build_Set_Predefined_Prim_Op_Address): Improve expanded code avoiding
3963 call to Build_Get_Predefined_Prim_Op_Address.
3964
39652008-03-26 Javier Miranda <miranda@adacore.com>
3966
3967 * exp_ch7.adb (Make_Clean): Code cleanup using the new centralized
3968 subprogram Corresponding_Runtime_Package to know the runtime package
3969 that will provide support to a given protected type.
3970
3971 * exp_ch9.adb (Add_Private_Declarations,
3972 Build_Protected_Subprogram_Call,
3973 Build_Protected_Entry, Build_Simple_Entry_Call,
3974 Expand_N_Protected_Body, Expand_N_Protected_Type_Declaration,
3975 Expand_N_Timed_Entry_Call, Make_Initialize_Protection): Code
3976 cleanup using the new centralized subprogram Corresponding_Runtime
3977 Package to know the runtime package that provides support to
3978 a given protected type.
3979
39802008-03-26 Ed Schonberg <schonberg@adacore.com>
3981
3982 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): If the component
3983 assignment is within the initialization procedure for a packed array,
3984 and Initialize_Scalars is enabled, compile right-hand side with checks
3985 off, because the value is purposely out of range.
3986
39872008-03-26 Vincent Celier <celier@adacore.com>
3988
3989 * gnatcmd.adb: Add processing for GNAT SYNC
3990
3991 * vms_conv.ads: (Command_Type): Add command Sync
3992
3993 * vms_conv.adb (Initialize): Add Command_List data for new command Sync
3994
3995 * vms_data.ads: Add entries for -gnatw.w
3996 Add qualifier for gnatstub --header-file option
3997 Add switches for GNAT SYNC
3998
3999 * prj-attr.ads, prj-attr.adb: Add new package Synchronize for GNAT SYNC
4000 (Add_Package_Name): New procedure
4001 (Package_Name_List): New function
4002 (Initialize): Add known package names to the list
4003 (Register_New_Package): Add the new package name to the list
4004
40052008-03-26 Robert Dewar <dewar@adacore.com>
4006
4007 * g-pehage.adb, g-regist.adb, g-spipat.ads, g-spipat.adb,
4008 s-asthan.adb, s-parint.adb, s-rpc.adb, s-stchop.adb: Replace
4009 Raise_Exception by "raise with" construct.
4010
40112008-03-26 Pascal Obry <obry@adacore.com>
4012
4013 * Makefile.in: Add proper GNAT.Serial_Communications implementation on
4014 supported platforms.
4015
4016 * Makefile.rtl: Add g-sercom.o.
4017
4018 * impunit.adb: Add g-sercom.adb.
4019
4020 * s-crtl.ads (open): New routine.
4021 (close): Likewise.
4022 (write): Likewise.
4023
4024 * s-osinte-mingw.ads (BYTE): New type.
4025 (CHAR): Likewise.
4026 (OVERLAPPED): Likewise.
4027 (GENERIC_READ): New constant.
4028 (GENERIC_WRITE): Likewise.
4029 (OPEN_EXISTING): Likewise.
4030 (PSECURITY_ATTRIBUTES): Removed this type, use anonymous access
4031 type instead.
4032 (CreateFile): New routine.
4033 (WriteFile): Likewise.
4034 (ReadFile): Likewise.
4035 (CloseHandle): Move next to the other file oriented routines.
4036
4037 * g-sercom.ads: New unit.
4038
4039 * g-sercom.adb: Default implementation, calls to this unit will raise
4040 a program error exception.
4041
4042 * g-sercom-mingw.adb, g-sercom-linux.adb: Windows and
4043 GNU/Linux implementations.
4044
40452008-03-26 Robert Dewar <dewar@adacore.com>
4046
4047 * itypes.adb (Create_Itype): Use new name Access_Subprogram_Kind
4048
4049 * sem_ch13.adb (Validate_Unchecked_Conversion): Give warning for
4050 unchecked conversion for different conventions only for subprogram
4051 pointers or on VMS.
4052
40532008-03-26 Vincent Celier <celier@adacore.com>
4054
4055 * osint-c.adb (Set_Library_Info_Name): Use canonical case file names
4056 to check if the specified object file is correct.
4057
40582008-03-26 Thomas Quinot <quinot@adacore.com>
4059
4060 * sem_cat.adb (Validate_RACW_Primitives): Do not rely on
4061 Comes_From_Source to exclude primitives from being checked. We want to
4062 exclude predefined primitives only, so use the appropriate specific
4063 predicate. Also, flag a formal parameter of an anonymous
4064 access-to-subprogram type as illegal for a primitive operation of a
4065 remote access to class-wide type.
4066
40672008-03-26 Vincent Celier <celier@adacore.com>
4068
4069 * prj-dect.adb (Parse_Package_Declaration): When a package name is not
4070 known, check if it may be a missspelling of a known package name. In
4071 not verbose, not mode, issue warnings only if the package name is a
4072 possible misspelling.
4073 In verbose mode, always issue a warning for a not known package name,
4074 plus a warning if the name is a misspelling of a known package name.
4075
4076 * prj-part.adb (Post_Parse_Context_Clause): Modify so that only non
4077 limited withs or limited withs are parse during one call.
4078 (Parse_Single_Project): Post parse context clause in two passes: non
4079 limited withs before current project and limited withs after current
4080 project.
4081
4082 * prj-proc.adb (Imported_Or_Extended_Project_From): Returns an extended
4083 project with the name With_Name, even if it is only extended indirectly.
4084 (Recursive_Process): Process projects in order: first single withs, then
4085 current project, then limited withs.
4086
4087 * prj-tree.adb (Imported_Or_Extended_Project_Of): Returns an extended
4088 project with the name With_Name, even if it is only extended indirectly.
4089
40902008-03-26 Robert Dewar <dewar@adacore.com>
4091
4092 * scn.adb (Initialize_Scanner): Format messages belong on standard error
4093
40942008-03-26 Ed Schonberg <schonberg@adacore.com>
4095
4096 * sem_ch10.adb (Analyze_Compilation_Unit): if a unit in the context is
4097 a generic subprogram that is imported, do not attempt to compile
4098 non-existent body.
4099
4100 * sem_ch12.adb (Instantiate_Subprogram_Body): if the generic is
4101 imported, do not generate a raise_program_error for the non-existent
4102 body.
4103 (Pre_Analyze_Actuals): If an error is detected during pre-analysis,
4104 perform minimal name resolution on the generic to avoid spurious
4105 warnings.
4106 (Find_Actual_Type): the designated type of the actual in a child unit
4107 may be declared in a parent unit without being an actual.
4108
41092008-03-26 Robert Dewar <dewar@adacore.com>
4110
4111 * sem_ch11.adb: Fix No_Exception_Restriction violation for SJLJ
4112 * sinfo.ads, sinfo.adb (From_At_End): New flag
4113
41142008-03-26 Ed Schonberg <schonberg@adacore.com>
4115
4116 * sem_ch6.adb (Analyze_Subprogram_Body): Remove spurious check on
4117 operations that have an interface parameter.
4118 (Analyze_Subprogram_Body): Set Is_Trivial_Subprogram flag
4119 Don't treat No_Return call as raise.
4120
4121 * sem_disp.adb (Check_Dispatching_Operations): apply check for
4122 non-primitive interface primitives to access parameters, not to all
4123 parameters of an access type.
4124
41252008-03-26 Ed Schonberg <schonberg@adacore.com>
4126
4127 * sem_ch7.adb (Install_Parent_Private_Declarations): If the private
4128 declarations of a parent unit are made visible when compiling a child
4129 instance, the parent is not a hidden open scope, even though it may
4130 contain other pending instance.
4131
4132 * sem_ch8.adb (Restore_Scope_Stack): If an entry on the stack is a
4133 hidden open scope for some child instance, it does affect the
4134 visibility status of other stach entries.
4135 (Analyze_Object_Renaming): Check that a class-wide object cannot be
4136 renamed as an object of a specific type.
4137
41382008-03-26 Robert Dewar <dewar@adacore.com>
4139
4140 * sem_res.adb (Check_Infinite_Recursion): Diagnose definite infinite
4141 recursion and raise SE directly.
4142 (Resolve_Actuals): Reset Never_Set_In_Source if warnings off is
4143 set for formal type for IN mode parameter.
4144
41452008-03-26 Robert Dewar <dewar@adacore.com>
4146
4147 * sem_warn.ads, sem_warn.adb (Warnings_Off_Pragmas): New table
4148 (Initialize): New procedure
4149 (Output_Warnings_Off_Warnings): New procedure
4150 (Check_References): Suppress certain msgs if Is_Trivial_Subprogram
4151 (Output_Non_Modifed_In_Out_Warnings): Ditto
4152 (Warn_On_Unreferenced_Entity): Ditto
4153
41542008-03-26 Vincent Celier <celier@adacore.com>
4155
4156 * a-direct.adb (Start_Search): Raise Use_Error if the directory is not
4157 readable.
4158
41592008-03-26 Matthew Heaney <heaney@adacore.com>
4160
4161 * a-ciorse.ads, a-cidlli.ads, a-cdlili.ads, a-cihase.ads, a-cohase.ads,
4162 a-ciorma.ads, a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-coorse.ads:
4163 Marked with clauses as private, and controlled operations as overriding
4164
41652008-03-26 Robert Dewar <dewar@adacore.com>
4166
4167 * g-byorma.adb (Read_BOM): Reorder tests so that UTF_32 is recognized
4168
41692008-03-26 Robert Dewar <dewar@adacore.com>
4170
4171 * back_end.adb, back_end.ads: Minor reformatting
4172
4173 * bindgen.adb: Minor clarification of comments
4174
4175 * fname.ads: Minor comment fixes
4176
4177 * g-altive.ads, g-catiio.ads, g-trasym.ads, prj.ads,
4178 prj-nmsc.adb, sem_aggr.adb: Minor reformatting
4179
4180 * xeinfo.adb, xnmake.adb, xsinfo.adb, xtreeprs.adb,
4181 xsnames.adb: Remove warnings off pragma no longer needed
4182
4183 * a-catizo.ads, a-calari.ads, a-calfor.adb,
4184 a-calfor.ads: Fix header.
4185
41862008-03-26 Tristan Gingold <gingold@adacore.com>
4187
4188 * init.c: Do not adjust pc for HPARITH on alpha/vms.
4189
41902008-03-26 Robert Dewar <dewar@adacore.com>
4191
4192 * lib-xref.adb: (OK_To_Set_Reference): New function
4193 (Generate_Reference): Don't set referenced from occurrence in Warnings,
4194 Unmodified, or Unreferenced pragma
4195
41962008-03-26 Robert Dewar <dewar@adacore.com>
4197
4198 * alloc.ads: Add entries for Warnings_Off_Pragmas table
4199
42002008-03-26 GNAT Script <nobody@adacore.com>
4201
4202 * Make-lang.in: Makefile automatically updated
4203
42042008-03-26 Robert Dewar <dewar@adacore.com>
4205
4206 * tbuild.ads, tbuild.adb, trans.c, sprint.adb, exp_prag.adb, decl.c,
4207 par-ch2.adb, sem_elab.adb, sem_util.ads (N_Pragma): Chars field
4208 removed, use Chars (Pragma_Identifier (.. instead, adjustments
4209 throughout to accomodate this change.
4210
4211 * s-pooglo.ads, s-pooloc.ads: Minor comment updates
4212
4213 * exp_dbug.adb: Use Sem_Util.Set_Debug_Info_Needed (not
4214 Einfo.Set_Needs_Debug_Info)
4215
42162008-03-26 Robert Dewar <dewar@adacore.com>
4217
4218 * gnat_ugn.texi: Add documentation for -gnatw.w/-gnatw.W
4219 Add description for the new gnatstub option '--header-file'
4220 clarification of -gnatwz/-gnatwZ
4221 Add a "Irix-Specific Considerations" section to document the need to
4222 set LD_LIBRARY_PATH when using the default shared runtime library.
4223 Added documentation for both gcov and gprof.
4224
4225 * gnat_rm.texi: Document that pragma Compile_Time_Warning generates
4226 messages that are not suppressed when clients are compiled.
4227 Add documentation of s-pooglo s-pooloc
4228 Document the new GNAT.Serial_Communications API.
4229 Add documentation for 'Old attribute
4230 Add description of pragma Optimize_Alignment
4231
4232 * ug_words: Add entries for -gnatw.w -gnatw.W
4233
4234 * usage.adb: Add line for -gnatw.w (warn on warnings off)
4235
3a9634be
EB
42362008-03-25 Eric Botcazou <ebotcazou@adacore.com>
4237
4238 Revert
4239 2008-03-05 Eric Botcazou <ebotcazou@adacore.com>
4240 PR ada/35186
4241 * decl.c (maybe_pad_type): Avoid padding an integral type when
4242 bumping its alignment is sufficient.
4243
53b308f6
AC
42442008-03-25 Arnaud Charlet <charlet@adacore.com>
4245
4246 * exp_ch6.adb, exp_disp.adb: Update copyright notice.
4247 Fix wrong formatting (lines too long)
4248
8fc789c8
RW
42492008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4250
4251 * 9drpc.adb, a-caldel-vms.adb, a-caldel.adb,
4252 a-calend-vms.adb, a-calend.adb, a-calend.ads,
4253 a-calfor.adb, a-chahan.ads, a-chtgke.adb,
4254 a-cihama.ads, a-ciorse.adb, a-clrefi.ads,
4255 a-cohama.ads, a-comlin.ads, a-coorse.adb,
4256 a-crbtgk.adb, a-direct.adb, a-except-2005.adb,
4257 a-except-2005.ads, a-except.adb, a-except.ads,
4258 a-exexda.adb, a-exexpr-gcc.adb, a-exexpr.adb,
4259 a-exextr.adb, a-filico.ads, a-finali.ads,
4260 a-intnam-aix.ads, a-intnam-solaris.ads, a-ngcefu.adb,
4261 a-ngelfu.adb, a-numaux-darwin.adb, a-numeri.ads,
4262 a-sequio.ads, a-strbou.ads, a-strfix.adb,
4263 checks.adb, exp_ch3.adb, exp_ch4.adb,
4264 exp_ch4.ads, exp_ch5.adb, exp_ch6.adb,
4265 exp_ch6.ads, exp_ch7.adb, exp_ch7.ads,
4266 exp_ch9.adb, exp_ch9.ads, exp_dbug.adb,
4267 exp_dbug.ads, exp_disp.adb, exp_dist.adb,
4268 exp_dist.ads, exp_fixd.adb, exp_fixd.ads: Fix comment typos.
4269
15f6d6e7
RD
42702008-03-24 Robert Dewar <dewar@adacore.com>
4271
4272 * s-tpopsp-posix.adb, s-tpopsp-solaris.adb, s-tpopsp-posix-foreign.adb,
4273 s-tpopsp-lynxos.adb, s-tpopde-vms.ads, s-tpopde-vms.adb,
4274 s-tpopsp-vxworks.adb, s-casi16.adb, s-caun16.adb, s-inmaop.ads,
4275 s-tadeca.adb, s-tadeca.ads, s-tadert.adb, s-tadert.ads, s-tpinop.adb,
4276 s-tpinop.ads, s-tporft.adb, a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb,
4277 a-crbtgk.ads, a-crbtgk.adb, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
4278 a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
4279 a-cgcaso.adb, a-cgaaso.adb, a-ciormu.adb, a-cihase.adb, a-swuwha.ads,
4280 a-rbtgso.ads, a-cgaaso.ads, a-cgaaso.ads, a-ciorma.adb, a-chtgke.ads,
4281 a-chtgke.adb, a-llfzti.ads, a-ztenau.adb, a-ztenau.ads, a-stzhas.ads,
4282 a-szbzha.ads, a-szbzha.adb, a-crdlli.ads, a-crdlli.ads, a-crdlli.adb,
4283 i-forbla-darwin.adb, i-forbla.ads, s-regexp.adb, a-nllrar.ads,
4284 a-nlrear.ads, a-nucoar.ads, a-nurear.ads, i-forlap.ads, s-gearop.adb,
4285 s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb, s-gecola.ads,
4286 s-gerebl.adb, s-gerela.ads, a-swuwha.adb, i-forbla-unimplemented.ads,
4287 double spaced if it fits on one line and otherwise single spaced.
4288
b2e74434
RW
42892008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4290
4291 PR documentation/15479
4292 * Make-lang.in (doc/gnat_ugn.texi) Renamed from ...
4293 (doc/gnat_ugn_unw.texi): ... this, and adjusted.
4294 (doc/gnat_ugn.info): Renamed from ...
4295 (doc/gnat_ugn_unw.info): ... this.
4296 (doc/gnat_ugn.dvi): Renamed from ...
4297 (doc/gnat_ugn_unw.dvi): ... this.
4298 (doc/gnat_ugn.pdf): Renamed from ...
4299 (doc/gnat_ugn_unw.pdf): ... this.
4300 (ADA_INFOFILES, ADA_PDFFILES, ada.install-info, ada.dvi):
4301 Adjusted.
4302 * gnat_ugn.texi (FILE): Hard-code gnat_ugn; set filename
4303 unconditionally to gnat_ugn.info. Fix cross references to the
4304 GNAT Reference Manual. Convert links to the GCC, GDB, Emacs,
4305 and GNU make manuals to be proper texinfo links.
4306 * gnat_rm.texi: Fix cross references to the GNAT User's Guide.
4307
f4351641
OH
43082008-03-21 Olivier Hainque <hainque@adacore.com>
4309
4310 * trans.c (Attribute_to_gnu) <'length>: Compute as (hb < lb)
4311 ? 0 : hb - lb + 1 instead of max (hb - lb + 1, 0).
4312
10c5d1a0
EB
43132008-03-21 Eric Botcazou <ebotcazou@adacore.com>
4314
4315 * trans.c (addressable_p): Add notes on addressability issues.
4316
457b629a
OH
43172008-03-21 Olivier Hainque <hainque@adacore.com>
4318 Ed Schonberg <schonberg@adacore.com>
4319
4320 * trans.c (addressable_p): Accept COND_EXPR when both arms
4321 are addressable.
4322 (gnat_gimplify_expr): Let the gimplifier handle &COND_EXPR.
4323 (call_to_gnu): Do not use name reference in the error message
4324 for a misaligned by_reference_parameter. The actual may be a
4325 general expression.
4326
ac5dc795
PB
43272008-03-18 Paolo Bonzini <bonzini@gnu.org>
4328
e1da2b17
EB
4329 * misc.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
4330
79f34d07
RW
43312008-03-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4332
4333 * gnat_rm.texi (Implementation Defined Characteristics)
4334 (Wide_Text_IO, Wide_Wide_Text_IO): Add @var annotations where
4335 appropriate.
4336 * gnat_ugn.texi (Wide Character Encodings, Switches for gnatbind)
4337 (Switches for gnatchop, Installing a library): Likewise.
4338
e1e7141c
EB
43392008-03-10 Eric Botcazou <ebotcazou@adacore.com>
4340
4341 * trans.c (emit_range_check): Do not emit the check if the base type
4342 of the expression is the type against which its range must be checked.
4343
892f6e65
EB
43442008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4345
4346 * decl.c (maybe_pad_type): Use value_factor_p.
4347
7934d781
EB
43482008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4349
4350 * lang.opt (nostdlib): Move around.
4351 * misc.c (gnat_handle_option): Fix formatting.
4352 (gnat_dwarf_name): Move around.
4353 * trans.c (Case_Statement_to_gnu): Fix formatting.
4354 (gnat_to_gnu): Likewise.
4355 * utils.c (aggregate_type_contains_array_p): Likewise.
4356 (create_subprog_decl): Likewise.
4357
8f5893ab
EB
43582008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4359
4360 * decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Do not
4361 bother propagating the TYPE_USER_ALIGN flag when creating a JM type.
4362
ba436c3b
EB
43632008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4364
4365 * decl.c (gnat_to_gnu_entity) <E_Record_Type>: Do not force
4366 BIGGEST_ALIGNMENT when capping the alignment of records with
4367 strict alignment and size clause.
4368
6ab36dac
EB
43692008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4370
4371 * lang-specs.h: Pass -gnatwa if -Wall is passed.
4372 * misc.c (gnat_handle_option) <OPT_Wall>: Expand into -Wunused
4373 and -Wuninitialized.
4374 (gnat_post_options): Clear warn_unused_parameter.
4375
8853cb0b
EB
43762008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4377
4378 * utils.c (finish_record_type): Clear DECL_BIT_FIELD on sufficiently
4379 aligned bit-fields, bumping the alignment of the record type if deemed
4380 profitable.
4381 (value_factor_p): Return false instead of 0.
4382
66abe22c
EB
43832008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4384
4385 * decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Add support
4386 for scalar types with small alignment.
4387
563569be
EB
43882008-03-08 Eric Botcazou <ebotcazou@adacore.com>
4389
4390 * trans.c (Loop_Statement_to_gnu): Set the SLOC of the loop label
4391 from that of the front-end's end label.
4392 (gnat_gimplify_stmt) <LOOP_STMT>: Set the SLOC of the backward goto
4393 from that of the loop label.
4394
b49a1a1e
EB
43952008-03-07 Eric Botcazou <ebotcazou@adacore.com>
4396
4397 * decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>: Add
4398 comment for the packed array type case.
4399 * utils.c (build_template): Use a loop to strip padding or
4400 containing records for justified modular types.
4401
fd5c81e9
EB
44022008-03-07 Eric Botcazou <ebotcazou@adacore.com>
4403
4404 * decl.c (gnat_to_gnu_entity): Issue a warning on suspiciously
4405 large alignments specified for types.
4406 (validate_alignment): Minor cleanup.
4407
7f42aa36
EB
44082008-03-07 Eric Botcazou <ebotcazou@adacore.com>
4409
4410 * decl.c (MAX_FIXED_MODE_SIZE): Define if not already defined.
4411 (gnat_to_gnu_entity) <E_Record_Type>: Try to get a smaller form of
4412 the component for packing, if possible, as well as if a component
4413 size clause is specified.
4414 <E_Record_Subtype>: For an array type used to implement a packed
4415 array, get the component type from the original array type.
4416 Try to get a smaller form of the component for packing, if possible,
4417 as well as if a component size clause is specified.
4418 (round_up_to_align): New function.
4419 (make_packable_type): Add in_record parameter.
4420 For a padding record, preserve the size. If not in_record and the
4421 size is too large for an integral mode, attempt to shrink the size
4422 by lowering the alignment.
4423 Ditch the padding bits of the last component.
4424 Compute sizes and mode manually, and propagate the RM size.
4425 Return a BLKmode record type if its size has shrunk.
4426 (maybe_pad_type): Use MAX_FIXED_MODE_SIZE instead of BIGGEST_ALIGNMENT.
4427 Use Original_Array_Type to retrieve the type in case of an error.
4428 Adjust call to make_packable_type.
4429 (gnat_to_gnu_field): Likewise.
4430 (concat_id_with_name): Minor tweak.
4431 * trans.c (larger_record_type_p): New predicate.
4432 (call_to_gnu): Compute the nominal type of the object only if the
4433 parameter is by-reference. Do the conversion actual type -> nominal
4434 type if the nominal type is a larger record.
4435 (gnat_to_gnu): Do not require integral modes on the source type to
4436 avoid the conversion for types with identical names.
4437 (addressable_p): Add gnu_type parameter. If it is specified, do not
4438 return true if the expression is not addressable in gnu_type.
4439 Adjust recursive calls.
4440 * utils.c (finish_record_type): Remove dead code.
4441
2f76571e
EB
44422008-03-05 Eric Botcazou <ebotcazou@adacore.com>
4443
4444 PR ada/35186
4445 * decl.c (maybe_pad_type): Avoid padding an integral type when
4446 bumping its alignment is sufficient.
4447
4d0e4612
RW
44482008-03-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4449
ad6b5b00
RW
4450 * gnatfind.adb, gnatxref.adb: Fix argument parsing typos.
4451 * s-auxdec-empty.adb, s-auxdec.adb: Fix typos in copyright
4452 statement.
4453 * a-ngcoar.adb, a-ngrear.adb, g-awk.adb, g-debpoo.adb,
4454 gprep.adb, make.adb, makegpr.adb, par-ch6.adb, prj-nmsc.adb,
4455 sem_attr.adb, sem_ch4.adb, sem_ch8.adb: Fix typos in ada source
4456 code output strings.
4457 * sem_type.adb, system-vms-ia64.ads, system-vms.ads,
4458 system-vms_64.ads: Fix typos in ada source code comments.
4459 * sinfo-cn.adb: Remove incomplete sentence.
4460
4d0e4612
RW
4461 PR documentation/15479
4462 * gnat_rm.texi, gnat_ugn.texi: Avoid standalone `non' word.
4463
acf6b7ab
ST
44642008-02-27 Samuel Tardieu <sam@rfc1149.net>
4465
4466 PR ada/22255
4467 * s-fileio.adb (Reset): Do not raise Use_Error if mode isn't changed.
4468
f5c064ab
ST
44692008-02-27 Samuel Tardieu <sam@rfc1149.net>
4470
4471 PR ada/34799
4472 * sem_ch13.adb (Analyze_Record_Representation_Clause): Check
4473 that underlying type is present.
4474
2d593c86
TT
44752008-02-26 Tom Tromey <tromey@redhat.com>
4476
4477 * misc.c (internal_error_function): Remove test of
4478 USE_MAPPED_LOCATION.
4479 * trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
4480 (Sloc_to_locus): Remove old location code.
4481
443b3472
RW
44822008-02-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4483
8dd07840
RW
4484 * gnat_rm.texi, gnat_ugn.texi: Fix spacing after `e.g.' and
4485 `i.e.' by adding comma or `@:' as appropriate.
4486 * gnat_rm.texi (Pragma Wide_Character_Encoding): Instead of
4487 plain characters `C', use `@samp{C}'.
4488 * gnat_ugn.texi (File Naming Rules, About gnatkr)
4489 (Krunching Method): Likewise.
4490
443b3472
RW
4491 * gnat_ugn.texi (Conventions): List environment variables and
4492 metasyntactic variables.
4493 (Compiling Programs): Fix notation of metasyntactic variables.
4494 Add @file where appropriate. Use @file for file extensions,
4495 @samp for strings.
4496 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, use @samp
4497 instead of @file, @env instead of @code.
4498
9538dfb9
RW
44992008-02-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4500
d488f6ea
RW
4501 PR documentation/15479
4502 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, replace `..'
4503 and `...' with `@dots{}' or `@enddots{}'.
4504
1992bbd9
RW
4505 PR documentation/15479
4506 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, add @command,
4507 use @command instead of @code, @option instead of @samp or @code,
4508 @code instead of @var, @samp instead of @file.
4509
9538dfb9
RW
4510 PR documentation/15479
4511 * gnat_ugn.texi (Using gnatmake in a Makefile): Do not ignore errors
4512 in Makefile rules, by using `&&' rather than `;'.
4513
e69044cb
RW
45142008-02-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4515
4516 PR documentation/15479
4517 * gnat_ugn.texi: In non-code, avoid space before colon.
4518 (Regular Expressions in gnatfind and gnatxref): Fix indentation.
4519 (Examples of gnatxref Usage): Use @command{vi} instead of
4520 @file{vi}.
4521 (Character Set Control): Do not use @code for UTF-8.
4522 (Validity Checking): Fix typo "NaNs" instead of "NaN's". Do not
4523 use @code for IEEE.
4524 * gnat_rm.texi (Aggregates with static bounds): Fix typo in code
4525 sample.
4526 * gnat_rm.texi, gnat_ugn.texi: Fix typos. Bump copyright years.
4527
9e94c78f 45282008-02-11 Joel Sherrill <joel.sherrill@oarcorp.com>
6a333ca0
JS
4529
4530 PR ada/35143
4531 * env.c: Add __rtems__ to if defined.
4532 * s-osinte-rtems.adb: Add To_Target_Priority. Fix formatting.
4533 * s-osinte-rtems.ads: Add To_Target_Priority prototype and
4534 PTHREAD_SCOPE_PROCESS/PTHREAD_SCOPE_SYSTEM constants. Add
4535 pragma Convention as required.
4536 * gsocket.h: Make compile in and out of RTS.
4537 * Makefile.in: Add system-rtems.ads. Build DEC extensions.
4538 Use g-soccon-rtems.ads.
4539 * g-soccon-rtems.ads, system-rtems.ads: New files.
4540
72fb133f
KG
45412008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4542
4543 PR other/35107
4544 * Make-lang.in (gnat1): Add $(GMPLIBS).
4545
8fa07a56
EB
45462008-01-26 Eric Botcazou <ebotcazou@adacore.com>
4547
4548 * decl.c (components_to_record): Improve comment.
4549
0bf38239
EB
45502008-01-22 Eric Botcazou <ebotcazou@adacore.com>
4551
4552 * decl.c (components_to_record): Do not reuse the empty union type
4553 if there is a representation clause on the record.
4554 * trans.c (addressable_p): Return true for INTEGER_CST.
4555
461d6eb3
EB
45562008-01-21 Eric Botcazou <ebotcazou@adacore.com>
4557
4558 * trans.c (gnat_to_gnu) <N_Free_Statement>: Use POINTER_PLUS_EXPR
4559 in pointer arithmetics.
4560 * utils2.c (build_allocator): Likewise.
4561
9328dd57
EB
45622008-01-17 Eric Botcazou <ebotcazou@adacore.com>
4563
4564 * utils.c (build_function_stub): Properly build the call expression.
4565
052cec9b
EB
45662008-01-14 Eric Botcazou <ebotcazou@adacore.com>
4567
4568 * decl.c (gnat_to_gnu_entity) <object>: Process renamings
4569 before converting the expression to the type of the object.
4570 * trans.c (maybe_stabilize_reference) <CONSTRUCTOR>: New case.
4571 Stabilize constructors for special wrapping types.
4572
08ffbdad
EB
45732008-01-13 Eric Botcazou <ebotcazou@adacore.com>
4574
9e94c78f 4575 * trans.c (call_to_gnu): Invoke the addressable_p predicate only
6bf4cbe8 4576 when necessary. Merge some conditional statements. Update comments.
08ffbdad
EB
4577 Rename unchecked_convert_p local variable to suppress_type_conversion.
4578 Do not suppress conversions in the In case.
4579 (addressable_p) <VIEW_CONVERT_EXPR>: Do not take alignment issues
4580 into account on non strict-alignment platforms.
4581
7219c2c7
EB
45822008-01-12 Eric Botcazou <ebotcazou@adacore.com>
4583
4584 * utils.c (aggregate_type_contains_array_p): New predicate.
4585 (create_field_decl): In a packed record, force byte alignment
4586 for fields without specified position that contain an array.
4587
52ef2874
EB
45882008-01-12 Eric Botcazou <ebotcazou@adacore.com>
4589
4590 * utils.c (unchecked_convert): Fold the VIEW_CONVERT_EXPR expression.
4591
3fa87ef8
JDA
45922008-01-10 John David Anglin <dave.anglin.@nrc-cnrc.gc.ca>
4593
4594 PR ada/34466
4595 * s-osinte-linux-hppa.ads (SC_NPROCESSORS_ONLN): New constant for
4596 sysconf call.
4597 (bit_field): New packed boolean type used by cpu_set_t.
4598 (cpu_set_t): New type corresponding to the C type with
4599 the same name. Note that on the Ada side we use a bit
4600 field array for the affinity mask. There is not need
4601 for the C macro for setting individual bit.
4602 (pthread_setaffinity_np): New imported routine.
4603
9e94c78f 46042008-01-03 Tero Koskinen <tero.koskinen@iki.fi>
e0658eda
TK
4605
4606 PR ada/34647
4607 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
4608 on OpenBSD as is done on other BSD systems.
4609
4610 PR ada/34645
4611 * sysdep.c (__gnat_ttyname, getc_immediate_nowait,
4612 getc_immediate_common): Treat OpenBSD as FreeBSD regarding immediate
4613 I/O.
4614
4615 PR ada/34644
4616 * env.c (__gnat_clearenv): Treat OpenBSD as other BSD systems missing
4617 clearenv().
4618
4619 PR ada/34646
4620 * init.c (__gnat_error_handler, __gnat_install_handler,
4621 __gnat_init_float): Define for OpenBSD.
4622
4623 * initialize.c (__gnat_initialize): Define for OpenBSD.
4624
18bc9cca
ST
46252007-12-27 Samuel Tardieu <sam@rfc1149.net>
4626
4627 PR ada/34553
4628 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
4629 instead of mktemp() or tmpnam() on NetBSD.
4630
f0bf503e
EB
46312007-12-23 Eric Botcazou <ebotcazou@adacore.com>
4632
4633 * trans.c (call_to_gnu): Make the temporary for non-addressable
4634 In parameters passed by reference.
4635 (addressable_p): Return true for STRING_CST and CALL_EXPR.
4636
7469b7bc
AC
46372007-12-19 Robert Dewar <dewar@adacore.com>
4638
4639 * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
4640 Add pragma Warnings (Off) for unassigned IN OUT arguments
4641
4642 * sem_warn.adb (Output_Reference): Suppress messages for internal names
4643 (Check_References): Extensive changes to tune up warnings
4644 (Output_Non_Modifed_In_Out_Warnings): Changes to tune up warnings
4645 (Has_Pragma_Unmodifed_Check_Spec): New function
4646 (Check_References): Implement pragma Unmodified
4647 (Warn_On_Unassigned_Out_Parameter): Implement pragma Unmodified
4648
4649 * par-prag.adb: Dummy entry for pragma Unmodified
4650
4651 * sem_prag.adb: Implement pragma Unmodified
4652
4653 * einfo.ads, einfo.adb: (Has_Pragma_Unmodified): New flag
4654 (Proc_Next_Component_Or_Discriminant): Fix typo.
4655 Update comments.
4656
4657 * sem_util.adb (Note_Possible_Modification): Add processinng for pragma
4658 Unmodified.
4659 (Reset_Analyzed_Flags): Use Traverse_Proc instead of Traverse_Func,
4660 because the former already takes care of discarding the result.
4661 (Mark_Coextensions): Remove ununused initial value from Is_Dynamic.
4662 Add comment.
4663
4664 * snames.h, snames.ads, snames.adb: Add entry for pragma Unmodified
4665
46662007-12-19 Eric Botcazou <ebotcazou@adacore.com>
4667
4668 * targparm.adb, targparm.ads, system.ads, system-darwin-ppc.ads,
4669 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
4670 system-hpux-ia64.ads, system-vxworks-arm.ads, system-darwin-x86.ads,
4671 system-vms_64.ads, system-vms-ia64.ads, system-linux-ia64.ads,
4672 system-freebsd-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
4673 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
4674 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
4675 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
4676 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
4677 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads
4678 (Dynamic_Trampolines_Used): Delete.
4679
4680 * system-lynxos-x86.ads, system-lynxos-ppc.ads: Ditto.
4681 Turn on stack probing mechanism on LynxOS.
4682
46832007-12-19 Bob Duff <duff@adacore.com>
4684
4685 * atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate
4686 the resulting tail recursion by hand. This prevents running out of
4687 memory on deeply nested concatenations, since Field2 is where the left
4688 operand of concatenations is stored.
4689 Fix bug (was returning OK_Orig in some cases). Fix return subtype to
4690 clarify that it can only return OK or Abandon.
4691
4692 * sem_res.adb (Resolve_Op_Concat): Replace the recursion on the left
4693 operand by iteration, in order to avoid running out of memory on
4694 deeply-nested concatenations. Use the Parent pointer to get back up the
4695 tree.
4696 (Resolve_Op_Concat_Arg, Resolve_Op_Concat_First,
4697 Resolve_Op_Concat_Rest): New procedures split out of
4698 Resolve_Op_Concat, so the iterative algorithm in Resolve_Op_Concat is
4699 clearer.
4700
4701 * checks.adb (Remove_Checks): Use Traverse_Proc instead of
4702 Traverse_Func, because the former already takes care of discarding the
4703 result.
4704
4705 * errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
4706 because the former already takes care of discarding the result.
4707 (Remove_Warning_Messages): Use appropriate subtype for Status and
4708 Discard
4709
47102007-12-19 Ed Schonberg <schonberg@adacore.com>
4711
4712 * exp_aggr.adb (Not_OK_For_Backend): A component of a private type with
4713 discriminants forces expansion of the aggregate into assignments.
4714 (Init_Record_Controller): If the type of the aggregate is untagged and
4715 is not inherently limited, the record controller is not limited either.
4716
47172007-12-19 Robert Dewar <dewar@adacore.com>
4718
4719 * exp_attr.adb (Expand_N_Attribute_Reference, case Size): Fix error in
4720 handling compile time known size of record or array (case of front end
4721 layout active, e.g. in GNAAMP).
4722
47232007-12-19 Javier Miranda <miranda@adacore.com>
4724
4725 * exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry
4726 that forces the construction of static dispatch tables in case of
4727 record subtypes.
4728
47292007-12-19 Robert Dewar <dewar@adacore.com>
4730
4731 * exp_ch9.adb (Null_Statements): Moved to library level
4732 (Trivial_Accept_OK): New function
4733 (Expand_Accept_Declaration): Use Trivial_Accept_OK
4734 (Expand_N_Accept_Statement): Use Trivial_Accept_OK
4735
47362007-12-19 Robert Dewar <dewar@adacore.com>
4737
4738 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix packed array type
4739 in complex case where array is Volatile.
4740
47412007-12-19 Ed Schonberg <schonberg@adacore.com>
4742
4743 * freeze.adb (Freeze_Record_Type, Check_Current_Instance): Implement
4744 properly the Ada2005 rules concerning when the current instance of a
4745 record type is aliased.
4746
47472007-12-19 Ed Schonberg <schonberg@adacore.com>
4748
4749 * par-ch3.adb (P_Record_Declaration): Guard against cascaded errors in
4750 mangled declaration
4751 (P_Type_Declaration): Diagnose misuse of "abstract" in untagged record
4752 declarations.
4753 (P_Variant_Part): Cleaner patch for parenthesized discriminant
4754
47552007-12-19 Vincent Celier <celier@adacore.com>
4756
4757 * prj-attr.adb (Package_Node_Id_Of): Returns Unknown_Package when
4758 package is not known
4759
4760 * prj-attr.ads (Unknown_Package): New constant
4761 Do not crash when an unknown package is in several projects
4762
4763 * prj-dect.adb (Parse_Package_Declaration): Mark an unknown package as
4764 ignored
4765
4766 * prj-nmsc.adb (Check): Remove obsolete code related to no longer
4767 existing package Language_Processing.
4768
47692007-12-19 Ed Schonberg <schonberg@adacore.com>
4770 Gary Dismukes <dismukes@adacore.com>
44914a04 4771 Samuel Tardieu <sam@rfc1149.net>
7469b7bc
AC
4772
4773 PR ada/15803, ada/15805
4774 * sem_ch6.adb, sem_ch3.adb (Constrain_Access): In Ada2005, diagnose
4775 illegal access subtypes when there is a constrained partial view.
4776 (Check_For_Premature_Usage): New procedure inside
4777 Access_Subprogram_Declaration for checking that an access-to-subprogram
4778 type doesn't reference its own name within any formal parameters or
4779 result type (including within nested anonymous access types).
4780 (Access_Subprogram_Declaration): Add call to Check_For_Premature_Usage.
4781 (Sem_Ch3.Analyze_Object_Declaration, Sem_ch6.Process_Formals): if the
4782 context is an access_to_variable, the expression cannot be an
4783 access_to_constant.
4784
47852007-12-19 Bob Duff <duff@adacore.com>
4786
4787 * sem_ch4.adb (Analyze_Concatenation_Rest): New procedure.
4788 (Analyze_Concatenation): Use iteration instead of recursion in order
4789 to avoid running out of stack space for deeply nested concatenations.
4790
47912007-12-19 Ed Schonberg <schonberg@adacore.com>
4792 Gary Dismukes <dismukes@adacore.com>
4793
4794 * sem_ch8.adb (Analyze_Subprogram_Renaming): Diagnose illegal renamings
4795 whose renamed entity is a subprogram that requires overriding.
4796 (Premature_Usage): Test for the case of N_Full_Type_Declaration when
4797 issuing an error for premature usage and issue a message that says
4798 'type' rather than 'object'.
4799
48002007-12-19 Gary Dismukes <dismukes@adacore.com>
4801
4802 PR ada/34149
4803 * sem_disp.adb (Check_Dispatching_Call): Augment existing test for
4804 presence of a statically tagged operand (Present (Static_Tag)) with
4805 test for Indeterm_Ancestor_Call when determining whether to propagate
4806 the static tag to tag-indeterminate operands (which forces dispatching
4807 on such calls).
4808 (Check_Controlling_Formals): Ada2005, access parameters can have
4809 defaults.
4810 (Add_Dispatching_Operation, Check_Operation_From_Private_View): do
4811 not insert subprogram in list of primitive operations if already there.
4812
48132007-12-19 Tristan Gingold <gingold@adacore.com>
4814
4815 * utils.c (create_var_decl_1): call rest_of_decl_compilation only for
4816 global variable.
4817
48182007-12-19 Thomas Quinot <quinot@adacore.com>
4819
4820 Part of PR ada/33688
4821 * gen-soccon.c: Add constant IP_PKTINFO to allow getting ancillary
4822 datagram info on Linux.
4823
48242007-12-19 Vincent Celier <celier@adacore.com>
4825
4826 * makegpr.adb (Check_Compilation_Needed): Normalize C_Source_Path so
4827 that the source path name is always found in the dependencies.
4828
48292007-12-19 Robert Dewar <dewar@adacore.com>
4830
4831 * gnat_rm.texi, gnat_ugn.texi: Update documentation of -gnatw.o
4832 Fix name of Wide_Wide_Latin_1/9 file names
4833 Add documentation for Ada.Exceptions.Last_Chance_Handler (a-elchha.ads)
4834 Add missing documentation for Ada.Wide_[Wide_]Characters.Unicode
4835 Add missing documentation for Ada.Command_Line.Response_File
4836 Update list of warning letters for Warnings pragma
4837 Add documentation for pragma Unmodified
4838
43779dea
ST
48392007-12-19 Samuel Tardieu <sam@rfc1149.net>
4840
4841 * Makefile.in: Add s-tasinf.ad[bs] substitutions for sh4-linux target.
4842
5287c2bc
AC
48432007-12-17 Arnaud Charlet <charlet@adacore.com>
4844
4845 * s-vxwork-alpha.ads: Removed, no longer used.
4846
6343804d
JJ
48472007-12-15 Jakub Jelinek <jakub@redhat.com>
4848
4849 * Make-lang.in (gnat1, gnatbind): Pass ALL_CFLAGS on the link line.
4850
3958c9c8
ST
48512007-12-13 Samuel Tardieu <sam@rfc1149.net>
4852
4853 PR ada/34360
4854 * Makefile.in: Change two occurrences of mlib-tgt.adb by correct name
4855 mlib-tgt-specific.adb.
4856
78185974
BD
48572007-12-13 Bob Duff <duff@adacore.com>
4858
4859 * trans.c (Attribute_to_gnu): Check for violations of the
4860 No_Implicit_Dynamic_Code restriction. This checking used to be done in
4861 the front end, but is moved here so we can make it more accurate.
4862
e9b54d64
AC
48632007-12-13 Pascal Obry <obry@adacore.com>
4864
4865 * adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy
4866 version is provided for older GNU/Linux distribution not
4867 supporting thread affinity sets.
4868
4869 * s-osinte-linux.ads (SC_NPROCESSORS_ONLN): New constant for sysconf
4870 call.
4871 (bit_field): New packed boolean type used by cpu_set_t.
4872 (cpu_set_t): New type corresponding to the C type with
4873 the same name. Note that on the Ada side we use a bit
4874 field array for the affinity mask. There is not need
4875 for the C macro for setting individual bit.
4876 (pthread_setaffinity_np): New imported routine.
4877
4878 * s-taprop-linux.adb (Enter_Task): Check that the CPU affinity mask is
4879 no null.
4880 (Create_Task): Set the processor affinity mask if information
4881 is present.
4882
4883 * s-tasinf-linux.ads, s-tasinf-linux.adb: New files.
4884
48852007-12-13 Robert Dewar <dewar@adacore.com>
4886
4887 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
4888 s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-osinte-tru64.ads,
4889 s-osinte-mingw.ads, s-osinte-aix.ads, s-osinte-hpux-dce.ads,
4890 s-osinte-irix.ads, s-osinte-solaris.ads, s-intman-vms.adb,
4891 s-osinte-vms.ads, s-osinte-vxworks6.ads, s-osinte-vxworks.ads,
4892 s-auxdec.ads, s-auxdec-vms_64.ads, s-osinte-darwin.ads,
4893 s-taprop-vms.adb, s-interr-sigaction.adb, s-osinte-linux-hppa.ads,
4894 i-vxwork-x86.ads, s-tpopde-vms.ads: Add missing pragma Convention C
4895 for subprogram pointers.
4896
4897 * g-ctrl_c.adb: New file.
4898
4899 * g-ctrl_c.ads (Install_Handler): New body.
4900
4901 * freeze.adb (Freeze_Subprogram): Use new flag Has_Pragma_Inline_Always
4902 instead of obsolete function Is_Always_Inlined.
4903 (Freeze_Entity): check for tagged type in imported C subprogram
4904 (Freeze_Entity): check for 8-bit boolean in imported C subprogram
4905 (Freeze_Entity): check for convention Ada subprogram pointer in
4906 imported C subprogram.
4907 (Freeze_Fixed_Point_Type): In the case of a base type where the low
4908 bound would be chopped off and go from negative to zero, force
4909 Loval_Excl_EP to be the same as Loval_Incl_EP (the included lower
4910 bound) so that the size computation for the base type will take
4911 negative values into account.
4912
49132007-12-13 Eric Botcazou <ebotcazou@adacore.com>
4914 Bob Duff <duff@adacore.com>
4915 Tristan Gingold <gingold@adacore.com>
4916
4917 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
4918 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
4919 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
4920 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
4921 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
4922 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
4923 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
4924 system-vxworks-arm.ads, system-darwin-x86.ads, system.ads,
4925 system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
4926 system-linux-ppc.ads, system-linux-hppa.ads, system-hpux-ia64.ads,
4927 system-vms-ia64.ads (Stack_Check_Limits): New target parameter.
4928 (Always_Compatible_Rep): New flag to control trampolines globally.
4929 (Dynamic_Trampolines_Used): New flag for implementing the
4930 No_Implicit_Dynamic_Code restriction more correctly (not yet used,
4931 and not yet set correctly for some targets).
4932
4933 * s-taprop-vxworks.adb: Use stack limit method of stack checking.
4934 Simply indirectly call s-stchop when a task is created.
4935
4936 * ali.ads:
4937 New flag added: Stack_Check_Switch_Set which is set when '-fstack-check'
4938 appears as an argument (entries A) in an ALI file.
4939
4940 * fe.h (Stack_Check_Limits): Declare new target parameter.
4941 (Check_Implicit_Dynamic_Code_Allowed): New procedure.
4942
4943 * init.c: Declare __gnat_set_stack_limit_hook for VxWorks kernel RTS.
4944 This variable is declared in C to be sure not subject to elaboration
4945 code.
4946 (__gnat_map_signal, VxWorks): In kernel mode, map SIGILL to
4947 Storage_Error.
4948
4949 * targparm.ads, targparm.adb (Stack_Check_Limits): New parameter.
4950 (Always_Compatible_Rep, Dynamic_Trampolines_Used): New parameters.
4951
4952 * s-stchop.ads: Add comments.
4953
4954 * s-stchop-vxworks.adb: Package almost fully rewritten to use stack
4955 limit method of stack checking.
4956
4957 * s-stchop-limit.ads: New file.
4958
49592007-12-13 Robert Dewar <dewar@adacore.com>
4960
4961 * sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
4962 a-cihama.adb, g-awk.adb,
4963 s-inmaop-posix.adb: Update handling of assigned value/unreferenced
4964 warnings
4965
4966 * exp_smem.adb: Update handling of assigned value/unreferenced warnings
4967
4968 * sem.adb: Update handling of assigned value/unreferenced warnings
4969
4970 * a-exexpr-gcc.adb: Add a pragma warnings off for boolean return
4971
4972 * lib-xref.ads: Improve documentation for k xref type
4973
4974 * lib-xref.adb:
4975 Update handling of assigned value/unreferenced warnings
4976 (Generate_Reference): Warning for reference to entity for which a
4977 pragma Unreferenced has been given should be unconditional.
4978 If the entity is a discriminal, mark the original
4979 discriminant as referenced.
4980
4981 * sem_warn.ads, sem_warn.adb
4982 (Check_One_Unit): Test Renamed_In_Spec to control giving warning for
4983 no entities referenced in package
4984 (Check_One_Unit): Don't give message about no entities referenced in
4985 a package if a pragma Unreferenced has appeared.
4986 Handle new warning flag -gnatw.a/-gnatw.A
4987 Update handling of assigned value/unreferenced warnings
4988
4989 * atree.h: Add flags up to Flag247
4990 (Flag231): New macro.
4991
49922007-12-13 Jose Ruiz <ruiz@adacore.com>
4993
4994 * adaint.h: (__gnat_plist_init): Not defined for RTX.
4995
4996 * initialize.c (__gnat_initialize): Do not call __gnat_plist_init for
4997 RTX systems.
4998
4999 * Makefile.in: Add new files s-tasinf-linux.ads and s-tasinf-linux.adb.
5000 (LIBGNAT_TARGET_PAIRS, MISCLIB, THREADSLIB,
5001 EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
5002 GNATLIB_SHARED for RTX run time): Use the versions required by RTX.
5003
5004 * mingw32.h:
5005 Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.
5006
5007 * sysdep.c (winflush_function for RTX): Procedure that does nothing
5008 since we only have problems with Windows 95/98, which are not
5009 supported by RTX.
5010 (__gnat_ttyname): Return the empty string on Nucleus, just as
5011 done on vxworks.
5012
50132007-12-13 Robert Dewar <dewar@adacore.com>
5014
5015 * a-textio.adb, a-textio.ads:
5016 Extensive changes to private part for wide character encoding
5017
5018 * a-witeio.adb, a-witeio.ads, a-ztexio.ads, a-ztexio.adb
5019 (Look_Ahead): Fix mishandling of encoded sequences
5020 Move declaration of Wch_Con to private part (should not be visible)
5021
5022 * ali.adb (Scan_ALI): Set default encoding method to brackets instead of
5023 UTF-8. Probably this is never used, but if it is, brackets is
5024 clearly correct.
5025
5026 * bindgen.adb (Get_WC_Encoding): New procedure to properly handle
5027 setting wide character encoding for no main program case and when
5028 encoding is specified using -W?
5029 Initialize stack limit of environment task if stack limit method of
5030 stack checking is enabled.
5031 (Gen_Adainit_Ada): Use Get_WC_Encoding to output encoding method
5032 (Gen_Adainit_C): Use Get_WC_Encoding to output encoding method
5033 (Get_Main_Unit_Name): New function.
5034 (Gen_Adainit_Ada): Add call to main program for .NET when needed.
5035 (Gen_Output_File): Set Bind_Main_Program to True for .NET
5036
5037 * bindusg.adb: Add line for -Wx switch
5038
5039 * s-wchcon.adb, s-wchcon.ads: (Is_Start_Of_Encoding): New function
5040 Add comments
5041 Add new useful constant WC_Longest_Sequences
5042
5043 * switch-b.adb: Clean up handling of -Wx switch
5044 For -gnatWx, set Wide_Character_Encoding_Method_Specified
5045
5046 * switch-c.adb: -gnatg activates warning on assertion errors
5047 For -gnatWx, set Wide_Character_Encoding_Method_Specified
5048
5049 * s-wchcon.adb: (Is_Start_Of_Encoding): New function
5050
50512007-12-13 Robert Dewar <dewar@adacore.com>
5052 Ed Schonberg <schonberg@adacore.com>
5053
5054 * a-ngcoty.adb: New pragma Fast_Math
5055
5056 * opt.adb: New pragma Fast_Math
5057
5058 * par-prag.adb:
5059 Add Implemented_By_Entry to the list of pragmas which do not require any
5060 special processing.
5061 (Favor_Top_Level): New pragma.
5062 New pragma Fast_Math
5063
5064 * exp_attr.adb: Move Wide_[Wide_]Image routines to Exp_Imgv
5065 (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
5066 Expand_Allocator_Expression): Take into account VM_Target
5067 (Expand_Attribute, case 'Identity): Handle properly the case where
5068 the prefix is a task interface.
5069 New pragma Fast_Math
5070
5071 * par.adb (Next_Token_Is): New function
5072 (P_Pragma): Add Skipping parameter
5073 (U_Left_Paren): New procedure
5074 (U_Right_Paren): New procedure
5075 New pragma Fast_Math
5076
5077 * par-ch10.adb (P_Subunit): Unconditional msg for missing ) after
5078 subunit
5079 New pragma Fast_Math
5080
5081 * sem_prag.adb: Add significance value to table Sig_Flag for pragma
5082 Implemented_By_Entry.
5083 (Analyze_Pragma): Add case for Ada 2005 pragma Implemented_By_Entry.
5084 (Set_Inline_Flags): Do not try to link pragma Inline onto chain of rep
5085 items, since it can apply to more than one overloadable entity. Set
5086 new flag Has_Pragma_Inline_Always for Inline_Always case.
5087 (Analyze_Pragma, case Complex_Representation): Improve error message.
5088 (Analyze_Pragma, case Assert): When assertions are disabled build the
5089 rewritten code with Sloc of expression rather than pragma, so new
5090 warning about failing is not deleted.
5091 (Analyze_Pragma): Allow pragma Preelaborable_Initialization to apply to
5092 protected types and update error message to reflect that. Test whether
5093 the protected type is allowed for the pragma (an error is issued if the
5094 type has any entries, or components that do not have preelaborable
5095 initialization).
5096 New pragma Fast_Math
5097 (Analyze_Pragma, case No_Return): Handle generic instance
5098
5099 * snames.h, snames.ads, snames.adb:
5100 Add new predefined name for interface primitive _Disp_Requeue.
5101 New pragma Fast_Math
5102
5103 * a-tags.ads, a-tags.adb: New calling sequence for
5104 String_To_Wide_[Wide_]String
5105 (Secondary_Tag): New subprogram.
5106
5107 * exp_imgv.ads, exp_imgv.adb: Move Wide_[Wide_]Image routines here
5108 from Exp_Attr
5109 New calling sequence for String_To_Wide_[Wide_]String
5110 (Expand_Image_Attribute): Major rewrite. New calling sequence avoids
5111 the use of the secondary stack for image routines.
5112
5113 * a-except-2005.adb, s-wchstw.ads, s-wchstw.adb, s-wwdenu.adb: New
5114 calling sequence for String_To_Wide_[Wide_]String
5115
5116 * par-ch3.adb (P_Declarative_Items): Recognize use of Overriding in
5117 Ada 95 mode
5118 (P_Unknown_Discriminant_Part_Opt): Handle missing parens gracefully
5119 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
5120
5121 * par-ch6.adb (P_Subprogram): Recognize use of Overriding in Ada 95 mode
5122 (P_Formal_Part): Use Skipping parameter in P_Pragma call
5123 to improve error recovery
5124
5125 * par-util.adb (Next_Token_Is): New function
5126 (Signal_Bad_Attribute): Use new Namet.Is_Bad_Spelling_Of function
5127
5128 * par-ch2.adb (Skip_Pragma_Semicolon): Do not resynchronize to
5129 semicolon if missing
5130 (P_Pragma): Implement new Skipping parameter
5131 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
5132 Fix location of flag for unrecognized pragma message
5133
5134 * par-tchk.adb (U_Left_Paren): New procedure
5135 (U_Right_Paren): New procedure
5136
51372007-12-13 Geert Bosch <bosch@adacore.com>
5138
5139 * a-tifiio.adb:
5140 (Put_Int64): Use Put_Digit to advance Pos. This fixes a case where
5141 the second or later Scaled_Divide would omit leading zeroes,
5142 resulting in too few digits produced and a Layout_Error as result.
5143 (Put): Initialize Pos.
5144
51452007-12-13 Robert Dewar <dewar@adacore.com>
5146
5147 atree.ads, atree.adb (Flag231..Flag247): New functions
5148 (Set_Flag231..Set_Flag247): New procedures
5149 (Basic_Set_Convention): Rename Set_Convention to be
5150 Basic_Set_Convention
5151 (Nkind_In): New functions
5152 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
5153
5154 * exp_ch6.adb (Expand_Call): Use new flag Has_Pragma_Inline_Always
5155 instead
5156 of obsolete function Is_Always_Inlined
5157 (Register_Predefined_DT_Entry): Initialize slots of the second
5158 secondary dispatch table.
5159 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
5160 (Expand_N_Function_Call): Remove special provision for stack checking.
5161
5162 * exp_util.ads, exp_util.adb (Is_Predefined_Dispatching_Operation):
5163 Include _Disp_Requeue in the list of predefined operations.
5164 (Find_Interface_ADT): Modified to fulfill the new specification.
5165 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
5166
5167 * par-ch4.adb, nlists.ads, nlists.adb:
5168 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
5169
5170 * sinfo.ads, sinfo.adb: (Nkind_In): New functions
5171 Fix location of flag for unrecognized pragma message
5172
5173 * sem_ch7.adb: Use Nkind_In
5174
51752007-12-13 Vincent Celier <celier@adacore.com>
5176
5177 * opt.ads:
5178 Indicate what flags are used by the Project Manager, gprbuild and
5179 gprclean.
5180 (Opt.Follow_Links_For_Dirs): New flag
5181 (Warn_On_Assertion_Failure): New flag
5182 (Wide_Character_Encoding_Method_Specified): New flag
5183 (Suppress_All_Inlining): New switch set by -fno-inline
5184 (Real_VMS_Target): New flag
5185 New pragma Fast_Math
5186
51872007-12-13 Robert Dewar <dewar@adacore.com>
5188
5189 * back_end.adb: Recognize -fno-inline
5190
51912007-12-13 Robert Dewar <dewar@adacore.com>
5192
5193 * checks.adb: Fix optimization problem with short-circuited form
5194
51952007-12-13 Bob Duff <duff@adacore.com>
5196
5197 * clean.adb (Usage): Add line for -aP
5198 (Check_Version_And_Help): Change Check_Version_And_Help to be generic,
5199 with a parameter "procedure Usage", instead of passing a pointer to a
5200 procedure. This is to eliminate trampolines (since the Usage procedure
5201 is often nested in a main procedure, and it would be inconvenient to
5202 unnest it).
5203
5204 * g-comlin.adb (For_Each_Simple_Switch): Change For_Each_Simple_Switch
5205 to be generic, with a parameter "procedure Callback (...)", instead of
5206 passing a pointer to a procedure. This is to eliminate trampolines
5207 (since the Callback procedure is usually nested).
5208
5209 * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb,
5210 gnatname.adb, gnatxref.adb, gnatchop.adb, gprep.adb, gnatbind.adb
5211 (Check_Version_And_Help): Change Check_Version_And_Help to be generic.
5212
5213 * g-pehage.adb (Compute_Edges_And_Vertices, Build_Identical_Key_Sets):
5214 Use the generic Heap_Sort_G instead of Heap_Sort_A.
5215
52162007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5217
5218 * einfo.ads, einfo.adb: Flag 232 is now Implemented_By_Entry.
5219 (Implemented_By_Entry, Set_Implemented_By_Entry): New routines.
5220 (Write_Entry_Flags): Add an entry for Implemented_By_Entry.
5221 (Renamed_In_Spec): New flag
5222 (Has_Pragma_Inline_Always): New flag
5223 Add missing doc for pragma Obsolescent_Warning
5224 Add missing doc for 17 additional unused flags (230-247)
5225 (Is_Derived_Type): Remove condition "not Is_Generic_Type".
5226 Alphabetize with clauses.
5227 Separate Is_Thunk and Has_Thunks flags
5228 (Write_Entity_Flags): Add forgotten entry for Has_Thunks
5229 (Related_Interface): Renamed to Related_Type.
5230 (Has_Thunks/Set_Has_Thunks): Subprograms of new attribute.
5231 (Set_Is_Flag): Restrict the assertion.
5232
52332007-12-13 Vincent Celier <celier@adacore.com>
5234
5235 * errout.adb (Output_Source_Line): Do not keep a trailing space after
5236 the source line number if the source line is empty.
5237
52382007-12-13 Geert Bosch <bosch@adacore.com>
5239
5240 * eval_fat.adb (Decompose_Int): Handle argument of zero.
5241 (Compose): Remove special casing of zero.
5242 (Exponent): Likewise.
5243 (Fraction): Likewise.
5244 (Machine): Likewise.
5245 (Decompose): Update comment.
5246
52472007-12-13 Ed Schonberg <schonberg@adacore.com>
5248
5249 * exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a
5250 limited ancestor part, initialize controllers of enclosing record
5251 before expanding ancestor aggregate.
5252 (Gen_Assign): If a component of the aggregate is box-initialized, add
5253 code to call Initialize if the component is controlled, and explicit
5254 assignment of null if the component is an access type.
5255
5256 Handle properly aggregates for limited types that appear in object
5257 declarations when the aggregate contains controlled values such as
5258 protected types.
5259 When expanding limited aggregates into individual components, do not
5260 call Adjust on controlled components that are limited.
5261
52622007-12-13 Ed Schonberg <schonberg@adacore.com>
5263
5264 * expander.adb: Take into account N_Subprogram_Renaming_Declaration
5265
52662007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5267
5268 * exp_ch3.adb (Predefined_Primitive_Bodies): Generate the body of
5269 predefined primitive _Disp_Requeue.
5270 (Make_Predefined_Primitive_Specs): Create the spec for predefined
5271 primitive _Disp_Requeue.
5272 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): Set the
5273 type of formal Renamed_Eq to Entity_Id (instead of Node_Id).
5274 (Make_Predefined_Primitive_Specs): Spec of "=" needed if the parent is
5275 an interface type. In case of limited interfaces we now declare all the
5276 predefined primitives associated with synchronized interfaces as
5277 abstract.
5278 (Predef_Spec_Or_Body): For interface types generate abstract subprogram
5279 declarations.
5280 (Predefined_Primitive_Bodies): Add body of "=" if the parent of the
5281 tagged type is an interface type and there is no user-defined equality
5282 function.
5283 Add also bodies of predefined primitives associated with synchronized
5284 interfaces.
5285 (Freeze_Record_Type): Do not build bodies of predefined primitives of
5286 interface types because they are now defined abstract.
5287 Add missing documentation.
5288 (Expand_Record_Controller): Update occurrence of Related_Interface
5289 to Related_Type.
5290 (Build_Offset_To_Top_Functions): Do nothing in case of VM.
5291 (Expand_N_Object_Declaration): Take into account VM_Target when handling
5292 class wide interface object declaration.
5293 (Expand_Previous_Access_Type): Do not create a duplicate master entity
5294 if the access type already has one.
5295 (Expand_N_Object_Declaration): Defend against attempt to validity check
5296 generic types. Noticed for -gnatVcf specified with previous errors.
5297
52982007-12-13 Arnaud Charlet <charlet@adacore.com>
5299
5300 * exp_ch4.adb (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
5301 Expand_Allocator_Expression): Take into account VM_Target
5302
5303 * exp_ch5.adb (Expand_N_Extended_Return_Statement): Do not use
5304 secondary stack when VM_Target /= No_VM
5305
53062007-12-13 Javier Miranda <miranda@adacore.com>
5307 Ed Schonberg <schonberg@adacore.com>
5308
5309 * exp_ch7.adb (Expand_N_Package_Body): Replace occurrence of attribute
5310 Is_Complation_Unit by Is_Library_Level_Entity in the code
5311 that decides if the static dispatch tables need to be built.
5312 (Wrap_Transient_Declaration): Do not generate a finalization call if
5313 this is a renaming declaration and the renamed object is a component
5314 of a controlled type.
5315
53162007-12-13 Gary Dismukes <dismukes@adacore.com>
5317
5318 * exp_ch8.ads, exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration):
5319 In the case where the renamed subprogram is a dereference, call
5320 Force_Evaluation on the prefix.
5321
53222007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5323 Ed Schonberg <schonberg@adacore.com>
5324
5325 * exp_ch9.adb (Expand_N_Asynchronous_Select,
5326 Expand_N_Conditional_Entry_Call, Expand_N_Timed_Entry_Call): Code and
5327 comment reformatting.
5328 (Set_Privals): Inherit aliased flag from formal. From code reading.
5329 (Build_Simple_Entry_Call): Out parameters of an access type are passed
5330 by copy and initialized from the actual. This includes entry parameters.
5331 (Expand_N_Requeue_Statement): Reimplement in order to handle both Ada 95
5332 and Ada 2005 models of requeue.
5333 (Null_Statements): Still connsider do-end block null if it contains
5334 Unreferenced and Warnings pragmas.
5335 (Expand_N_Accept_Statement): Do not optimize away null do end if
5336 dispatching policy is other than defaulted.
5337 (Expand_N_Timed_Entry_Call): When the triggering statement is a
5338 dispatching call, manually analyze the delay statement.
5339 (Find_Parameter_Type): Move subprogram to Sem_Util.
5340
53412007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5342 Javier Miranda <miranda@adacore.com>
5343
5344 * exp_disp.ads, exp_disp.adb (Default_Prim_Op_Position): Primitive
5345 _Disp_Requeue occupies dispatch table slot number 15. Move
5346 _Disp_Timed_Select to slot 16.
5347 (Make_Disp_Requeue_Body, Make_Disp_Requeue_Spec): New routines which
5348 generate the spec and body of _Disp_Reqeueue.
5349 (Make_DT): Build and initialize the second dispatch table.
5350 Handle initialization of RC_Offset when the parent
5351 is a private type with variable size components.
5352 (Make_Secondary_DT): Complete documentation. Add support to
5353 initialize the second dispatch table.
5354 (Make_Tags): Generate the tag of the second dispatch table.
5355 (Register_Primitive): Add support to register primitives in the
5356 second dispatch table.
5357
53582007-12-13 Pascal Obry <obry@adacore.com>
5359
5360 * expect.c (__gnat_kill) [WIN32]: Implement the SIGINT signal on
5361 Windows. This signal is used by gnatmake to kill child processes for
5362 example.
5363
53642007-12-13 Javier Miranda <miranda@adacore.com>
5365
5366 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
5367 support for generic dispatching constructor calls in which we need to
5368 locate the tag of a secondary dispatch table associated with an
5369 interface type to properly dispatch the call.
5370 (Expand_N_Attribute_Reference [case Address],
5371 Expand_Dispatching_Constructor_Call, Expand_Unc_Deallocation): Fix
5372 handling of VM targets.
5373
53742007-12-13 Robert Dewar <dewar@adacore.com>
5375 Ed Schonberg <schonberg@adacore.com>
5376
5377 * exp_prag.adb (Expand_Pragma_Assert): Recognize new warning flag for
5378 assert fail
5379
5380 * ug_words: Add entries for -gnatw.a -gnatw.A
5381
5382 * sem_res.adb (Set_String_Literal_Subtype): If the context of the
5383 literal is a subtype with non-static constraints, use the base type of
5384 the context as the base of the string subtype, to prevent type
5385 mismatches in gigi.
5386 (Resolve_Actuals): If the actual is an entity name, generate a
5387 reference before the actual is resolved and expanded, to prevent
5388 spurious warnings on formals of enclosing protected operations.
5389 (Analyze_Overloaded_Selected_Component): If type of prefix if
5390 class-wide, use visible components of base type.
5391 (Resolve_Selected_Component): Ditto.
5392 (Resolve_Short_Circuit): Detect case of pragma Assert argument
5393 evaluating to False, and issue warning message.
5394
5395 * usage.adb: Add lines for -gnatw.a and -gnatw.A
5396
53972007-12-13 Emmanuel Briot <briot@adacore.com>
5398
5399 * g-calend.ads (No_Time): New constant, to represent an uninitialized
5400 time value
5401
5402 * g-catiio.ads, g-catiio.adb (Value): Added support for more date
5403 formats.
5404 (Month_Name_To_Number): New subprogram
5405
5406 * g-dirope.adb (Get_Current_Dir): On windows, normalize the drive
5407 letter to upper-case.
5408
54092007-12-13 Robert Dewar <dewar@adacore.com>
5410 Ed Schonberg <schonberg@adacore.com>
5411
5412 * gnat1drv.adb (Gnat1drv): Properly set new flag Opt.Real_VMS_Target
5413
5414 * layout.adb (Resolve_Attribute, case 'Access): If designated type of
5415 context is a limited view, use non-limited view when available. If the
5416 non-limited view is an unconstrained array, this enforces consistency
5417 requirements in 3.10.2 (27).
5418 (Layout_Type): For an access type whose designated type is a limited
5419 view, examine its declaration to determine if it is an unconstrained
5420 array, and size the access type accordingly.
5421 (Layout_Type): Do not force 32-bits for convention c subprogram
5422 pointers in -gnatdm mode, only if real vms target.
5423
5424 * sem_attr.adb (Analyze_Access_Attribute): Use new flag
5425 Has_Pragma_Inline_Always instead of obsolete function Is_Always_Inlined
5426 (Analyze_Access_Attribute,Attribute_Address): Remove checks for
5427 violations of the No_Implicit_Dynamic_Code restriction.
5428 (Resolve_Attribute, case 'Access): If designated type of context is a
5429 limited view, use non-limited view when available. If the non-limited
5430 view is an unconstrained array, this enforces consistency requirements
5431 in 3.10.2 (27).
5432 (Layout_Type): For an access type whose designated type is a limited
5433 view, examine its declaration to determine if it is an unconstrained
5434 array, and size the access type accordingly.
5435
54362007-12-13 Vincent Celier <celier@adacore.com>
5437
5438 * gnatcmd.adb (GNATCmd): Do not issue -d= switch to gnatmetric when
5439 object directory of main project does not exist.
5440 On VMS, correctly set then environment variable for the source
5441 directories.
5442
54432007-12-13 Vasiliy Fofanov <fofanov@adacore.com>
5444
5445 * g-regist.ads, g-regist.adb (Set_Value): new parameter Expand; when
5446 set to True this procedure will create the value of type REG_EXPAND_SZ.
5447 It was only possible to create REG_SZ values before.
5448
54492007-12-13 Robert Dewar <dewar@adacore.com>
5450
5451 * g-spchge.ads, g-spchge.adb, g-u3spch.adb, g-u3spch.ads,
5452 g-wispch.adb, g-wispch.ads, g-zspche.adb, g-zspche.ads,
5453 namet-sp.adb, namet-sp.ads: New files.
5454
5455 * g-speche.adb: Use generic routine in g-spchge
5456
5457 * s-wchcnv.ads, s-wchcnv.adb:
5458 Minor code cleanup (make formal type consistent with spec)
5459
5460 * namet.adb: Update comments.
5461
5462 * par-endh.adb (Evaluate_End_Entry): Use new
5463 Namet.Sp.Is_Bad_Spelling_Of function
5464
5465 * par-load.adb (Load): Use new Namet.Sp.Is_Bad_Spelling_Of function
5466
5467 * sem_aggr.adb (Resolve_Record_Aggregate): If a component of an
5468 ancestor is an access type initialized with a box, set its type
5469 explicitly, for use in subsequent expansion.
5470 (Check_Misspelled_Component): Use new Namet.Sp.Is_Bad_Spelling_Of
5471 function
5472
54732007-12-13 Robert Dewar <dewar@adacore.com>
5474
5475 * g-spipat.adb (Break): Fix accessibility error (vsn taking not null
5476 access Vstring)
5477
54782007-12-13 Robert Dewar <dewar@adacore.com>
5479
5480 * inline.adb (Back_End_Cannot_Inline): Use new flag
5481 Has_Pragma_Inline_Always instead of obsolete function Is_Always_Inlined
5482
5483 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Use new flag
5484 Has_Pragma_Inline_Always instead.
5485 of obsolete function Is_Always_Inlined
5486 (Build_Body_To_Inline): Same change
5487 (Cannot_Inline): Same change
5488 Do not give warning on exception raise in No_Return function
5489
5490 * sem_ch13.adb (Analyze_Record_Representation_Clause): If an inherited
5491 component has two inconsistent component clauses in the same record
5492 representation clause, favor the message that complains about
5493 duplication rather than inconsistency.
5494 Update comments.
5495 (Record_Representation_Clause): Do not warn on missing component
5496 clauses for inherited components of a type extension.
5497 (Rep_Item_Too_Late): Do not attempt to link pragma into rep chain for
5498 an overloadable item if it is a pragma that can apply to multiple
5499 overloadable entities (e.g. Inline) because a pragma cannot be on
5500 more than one chain at a time.
5501 (Validate_Unchecked_Conversion): Add code to warn on unchecked
5502 conversion where one of the operands is Ada.Calendar.Time.
5503 (Analyze_Attribute_Definition_Clause): Fix typo in error message.
5504 For now, ignore Component_Size clause on VM targets, as done for
5505 pragma Pack.
5506
55072007-12-13 Emmanuel Briot <briot@adacore.com>
5508 Vincent Celier <celier@adacore.com>
5509
5510 * prj.ads, prj.adb (Is_A_Language): Now takes a Name_Id instead of a
5511 string
5512 (Must_Check_Configuration, Default_Language_Is_Ada): new flags in
5513 prj.ads
5514 (Hash): Move instantiation of System.HTable.Hash from spec to body
5515 (prj-nmsc.adb): Optimize calls to Name_Find when on case sensitive
5516 systems, since we do not need to recompute the Name_Id for the canonical
5517 file name.
5518 (Body_Suffix_Id_Of, Spec_Suffix_Id_Of): new version that takes a name_id
5519 as a parameter. This parameter is in fact always "ada" in all calls, and
5520 we were doing 160560 extra calls to Name_Find to convert it to Name_Ada
5521 while loading a project with 40000 files
5522
5523 * prj-attr.adb: Fix name of attribute Dependency_Driver
5524 Change the kind of indexing for attribute Root
5525
5526 * prj-dect.adb (Parse_Declarative_Items): Allow redeclarations of
5527 variables already declared, in case constructions.
5528
5529 * prj-env.adb (Initialize): Reset Current_Source_Path_File and
5530 Current_Object_Path_File to No_Path.
5531
5532 * prj-ext.adb (Initialize_Project_Path): In multi language mode, use
5533 ADA_PROJECT_PATH if value of GPR_PROJECT_PATH is empty.
5534
5535 * prj-makr.adb: new parameter Current_Dir
5536
5537 * prj-nmsc.ads, prj-nmsc.adb (Find_Explicit_Sources): Do not look for
5538 Ada sources when language is not Ada.
5539 Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
5540 (Find_Excluded_Sources, Find_Explicit_Sources): new subprograms
5541 (Must_Check_Configuration, Default_Language_Is_Ada): new flags.
5542 (Locate_Directory): Always resolve links when computing Canonical_Path
5543 (Look_For_Sources): Make sure that Name_Buffer contains the file name
5544 in Source_Files before checking for the presence of a directory
5545 separator.
5546 Optimize calls to Name_Find when on case sensitive systems.
5547 (Body_Suffix_Id_Of, Spec_Suffix_Id_Of): new version that takes a name_id
5548 as a parameter.
5549 (Prj.Nmsc.Check): new parameter Current_Dir
5550 (Check_Ada_Naming_Schemes): Restrictions on suffixes are relaxed. They
5551 cannot be empty and the spec suffix cannot be the same as the body or
5552 separate suffix.
5553 (Get_Unit): When a file name can be of several unit kinds (spec, body or
5554 subunit), always consider the longest suffix.
5555 (Check_Configuration): Do not issue an error if there is no compiler
5556 for a language. Just issue a warning and ignore the sources for the
5557 language.
5558 (Check_Library_Attributes): Only check Library_Dir if Library_Name is
5559 not empty.
5560 (Check_Naming_Schemes.Maked_Unit): Only output message if high verbosity
5561 (Unit_Exceptions): New hash table
5562 (Check_Naming_Schemes): Check if a file that could be a unit because of
5563 the naming scheme is not in fact a source because there is an exception
5564 for the unit.
5565 (Look_For_Sources): Put the unit exceptions in hash table
5566 Unit_Exceptions
5567 (Get_Unit_Exceptions): Give initial value No_Source to local variable
5568 Other_Part to avoid exception when code is compiled with validity
5569 checking.
5570 (Get_Sources_From_File): Check that there is no directory information
5571 in the file names.
5572 (Look_For_Sources): Check that there is no directory information in the
5573 list of file names in Source_Files.
5574 (Look_For_Sources): In multi-language mode, do not allow exception file
5575 names that are excluded.
5576 (Excluded_Sources_Htable): New hash table
5577 (Search_Directories.Check_File): New procedure to simplify
5578 Search_Directories.
5579 (Search_Directories): Do not consider excluded sources
5580 (Look_For_Sources): Populate Excluded_Sources_Htable before calling
5581 Search_Directories.
5582 (Get_Exceptions): Set component Lang_Kind of Source_Data
5583 (Get_Unit_Exceptions): Ditto
5584 (Search_Directories): Ditto
5585
5586 * prj-pars.adb: new parameter Current_Dir
5587
5588 * prj-part.ads, prj-part.adb:
5589 Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
5590 (Opt.Follow_Links_For_Dirs): New flag
5591 (Project_Path_Name_Of): Cache information returned by this routine as
5592 Locate_Regular_File is a costly routine. The code to output a log
5593 information and the effective call to Locate_Regular_File is now
5594 factorized into a routine (code clean-up).
5595 (Parse, Parse_Single_Project): new parameter Current_Dir
5596 When main project file cannot be found, indicate in the error
5597 message the project path that was used to do the search.
5598
5599 * prj-proc.ads, prj-proc.adb (Opt.Follow_Links_For_Dirs): New flag
5600 (Prj.Proc.Process*): new parameter Current_Dir
5601
5602 * switch-m.adb: Change Opt.Follow_Links to Opt.Follow_Links_For_Files
5603
56042007-12-13 Bob Duff <duff@adacore.com>
5605
5606 * restrict.ads, restrict.adb (Check_Implicit_Dynamic_Code_Allowed): New
5607 procedure to be called from the back end to check the
5608 No_Implicit_Dynamic_Code restriction.
5609
56102007-12-13 Arnaud Charlet <charlet@adacore.com>
5611
5612 * rtsfind.adb (Check_CRT): Take into account RTE_Available_Call
5613 Fixes another case where RTE_Available_Call was ignored instead of being
5614 taken into account.
5615 (Load_Fail): Ditto.
5616
5617 * rtsfind.ads: Add new entries.
5618
56192007-12-13 Robert Dewar <dewar@adacore.com>
5620
5621 * g-byorma.adb, g-byorma.ads, g-decstr.adb, g-decstr.ads,
5622 g-deutst.ads, g-encstr.adb, g-encstr.ads, g-enutst.ads: New files.
5623
5624 * scn.adb: Implement BOM recognition
5625
56262007-12-13 Thomas Quinot <quinot@adacore.com>
5627 Ed Schonberg <schonberg@adacore.com>
5628
5629 * sem_ch10.adb (Check_Private_Child_Unit): A non-private library level
5630 subprogram body that acts as its own spec may not have a non-private
5631 WITH clause on a private sibling.
5632 (Build_Unit_Name): If the parent unit in the name in a with_clause on a
5633 child unit is a renaming, create an implicit with_clause on that
5634 parent, and not on the unit it renames, to prevent visibility errors
5635 in the current unit.
5636
56372007-12-13 Ed Schonberg <schonberg@adacore.com>
5638
5639 * sem_ch12.adb (Instantiate_Formal_Subprogram): In the subprogram
5640 renaming declaration, use the Slocs of the formal parameters from the
5641 declaration of the formal subprogram when creating the formal parameter
5642 entities in the renaming declaration.
5643 (Analyze_Formal_Type_Declaration): Change the placement of the error
5644 message concerning illegal known discriminants. It is now posted on the
5645 type rather than on the first discriminant. This change ensures early
5646 error report.
5647 (Freeze_Subprogram_Body): If the generic subprogram is nested within
5648 the package body that contains the instance, do not generate an
5649 out-of-place freeze node for the enclosing package.
5650 (Collect_Previous_Instantiations): Ignore internal instantiations
5651 generated for formal packages.
5652 (Validate_Derived_Type_Instance): Add a check that when a formal
5653 derived type is Known_To_Have_Preelab_Init then the actual type must
5654 have preelaborable initialization, and issue an error when this
5655 condition is violated.
5656
56572007-12-13 Robert Dewar <dewar@adacore.com>
5658
5659 * s-imenne.adb, s-imenne.ads: New files.
5660
5661 * s-imgboo.adb, s-imgboo.ads, s-imgcha.adb, s-imgcha.ads, s-imgdec.adb,
5662 s-imgdec.ads, s-imgenu.ads, s-imgint.adb, s-imgint.ads, s-imglld.adb,
5663 s-imglld.ads, s-imglli.adb, s-imglli.ads, s-imgllu.adb, s-imgllu.ads,
5664 s-imgrea.adb, s-imgrea.ads, s-imguns.adb, s-imguns.ads, s-imgwch.adb,
5665 s-imgwch.ads: New calling sequence for Image routines to avoid sec
5666 stack usage.
5667
56682007-12-13 Javier Miranda <miranda@adacore.com>
5669 Ed Schonberg <schonberg@adacore.com>
5670
5671 * sem_ch3.ads, sem_ch3.adb (Check_Abstract_Overriding): Avoid
5672 generation of spurious error if parent is an interface type; caused
5673 because predefined primitive bodies will be generated later by
5674 Freeze_Record_Type.
5675 (Process_Subtype): The subtype inherits the Known_To_Have_Preelab_Init
5676 flag.
5677 (Derive_Subprograms): Handle derivations of predefined primitives
5678 after all the user-defined primitives to ensure that they are
5679 found in proper order in instantiations.
5680 (Add_Interface_Tag_Components, Inherit_Components): Update occurrences
5681 of Related_Interface to Related_Type.
5682 (Record_Type_Declaration): Minor reordering of calls to decorate the
5683 Tag component because the entity must have set its Ekind attribute
5684 before setting its Is_Tag attribute.
5685 (Analyze_Subtype_Declaration): In the case of subtypes with
5686 Private_Kind, inherit Known_To_Have_Preelab_Init from the parent.
5687
56882007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5689 Ed Schonberg <schonberg@adacore.com>
5690
5691 * sem_ch4.adb (Analyze_Selected_Component): Include the requeue
5692 statement to the list of contexts where a selected component with a
5693 concurrent tagged type prefix should yield a primitive operation.
5694 (Find_Primitive_Operation): Handle case of class-wide types.
5695 (Analyze_Overloaded_Selected_Component): If type of prefix is
5696 class-wide, use visible components of base type.
5697 (Resolve_Selected_Component): Ditto.
5698 (Try_Primitive_Operation, Collect_Generic_Type_Ops): If the type is a
5699 formal of a generic subprogram. find candidate interpretations by
5700 scanning the list of generic formal declarations.:
5701 (Process_Implicit_Dereference_Prefix): If the prefix has an incomplete
5702 type from a limited_with_clause, and the full view is available, use it
5703 for subsequent semantic checks.
5704 (Check_Misspelled_Selector): Use Namet.Sp.Is_Bad_Spelling_Of function
5705 (Find_Primitive_Operation): New function.
5706 (Analyze_Overloaded_Selected_Component): insert explicit dereference
5707 only once if several interpretations of the prefix yield an access type.
5708 (Try_Object_Operation): Code and comment cleanup.
5709 (Analyze_Selected_Component): Reorder local variables. Minot comment and
5710 code reformatting. When the type of the prefix is tagged concurrent, a
5711 correct interpretation might be available in the primitive and
5712 class-wide operations of the type.
5713
57142007-12-13 Robert Dewar <dewar@adacore.com>
5715 Ed Schonberg <schonberg@adacore.com>
5716
5717 * sem_ch8.adb (Analyze_Subprogram_Renaming): Special error message for
5718 renaming entry as subprogram using rename-as-body if subprogram spec
5719 frozen.
5720 (Use_One_Type): The clause is legal on an access type whose designated
5721 type has a limited view.
5722 (Find_Direct_Name): Use Namet.Sp.Is_Bad_Spelling_Of function
5723 (Find_Expanded_Name): Use Namet.Sp.Is_Bad_Spelling_Of function
5724 (Analyze_Renamed_Primitive_Operation): new procedure to determine the
5725 operation denoted by a selected component.
5726 (Analyze_Renamed_Entry): Resolve the prefix of the entry name, because
5727 it can be an expression, possibly overloaded, that returns a task or
5728 an access to one.
5729
57302007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5731 Gary Dismukes <dismukes@adacore.com>
5732
5733 * sem_ch9.adb (Analyze_Requeue): Add a local flag to capture whether a
5734 requeue statement is dispatching. Do not emit an error when the name is
5735 not an entry and the context is a dispatching select. Add code to
5736 perform subtype conformance between the formals of the current entry
5737 and those of the target interface primitive.
5738 (Analyze_Asynchronous_Select, Analyze_Conditional_Entry_Call, Analyze_
5739 Timed_Entry_Call): Analyze the triggering statement as the first step of
5740 the processing. If this is a dispatching select, postpone the analysis
5741 of all select statements until the Expander transforms the select. This
5742 approach avoids generating duplicate identifiers after the Expander has
5743 replicated some of the select statements. In case the Expander is
5744 disabled, perform regular analysis.
5745 (Check_Triggering_Statement): New routine.
5746 (Analyze_Requeue): Exclude any interpretations that are not entries when
5747 checking overloaded names in a requeue. Also test type conformance for
5748 matching interpretations rather than requiring subtype conformance at
5749 that point to conform with the RM's resolution rule for requeues.
5750
57512007-12-13 Ed Schonberg <schonberg@adacore.com>
5752
5753 * sem_disp.adb (Check_Dispatching_Call): If an actual in a call to an
5754 inherited operation is a defaulted tag-indeterminate call, and there is
5755 a statically tagged actual, use the static tag as a controlling actual
5756 for the defaulted actual.
5757
57582007-12-13 Geert Bosch <bosch@adacore.com>
5759
5760 * sem_eval.adb (Eval_Real_Literal): N_Constant_Declaration is a static
5761 context, so do not call Check_Non_Static_Context.
5762
57632007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
5764
5765 * sem_type.adb (Function_Interp_Has_Abstract_Op): Add guard to check
5766 whether formal E is an entity which may have parameters.
5767
57682007-12-13 Bob Duff <duff@adacore.com>
5769 Javier Miranda <miranda@adacore.com>
5770 Robert Dewar <dewar@adacore.com>
5771
5772 * sem_util.ads, sem_util.adb (Is_Concurrent_Interface): New routine.
5773 (Set_Convention): New procedure to set the Convention flag, and in
5774 addition make sure the Favor_Top_Level flag is kept in sync (all
5775 foreign-language conventions require Favor_Top_Level = True).
5776 (Collect_Abstract_Interfaces): Update occurrences of Related_Interface
5777 to Related_Type.
5778 (Collect_Interfaces_Info): Minor update to handle the two secondary
5779 dispatch tables. Update occurrence of Related_Interface to Related_Type.
5780 (Generate_Parent_Ref): Add parameter to specify entity to check
5781 (Is_Preelaborable_Expression): Allow the name of a discriminant to
5782 initialize a component of a type with preelaborable initialization.
5783 This includes the case of a discriminal used in such a context.
5784 (Is_Dependent_Component_Of_Mutable_Object): Take into account the
5785 latest Ada 2005 rules about renaming and 'Access of
5786 discriminant-dependent components.
5787 (Check_Nested_Access): Add handling when there are no enclosing
5788 subprograms (e.g. case of a package body).
5789 (Find_Parameter_Type): Factor routine from several other compiler files.
5790 Remove routine from Find_Overridden_Synchronized_Primitive.
5791
57922007-12-13 Thomas Quinot <quinot@adacore.com>
5793
5794 * sinput.adb (Get_Source_File_Index): Add assertion to guard against
5795 an invalid access to an uninitialized slot in the
5796 Source_File_Index_Table.
5797
57982007-12-13 Thomas Quinot <quinot@adacore.com>
5799
5800 * sinput-l.adb (Load_File): Disable style checks when preprocessing.
5801
58022007-12-13 Bob Duff <duff@adacore.com>
5803
5804 * s-soflin.ads: Apply new pragma Favor_Top_Level to all
5805 access-to-subprogram types in this package.
5806
58072007-12-13 Olivier Hainque <hainque@adacore.com>
5808
5809 * s-stausa.ads (Stack_Analyzer): Remove First_Is_Topmost, redundant
5810 with Stack_Grows_Down in System.Parameters. Rename Array_Address into
5811 Stack_Overlay_Address and document that we are using an internal
5812 abstraction.
5813 (Byte_Size, Unsigned_32_Size): Remove, now useless.
5814 (Pattern_Type, Bytes_Per_Pattern): New subtype and constant, to be used
5815 consistently throughout the various implementation pieces.
5816
5817 * s-stausa.adb (Stack_Slots): New type, abstraction for the stack
5818 overlay we are using to fill the stack area with patterns.
5819 (Top_Slot_Index_In, Bottom_Slot_Index_In): Operations on Stack_Slots.
5820 (Push_Index_Step_For, Pop_Index_Step_For): Likewise.
5821 (Fill_Stack, Compute_Result): Use the Stack_Slots abstraction.
5822
58232007-12-13 Robert Dewar <dewar@adacore.com>
5824
5825 * s-stoele.adb ("mod"): mod negative value raises Constraint_Error
5826
58272007-12-13 Arnaud Charlet <charlet@adacore.com>
5828
5829 * s-tassta.adb:
5830 (Create_Task): Take into account tasks created by foreign threads.
5831 Code clean up: use constants instead of hard coded values.
5832
58332007-12-13 Robert Dewar <dewar@adacore.com>
5834
5835 * styleg.adb (Check_Comment): More liberal rules for comment placement
5836
58372007-12-13 Olivier Hainque <hainque@adacore.com>
5838
5839 * tb-alvms.c (struct tb_entry_t, __gnat_backtrace): Revert back to use
5840 of Procedure Value instead of Frame Pointer as the invocation
5841 identifier associated with the instruction pointer in each traceback
5842 entry.
5843
5844 * g-trasym-vms-alpha.adb (Traceback_Entry, PV_For, FP_For,
5845 TB_Entry_For): Revert back to use of Procedure Value instead of Frame
5846 Pointer as the invocation identifier passed to tbk$symbolize.
5847
5848 * s-traent-vms.ads, s-traent-vms.adb
5849 (Traceback_Entry, PV_For, FP_For, TB_Entry_For): Revert back to use of
5850 Procedure Value instead of Frame Pointer as the invocation identifier
5851 passed to tbk$symbolize.
5852
58532007-12-13 Robert Dewar <dewar@adacore.com>
5854
5855 * tbuild.ads, tbuild.adb:
5856 Fix location of flag for unrecognized pragma message
5857
58582007-12-13 Robert Dewar <dewar@adacore.com>
5859
5860 * treepr.ads, treepr.adb: (pl): implement use of positive value
5861 shorthands
5862
58632007-12-13 Robert Dewar <dewar@adacore.com>
5864
5865 * xeinfo.adb: Remove warnings
5866 * xnmake.adb: Remove warnings
5867 * xsinfo.adb: Remove warnings
5868 * xtreeprs.adb: Remove warnings
5869 * xsnames.adb: Remove warnings
5870
5871 * a-ngcoar.adb: Fix typo.
5872 * s-interr.adb: Minor reformatting
5873 * env.c: Minor reformatting.
5874 * g-bytswa.adb: Minor reformatting.
5875 * g-rannum.ads: Minor documentation improvements
5876 * s-tasinf-mingw.adb: Minor header fix
5877 * a-clrefi.adb: Minor reformatting
5878 * g-sttsne.ads: Minor documentation improvement
5879 * g-sttsne-locking.ads: Minor documentation improvement
5880 * g-soliop-solaris.ads: Minor documentation improvement
5881 * g-soliop-mingw.ads: Minor documentation improvement
5882 * g-soliop.ads: Minor documentation improvement
5883 * exp_aggr.ads: Minor reformatting
5884 * debug.adb: Add documentation for the gprbuild debug flags
5885 * exp_ch2.adb: Use Nkind_In to simplify code throughout
5886 * exp_pakd.adb: Minor reformatting
5887
5888 * g-altive.ads, g-alleve.adb: Remove assertions.
5889 Add comment about minor differences between targets regarding
5890 floating-point operations.
5891
5892 * g-thread.adb: Remove pragma unreferenced.
5893 * lib.ads: Minor reformatting
5894 * par-ch9.adb: Minor reformatting of error messages
5895 * sem_case.adb: Minor reformatting
5896 * s-fileio.adb: Minor reformattinng
5897 * s-vmexta.ads: Minor typo
5898 * vxaddr2line.adb:
5899 Take into account 'Success' value as per new GNAT warning.
5900
59012007-12-13 Vincent Celier <celier@adacore.com>
5902
5903 * a-direct.adb (Create_Path): Always take '/' as a directory separator,
5904 even on Windows
5905
59062007-12-13 Robert Dewar <dewar@adacore.com>
5907 Bob Duff <duff@adacore.com>
5908
5909 * gnat_ugn.texi: Dcoument new rules for style check comment alignment
5910 Document that suffixes may be terminations of each others
5911 Add doc for -gnatw.a and -gnatw.A
5912 Document gnatbind -Wx switch
5913 Document BOM recognition
5914 Document pragma Implemented_By_Entry.
5915 Document new units.
5916
5917 * gnat_rm.texi: (Favor_Top_Level): Document new pragma.
5918 Add doc for pragma Unreferenced suppressing no entities referenced msg
5919 Add documentation of GNAT.Directory_Operations.Iteration
5920 Add documentation of GNAT.Random_Numbers
5921 Add documentation for pragma Shared.
5922 Correct documentation for Bit_Order
5923 Add documentation for the Pool_Address attribute.
5924 Fix and improve documentation of pragma machine_attribute.
5925 New pragma Fast_Math
5926 Document BOM recognition
5927
5928 * vms_data.ads: Add entries for -gnatw.a -gnatw.A
5929 Add /Wide_Character_Encoding for binder
5930 Add qualifier for the new gnatpp option --no-separate-loop-then
5931
59322007-12-13 Matthew Heaney <heaney@adacore.com>
5933
5934 * a-cohase.ads, a-cihama.ads, a-cihase.ads, a-cohama.ads: Document
5935 which generic formal operations are called for each operation.
5936
59372007-12-13 Olivier Hainque <hainque@adacore.com>
5938
5939 * tb-gcc.c (uw_data_t, trace_callback): Only define if not GCC-SJLJ eh.
5940 (__gnat_backtrace): Early return 0 if using GCC-SJLJ eh.
5941
59422007-12-13 Emmanuel Briot <briot@adacore.com>
5943
5944 * s-os_lib.ads, s-os_lib.adb (Normalize_Pathname): Do not compute
5945 Reference_Dir unless we actually need it.
5946
59472007-12-13 Vasiliy Fofanov <fofanov@adacore.com>
5948 Tristan Gingold <gingold@adacore.com>
5949
5950 * g-socthi-vms.ads (Fd_Set_Access): make it 32-bit.
5951
5952 * s-osprim-vms.adb,
5953 a-calend-vms.adb: Remove pragma warning off and add pragma
5954 unreferenced.
5955
59562007-12-13 Robert Dewar <dewar@adacore.com>
5957
5958 * impunit.adb: Add entries for missing units
5959
5960 * Makefile.rtl: Add new run-time units.
5961
5962 * Make-lang.in: Update dependencies.
5963
59642007-12-13 Bob Duff <duff@adacore.com>
5965
5966 * itypes.ads, itypes.adb (Create_Itype): For access-to-subprogram
5967 types, set Can_Use_Internal_Rep appropriately, based on
5968 Always_Compatible_Rep_On_Target.
5969
59702007-12-13 Gary Dismukes <dismukes@adacore.com>
5971 Arnaud Charlet <charlet@adacore.com>
5972
5973 * make.adb (Scan_Make_Arg): Add test for -aamp_target switch, passing
5974 it to the front end and setting the aamp_target environment variable
5975 to the switch's argument to ensure that gnaampbind and gnaamplink will
5976 take the specified library into account.
5977 (Make): Only set Check_Object_Consistency to False for JVM, not for CIL
5978 target, since the CIL compiler supports an "object" file (.il files).
5979
59802007-12-13 Vincent Celier <celier@adacore.com>
5981
5982 * symbols-processing-vms-ia64.adb (Process.Skip_Half): New procedure
5983 (Process.H): Remove variable. Replace Read_Half (H) with Skip_Half.
5984
59852007-12-13 Geert Bosch <bosch@adacore.com>
5986
5987 * s-parame-vxworks.adb:
5988 Update comments to reflect usage of this package by Nucleus.
5989
59902007-12-13 Arnaud Charlet <charlet@adacore.com>
5991
5992 * i-vxwork.ads: Kill new warning on Convention C, since changing the
5993 spec would break code.
5994
5995 * i-forbla-unimplemented.ads, vx_stack_info.c: New files.
5996
5997 * system-vxworks-alpha.ads: Removed.
5998
e74a122e
EB
59992007-12-10 Eric Botcazou <ebotcazou@adacore.com>
6000
6001 * ada-tree.h (TYPE_RETURNS_BY_TARGET_PTR_P): Move around.
6002
5320014a
ST
60032007-12-09 Samuel Tardieu <sam@rfc1149.net>
6004
6005 PR ada/34366
6006 * sem_ch3.adb (Designates_T): New function.
6007 (Mentions_T): Factor reusable part of the logic into Designates_T.
6008 Consider non-access parameters and access and non-access result.
6009 (Check_Anonymous_Access_Components): Set ekind of anonymous access to
6010 E_Subprogram_Type to E_Anonymous_Access_Subprogram_Type.
6011
6012 * einfo.ads: Update comment for E_Anonymous_Access_Subprogram_Type.
6013
da746f77
LB
60142007-12-07 Ludovic Brenta <ludovic@ludovic-brenta.org>
6015
9d651736 6016 PR ada/34361
da746f77
LB
6017 * mlib-tgt.adb, mlib-tgt.ads: Fix comments at the top to reflect
6018 the new implementation of target-specific calls.
6019
ebe0660b
OH
60202007-12-07 Olivier Hainque <hainque@adacore.com>
6021
6022 * decl.c (gnat_to_gnu_entity) <case E_Access_Type>: When computing
6023 the designated full view, only follow a second level Full_View link
6024 for Non_Limited_Views of from_limited_with references.
6025
2eb160f2
ST
60262007-12-07 Samuel Tardieu <sam@rfc1149.net>
6027
6028 PR ada/15805
6029 * sem_ch6.adb (Process_Formals): Prevent an access type formal
6030 to be initialized with an access to constant object.
6031
9cc11b58
ST
6032 * sem_ch3.adb (Analyze_Object_Declaration): Signal an error
6033 when an access to constant is used to initialize an access
6034 value.
6035
72f69ddf
ST
6036 PR ada/21346
6037 * a-direct.adb (Compose): Containing_Directory can be an empty string.
6038
5a2fe31a
OH
60392007-12-07 Olivier Hainque <hainque@adacore.com>
6040
6041 PR ada/34173
6042 * decl.c (gnat_to_gnu_entity) <case E_Array_Type>: When setting
6043 the alignment on the GCC XUA array type, set TYPE_USER_ALIGN if
6044 this is from an alignment clause on the GNAT entity.
6045 * utils.c (create_field_decl): Rewrite the computation of DECL_ALIGN
6046 to distinguish the case where we set it from the type's alignment.
6047 When so, propagate TYPE_USER_ALIGN into DECL_USER_ALIGN to indicate
6048 whether this alignment was set from an explicit alignment clause.
6049
4039fb35
EB
60502007-12-06 Eric Botcazou <ebotcazou@adacore.com>
6051
6052 * decl.c (make_packable_type): Revert last change.
6053 (gnat_to_gnu_field): Avoid setting size and position multiple times.
6054 * utils.c (finish_record_type): Retrieve the real name of the type.
6055
0ec479dc
EB
60562007-12-05 Eric Botcazou <ebotcazou@adacore.com>
6057
6058 * trans.c (lvalue_required_p): Take base node directly instead
6059 of its parent. Rename second parameter to 'gnu_type'.
6060 <N_Indexed_Component>: Return 0 if the node isn't the prefix.
6061 <N_Slice>: Likewise.
6062 (Identifier_to_gnu): Rename parent_requires_lvalue to require_lvalue.
6063 Adjust calls to lvalue_required_p.
6064
07c7262e
ST
60652007-12-05 Samuel Tardieu <sam@rfc1149.net>
6066
6067 PR ada/21489
6068 * exp_ch9.adb (Build_Simple_Entry_Call): Initialize OUT access type
6069 parameters of an entry call.
6070
9e94c78f 60712007-12-03 Robert Dewar <dewar@adacore.com>
403fd939
RD
6072 Samuel Tardieu <sam@rfc1149.net>
6073
6074 PR ada/34287
6075 * sem_util.adb (Safe_To_Capture_Value): Do not capture values
6076 of variables declared in a library-level package.
6077
0bcb4d2a
ST
60782007-12-02 Samuel Tardieu <sam@rfc1149.net>
6079
6080 * clean.adb (Clean_Library_Directory): Use Empty_String'Access intead
6081 of Empty_String'Unchecked_Access.
6082
dd9c642a
ST
6083 * Makefile.in: Add support for sh4-linux.
6084
6085 * system-linux-sh4.ads: New file.
6086
35330114
KB
60872007-12-01 Kostik Belousov <kostikbel@ukr.net>
6088
6089 PR ada/33722
6090 * env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
6091 and its argument must not be free()ed.
6092
a6dcb051
EB
60932007-11-29 Eric Botcazou <ebotcazou@adacore.com>
6094
6095 * decl.c (make_packable_type): Retrieve the real name of the type.
6096 (maybe_pad_type): Simplify similar code.
6097
39a97416
ST
60982007-11-28 Samuel Tardieu <sam@rfc1149.net>
6099
a6968b8b 6100 PR ada/15804
39a97416
ST
6101 * par-ch3.adb (P_Variant_Part): Signal an error when anything other
6102 than an identifier is used after "case" in a variant_part.
6103
b99dfeb3 6104 PR ada/17318
9c5a3a8d
ST
6105 * par-ch4.adb (Is_Parameterless_Attribute): New map.
6106 (P_Name, Scan_Apostrophe block): Parse left parenthesis following
6107 attribute name or not depending on the new map.
6108
6109 * sem-attr.adb (Analyze_Attribute): Parameterless attributes
6110 returning a string or a type will not be called with improper
6111 arguments.
6112
6113 * sem-attr.ads (Attribute_Class_Array): Move to snames.ads.
6114
6115 * snames.ads (Attribute_Class_Array): Moved from sem-attr.ads.
6116
5a218498
ST
6117 PR ada/32792
6118 * sem_attr.adb (Analyze_Attribute, Attribute_Integer_Value clause):
6119 Signal an error when attribute argument is a fixed-point value of
6120 an unknown type.
6121
7bde4677
ST
6122 PR ada/22559
6123 * sem_ch3.adb (Build_Derived_Numeric_Type): Do not set RM_Size on
6124 a derived ordinary fixed point type.
6125
6126 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Recompute
6127 RM_Size when a Small clause is found.
6128
182e0d71
AK
61292007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
6130
6131 PR 34081/C++
6132 * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
6133 Pass 'false' for the new allocate_struct_function parameter.
6134 * utils.c (build_function_stub): Likewise.
6135
87caf699
RG
61362007-11-25 Richard Guenther <rguenther@suse.de>
6137
4039fb35 6138 * utils.c (gnat_pushlevel): Use BLOCK_CHAIN.
87caf699
RG
6139 (gnat_poplevel): Likewise.
6140
f1c8c7ee
EB
61412007-11-25 Eric Botcazou <ebotcazou@adacore.com>
6142
6143 * decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the type has
6144 strict alignment, no alignment clause and a known static size, cap
6145 the type alignment to the greatest power of 2 factor of the size.
6146 (gnat_to_gnu_field): If the field has a component clause, is aliased
6147 or of a type with strict alignment, require that its size be equal to
6148 that of the type.
6149 (validate_size): Use the type size as the minimum size for a type with
6150 strict alignment.
6151
bb1f5840
ST
61522007-11-23 Samuel Tardieu <sam@rfc1149.net>
6153
6154 * s-inmaop-posix.adb, s-intman-vxworks.adb, s-taprop-hpux-dce.adb,
6155 s-taprop-irix.adb, s-taprop-linux.adb, s-taprop-lynxos.adb,
6156 s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vxworks.adb:
6157 Use 'Access instead of 'Unchecked_Access in second and third
6158 arguments of pthread_sigmask.
6159
5102fac5
EB
61602007-11-23 Eric Botcazou <ebotcazou@adacore.com>
6161
6162 * decl.c (ceil_alignment): New function.
6163 (gnat_to_gnu_entity): Use it to set the alignment on atomic types.
6164 (make_packable_type): Likewise.
6165
1fa4dfc6
OH
61662007-11-22 Olivier Hainque <hainque@adacore.com>
6167
6168 * trans.c (gnat_to_gnu) <case N_Free_Statement>: Reformat lines
6169 to fit in 80 columns.
6170
9e94c78f 61712007-11-21 Aurelien Jarno <aurelien@aurel32.net>
5f45b299
AJ
6172
6173 * s-osinte-kfreebsd-gnu.ads (To_Target_Priority): New function.
6174 * Makefile.in: Add EH_MECHANISM=-gcc to kfreebsd-gnu. Remove SYMLIB.
6175
7634135a
EB
61762007-11-19 Eric Botcazou <ebotcazou@adacore.com>
6177
6178 PR ada/34098
6179 * misc.c (gnat_adjust_rli): Delete.
6180 (gnat_init): Do not initialize the translation code here.
6181 Do not call set_lang_adjust_rli.
6182 * trans.c (init_code_table): Make static.
6183 (gnat_init_stmt_group): Delete.
6184 (gigi): Initialize the translation code entirely here.
6185 Emit debug info for the common types here instead of...
6186 * utils.c (gnat_init_decl_processing): ...here.
6187 * gigi.h (init_code_table): Delete.
6188 (gnat_init_stmt_group): Likewise.
6189
b2c3bcf4
OH
61902007-11-16 Olivier Hainque <hainque@adacore.com>
6191
6192 * utils2.c (build_call_alloc_dealloc) <if gnu_obj>: Move the code
6193 retrieving an allocator return value from a super-aligned address from
6194 here to ...
6195 * trans.c (gnat_to_gnu) <case N_Free_Statement>: ... here, and don't
6196 expect a super-aligned address for a fat or thin pointer.
6197
a01e283f
EB
61982007-11-14 Eric Botcazou <ebotcazou@adacore.com>
6199
6200 * trans.c (call_to_gnu): Always set the source location on the call
6201 expression. If the function returns-by-target, also set it on the
6202 address expression.
6203
713c3145
ST
62042007-11-14 Samuel Tardieu <sam@rfc1149.net>
6205
356d8961 6206 * adaint.c, init.c, initialize.c, link.c: Remove system-specific
713c3145
ST
6207 sections of non-supported Interix target.
6208
6209 * s-osinte-interix.ads: Removed.
6210
1e992e16
ST
6211 * i-cstrin.ads (chars_ptr): Make it a C convention type.
6212
0e506c4b
ST
62132007-11-13 Samuel Tardieu <sam@rfc1149.net>
6214
6215 * a-tasatt.adb: Add a comment at the beginning of the package
6216 explaining why in general 'Unchecked_Access must be used instead
6217 of 'Access.
6218
66beb09b
ST
6219 * sem_prag.adb (Process_Convention): Move the test for the
6220 entity on which the Convention pragma applies down to also
6221 forbid pragma Convention on enumeration literals reached
6222 through renamings.
6223
14678e46
ST
62242007-11-10 Samuel Tardieu <sam@rfc1149.net>
6225
6226 * a-tasatt.adb: Revert previous change for this file as it will
6227 generate an error when this package is instantiated from a
6228 local context.
6229
f9d806de
ST
62302007-11-07 Samuel Tardieu <sam@rfc1149.net>
6231
6232 * a-tasatt.adb: Type Wrapper should be declared in comment instead
6233 of already declared type Node_Access.
dcbd752d
ST
6234 Use 'Access instead of 'Unchecked_Access when applicable. Local
6235 lifetime is the one of the package.
6236 (Set_Value): W is allocated on the heap.
6237
6238 * g-socket.adb: Use 'Access instead of 'Unchecked_Access when
6239 applicable.
6240 (Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
6241 access type.
6242 (Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
6243 access type.
6244
6245 * s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
6246 applicable.
6247 (elaboration code): Timer_Queue lifetime is the one of the
6248 package.
f9d806de 6249
bc01690e
ST
6250 * tracebak.c (i386 alternative): Remove useless comparaison
6251 which is always false; LOWEST_ADDRESS is 0 and is never greater
6252 than an unsigned integer.
6253
d9c1dc68
ST
6254 * sem_attr.adb (Analyze_Attribute): Remove duplicate identical
6255 embedded check for "Ada_Version >= Ada_05".
6256
cb88a3ea
OH
62572007-11-07 Olivier Hainque <hainque@adacore.com>
6258
6259 * decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
6260 craft and expand comment.
6261
233a722b
EB
62622007-11-01 Eric Botcazou <ebotcazou@adacore.com>
6263
6264 * lang-specs.h: Move translation of -fRTS= after -gnatez switch.
6265
6d1e8bff
EB
62662007-10-23 Eric Botcazou <ebotcazou@adacore.com>
6267
6268 * misc.c (gnat_handle_option): Replace call to abort with
6269 call to gcc_unreachable.
6270 (gnat_init): Likewise.
6271 (gnat_expand_expr): Likewise.
6272 (fp_prec_to_size): Likewise.
6273 (fp_size_to_prec): Likewise.
6274
262e7125
RG
62752007-10-23 Richard Guenther <rguenther@suse.de>
6276
6277 PR bootstrap/33608
6278 * tracebak.c: #undef abort after including system.h.
6279
9e94c78f 62802007-10-20 Danny Smith <dannysmith@users.sourceforge.net>
c8f499a9
DS
6281
6282 * Makefile.in (LIBGNAT_TARGET_PAIRS) Add s-tasinf-mingw.adb,
6283 s-tasinf-mingw.ads, a-exetim-mingw.adb, a-exetim-mingw.ads
6284 for win32 targets.
6285 (EXTRA_GNATRTL_TASKING_OBJS): Add a-exetim.o for win32 targets.
6286
f0e1e807
AC
62872007-10-15 Eric Botcazou <ebotcazou@adacore.com>
6288
6289 * s-osinte-tru64.adb: (Hide_Yellow_Zone): Add On parameter.
6290 Set the protection status of the guard page based on the value of On.
6291
6292 * s-osinte-tru64.ads: (Hide_Yellow_Zone): Add On parameter.
6293
6294 * s-taprop-tru64.adb: (Enter_Task): Pass True to Hide_Yellow_Zone.
6295 (Exit_Task): Pass False to Hide_Yellow_Zone.
6296
62972007-10-15 Robert Dewar <dewar@adacore.com>
6298
6299 * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
6300 s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
6301 a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb,
6302 checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb,
6303 freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb,
6304 gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb,
6305 mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb,
6306 prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb,
6307 sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb,
6308 s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
6309 uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb,
6310 a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb,
6311 a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb,
6312 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb,
6313 a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb,
6314 a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
6315 Minor reformatting.
6316 Add Unreferenced and Warnings (Off) pragmas for cases of
6317 variables modified calls where they are IN OUT or OUT parameters and
6318 the resulting values are not subsequently referenced. In a few cases,
6319 we also remove redundant code found by the new warnings.
6320
6321 * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads,
6322 sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
6323 sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
6324 sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
6325 warning controlled by -gnatw.o that warns on cases of out parameter
6326 values being ignored.
6327
63282007-10-15 Geert Bosch <bosch@adacore.com>
6329
6330 * adaint.c, socket.c, cal.c: Initial port to arm-mentor-nucleus.
6331
6332 * expect.c: Initial port to arm-mentor-nucleus.
6333 Use kill for __gnat_kill() on VMS.
6334
63352007-10-15 Emmanuel Briot <briot@adacore.com>
6336
6337 * ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default
6338 value.
6339 (Xref_Record): Change type for Line, since in the case of a reference to
6340 a predefined entity (as happens for array index types), the line is set
6341 to 0.
6342 Add support for parsing multiple array index types info, or
6343 multiple inherited interfaces info. This information cannot be stored
6344 in Xref_Entity_Record, which only supports a single instance of Tref_*,
6345 and is therefore stored in the list of references instead. It has a
6346 special treatement later on in tools that use this information.
6347
63482007-10-15 Tristan Gingold <gingold@adacore.com>
6349
6350 * debug.adb: Document use of -gnatd.a and -gnatd.I
6351
6352 * layout.adb: On OpenVMS -gnatd.a disables alignment optimization.
6353
63542007-10-15 Javier Miranda <miranda@adacore.com>
6355
6356 * exp_attr.adb (Expand_N_Attribute_Reference): Case Access,
6357 Unchecked_Access, and Unrestricted_Access. Cleanup code that takes
6358 care of access to class-wide interface types plus removal of bizarre
6359 conversion of tagged object to access type (reported by Gary
6360 Dismukes). After this patch there is no need to perform any
6361 additional management on these nodes in Expand_Interface_Actuals.
6362
6363 * exp_disp.adb (Expand_Interface_Actuals): Code cleanup. Remove code
6364 that handles use of 'Access and 'Unchecked_Access applied to
6365 actuals covering interface types. Such code is now
6366 centralized in Expand_N_Attribute_Reference.
6367
63682007-10-15 Ed Schonberg <schonberg@adacore.com>
6369
6370 * exp_ch3.adb (Build_Init_Procedure): Keep separate the initialization
6371 of tagged types whose ultimate ancestor is a CPP type.
6372 (Freeze_Array_Type): For a packed array type, generate an initialization
6373 procedure if the type is public, to handle properly a client that
6374 specifies Normalize_Scalars.
6375
63762007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
6377
6378 * exp_ch9.adb (Actual_Index_Expression): When the expansion occurs
6379 inside a generic body, retrieve the full view of the entry family
6380 discrete subtype if available.
6381
63822007-10-15 Thomas Quinot <quinot@adacore.com>
6383
6384 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): Do not
6385 attempt to generate stubs for hidden primitive operations.
6386
63872007-10-15 Vincent Celier <celier@adacore.com>
6388
6389 * mlib-tgt-specific.adb (Support_For_Libraries): New function,
6390 returning None, used when there is no platform specific body for
6391 MLib.Tgt.Specific.
6392
63932007-10-15 Bob Duff <duff@adacore.com>
6394
6395 * sem_case.adb, sem_ch13.adb, lib-sort.adb: Replace use of Heap_Sort_A
6396 (passing'Unrestricted_Access of nested subprograms to Sort) with use of
6397 the generic Heap_Sort_G, in order to avoid trampolines.
6398
63992007-10-15 Vasiliy Fofanov <fofanov@adacore.com>
6400 Jose Ruiz <ruiz@adacore.com>
6401
6402 * vx_stack_info.c: New file.
6403
6404 * i-forbla-unimplemented.ads: New file.
6405
6406 * Makefile.in: i-forbla-unimplemented.ads: a variant of i-forbla.ads
6407 for unsupported configurations; use it on VMS targets instead of the
6408 real one.
6409 (EXTRA_LIBGNAT_SRCS,EXTRA_LIBGNAT_OBJS for VxWorks): Include
6410 vx_stack_info.{c,o} that contains the routine __gnat_get_stack_info
6411 used by VxWorks targets to have access to task-specific data and be
6412 able to extract the stack boundaries for stack checking.
6413 Use system-vms-ia64.ads on ivms.
6414
6415 * Make-lang.in: Update dependencies.
6416
6417 * sysdep.c (__gnat_get_stack_info): Move to a standalone file
6418 (vx_stack_info.c).
6419
64202007-10-15 Vincent Celier <celier@adacore.com>
6421
6422 * snames.adb, snames.ads: Add new standard name runtime_library_dir
6423
6424 * prj.ads (Language_Config): Add new component Runtime_Library_Dir
6425
6426 * prj-attr.adb: Add project level attribute Runtime_Library_Dir
6427
6428 * prj-env.adb (Create_Mapping_File): Do not put an entry if the path of
6429 the source is unknown.
6430
6431 * prj-ext.adb: Spelling error fix
6432
6433 * prj-nmsc.adb (Check_Ada_Name): Reject any unit that includes an Ada
6434 95 reserved word in its name.
6435 (Process_Project_Level_Array_Attributes): Process new attribute
6436 Runtime_Library_Dir.
6437
6438 * prj-part.adb (Parse_Single_Project): Do not check the name of the
6439 config project against the user project names.
6440
6441 * prj-proc.adb (Expression): In multi-language mode, indexes that do
6442 not include a dot are always case insensitive.
6443 (Process_Declarative_Items): Ditto
6444 (Process_Project_Tree_Phase_1): Set Success to False in case an error is
6445 detected.
6446
6447 * prj-util.adb (Value_Of (In_Array)): When Force_Lower_Case_Index is
6448 True, compare both indexes in lower case.
6449
64502007-10-15 Robert Dewar <dewar@adacore.com>
6451
6452 * rtsfind.adb: (Load_RTU): Turn off style checks for Load call
6453
64542007-10-15 Gary Dismukes <dismukes@adacore.com>
6455
6456 * sem_aggr.adb (Resolve_Record_Aggregate): In the case of a box
6457 association for an access component, add an association with null as
6458 the expression. Remove testing for array subtypes and the setting in
6459 that case of Ctyp to the array component type, which prevented proper
6460 inclusion of an association for null-initialized arrays. Collapse
6461 condition that tests for array subtypes into just a test of
6462 Is_Partially_Initialized_Type (which already covers arrays anyway).
6463
64642007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
6465
6466 * sem_ch12.adb: Minor code reformatting.
6467 (Check_Generic_Child_Unit): Iterate over the homonym chain in order to
6468 find the parent package which may have been hidden by local
6469 declarations.
6470
64712007-10-15 Gary Dismukes <dismukes@adacore.com>
6472
6473 * sem_ch3.adb (Build_Derived_Concurrent_Type): Set the Is_Constrained
6474 flag of derived concurrent types, taking into account the flag setting
6475 on the parent subtype and any new set of discriminants.
6476
64772007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
6478
6479 * sem_ch4.adb: Minor code and comment reformatting.
6480 (Analyze_Allocator): When the designated type of an unconstrained
6481 allocator is a record with unknown discriminants or an array with
6482 unknown range bounds, emit a detailed error message depending on the
6483 compilation mode and whether the designated type is limited.
6484
64852007-10-15 Tristan Gingold <gingold@adacore.com>
6486
6487 * system-vms-ia64.ads: New file.
6488
6489 * system-vms_64.ads: Minor comment fix.
6490
64912007-10-15 Ed Schonberg <schonberg@adacore.com>
6492
6493 * sem_ch6.adb (Find_Corresponding_Spec): If the previous entity is a
6494 body generated for a function with a controlling result that is a null
6495 extension, discard the generated body in favor of the current explicit
6496 one.
6497
64982007-10-15 Ed Schonberg <schonberg@adacore.com>
6499
6500 * sem_disp.adb (Find_Controlling_Arg): Examine the call node before
6501 examining its original form, to handle properly operator calls that
6502 have been rewritten.
6503
65042007-10-15 Olivier Hainque <hainque@adacore.com>
6505
6506 * tb-alvms.c (tb_entry_t, __gnat_backtrace): Store a frame pointer
6507 instead of a procedure value in each traceback entry.
6508
6509 * g-trasym-vms-alpha.adb (Symbolic_Traceback): Pass frame pointer
6510 instead of procedure value to TBK$SYMBOLIZE.
6511
6512 * s-traent-vms.adb (PV_For): Rename as FP_For and access the proper
6513 field.
6514 (TB_Entry_For): Account for the PV/FP renaming.
6515
6516 * s-traent-vms.ads (Traceback_Entry): Rename PV component into FP and
6517 add comment.
6518 (Null_TB_Entry): Account for change of component name.
6519 (PV_For): Rename as FP_For.
6520
65212007-10-15 Tristan Gingold <gingold@adacore.com>
6522
6523 * trans.c (gnat_to_gnu): Remove the padding structure more often.
6524 This optimize assignment to over-aligned record.
6525
65262007-10-15 Emmanuel Briot <briot@adacore.com>
6527
6528 * xref_lib.adb (Get_Full_Type): Add support for the 'h' entity type, ie
6529 interfaces.
6530
6531 * xr_tabls.adb (Add_Reference): Add support for the new 'R' reference
6532 type, for dispatching calls.
6533
65342007-10-15 Vincent Celier <celier@adacore.com>
6535 Robert Dewar <dewar@adacore.com>
6536
6537 * gnat_ugn.texi: Add documentation for switches --version and --help
6538 for the GNAT tools gnatbind, gnatlink, gnatmake, gnatchop, gnatname,
6539 gnatxref, gnatfind, gnatls, and gnatclean.
6540 Document -gnatw.o.
6541 Mention attribute Excluded_Source_Dirs
6542 Replace obsolescent attribute Locally_Removed_Files with attribute
6543 Excluded_Source_Files.
6544 Improve documentation of -u (gnatbind)
6545 Document how to do reliable stack checking for the environmental task
6546 on iVMS.
6547
6548 * gnat_rm.texi: Rewrite section about No_Implicit_Dynamic_Code.
6549 Document attribute Excluded_Source_Files and indicate that attribute
6550 Locally_Removed_Files is obsolescent.
6551
65522007-10-15 Thomas Quinot <quinot@adacore.com>
6553
6554 * g-soccon-vms.ads: Fix value of MSG_WAITALL.
6555
6556 * gen-soccon.c:
6557 Update documentation to note that OpenVMS 8.3 or later must be used
6558 to generate g-soccon-vms.ads.
6559
6560 * atree.adb: Add ??? comment
6561
6562 * exp_util.adb: Minor reformatting.
6563 Add ??? comment in Kill_Dead_Code.
6564
65652007-10-15 Robert Dewar <dewar@adacore.com>
6566
6567 * errout.ads: Comment clarification
6568
6569 * exp_ch4.adb (Expand_N_Allocator): Code cleanup.
6570 (Expand_N_Op_Eq): Improve handling of array equality with -gnatVa
6571
6572 * lib.ads: Comment update
6573
6574 * init.c: Minor reformatting.
6575
6576 * sem_attr.adb: Minor formatting
6577
6578 * osint-b.ads: Minor reformatting
6579
6580 * sem_ch9.adb: Implement -gnatd.I switch
6581
6582 * g-comlin.adb: (Start): Fix handling of empty command line.
6583
6584 * gnatcmd.adb (GNATCmd): Do not put the -rules in the -cargs section,
6585 even when -rules follows the -cargs section.
6586
6524147c
OW
65872007-10-08 Ollie Wild <aaw@google.com>
6588
6589 * misc.c (LANG_HOOKS_PUSHDECL): Replaced lhd_return_tree with
6590 gnat_return_tree.
6591 (gnat_init_gcc_eh): Replaced gnat_eh_runtime_type with
6592 gnat_return_tree.
6593 (gnat_eh_runtime_type): Removed.
6594 (gnat_return_tree): New function.
6595
dff6abb2
BE
65962007-10-08 Ben Elliston <bje@au.ibm.com>
6597
6598 PR ada/33454
6599 Revert:
6600 2007-08-31 Ben Elliston <bje@au.ibm.com>
6601
6602 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
6603 when compiling for powerpc64-*-linux.
6604 * system-linux-ppc64.ads: New file.
6605
c3048783
EB
66062007-09-27 Eric Botcazou <ebotcazou@adacore.com>
6607
6608 Mapped location support
6609 * back_end.adb (Call_Back_End): Pass information about source
6610 files instead of units to gigi.
6611 * gigi.h (struct File_Info_Type): New.
6612 (gigi): Rename and change type of number_units parameter, change
6613 type of file_info_ptr parameter.
6614 * trans.c (number_files): New global variable.
6615 (gigi): Rename and change type of number_units parameter, change
6616 type of file_info_ptr parameter.
6617 If mapped location support is enabled, create the isomorphic mapping
6618 between source files and line maps.
6619 (Sloc_to_locus): If mapped location support is enabled, translate
6620 source location into mapped location.
6621 (annotate_with_node): Rename into set_expr_location_from_node.
6622 Call set_expr_location instead of annotate_with_locus.
6623 (Pragma_to_gnu): Adjust for above change.
6624 (Loop_Statement_to_gnu): Likewise.
6625 (call_to_gnu): Likewise.
6626 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
6627 (gnat_to_gnu): Likewise.
6628 (add_stmt_with_node): Likewise.
6629 (add_cleanup): Likewise.
6630 * utils.c (gnat_init_decl_processing): Do not set input_line.
6631
68b72a44
AC
66322007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
6633
6634 * sem_ch8.adb (Analyze_Use_Type): Code cleanup.
6635 (Applicable_Use): Emit a warning when a package tries to use itself.
6636 (Use_One_Type): Add variable Is_Known_Used. Emit a warning when a type
6637 is already in use or the package where it is declared is in use or is
6638 declared in the current package.
6639 (Spec_Reloaded_For_Body): New subsidiary routine for Use_One_Type.
6640
6641 * a-tasatt.adb, s-osprim-vxworks.adb, g-socthi-mingw.adb,
6642 s-intman-vms.adb, g-socket.adb, g-thread.adb, s-tarest.adb,
6643 s-tassta.adb, s-tporft.adb: Remove redundant 'use type' clause.
6644
66452007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
6646
6647 * a-calend-vms.adb, a-calend.adb:
6648 Add a section on leap seconds control along with two entities used to
6649 enable and disable leap seconds support. The array Leap_Second_Times is
6650 now constant and contains hard time values pre-generated. Remove
6651 all elaboration code used to populate the table of leap seconds.
6652
6653 * bindgen.adb:
6654 Add entity Leap_Seconds_Support to the list of global run-time variables
6655 along with a comment on its usage and values.
6656 (Gen_Adainit_Ada): Add code to generate the declaration and import of
6657 Integer variable Leap_Seconds_Support. Set its value to zero (disabled)
6658 or one (enabled) depending on the presence of binder switch "-y".
6659 (Gen_Adainit_C): Add code to generate the declaration of external int
6660 __gl_leap_seconds_support. Set is value to zero (disabled) or one
6661 (enabled) depending on the presence of binder switch "-y".
6662
6663 * init.c: Add __gl_leap_seconds_support to the list of global values
6664 computed by the binder.
6665
66662007-09-26 Jerome Guitton <guitton@adacore.com>
6667
6668 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
6669 s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb,
6670 s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
6671 s-taprop-posix.adb (Stop_Task): New function, dummy implementation.
6672
6673 * s-taprop.ads, s-taprop-vxworks.adb (Stop_Task): New function.
6674
6675 * s-tasdeb.adb (Stop_All_Tasks): New function, implementing a run-time
6676 function which can be called by the debugger to interrupt the tasks of
6677 an Ada application asynchronously, as needed on VxWorks.
6678 (Stop_All_Tasks_Handler): Renamed from Stop_All_Tasks.
6679
6680 * s-tasdeb.ads (Stop_All_Tasks_Handler): New function declaration,
6681 renamed from Stop_All_Tasks. Update comments.
6682 (Stop_All_tasks): New function declaration.
6683
66842007-09-26 Olivier Hainque <hainque@adacore.com>
6685
6686 * adaint.c (if defined (__Lynx__)): Wrap #def/#undef VMOS_DEV around
6687 #include <utime.h> and #define GCC_RESOURCE_H before
6688 #include <sys/wait.h>.
6689 Add more protections in __gnat_translate_vms.
6690
6691 * expect.c (if defined (__Lynx__)): #define GCC_RESOURCE_H before
6692 #include <sys/wait.h>.
6693
66942007-09-26 Thomas Quinot <quinot@adacore.com>
6695 Sergey Rybin <rybin@adacore.com>
6696
6697 * gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed.
6698
6699 * exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
6700 where it belongs.
6701
6702 * opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
6703
6704 * rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
6705 where it belongs.
6706
6707 * sem_dist.ads: Minor comment fix
6708
6709 * tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
6710
67112007-09-26 Javier Miranda <miranda@adacore.com>
6712 Eric Botcazou <ebotcazou@adacore.com>
6713
6714 * a-tags.adb:
6715 (Get_HT_Link/Set_HT_Link): Updated to handle the additional level of
6716 indirection added to the HT_Link component of the TSD. This is required
6717 to statically allocate the TSD.
6718
6719 * a-tags.ads:
6720 Minor reordering of the declarations in the private part. Required to
6721 add a level of indirection to the contents of the TSD component HT_Link.
6722 This is required to statically allocate the TSD.
6723
6724 * decl.c (gnat_to_gnu_entity) <object>: Do not exclude objects with
6725 Is_Statically_Allocated set from constant objects.
6726 Do not make exported constants created by the compiler volatile.
6727 (gnat_to_gnu_param): Do not treat an IN parameter whose address is taken
6728 as read-only.
6729
6730 * trans.c (Identifier_to_gnu): For constants, unshare initializers
6731 before returning them.
6732
6733 * exp_disp.ads, exp_disp.adb (Building_Static_DT): Spec moved to the
6734 public part of the package.
6735 (Make_DT): Move HT_Link component out of the TSD record. For this
6736 purpose Make_DT now declares a separate object that stores the
6737 HT_Link value, and initializes the TSD component with the address
6738 of this new object. The addition of this level of indirection is
6739 required to statically allocate the TSD because the TSD cannot
6740 have variable components.
6741 (Expand_Interface_Conversion): Improve the expanded code.
6742 (Expand_Interface_Thunk): Set Is_Thunk in the thunk entity.
6743
6744 * sem_disp.adb (Check_Dispatching_Operation): In case of a body
6745 declaring a primitive operation ---allowed by RM 3.9.2 (13.e/2)---,
6746 if we are building static dispatch tables then we must not generate
6747 extra code to register the primitive because the dispatch table will
6748 be built at the end of the library package; otherwise we notify that
6749 we cannot build the static dispatch table.
6750
67512007-09-26 Robert Dewar <dewar@adacore.com>
6752
6753 * checks.adb, gnat1drv.adb, sem_util.ads: Improve warnings for address
6754 overlays.
6755
6756 * sem_ch13.ads, sem_ch13.adb: Improve warnings for address overlays
6757 (Analyze_Record_Representation_Clause): Suppress junk warning for
6758 missing component clause.
6759 (Analyze_Attribute_Definition_Clause, case Address): Apply the special
6760 tests for controlled type overlay to composites with controlled
6761 components.
6762 (Analyze_Record_Representation_Clause): Add reference for component name
6763
67642007-09-26 Javier Miranda <miranda@adacore.com>
6765 Gary Dismukes <dismukes@adacore.com>
6766
6767 * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True
6768 for thunks associated with interface types.
6769
6770 * einfo.ads: Improve documentatation of Is_Internal
6771 (Is_Thunk): New attribute applicable to subprograms. True for thunks
6772 associated with interface types.
6773 Extensive comment fixes regarding flags that appear in all entities. The
6774 documentation is now consistent for all such flags (there were a number
6775 of errors in the documentation in this regard).
6776
6777 * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup.
6778
6779 * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any
6780 of these procedures are passed a function call that already has
6781 build-in-place actuals (testing new flag
6782 Is_Expanded_Build_In_Place_Call). Set the flag on the function call in
6783 the case where processing continues.
6784 (Expand_Call): If the call is generated from a thunk body then we
6785 propagate the extra actuals associated with the accessibility
6786 level of the access type actuals.
6787
6788 * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field
6789 of each extra formal of a protected operation to reference the
6790 corresponding extra formal of the subprogram denoted by the
6791 operation's Protected_Body_Subprogram.
6792
6793 * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
6794 N_Function_Call nodes.
6795
67962007-09-26 Robert Dewar <dewar@adacore.com>
6797
6798 * exp_ch5.adb: Activate memmove type processing if debug flag d.s is set
6799
6800 * debug.adb: Add d.s flag.
6801
68022007-09-26 Gary Dismukes <dismukes@adacore.com>
6803
6804 * exp_dbug.adb (Debug_Renaming_Declaration): Set Is_Internal on the
6805 debug variable so that it won't be initialized when pragma
6806 Initialize_Scalars is in effect.
6807
68082007-09-26 Gary Dismukes <dismukes@adacore.com>
6809
6810 * freeze.adb (Freeze_Entity): Remove check for preelaborable
6811 initialization of a full view. This is moved to
6812 Analyze_Package_Specification.
6813
6814 * sem_ch7.adb (Analyze_Package_Specification): Add check for
6815 preelaborable initialization of a full view in entity loop.
6816 (Uninstall_Declarations): If entity is a use-visible compilation unit,
6817 its child units are use-visible only if they are visible child units.
6818
6819 * sem_util.adb (Is_Preelaborable_Expression): New function to determine
6820 whether an expression can be used within a type declaration that
6821 requires preelaborable init.
6822 (Check_Components): Replace inline code that does partial checking for
6823 preelaborable default expressions with call to
6824 Is_Preelaborable_Expression.
6825 (Has_Preelaborable_Initialization): In the case of a generic actual
6826 subtype, (that is, Is_Generic_Actual is True), return the result of
6827 applying Has_Preelaborable_Initialization to the generic actual's base
6828 type.
6829
68302007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
6831
6832 * g-calend.adb (Has_53_Weeks): Rename to Last_Year_Has_53_Weeks. Add a
6833 call to Jan_1_Day _Of_Week to optimize its performance.
6834 (Is_Leap): Move the routine to the scope of Week_In_Year.
6835 (Jan_1_Day_Of_Week): New routine in Week_In_Year which calculates the
6836 weekday on which January 1 falls of Year - 1 and Year + 1. This function
6837 avoids calling Time_Of and Split, thus making it more efficent.
6838 (Week_In_Year): Reimplemented in oder to follow ISO 8601.
6839
6840 * g-calend.ads (Week_In_Year): Change comment to reflect new
6841 implementation.
6842
68432007-09-26 Emmanuel Briot <briot@adacore.com>
6844
6845 * g-comlin.ads, g-comlin.adb (Command_Line_Configuration,
6846 Command_Line): New types
6847 (Define_Alias, Define_Prefix, Free): New subprograms. These provide
6848 support for defining how switches can be grouped on a command line (as
6849 is the case for -gnatw... for GNAT), and how simple switches can be
6850 used as aliases for more complex switches (-gnatwa is same as
6851 -gnatwbcef...)
6852 (Set_Command_Line, Add_Switch, Remove_Switch): New subprogram
6853 (Start, Current_*): New subprograms
6854 Added support for parsing an array of strings in addition to the real
6855 command line.
6856 (Opt_Parser, Opt_Parser_Data): New type. As a result, some types had to
6857 be moved from the body to the private part of the spec.
6858 (*): All subprograms now have an extra parameter with default value to
6859 specify which parser should be used. For backward compatibility, it
6860 defaults to parsing the command line of the application. They were also
6861 modified to properly handle cases where each of the argument does not
6862 start at index 1 (which is always true for Ada.Command_Line, but not
6863 when processing any Argument_List).
6864 (Free): New subprogram
6865 (Internal_Initialize_Option_Scan, Find_Longuest_Matching_Switch,
6866 Argument): New subprograms
6867 (Switch_Parameter_Type): New enum, which clarifies the code. The extra
6868 special characters like ':', '=',... are now handled in a single place,
6869 which makes the code more extensible eventually.
6870 (Getopt, Full_Switch): When the switch was returned as part of the
6871 special character '*', make sure it is prepended by the switch character
6872 ('-' in general), so that the application knows whether "foo" or "-foo"
6873 was specified on the command line.
6874
68752007-09-26 Florian Villoing <villoing@adacore.com>
6876
6877 * g-dirope.adb (Remove_Dir): In case we are removing directories
6878 recursively, make sure that if an exception is raised during the
6879 processing, the current working directory is reset to its initial
6880 value before propagating the exception.
6881
68822007-09-26 Vincent Celier <celier@adacore.com>
6883
6884 * gnatbind.adb: If there are several ALI files specified and there is
6885 a main program to bind, the first ALI is expected to contain the main
6886 subprogram and the names of the binder generated files will be derived
6887 from the first ALI file name.
6888 (Gnatbind): Fix insertion character in invocation of Error_Msg
6889
68902007-09-26 Vincent Celier <celier@adacore.com>
6891
6892 * gnatcmd.adb (Check_Files): Do not include sources that have been
6893 removed by attributes Exclude_Source_Files or Locally_Removed_Files.
6894
68952007-09-26 Ed Schonberg <schonberg@adacore.com>
6896
6897 * lib-xref.ads, lib-xref.adb: The entry for array types now carries
6898 information about each of its index types, following the type
6899 reference for its component type.
6900
69012007-09-26 Vincent Celier <celier@adacore.com>
6902
6903 * make.adb: (Kill): New procedure (__gnat_kill imported)
6904 (Running_Compile, Outstanding_Compiles): Global variables that
6905 were previously local to procedure Compile_Sources.
6906 (Sigint_Intercepted): Send signal SIGINT to all outstanding
6907 compilation processes.
6908
6909 (Gnatmake): If project files are used, create the mapping of all the
6910 sources, so that the correct paths will be found.
6911
6912 * prj-env.ads, prj-env.adb (Create_Mapping): New procedure
6913
69142007-09-26 Vincent Celier <celier@adacore.com>
6915
6916 * makeutl.ads (Main_Config_Project): Moved to gpr_util.ads
6917
6918 * prj.ads, prj.adb (Default_Language): Remove function, no longer used
6919 Replace components Compiler_Min_Options and Binder_Min_Options with
6920 Compiler_Required_Switches and Binder_Required_Switches in record
6921 Language_Config.
6922 Remove components Default_Language and Config in Project_Tree_Data,
6923 no longer used.
6924
6925 * prj-attr.adb: New attributes Required_Switches (<language>) in
6926 packages Compiler and Binder.
6927
6928 * prj-nmsc.adb: Major rewrite of the processing of configuration
6929 attributes for gprbuild. No impact on GNAT tools.
6930
6931 * prj-proc.ads, prj-proc.adb (Process_Project_Tree_Phase_2): No longer
6932 process configuration attributes: this is done in Prj.Nmsc.Check.
6933 (Recursive_Process): Make a full copy of packages inherited from project
6934 being extended, instead of a shallow copy.
6935 (Process_Project_Tree_Phase_1): New procedure
6936 (Process_Project_Tree_Phase_1): New procedure
6937 (Process): Implementation now uses the two new procedures
6938
6939 * prj-util.adb (Executable_Of): Get the suffix and the default suffix
6940 from the project config, not the tree config that no longer exists.
6941
69422007-09-26 Vincent Celier <celier@adacore.com>
6943
6944 * Make-lang.in: Update dependencies..
6945
69462007-09-26 Vincent Celier <celier@adacore.com>
6947
6948 * osint.adb, osint.ads: Minor reformatting
6949
6950 * osint-b.adb, osint-b.ads (Set_Current_File_Name_Index): New procedure
6951
69522007-09-26 Gary Dismukes <dismukes@adacore.com>
6953
6954 * par-ch4.adb (P_Record_Or_Array_Component_Association): Change Ada 95
6955 message to cite use of <> in aggregate component associations rather
6956 than wrongly indicating use of limited aggregates.
6957
69582007-09-26 Robert Dewar <dewar@adacore.com>
6959
6960 * sem_attr.adb (Analyze_Access_Attribute): Fix missing set of
6961 Address_Taken.
6962
69632007-09-26 Ed Schonberg <schonberg@adacore.com>
6964
6965 * sem_ch3.adb (Derive_Subprograms): If the interface parent is a direct
6966 ancestor of the derived type, the operations are inherited from the
6967 primary dispatch table of the parent.
6968 (OK_For_Limited_Init_In_05): Remove old comment. Reject in-place calls
6969 when the context is an explicit type conversion.
6970
69712007-09-26 Ed Schonberg <schonberg@adacore.com>
6972
6973 * sem_ch4.adb (Analyze_Qualified_Expression): Apply name resolution
6974 rule for qualified expressions properly, to detect improper conversions
6975 and resolve some cases of overloading.
6976
69772007-09-26 Ed Schonberg <schonberg@adacore.com>
6978
6979 * sem_res.adb (Resolve_Call): If the call is dispatching, generate the
6980 proper kind of reference to the primitive operation, for better source
6981 navigation.
6982 (Valid_Conversion): A tagged conversion is legal if both operands are
6983 tagged.
6984
69852007-09-26 Robert Dewar <dewar@adacore.com>
6986
6987 * sem_warn.adb (Check_References): Catch more cases of unreferenced
6988 packages.
6989
69902007-09-26 Vincent Celier <celier@adacore.com>
6991
6992 * snames.adb, snames.ads: Change Include_Option to Include_Switches
6993
69942007-09-26 Robert Dewar <dewar@adacore.com>
6995
6996 * s-wchstw.adb: provide messages for run time unit exceptions
6997
6998 * a-witeio.adb: Minor reformatting
6999
7000 * exp_ch13.adb: Minor reformatting
7001
70022007-09-26 Sergey Rybin <rybin@adacore.com>
7003
7004 * vms_data.ads: Revise gnatmetric qualifiers.
7005 Add qualified for the new gnatbind option '-y'
7006
7007 * gnat_ugn.texi: Revise the gnatmetric section.
7008 Add entry for new gnatbind option '-y'.
7009
7010 * gnat_rm.texi: Minor spelling correction.
7011 Document restriction on overlaying controlled types
7012
70132007-09-26 Vincent Celier <celier@adacore.com>
7014
7015 * makegpr.adb (Link_Executables): Do not fail when the root project has
7016 no sources, but is an extending project.
7017
0a86bcc9
EB
70182007-09-25 Eric Botcazou <ebotcazou@adacore.com>
7019
7020 * trans.c: Fix misplaced #define.
7021
b235734c
EB
70222007-09-22 Eric Botcazou <ebotcazou@adacore.com>
7023
7024 * utils2.c (build_unary_op) <ADDR_EXPR> [INDIRECT_REF]: Propagate
7025 the TYPE_REF_CAN_ALIAS_ALL flag to the result.
7026
97237784
OH
70272007-09-21 Olivier Hainque <hainque@adacore.com>
7028
7029 * utils.c (type_for_nonaliased_component_p): Return false for
7030 all AGGREGATE_TYPEs.
7031
2adde4ff
EB
70322007-09-17 Eric Botcazou <ebotcazou@adacore.com>
7033
7034 * decl.c (gnat_to_gnu_entity) <object>: Make again the type of an
7035 object covered by 13.3(19) volatile.
7036
b693daa7
EB
70372007-09-12 Eric Botcazou <ebotcazou@adacore.com>
7038
7039 PR ada/26797
7040 PR ada/32407
7041 * utils.c (unchecked_convert): Use a subtype as the intermediate type
7042 in the special VIEW_CONVERT_EXPR case.
7043
82da9a90
AC
70442007-09-12 Robert Dewar <dewar@adacore.com>
7045
7046 * types.ads, a-charac.ads, freeze.adb: Minor reformatting.
7047
7048 * a-except.adb, g-hesora.adb, g-speche.adb, lib.adb, lib.ads,
7049 lib-load.adb, lib-writ.adb, s-assert.adb, s-carun8.adb,
7050 s-casuti.adb, s-crc32.adb, s-exctab.adb, s-htable.adb, s-imgenu.adb,
7051 s-mastop.adb, s-memory.adb, s-memory.ads, s-secsta.adb, s-soflin.adb,
7052 s-sopco3.adb, s-sopco4.adb, s-sopco5.adb, s-stache.adb, s-stalib.adb,
7053 s-stoele.adb, s-strcom.adb, s-strops.adb, s-traceb.adb, s-traent.adb,
7054 s-wchcnv.adb, s-wchcon.adb, s-wchjis.adb, s-addope.adb, s-except.adb,
160c5065 7055 s-os_lib.adb, s-string.adb, s-utf_32.adb, a-elchha.adb,
82da9a90
AC
7056 a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads,
7057 g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads,
7058 s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb,
7059 s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb,
7060 snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads,
7061 s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads,
7062 s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads,
7063 s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads,
7064 s-except.ads, s-os_lib.ads, s-string.ads, s-utf_32.ads: Implement
7065 pragma Compiler_Unit and adds it to relevant library units.
7066
70672007-09-12 Ed Schonberg <schonberg@adacore.com>
7068
7069 * sem_aggr.adb (Resolve_Record_Aggregate): An others association with
7070 a box need not correspond to any component.
7071
70722007-09-12 Robert Dewar <dewar@adacore.com>
7073
7074 * g-thread.ads: Document use of "with GNAT.Threads" to ensure loading
7075 the tasking version of the Ada run time when foreign threads are
7076 present and there are no explicit Ada tasks or tasking constructs.
7077
7078 * gnat_rm.texi: Clarify documentation of GNAT.Threads.
7079
70802007-09-12 Hristian Kirtchev <kirtchev@adacore.com>
7081
7082 * bindusg.adb (Display): Correct comment for switch -X. Add a line for
7083 the usage of switch -y.
7084
7085 * switch-b.adb (Scan_Binder_Switches): Set flag Leap_Seconds_Support
7086 when switch -y is present.
7087
7088 * opt.ads: Add binder flag Leap_Seconds_Support used to enable/disable
7089 leap seconds in Ada.Calendar and its children.
7090
70912007-09-12 Jose Ruiz <ruiz@adacore.com>
7092
7093 * a-extiti.ads (Timer): The discriminant is a "not null access
7094 constant" in the Reference Manual.
7095 (Cancel_Handler): Cancelled is an out parameter in the Reference Manual.
7096
70972007-09-12 Robert Dewar <dewar@adacore.com>
7098
7099 * a-swuwha.adb: Remove junk RM header
7100
71012007-09-12 Vincent Celier <celier@adacore.com>
7102
7103 * g-bytswa-x86.adb (Swap2, Swap4, Swap8): Remove explicit "in" mode
7104 indicator
7105
7106 * g-bytswa.ads: Minor reformatting
7107
71082007-09-12 Thomas Quinot <quinot@adacore.com>
7109
7110 * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads:
7111 Add new constant Thread_Blocking_IO, always True by default, set False
7112 on a per-runtime basis.
7113 (Need_Netdb_Buffer): New constant.
7114
71152007-09-12 Arnaud Charlet <charlet@adacore.com>
7116
7117 * s-dsaser.ads (Get_Local_Partition_Id, Get_Passive_Partition_Id):
7118 Added renames for corresponding functions in System.Partition_Interface.
7119
71202007-09-12 Doug Rupp <rupp@adacore.com>
7121
7122 * Makefile.in: Remove VMS specific System.CRTL packages which are no
7123 longer needed.
7124
7125 * s-crtl-vms64.ads: Removed.
7126
09528ed9
OH
71272007-09-12 Olivier Hainque <hainque@adacore.com>
7128
7129 * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: For a subtype
7130 with discriminant constraints, generalize the code for BIT_FIELDs
7131 to PACKED fields of constant size and propagate DECL_PACKED.
7132
fa89b6ec
EB
71332007-09-11 Eric Botcazou <ebotcazou@adacore.com>
7134
7135 * decl.c (array_type_has_nonaliased_component): New predicate.
7136 (gnat_to_gnu_field) <E_Array_Type>: Invoke the above predicate to
7137 set the TYPE_NONALIASED_COMPONENT flag on the type.
7138 <E_Array_Subtype>: Likewise.
7139 * gigi.h (type_for_nonaliased_component_p): Declare.
7140 * utils.c (type_for_nonaliased_component_p): New predicate.
7141 (create_field_decl): Invoke the above predicate to set the
7142 DECL_NONADDRESSABLE_P flag on the field.
7143
e18d6a15
JM
71442007-09-11 Javier Miranda <miranda@adacore.com>
7145
7146 * einfo.ads, einfo.adb (Dispatch_Table_Wrapper): New attribute. Present
7147 in library level record type entities if we are generating statically
7148 allocated dispatch tables.
7149
7150 * exp_disp.adb (Make_Tags/Make_DT): Replace previous code
7151 importing/exporting the _tag declaration by new code
7152 importing/exporting the dispatch table wrapper. This change allows us
7153 to statically allocate of the TSD.
7154 (Make_DT.Export_DT): New procedure.
7155 (Build_Static_DT): New function.
7156 (Has_DT): New function.
7157
7158 * freeze.adb (Freeze_Static_Object): Code cleanup: Do not reset flags
7159 True_Constant and Current_Value. Required to statically
7160 allocate the dispatch tables.
7161 (Check_Allocator): Make function iterative instead of recursive.
7162 Also return inner allocator node, when present, so that we do not have
7163 to look for that node again in the caller.
7164
9e94c78f 71652007-09-11 Jan Hubicka <jh@suse.cz>
e89d6010
JH
7166
7167 * misc.c (gnat_expand_body): Kill.
7168 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
7169
281b604e
AC
71702007-09-10 Robert Dewar <dewar@adacore.com>
7171
7172 * exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
7173 mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
7174 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
7175 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
7176 ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
7177 bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
7178 bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
7179 butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
7180 comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
7181 elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
7182 err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
7183 exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
7184 exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
7185 exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
7186 exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
7187 exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
7188 exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
7189 exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
7190 exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
7191 exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
7192 exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
7193 exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
7194 fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
7195 get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
7196 gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
7197 gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
7198 gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
7199 gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
7200 gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
7201 gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
7202 inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
7203 lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
7204 lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
7205 make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
7206 mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
7207 mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
7208 mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
7209 mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
7210 osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
7211 osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
7212 par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
7213 par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
7214 par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
7215 par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
7216 par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
7217 prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
7218 prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
7219 prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
7220 prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
7221 prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
7222 prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
7223 prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
7224 rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
7225 scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
7226 sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
7227 sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
7228 sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
7229 sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
7230 sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
7231 sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
7232 sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
7233 sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
7234 sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
7235 sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
7236 sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
7237 sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
7238 sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
7239 sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
7240 stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
7241 styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
7242 switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
7243 switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
7244 tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
7245 treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
7246 types.h, uintp.h, urealp.h, usage.adb, usage.ads,
7247 validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
7248 xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
7249 xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
7250 gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
7251 mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
7252 symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
7253 mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
7254 mlib-tgt-vms.ads: Replace headers with GPL v3 headers.
7255
72562007-09-10 Emmanuel Briot <briot@adacore.com>
7257
7258 * s-regpat.adb (Parse_Character_Class): Fix handling of empty character
7259 classes ("[]").
7260
72612007-09-10 Vasiliy Fofanov <fofanov@adacore.com>
7262
7263 * adaint.c (__gnat_translate_vms): new function.
7264
72652007-09-10 Gary Dismukes <dismukes@adacore.com>
7266 Thomas Quinot <quinot@adacore.com>
7267
7268 * exp_ch3.adb (Predef_Spec_Or_Body): When the type is abstract, only
7269 create an abstract subprogram in the case of 'Input. For 'Output we now
7270 create a real spec/body when the type is abstract, since it can
7271 potentially be called.
7272 (Predefined_Primitive_Bodies): Now allow the creation of a predefined
7273 body for 'Output when the type is abstract (only the creation of the
7274 body for 'Input is excluded when the type is abstract).
7275 (Stream_Operation_OK): Add an additional condition in the return
7276 statement, so that False will be returned for TTS_Stream_Input if the
7277 associated tagged type is an abstract extension. Add comments for
7278 return statement.
7279 (Expand_N_Object_Declaration): For the case of a shared passive
7280 variable, insert init proc call only after the shared variable
7281 procedures have been processed, because the IP call needs to undergo
7282 shared passive variable reference expansion, which requires these
7283 procedures to be available (and elaborated).
7284
72852007-09-10 Vincent Celier <celier@adacore.com>
7286
7287 * prj-env.ads, prj-env.adb (Create_Mapping_File (Language)): Remove
7288 parameter Runtime_Project.
7289
72902007-09-10 Ed Schonberg <schonberg@adacore.com>
7291
7292 * sem_aggr.adb (Build_Record_Aggr_Code): If an aggregate component is
7293 given a box association, the type of the component is discriminated,
7294 and the value of the discriminant is the discriminant of the enclosing
7295 type, retrieve its value from the aggregate itself, where it must have
7296 been supplied.
7297
7298 * sem_ch4.adb (Analyze_One_Call): Further refinement to previous fix,
7299 to remove other spurious ambiguities on arithmetic operations involving
7300 literals and addresses, on systems where Address is a visible integer
7301 type, when the operator is called in functional notation.
7302 (Try_Primitive_Operation): Within an instance, a call in prefixed form
7303 is legal when the types match, even if the operation is currently
7304 hidden.
7305
73062007-09-10 Ed Schonberg <schonberg@adacore.com>
7307
7308 * sem_ch12.adb (Build_Local_Package): A formal package with no
7309 associations is legal if all formals have defaults. It is not
7310 equivalent to a formal declared with a box.
7311
73122007-09-10 Sergey Rybin <rybin@adacore.com>
7313
7314 * vms_data.ads: Add qualifier for the new gnatmetric '-lratio' option
7315
73162007-09-10 Sergey Rybin <rybin@adacore.com>
7317
7318 * gnat_ugn.texi: Add description of the new '-lratio' option
7319 Update 7.3.1 section about availability of the feature.
7320
73212007-09-10 Thomas Quinot <quinot@adacore.com>
7322
7323 * exp_smem.ads, exp_smem.adb (Make_Shared_Var_Procs): Return last
7324 inserted node.
7325
73262007-09-10 Olivier Hainque <hainque@adacore.com>
7327
7328 * Makefile.in: (mips-irix section): Activate build of libgmem.
7329
a56955b1
EB
73302007-09-10 Eric Botcazou <ebotcazou@adacore.com>
7331
7332 * a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
7333 x87 registers.
7334
c03550f6
EB
73352007-09-10 Eric Botcazou <ebotcazou@adacore.com>
7336
7337 * decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
7338 a debug renaming declaration specially.
7339
79646678
EB
73402007-09-08 Eric Botcazou <ebotcazou@adacore.com>
7341
7342 * decl.c (gnat_to_gnu_entity) <Object>: Simplify the condition under
7343 which a constant renaming is treated as a normal object declaration.
7344 * trans.c (lvalue_required_p) <N_Slice>: New case, extracted from
7345 the N_Indexed_Component case.
7346 <N_Indexed_Component>: Fall through to above case.
7347 <N_Object_Renaming_Declaration>: Return true for all composite types.
7348
d9e161ce
EB
73492007-09-08 Eric Botcazou <ebotcazou@adacore.com>
7350
7351 * decl.c (make_packable_type): If the new type has been given BLKmode,
7352 try again to get an integral mode for it.
7353
0ab29e91 73542007-09-07 Eric Botcazou <ebotcazou@adacore.com>
6ef9a246 7355
0ab29e91 7356 Re-apply accidentally reverted change:
6ef9a246 7357
0ab29e91 7358 2007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
6ef9a246 7359
0ab29e91
EB
7360 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
7361 get_action_description_for): Replace _Unwind_Word with _uleb128_t
7362 and _Unwind_SWord with _sleb128_t.
4b459ae4 7363
38f1f8cb
EB
73642007-09-06 Eric Botcazou <ebotcazou@adacore.com>
7365
7366 * trans.c (convert_with_check): Update call to real_2expN.
7367
db2960f4
SL
73682007-09-05 Sandra Loosemore <sandra@codesourcery.com>
7369
7370 * trans.c (Compilation_unit_to_gnu): Use set_cfun.
7371 * utils.c (end_subprog_body): Likewise.
7372
d70c0bd6
NC
73732007-09-03 Nick Clifton <nickc@redhat.com>
7374
7375 * Make-lang.in: Change copyright header to refer to version 3 of
7376 the GNU General Public License and to point readers at the
7377 COPYING3 file and the FSF's license web page.
7378 * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
7379 Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
7380 namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
7381 treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
7382 Likewise.
7383
8a26ebb6
AC
73842007-08-31 Vincent Celier <celier@adacore.com>
7385
7386 PR ada/4720
7387
7388 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
7389 gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
7390 (Check_Version_And_Help): New procedure in package Switch to process
7391 switches --version and --help.
7392 Use Check_Version_And_Help in GNAT tools
7393
7394 * make.adb: Ditto.
7395 (Compile_Sources): Make sure that sources that are "excluded" are not
7396 compiled.
7397 (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
7398 project file is used.
7399 (Version_Switch): Remove, moved to Switch
7400 (Help_Switch): Remove, moved to Switch
7401 (Display_Version): Remove, moved to Switch
7402
7403 * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
7404 package Switch to process switches --version and --help.
7405 (Display_Version): New procedure
7406
7407 * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
7408
74092007-08-31 Javier Miranda <miranda@adacore.com>
7410
7411 * a-tags.adb (Internal_Tag): Protect the run-time against wrong
7412 internal tags.
7413
74142007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
7415
7416 * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
7417 (Mark_Non_Null): If the node for which we just generated an access check
7418 is a reference to an *in* parameter and the reference appears in the
7419 declarative part of a subprogram body, mark the node as known non null.
7420
74212007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
7422
7423 * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
7424 structure of E_Exception to reflect the new flag.
7425 (Is_Raised, Set_Is_Raised): New inlined routines.
7426 Update the usage of available flag to reflect the addition of Is_Raised.
7427 (Is_Raised, Set_Is_Raised): Bodies of new routines.
7428 (Write_Entity_Flags): Write the status of flag Is_Raised.
7429 (Is_Descendent_Of_Address): New entity flag, to simplify handling of
7430 spurious ambiguities when integer literals appear in the context of an
7431 address type that is a visible integer type.
7432
7433 * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
7434 exceptions never being raised.
7435 (Analyze_Raise_Statement): When analyzing an exception, mark it as being
7436 explicitly raised.
7437
74382007-08-31 Javier Miranda <miranda@adacore.com>
7439
7440 * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
7441 statement when compiling under restriction No_Exceptions_Proparation.
7442
74432007-08-31 Ed Schonberg <schonberg@adacore.com>
7444
7445 * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
7446 initialization aggregate for the type, generate itype references for
7447 thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
7448
74492007-08-31 Gary Dismukes <dismukes@adacore.com>
7450
7451 * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
7452 library-level package renaming, pass the declaration associated with
7453 the renaming's special debug variable to Qualify_Entity_Names to ensure
7454 that its encoded name is properly qualified.
7455
7456 * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
7457 occurring in the list of entities to qualify, and do not attempt to
7458 traverse an entity list in that case. Variables associated with
7459` library-level package renamings can now occur in the table.
7460
7461 * exp_dbug.ads: Revise documentation of the encoding for renaming
7462 declarations.
7463
74642007-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7465
7466 * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
7467 access type points to an unconstrained array.
7468
74692007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
7470
7471 * restrict.adb, namet.adb, par-util.adb: Remove redundant type
7472 conversion.
7473
7474 * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
7475 simple redundant qualifications. The check is performed whenever the
7476 expression is a non-overloaded identifier.
7477 (Resolve_Type_Conversion): Enchance the redundant type conversion check
7478 to include loop parameters.
7479 (Valid_Conversion): Avoid generation of spurious error message.
7480
74812007-08-31 Bob Duff <duff@adacore.com>
7482
7483 * par-ch4.adb (P_Simple_Expression): Fold long sequences of
7484 concatenations of string literals into a single literal, in order to
7485 avoid very deep recursion in the front end, which was causing stack
7486 overflow.
7487
7488 * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
7489 string, and the right operand is a string literal (the case of "" &
7490 "..."), optimize by avoiding copying the right operand -- just use the
7491 value of the right operand directly.
7492
7493 * stringt.adb (Store_String_Chars): Optimize by growing the
7494 String_Chars table all at once, rather than appending characters one by
7495 one.
7496 (Write_String_Table_Entry): If the string to be printed is very long,
7497 just print the first few characters, followed by the length. Otherwise,
7498 doing "pn(n)" in the debugger can take an extremely long time.
7499
7500 * sem_prag.adb (Process_Interface_Name): Replace loop doing
7501 Store_String_Char with Store_String_Chars.
7502
75032007-08-31 Vincent Celier <celier@adacore.com>
7504
7505 * prj-attr.adb: Add new attribute Excluded_Source_Files
7506
7507 * prj-nmsc.adb: Use attribute Excluded_Source_Files before
7508 Locally_Removed_Files.
7509
7510 * snames.ads, snames.adb: New standard name Excluded_Source_Files
7511
75122007-08-31 Ed Schonberg <schonberg@adacore.com>
7513
7514 * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
7515 clauses of subunits, ignore limited_with_clauses that are illegal and
7516 have not been fully analyzed.
7517
75182007-08-31 Ed Schonberg <schonberg@adacore.com>
7519
7520 * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
7521 flag, for effiency. It is called when analyzing arithmetic operators
7522 and also for actuals in calls that are universal_integers. The flag is
7523 set for the predefined type address, and for any type or subtype
7524 derived from it.
7525
7526 * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
7527 Universal_Integer, when the formal is a descendent of address and the
7528 call appears in user code.
7529 (Analyze_Selected_Component): if the prefix is a private extension, the
7530 tag component is visible.
7531
7532 * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
7533 entity flag.
7534
75352007-08-31 Robert Dewar <dewar@adacore.com>
7536
7537 * s-fileio.adb (Open): Normalize file name to lower case in non-case
7538 sensitive file name systems to avoid unexpected mismatch in Vista.
7539
75402007-08-31 Vincent Celier <celier@adacore.com>
7541
7542 * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
7543
75442007-08-31 Vincent Celier <celier@adacore.com>
7545
7546 * symbols-vms.adb (Initialize): Read symbol files with continuation
7547 lines
7548 (Finalize): If symbol is long, split the line
7549
75502007-08-31 Vincent Celier <celier@adacore.com>
7551
7552 * fmap.ads: Minor comment updates
7553
75542007-08-31 GNAT Script <nobody@adacore.com>
7555
7556 * Make-lang.in: Makefile automatically updated
7557
75582007-08-31 Bob Duff <duff@adacore.com>
7559
7560 * sinfo.ads: Minor comment fix.
7561
75622007-08-31 Thomas Quinot <quinot@adacore.com>
7563
7564 * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
7565 with implementation.
7566 Documentation cleanup only.
7567
75682007-08-31 Sergey Rybin <rybin@adacore.com>
7569
7570 * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
7571 gnatpp '--separate-stmt-name' option.
7572 Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
7573 option.
7574
7575 * gnat_ugn.texi: Add description for the new gnatpp
7576 '--separate-stmt-name' and '--use-on-new-line' options.
7577
22d2aa96
BE
75782007-08-31 Ben Elliston <bje@au.ibm.com>
7579
7580 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
7581 when compiling for powerpc64-*-linux.
7582 * system-linux-ppc64.ads: New file.
7583
51743df8
KW
75842007-08-22 Krister Walfridsson <cato@df.lth.se>
7585
7586 * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
7587 NetBSD.
7588
ac7d7749
KG
75892007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7590
7591 * misc.c (gnat_type_max_size): Constify.
7592
833eddff
AC
75932007-08-16 Gary Dismukes <dismukes@adacore.com>
7594
7595 * cstand.adb (Create_Standard): Create an entity for a zero-sized type
7596 associated with Standard_Debug_Renaming_Type, to be used as the type of
7597 the special variables whose names provide debugger encodings for
7598 renaming declarations.
7599
7600 * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
7601 (Set_Debug_Renaming_Link): Change to set Node25.
7602 (Write_Field13_Name): Remove case for E_Enumeration_Literal.
7603 (Write_Field25_Name): Add case for E_Variable to output
7604 "Debug_Renaming_Link".
7605 (Write_Field23_Name): Correct the output string for "Limited_View".
7606
7607 * exp_dbug.adb: Add with and use of Tbuild.
7608 (Debug_Renaming_Declaration): Replace creation of an enumeration type
7609 and literal with creation of a variable of type
7610 Standard_Debug_Renaming_Type whose name encodes both the renamed object
7611 and the entity of the renaming declaration.
7612 (Qualify_Entity_Name): Add the delayed qualification of the entity name
7613 part of the name of a variable that has a Debug_Renaming_Link.
7614
7615 * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
7616 special type to be associated with variables that provide debugger
7617 encodings for renaming declarations.
7618
76192007-08-16 Gary Dismukes <dismukes@adacore.com>
7620 Ed Schonberg <schonberg@adacore.com>
7621 Javier Miranda <miranda@adacore.com>
7622
7623 * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
7624 ancestor part given by an aggregate to test for an unchecked conversion,
7625 since this can occur in some cases when the ancestor part is a function
7626 call, and we don't want to fall into the recursive call to this
7627 procedure in that case.
7628
7629 * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
7630 stream attributes on limited types to account for user-specified
7631 attributes as well as whether Input (resp. Output) becomes available
7632 due to Read (resp. Write) being available for the type. Change Boolean
7633 variable to the more accurate name
7634 Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
7635 double-"not" predicate at beginning of return statement to more
7636 understandable form.
7637
7638 * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
7639 return has an associated N_Handled_Sequence_Of_Statements, then wrap it
7640 in a block statement and use that as the first statement of the
7641 expanded return rather than incorrectly using the handled sequence as
7642 the first statement.
7643
7644 * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
7645 operation, generate an explicit freeze node for it rather than
7646 generating extra formals, to ensure that gigi has the proper order of
7647 elaboration for anonymous subtypes in the signature of the subprograms.
7648 (Build_In_Place_Formal): Move assertion to beginning of loop.
7649 (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
7650 applied to a function call (occurs for some cases of 'Input).
7651 (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
7652 applied to a function call (occurs for some cases of 'Input).
7653
7654 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
7655 2005, generate an extended return statement enclosing the result object
7656 and 'Read call.
7657
7658 * freeze.adb (Freeze_Record_Type): Extend the current management of
7659 components that are access type with an allocator as default value: add
7660 missing support to the use of qualified expressions of the
7661 allocator (which also cause freezing of the designated type!)
7662 (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
7663 dispatching operation, since extra formals may be needed by calls to
7664 build-in-place functions (such as stream 'Input).
7665
7666 * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
7667 formals for 'Constrained and accessibility level in the case of a
7668 predefined dispatching operation.
7669
7670 * exp_util.adb (Insert_Actions): A protected body is a valid insertion
7671 point, no need to find the parent node.
7672
76732007-08-16 Javier Miranda <miranda@adacore.com>
7674
7675 * exp_attr.adb (Attribute_Priority): Add missing support for entries
7676 and entry barriers.
7677
76782007-08-16 Javier Miranda <miranda@adacore.com>
7679
7680 * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
7681 is not really required and can introduce regression with the debugger.
7682 The original problem is fixed with the patch written for checks.adb.
7683
76842007-08-16 Thomas Quinot <quinot@adacore.com>
7685
7686 * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
7687 Range_Check on Allocated_Table.
7688
76892007-08-16 Vincent Celier <celier@adacore.com>
7690
7691 * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
7692 Including_Non_Switch set to False.
7693 (Gnatmake): For the compiler, call Test_If_Relative_Path with
7694 Including_Non_Switch set to False.
7695
7696 * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
7697 parameter Including_Non_Switch, defaulted to True. When
7698 Including_Non_Switch is False, options that are not switches and
7699 appear as relative path are not converted to absolute paths.
7700
77012007-08-16 Nicolas Roche <roche@adacore.com>
7702
7703 * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
7704 makefiles
7705
7706 * Make-lang.in: Update dependencies
7707
77082007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
7709
7710 * sem_ch10.adb (Has_With_Clause): If the name of the with clause
7711 currently inspected is a selected component, retrieve the entity of
7712 its selector.
7713 (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
7714 from the immediate ancestor of Main_Unit_Entity.
7715 (Install_Limited_Withed_Unit): Do not install the limited view of
7716 package P if P is reachable through an ancestor chain from package C
7717 and C also has a with clause for P in its body.
7718 (Has_Limited_With_Clause): New routine.
7719 (Has_With_Clause): New routine.
7720
77212007-08-16 Ed Schonberg <schonberg@adacore.com>
7722
7723 * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
7724 generic for an enclosing instance is a global reference, even though
7725 its scope is the enclosing instance.
7726
77272007-08-16 Gary Dismukes <dismukes@adacore.com>
7728 Javier Miranda <miranda@adacore.com>
7729
7730 * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
7731 initialize a limited object.
7732 (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
7733 13/2 and 14/2.
7734 Make sure Has_Complex_Representation is inherited by derived type.
7735
77362007-08-16 Robert Dewar <dewar@adacore.com>
7737
7738 * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
7739 exception case
7740
77412007-08-16 Ed Schonberg <schonberg@adacore.com>
7742
7743 * sem_disp.adb (Check_Dispatching_Operation): If the operation
7744 implements an operation inherited from a progenitor interface, verify
7745 that they are subtype-conformant.
7746
77472007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
7748 Bob Duff <duff@adacore.com>
7749 Nicolas Setton <setton@adacore.com>
7750
7751 * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
7752 (Resolve): Alphabetize local variables. Add new variable From_Lib. When
7753 the statement which is being resolved comes from a predefined library
7754 unit, all non-predefined library interpretations are skipped.
7755 (Resolve_Op_Concat): If string concatenation was folded in the parser,
7756 but the "&" is user defined, give an error, because the folding would
7757 be wrong.
7758
7759 * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
7760 the parser has folded a long sequence of concatenations of string
7761 literals.
7762
7763 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
7764 and "JMP_BUF" variables as artificial.
7765 (N_String_Literal): Do not use alloca for very long string literals. Use
7766 xmalloc/free instead. Otherwise the stack might overflow.
7767
7768 * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
7769 compiler.
7770
77712007-08-16 Vincent Celier <celier@adacore.com>
7772
7773 * vms_conv.adb (Process_Argument): Ensure that project related options
7774 are not put in the -cargs section when using GNAT COMPILE.
7775
77762007-08-16 Robert Dewar <dewar@adacore.com>
7777
7778 * gnat_ugn.texi: Add note on preprocessing (output file not written)
7779
77802007-08-16 Thomas Quinot <quinot@adacore.com>
7781
7782 * a-tags.adb: Minor reformatting.
7783
77842007-08-16 Bob Duff <duff@adacore.com>
7785
7786 * sem_type.ads, sem_ch4.adb: Minor reformatting.
7787
ab6328d0
AC
77882007-08-14 Thomas Quinot <quinot@adacore.com>
7789
7790 * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
7791 s-osinte-interix.ads, system-interix.ads: Removed.
7792
77932007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
7794
7795 * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
7796 calls to Check_Within_Time_Bounds.
7797 ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
7798 (Difference): Account for possible rounding of the resulting difference
7799
78002007-08-14 Robert Dewar <dewar@adacore.com>
7801
7802 * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
7803 par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
7804 s-osinte-solaris.adb, s-osinte-solaris.ads,
7805 s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
7806
7807 * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
7808 switch -gnatyS. Enable -gnatyS in GNAT style check mode
7809
78102007-08-14 Robert Dewar <dewar@adacore.com>
7811 Ed Schonberg <schonberg@adacore.com>
7812
7813 * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
7814 Suppress unmodified in-out parameter warning in some cases
7815 This patch is a also fairly significant change to the way suppressible
7816 checks are handled.
7817
7818 * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
7819 needed for access to concurrent record types generated by the expander.
7820 (Generate_Range_Check): When generating a temporary to capture the
7821 value of a conversion that requires a range check, set the type of the
7822 temporary before rewriting the node, so that the type is always
7823 properly placed for back-end use.
7824 (Apply_Float_Conversion_Check): Handle case where the conversion is
7825 truncating.
7826 (Get_Discriminal): Code reformatting. Climb the scope stack looking
7827 for a protected type in order to examine its discriminants.
7828
78292007-08-14 Robert Dewar <dewar@adacore.com>
7830 Gary Dismukes <dismukes@adacore.com>
7831 Ed Schonberg <schonberg@adacore.com>
7832 Thomas Quinot <quinot@adacore.com>
7833
7834 * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
7835 a-stwisu.adb, a-strsup.adb: Fix warnings for range
7836 tests optimized out.
7837
7838 * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
7839 (Get_Allocator_Final_List): For the case of an anonymous access type
7840 that has a specified Associated_Final_Chain, do not go up to the
7841 enclosing scope.
7842 (Expand_N_Type_Conversion): Test for the case of renamings of access
7843 parameters when deciding whether to apply a run-time accessibility
7844 check.
7845 (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
7846 aggregate code before allocator, and ahead of declaration for
7847 temporary, to prevent access before elaboration when the allocator is
7848 an actual for an access parameter.
7849 (Expand_N_Type_Conversion): On an access type conversion involving an
7850 access parameter, do not apply an accessibility check when the
7851 operand's original node was an attribute other than 'Access. We now
7852 create access conversions for the expansion of 'Unchecked_Access and
7853 'Unrestricted_Access in certain cases and clearly accessibility should
7854 not be checked for those.
7855
7856 * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
7857 includes a type conversion of a packed component that has been expanded,
7858 recover the original expression for the object, and use this expression
7859 in the post-call assignment statement, so that the assignment is made
7860 to the object and not to a back-end temporary.
7861 (Freeze_Subprogram): In case of primitives of tagged types not defined
7862 at the library level force generation of code to register the primitive
7863 in the dispatch table. In addition some code reorganization has been
7864 done to leave the implementation clear.
7865 (Expand_Call): When expanding an inherited implicit conversion,
7866 preserve the type of the inherited function after the intrinsic
7867 operation has been expanded.
7868
7869 * exp_ch2.ads, exp_ch2.adb
7870 (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
7871 of an entry formal appearing in an assignment statement does not assign
7872 to the formal.
7873 (Expand_Current_Value): Instead of calling a routine to determine
7874 whether the prefix of an attribute reference should be optimized or
7875 not, prevent the optimization of such prefixes all together.
7876
7877 * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
7878 component whose prefix is known to be of an access type is an implicit
7879 dereference and does not assign to the prefix.
7880
78812007-08-14 Ed Schonberg <schonberg@adacore.com>
7882 Robert Dewar <dewar@adacore.com>
7883
7884 * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
7885 itype is visited, make an entry into table to link associated node and
7886 new itype.
7887 Add comments and correct harmless error in Build_NCT_Hash_Tables
7888 (Array_Aggr_Subtype): Associate each itype created for an index type to
7889 the corresponding range construct, and not to the aggregate itself. to
7890 maintain a one-to-one correspondence between itype and its associated
7891 node, to prevent errors when complex expression is copied.
7892 Fix mishandling of multiple levels of parens
7893
7894 * sem_aggr.adb: Create a limited view of an incomplete type, to make
7895 treatment of limited views uniform for all visible declarations in a
7896 limited_withed package.
7897 (New_Copy_Tree): If hash table is being used and itype is visited,
7898 make an entry into table to link associated node and new itype.
7899 (Resolve_Record_Aggregate): Do not add an others box association for a
7900 discriminated record component that has only discriminants, when there
7901 is a box association for the component itself.
7902
7903 * par-ch4.adb: Fix mishandling of multiple levels of parens
7904
79052007-08-14 Robert Dewar <dewar@adacore.com>
7906
7907 * comperr.adb: Fix problem with suppressing warning messages from gigi
7908
7909 * erroutc.ads, erroutc.adb, errout.ads,
7910 errout.adb (Write_Eol): Remove trailing spaces before writing the line
7911 (Write_Eol_Keep_Blanks): New procedure to write a line, including
7912 possible trailing spaces.
7913 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
7914 Fix problem with suppressing warning messages from back end
7915 Improve handling of deleted warnings
7916
7917 * gnat1drv.adb:
7918 Fix problem with suppressing warning messages from back end
7919 Handle setting of Static_Dispatch_Tables flag.
7920
7921 * prepcomp.adb:
7922 Fix problem with suppressing warning messages from back end
7923
7924 * exp_intr.adb: Improve handling of deleted warnings
7925
79262007-08-14 Robert Dewar <dewar@adacore.com>
7927
7928 * debug.adb: Improve -gnatdI to cover all cases of serialization
7929 Add documentation of dZ, d.t
7930
7931 * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
7932 serialization.
7933 (Sprint_Node_Actual): Generate new output associated with implicit
7934 importation and implicit exportation of object declarations.
7935
79362007-08-14 Ed Schonberg <schonberg@adacore.com>
7937 Robert Dewar <dewar@adacore.com>
7938 Javier Miranda <miranda@adacore.com>
7939 Gary Dismukes <dismukes@adacore.com>
7940
7941 * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
7942 to make treatment of limited views uniform for all visible declarations
7943 in a limited_withed package.
7944 Improve warnings for in out parameters
7945 (Set_Related_Interaface/Related_Interface): Allow the use of this
7946 attribute with constants.
7947 (Write_Field26_Name): Handle attribute Related_Interface in constants.
7948 Warn on duplicate pragma Preelaborable_Initialialization
7949
7950 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
7951 generation of a freezing node to ensure proper management of null
7952 excluding access types in the backend.
7953 (Create_Extra_Formals): Test base type of the formal when checking for
7954 the need to add an extra accessibility-level formal. Pass the entity E
7955 on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
7956 originally being done in a couple of cases), to ensure that the
7957 Extra_Formals list gets set on the entity E when the first entity is
7958 added.
7959 (Conforming_Types): Add missing calls to Base_Type to the code that
7960 handles anonymous access types. This is required to handle the
7961 general case because Process_Formals builds internal subtype entities
7962 to handle null-excluding access types.
7963 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
7964 functions that need it, even when not marked Requires_Overriding.
7965 Improve warnings for in out parameters
7966 (Analyze_Function_Return): Warn for disallowed null return
7967 Warn on return from procedure with unset out parameter
7968 Ensure consistent use of # in error messages
7969 (Check_Overriding_Indicator): Add in parameter Is_Primitive.
7970 (Analyze_Function_Return): Move call to Apply_Constraint_Check before
7971 the implicit conversion of the expression done for anonymous access
7972 types. This is required to generate the code of the null excluding
7973 check (if required).
7974
7975 * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
7976 A formal parameter is never publicly referenceable outside of its body.
7977 (Check_References): For an unreferenced formal parameter in an accept
7978 statement, use the same warning circuitry as for subprogram formal
7979 parameters.
7980 (Warn_On_Unreferenced_Entity): New subprogram, taken from
7981 Output_Unreferenced_Messages, containing the part of that routine that
7982 is now reused for entry formals as described above.
7983 (Goto_Spec_Entity): New function
7984 (Check_References): Do not give IN OUT warning for dispatching operation
7985 Improve warnings for in out parameters
7986 (Test_Ref): Check that the entity is not undefinite before calling
7987 Scope_Within, in order to avoid infinite loops.
7988 Warn on return from procedure with unset out parameter
7989 Improved warnings for unused variables
7990
79912007-08-14 Robert Dewar <dewar@adacore.com>
7992 Javier Miranda <miranda@adacore.com>
7993 Gary Dismukes <dismukes@adacore.com>
7994
7995 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
7996 (Expand_N_Attribute_Reference): Further unify the handling of the
7997 three forms of access attributes, using common code now for all three
7998 cases. Add a test for the case of applying an access attribute to
7999 an explicit dereference when the context is an access-to-interface
8000 type. In that case we need to apply the conversion to the prefix
8001 of the explicit dereference rather than the prefix of the attribute.
8002 (Attribute_Version, UET_Address): Set entity as internal to ensure
8003 proper dg output of implicit importation.
8004 (Expand_Access_To_Type): Removed.
8005 (Expand_N_Attribute_Reference): Merge the code from the three cases
8006 of access attributes, since the processing is largely identical for
8007 these cases. The substantive fix here is to process the case of a
8008 type name prefix (current instance case) before handling the case
8009 of interface prefixes.
8010
80112007-08-14 Thomas Quinot <quinot@adacore.com>
8012 Ed Schonberg <schonberg@adacore.com>
8013 Javier Miranda <miranda@adacore.com>
8014 Robert Dewar <dewar@adacore.com>
8015
8016 * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
8017 (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
8018 type that is an anonymous access to controlled object, establish
8019 an associated finalization chain to avoid corrupting the global
8020 finalization list when a dynamically allocated object designated
8021 by such a component is deallocated.
8022 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
8023 functions that need it, even when not marked Requires_Overriding.
8024 (Initialize_Tag): Replace call to has_discriminants by call to
8025 Is_Variable_Size_Record in the circuitry that handles the
8026 initialization of secondary tags.
8027 (Is_Variable_Size_Record): New implementation.
8028 (Expand_N_Object_Declaration): Suppress call to init proc if there is a
8029 Suppress_Initialization pragma for a derived type.
8030 (Is_Variable_Size_Record): New subprogram.
8031 (Build_Offset_To_Top_Functions): New implementation that simplifies the
8032 initial version of this routine and also fixes problems causing
8033 incomplete initialization of the table of interfaces.
8034 (Build_Init_Procedure): Improve the generation of code to initialize the
8035 the tag components of secondary dispatch tables.
8036 (Init_Secondary_Tags): New implementation that simplifies the previous
8037 version of this routine.
8038 (Make_DT): Add parameter to indicate when type has been frozen by an
8039 object declaration, for diagnostic purposes.
8040 (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
8041 diagnose attemps to freeze a subprogram when some untagged type of its
8042 profile is a private type whose full view has not been analyzed yet.
8043 (Freeze_Array_Type): Generate init proc for packed array if either
8044 Initialize or Normalize_Scalars is set.
8045 (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
8046 constructing the new profile, copy the null_exclusion indicator for each
8047 parameter, to ensure full conformance of the new body with the spec.
8048
8049 * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
8050 Create wrappers for constructor functions that need it, even when not
8051 marked Requires_Overriding.
8052 (Covers): Handle properly designated types of anonymous access types,
8053 whose non-limited views are themselves incomplete types.
8054 (Add_Entry): Use an entity to store the abstract operation which hides
8055 an interpretation.
8056 (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
8057 (Collect_Interps): Use Empty as an actual for Abstract_Op in the
8058 initialization aggregate.
8059 (Function_Interp_May_Be_Hidden): Rename to
8060 Function_Interp_Has_Abstract_Op.
8061 (Has_Compatible_Type): Remove machinery that skips interpretations if
8062 they are labeled as potentially hidden by an abstract operator.
8063 (Has_Hidden_Interp): Rename to Has_Abstract_Op.
8064 (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
8065 (Write_Overloads): Output the abstract operator if present.
8066 (Add_Entry): Before inserting a new entry into the interpretation table
8067 for a node, determine whether the entry will be disabled by an abstract
8068 operator.
8069 (Binary_Op_Interp_May_Be_Hidden): New routine.
8070 (Collect_Interps): Add value for flag May_Be_Hidden in initialization
8071 aggregate.
8072 (Function_Interp_May_Be_Hidden): New routine.
8073 (Has_Compatible_Type): Do not consider interpretations hidden by
8074 abstract operators when trying to determine whether two types are
8075 compatible.
8076 (Has_Hidden_Interp): New routine.
8077 (Set_May_Be_Hidden_Interp): New routine.
8078 (Write_Overloads): Write the status of flag May_Be_Hidden.
8079
80802007-08-14 Ed Schonberg <schonberg@adacore.com>
8081 Javier Miranda <miranda@adacore.com>
8082
8083 * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
8084 types declared in the declarative part of a nested package body or in
8085 the proper body of a stub.
8086 (Set_All_DT_Position): Add missing check to avoid wrong assignation
8087 of the same dispatch table slot to renamed primitives.
8088 (Make_Select_Specific_Data_Table): Handle private types.
8089 (Tagged_Kind): Handle private types.
8090 (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
8091 output of implicit importation and exportation.
8092 (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
8093 first formal of the thunk is always associated with the controlling
8094 type. In addition perform the following code cleanup: remove formal
8095 Thunk_Alias which is no longer required, cleanup evaluation of the
8096 the controlling type, and update the documentation.
8097 Replace occurrence of Default_Prim_Op_Count by
8098 Max_Predef_Prims. Addition of compile-time check to verify
8099 that the value of Max_Predef_Prims is correct.
8100 (Check_Premature_Freezing): Apply check in Ada95 mode as well.
8101 (Make_DT): Add parameter to indicate when type has been frozen by an
8102 object declaration, for diagnostic purposes.
8103 (Build_Static_Dispatch_Tables): New subprogram that takes care of the
8104 construction of statically allocated dispatch tables.
8105 (Make_DT): In case of library-level tagged types export the declaration
8106 of the primary tag. Remove generation of tags (now done by Make_Tags).
8107 Additional modifications to handle non-static generation of dispatch
8108 tables. Take care of building tables for asynchronous interface types
8109 (Make_Tags): New subprogram that generates the entities associated with
8110 the primary and secondary tags of Typ and fills the contents of Access_
8111 Disp_Table. In case of library-level tagged types imports the forward
8112 declaration of the primary tag that will be declared later by Make_DT.
8113 (Expand_Interface_Conversion): In case of access types to interfaces
8114 replace an itype declaration by an explicit type declaration to avoid
8115 problems associated with the scope of such itype in transient blocks.
8116
81172007-08-14 Robert Dewar <dewar@adacore.com>
8118 Ed Schonberg <schonberg@adacore.com>
8119 Javier Miranda <miranda@adacore.com>
8120
8121 * exp_util.ads, exp_util.adb:
8122 This patch replaces a number of occurrences of explicit tests for N_Null
8123 with calls to Known_Null. This improves tracking of null values, since
8124 Known_Null also catches null constants, and variables currently known to
8125 be null, so we get better tracking.
8126 (Ensure_Defined): create an itype reference only in the scope of the
8127 itype.
8128 (Side_Effect_Free): A selected component of an access type that
8129 denotes a component with a rep clause must be treated as not
8130 side-effect free, because if it is part of a linked structure its
8131 value may be affected by a renaming.
8132 (Expand_Subtype_From_Expr): For limited objects initialized with build
8133 in place function calls, do nothing; otherwise we prematurely introduce
8134 an N_Reference node in the expression initializing the object, which
8135 breaks the circuitry that detects and adds the additional arguments to
8136 the called function. Bug found working in the new patch for statically
8137 allocated dispatch tables.
8138 (Is_Library_Level_Tagged_Type): New subprogram.
8139 (Remove_Side_Effects): If the expression of an elementary type is an
8140 operator treat as a function call.
8141 (Make_Literal_Range): If the index type of the array is not integer, use
8142 attributes properly to compute the constraint on the resulting aggregate
8143 which is a string.
8144
8145 * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
8146 class-wide type whose base type is an incomplete private type, leave
8147 class-wide type unfrozen so that freeze nodes can be generated
8148 properly at a later point.
8149 (Freeze_Entity, array case): Handle case of pragma Pack and component
8150 size attributre clause for same array.
8151
81522007-08-14 Vincent Celier <celier@adacore.com>
8153
8154 * prj.ads, prj.adb: Update Project Manager to new attribute names for
8155 gprbuild.
8156 Allow all valid declarations in configuration project files
8157 (Reset): Initialize all tables and hash tables in the project tree data
8158 Major update of the Project Manager and of the project aware tools,
8159 including gprmake, so that the same sources in the GNAT repository
8160 can be used by gprbuild.
8161 (Slash_Id): Change type to be Path_Name_Type
8162 (Slash): Return a Path_Name_Type instead of a File_Name_Type
8163
8164 * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
8165 gprbuild.
8166 Update Project Manager to new attribute names for ghprbuild
8167 Allow all valid declarations in configuration project files
8168 Major update of the Project Manager and of the project aware tools,
8169 including gprmake, so that the same sources in the GNAT repository
8170 can be used by gprbuild.
8171
8172 * prj-com.ads:
8173 Major update of the Project Manager and of the project aware tools,
8174 including gprmake, so that the same sources in the GNAT repository
8175 can be used by gprbuild.
8176
8177 * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
8178 insensitive flag for attributes with optional index.
8179 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
8180 array attribute, put the index in lower case.
8181 Update Project Manager to new attribute names for ghprbuild
8182 Allow all valid declarations in configuration project files
8183 Major update of the Project Manager and of the project aware tools,
8184 including gprmake, so that the same sources in the GNAT repository
8185 can be used by gprbuild.
8186
8187 * prj-env.ads, prj-env.adb:
8188 Major update of the Project Manager and of the project aware tools,
8189 including gprmake, so that the same sources in the GNAT repository
8190 can be used by gprbuild.
8191 (Get_Reference): Change type of parameter Path to Path_Name_Type
8192
8193 * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
8194 removing '-' from the path to start with the first character of the
8195 next directory.
8196 Major update of the Project Manager and of the project aware tools,
8197 including gprmake, so that the same sources in the GNAT repository
8198 can be used by gprbuild.
8199 Major update of the Project Manager and of the project aware tools,
8200 including gprmake, so that the same sources in the GNAT repository
8201 can be used by gprbuild.
8202
8203 * prj-nmsc.ads, prj-nmsc.adb:
8204 Update Project Manager to new attribute names for ghprbuild
8205 Allow all valid declarations in configuration project files
8206 (Search_Directories): Detect subunits that are specified with an
8207 attribute Body in package Naming. Do not replace a source/unit in the
8208 same project when the order of the source dirs are known. Detect
8209 duplicate sources/units in the same project when the order of the
8210 source dirs are not known.
8211 (Check_Ada_Name): Allow all identifiers that are not reserved words
8212 in Ada 95.
8213 Major update of the Project Manager and of the project aware tools,
8214 including gprmake, so that the same sources in the GNAT repository
8215 can be used by gprbuild.
8216 (Look_For_Sources): If the list of sources is empty, set the object
8217 directory of non extending project to nil.
8218 Change type of path name variables to be Path_Name_Type
8219 (Locate_Directory): Make sure that on Windows '/' is converted to '\',
8220 otherwise creating missing directories will fail.
8221
8222 * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
8223 prj-part.ads, prj-part.adb:
8224 Major update of the Project Manager and of the project aware tools,
8225 including gprmake, so that the same sources in the GNAT repository
8226 can be used by gprbuild.
8227
8228 * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
8229 insensitive flag for attributes with optional index.
8230 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
8231 array attribute, put the index in lower case.
8232 (Parse_Variable_Reference): Allow the current project name to be used in
8233 the prefix of an attribute reference.
8234
8235 * prj-util.ads, prj-util.adb
8236 (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
8237 defaulted to False. When True, always check against indexes in lower
8238 case.
8239
8240 * snames.ads, snames.h, snames.adb:
8241 Update Project Manager to new attribute names for gprbuild
8242 Allow all valid declarations in configuration project files
8243
82442007-08-14 Robert Dewar <dewar@adacore.com>
8245 Ed Schonberg <schonberg@adacore.com>
8246
8247 * opt.ads: Warning for non-local exception propagation now off by
8248 default
8249 New switch -gnatI to disable representation clauses
8250 Implement new pragma Implicit_Packing
8251
8252 * usage.adb:
8253 Warning for non-local exception propagation now off by default
8254 Add warning for unchecked conversion of pointers wi different
8255 conventions.
8256 New switch -gnatI to disable representation clauses
8257
8258 * usage.adb: new switch -gnatyS
8259
8260 * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
8261 note that aggregates of anonymous array types are not flagged.
8262 -gnatwc now includes membership tests optimized away
8263 -gnatw.x warnings are now off by default
8264 Added conditional compilation Appendix
8265 Add documentation of -gnatI
8266 Add documentation for new -gnatyS style check
8267 Update documentation about SAL and auto-init on Windows.
8268
8269 * gnat_rm.texi:
8270 Add documentation for pragma Check_Name and 'Enabled attribute
8271 Document that Eliminate on dispatching operation is ignored
8272 Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
8273 Document pragma Main
8274 Document pragma Implicit_Packing
8275
8276 * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
8277 different conventions
8278 New switch -gnatI to disable representation clauses
8279
8280 * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
8281 recognized, report the invalid characters including "-gnat" instead of
8282 just the first character in the switch.
8283 New switch -gnatI to disable representation clauses
8284 Set Warn_On_Object_Renames_Function true for -gnatg
8285
8286 * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
8287 Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
8288 Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
8289 to switch -aP (add directory to project search dir).
8290
8291 * par-prag.adb: Implement new pragma Implicit_Packing
8292
8293 * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
8294 type as having a non-standard representation, to force expansion on
8295 conversion to related types.
8296 (Analyze_Pragma): Warn on misspelled pragma
8297 (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
8298 Ensure consistent use of # in error messages
8299 Implement pragma Implicit_Packing
8300
83012007-08-14 Olivier Hainque <hainque@adacore.com>
8302 Eric Botcazou <ebotcazou@adacore.com>
8303
8304 * targtyps.c (get_target_maximum_default_alignment): New function.
8305 Maximum alignment
8306 that the compiler might choose by default for a type or object.
8307 (get_target_default_allocator_alignment): New function. Alignment known
8308 to be honored by the target default allocator.
8309 (get_target_maximum_allowed_alignment): New function. Maximum alignment
8310 we might accept for any type or object on the target.
8311 (get_target_maximum_alignment): Now synonym of maximum_default_alignment
8312
8313 * gigi.h (get_target_maximum_default_alignment): Declare new function.
8314 (get_target_default_allocator_alignment): Likewise.
8315 (get_target_maximum_allowed_alignment): Likewise.
8316
8317 PR ada/19037
8318 * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
8319 result of a function call, first try to use a stabilized reference for
8320 a constant renaming too.
8321 (validate_alignment): Use target_maximum_allowed_alignment instead of
8322 MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
8323 (gnat_to_gnu_entity): Use common nodes directly.
8324 (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
8325 alignment and size for the object.
8326 (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
8327 and N_Procedure_Call_Statement.
8328 (takes_address): Rename to lvalue_required_p, add third parameter
8329 'aliased' and adjust recursive calls.
8330 <N_Indexed_Component>: Update 'aliased' from the array type.
8331 <N_Selected_Component>: New case.
8332 <N_Object_Renaming_Declaration>: New Likewise.
8333 (Identifier_to_gnu): Adjust for above changes.
8334 (maybe_stabilize_reference) <CONST_DECL>: New case.
8335
8336 * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
8337 between type variants.
8338 (build_simple_component_ref): Likewise.
8339 (build_call_alloc_dealloc): Use target_default_allocator_alignment
8340 instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
8341 aligning type circuitry for allocations from the default storage pool.
8342 (build_allocator): Likewise.
8343 (build_simple_component_ref): Manually fold the reference for a
8344 constructor if the record type contains a template.
8345
8346 * utils.c (value_zerop): Delete.
8347 (gnat_init_decl_processing): Emit debug info for common types.
8348 (rest_of_record_type_compilation): If a union contains a field
8349 with a non-constant qualifier, treat it as variable-sized.
8350 (finish_record_type): Give the stub TYPE_DECL a name.
8351 (rest_of_record_type_compilation): Likewise.
8352 (convert) <CONSTRUCTOR>: New case. Build a new constructor if
8353 types are equivalent array types.
8354 (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
8355 even if the type is not passed by reference.
8356 (static_ctors, static_dtors): Delete.
8357 (end_subprog_body): Do not record constructors and destructors.
8358 (build_global_cdtor): Delete.
8359 (gnat_write_global_declarations): Do not call build_global_cdtor.
8360
0ab29e91 8361 * lang-spARGET_VXWORKS_RTP is defined, append -mrtp when
ab6328d0
AC
8362 -fRTS=rtp is specified.
8363 If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
8364 specified.
8365
8366 * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
8367 of the personality function with SJLJ exceptions.
8368
8369 * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
8370 the name of the personality function with SJLJ exceptions.
8371
83722007-08-14 Robert Dewar <dewar@adacore.com>
8373 Ed Schonberg <schonberg@adacore.com>
8374
8375 * par.ads, par.adb: Improve handling of extra right parens.
8376 (Par): Remove flag From_Limited_With_Clause.
8377
8378 * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
8379 Improve handling of extra right parens.
8380
83812007-08-14 Robert Dewar <dewar@adacore.com>
8382
8383 * par-tchk.adb (TF_Semicolon): Improve error recovery
8384
83852007-08-14 Robert Dewar <dewar@adacore.com>
8386 Ed Schonberg <schonberg@adacore.com>
8387
8388 * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
8389 enumeration type, mark all literals as referenced.
8390 (Eval_Attribute, case 'Image): If the argument is an enumeration
8391 literal and names are available, constant-fold but mark nevertheless as
8392 non-static.
8393 Clean up function names.
8394 (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
8395 comment.
8396 (Requires_Simple_Name_Prefix): Removed.
8397
83982007-08-14 Robert Dewar <dewar@adacore.com>
8399 Ed Schonberg <schonberg@adacore.com>
8400
8401 * sem_ch11.adb: Improved warnings for unused variables
8402
8403 * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
8404 is a synchronized interface, the derived type is limited.
8405 (Analyze_Object_Declaration): Mark the potential coextensions in the
8406 definition and expression of an object declaration node.
8407 (Build_Derived_Type): For the completion of a private type declaration
8408 with a derived type declaration, chain the parent type's representation
8409 items to the last representation item of the derived type (not the
8410 first one) if they are not present already.
8411 (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
8412 object declaration of forward references to tags.
8413 (Access_Subprogram_Declaration): In Ada2005, anonymous access to
8414 subprogram types can appear as access discriminants of synchronized
8415 types.
8416 (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
8417 given in prefixed form as a selected component.
8418 (Process_Discriminants): If not all discriminants have defaults, place
8419 error message on a default that is present.
8420 (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
8421 extend a synchronized tagged type.
8422 Improved warnings for unused variables
8423 (Is_Visible_Component): Fix a visibility hole on a component inherited
8424 by a private extension when parent is itself declared as a private
8425 extension, and the derivation is in a child unit.
8426 (Find_Hidden_Interface): Move spec from the package body.
8427
84282007-08-14 Robert Dewar <dewar@adacore.com>
8429 Ed Schonberg <schonberg@adacore.com>
8430
8431 * sem_ch5.adb: Improve warnings on redundant assignments
8432
8433 * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
8434 parameter
8435 (Is_Synchronized_Tagged_Type): New subprogram that returns true
8436 in case of synchronized tagged types (AARM 3.9.4 (6/2)).
8437 (Safe_To_Capture_Value): Can now return True for constants, even if Cond
8438 is set to False. Improves handling of Known_[Not_]Null.
8439 (Wrong_Type): Special case address arithmetic attempt
8440 (Collect_Abstract_Interfaces): Add new formal to allow collecting
8441 abstract interfaces just using the partial view of private types.
8442 (Has_Abstract_Interfaces): Add new formal to allow checking types
8443 covering interfaces using the partial view of private types.
8444 (Is_Fully_Initialized_Type): Special VM case for uTag component. This
8445 component still needs to be defined in this case, but is never
8446 initialized as VMs are using other dispatching mechanisms.
8447 (Abstract_Interface_List): For a protected type, use base type to get
8448 proper declaration.
8449 Improve warnings on redundant assignments
8450 (Is_Variable): Handle properly an implicit dereference of a prefixed
8451 function call.
8452 (Build_Actual_Subtype): If this is an actual subtype for an
8453 unconstrained formal parameter, use the sloc of the body for the new
8454 declaration, to prevent anomalises in the debugger.
8455
84562007-08-14 Robert Dewar <dewar@adacore.com>
8457
8458 * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
8459 dispatching operation
8460
84612007-08-14 Ed Schonberg <schonberg@adacore.com>
8462 Gary Dismukes <dismukes@adacore.com>
8463
8464 * exp_aggr.ads,
8465 exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
8466 expanded aggregate code before allocator, and ahead of declaration for
8467 temporary, to prevent access before elaboration when the allocator is
8468 an actual for an access parameter.
8469 (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
8470 the TSD and the table of interfaces.
8471 (Convert_To_Assignments): Augment the test for delaying aggregate
8472 expansion for limited return statements to include the case of extended
8473 returns, to prevent creation of an unwanted transient scope.
8474 (Is_Static_Dispatch_Table_Aggregate): New subprogram.
8475 (Expand_Array_Aggregate): Handle aggregates associated with
8476 statically allocated dispatch tables.
8477 (Expand_Record_Aggregate): Handle aggregates associated with
8478 statically allocated dispatch tables.
8479 (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
8480 of anonymous access type.
8481
84822007-08-14 Ed Schonberg <schonberg@adacore.com>
8483
8484 * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
8485 is a variable that renames a slice, use the variable itself in the
8486 expannsion when the renamed expression itself may be modified between
8487 the declaration of the renaming and the array assignment.
8488
84892007-08-14 Jerome Guitton <guitton@adacore.com>
8490
8491 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
8492 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
8493 s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
8494 New functions; dummy implementations.
8495
8496 * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
8497 functions, used to implement the multi-tasks mode routines on VxWorks.
8498
8499 * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
8500 New functions, thin
8501 binding to the VxWorks routines which have changed between VxWorks 5
8502 and 6.
8503 (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
8504 which are not callable from a RTP.
8505
8506 * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
8507 implemented for the multi-tasks mode on VxWorks 5 and 6.
8508
8509 * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
8510
8511 * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
8512 functions.
8513
85142007-08-14 Vincent Celier <celier@adacore.com>
8515
8516 * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
8517 gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
8518 mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
8519 mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
8520 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
8521 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
8522 mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
8523 procedure.
8524 (Major_Id_Name): New function.
8525 mlib-tgt.ads/mlib.tgt.adb:
8526 (Library_Major_Minor_Id_Supported): New function, default returns True
8527 Most mlib-tgt-*.adb that support shared libraries and symbolic links:
8528 (Build_Dynamic_Library): Add support for major/minor ids for shared libs
8529 Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
8530 Implementation of Library_Major_Minor_Id_Supported returns False
8531 clean.adb:
8532 (Clean_Library_Directory): If major/minor ids are supported, clean all
8533 library files.
8534 Major update of the Project Manager and of the project aware tools,
8535 including gprmake, so that the same sources in the GNAT repository
8536 can be used by gprbuild.
8537
85382007-08-14 Olivier Hainque <hainque@adacore.com>
8539
8540 * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
8541 (GCC_ZCX_Support): Switch to True.
8542
8543 * s-intman-solaris.adb (Notify_Exception): Call
8544 Adjust_Context_For_Raise before raising, as expected for signal
8545 handlers in general.
8546
8547 * s-intman-posix.adb (Notify_Exception): Remove declaration of
8548 Adjust_Context_For_Raise, moved to the spec of this unit to be visible
8549 to other implementation bodies.
8550
8551 * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
8552 be visible by multiple implementation bodies.
8553
8554 * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
8555 only for conditions coming from hardware.
8556 [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
8557 adjustments to signal context prior to exception raise from signal
8558 handler.
8559 (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
8560 mode.
8561 Solaris section: (__gnat_adjust_context_for_raise): New function.
8562 Implementation of the machine context adjustments to perform prior to
8563 raise from a signal handler. Version for both sparc and x86.
8564 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
8565 (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
8566 prior to raising as expected for any handler, before possible nested
8567 faults to make sure all the contexts in a chain have been adjusted by
8568 the time we propagate.
8569
85702007-08-14 Pascal Obry <obry@adacore.com>
8571
8572 * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
8573 (SYSTEM_INFO): New record.
8574 (SetThreadIdealProcessor): New imported routine needed for supporting
8575 task_info pragma on Windows.
8576
8577 * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
8578 info can be applied to the current host.
8579 (Create_Task): Set the ideal processor if information is present.
8580
8581 * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
8582 a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
8583
85842007-08-14 Olivier Hainque <hainque@adacore.com>
8585
8586 * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
8587 stack size and initial stack pointer value for a given task.
8588 (Enter_Task): Get the stack attributes of the task we are entering and
8589 let the stack checking engine know about them.
8590
8591 * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
8592 Let the stack-checking engine know about the initial sp value and stack
8593 size associated with the current task.
8594 (Set_Stack_Info): If a stack base has been notified for the current
8595 task, honor it. Fallback to the previous less accurate method otherwise.
8596
8597 * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
8598
85992007-08-14 Ed Schonberg <schonberg@adacore.com>
8600
8601 * sem_ch10.adb: Create a limited view of an incomplete type, to make
8602 treatment of limited views uniform for all visible declarations in a
8603 limited_withed package.
8604 Set flag indicating that a subprogram body for a child unit has a
8605 generated spec.
8606 (Analyze_Compilation_Unit): If unit is a subprogram body that has no
8607 separate declaration, remove the unit name from visibility after
8608 compilation, so that environment is clean for subsequent compilations.
8609 (Install_Limited_Context_Clauses): Do not install a
8610 limited_private_with_clause unless the current unit is a body or a
8611 private child unit.
8612 (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
8613 in the same fashion.
8614 (Install_Limited_Withed_Unit): Do not install a limited with clause if
8615 it applies to the declaration of the current package body.
8616 (Remove_Private_With_Clauses): If there is a regular with_clause for
8617 the unit, delete Private_With_Clause from context, to prevent improper
8618 hiding when processing subsequent nested packages and instantiations.
8619
86202007-08-14 Jose Ruiz <ruiz@adacore.com>
8621
8622 * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
8623 dir/file, device:/dir/file, and device:drive_letter:/dir/file as
8624 representing absolute path names.
8625 __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
8626
8627 * cstreams.c (__gnat_full_name for VxWorks): Use
8628 __gnat_is_absolute_path to detect whether we need to add the current
8629 directory to normalize the path.
8630
86312007-08-14 Javier Miranda <miranda@adacore.com>
8632
8633 * a-tags.ads,
8634 a-tags.adb (Displace): Associate a message with the raised CE
8635 exception.
8636 (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
8637 To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
8638 To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
8639 spec.
8640 (Default_Prim_Op_Count): Removed.
8641 (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
8642 Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
8643 Remove pragma Inline_Always.
8644
8645 * rtsfind.ads (Default_Prim_Op_Count): Removed
8646 (Max_Predef_Prims): New entity
8647 (RE_Expanded_Name): Removed
8648 (RE_HT_Link): Removed
8649 (RE_Iface_Tag): Remmoved
8650 (RE_Ifaces_Table): Removed
8651 (RE_Interfaces_Array): Removed
8652 (RE_Interface_Data_Element): Removed
8653 (RE_Nb_Ifaces): Removed
8654 (RE_RC_Offset): Removed
8655 (RE_Static_Offset_To_Top): Removed
8656
8657 * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
8658 formal.
8659 (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
8660 Prim_Op_Count by Max_Predef_Prims.
8661
86622007-08-14 Thomas Quinot <quinot@adacore.com>
8663 Vincent Celier <celier@adacore.com>
8664
8665 * binde.adb (Elab_All_Links): Remove unnecessary call to
8666 Generic_Separately_Compiled (if a unit satisfies this predicate, there
8667 won't be an associated Afile).
8668 (Elab_All_Links): Fail if a referenced unit cannot be found
8669
8670 * bindgen.adb:
8671 Fix comments in bindgen regarding consistency checks done in Bcheck:
8672 the checks are made across units within a partition, not across several
8673 partitions.
8674 Fix generation of C binder file for VxWorks.
8675
8676 * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
8677 Generic_May_Lack_ALI, more descriptive of the current use of the
8678 predicate, and update documentation.
8679
8680 * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
8681 reorganization and documentation update for the case of predefined
8682 library generics (for which we do not reference an Afile).
8683
86842007-08-14 Robert Dewar <dewar@adacore.com>
8685
8686 * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
8687 s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
8688 s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
8689 s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
8690 s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
8691 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
8692 s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
8693 s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
8694 exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
8695 s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
8696 s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
8697 a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
8698 s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
8699 g-altcon.adb: Minor reformatting
8700
8701 ada-tree.h: Delete empty line.
8702
8703 ali.ads: Minor reformatting
8704 Clarification of comments.
8705 Minor spelling correction
8706
8707 * exp_dbug.adb: Add Warnings Off to suppress new warning
8708
8709 * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
8710 formal
8711
8712 * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
8713 value
8714
8715 * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
8716
8717 * a-textio.ads: Reorder the standard input/output/error declarations
8718 for consistency.
8719
8720 * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
8721
8722 * par-ch2.adb: Recognize RM specially in errout
8723 Change 'R'M to RM in all error messages
8724
8725 * scng.adb: Recognize RM specially in errout
8726
8727 * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
8728 N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
8729
8730 * s-direio.adb: Add missing routine header box.
8731
8732 * sem_attr.ads: Add ??? comments
8733
8734 * sem_eval.adb: Recognize RM specially in errout
8735 Change 'R'M to RM in all error messages
8736
8737 * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
8738
8739 * s-tasinf.ads: Fix minor comment typo.
8740
8741 * a-cihama.adb: Minor comment addition
8742
8743 * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
8744 formal
8745
8746 * s-tasinf-tru64.ads: Fix minor comment typo.
8747
8748 * itypes.ads: Comment update.
8749
8750 * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
8751 anymore.
8752
8753 * argv.c: Added protection against null gnat_argv and gnat_envp.
8754
8755 * bcheck.adb (Check_Consistency): Use correct markup character ({) in
8756 warning message when Tolerate_Consistency_Errors is True.
8757
8758 * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
8759 Any_Id, as this subprogram is only applicable to *type* entities (it
8760 sets RM_Size). Instead initialize just Esize and Alignment.
8761
87622007-08-14 Bob Duff <duff@adacore.com>
8763
8764 * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
8765 a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
8766 a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
8767 a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
8768 a-coorse.ads (Next): Applied pragma Inline.
8769 Make all Containers packages Remote_Types (unless they are already
8770 Pure).
8771 (Previous): applied pragma Inline
8772 (Elements_Type): is now a record instead of an array
8773
87742007-08-14 Thomas Quinot <quinot@adacore.com>
8775
8776 * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
8777 of Set_Item.
8778 (Set_Item): When the new item is an element of the currently allocated
8779 table passed by reference, save a copy on the stack if we're going
8780 to reallocate. Also, in Table.Set_Item, make sure we test the proper
8781 variable to determine whether to call Set_Last.
8782
8783 * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
8784 symbols-vms.adb, symbols-processing-vms-alpha.adb,
8785 symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
8786 some occurrences of the pattern
8787 T.Increment_Last;
8788 T.Table (T.Last) := Value;
8789 with a cleaner call to
8790 T.Append (Value);
8791
87922007-08-14 Ed Schonberg <schonberg@adacore.com>
8793 Gary Dismukes <dismukes@adacore.com>
8794 Thomas Quinot <quinot@adacore.com>
8795
8796 * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
8797 derived type with interface progenitors use the analyzed formal as the
8798 parent of the actual, to create renamings for all the inherited
8799 operations in Derive_Subprograms.
8800 (Collect_Previous_Instances): new procedure within of
8801 Load_Parent_Of_Generic, to instantiate all bodies in the compilation
8802 unit being loaded, to ensure that the generation of global symbols is
8803 consistent in different compilation modes.
8804 (Is_Tagged_Ancestor): New function testing the ancestor relation that
8805 takes progenitor types into account.
8806 (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
8807 traversing over the primitives of the formal and actual types to locate
8808 any abstract subprograms of the actual type that correspond to a
8809 nonabstract subprogram of the formal type's ancestor type(s), and issue
8810 an error if such is found.
8811 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
8812 Instantiate_Package_Body, Instantiate_Subprogram_Body):
8813 Remove bogus guard around calls to Inherit_Context.
8814 (Reset_Entity): If the entity is the selector of a selected component
8815 that denotes a named number, propagate constant-folding to the generic
8816 template only if the named number is global to the generic unit.
8817 (Set_Instance_Env): Only reset the compilation switches when compiling
8818 a predefined or internal unit.
8819
88202007-08-14 Ed Schonberg <schonberg@adacore.com>
8821
8822 * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
8823 parameter to determine whether operation applies to the prefix.
8824 (Complete_Object_Operation): If actual has an access type and
8825 controlling formal is not an in_parameter, reject the actual if it is
8826 an access_to_constant type.
8827 (Try_Primitive_Operation): If the type of the prefix is a formal tagged
8828 type, the candidate operations are found in the scope of declaration of
8829 the type, because the type has no primitive subprograms.
8830 (Analyze_Selected_Component): If prefix is class-wide, and root type is
8831 a private extension, only examine visible components before trying to
8832 analyze as a prefixed call.
8833 Change Entity_List to Type_To_Use, for better readability.
8834 (Has_Fixed_Op): Use base type when checking whether the type of an
8835 operator has a user-defined multiplication/division
8836 (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
8837 user-defined operators are available for fixed-point types.
8838
88392007-08-14 Thomas Quinot <quinot@adacore.com>
8840 Ed Schonberg <schonberg@adacore.com>
8841
8842 * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
8843 formal At_Any_Place indicating, when True, that we want to test for
8844 availability of the stream attribute at any place (as opposed to the
8845 current visibility context only).
8846 (Missing_Read_Write_Attributes): A stream attribute is missing for the
8847 purpose of enforcing E.2.2(8) only if it is not available at any place.
8848 Take into account the Ada2005 pragma Has_Preelaborable_Initialization
8849 when checking the legality of an extension aggregate in a preelaborable
8850 package. Treat the literal null as a valid default expression in a
8851 component declaration for a type with preelaborable initialization.
8852 A limited interface is a legal progenitor for the designated type of a
8853 remote access to class-wide type.
8854
88552007-08-14 Thomas Quinot <quinot@adacore.com>
8856 Ed Schonberg <schonberg@adacore.com>
8857
8858 * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
8859 reference): Use correct entity as denoted entity for the selector of
8860 the rewritten node.
8861 (Find_Direct_Name): Add comment about Generate_Reference incorrectly
8862 setting the Referenced_As_LHS flag for entities that are implicitly
8863 dereferenced.
8864 (Find_Type): If the type is an internally generated incomplete type,
8865 mark the full view as referenced, to prevent spurious warnings.
8866 (Find_Selected_Component, Has_Components): Handle properly non-limited
8867 views that are themselves incomplete types.
8868 Handle interfaces visible through limited-with clauses.
8869 (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
8870 subprogram generic actual for which we have generated a renaming.
8871 Warn when the renaming introduces a homonym of
8872 the renamed entity, and the renamed entity is directly visible.
8873
88742007-08-14 Ed Schonberg <schonberg@adacore.com>
8875 Hristian Kirtchev <kirtchev@adacore.com>
8876
8877 * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
8878 appear in the subtree to the current allocator if it is not a static
8879 coextension.
8880 (Resolve_Allocator): Perform cleanup if resolution has determined that
8881 the allocator is not a coextension.
8882 (Resolve): Skip an interpretation hidden by an abstract operator only
8883 when the type of the interpretation matches that of the context.
8884 (Resolve): When looping through all possible interpretations of a node,
8885 do not consider those that are hidden by abstract operators.
8886 (Resolve_Actuals): When verifying that an access to class-wide object
8887 is an actual for a controlling formal, ignore anonymous access to
8888 subprograms whose return type is an access to class_wide type.
8889 (Resolve_Slice): If the prefix of the slice is a selected component
8890 whose type depends on discriminants, build its actual subtype before
8891 applying range checks on the bounds of the slice.
8892 (Valid_Conversion): In an instance or inlined body, compare root types,
8893 to prevent anomalies between private and public views.
8894 (Resolve): Improve error message for ambiguous fixed multiplication
8895 expressions that involve universal_fixed multiplying operations.
8896
88972007-08-14 Javier Miranda <miranda@adacore.com>
8898 Hristian Kirtchev <kirtchev@adacore.com>
8899
8900 * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
8901 location to allow the correct generation of errors in case of
8902 restrictions applied to the expanded code.
8903 (Expand_Entry_Barrier): Remove all generated renamings for a barrier
8904 function if the condition does not reference them.
8905 (Expand_Entry_Body_Declarations): Mark the index constant as having a
8906 valid value.
8907
89082007-08-14 Thomas Quinot <quinot@adacore.com>
8a57e48f 8909 Pablo Oliveira <oliveira@adacore.com>
ab6328d0
AC
8910
8911 * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
8912 typecode parameters for a union (in a variant record), remove
8913 extraneous layer of Any wrapping for member label.
8914 (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
8915 elabration statements, register the package with the name server
8916 at the beginning, not at the end, of the elaboration statements so
8917 that they can create remote access to subprogram values that designate
8918 remote subprograms from the package.
8919
89202007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
8921
8922 * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
8923 values to compute the number of seconds since the Unix Epoc in order to
8924 account for Daylight Savings Time. Perform special processing for dates
8925 that are earlier than the Unix Epoc to obtain a negative number.
8926
89272007-08-14 Emmanuel Briot <briot@adacore.com>
8928
8929 * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
8930 switches.
8931
89322007-08-14 Eric Botcazou <ebotcazou@adacore.com>
8933
8934 * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
8935 binder-generated file is not in Ada.
8936 Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
8937 recorded in the ALI file.
8938 Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
8939
89402007-08-14 Vincent Celier <celier@adacore.com>
8941
8942 * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
8943 (Output_Source): Do nothing if parameter is No_Sdep_Id
8944
8945 * make.adb (Gnatmake): Do not rebuild an archive simply because a
8946 shared library it imports has a later time stamp.
8947 (Check): Resolve the symbolic links in the path name of the object
8948 directory.
8949 Check that the ALI file is in the correct object directory
8950 Check if a file name does not correspond to the mapping of units
8951 to file names.
8952 (Display_Version): New procedure
8953 (Initialize): Process switches --version and --help
8954 Use type Path_Name_Type for path name
8955
89562007-08-14 Paul Hilfinger <hilfinger@adacore.com>
8957
8958 * impunit.adb: Re-organize System.Random_Numbers and
8959 GNAT.Random_Numbers and add to builds.
8960
8961 * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
8962
8963 * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
8964
8965 * a-assert.ads, a-assert.adb: New files.
8966
89672007-08-14 Gary Dismukes <dismukes@adacore.com>
8968
8969 * layout.adb (Layout_Type): In the case of access-to-subprogram types,
8970 if AAMP_On_Target is True, then the size of the type encompasses two
8971 addresses (a static link and a subprogram address), except in the case
8972 of library-level access types.
8973
89742007-08-14 Vincent Celier <celier@adacore.com>
8975
8976 * output.ads, output.adb (Write_Eol): Remove trailing spaces before
8977 writing the line.
8978 (Write_Eol_Keep_Blanks): New procedure to write a line, including
8979 possible trailing spaces.
8980 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
8981
89822007-08-14 Javier Miranda <miranda@adacore.com>
8983
8984 * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
8985 null-excluding access types.
8986
89872007-08-14 Javier Miranda <miranda@adacore.com>
8988
8989 * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
8990 that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
8991 of private types add missing check on matching interfaces in the
8992 partial and full declarations.
8993 (Analyze_Protected_Type): Code cleanup.
8994 (Analyze_Task_Type): Code cleanup.
8995
89962007-08-14 Javier Miranda <miranda@adacore.com>
8997
8998 * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
8999 generated interface thunk.
9000
90012007-08-14 Ed Schonberg <schonberg@adacore.com>
9002
9003 * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
9004 obsolescent warning on application of 'Class to an incomplete type.
9005
9006 * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
9007 prevent obsolescent warning on application of 'Class to an incomplete
9008 type.
9009
90102007-08-14 Pascal Obry <obry@adacore.com>
9011
9012 * s-fileio.adb (Is_Open): Add check for usability of the underlying
9013 file stream.
9014
90152007-08-14 Cyrille Comar <comar@adacore.com>
9016
9017 * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
9018 since it is potentially used in cases implying double finalization of
9019 the same object.
9020
90212007-08-14 Jose Ruiz <ruiz@adacore.com>
9022
9023 * s-tasini.adb (Get_Stack_Info): Move this function to
9024 System.Soft_Links.Tasking because it is common to the full and the
9025 restricted run times.
9026 (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
9027 in SSL.Tasking.Init_Tasking_Soft_Links.
9028
9029 * s-solita.adb (Get_Stack_Info): Function moved from
9030 System.Tasking.Initialization because it is common to the full and the
9031 restricted run times.
9032 (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
9033
90342007-08-14 Arnaud Charlet <charlet@adacore.com>
9035
9036 * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
9037 s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
9038 (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
9039 parameter.
9040
9041 * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
9042 guard to 12K.
9043
90442007-08-14 Gary Dismukes <dismukes@adacore.com>
9045
9046 * s-veboop.adb (SU): New named number initialized to
9047 System.Storage_Unit.
9048 (True_Val): The initialization expression is revised to use SU (=
9049 Storage_Unit) rather than assuming 8 for the component size of an
9050 unpacked Boolean array.
9051
90522007-08-14 Tristan Gingold <gingold@adacore.com>
9053
9054 * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
9055
9056 * tb-ivms.c: New file.
9057
9058 * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
9059
90602007-08-14 Geert Bosch <bosch@adacore.com>
9061
9062 * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
9063 s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
9064 Add required linker pragmas for automatically linking with the gnalasup
9065 linear algebra support library, and the systems math library.
9066 Rename cdot to cdotu and zdot to zdotu.
9067 Update header comment to describe purpose of package.
9068
90692007-08-14 Thomas Quinot <quinot@adacore.com>
9070
9071 * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
9072 an explicitly specified Associated_Final_Chain, use that list.
9073 (Expand_N_Package_Body): Build dispatch tables of library level tagged
9074 types.
9075 (Expand_N_Package_Declaration): Build dispatch tables of library level
9076 tagged types. Minor code cleanup.
9077
90782007-08-14 Vincent Celier <celier@adacore.com>
9079
9080 * gnatchop.adb (Terminate_Program): Remove exception and use
9081 Types.Terminate_Program instead.
9082
9083 * osint.ads, osint.adb (Current_Exit_Status): New global variable
9084 (Find_Program_Name): Added protection against empty name.
9085 (OS_Exit_Through_Exception): New procedure
9086
9087 * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
9088 (OS_Exit_Default): New procedure that contains the previous
9089 implementation of procedure OS_Exit.
9090 (Final_Value): Remove obsolete Interix stuff.
9091
90922007-08-14 Thomas Quinot <quinot@adacore.com>
9093
9094 * g-socket.ads: Reorganize example code so that it also works on
9095 Windows XP.
9096
90972007-08-14 Tristan Gingold <gingold@adacore.com>
9098
9099 * g-trasym.ads: AIX now supports symbolic backtraces.
9100
91012007-08-14 Ed Schonberg <schonberg@adacore.com>
9102
9103 * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
9104 units being loaded to detect circularities. A circularity may be
9105 present even if the current chain of pending units to load starts from
9106 a limited_with_clause.
9107
9108 * lib-load.ads: Change profile of Load_Unit to use a with_clause
9109 rather than a boolean flag, in order to detect circularities in
9110 with_clauses.
9111
9112 * par-load.adb: Use current with_clause in calls to Load_Unit, rather
9113 than propagating the From_Limited_With flag, in order to handle
9114 properly circularities involving with_clauses.
9115
91162007-08-14 Nicolas Setton <setton@adacore.com>
9117
9118 * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
9119 warnings.
9120
91212007-08-14 Arnaud Charlet <charlet@adacore.com>
9122
9123 * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
9124 to build for libgnala.
9125 libgnat: Add rules to build libgnala.a
9126 (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
9127 target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
9128 Add s-osinte-vxworks-kernel.adb to the target pairs of the
9129 kernel run-time lib for VxWorks 6, which would provide a different
9130 implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
9131 x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
9132 running ZCX by default.
9133 Add g-sttsne-locking to LynxOS version.
9134 Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
9135 On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
9136
9137 * system-darwin-x86.ads: New file.
9138
9139 * Make-lang.in: Delete files before copying onto them, so if they are
9140 read-only, the copy won't fail.
9141 Update dependencies
9142
91432007-08-14 Pascal Obry <obry@adacore.com>
9144
9145 * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
9146 naming scheme.
9147
91482007-08-14 Vincent Celier <celier@adacore.com>
9149
9150 * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
9151 (Gcc): Initialize Gcc_Name at the first call
9152
91532007-08-14 Ed Schonberg <schonberg@adacore.com>
9154
9155 * sem_ch7.adb (Analyze_Package_Specification): Do not install private
9156 with_clauses of the enclosing unit when analyzing the package
9157 specification of a nested instance.
9158
91592007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
9160
9161 * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
9162 (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
9163 Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
9164 layout of N_Allocator.
9165
91662007-08-14 Thomas Quinot <quinot@adacore.com>
9167
9168 * rtsfind.adb (Check_RPC): Add PCS version check.
9169
9170 * gnatvsn.ads, gnatvsn.adb: Add PCS version.
9171 (Gnat_Free_Software): New function.
9172
9173 * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
9174 the PCS_Version value from s-parint, used to check that it is consistent
9175 with what exp_dist expects.
9176
9177 * s-parint.ads (PCS_Version): New entity for checking consistency
9178 between exp_dist and PCS.
9179
9180 * gen-soccon.c: (SO_REUSEPORT): New constant.
9181
91822007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
9183
9184 * a-calfor.adb (Image (Duration; Boolean)): Change type of local
9185 variable Sub_Second to Duration in order to accomodate a larger range
9186 of arithmetic operations.
9187
91882007-08-14 Bob Duff <duff@adacore.com>
9189
9190 * g-sttsne-locking.ads: Move comments from spec to body.
9191 * g-sttsne-locking.adb: Move comments from spec to body.
9192 * g-sttsne-vxworks.ads: Removed.
9193 * g-sttsne-vxworks.adb: Removed.
9194
4862826d
ILT
91952007-08-11 Ian Lance Taylor <iant@google.com>
9196
9197 * misc.c (gnat_get_alias_set): Change return type to
9198 alias_set_type.
9199
4d8a9bfe
KG
92002007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9201
9202 * decl.c, utils2.c: Fix whitespace in last change.
9203
39595763
KG
92042007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9205
9206 * decl.c (compare_field_bitpos): Constify.
9207 * utils2.c (compare_elmt_bitpos): Likewise.
9208
08e7e8cb
AJ
92092007-07-27 Aurelien Jarno <aurelien@aurel32.net>
9210
9211 * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
9212 anonymous access type.
9213 (pthread_sigmask): Now take an access sigset_t.
9214
9e94c78f 92152007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
83983455
JS
9216
9217 * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
9218
a8257e58
EB
92192007-06-21 Eric Botcazou <ebotcazou@adacore.com>
9220
9221 PR tree-optimization/25737
9222 * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
9223
5be014d5
AP
92242007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
9225
9226 * trans.c (Attribute_to_gnu): When subtracting an
9227 offset from a pointer, use POINTER_PLUS_EXPR with
9228 NEGATE_EXPR instead of MINUS_EXPR.
9229 (gnat_to_gnu): Likewise.
9230 * utils.c (convert): When converting between
9231 thin pointers, use POINTER_PLUS_EXPR and sizetype
9232 for the offset.
9233 * utils2.c (known_alignment): POINTER_PLUS_EXPR
9234 have the same semantics as PLUS_EXPR for alignment.
9235 (build_binary_op): Add support for the semantics of
9236 POINTER_PLUS_EXPR's operands.
9237 When adding an offset to a pointer, use POINTER_PLUS_EXPR.
9238
b0464c88
RE
92392007-06-11 Rafael Avila de Espindola <espindola@google.com>
9240
a472f546
EB
9241 * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
9242 of get_signed_or_unsigned_type.
b0464c88
RE
9243 * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
9244
93e17a25
BD
92452007-06-11 Bob Duff <duff@adacore.com>
9246 Thomas Quinot <quinot@adacore.com>
9247
9248 * g-stsifd-sockets.adb (Create): Work around strange behavior of
9249 'bind' on windows that causes 'connect' to fail intermittently, by
9250 retrying the 'bind'.
9251 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
9252
1bbf8502
DS
92532007-06-10 Duncan Sands <baldrick@free.fr>
9254
9255 * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
9256 than to void, for the fields when making a new fat pointer type.
9257 (gnat_substitute_in_type): Now substitute_in_type.
a472f546 9258 * gigi.h (gnat_substitute_in_type): Likewise. Adjust recursive calls.
1bbf8502
DS
9259 * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
9260 * utils.c (update_pointer_to): Update fat pointers by updating the
9261 dummy node pointers used for the fields.
9262
ec11296f
AC
92632007-06-06 Thomas Quinot <quinot@adacore.com>
9264 Bob Duff <duff@adacore.com>
9265
9266 * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
9267 g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
9268 g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
9269 constant Thread_Blocking_IO, always True by default, set False
9270 on a per-runtime basis.
9271 (Need_Netdb_Buffer): New constant.
9272
9273 * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
9274 g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
9275 files.
9276
9277 * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
9278 g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
9279 Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
9280 child package Task_Safe_NetDB
9281 (Host_Error_Messages): Add stub body.
9282 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
9283
9284 * g-soccon-mingw.ads: Add Windows-specific constants.
9285 (Need_Netdb_Buffer): New constant.
9286 (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
9287 wrapper and import inet_addr(3) from the standard sockets library
9288 directly instead.
9289 (In_Addr): Add alignment clause.
9290 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
9291
92922007-06-06 Robert Dewar <dewar@adacore.com>
9293
9294 * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
9295 s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
9296 s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
9297 s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
9298 s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
9299 s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
9300 a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
9301 a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
9302 a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
9303 g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
9304 g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
9305 i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
9306 s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
9307 s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
9308 s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
9309 s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
9310 s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
9311 s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
9312 s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
9313 s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
9314 s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
9315 s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
9316 s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
9317 s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
9318 s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
9319 s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
9320 s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
9321 s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
9322 s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
9323 s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
9324 s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
9325 a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
9326 Unchecked_* by Ada.Unchecked_*
9327
93282007-06-06 Robert Dewar <dewar@adacore.com>
9329
9330 * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
9331 s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
9332 g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
9333 output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
9334 g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
9335 a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
9336
9337 * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,
9338 s-regexp.ads, s-regpat.adb, s-regpat.ads, s-string.adb, s-string.ads,
9339 s-tasloc.adb, s-tasloc.ads: New files.
9340
93412007-06-06 Bob Duff <duff@adacore.com>
9342
9343 * g-expect-vms.adb:
9344 (Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
9345 * g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
9346 (Send_Signal, Close): Raise Invalid_Process if the process id is
9347 invalid.
9348 (Pattern_Matcher_Access): Is now a general access type to be able to
9349 use aliased string.
9350
93512007-06-06 Thomas Quinot <quinot@adacore.com>
9352 Arnaud Charlet <charlet@adacore.com>
9353
a472f546
EB
9354 * a-intnam-aix.ads: Adjust comment to account for SIGADAABORT change
9355 (SIGEMT is now used instead of SIGTERM on AIX).
ec11296f
AC
9356
9357 * s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
9358 (Time_Slice_Supported): Set to True.
a472f546 9359 Use SIGEMT instead of SIGTERM as SIGADAABORT.
ec11296f
AC
9360
93612007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
9362
9363 * a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
9364 (Time, Time)): Use To_Relative_Time rather than manual calculation to
9365 express the bounds of Duration as Time. Raise Time_Error when the
9366 result is greater or equal to the higher bound of Duration (on the
9367 margin case).
9368 ("+" (Time, Duration)): Reorder code. Remove the declaration of constant
9369 Ada_High_And_Leaps.
9370 ("-" (Time, Duration)): Reorder code. Remove the declaration of constant
9371 Ada_High_And_Leaps.
9372 ("-" (Time, Time)): Reorder code.
9373 (All_Leap_Seconds): Removed.
9374 (Arithmetic_Operations.Add): Remove sign related kludge.
9375 (Arithmetic_Operations.Difference): Control the leaps seconds processing
9376 with flag Leap_Support.
9377 (Arithmetic_Operations.Subtract): Remove sign related kludge.
9378 (Check_Within_Time_Bounds): New procedure.
9379 (Clock): Control the leap seconds processing with flag Leap_Support.
9380 (Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
9381 (Formatting_Operations.Split): Control the leap seconds processing with
9382 flag Leap_Support.
9383 (Formatting_Operations.Time_Of): Control the leaps seconds processing
9384 with flag Leap_Support. Adjust the year, month and day (if applicable)
9385 when the value of day seconds designates a new day.
9386 (Split): Use parameter associations for better readability. Integrate
9387 flag Is_Ada_05.
9388 (Time_Of): Use parameter associations for better readability. Integrate
9389 flag Is_Ada_05.
9390
9391 * a-calfor.adb (Split): Use parameter associations for better
9392 readability. Integrate flag Is_Ada_05.
9393 (Time_Of): Remove flag Leap_Checks. Use parameter associations for
9394 better readability. Integrate flag Is_Ada_05.
9395
93962007-06-06 Arnaud Charlet <charlet@adacore.com>
9397
9398 * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
9399 s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
9400 s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
9401 s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
9402 s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
9403 s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
9404 s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
9405 s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
9406 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
9407 s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
9408 s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
9409 time when entering this routine to detect a backward clock setting
9410 (manual setting or DST adjustment), to avoid waiting for a longer delay
9411 than needed.
9412 (Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
9413 Remove handling of deferred priority change, and replace by setting the
9414 task priority directly, as required by AI-188.
9415 Update comments.
9416 (Max_Task_Image_Length): New constant.
9417 Replace Warnings (Off) by Unreferenced pragma, cleaner.
9418 (Dynamic_Priority_Support): Removed, no longer needed.
9419 (Poll_Base_Priority_Change): Ditto.
9420 (Set_Ceiling): Add this procedure to change the ceiling priority
9421 associated to a lock. This is a dummy implementation because dynamic
9422 priority ceilings are not supported by the underlying system.
9423
9424 * a-dynpri.adb (Set_Priority): Take into account case where Target is
9425 accepting a RV with its priority boosted.
9426 Remove handling of deferred priority change, and replace by setting the
9427 task priority directly, as required by AI-188.
9428
9429 * s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
9430 Succeeded = True.
9431 Remove handling of deferred priority change, and replace by setting the
9432 task priority directly, as required by AI-188.
9433 (Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
9434 of Self_Id earlier.
9435
9436 * s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
9437 (Poll_Base_Priority_Change): Removed.
9438 Code clean up: use SSL.Current_Target_Exception.
9439
9440 * s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
9441 to run as this is a potentially dispatching point.
9442 (Call_Synchronous): Use Local_Defer_Abort.
9443 (Callable): Relax assertion.
9444 (Selective_Wait): Relax assertion in case abort is not allowed.
9445 Remove handling of deferred priority change, and replace by setting the
9446 task priority directly, as required by AI-188.
9447
9448 * s-tasuti.adb (Make_Passive): Adjust assertions.
9449 Remove handling of deferred priority change, and replace by setting the
9450 task priority directly, as required by AI-188.
9451
94522007-06-06 Arnaud Charlet <charlet@adacore.com>
9453
9454 * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
9455 system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
9456 system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
9457 system-vxworks-mips.ads, system-vxworks-alpha.ads,
9458 system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
9459 system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
9460 system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
9461 system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
9462 system-solaris-sparcv9.ads, system-vms.ads, system.ads,
9463 system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
9464 system-linux-ia64.ads: Document mapping between Ada and OS priorities.
9465 This patch changes the largest non-binary modulus from 2**31-1 to
9466 2**32-1.
9467 (Compiler_System_Version): Removed, no longer used.
9468 Clean up system files by removing flags only used on a single target.
9469 Also remove obsolete flags, only used during bootstrap from system.ads
9470 (Address): Add a pragma Preelaborable_Initialization.
9471
9472 * system-aix.ads: Ditto.
9473 (GCC_ZCX_Support): Set to true.
9474 Update priority range on AIX and map Ada priorities to target
9475 priorities appropriately for different scheduling policies.
9476
9477 * ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
9478
94792007-06-06 Vincent Celier <celier@adacore.com>
9480
9481 * mlib-tgt-specific.adb, mlib-tgt-specific.ads,
9482 mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
9483
9484 * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
9485 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
9486 mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
9487 mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
9488 mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
a472f546
EB
9489 MLib.Tgt, containing the default versions of the exported subprograms.
9490 For each platform, create a specific version of the body of new child
9491 package MLib.Tgt.Specific that contains only the body of subprograms
9492 that are different from the default.
9493 (Archive_Builder_Append_Options): New function.
ec11296f
AC
9494
94952007-06-06 Matthew Gingell <gingell@adacore.com>
9496
a472f546
EB
9497 * s-osinte-aix.adb: Map Ada priorities to target priorities
9498 appropriately for different scheduling policies.
ec11296f
AC
9499
95002007-06-06 Arnaud Charlet <charlet@adacore.com>
9501
9502 * s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
9503 its C counterpart.
9504 Remove references to Unchecked_Conversion, and use Ada.xxx instead.
9505 Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
9506
95072007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
9508
a472f546
EB
9509 * s-osprim-vms.ads, s-osprim-vms.adb (Initialize): New procedure.
9510 Noop on VMS, added for interface commonality.
ec11296f
AC
9511
95122007-06-06 Eric Botcazou <ebotcazou@adacore.com>
9513 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9514 Olivier Hainque <hainque@adacore.com>
9515
9516 * decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
9517 renamed expression of a full renaming at toplevel.
9518 (gnat_to_gnu_entity, case object): If not defining, do not look inside
9519 the values the constant is initialized to if it is an N_Allocator.
9520 (gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
9521 TYPE_SIZE_UNIT of inner types after the stride is elaborated.
9522 (make_aligning_type): Accept an extra ROOM argument for storage to be
9523 made available before the aligned field, and an extra BASE_ALIGN
9524 argument for callers to pass the alignment guaranteed to be honored for
9525 the whole aligning object. Avoid call to finish_record_type, which only
9526 interferes with the sizes we want to set.
9527 (gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
9528 make_aligning_type for super-aligned objects on stack.
9529 (components_to_record): Pass the adjusted size of the type when creating
9530 fields in the qualified union for the variant part.
9531 (gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
9532 (gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
9533 packed array type.
9534 (maybe_pad_type): Set TYPE_USER_ALIGN.
9535 (make_aligning_type): Likewise.
9536 ALIGN argument is unsigned int.
9537 (gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
9538 (gnat_to_gnu_param): Likewise, for parameters.
9539 (gnat_to_gnu_entity) <object>: Always instantiate the renaming object
9540 if it is constant and stems from a function call.
9541 (gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
9542 of the record is specified. Adjust accordingly.
9543 (adjust_packed): New static function.
9544 (gnat_to_gnu_field): Use it to adjust the packedness setting.
9545 (components_to_record): Likewise.
9546 (gnat_to_gnu_entity) <object>: Do not test the renamed expression for
9547 side-effects if the object is deemed constant.
9548 (gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
9549 type instead of merely finalizing it. Tidy.
9550 <E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
9551 <E_Access_Type>: Likewise.
9552 (defer_debug_incomplete_list): Rename to defer_finalize_list.
9553 (defer_debug_level): Delete.
9554 (gnat_to_gnu_entity) <debug_deferred>: Likewise
9555 <E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
9556 type.
9557 <E_Record_Type>: Do not explicitly defer finalizing the type.
9558 Adjust for write_record_type_debug_info renaming.
9559 <E_Subprogram_Type>: Likewise.
9560 Finalize deferred types right after deferred incomplete types are
9561 expanded.
9562 (rest_of_type_decl_compilation): New global function.
9563 (components_to_record): Rename defer_debug parameter to do_not_finalize.
9564 (components_to_record): Propagate the packedness to the fields of the
9565 qualified union type if there is a variant part.
9566 (gnat_to_gnu_entity) <E_Array_Type>: Use new function
9567 instead of inline code to adjust the XUT field offsets.
9568 (gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
9569 <E_Record_Subtype>: Do not let finish_record_type compute the sizes
9570 and write the debug info if the type derives from a discriminated one.
9571 (gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
9572 <E_Array_Subtype>: Likewise.
9573 <E_String_Literal_Subtype>: Likewise.
9574 (gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
9575 an alignment clause.
9576 (maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
9577 before giving warning.
9578 (prepend_one_attribute_to): New function, helper to prepend an attribute
9579 to an attribute list.
9580 (gnat_to_gnu_entity) <E_Procedure>: Use it.
9581 (prepend_attributes): Likewise.
9582 (gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
9583 <E_Array_Type>: Declare the padding type for the element type, if any.
9584 <E_Array_Subtype>: Likewise.
9585 (defer_limited_with): New variable.
9586 (Gigi_Equivalent_Type): New function.
9587 (gnat_to_gnu_entity): Use it at start and use result throughout.
9588 (gnat_to_gnu_entity, case E_Access_Type): Rework to use
9589 Gigi_Equivalent_Type, support Limited_With, allow two levels of
9590 indirection, precompute if unconstrained array to simplify logic, and
9591 use defer_limited_with to defer elaboration of some types from limited
9592 with.
9593 (finalize_from_with_types): New function.
9594
95952007-06-06 Gary Dismukes <dismukes@adacore.com>
9596 Eric Botcazou <ebotcazou@adacore.com>
9597 Tristan Gingold <gingold@adacore.com>
9598 Olivier Hainque <hainque@adacore.com>
9599
a472f546
EB
9600 * trans.c (Identifier_to_gnu): Change test for deferred constant by
9601 adding guard that the entity is an E_Constant before testing presence
9602 of Full_view (and remove unnecessary test that entity is not a type).
ec11296f
AC
9603 For a CONST_DECL used by reference, manually retrieve
9604 the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
9605 (struct language_function): Move from utils.c to here.
9606 (struct parm_attr): New structure.
9607 (parm_attr, parm_attr vector, parm_attr GC vector): New types.
9608 (f_parm_attr_cache): New macro.
9609 (Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
9610 expressions for the 'First, 'Last and 'Length attributes of the
9611 unconstrained array IN parameters.
9612 (Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
9613 Allocate the information structure for the function earlier, as well
9614 as the language-specific part.
9615 If the parameter attributes cache has been populated, evaluate the
9616 cached expressions on entry.
9617 (takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
9618 N_Procedure_Call_Statement and N_Indexed_Component.
9619 (Pragma_to_gnu): Translate inspection_point to an asm statement
9620 containaing a comment and a reference to the object (either its address
9621 for BLKmode or its value).
9622 (Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
9623 to go to DECL_INITIAL. Together with the size constraint relaxation
9624 in create_var_decl, enlarges the set of situations in which an
9625 identifier may be used as an initializer without implying elaboration
9626 code.
9627 (Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
9628 DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
9629 node.
9630 (maybe_stabilize_reference): Remove lvalues_only parameter.
9631 (gnat_stabilize_reference): Adjust for above change.
9632 (gnat_to_gnu): Do not set location information on the result
9633 if it is a reference.
9634 (add_cleanup): Add gnat_node parameter and set the location of the
9635 cleanup to it.
9636 (Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
9637 (Exception_Handler_to_gnu_zcx): Likewise.
9638 (gigi): Remove the cgraph node if the elaboration procedure is empty.
9639 (Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
9640 the former right after the latter.
9641 (start_stmt_group): Make global.
9642 (end_stmt_group): Likewise.
9643 (gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
9644 vars.
9645 (gnu_program_error_label_stack): Likewise.
9646 (gigi): Initialize them.
9647 (call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
9648 (gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
9649 New cases.
9650 (push_exception_label_stack): New function.
9651 (takes_address): New function.
9652
9653 * utils.c (struct language_function): Move to trans.c from here.
9654 (unchecked_convert): Do not wrap up integer constants in
9655 VIEW_CONVERT_EXPRs.
9656 (create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
9657 the latter for aggregate types, unexpected by later passes, and relax an
9658 arbitrary size constraint on the former.
9659 (create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
9660 to compare the sizes.
9661 (convert_vms_descriptor): When converting to a fat pointer type, be
9662 prepared for a S descriptor at runtime in spite of a SB specification.
9663 (shift_unc_components_for_thin_pointers): New function.
9664 (write_record_type_debug_info): For variable-sized fields, cap the
9665 alignment of the pointer to the computed alignment.
9666 (finish_record_type): Change HAS_REP parameter into REP_LEVEL.
9667 If REP_LEVEL is 2, do not compute the sizes.
9668 (build_vms_descriptor): Adjust for new prototype of finish_record_type.
9669 (build_unc_object_type): Likewise.
9670 (declare_debug_type): New function.
9671
9672 * ada-tree.def: USE_STMT: removed (not emitted anymore).
9673
9674 * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
9675 no statement is expandable anymore.
9676 (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
9677 (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
9678 when the user requested it explicitely.
9679 (gnat_post_options): By default, set flag_eliminate_unused_debug_types
9680 to 0 for Ada.
9681 (get_alias_set): Return alias set 0 for a type if
9682 TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
9683
9684 * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
9685 (DECL_FUNCTION_STUB): New accessor macro.
9686 (SET_DECL_FUNCTION_STUB): New setter macro.
9687
9688 * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
9689
9690 * fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
9691 declarations.
9692
96932007-06-06 Jose Ruiz <ruiz@adacore.com>
9694
9695 * s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
9696 Rename to Abort_Task_Interrupt to be able to keep the same interface
9697 as the rest of the targets.
9698
9699 * s-osinte-vxworks.ads s-osinte-vxworks.adb
9700 (To_VxWorks_Priority): Remove explicit "in" mode indicator
9701
9702 * s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
9703 New files.
9704
97052007-06-06 Robert Dewar <dewar@adacore.com>
9706
9707 * a-chahan.ads: Remove obsolescent pragmas
9708
9709 * a-chlat1.ads: Minor reformatting
9710
97112007-06-06 Robert Dewar <dewar@adacore.com>
9712
9713 * comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
9714 for Errout
9715
9716 * errout.adb: New Finalize/Compilation_Errors/Output_Messages
9717 implementation
9718
9719 * errout.ads (Finalize): Changed interface
9720 (Output_Messages): New procedure
9721 (Compilation_Errors): New Interface
9722
9723 * prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
9724 Finalize/Output_Messages interface for Errout
9725 (Prepare_To_Preprocess): New Finalize/Output_Messages interface for
9726 Errout.
9727
97282007-06-06 Thomas Quinot <quinot@adacore.com>
9729 Olivier Hainque <hainque@adacore.com>
9730 Robert Dewar <dewar@adacore.com>
9731
9732 * a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
9733 check.
9734 (Raise_Current_Excep): Call Debug_Raise_Exception just before
9735 propagation starts, to let debuggers know about the event in a reliable
9736 fashion.
9737 (Local_Raise): Moved to System.Exceptions
9738 More convenient to have this as a separate unit
9739
9740 * s-except.adb, s-except.ads: New files.
9741
9742 * a-exextr.adb (Unhandled_Exception): Delete - replaced by
9743 Debug_Unhandled_Exception in System.Exceptions where it belongs
9744 together with a couple of other debug helpers.
9745 (Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
9746 the former Unhandled_Exception.
9747
9748 * exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
9749 (Warn_No_Exception_Propagation): New procedure
9750 (Warn_If_No_Propagation): Rewritten for new warning generation
9751 (Expand_Exception_Handlers): New warning generation
9752 (Expand_N_Raise_xxx_Error): Rewritten for new warnings
9753 (Add_Exception_Label): Use Special_Exception_Package_Used for test
9754 instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
9755 (Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
9756 even if restriction is set (makes life easier in Check_Returns)
9757 (Expand_Local_Exception_Handlers): Follow renamed entity chain when
9758 checking exception identities.
9759 (Expand_Local_Exception_Handlers): Do not optimize when all others case
9760 (Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
9761 block for handler (used by Check_Returns)
9762 (Expand_Local_Exception_Handlers): Local_Raise now takes an address
9763 (Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
9764 remove all exception handlers when optimizing local raise statements.
9765 (Find_Local_Handler): Use Get_Renamed_Entity
9766 (Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
9767 marked analyzed after expanding exception handlers, do not generate
9768 redundant cleanup actions, because they have been constructed already.
9769
97702007-06-06 Thomas Quinot <quinot@adacore.com>
9771
9772 * a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
9773 presence of this categorization pragma is mandated by the language.
9774 (Limited_Controlled): Add missing pragma Preelaborable_Initialization
9775 for this type.
9776
97772007-06-06 Vincent Celier <celier@adacore.com>
9778 Robert Dewar <dewar@adacore.com>
9779
9780 * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
9781 butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
9782 err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
9783 fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
9784 lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
9785 makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
9786 par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
9787 prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
9788 prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
9789 sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
9790 uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
9791 ali.ads, ali.adb:
9792 Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
9793 package Namet. Make File_Name_Type and Unit_Name_Type types derived from
9794 Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
9795 Use variables of types File_Name_Type and Unit_Name_Type in error
9796 messages.
9797 (Get_Name): Add parameter Ignore_Special, and set it reading file name
9798 (New_Copy): When debugging the compiler, call New_Node_Debugging_Output
9799 here.
9800 Define flags Flag217-Flag230 with associated subprograms
9801 (Flag_Word5): New record type.
9802 (Flag_Word5_Ptr): New access type.
9803 (To_Flag_Word5): New unchecked conversion.
9804 (To_Flag_Word5_Ptr): Likewise.
9805 (Flag216): New function.
9806 (Set_Flag216): New procedure.
9807
98082007-06-06 Arnaud Charlet <charlet@adacore.com>
9809
9810 * a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
9811 instead of 'Size.
9812
9813 * a-stwifi.ads, a-stzfix.ads: Minor reformatting
9814
98152007-06-06 Javier Miranda <miranda@adacore.com>
9816
9817 * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to
9818 the package.
9819 (Object_Specific_Data_Array): This is now internal to the package.
9820 (Object_Specific_Data): This is now internal to the package.
9821 (Select_Specific_Data_Element): This is now internal to the package.
9822 (Select_Specific_Data_Array): This is now internal to the package.
9823 (Select_Specific_Data): This is now internal to the package.
9824 (Offset_To_Top_Function_Ptr): This is now public.
9825 (To_Offset_To_Top_Function_Ptr): Removed.
9826 (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now
9827 local to subprogram Offset_To_Top.
9828 (Predefined_DT): Removed.
9829 (Typeinfo_Ptr): Removed.
9830 (OSD): This function is now internal to this package.
9831 (SSD): This function is now internal to this package.
9832 (DT): New function that displaces the pointer to the table of primitives
9833 to get access to the enclosing wrapper record.
9834 (IW_Membership): Code cleanup.
9835 (Offset_To_Top): Code cleanup.
9836 (Predefined_DT): Removed.
9837 (Register_Interface_Tag): Removed.
9838 (Set_Interface_Table): Removed.
9839 (Set_Offset_Index): Removed.
9840 (Set_Offset_To_Top): Code cleanup.
9841 (Set_OSD): Removed.
9842 (Set_Signature): Removed.
9843 (Set_SSD): Removed.
9844 (Set_Tagged_Kind): Removed.
9845 (Typeinfo_Ptr): Removed.
9846 (TSD): Removed.
9847 (Displace): Add missing check on null actual.
9848
9849 * exp_disp.ads, exp_disp.adb
9850 (Select_Expansion_Utilities): Removed.
9851 (Build_Common_Dispatching_Select_Statements): Moved to exp_atags.
9852 (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because
9853 the interface requires a new parameter.
9854 (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
9855 Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace
9856 calls to subprograms Build_T, Build_S, etc. by the corresponding code.
9857 Done to remove package Select_Expansion_Utilities.
9858 (Make_DT): New implementation for statically allocated dispatch tables.
9859 (Make_Secondary_DT): Moved to the scope of Make_DT.
9860 (Register_Primitive): Code cleanup plus incoporate the use of the new
9861 function DT_Address_Attribute.
9862 (Expand_Interface_Thunk): The profile of this subprogram has been
9863 changed to return the Thunk_Id and the corresponding code.
9864 (Fill_DT_Entry): Removed. Its functionality is now provided by
9865 subprogram Register_Primitive.
9866 (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by
9867 subprogram Register_Primitive.
9868 (Register_Primitive): New subprogram that incorporates the previous
9869 functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry.
9870 (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This
9871 was only required to call Make_DT_Access_Action, which is now removed.
9872 (Ada_Actions): Removed
9873 (Action_Is_Proc): Removed
9874 (Action_Nb_Arg): Removed
9875 Replace all the calls to Make_DT_Access_Action by direct calls to
9876 Make_Procedure_Call_Statement or Make_Function_Call.
9877 (Set_DTC_Entity_Value): New subprogram.
9878 (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value.
9879 (Expand_Interface_Thunk): Add missing support for primitives that are
9880 functions with a controlling result (case in which there is no need
9881 to generate the thunk).
9882
9883 * exp_atag.ads, exp_atag.adb
9884 (Build_DT): New subprogram that displaces the pointer to reference the
9885 base of the wrapper record.
9886 (Build_Typeinfo_Offset): Removed.
9887 (RTE_Tag_Node): Removed.
9888 (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp
9889 (Build_Get_RC_Offset): Removed.
9890 (Build_Inherit_Predefined_Prims): Removed.
9891 (Build_Inherit_TSD: Removed.
9892 (Build_New_TSD): Removed.
9893 (Build_Set_External_Tag): Removed.
9894 (Build_Set_Predefined_Prim_Op_Address): Add documentation.
9895 (Build_Set_Prim_Op_Address): Add documentation.
9896 (Build_Set_TSD): Removed.
9897
9898 * rtsfind.ads, rtsfind.adb
9899 (Load_Fail): If load fails and we are not in configurable run-time
9900 mode, then raise Unrecoverable_Error.
9901 (Text_IO_Kludge): Generate an error message if a run-time library is
9902 not available in a given run-time (ie. zfp run-time).
9903 (RTE_Record_Component): Add code to check that the component we search
9904 for is not found in two records in the given run-time package.
9905 (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed
9906 (RE_DT_Predef_Prims_Offset): New entity
9907 (RE_Static_Offset_To_Top): New entity
9908 (RE_HT_Link): New entity.
9909 (System_Address_Image): Addition of this run-time package.
9910 (RE_Address_Image): New entity.
9911 (RE_Abstract_Interface): Removed.
9912 (RE_Default_Prim_Op_Count): Removed.
9913 (RE_DT_Entry_Size): Removed.
9914 (RE_DT_Min_Prologue_Size): Removed.
9915 (RE_DT_Prologue_Size): Removed.
9916 (RE_Ifaces_Table_Ptr): Removed.
9917 (RE_Interface_Data_Ptr): Removed.
9918 (RE_Type_Specific_Data): Removed.
9919 (RE_Primary_DT): Removed.
9920 (RE_Register_Interface_Tag): Removed.
9921 (RE_Set_Offset_Index): Removed.
9922 (RE_Set_OSD): Removed.
9923 (RE_Set_SSD): Removed.
9924 (RE_Set_Signature): Removed.
9925 (RE_Set_Tagged_Kind): Removed.
9926 (RE_Address_Array): New entity.
9927 (RE_DT): New entity.
9928 (RE_Iface_Tag): New entity.
9929 (RE_Interfaces_Table): New entity.
9930 (RE_No_Dispatch_Table): New entity.
9931 (RE_NDT_Prims_Ptr): New entity.
9932 (RE_NDT_TSD): New entity.
9933 (RE_Num_Prims): New entity.
9934 (RE_Offset_To_Top_Function_Ptr): New entity.
9935 (RE_OSD_Table): New entity.
9936 (RE_OSD_Num_Prims): New entity.
9937 (RE_Predef_Prims): New entity
9938 (RE_Predef_Prims_Table_Ptr): New entity.
9939 (RE_Primary_DT): New entity.
9940 (RE_Signature): New entity.
9941 (RE_SSD): New entity.
9942 (RE_TSD): New entity.
9943 (RE_Type_Specific_Data): New entity.
9944 (RE_Tag_Kind): New entity.
9945
99462007-06-06 Thomas Quinot <quinot@adacore.com>
9947
9948 * a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
9949 C imported variable.
9950 (Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
9951 on entry.
9952
99532007-06-06 Robert Dewar <dewar@adacore.com>
9954
9955 * a-tienio.adb (Get): Adjust buffer size to accomodate one extra
9956 character
9957
99582007-06-06 Vincent Celier <celier@adacore.com>
9959
9960 * a-tifiio.adb (Put, internal): For negative numbers, check that there
9961 is room for at least one digit and the minus sign.
9962 (Put.Put_Character): Never put a character outside of the range of
9963 string To.
9964
99652007-06-06 Olivier Hainque <hainque@adacore.com>
9966 Eric Botcazou <ebotcazou@adacore.com>
9967
9968 * utils2.c (build_allocator): Provide the extra arguments to
9969 make_aligning_type for super-aligned objects allocated from the default
9970 pool. Leave enough room for a pointer before the aligning field, and
9971 store the system's allocator return value there.
9972 (build_call_alloc_dealloc): When releasing a super-aligned object,
9973 retrieve the system's allocator return value from where build_allocator
9974 has stored it, just ahead of the adjusted address we are passed.
9975 (build_call_raise): Handle properly the generation of line numbers when
9976 the node is marked No_Location.
9977 (compare_elmt_bitpos): Use tree_int_cst_compare. Stabilize the sort
9978 by using DECL_UID on ties.
9979 (build_binary_op) <EQ_EXPR>: Accept fat pointer types with the same
9980 main variant.
9981 (build_call_raise): Handle converting exception into goto; support new
9982 argument KIND.
9983 (build_component_ref): Add new arg to build_call_raise.
9984
99852007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
9986
9987 * a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
9988 "." in the case of nnn.xxx when nnn terminates with an underscore.
9989 Parse the remaining "#" or ":" in the case of nnn#.xxx#
9990
99912007-06-06 Robert Dewar <dewar@adacore.com>
9992
9993 * a-tigeau.ads, a-tigeau.adb: (Store_Char): Change Buf to IN OUT
9994
99952007-06-06 Arnaud Charlet <charlet@adacore.com>
9996 Vincent Celier <celier@adacore.com>
9997 Robert Dewar <dewar@adacore.com>
9998
9999 * bindgen.adb (Gen_Output_File_Ada): Generate pragma No_Run_Time when
10000 needed.
10001 (Gen_Output_File_Ada, Gen_Output_File_C): Never use __attribute
10002 ((destructor)) for adafinal, even when switch -a is used.
10003 Do not issue pragma Linker_Destructor for adafinal when switch -a is
10004 used.
10005 (Gen_Object_Files_Options): Add formatting of Linker Options, when
10006 Output_Linker_Option_List is set. Suppress this formatting when
10007 Zero_Formatting is set.
10008 Add case for CLI_Target.
10009 (System_Restrictions_Used): New flag, used to avoid generating with of
10010 System_Restrictions and initialization of the data unless there is
10011 some use of System.Restrictions in the partition.
10012 (Check_System_Restrictions_Used): New procedure
10013
10014 * s-stalib.adb: Remove with of System.Restrictions. No longer needed
10015 since we only with this unit in the binder file if it is used elsewhere
10016 in the partition.
10017
100182007-06-06 Vincent Celier <celier@adacore.com>
10019
10020 * bindusg.adb: Add line for @<response file>
10021 Add lines for new switches -R and -Z
10022
10023 * gnatbind.adb (Gnatbind): Do not include sources from the GNAT
10024 hierarchy in the list of files of the closure when -R is used
10025 (Gnatbind): Accept arguments starting with '@' to indicate response
10026 files and take the arguments from the response files.
10027 If List_Closure is set, display the referenced files
10028
100292007-06-06 Javier Miranda <miranda@adacore.com>
10030 Robert Dewar <dewar@adacore.com>
10031 Ed Schonberg <schonberg@adacore.com>
10032
10033 * checks.ads, checks.adb (Apply_Address_Clause_Check): Handle case in
10034 which the address-clause is applied to in-mode actuals (allowed by
10035 13.1(22)).
10036 (Apply_Discriminant_Check): Do not generate a check if the type is
10037 constrained by a current instance.
10038 (Activate_Division_Check): New procedure
10039 (Activate_Overflow_Check): New procedure
10040 (Activate_Range_Check): New procedure
10041 Call these new Activate procedures instead of setting flags directly
10042 (Apply_Array_Size_Check): Removed, no longer needed.
10043 Code clean up: remove obsolete code related to GCC 2.
10044 (Get_E_Length): Protect against bomb in case scope is standard
10045 (Selected_Range_Checks): If the node to be checked is a conversion to
10046 an unconstrained array type, and the expression is a slice, use the
10047 bounds of the slice to construct the required constraint checks.
10048 Improve NOT NULL error messages
10049 (Apply_Constraint_Check): If the context is a null-excluding access
10050 type, diagnose properly the literal null.
10051
100522007-06-06 Pascal Obry <obry@adacore.com>
10053
10054 * clean.adb (Clean_Archive): Use untouched casing for the archive name
10055 and the corresponding .deps file.
10056 (Clean_Interface_Copy_Directory): Use untouched casing for the library
10057 src directory. Minor code-clean-up. Use untouched casing for files
10058 read into the library src dir.
10059 (Clean_Library_Directory): Idem.
10060 (Parse_Cmd_Line): Accept new switch -aP
10061
100622007-06-06 Javier Miranda <miranda@adacore.com>
10063 Ed Schonberg <schonberg@adacore.com>
10064 Robert Dewar <dewar@adacore.com>
10065 Eric Botcazou <ebotcazou@adacore.com>
10066 Arnaud Charlet <charlet@adacore.com>
10067
10068 * einfo.ads, einfo.adb (Available_View): New synthesized attribute
10069 applicable to types that have the With_Type flag set. Returns the
10070 non-limited view of the type, if available, otherwise the type itself.
10071 For class-wide types, there is no direct link in the tree, so we have
10072 to retrieve the class-wide type of the non-limited view of the Etype.
10073 New attributes Static_Initialization and Static_Elaboration_Desired.
10074 Remove the pragma Thread_Body, and the associated flag
10075 Is_Thread_Body in entities, and all related code.
10076 (Suppress_Value_Tracking_On_Call): New flag
10077 E_Exception has Esize and Alignment fields
10078 (Universal_Aliasing): New function.
10079 (Set_Universal_Aliasing): New procedure.
10080 (Write_Entity_Flags): Deal with Universal_Aliasing flag.
10081 (Check_Nested_Access): New procedure.
10082 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
10083 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
10084 (Related_Interface): New attribute. Present in dispatch table pointer
10085 components of records. Set to point to the entity of the corresponding
10086 interface type.
10087 (Is_By_Reference_Type): Recurse on the full view of an incomplete type.
10088 (Original_Access_Type): Remove, not needed.
10089 (Root_Type): Handle properly subtypes of class-wide-types.
10090 Update comments.
10091
10092 * sem_ch4.adb (Analyze_Explicit_Dereference): Add support for
10093 class-wide types visible through limited-with clauses.
10094 (Try_Primitive_Operation): When examining all primitive operations of a
10095 tagged type, do not consider subprograms labeled as hidden unless they
10096 belong to a private generic type with a tagged parent.
10097 (Try_Object_Operation): Extensive rewriting, to handle properly various
10098 overloading cases, when several ancestors may have class-wide operations
10099 that are possible candidates, and when the overloaded functions return
10100 array types and have defaulted parameters so that the call may be
10101 interpreted as an indexing.
10102 (Analyze_Allocator): Remove Mark_Allocator and its invocation.
10103 (Process_Function_Call): use Next, rather than Next_Actual, to analyze
10104 successive actuals before analyzing the call itself.
10105 (Try_Primitive_Operation): A primitive operation is compatible with the
10106 prefix if the prefix has a synchronized type and the type of the formal
10107 is its corresponding record, as can be the case when the primitive
10108 operation is declared outside of the body of the type.
10109 (Traverse_Homonyms): New subprocedure of Try_Class_Wide_Operation, to
10110 perform homonym traversal, looking for class-wide operation matches
10111 (formerly done in statements of Try_Class_Wide_Operation). Matches on
10112 access parameters are now restricted to anonymous access types.
10113 (Mark_Allocator): An allocator with a discriminant association parent is
10114 a coextension.
10115 (Try_One_Prefix_Interpretation): If the type of the object is
10116 incomplete, as can be happen when it is a limited view obtained through
10117 a limited_with_clause, the selected component is not part of a prefixed
10118 call.
10119 (Complete_Object_Operation): Diagnose properly an object that is not
10120 aliased when the corresponding controlling formal is an access
10121 parameter.
10122 (Try_Primitive_Operation, Try_Class_Wide_Operation): Diagnose properly
10123 ambiguous calls in prefixed notation, where two primitives differ only
10124 in that the controlling argument of one is an access parameter.
10125
10126 * sem_ch6.adb (Has_Single_Return): Add guard in code that determines
10127 whether a function that returns an unconstrained type can be inlined.
10128 (Process_Formals): Diagnose properly the illegal use of an incomplete
10129 type in the profile of an access_to_subprogram declaration.
10130 (Check_Synchronized_Overriding): Nothing check for concurrent types, the
10131 operations are attached to the corresponding record.
10132 (Analyze_Subprogram_Specification): Add variables Formal and Formal_Typ.
10133 When processing a primitive of a concurrent type which implements an
10134 interface change the type of all controlling formals to that of the
10135 corresponding record type.
10136 (Check_Synchronized_Overriding): Relax the conditional logic when trying
10137 to determine the tagged type to which a primitive belongs.
10138 (Check_Conventions): Capture condition to ignore a primitive operation
10139 (which is shared between the loop in Check_Conventions and the one in
10140 Check_Convention) in a new local function Skip_Check.
10141 (Check_Convention): Rename Prim_Op to Second_Prim_Op to avoid possible
10142 confusion with Check_Conventions' own Prim_Op local variable.
10143 (Create_Extra_Formals): Test for a tagged result type rather than a
10144 controlling result when determining whether to add a BIP_Alloc_Form
10145 formal and a BIP_Final_List formal to the function.
10146 (Check_Conformance); For parameters that are anonymous access types,
10147 subtype conformance requires that the not null and the constant
10148 indicators must match
10149 (Check_Synchronized_Overriding): New parameter Formal_Typ. Add machinery
10150 to retrieve the appropriate type when processing a concurrent type
10151 declared within a generic. Minor comment reformatting. Change invocation
10152 of Overrides_Synchronized_Primitive to Find_Overridden_Synchronized_Pri-
10153 mitive.
10154 (Analyze_Subprogram_Body): If the return type of a function is an
10155 anonymous access to the limited view of a class-wide type, and the
10156 non-limited view of the type is available, update the type of the
10157 function so that code can be generated.
10158 (Process_Formals): In case of access-subtype itype whose designated
10159 type is also an itype (situation that happens now with access to
10160 subprograms) we mark the access-type itype with the Has_Delayed_Freeze
10161 attribute to avoid backend problems.
10162 (Check_Return_Subtype_Indication): Replace R_Type with R_Stm_Type in
10163 init of R_Stm_Type_Is_Anon_Access. Also check that base types of the
10164 anonymous types' designated types are same before testing
10165 Subtypes_Statically_Match.
10166 (Create_Extra_Formals): Test for a named access parameter that is a
10167 controlling formal as an additional condition for adding an
10168 accessibility level formal. This can occur in the subp type created for
10169 dispatching calls in Expand_Dispatching_Call, and allows calling
10170 Create_Extra_Formals from that procedure rather than special-casing the
10171 extra formals there.
10172 (Create_Extra_Formals): Add BIP_Alloc_Form and BIP_Final_List formals
10173 when the function has a controlling result.
10174 (Check_Returns): Add much more knowledge of the optimization of local
10175 raise statements to gotos, to retain proper warnings in this case.
10176 (Check_Statement_Sequence): Ignore N_Push_xxx_Label and N_Pop_xxx_Label
10177 nodes when looking for last statement.
10178
10179 * sem_type.ads, sem_type.adb (Specific_Type): Add support for
10180 class-wide types visible through limited with clauses.
10181 (Add_One_Interp): If the operands are anonymous access types, the
10182 predefined operator on universal_access is immediately visibles
10183 (Find_Unique_Type): Handle anonymous access to subprogram types just as
10184 other anonymous access types.
10185 (Disambiguate): Take into account CIL convention.
10186 (Interface_Present_In_Ancestor): Add support for class-wide interfaces.
10187
101882007-06-06 Robert Dewar <dewar@adacore.com>
10189
10190 * sinput.ads, sinput.adb, uintp.ads, urealp.adb, stringt.adb,
10191 sem_elim.adb, prj-strt.adb, repinfo.ads, repinfo.adb, namet.ads,
10192 elists.ads, elists.adb, lib.ads, lib.adb (Unlock): New procedure.
10193 Fix lower bound of tables.
10194 Add rep clauses.
10195
10196 * nlists.adb: Ditto.
10197 (Prev_Node, Next_Node): Change index type to Int so that it properly
10198 covers the range First_Node_Id - 1 up.
10199
102002007-06-06 Javier Miranda <miranda@adacore.com>
10201 Ed Schonberg <schonberg@adacore.com>
10202 Bob Duff <duff@adacore.com>
10203 Hristian Kirtchev <kirtchev@adacore.com>
10204
10205 * exp_aggr.ads, exp_aggr.adb:
10206 (Build_Record_Aggr_Code): Add missing initialization of secondary tags
10207 in extension aggregates.
10208 (Flatten): Other conditions being met, an aggregate is static if the
10209 low bound given by component associations is different from the low
10210 bound of the base index type.
10211 (Packed_Array_Aggregate_Handled): If the component type is itself a
10212 packed array or record, the front-end must expand into assignments.
10213 (Gen_Ctrl_Actions_For_Aggr): In call to Init_Controller, pass False to
10214 Init_Pr, instead of Ancestor_Is_Expression.
10215 (Gen_Ctrl_Actions_For_Aggr): When processing an aggregate of a
10216 coextension chain root, either generate a list controller or use the
10217 already existing one.
10218 (Static_Array_Aggregate): New procedure to construct a positional
10219 aggregate that can be handled by the backend, when all bounds and
10220 components are compile-time known constants.
10221 (Expand_Record_Aggregate): Force conversion of aggregates of tagged
10222 types covering interface types into assignments.
10223 (Replace_Type): move to Build_Record_Aggr_Code.
10224 (Expand_Record_Aggr_Code): if the target of the aggregate is an
10225 interface type, convert to the definite type of the aggregate itself,
10226 so that needed components are visible.
10227 (Convert_Aggr_In_Object_Decl): If the aggregate has controlled
10228 components and the context is an extended return statement do not
10229 create a transient block for it, to prevent premature finalization
10230 before the return is executed.
10231 (Gen_Assign): Do not generate a call to deep adjust routine if the
10232 component type is itself an array of controlled (sub)-components
10233 initialized with an inner aggregate.
10234 (Component_Check): New name for Static_Check. This name is now more
10235 appropriate, and documentation is added which was missing.
10236 (Component_Check): Add test for bit aligned component value
10237 (Component_Not_OK_For_Backend): Renames Has_Delayed_Nested_Aggregate_Or_
10238 Tagged_Comps, name is more appropriate given added function below.
10239 (Component_Not_OK_For_Backend): Check for bit aligned component ref.
10240
102412007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
10242 Javier Miranda <miranda@adacore.com>
10243 Robert Dewar <dewar@adacore.com>
10244
10245 * exp_attr.adb (Expand_N_Attribute_Reference): Case Callable and
10246 Terminated: Add unchecked type conversion from System.Address to
10247 System.Tasking.Task_Id when calling the predefined primitive
10248 _disp_get_task_id.
10249 Disable new Ada 05 accessibility check for JVM.NET targets, which
10250 cannot be implemented in a practical way.
10251 (Expand_N_Attribute_Reference: case Attribute_Tag): The use of 'Tag in
10252 the sources always references the tag of the actual object. Therefore,
10253 if 'Tag is applied in the sources to class-wide interface objects we
10254 generate code that displaces "this" to reference the base of the object.
10255 (Expand_N_Attribute_Reference, case Size): Return specified size if
10256 known to front end.
10257 (Expand_N_Attribute_Reference): The expansion of the 'Address attribute
10258 has code that displaces the pointer of the object to manage interface
10259 types. However this code must not be executed when the prefix is a
10260 subprogram. This bug caused the wrong expansion of the internally
10261 generated assignment that fills the dispatch table when the primitive
10262 is a function returning a class-wide interface type.
10263 (Expand_N_Attribute_Reference:Attribute_Valid): Remove incorrect call to
10264 Set_Attribute_Name for Name_Unaligned_Valid.
10265
102662007-06-06 Ed Schonberg <schonberg@adacore.com>
10267 Gary Dismukes <dismukes@adacore.com>
10268
10269 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
10270 If the initialization is the equivalent aggregate of the initialization
10271 procedure of the type, do not remove it.
10272 (Expand_N_Attribute_Definition_Clause): Exclude access variables
10273 initialized to null from having their expression reset to empty and
10274 note this exception in the comment.
10275
102762007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
10277 Robert Dewar <dewar@adacore.com>
10278 Ed Schonberg <schonberg@adacore.com>
10279 Gary Dismukes <dismukes@adacore.com>
10280
10281 * exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames.
10282 Add "with" and "use" clauses for Sem_Attr.
10283 (Expand_Current_Value): Do not replace occurences of attribute
10284 references where the prefix must be a simple name.
10285
10286 * sem_attr.ads, sem_attr.adb: Remove "with" and "use" clauses for
10287 Namet. Add new arrays Attribute_Name_Modifies_Prefix and
10288 Attribute_Requires_Simple_Name_Prefix.
10289 (Name_Modifies_Prefix): Body of new function.
10290 (Requires_Simple_Name_Prefix): Body of new function.
10291 (Resolve_Attribute, case Access): Improve error message for case of
10292 mismatched conventions.
10293 (Analyze_Attribute, case 'Tag): The prefix the attribute cannot be of an
10294 incomplete type.
10295 (Analyze_Attribute, case 'Access): If the type of the prefix is a
10296 constrained subtype for a nominal unconstrained type, use its base type
10297 to check for conformance with the context.
10298 (Resolve_Attribute): Remove test of the access type being associated
10299 with a return statement from condition for performing accessibility
10300 checks on access attributes, since this case is now captured by
10301 Is_Local_Anonymous_Access.
10302 (Analyze_Access_Attribute): Set Address_Taken on entity
10303 (Analyze_Attribute, case Address): Set Address_Taken on entity
10304 (OK_Self_Reference): Traverse tree to locate enclosing aggregate when
10305 validating an access attribute whose prefix is a current instance.
10306 (Resolve_Attribute): In case of attributes 'Code_Address and 'Address
10307 applied to dispatching operations, if freezing is required then we set
10308 the attribute Has_Delayed_Freeze in the prefix's entity.
10309 (Check_Local_Access): Set flag Suppress_Value_Tracking_On_Call in
10310 current scope if access of local subprogram taken
10311 (Analyze_Access_Attribute): Check legality of self-reference even if the
10312 expression comes from source, as when a single component association in
10313 an aggregate has a box association.
10314 (Resolve_Attribute, case 'Access): Do not apply accessibility checks to
10315 the prefix if it is a protected operation and the attribute is
10316 Unrestricted_Access.
10317 (Resolve_Attribute, case 'Access): Set the Etype of the attribute
10318 reference to the base type of the context, to force a constraint check
10319 when the context is an access subtype with an explicit constraint.
10320 (Analyze_Attribute, case 'Class): If the prefix is an interface and the
10321 node is rewritten as an interface conversion. leave unanalyzed after
10322 resolution, to ensure that type checking against the context will take
10323 place.
10324
103252007-06-06 Ed Schonberg <schonberg@adacore.com>
10326 Javier Miranda <miranda@adacore.com>
10327 Robert Dewar <dewar@adacore.com>
10328
10329 * exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a
10330 wrapper when the full view of the controlling type of an inherited
10331 function that dispatches on result implements interfaces.
10332 (Expand_N_Object_Declaration): In cases where the type of the
10333 declaration is anonymous access, create finalization list for it.
10334 (Expand_N_Object_Declaration): Generate a persistent_bss directive only
10335 if the object has no explicit initialization, to match description of
10336 functionality of pragam Persistent_BSS.
10337 (Build_Equivalent_Array_Aggregate, Build_Equivalent_Record_Aggregate):
10338 new function to build static aggregates, to replace initialization call
10339 when static initialization is desired.
10340 (Freeze_Type): Generate a list controller for an access type whenever
10341 its designated type has controlled anonymous access discriminants.
10342 (Build_Equivalent_Aggregate): New procedure to compute a static
10343 aggregate to be used as default initialization for composite types,
10344 instead of a generating a call to the initialization procedure for the
10345 type.
10346 (Build_Initialization_Call): When available, replace a call to the
10347 initialization procedure with a copy of the equivalent static aggregate
10348 for the type.
10349 (Expand_N_Object_Declaration): Use New_Occurrence_Of in generated
10350 declarations for objects of a class-wide interface type, rather than
10351 just identifiers, to prevent visibility problems.
10352 (Expand_N_Object_Declaration): When expanding the declaration for an
10353 object of a class-wide interface type, preserve the homonym chain of
10354 the original entity before exchanging it with that of the generated
10355 renaming declaration.
10356 (Freeze_Enumeration_Type): Don't raise CE if No_Exception_Propagation
10357 active, because there is no way to handle the exception.
10358 (Freeze_Record_Type): In case of CPP_Class types add a call to Make_DT
10359 to do a minimum decoration of the Access_Disp_Table list.
10360 (Expand_Record_Controller): Avoid the addition of the controller between
10361 the component containing the tag of a secondary dispatch table and its
10362 adjacent component that stores the offset to the base of the object.
10363 This latter component is only generated when the parent type has
10364 discriminants ---documented in Add_Interface_Tag_Components).
10365 (Apply_Array_Size_Check): Removed, no longer needed.
10366 (Expand_N_Full_Type_Declaration): If the type has anonymous access
10367 components, create a Master_Entity for it only if it contains tasks.
10368 (Build_Init_Procedure): Suppress the tag assignment compiling under
10369 no run-time mode.
10370 (Freeze_Record_Type): Remove code associated with creation of dispatch
10371 table.
10372 (Init_Secondary_Tags): Update type of actuals when generating calls to
10373 Ada.Tags.Set_Offset_To_Top
10374 (Stream_Operation_OK): Disable use of streams compiling under no
10375 run-time mode
10376 (Expand_N_Object_Declaration): Don't do Initialize_Scalars initalization
10377 if Has_Init_Expression set.
10378 (Build_Init_Procedure): Replace call to Fill_DT_Entry by call to
10379 Register_Primitive, which provides the same functionality.
10380 (Requires_Init_Proc): Return false in case of interface types.
10381 (Add_Secondary_Tables): Use the new attribute Related_Interface to
10382 cleanup the code.
10383 (Predefined_Primitive_Freeze): Do not assume that an internal entity
10384 is always associated with a predefined primitive because the internal
10385 entities associated with interface types are not predefined primitives.
10386 Therefore, the call to Is_Internal is replaced by a call to the
10387 function Is_Predefined_Dispatching_Operation.
10388 (Make_Eq_If): When generating the list of comparisons for the
10389 components of a given variant, omit the controller component that is
10390 present if the variant has controlled components.
10391
103922007-06-06 Javier Miranda <miranda@adacore.com>
10393 Hristian Kirtchev <kirtchev@adacore.com>
10394 Bob Duff <duff@adacore.com>
10395
10396 * exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to
10397 handle the creation of finalization lists and calls for nested
10398 coextensions when the root of the chains is part of a return statement.
10399 (Inside_A_Return_Statement): New function inside Complete_Coextension_
10400 Finalization.
10401 (Expand_Record_Equality): Skip components that are interface types.
10402 (Displace_Allocator_Pointer): Add missing support for interface subtypes
10403 (Expand_N_Allocator): Replace invocation of Is_Local_Access_Discriminant
10404 with Rewrite_Coextension. Change the condition for detecting coextension
10405 root nodes.
10406 (Is_Local_Access_Discriminant): Removed.
10407 (Rewrite_Coextension): New routine which rewrites a static coextension
10408 as a temporary and uses its unrestricted access in the construction of
10409 the outer object.
10410 (Complete_Coextension_Finalization): New routine. Generate finalization
10411 attachment calls to all delayed coextensions.
10412 (Expand_N_Allocator): Call Complete_Coextension_Finalization whenever
10413 the allocator is not a coextension itself and has delayed coextensions.
10414 If the current allocator is controlled, but also a coextension, delay
10415 the generation of the finalization attachment call.
10416 Rename local variable "Node" to "Nod" in order to avoid confusion with
10417 "Elists.Node".
10418 (Expand_Allocator_Expression): Call Adjust for initialized allocators of
10419 limited types that are not inherently limited. Such an allocator is
10420 illegal, but is generated by the expander for a return statement, to
10421 copy the result onto the secondary stack. This is the only case where a
10422 limited object can be copied. Generate code to displace the pointer
10423 to the object if the qualified expression is a class-wide interface
10424 object. Such displacement was missing and hence the copy of the object
10425 was wrong.
10426 (Apply_Accessibility_Check): Handle allocated objects initialized in
10427 place.
10428 (Displace_Allocator_Pointer): Subsidiary procedure to Expand_N_Allocator
10429 and Expand_Allocator_Expression. Allocating class-wide interface objects
10430 this routine displaces the pointer to the allocated object to reference
10431 the component referencing the corresponding secondary dispatch table.
10432 Expand_Allocator_Expression): Add missing support to allocate class-wide
10433 interface objects initialized with a qualified expression.
10434 (Get_Allocator_Final_List): Test for an anonymous access type that is a
10435 function result type, and use the finalization list associated with the
10436 function scope in that case (such an anonymous type should not be
10437 treated like an access parameter's type).
10438
104392007-06-06 Ed Schonberg <schonberg@adacore.com>
10440 Gary Dismukes <dismukes@adacore.com>
10441 Javier Miranda <miranda@adacore.com>
10442
10443 * exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a
10444 controlled type, use Make_Handler_For_Ctrl_Operation to construct the
10445 required exception handler.
10446 (Expand_Simple_Function_Return, Expand_N_Return_Statement): Handle
10447 properly the case of a function whose return type is a limited
10448 class-wide interface type. Modify the code of the accessibility
10449 check to handle class-wide interface objects. In this case we need to
10450 displace "this" to reference the primary dispatch table to get access
10451 to the TSD of the object (to evaluate its accessibility level).
10452 (Expand_N_Extended_Return_Statement): Test for a tagged result type
10453 rather than a controlling result as one of the conditions for
10454 generating tests of the implicit BIP_Alloc_Form formal. The
10455 initialization assignment is also handled according to whether the
10456 result is tagged instead of controlling.
10457 In the case where the init assignment is inserted in the "then" part of
10458 the allocation conditional, rewrite the target to be a dereference of
10459 the implicit BIP_Object_Access formal.
10460 If the returned value is unconstrained and created on the secondary
10461 stack, mark the enclosing block and function so that the secondary
10462 stack is not reclaimed on return.
10463 Treat returns from functions with controlling results similarly to
10464 returns from functions with unconstrained result subtypes.
10465 If the object returned is unconstrained, and an allocator must be
10466 created for it, analyze the allocator once the block for the extended
10467 return is installed, to ensure that finalizable components
10468 of the expression use the proper finalization list. Guard the call to
10469 Move_Final_List with a check that there is something to finalize.
10470 (Make_Tag_Ctrl_Assignment): Use "old" handling
10471 of controlled type assignment for virtual machines, since new code uses
10472 unsupported features (such as direct access to bytes in memory).
10473
104742007-06-06 Gary Dismukes <dismukes@adacore.com>
10475 Ed Schonberg <schonberg@adacore.com>
10476
10477 * exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
10478 accessibility actual, check for the case of an aliased object that has
10479 been rewritten as an Access attribute, and assign Prev to Prev_Orig so
10480 we fall into processing for the attribute rather than the name of the
10481 object.
10482 (Expand_Inline_Call): If an actual is a literal, and the corresponding
10483 formal has its address taken in the body, create a temporary to capture
10484 value. If the return type is a limited interface, do not treat the
10485 return value as Controlled.
10486 (Is_In_Place_Function): If the return type is a limited interface,
10487 treat as returning in place. The actual returned object may not always
10488 be limited, but the caller has to assume that it is returned in place.
10489 (Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
10490 context of an allocator, use the correct finalization chain (that is,
10491 the chain belonging to the access type, rather than the chain belonging
10492 to the current scope).
10493 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
10494 result type rather than a controlling result as a precondition for
10495 adding an allocation form actual to a build-in-place call.
10496 (Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
10497 (Freeze_Subprogram): Code cleanup. Remove all the code that register the
10498 primitive in the dispatch tables. This work is now done by Make_DT when
10499 the type is frozen.
10500 (Register_Predefined_DT_Entry): Removed.
10501 (Add_Return): If end label is not present, use sloc of last statement
10502 for generated return statement in procedure, for better gdb behavior
10503 on expanded code.
10504 (Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
10505 object address nodes to ensure proper processing by routines like
10506 Insert_After*.
10507 (Expand_Call): Fix generation of validity check for parameter
10508 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
10509 the allocation form parameter if the result subtype is constrained,
10510 except when the function has a controlling result.
10511 (Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
10512 rather than Is_Controlled and Has_Controlled_Component, since we want to
10513 include class-wide result types in this treatment. Also test for a
10514 controlling result, since that also requires passing a finalization
10515 list.
10516 (Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
10517 even when the result subtype is constrained, to handle calls involving
10518 controlling results.
10519 (Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
10520 is now called even when the result subtype is constrained, to handle
10521 calls involving controlling results.
10522 (Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
10523 on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
10524 now performs the test).
10525 (Make_Build_In_Place_Call_In_Object_Declaration):
10526 Add_Alloc_Form_Actual_* is now called even when the result subtype is
10527 constrained, to handle calls involving controlling results.
10528 (Add_Return): Accomodate rewritten pattern from local raise to goto
10529 transformation, so that we still recognize an transfer statement
10530 and do the right thing here in that case.
10531 (Expand_N_Subprogram_Body): Add dummy Push/Pop_xxx_Label nodes at start
10532 and end of subprogram code.
10533 (Register_Interface_DT_Entry, Register_Predefined_DT_Entry): Add missing
10534 support for primitives that are functions (without formals) with a
10535 controlling result.
10536 (Inherited_From_Formal): If the actual subtype has not generic parent
10537 type, it is not an actual for a formal derived type, and there is no
10538 operation to inherit from the formal.
10539
105402007-06-06 Ed Schonberg <schonberg@adacore.com>
10541 Thomas Quinot <quinot@adacore.com>
10542
10543 * exp_ch7.ads, exp_ch7.adb (Expand_Cleanup_Actions): Set Sloc of
10544 inserted cleanup code appropriately for GDB use.
10545 (Make_Deep_Proc): Use Make_Handler_For_Ctrl_Operation to create
10546 exception handler for Deep_Adjust or Deep_Finalize.
10547 (Make_Handler_For_Ctrl_Operation): New subprogram. When runtime entity
10548 Raise_From_Controlled_Operation is available, use a call to that
10549 subprogram instead of a plain "raise Program_Error" node to raise
10550 Program_Error if an exception is propagated from an Adjust or Finalize
10551 operation.
10552 (Insert_Actions_In_Scope_Around): If the statement to be wrapped
10553 appears in the optional statement list of a triggering alternative, the
10554 scope actions can be inserted directly there, and not in the list that
10555 includes the asynchronous select itself.
10556
105572007-06-06 Ed Schonberg <schonberg@adacore.com>
10558 Robert Dewar <dewar@adacore.com>
10559 Hristian Kirtchev <kirtchev@adacore.com>
10560
10561 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry): Set sloc of
10562 generated exception handler appropriately when debugging generated code.
10563 Deal properly with No_Exception_Propagation restriction mode.
10564 (Expand_N_Abort_Statement): Add an unchecked type conversion from
10565 System.Address to System.Tasking.Task_Id when processing the result of
10566 the predefined primitive _disp_get_task_id.
10567 (Expand_N_Asynchronous_Select): Clarify comment.
10568 (Expand_N_Protected_Type_Declaration): Minor code cleanup.
10569 (Find_Parameter_Type): New routine inside Type_Conformant_Parameters.
10570 (Type_Conformant_Parameters): New parameter Prim_Op_Typ. Code cleanup.
10571 (Add_Private_Declarations, Build_Protected_Body): Use proper slocs for
10572 privals and for generated call to Complete_Entry_Body, for better gdb
10573 behavior.
10574 (Copy_Result_Type): Utility to construct a parameter and result profile
10575 for protected functions whose return type is an anonymous access to
10576 subprogram.
10577 (Build_Protected_Sub_Spec and Expand_Access_Protected_Subprogram_Type):
10578 call the above.
10579 (Build_Task_Activation_Call): Insert Activate_Tasks call at proper
10580 point when the local-raise-to-goto transformation has taken place.
10581
105822007-06-06 Javier Miranda <miranda@adacore.com>
10583 Nicolas Setton <setton@adacore.com>
10584
10585 * exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its
10586 functionality when the backend is generating code.
10587 Otherwise any serious error
10588 reported by the backend calling the frontend routine Error_Msg
10589 changes the Compilation_Mode to Check_Semantics, disables the
10590 functionality of this routine and causes the generation of
10591 spureous additional errors.
10592
10593 * exp_dbug.ads (Pointers to Unconstrained Arrays): Document the
10594 debugging information now generated by the compiler for fat-pointer
10595 types.
10596 Document the contents of DW_AT_producer in the GNAT Vendor extensions to
10597 DWARF2/3.
10598 Document GNAT Vendor extensions to DWARF 2/3 and the "-gdwarf+" switch.
10599
106002007-06-06 Thomas Quinot <quinot@adacore.com>
10601
10602 * exp_dist.ads, exp_dist.adb (Make_Transportable_Check): New subprogram
10603 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
10604 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
10605 For a remote call to a function with a classwide return type, apply an
10606 E.4(18) check to the returned value.
10607 (Add_RACW_Primitive_Declarations_And_Bodies): Do not generate stubs for
10608 stream attributes of the designated type of an RACW, as they are not
10609 dispatching primitive operations.
10610
106112007-06-06 Geert Bosch <bosch@adacore.com>
10612
10613 * exp_fixd.adb (Integer_Literal): Add optional argument to construct a
10614 negative literal
10615 (Do_Divide_Fixed_Fixed): Add comments to indicate Frac is always
10616 positive
10617 (Do_Divide_Fixed_Universal): Handle case of negative Frac.
10618 (Do_Multiply_Fixed_Fixed): Add coments to indicate Frac is always
10619 positive
10620 (Do_Multiply_Fixed_Universal): Handle case of negative Frac.
10621
106222007-06-06 Javier Miranda <miranda@adacore.com>
10623
10624 * exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this
10625 attribute compiling package Ada.Tags under No_Run_Time_Mode.
10626
106272007-06-06 Javier Miranda <miranda@adacore.com>
10628
10629 * exp_intr.adb (Expand_Unc_Deallocation): Add missing support for
10630 deallocation of class-wide interface objects.
10631 (Expand_Dispatching_Constructor_Call): Take into account that if the
10632 result of the dispatching constructor is an interface type, the
10633 function returns a class-wide interface type; otherwise the returned
10634 object would be actual. The frontend previously accepted returning
10635 interface types because Expand_Interface_Actuals silently performed
10636 the management of the returned type "as if" it were a class-wide
10637 interface type.
10638 (Expand_Dispatching_Constructor_Call): Replace call to
10639 Make_DT_Access_Action by direct call to Make_Function_Call.
10640
106412007-06-06 Robert Dewar <dewar@adacore.com>
10642 Ed Schonberg <schonberg@adacore.com>
10643
10644 * exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to
10645 compute masking constant, since we now set Esize properly to the
10646 underlying size.
10647 (Create_Packed_Array_Type): Set proper Esize value adjusted as required
10648 to match the alignment.
10649 (Create_Packed_Array_Type): Use Short_Short_Unsigned as base type for
10650 packed arrays of 8 bits or less.
10651
10652 * freeze.adb (Freeze_Entity): When freezing the formals of a
10653 subprogram, freeze the designated type of a parameter of an access type
10654 only if it is an access parameter.
10655 Increase size of C convention enumeration object
10656 (Freeze_Entity, array type case): Make sure Esize value is properly
10657 adjusted for the alignment if it is known.
10658 (Freeze_Entity, array type case): When checking bit packed arrays for
10659 the size being incorrect, check RM_Size, not Esize.
10660 (Freeze_Record_Type): Check for bad discriminated record convention
10661 (In_Exp_Body): Return true if the body is generated for a subprogram
10662 renaming, either an attribute renaming or a renaming as body.
10663 (Check_Itype): If the designated type of an anonymous access component
10664 is a non-protected subprogram type, indicate that it is frozen, to
10665 prevent out-of-scope freeze node at some subsequent call.
10666 (Freeze_Subprogram): On OpenVMS, reject descriptor passing mechanism
10667 only if the subprogram is neither imported nor exported, as well as the
10668 NCA descriptor class if the subprogram is exported.
10669
106702007-06-06 Ed Schonberg <schonberg@adacore.com>
10671 Arnaud Charlet <charlet@adacore.com>
10672 Robert Dewar <dewar@adacore.com>
10673 Gary Dismukes <dismukes@adacore.com>
10674
10675 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a
10676 default initialization on an imported object, when there is no
10677 initialization call generated for it.
10678 (Expand_Pragma_Assert): Add handling of No_Exception_Propagation
10679 restriction
10680
10681 * snames.h, snames.ads, snames.adb, par-prag.adb: New pragma
10682 Static_Elaboration_Desired.
10683 Remove pragma Thread_Body.
10684 Implement a new pragma No_Body
10685 Removes the Explicit_Overriding pragma
10686 Remove Optional_Overriding pragma
10687 (Prag): Deal with Universal_Aliasing.
10688 (Name_CIL, Name_CIL_Constructor, Convention_CIL,
10689 Pragma_CIL_Constructor): New names.
10690
10691 * sem_cat.adb (Validate_Object_Declaration): An initialization that
10692 uses the equivalent aggregate of a type must be treated as an implicit
10693 initialization.
10694 (Get_Categorization): Check a unit for pragma Preelaborate only if it
10695 has none of the other categories.
10696 (Process_Import_Or_Interface_Pragma): Report an error for an attempt
10697 to apply Import to an object renaming declaration.
10698
10699 * sem_prag.adb (Process_Import_Or_Interface): Warn that a type imported
10700 from a C++ class should be declared as limited and that it will be
10701 considererd limited.
10702 (Analyze_Pragma): Warn that a type specified with pragma CPP_Class
10703 should be declared as limited and that it will be considererd limited.
10704 (Ada_2005_Pragma): New procedure, used to deal with Ada 2005 pragmas
10705 (Analyze_Pragma, case Export): Diagnose export of enumeration literal
10706 (Analyze_Pragma): Deal with Universal_Aliasing.
10707 (Sig_Flags): Likewise.
10708 (Set_Encoded_Interface_Name): Suppress encoding when compiling for AAMP.
10709 (Overflow_Checks_Unsuppressed): New flag.
10710 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
10711 (Analyze_Pragma [case Pack]): Ignore pragma Pack and post warning in
10712 case of JVM or .NET targets, and compiling user code.
10713 Add debugging convenience routine rv
10714
107152007-06-06 Robert Dewar <dewar@adacore.com>
10716
10717 * exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that
10718 are interface type.
10719 (Build_Elementary_Input_Call): For floating-point use right type in the
10720 absence of strange size or stream size clauses.
10721 (Build_Elementary_Write_Call): Same fix
10722 (Has_Stream_Standard_Rep): Returns False if Stream_Size attribute
10723 set to value that does not match base type size.
10724
107252007-06-06 Ed Schonberg <schonberg@adacore.com>
10726
10727 * exp_util.ads, exp_util.adb (Expand_Subtype_From_Expr): In Ada2005, an
10728 object of a limited type can be initialized with a call to a function
10729 that returns in place. If the limited type has unknown discriminants,
10730 and the underlying type is a constrained composite type, build an actual
10731 subtype from the function call, as is done for private types.
10732 (Side_Effect_Free): An expression that is the renaming of an object or
10733 whose prefix is the renaming of a object, is not side-effect free
10734 because it may be assigned through the renaming and its value must be
10735 captured in a temporary.
10736 (Has_Controlled_Coextensions): New routine.
10737 (Expand_Subtype_From_Expr): Do nothing if type is a limited interface,
10738 as is done for other limited types.
10739 (Non_Limited_Designated_Type): new predicate.
10740 (Make_CW_Equivalent_Type): Modified to handle class-wide interface
10741 objects.
10742 Remove all handling of with_type clauses.
10743
10744 * par-ch10.adb: Remove all handling of with_type clauses.
10745
10746 * lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
10747 checksum if the main source could not be parsed.
10748 (Loat_Unit): When processing a child unit, determine properly whether
10749 the parent unit is a renaming when the parent is itself a child unit.
10750 Remove handling of with_type clauses.
10751
10752 * sinfo.ads, sinfo.adb (Is_Static_Coextension): New function.
10753 (Set_Is_Static_Coextension): New procedure.
10754 (Has_Local_Raise): New function
10755 (Set_Has_Local_Raise): New procedure
10756 (Renaming_Exception): New field
10757 (Has_Init_Expression): New flag
10758 (Delay_Finalize_Attach): Remove because flag is obsolete.
10759 (Set_Delay_Finalize_Attach): Remove because flag is obsolete.
10760 Remove all handling of with_type clauses.
10761 (Exception_Junk): Can now be set in N_Block_Statement
10762
107632007-06-06 Vincent Celier <celier@adacore.com>
10764 Robert Dewar <dewar@adacore.com>
10765
10766 * frontend.adb (Frontend): Return immediately if the main source could
10767 not be parsed, because of preprocessing errors.
10768
10769 * gnat1drv.adb (gnat1drv): Handle RE_Not_Available gracefully.
10770 (Gnat1drv): Exit with errors if the main source could not be parsed,
10771 because of preprocessing errors.
10772 (Check_Rep_Info): New procedure
10773
107742007-06-06 Robert Dewar <dewar@adacore.com>
10775
10776 * g-hesorg.ads, g-heasor.ads,
10777 g-busorg.ads, g-bubsor.ads: Update documentation
10778 GNAT.Heap/Bubble_Sort_G is now pure
10779
107802007-06-06 Robert Dewar <dewar@adacore.com>
10781
10782 * g-catiio.ads, g-catiio.adb (Image): Check for null picture string
10783
107842007-06-06 Robert Dewar <dewar@adacore.com>
10785 Ed Schonberg <schonberg@adacore.com>
10786
10787 * g-comlin.ads, g-comlin.adb:
10788 Add new warning for renaming of function return objects
10789
10790 * opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
10791 (Tree_Read): Use size of object instead of type'object_size, since the
10792 latter is incorrect for packed array types.
10793 (Tree_Write): Same fix
10794
10795 * opt.ads: Add new warning for renaming of function return objects
10796 (Generating_Code): New boolean variable used to indicate that the
10797 frontend as finished its work and has called the backend to process
10798 the tree and generate the object file.
10799 (GCC_Version): Is now private
10800 (Static_Dispatch_Tables): New constant declaration.
10801 (Overflow_Checks_Unsuppressed): New flag.
10802 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
10803 (List_Closure): New flag for gnatbind (-R)
10804 Zero_Formatting: New flag for gnatbind (-Z)
10805 (Special_Exception_Package_Used): New flag.
10806 (Warn_On_Unrepped_Components): New flag.
10807
10808 * sem_ch8.adb (Check_Library_Unit_Renaming): Check that the renamed
10809 unit is a compilation unit, rather than relying on its scope, so that
10810 Standard can be renamed.
10811 (Analyze_Object_Renaming): Add new warning for renaming of function
10812 return objects.
10813 Also reject attempt to rename function return object in Ada 83 mode.
10814 (Attribute_Renaming): In case of tagged types, add the body of the
10815 generated function to the freezing actions of the type.
10816 (Find_Type): A protected type is visible right after the reserved word
10817 "is" is encountered in its type declaration. Set the entity and type
10818 rather than emitting an error message.
10819 (New_Scope): Properly propagate Discard_Names to inner scopes
10820 (Check_Nested_Access): New procedure.
10821 (Has_Nested_Access, Set_Has_Nested_Access): New procedures.
10822 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
10823
10824 * sem_warn.ads, sem_warn.adb: Improvements to infinite loop warning
10825 Add new warning for renaming of function return objects
10826 (Check_References): Suppress warnings for objects whose type or
10827 base type has Warnings suppressed.
10828 (Set_Dot_Warning_Switch): Add processing for -gnatw.c/C
10829 (Set_Warning_Switch): Include new -gnatwc in -gnatwa
10830
108312007-06-06 Vincent Celier <celier@adacore.com>
10832 Emmanuel Briot <briot@adacore.com>
10833 Olivier Hainque <hainque@adacore.com>
10834
10835 * g-debpoo.ads, g-debpoo.adb (Free_Physically.Free_Blocks): Use the
10836 absolute value of Header.Block_Size when displaying the freed physical
10837 memory in traces.
10838 (Allocate): Compute Storage_Address using Integer_Address, not
10839 Storage_Offset, because the range of Storage_Offset may not be large
10840 enough.
10841 (Configure): New parameter Low_Level_Traces
10842 (Allocate, Deallocation, Free_Physically): Added low-level traces
10843 (Configure): new parameter Errors_To_Stdout.
10844 (Output_File): new subprogram
10845 (Deallocate, Dereference): Send error messages to the proper stream
10846 (Print_Pool, Print_Info_Stdout): Make sure the output goes to stdout, as
10847 documented. Previous code would send it to the current output file
10848 defined in GNAT.IO, which might not be stdout
10849 (Is_Valid): Adjust comment to mention that a positive reply means that
10850 Header_Of may be used to retrieve the allocation header associated with
10851 the subprogram Storage address argument. Return False early if this
10852 address argument is misaligned.
10853
108542007-06-06 Vincent Celier <celier@adacore.com>
10855
10856 * gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept
10857 switch -P
10858 (ASIS_Main): New global variable
10859 (Get_Closure): New procedure
10860 (GNATCmd): Set ASIS_Main when -P and -U with a main is used for gnat
10861 check, metric or pretty. Call Get_Closure in this case.
10862 (Check_Files): For GNAT LIST, check all sources of all projects when
10863 All_Projects is True.
10864 (GNATCmd): Accept -U for GNAT LIST
10865
108662007-06-06 Vincent Celier <celier@adacore.com>
10867
10868 * gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
10869 has been specified
10870 Correct error message when invocation of the linker fails
10871 Add explicit size clause for the C imported variables
10872 Object_List_File_Supported and Using_GNU_Linker to emphasize that
10873 we expect char size.
10874 Read target parameters earlier, since this is needed to set
10875 Target_VM properly. Also do not use -static/shared-libgcc for non GCC
10876 targets.
10877
108782007-06-06 Vincent Celier <celier@adacore.com>
10879
10880 * gnatls.adb:
10881 Add 3 spaces before the default project directory when displaying
10882 the project search path.
10883 Add new command line switch '-l' to display license information.
10884
108852007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
10886
10887 * gmem.c: Add support for timestamps on memory operations.
10888
10889 * memtrack.adb, gnatmem.adb: Add support for timestamps on memory
10890 operations (not used currently, just foundation for future
10891 enhancements). Add possibility to perform full dump of gmem.out file.
10892 (Print_Back_Traces): Declare accesses to root arrays constants since
10893 they aren't modified.
10894 (Print_Back_Traces): allocate root arrays on the heap rather than stack.
10895
108962007-06-06 Vincent Celier <celier@adacore.com>
10897
10898 * gnatsym.adb: Update Copyright notice
10899 (Parse_Cmd_Line): Accept new switch -D
10900 (Gnatsym): In Direct policy (switch -D) copy reference file to symbol
10901 file.
10902
10903 * prj.ads (Policy): New policy Direct
10904 (Yes_No_Unknown): New enumeration type
10905 (Project_Data): New component Libgnarl_Needed
10906
10907 * prj-nmsc.adb (Check_For_Source): When recording a source file make
10908 use the untouched pathname casing.
10909 (Get_Directories): Ensure that the Display_Exec_Directory is using the
10910 proper casing on non case-sensitive platforms like Windows.
10911 (Get_Unit): Accept file names x__... and x~... (where x = a, g, i or s)
10912 on all platforms, as it is not possible to know which one is allowed
10913 before processing the project files.
10914 (Check_Stand_Alone_Library): Check that Library_Reference_Symbol_File is
10915 specified when symbol policy is Direct. Check that when there is a
10916 symbol file defined (either by default or with attribute
10917 Library_Symbol_File) it is not the same as the reference symbol file.
10918 (Check_Stand_Alone_Library): Recognize new symbol policy Direct.
10919 (Look_For_Sources): Allow Locally_Removed_Files to be declare in non
10920 extending projects.
10921 (Record_Ada_Source): Record a source that has been locally removed in an
10922 imported project.
10923
10924 * symbols.ads (Policy): New policy Direct
10925
10926 * symbols-vms.adb (Initialize): Take new policy Direct in case
10927 statement
10928
109292007-06-06 Vincent Celier <celier@adacore.com>
10930
10931 * g-os_lib.ads, g-os_lib.adb (Normalize_Pathname.Get_Directory):
10932 Correct obvious bug (return Dir; instead of return Directory;).
10933 (Normalize_Pathname): Use Reference_Dir'Length, not Reference_Dir'Last
10934
109352007-06-06 Thomas Quinot <quinot@adacore.com>
10936
10937 * g-pehage.adb (Produce): Open output files in Binary mode, so that
10938 they have UNIX line endings (LF only) even on Windows, and thus pass
10939 all GNAT style checks.
10940
109412007-06-06 Emmanuel Briot <briot@adacore.com>
10942
10943 * g-regpat.adb (Quote): Fix improper quoting of '.'
10944
109452007-06-06 Thomas Quinot <quinot@adacore.com>
10946
10947 * g-soccon.ads: Add new constant Thread_Blocking_IO, always True by
10948 default, set False on a per-runtime basis.
10949 (Need_Netdb_Buffer): New constant.
10950
10951 * g-socket.ads, g-socket.adb: Import new package
10952 GNAT.Sockets.Thin.Task_Safe_NetDB.
10953 (Raise_Host_Error): Use Host_Error_Message from platform-specific thin
10954 binding to obtain proper message.
10955 (Close_Selector): Use GNAT.Sockets.Thin.Signalling_Fds.Close.
10956 Replace various occurrences of Arry (Arry'First)'Address with the
10957 equivalent Arry'Address (GNAT always follows implementation advice from
10958 13.3(14)).
10959 (Get_Host_By_Address, Get_Host_By_Name,
10960 Get_Service_By_Name, Get_Service_By_Port): Do not use GNAT.Task_Lock;
10961 instead, rely on platform-specific task safe netdb operations provided
10962 by g-socthi.
10963
10964 * g-socthi.ads, g-socthi.adb (Initialize): Remove obsolete formal
10965 parameter Process_Blocking_IO.
10966 (Host_Error_Messages): Add stub body.
10967 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
10968 (Safe_Gethostbyname, Safe_Gethostbyaddr, Safe_Getservbyname,
10969 Safe_Getservbyport): Move functions into new child package
10970 Task_Safe_NetDB.
10971 (Nonreentrant_Gethostbyname, Nonreentrant_Gethostbyaddr,
10972 Nonreentrant_Getservbyname, Nonreentrant_Getservbyport): New routines.
10973 (In_Addr): Add alignment clause.
10974
109752007-06-06 Robert Dewar <dewar@adacore.com>
10976
10977 * g-trasym.ads, g-traceb.ads: Update list of supported targets
10978 Add note about symbolic traceback
10979
109802007-06-06 Pascal Obry <obry@adacore.com>
10981
10982 * hostparm.ads (Normalized_CWD): Use the host directory separator
10983 instead of the hardcoded forward slash which is not the proper
10984 character on Windows for example.
10985 (Java_VM): Removed.
10986
109872007-06-06 Vincent Celier <celier@adacore.com>
10988 Arnaud Charlet <charlet@adacore.com>
10989
10990 * a-clrefi.adb, a-clrefi.ads: New files
10991
10992 * impunit.adb: Add s-os_lib in the list of user visible units.
10993 (Non_Imp_File_Names_95): Add a-clrefi to this list
10994 Remove obsolete run-time entries.
10995 (Non_Imp_File_Names_05): Add Ada 2005 entries for:
10996 "a-exetim" -- Ada.Execution_Time
10997 "a-extiti" -- Ada.Execution_Time.Timers
10998
10999 * mlib-prj.ads, mlib-prj.adb
11000 (Build_Library): Use untouched object dir and library dir. At the
11001 same time makes sure that the checks are done using the canonical
11002 form. Removes hard-coded directory separator and use the proper host
11003 one instead.
11004 (Process_Project): Do not look in object directory to check if libgnarl
11005 is needed for a library, if there is no object directory.
11006 (Build_Library): Scan the ALI files to decide if libgnarl is needed for
11007 linking.
11008 (Build_Library): When invoking gnatbind, use a response file if the
11009 total size of the arguments is too large.
11010
11011 * Makefile.rtl: (g-sttsne): New object file.
11012 Add entry for a-clrefi, s-utf_32, System.Exceptions
11013
11014 * Make-lang.in: Remove bogus dependency of s-memory.o on memtrack.o.
11015 (GNAT_ADA_OBJS, GNATBIND_OBJS): Add s-except.o.
11016 (GNATBIND_OBJS): Add new objects a-clrefi.o and a-comlin.o
11017 Change g-string to s-string, g-os_lib to s-os_lib
11018 Change all g-utf_32 references to s-utf_32
11019
110202007-06-06 Tristan Gingold <gingold@adacore.com>
11021 Olivier Hainque <hainque@adacore.com>
11022
11023 * init.c: Do not adjust IP of an imported VMS exception of ia64.
11024 LIB$STOP is called to raise an exception and the IP of the exception
11025 is the instruction right after the call.
11026 (__gnat_adjust_context_for_raise, AIX): Implement.
11027 (__gnat_error_handler, AIX): Accept SIGINFO related arguments and call
11028 adjust_context_for_raise before Raise_From_Signal_Hanler.
11029 (__gnat_install_handler, AIX): Add SA_SIGINFO to the sa_flags, to ensure
11030 siginfo is passed to the handler, necessary to let the zcx propagation
11031 engine unwind past it.
11032
110332007-06-06 Olivier Hainque <hainque@adacore.com>
11034
11035 * initialize.c (__gnat_initialize for vxworks): Update documentation
11036 on the ZCX support, using different sets of crtstuff objects than with
11037 GCC 3.4.
11038
110392007-06-06 Robert Dewar <dewar@adacore.com>
11040
11041 * layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package
11042 spec from body
11043 (Layout_Type): Fix recomputation of size from alignment.
11044
110452007-06-06 Ed Schonberg <schonberg@adacore.com>
11046 Javier Miranda <miranda@adacore.com>
11047
11048 * sem_ch12.adb (Analyze_Associations): Diagnose use of an others
11049 association in an instance.
11050 (Copy_Generic_Node): If the node is a string literal, no need to copy
11051 its descendants.
11052 (Is_Generic_Formal): For a formal subprogram, the declaration is the
11053 grandparent of the entity.
11054 (Analyze_Formal_Interface_Type): Transform into a full type declaration,
11055 to simplify handling of formal interfaces that derive from other formal
11056 interfaces.
11057 (Instantiate_Subprogram_Body): The defining unit name of the body of
11058 the instance should be a defining identifier.
11059 (Install_Formal_Packages): make global to the package, for use in
11060 instantiations of child units.
11061 (Analyze_Package_Instantiation): Do not attempt to set information on an
11062 enclosing master of an entry when expansion is disabled.
11063 (Instantiate_Type): If the actual is a tagged synchronized type and the
11064 generic ancestor is an interface, create a generic actual for the
11065 corresponding record.
11066 (Analyze_Formal_Derived_Interface_Type): Rewrite as a derived type
11067 declaration, to ensure that the interface list is processed correctly.
11068 (Inline_Instance_Body): If enclosing scope is an instance body, remove
11069 its entities from visibiility as well.
11070 (Pre_Analyze_Actuals): if the actual is an allocator with constraints
11071 given with a named association, analyze the expression only, not the
11072 discriminant association itself.
11073 (Reset_Entity): If the analysis of a selected component is transformed
11074 into an expanded name in the prefix of a call with parameters, do not
11075 transform the original node into an expanded name, to prevent visibility
11076 errors in the case of nested generics.
11077 (Check_Private_View): For an array type, check whether the index types
11078 may need exchanging.
11079
110802007-06-06 Arnaud Charlet <charlet@adacore.com>
11081 Vincent Celier <celier@adacore.com>
11082
11083 * lib-writ.adb: Handle Convention_CIL in addition to Convention_Java,
11084 since both are separated.
11085 Add support for imported CIL packages.
11086 Add further special handling of "value_type" for CIL.
11087 Add special handling of pragma Import for CIL.
11088
11089 * make.ads, make.adb: When switch -eS is used, direct all outputs to
11090 standard output instead of standard error, except errors.
11091 (Absolute_Path): Use untouched casing for the parent directory.
11092 (Add_Library_Search_Dir): Use the untouched directory name.
11093 (Add_Source_Search_Dir): Idem.
11094 (Change_To_Object_Directory): Update output to use proper casing.
11095 (Create_Binder_Mapping_File): Use the untouched filename to set
11096 ALI_Name.
11097 (Gnatmake): Use untouched library and executable directory names.
11098 (Insert_Project_Sources): Use untouched filename for spec and body.
11099 (Is_In_Object_Directory): Use untouched object directory.
11100 (Mark_Directory): Idem.
11101 (Collect_Arguments_And_Compile): Ensure that Full_Source_File always
11102 contains the non-canonical filename in all cases.
11103 (Change_To_Object_Directory): In verbose mode, display the name of the
11104 object directory we're changing to.
11105 (Compile_Sources): Make sure, when a project file is used, to compile
11106 the body of the unit, when there is one, even when only the spec is
11107 recorded in an ALI file.
11108 (Gcc_Switches, Binder_Switches, Linker_Switches): Tables moved from the
11109 spec to the body.
11110 (Report_Compilation_Failed): New procedure
11111 (Bind, Display_Commands, Compile_Sources, Initialize, Scan_Make_Arg):
11112 procedures moved from the spec to the body.
11113 (Extract_Failure): Removed, not used
11114 Replace explicit raises of exception Bind_Failed and Link_Failed with
11115 calls to Make_Failed with the proper message.
11116 Replace explicit raises of exception Compilation_Failed with calls to
11117 procedure Report_Compilation_Failed.
11118 (Initialize): Create mapping files unconditionally when using project
11119 files.
11120
11121 * sem_mech.adb: (Name_CIL, Name_CIL_Constructor, Convention_CIL,
11122 Pragma_CIL_Constructor): New names.
11123
11124 * targparm.ads, targparm.adb
11125 (Compiler_System_Version): Removed, no longer used.
11126 (Get_Target_Parameters): Relax checks on system.ads validity. Add
11127 handling of two new system flags: JVM and CLI.
11128
111292007-06-06 Jose Ruiz <ruiz@adacore.com>
11130 Arnaud Charlet <charlet@adacore.com>
11131
11132 * Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run
11133 time, use the default s-interr body that provides interrupt support
11134 based on signals.
11135 (LIBGNAT_TARGET_PAIRS for x86-linux): Use specialized versions of
11136 a-exetim.ad{s,b}, a-extiti.ad{s,b}, a-rttiev.ad{s,b}, s-osinte.ad{s,b},
11137 g-soccon.ads, and s-taprop.adb for the marte run time.
11138 (EXTRA_GNATRTL_TASKING_OBJS for x86-linux): Execution time clocks and
11139 timers are supported on marte.
11140 (EH_MECHANISM for marte): Do not use ZCX.
11141 (THREADSLIB for marte): Use -lmarte.
11142 Add mlib-tgt-vms.o to the list of objects for gnatmake for VMS
11143 Add mlib-tgt-specific.o to gnatmake objects
11144 mlib-tgt-<platforms>.adb is now the body of MLib.Tgt.Specific, no
11145 longer of MLib.Tgt.
11146 (LIBGNAT_TARGET_PAIRS for vxworks): When building a run time for VxWorks
11147 6, either kernel or rtp, use a specialized version of s-osinte.ads.
11148
111492007-06-06 Pascal Obry <obry@adacore.com>
11150
11151 * mkdir.c (__gnat_mkdir): Add support for UTF-8.
11152
111532007-06-06 Vincent Celier <celier@adacore.com>
11154
11155 * mlib.ads, mlib.adb (Build_Library): Do not use hard-coded directory
11156 separator, use instead the proper host directory separator.
11157 (Copy_ALI_Files): Make sure that an already existing ALI file in the
11158 ALI copy dir is writable, before doing the copy.
11159
11160 * mlib-utl.ads, mlib-utl.adb:
11161 (Gcc): If length of command line is too long, put the list of object
11162 files in a response file, if this is supported by the platform.
11163 (Ar): If invocation of the archive builder is allowed to be done in
11164 chunks and building it in one shot would go above an OS dependent
11165 limit on the number of characters on the command line, build the archive
11166 in chunks.
11167
111682007-06-06 Vincent Celier <celier@adacore.com>
11169
11170 * osinte-c.ads, osint-c.adb (Set_Library_Info_Name): Fail if base name
11171 of specified object file is not equal to base name of source.
11172
111732007-06-06 Javier Miranda <miranda@adacore.com>
11174 Hristian Kirtchev <kirtchev@adacore.com>
11175 Ed Schonberg <schonberg@adacore.com>
11176
11177 * sem_ch3.adb (Process_Full_View): Propagate the CPP_Class attribute to
11178 the full type declaration.
11179 (Analyze_Component_Declaration): Add local variable E to capture the
11180 initialization expression of the declaration. Replace the occurences of
11181 Expression (N) with E.
11182 (OK_For_Limited_Init_In_05): Allow initialization of class-wide
11183 limited interface object with a function call.
11184 (Array_Type_Declaration): If the declaration lacks subtype marks for
11185 indices, create a simple index list to prevent cascaded errors.
11186 (Is_Null_Extension): Ignore internal components created for secondary
11187 tags when checking whether a record extension is a null extension.
11188 (Check_Abstract_Interfaces): Add missing support for interface subtypes
11189 and generic formals.
11190 (Derived_Type_Declaration): Add missing support for interface subtypes
11191 and generic formals.
11192 (Analyze_Object_Declaration): If an initialization expression is
11193 present, traverse its subtree and mark all allocators as static
11194 coextensions.
11195 (Add_Interface_Tag_Component): When looking for components that may be
11196 secondary tags, ignore pragmas that can appear within a record
11197 declaration.
11198 (Check_Abstract_Overriding): an inherited function that dispatches on
11199 result does not need to be overriden if the controlling type is a null
11200 extension.
11201 (Mentions_T): Handle properly a 'class attribute in an anonymous access
11202 component declaration, when the prefix is an expanded name.
11203 (Inherit_Component): If the derivation is for a private extension,
11204 inherited components remain visible and their ekind should not be set
11205 to Void.
11206 (Find_Type_Of_Object): In the case of an access definition, always set
11207 Is_Local_Anonymous_Access. We were previously not marking the anonymous
11208 access type of a return object as a local anonymous type.
11209 (Make_Index): Use Ambiguous_Character to report ambiguity on a discrete
11210 range with character literal bounds.
11211 (Constrain_Array): Initialize the Packed_Array_Type field to Empty.
11212 (Access_Subprogram_Declaration): Indicate that the type declaration
11213 depends on an incomplete type only if the incomplete type is declared
11214 in an open scope.
11215 (Analyze_Subtype_Declaration): Handle properly subtypes of
11216 synchronized types that are tagged, and that may appear as generic
11217 actuals.
11218 (Access_Subprogram_Declaration): An anonymous access to subprogram can
11219 appear as an access discriminant in a private type declaration.
11220 (Add_Interface_Tag_Components): Complete decoration of the component
11221 containing the tag of a secondary dispatch table and the component
11222 containing the offset to the base of the object (this latter component
11223 is only generated when the parent type has discriminants --as documented
11224 in this routine).
11225 (Inherit_Components): Use the new decoration of the tag components to
11226 improve the condition that avoids inheriting the components associated
11227 with secondary tags of the parent.
11228 (Build_Discriminanted_Subtype): Indicate to the backend that the
11229 size of record types associated with dispatch tables is known at
11230 compile time.
11231 (Analyze_Subtype_Declaration): Propagate Is_Interface flag when needed.
11232 (Analyze_Interface_Declaration): Change setting of Is_Limited_Interface
11233 to include task, protected, and synchronized interfaces as limited
11234 interfaces.
11235 (Process_Discriminants): Remove the setting of
11236 Is_Local_Anonymous_Access on the type of (anonymous) access
11237 discriminants of nonlimited types.
11238 (Analyze_Interface_Type_Declaration): Complete the decoration of the
11239 class-wide entity it is is already present. This situation occurs if
11240 the limited-view has been previously built.
11241 (Enumeration_Type_Declaration): Initialize properly the Enum_Pos_To_Rep
11242 field.
11243 (Add_Interface_Tag_Components.Add_Tag): Set the value of the attribute
11244 Related_Interface.
11245
112462007-06-06 Ed Schonberg <schonberg@adacore.com>
11247
11248 * sem_aggr.adb (Resolve_Record_Aggregate): Ignore internal components
11249 of the type that specify the position of interface tags when the type
11250 inherits discriminated array components from the parent type.
11251 If a component is initialized with a box, check for the presence of a
11252 default expression in its declaration before using its default
11253 initialization procedure.
11254 (Resolve_Record_Aggregate): If a component is box-initialized, and the
11255 component type has a discriminants, create a partial aggregate for it
11256 by copying the discriminants of the component subtype.
11257 Reject attempt to initialize a discriminant with a box.
11258 (Array_Aggr_Subtype): Indicate to the backend that the size of arrays
11259 associated with dispatch tables is known at compile time.
11260 (Get_Value): If an association in a record aggregate has a box
11261 association, and the corresponding record component has a default
11262 expression, always copy the default expression, even when the
11263 association has a single choice, in order to create a proper
11264 association for the expanded aggregate.
11265
112662007-06-06 Ed Schonberg <schonberg@adacore.com>
11267 Robert Dewar <dewar@adacore.com>
11268
11269 * par-ch12.adb (P_Generic_Associations): The source position of an
11270 Others association is that of the others keyword, not that of the token
11271 that follows the box.
11272 (P_Formal_Type_Definition): Handle formal access types that carry a
11273 not null indicator.
11274
11275 * par-ch3.adb (P_Known_Discriminant_Part_Opt, P_Component_Items): If
11276 multiple identifier are present, save Scan_State before scanning the
11277 colon, to ensure that separate trees are constructed for each
11278 declaration.
11279 (P_Identifier_Declarations): For object declaration, set new flag
11280 Has_Init_Expression if initialization expression present.
11281 (P_Null_Exclusion): Properly diagnose NOT NULL coming before NULL
11282 Improve NOT NULL error messages
11283
112842007-06-06 Robert Dewar <dewar@adacore.com>
11285
11286 * par-ch4.adb: (P_Name): Recover from literal used as name
11287
112882007-06-06 Vincent Celier <celier@adacore.com>
11289
11290 * prep.ads, prep.adb (Expression): New Boolean parameter Complemented,
11291 defaulted to False.
11292 In the "not" case, recursive call with Complemented set to True.
11293 Do not allow "or" or "and" operators when Complemented is True.
11294
112952007-06-06 Vincent Celier <celier@adacore.com>
11296
11297 * prj.adb (Project_Empty): Gives default value for new component
11298 Libgnarl_Needed
11299
11300 * prj-attr.ads: Minor reformatting
11301
11302 * prj-env.ads, prj-env.adb (For_All_Object_Dirs): Register object
11303 directory using the untouched casing.
11304 (For_All_Source_Dirs): Idem.
11305
11306 * prj-ext.ads, prj-ext.adb (Search_Directories): New table to record
11307 directories specified with switches -aP.
11308 (Add_Search_Project_Directory): New procedure
11309 (Initialize_Project_Path): Put the directories in table
11310 Search_Directories in the project search path.
11311 (Initialize_Project_Path): For VMS, transform into canonical form the
11312 project path.
11313
113142007-06-06 Arnaud Charlet <charlet@adacore.com>
11315
11316 * restrict.ads, restrict.adb (No_Exception_Handlers_Set): Only return
11317 true if configurable run-time or No_Run_Time is set.
11318 (Set_Restriction): Avoid setting restriction No_Elaboration_Code when
11319 processing an unit which is not the one being compiled.
11320
113212007-06-06 Arnaud Charlet <charlet@adacore.com>
11322
11323 * s-arit64.adb: Replace System.Pure_Exceptions by Ada 05 syntax.
11324 Replace UC by Ada.UC
11325
11326 * s-bitops.adb: Get rid of System.Pure_Exceptions.
11327 Replace UC by Ada.UC
11328
113292007-06-06 Robert Dewar <dewar@adacore.com>
11330
11331 * scng.adb: (Check_End_Of_Line): Deal with very long lines
11332
113332007-06-06 Robert Dewar <dewar@adacore.com>
11334
11335 * sem.ads, sem.adb (Semantics): Save and restore Global_Discard_Names
11336 Remove no longer used nodes.
11337
113382007-06-06 Javier Miranda <miranda@adacore.com>
11339 Ed Schonberg <schonberg@adacore.com>
11340 Robert Dewar <dewar@adacore.com>
11341
11342 * sem_ch10.ads, sem_ch10.adb (Analyze_Compilation_Unit): Disable check
11343 on obsolescent withed unit in case of limited-withed units.
11344 (Analyze_Compilation_Unit): Add guard to code that removed an
11345 instantiation from visibility, to prevent compiler aborts when
11346 instantiation is abandoned early on.
11347 (Install_Limited_Withed_Unit): Recognize a limited-with clause on the
11348 current unit being analyzed, and Distinguish local incomplete types
11349 from limited views of types declared elsewhere.
11350 (Build_Limited_Views.Decorate_Tagged_Type): Add documentation
11351 to state that the class-wide entity is shared by the limited-view
11352 and the full-view.
11353 (Analyze_With_Clause): Improve placement of flag for case of
11354 unimplemented unit.
11355 (Analyze_With_Clause): Recognize use of GNAT.Exception_Traces in a
11356 manner similar to GNAT.Current_Exception. This is a violation of
11357 restriction (No_Exception_Propagation), and also inhibits the
11358 optimization of local raise to goto.
11359 (Analyze_With_Clause): Check for Most_Recent_Exception being with'ed,
11360 and if so set Most_Recent_Exception_Used flag in Opt, and also check
11361 for violation of restriction No_Exception_Propagation.
11362
113632007-06-06 Javier Miranda <miranda@adacore.com>
11364 Hristian Kirtchev <kirtchev@adacore.com>
11365 Gary Dismukes <dismukes@adacore.com>
11366
11367 * sem_ch11.adb (Analyze_Exception_Handlers): Add barrier to avoid the
11368 use of entity Exception_Occurrence if it is not available in the
11369 target run-time.
11370
11371 * sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): When
11372 concurrent types are declared within an Ada 2005 generic, build their
11373 corresponding record types since they are needed for overriding-related
11374 semantic checks.
11375 (Analyze_Protected_Type): Rearrange and simplify code for testing that a
11376 protected type does not implement a task interface or a nonlimited
11377 interface.
11378 (Analyze_Task_Type): Rearrange and simplify code for testing that a task
11379 type does not implement a protected interface or a nonlimited interface.
11380 (Single_Task_Declaration, Single_Protected_Declaration): use original
11381 entity for variable declaration, to ensure that debugging information
11382 is correcty generated.
11383 (Analyze_Protected_Type, Analyze_Task_Type): Do not call expander
11384 routines if the expander is not active.
11385 (Analyze_Task_Body): Mark all handlers to stop optimization of local
11386 raise, since special things happen for task exception handlers.
11387
11388 * sem_disp.adb (Check_Controlling_Formals): Add type retrieval for
11389 concurrent types declared within a generic.
11390 (Check_Dispatching_Operation): Do not emit warning about late interface
11391 operations in the context of an instance.
11392 (Check_Dispatching_Call): Remove restriction against calling a
11393 dispatching operation with a limited controlling result.
11394 (Check_Dispatching_Operation): Replace calls to Fill_DT_Entry and
11395 Register_Interface_DT_Entry by calls to Register_Primitive.
11396 (Check_Dispatching_Formals): Handle properly a function with a
11397 controlling access result.
11398
113992007-06-06 Robert Dewar <dewar@adacore.com>
11400 Arnaud Charlet <charlet@adacore.com>
11401
11402 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Stream_Size):
11403 Check for restriction No_Implementation_Attributes if in Ada 95 mode.
11404 (Storage_Pool): Do not crash when RE_Stack_Bounded_Pool is not available
11405 (Analyze_Attribute_Definition_Clause [External_Tag]): Generate error
11406 message when using a VM, since this attribute is not supported.
11407 (Analyze_Record_Representation_Clause): Give unrepped component warnings
11408
11409 * usage.adb: Add new warning for renaming of function return objects
11410 Indicate that -gnatwp and -gnatwP concern front-end inlining
11411 Add line for -gnatyg
11412 Add usage information for -gnatw.c/C
11413
114142007-06-06 Robert Dewar <dewar@adacore.com>
11415 Ed Schonberg <schonberg@adacore.com>
11416
11417 * sem_ch5.adb
11418 (Find_Var): Do not consider function call in test for infinite loop
11419 warning if warnings set off for function entity.
11420 (One_Bound): Do not create a temporary for a loop bound if it is a
11421 character literal.
11422 (Analyze_Assignment): Traverse the right hand side of an assignment and
11423 mark all allocators as static coextensions.
11424 (Analyze_Assignment): Exempt assignments involving a dispatching call
11425 to a function with a controlling access result from the check requiring
11426 the target to be class-wide.
11427
114282007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
11429 Ed Schonberg <schonberg@adacore.com>
11430 Robert Dewar <dewar@adacore.com>
11431 Javier Miranda <miranda@adacore.com>
11432
11433 * sem_res.ads, sem_res.adb (Process_Allocator): Do not propagate the
11434 chain of coextensions when an allocator serves as the root of such a
11435 chain.
11436 (Propagate_Coextensions): Remove the test for the root being an
11437 allocator.
11438 (Resolve_Allocator): Add condition to ensure that all future decoration
11439 occurs on an allocator node. Add processing and cleanup for static
11440 coextensions.
11441 (Valid_Conversion): If the operand type is the limited view of a
11442 class-wide type, use the non-limited view is available to determine
11443 legality of operation.
11444 (Ambiguous_Character): move to spec, for use elsewhere.
11445 (Ambiguous_Character): Handle Wide_Wide_Character in Ada 2005 mode
11446 (Resolve_Range): Diagnose properly an ambiguous range whose bounds are
11447 character literals.
11448 (Resolve_Arithmetic_Op): Call Activate_Division_Check instead of setting
11449 Do_Division_Check flag explicitly.
11450 (Resolve_Actuals): If the actual is of a synchronized type, and the
11451 formal is of the corresponding record type, this is a call to a
11452 primitive operation of the type, that is declared outside of the type;
11453 the actual must be unchecked-converted to the type of the actual
11454 (Resolve_Call): Kill all current values for any subprogram call if
11455 flag Suppress_Value_Tracking_On_Call is set.
11456 (Resolve_Type_Conversion): Generate error message the the operand
11457 or target of interface conversions come from a limited view.
11458 (Check_Infinite_Recursion): Ignore generated calls
11459 (Check_Allocator_Discrim_Accessibility): New procedure for checking
11460 that an expression that constrains an access discriminant in an
11461 allocator does not denote an object with a deeper level than the
11462 allocator's access type.
11463 (Resolve_Allocator): In the case of an allocator initialized by an
11464 aggregate of a discriminated type, check that associations for any
11465 access discriminants satisfy accessibility requirements by calling
11466 Check_Allocator_Discrim_Accessibility.
11467 (Resolve_Equality_Op): Handle comparisons of anonymous access to
11468 subprogram types in the same fashion as other anonymous access types.
11469 (Resolve_Concatenation_Arg): Remove initial character '\' in an error
11470 message that is not a continuation message.
11471 (Resolve_Type_Conversion): Add missing support for conversion to
11472 interface type.
11473 (Resolve_Actuals): Introduce a transient scope around the call if an
11474 actual is a call to a function returning a limited type, because the
11475 resulting value must be finalized after the call.
11476 (Resolve_Actuals): If the call was given in prefix notations, check
11477 whether an implicit 'Access reference or implicit dereference must be
11478 added to make the actual conform to the controlling formal.
11479
114802007-06-06 Robert Dewar <dewar@adacore.com>
11481 Javier Miranda <miranda@adacore.com>
11482
11483 * sem_ch7.adb (Check_Anonymous_Access_Types): Fix error for null body
11484 (Derive_Inherited_Private_Subprogram): Code cleanup. In case of explicit
11485 overriding of an inherited private subprogram now there is no need to
11486 inherit its dispatching slot and reduce the size of the dispatch table.
11487 Set_All_DT_Position now ensures that the same slot is now assigned to
11488 both entities. This is required to statically build the dispatch table.
11489 (Declare_Inherited_Private_Subprograms): Rewriten to avoid the need
11490 of calling Set_All_DT_Position to re-evaluate the position of the
11491 entries in the dispatch table. Such reevaluation is not desired if
11492 the tagged type is already frozen.
11493
114942007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
11495 Gary Dismukes <dismukes@adacore.com>
11496 Robert Dewar <dewar@adacore.com>
11497 Javier Miranda <miranda@adacore.com>
11498
11499 * sem_util.ads, sem_util.adb (May_Be_Lvalue): A prefix of an attribute
11500 reference acts as an lvalue when the attribute name modifies the prefix
11501 (Is_Coextension_Root): New routine.
11502 (Mark_Static_Coextensions): New routine.
11503 (Type_Access_Level): Revise code for checking the level of the
11504 anonymous access type of a return object.
11505 (Safe_To_Capture_Value): Not safe to capture if Address_Taken
11506 (Matches_Prefixed_View_Profile): Remove the no longer necessary
11507 retrieval of the corresponding controlling record type.
11508 (Find_Overridden_Synchronized_Primitive): Code cleanup. Add handling of
11509 concurrent types declared within a generic as well as class wide types.
11510 Emit a mode incompatibility error whenever a protected entry or routine
11511 override an interface routine whose first parameter is not of mode
11512 "out", "in out" or access to variable.
11513 (Overrides_Synchronized_Primitive): Rename to
11514 Find_Overridden_Synchronized_Primitive.
11515 (Collect_Interface_Components): New subprogram that collects all the
11516 components of a tagged record containing tags of secondary dispatch
11517 tables.
11518 (Add_Global_Declaration): New procedure
11519 (Abstract_Interface_List): Handle properly the case of a subtype of a
11520 private extension.
11521 (Type_Access_Level): In the case of a type whose parent scope is a
11522 return statement, call Type_Access_Level recursively on the enclosing
11523 function's result type to determine the level of the return object's
11524 type.
11525 (Build_Elaboration_Entity): Build name of elaboration entity from the
11526 scope chain of the entity, rather than the unit name of the file name.
11527 (Check_Nested_Access): New procedure.
11528 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
11529 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
11530 (Get_Renamed_Entity): Utility routine for performing common operation
11531 of chasing the Renamed_Entity field of an entity.
11532
115332007-06-06 Robert Dewar <dewar@adacore.com>
11534
11535 * sem_elab.adb (Check_A_Call): Specialize elaboration warnings on
11536 elaboration model
11537 (Check_A_Call): Add check for entry call which was causing blowup
11538
115392007-06-06 Olivier Hainque <hainque@adacore.com>
11540
11541 * raise-gcc.c (__gnat_eh_personality): Tweak the signature and add
11542 special code on ia64-vms to handle major incompatibilities between the
11543 GCC unwinding ABI and the VMS Condition Handling Facility, both calling
11544 this routine with a very different set of arguments and expectations on
11545 the return value.
11546
115472007-06-06 Thomas Quinot <quinot@adacore.com>
11548
11549 * socket.c (__gnat_close_signalling_fd): New function.
11550 (__gnat_safe_gethostbyaddr, __gnat_safe_gethostbyname,
11551 __gnat_safe_getservbyname, __gnat_safe_getservbyport):
11552 New supporting functions for task safe Netdb operations.
11553
115542007-06-06 Thomas Quinot <quinot@adacore.com>
11555 Olivier Hainque <hainque@adacore.com>
11556
11557 * a-except-2005.ads, a-except-2005.adb
11558 (Raise_From_Controlled_Operation): New procedure in
11559 (private part of) Ada.Exceptions (standard runtime version). Used to
11560 provide informational exception message when Program_Error is raised as
11561 a result of an Adjust or Finalize operation propagating an exception.
11562 (Rmsg_28): Fix description for E.4(18) check.
11563 (Raise_Current_Excep): Call Debug_Raise_Exception just before
11564 propagation starts, to let debuggers know about the event in a reliable
11565 fashion.
11566 Take the address of E and dereference to make sure it is homed on stack
11567 and prevent the stores from being deleted, necessary for proper
11568 debugger behavior on "break exception" hits.
11569 (Local_Raise): Moved to System.Exceptions
11570
11571 * s-finimp.adb (Raise_From_Finalize): Code to construct an appropriate
11572 exception message from the current occurrence and raise Program_Error
11573 has been moved to Ada.Exceptions.Raise_From_Controlled_Operation.
11574
115752007-06-06 Jose Ruiz <ruiz@adacore.com>
11576 Arnaud Charlet <charlet@adacore.com>
11577
11578 * s-taprob.adb (Unlock): Change the ceiling priority of the underlying
11579 lock, if needed.
11580
11581 * s-taprop.ads (Set_Ceiling): Add this procedure to change the ceiling
11582 priority associated to a lock.
11583
11584 * s-tpoben.adb ([Vulnerable_]Complete_Task, Lock_Entries): Relax
11585 assertion to take into account case of no abort restriction.
11586 (Initialize_Protection_Entries): Add initialization for the field
11587 New_Ceiling associated to the protected object.
11588 (Unlock_Entries): Change the ceiling priority of the underlying lock, if
11589 needed.
11590
11591 * s-solita.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
11592 since this function needs to be set consistently with Update_Exception.
11593
11594 * s-tarest.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
11595 since this function needs to be set consistently with Update_Exception.
11596
11597 * s-taskin.ads: Update comments on
11598 Interrupt_Server_Blocked_On_Event_Flag.
11599 (Unbind_Handler): Fix handling of server_task wakeup
11600 (Server_Task): Set self's state so that Unbind_Handler can take
11601 appropriate actions.
11602 (Common_ATCB): Now use a constant from System.Parameters to determine
11603 the max size of the Task_Image field.
11604
11605 * s-tassta.adb (Task_Wrapper): Now pass the overflow guard to the
11606 Initialize_Analyzer function.
11607 ([Vulnerable_]Complete_Task, Lock_Entries): Relax assertion to
11608 take into account case of no abort restriction.
11609 ([Vulnerable_]Complete_Master): Modify assertion.
11610
11611 * s-tataat.adb (Finalize): Use the nestable versions of
11612 Defer/Undefer_Abort.
11613
11614 * s-tpobop.adb (Protected_Entry_Call): Relax assertion.
11615
11616 * s-tpobop.ads: Update comments.
11617
11618 * s-tposen.adb (Protected_Single_Entry_Call): Call Lock_Entry instead
11619 of locking the object manually, to avoid inconsistencies between
11620 Lock/Unlock_Entry assertions.
11621
11622 * s-interr.ads, s-interr.adb (Server_Task): Fix race condition when
11623 terminating
11624 application and System.Parameters.No_Abort is True.
11625 Update comments on Interrupt_Server_Blocked_On_Event_Flag.
11626 (Unbind_Handler): Fix handling of server_task wakeup
11627 (Server_Task): Set self's state so that Unbind_Handler can take
11628 appropriate actions.
11629
116302007-06-06 Thomas Quinot <quinot@adacore.com>
11631
11632 * s-finroo.ads, s-finroo.adb (Read, Write): Use null procedure
11633 declarations instead of an explicit null body, for conciseness.
11634
116352007-06-06 Robert Dewar <dewar@adacore.com>
11636
11637 * sem_eval.adb (Eval_Relational_Op): nothing to do if an operand is an
11638 illegal aggregate and the type is still Any_Composite.
11639 (Subtypes_Statically_Match): Fix problem of empty discriminant list
11640
116412007-06-06 Ed Schonberg <schonberg@adacore.com>
11642
11643 * sem_smem.adb (Check_Shared_Var): Check explicitly for as task object,
11644 to prevent subsequent expansion.
11645
116462007-06-06 Robert Dewar <dewar@adacore.com>
11647
11648 * sinput-l.ads, sinput-l.adb: implement a new pragma No_Body
11649
116502007-06-06 Ed Schonberg <schonberg@adacore.com>
11651 Robert Dewar <dewar@adacore.com>
11652
11653 * sprint.ads, sprint.adb (Sprint_Node_Actual): Output aggregate for
11654 exceptions.
11655 (Write_Itype): Handle case of string literal subtype, which
11656 comes up in this context.
11657 (Update_Itype): when debugging expanded code, update sloc of itypes
11658 associated with defining_identifiers and ranges, for gdb use.
11659 (Sprint_Node_Actual): Add static keyword to object or exception
11660 declaration output if Is_Statically_Allocated is True.
11661 (Sprint_End_Label): Set entity of end marker for a subprogram, package,
11662 or task body, so that the tree carries the proper Sloc information for
11663 debugging use.
11664 (Write_Indent): In Dump_Source_Text mode, ignore implicit label nodes
11665
116662007-06-06 Arnaud Charlet <charlet@adacore.com>
11667
11668 * s-secsta.adb (Chunk): Ensure this object has a static size known at
11669 compile time, to avoid dynamic memory allocation
11670 (Elaboration code): Only use dynamic memory allocation when needed.
11671
116722007-06-06 Quentin Ochem <ochem@adacore.com>
11673
11674 * s-stausa.ads, s-stausa.adb (Initialize_Analyzer): Added parameter
11675 "Overflow_Guard".
11676 (Stack_Analyzer): Added field "Overflow_Guard"
11677 (Task_Result): Added field "Overflow_Guard".
11678 (Index_Str): New constant.
11679 (Task_Name_Str): New constant.
11680 (Actual_Size_Str): New constant.
11681 (Pattern_Array_Element_Size): New constant.
11682 (Get_Usage_Range): New subprogram.
11683 (Output_Result): Added parameter Max_Size_Len and Max_Actual_Use_Len.
11684 Now align the output.
11685 Added comments.
11686 (Initialize): Added value for Overflow_Guard.
11687 (Fill_Stack): Use constant Pattern_Array_Elem_Size when relevant.
11688 Update the value of the overflow guard according to the actual
11689 beginning of the pattern array.
11690 (Initialize_Analyzer): Added parameter Overflow_Guard.
11691 Take this parameter into accound when computing the max size.
11692 (Compute_Result): Use constant Pattern_Array_Elem_Size when relevant.
11693 (Report_Result): Removed extra useless procedure.
11694 Updated call to Output_Result.
11695 Moved full computation of the Task_Result here.
11696
116972007-06-06 Thomas Quinot <quinot@adacore.com>
11698
11699 * g-soccon-darwin.ads, gen-soccon.c: Add new constant
11700 Thread_Blocking_IO, always True by default, set False on a per-runtime
11701 basis.
11702 Add Windows-specific constants
11703 Add new constant Need_Netdb_Buffer.
11704 Add new macros to indicate whether getXXXbyYYY is thread safe and, if
11705 not, whether to use getXXXbyYYY_r.
11706
11707 * gsocket.h: Add new constant Need_Netdb_Buffer.
11708 Add new macros to indicate whether getXXXbyYYY is thread safe and, if
11709 not, whether to use getXXXbyYYY_r.
11710
117112007-06-06 Eric Botcazou <ebotcazou@adacore.com>
11712
11713 * s-stoele.ads, s-stoele.adb: Move inline_always subprograms earlier
11714 than their first call.
11715 Add type Dummy_Communication_Block used in the generation of the pre-
11716 defined dispatching primitive _disp_asynchronous_select.
11717 (Storage_Element): Put Pragma Universal_Aliasing on it.
11718
117192007-06-06 Vincent Celier <celier@adacore.com>
11720
11721 * a-dirval-vms.adb, a-dirval.ads, a-dirval.adb (Windows): New Boolean
11722 function.
11723
11724 * a-dirval-mingw.adb (Is_Valid_Path_Name): Forbid a path with a drive
11725 letter if it is not followed by a '/' or a '\'.
11726 (Windows): New Boolean function
11727
11728 * a-direct.ads, a-direct.adb: Remove unnecessary and misplaced pragma
11729 Ada 2005.
11730 (Containing_Directory): On Windows, keep at least one '/' or '\' after a
11731 drive letter.
11732 (Containing_Directory): Raise Use_Error when the directory is a root
11733 directory.
11734 (Extension): When returning the result, use a conversion to Result_Type,
11735 not a qualification.
11736
117372007-06-06 Robert Dewar <dewar@adacore.com>
11738
11739 * stylesw.ads, stylesw.adb (Set_GNAT_Style_Check): New procedure
11740 (Set_Style_Check_Options): Recognize new -gnatyg style switch
11741
11742 * switch-c.adb (Scan_Front_End_Switches, case -gnatg): Set
11743 Warn_On_Non_Local_Exception to False, to turn off warnings for
11744 No_Exception_Propagation in ZFP runtime.
11745 (Scan_Front_End_Switches): Fix handling of --RTS switch for non GCC
11746 back-ends.
11747 (Scan_Front_End_Switches): For 'g', call Set_GNAT_Style_Checks
11748
117492007-06-06 Vincent Celier <celier@adacore.com>
11750
11751 * switch-b.adb (Scan_Binder_Switches): Add processing for new
11752 switches -R and -Z
11753
11754 * switch-m.adb (Normalize_Compiler_Switches): Do not record switch -E
11755 (Scan_Make_Switches): Recognize new switch -aP
11756
117572007-06-06 Matthew Gingell <gingell@adacore.com>
11758 Jose Ruiz <ruiz@adacore.com>
11759
11760 * s-stchop-vxworks.adb (Set_Stack_Info): Instead of trying to map the
11761 VxWorks task descriptor in the Ada run time, call a C subprogram
11762 (__gnat_get_stack_info) that extracts the required information.
11763
11764 * sysdep.c: Back out temporary lynxos workaround.
11765 (__gnat_get_stack_info): Add this procedure that passes to the Ada run
11766 time the stack information associated to the currently executing task.
11767 Only VxWorks systems require this function.
11768
117692007-06-06 Eric Botcazou <ebotcazou@adacore.com>
11770
11771 * tracebak.c (FRAME_OFFSET): Add parameter FP. On SPARC/Solaris, do not
11772 add the stack bias if the offset is computed from a frame address.
11773 (__gnat_backtrace): Adjust for above change.
11774
117752007-06-06 Thomas Quinot <quinot@adacore.com>
11776
11777 * types.h, types.ads: Rename PE_Illegal_CW_Actual_E_4_18 to
11778 PE_Non_Transportable_Actual.
11779 (By_Descriptor_Last): New constant.
11780 (By_Copy_Return): Likewise.
11781
117822007-06-06 Vincent Celier <celier@adacore.com>
11783
11784 * vms_conv.adb (Process_Argument): Keep arguments starting with '+' as
11785 is.
11786
11787 * vms_data.ads: Add entries for -gnatw.x and -gnatw.X
11788 /STYLE_CHECKS=GNAT: Change meaning to -gnatyg
11789 /GNAT_INTERNAL: New compiler qualifier corresponding to -gnatg
11790 Add missing comment for /OPTIMIZE=SPACE
11791 Add entry for OPTIMIZE=SPACE
11792 Add new qualifier /ALL_PROJECTS (= -U) for GNAT LIST
11793 Add documentation for new qualifiers corresponding to -gnatw.c/.C
11794
117952007-06-06 Vincent Celier <celier@adacore.com>
11796 Robert Dewar <dewar@adacore.com>
11797
11798 * xgnatugn.adb: Allow dots to be used in ug_words (-gnatw.c and
11799 -gnatw.C)
11800
11801 * gnat_ugn.texi: Fix ordering of -g switch for gnatmake
11802 Document gnatbind switch -a
11803 (case Constructions): Document that variables declarations are allowed
11804 for previously declared variables.
11805 Fix external lib project example
11806 -gnatg: Indicate new VMS qualifier /GNAT_INTERNAL
11807 Indicate that "#if not X or Y then" is not allowed in input files to
11808 gnatprep.
11809 Document gnatw.x and gnatw.X warning flags
11810 Mention -Winline switch to activate warnings when back-end inlining is
11811 ineffective.
11812 Add gnatcheck rule descriptions
11813 Describe how to use the GNAT driver to call a tool on a closure.
11814 Describe how to run project-wide checks or metrics.
11815 Document gnatbind's -R option
11816 Updated to account for Ada 2005 support
11817
11818 * gnat_rm.texi (Case Construction): Allow variable declarations for
11819 previously declared variables.
11820 (Representation Clauses and Pragmas): Lift restriction on alignment
11821 clauses for record types.
11822 (Ada.Characters.*): Fix typo in reference to A.3.3(27).
11823 Document No_Exception_Propagation restriction
11824 Document No_Body pragma
11825 Updated to account for Ada 2005 support; corrected some typos
11826 (Implementation Defined Pragmas): Document pragma Universal_Aliasing.
11827
11828 * gnat-style.texi: Make it clear that we never use mode IN for
11829 procedures or functions
11830
11831 * ug_words: Add entries for -gnatw.x and -gnatw.X
11832 Add entries for -gnatw.c/.C
11833
118342007-06-06 Pascal Obry <obry@adacore.com>
11835 Vincent Celier <celier@adacore.com>
11836
11837 * makegpr.adb (Add_Archive_Path): Use untouched object and library
11838 dirs and library name.
11839 (Build_Global_Archive): Idem. Minor code clean-up. Removes duplicate
11840 comments.
11841 (Build_Library): Idem.
11842 (Compile_Individual_Sources): Idem.
11843 (Compile_Link_With_Gnatmake): Idem.
11844 (Compile_Sources): Idem.
11845 (Get_Imported_Directories): Idem.
11846 (Link_Executables): Idem. Same change for the executable dir.
11847 (Check_Compilation_Needed): C_Source_Path new variable containing
11848 the canonical form of Source_Path to check against the source names
11849 in the dependency file.
11850 (Build_Global_Archive, Compile_Individual_Sources, Compile_Sources): In
11851 verbose mode, display the name of the object directory we're changing
11852 to.
11853 (Saved_Switches): New name of table X_Switches
11854 (Scan_Arg): Recognize new switch -aP and save in table Saved_Switches
11855 (Usage): New line for switch -aP
11856 (Get_Imported_Directories.Add): Make sure that Add_Arg is True before
11857 testing if a directory should be added to the search path.
11858
118592007-06-06 Javier Miranda <miranda@adacore.com>
11860
11861 * a-cidlli.ads, a-cdlili.ads, a-cohama.ads, a-coinve.ads,
11862 a-convec.ads (Empty_Vector, Empty_Map, Empty_List): Move this object
11863 declaration after freezing point of all its associated tagged types;
11864 otherwise such types are frozen too early.
11865
118662007-06-06 Robert Dewar <dewar@adacore.com>
11867
11868 * a-reatim.adb: Documentation addition
11869
11870 * g-cgideb.adb: Minor code reorganization
11871
11872 * tree_io.adb, treepr.adb, cstand.adb, krunch.adb, par.adb,
11873 mdll-utl.adb, par-ch5.adb, par-tchk.adb, s-exctab.ads, s-memory.ads,
11874 s-osprim.ads, s-restri.ads, s-soflin.ads: Minor reformatting.
11875
11876 * debug.ads, debug.adb (Get_Debug_Flag_K): Remove unused obsolete
11877 function. Change name New_Scope to Push_Scope
11878 (Get_Debug_Flag_K): Remove unused obsolete function.
11879
11880 * exp_ch8.adb, inline.adb, sem_ch8.ads: Change name New_Scope to
11881 Push_Scope.
11882
11883 * makeusg.adb: Update Copyright notice
11884 Add line for switch -aP
11885
11886 * makeusg.adb: Fix wording of some usage messages
11887
11888 * s-assert.adb (Raise_Assert_Failure): Add call to
11889 Debug_Raise_Assert_Failure.
11890
11891 * s-unstyp.ads (type Packed_Bytes2): Change alignment to use 'Min
11892 (2, Standard'Alignment) for compatibility with AAMP (where alignment
11893 is restricted to 1).
11894
11895 * s-wchjis.adb: Remove use of System.Pure_Exceptions
11896
11897 * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): Set the
11898 node location to No_Location when we're not debugging the expanded
11899 code.
11900
dbc30a96
AO
119012007-05-22 Alexandre Oliva <aoliva@redhat.com>
11902
11903 * misc.c (enumerate_modes): Consider log2_b to always be one.
11904
ca5ba2a3
RAE
119052007-05-14 Rafael Avila de Espindola <espindola@google.com>
11906
11907 * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
11908
d7598e11
PO
119092007-05-02 Pascal Obry <obry@adacore.com>
11910
11911 * gnatchop.adb (Write_Source_Reference_Pragma): Change implementation
11912 to use Stream_IO.File_Type. This is needed to make use of the UTF-8
11913 encoding support of Stream_IO.
11914 (Write_Unit): Idem.
11915
11916 * adaint.h, adaint.c (__gnat_os_filename): New routine. Returns the
11917 filename and corresponding encoding to match the OS requirement.
11918 (__gnat_file_exists): Do not call __gnat_stat() on Windows as this
11919 routine will fail on specific devices like CON: AUX: ...
11920
11921 PR ada/29856: Add missing braces
11922
1be52f61
AP
119232007-04-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
11924
11925 PR ada/31660
11926 * ada-tree.h (lang_tree_node): Fix typo in chain_next.
11927
395a40e0
JH
119282007-04-21 Jan Hubicka <jh@suse.cz>
11929
11930 * misc.c (gnat_expand_body): Don't call target for destructors,
11931 avoid redundant check on syntax errors.
11932
3d95caa4
AP
119332007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
11934
11935 * ada-tree.h (lang_tree_node): Use GENERIC_NEXT
11936 instead of checking GIMPLE_STMT_P in chain_next.
11937
ea30850a
AK
119382007-04-17 Andreas Krebbel <krebbel1@de.ibm.com>
11939
11940 PR ada/31576
11941 * system-linux-alpha.ads: Disable constant condition warning for the
11942 Default_Bit_Order variable.
11943 * system-linux-s390.ads: Likewise.
11944 * system-linux-s390x.ads: Likewise.
11945 * system-linux-sparc.ads: Likewise.
11946
4b437c6b
AC
119472007-04-06 Javier Miranda <miranda@adacore.com>
11948 Matt Heaney <heaney@adacore.com>
11949 Robert Dewar <dewar@adacore.com>
11950
11951 a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
11952 a-cgarso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads, a-chtgke.ads,
11953 a-chtgke.ads, a-coprnu.ads, a-contai.ads, a-chtgke.ads, a-chtgke.adb,
11954 a-stwiha.ads, a-strhas.ads, a-lfztio.ads, a-liztio.ads, a-llfzti.ads,
11955 a-llizti.ads, a-sfztio.ads, a-siztio.ads, a-ssizti.ads, a-stzfix.ads,
11956 a-stzhas.ads, a-szuzha.ads, a-tiunio.ads, a-wwunio.ads, a-ztcoio.ads,
11957 a-ztinio.ads, a-zttest.ads, a-zzunio.ads, a-astaco.ads, a-charac.ads,
11958 a-chlat1.ads, ada.ads, a-dynpri.ads, a-flteio.ads, a-fwteio.ads,
11959 a-inteio.ads, a-intnam.ads, a-ioexce.ads, a-iwteio.ads, a-lfteio.ads,
11960 a-lfwtio.ads, a-liteio.ads, a-liwtio.ads, a-llftio.ads, a-llfwti.ads,
11961 a-llitio.ads, a-lliwti.ads, a-ncelfu.ads, a-ngcefu.ads, a-ngelfu.ads,
11962 a-nlcefu.ads, a-nlcoty.ads, a-nlelfu.ads, a-nllcef.ads, a-nllcty.ads,
11963 a-nllefu.ads, a-nscefu.ads, a-nscoty.ads, a-nselfu.ads, a-nucoty.ads,
11964 a-nuelfu.ads, a-numeri.ads, a-sfteio.ads, a-sfwtio.ads, a-siteio.ads,
11965 a-siwtio.ads, a-ssitio.ads, a-ssiwti.ads, a-storio.ads, a-strfix.ads,
11966 a-string.ads, a-stwifi.ads, a-titest.ads, a-unccon.ads, a-uncdea.ads,
11967 a-wtcoio.ads, a-wtinio.ads, a-wttest.ads, calendar.ads, directio.ads,
11968 i-c.ads, ioexcept.ads, machcode.ads, sequenio.ads, text_io.ads,
11969 unchconv.ads, unchdeal.ads, a-widcha.ads, a-zchara.ads, a-stboha.ads,
11970 a-stfiha.ads, a-coteio.ads, a-envvar.ads, a-lcteio.ads, a-llctio.ads,
11971 a-scteio.ads, a-swbwha.ads, a-swfwha.ads, a-szbzha.ads, a-szfzha.ads,
11972 a-tiboio.ads, a-wwboio.ads, a-zzboio.ads, a-dispat.ads, a-tgdico.ads,
11973 expander.adb, g-socket.ads, par-labl.adb, sinput-c.adb, s-tarest.ads,
11974 s-stchop.ads, g-expect-vms.adb, s-taprop-lynxos.adb,
11975 s-taprop-tru64.adb, s-taprop-irix.adb,
11976 s-taprop-hpux-dce.adb, s-traceb-hpux.adb,
11977 s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb,
11978 s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb,
11979 s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb,
11980 s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads,
11981 a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb,
11982 a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads,
11983 g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads,
11984 s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb,
11985 s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads,
11986 s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb,
11987 s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads,
11988 s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb,
11989 s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb,
11990 a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads,
11991 a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads,
11992 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb,
11993 a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads,
11994 a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads,
11995 a-ztexio.adb, a-ztexio.ads: Addition of null-exclusion to anonymous
11996 access types.
11997 Update documentation.
11998 Minor rewording.
11999
120002007-04-06 Robert Dewar <dewar@adacore.com>
12001
12002 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
12003 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
12004 system-vxworks-sparcv9.ads, system-solaris-x86.ads, system-irix-o32.ads,
12005 system-irix-n32.ads, system-hpux.ads, system-vxworks-m68k.ads,
12006 system-linux-x86.ads, system-vxworks-mips.ads, system-interix.ads,
12007 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
12008 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
12009 system-vxworks-alpha.ads, system-vms_64.ads, system-darwin-ppc.ads,
12010 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
12011 system-hpux-ia64.ads, targparm.adb,
12012 targparm.ads (Functions_Return_By_DSP_On_Target): Removed
12013
12014 * system.ads: Move Functions_Return_By_DSP to obsolete section,
12015 kept for bootstrap purposes only.
12016
120172007-04-06 Arnaud Charlet <charlet@adacore.com>
12018
12019 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
12020 s-osinte-freebsd.ads, s-osinte-aix.ads, s-osinte-darwin.ads,
12021 s-taprop-posix.adb (Create_Task): Fix handling of Task_Info.
12022 (PTHREAD_SCOPE_PROCESS, PTHREAD_SCOPE_SYSTEM): New constants.
12023
120242007-04-06 Robert Dewar <dewar@adacore.com>
12025
12026 * a-except.adb, a-except.ads, a-except-2005.ads, a-except-2005.adb
12027 (Local_Raise): New dummy procedure called when a raise is converted
12028 to a local goto. Used for debugger to detect that the exception
12029 is raised.
12030
12031 * debug.adb: Document new d.g flag (expand local raise statements to
12032 gotos even if pragma Restriction (No_Exception_Propagation) is not set)
12033
12034 * exp_sel.adb: Use Make_Implicit_Exception_Handler
12035
12036 * exp_ch11.adb (Expand_Exception_Handlers): Use new flag -gnatw.x to
12037 suppress warnings for unused handlers.
12038 (Warn_If_No_Propagation): Use new flag -gnatw.x to suppress
12039 warnings for raise statements not handled locally.
12040 (Get_RT_Exception_Entity): New function
12041 (Get_Local_Call_Entity): New function
12042 (Find_Local_Handler): New function
12043 (Warn_If_No_Propagation): New procedure
12044 (Expand_At_End_Handler): Call Make_Implicit_Handler
12045 (Expand_Exception_Handlers): Major additions to deal with local handlers
12046 (Expand_N_Raise_Constraint_Error, Expand_N_Raise_Program_Error,
12047 Expand_N_Raise_Storage_Error, (Expand_N_Raise_Statement): Add handling
12048 for local raise
12049
12050 * exp_ch11.ads (Get_RT_Exception_Entity): New function
12051 (Get_Local_Call_Entity): New function
12052
12053 * gnatbind.adb (Restriction_List): Add No_Exception_Propagation to list
12054 of restrictions that the binder will never suggest adding.
12055
12056 * par-ch11.adb (P_Exception_Handler): Set Local_Raise_Statements field
12057 to No_Elist.
12058
12059 * restrict.adb (Check_Restricted_Unit): GNAT.Current_Exception may not
12060 be with'ed in the presence of pragma Restriction
12061 (No_Exception_Propagation).
12062
12063 * sem.adb (Analyze): Add entries for N_Push and N_Pop nodes
12064
12065 * sem_ch11.adb (Analyze_Exception_Handler): If there is a choice
12066 parameter, then the handler is not a suitable target for a local raise,
12067 and this is a violation of restriction No_Exception_Propagation.
12068 (Analyze_Handled_Statements): Analyze choice parameters in exception
12069 handlers before analyzing statement sequence (needed for proper
12070 detection of local raise statements).
12071 (Analyze_Raise_Statement): Reraise statement is a violation of the
12072 No_Exception_Propagation restriction.
12073
12074 * s-rident.ads: Add new restriction No_Exception_Propagation
12075
12076 * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): New
12077 function, like Make_Exception_Handler but sets Local_Raise_Statements
12078 to No_List.
12079 (Add_Unique_Serial_Number): Deal with case where this is called during
12080 processing of configuration pragmas.
12081
120822007-04-06 Thomas Quinot <quinot@adacore.com>
12083 Pat Rogers <rogers@adacore.com>
12084 Pascal Obry <obry@adacore.com>
12085
12086 * g-stsifd-sockets.adb: New file.
12087
12088 * g-socthi.ads, g-socket.adb, g-socthi-vxworks.adb,
12089 g-socthi-vxworks.ads, g-socthi-mingw.ads, g-socthi-vms.ads,
12090 g-socthi-vms.adb: Move signalling
12091 fd management to a nested package, so that they can conveniently be
12092 moved to a subunit that is shared across Windows, VMS, and VxWorks
12093 (Ada implementation) or completed with imported bodies from socket.c
12094 (UNIX case).
12095 (Read_Signalling_Fd, Write_Signalling_Fd, Create_Signalling_Fds): New
12096 subprograms.
12097 (Check_Selector): Use Read_Signalling_Fd to read and discard data from
12098 the signalling file descriptor.
12099 (Abort_Selector): Use Write_Signalling_Fd to write dummy data to the
12100 signalling file descriptor.
12101 (Create_Selector): Use new C-imported subprogram Create_Signalling_Fds
12102 instead of creating a pair of sockets for signalling here.
12103
12104 * g-socthi.adb: Ditto.
12105 Set the runtime process to ignore SIGPIPEs on platforms that support
12106 neither SO_NOSIGPIPE nor MSG_NOSIGNAL functionality.
12107
12108 * g-socthi-mingw.adb: Ditto.
12109 (WS_Version): Use Windows 2.2.
12110 Use Winsock 2.2 (instead of 1.1) for the GNAT.Socket API.
12111
12112 * g-soliop-mingw.ads: Link with ws2_32 for Windows 2.x support.
12113 Use Winsock 2.2 (instead of 1.1) for the GNAT.Socket API.
12114
12115 * Makefile.in: New libgnat pair g-stsifd.adb<g-stsifd-sockets.adb.
12116 added GNAT byte swapping facility
12117 Update FreeBSD THREADSLIB from -lc_r to -lpthread, for FreeBSD 6.
12118
12119 * g-bytswa.adb, g-bytswa-x86.adb, g-bytswa.ads: New files.
12120
12121 * socket.c (__gnat_read_signalling_fd, __gnat_write_controlling_fd):
12122 New subprograms.
12123 (__gnat_create_signalling_fds): New subprogram.
12124 Set the runtime process to ignore SIGPIPEs on platforms that support
12125 neither SO_NOSIGPIPE nor MSG_NOSIGNAL functionality.
12126
121272007-04-06 Hristian Kirtchev <kirtchev@adacore.com>
12128 Vincent Celier <celier@adacore.com>
12129
12130 * a-calend-vms.ads, a-calend.ads, a-calend.adb, a-calend-vms.adb:
12131 New version of Ada.Calendar which supports the new upper bound of Ada
12132 time (2399-12-31 86_399.999999999).
12133 The following modifications have been made to the package:
12134 - New representation of time as count of nanoseconds since the start of
12135 Ada time (1901-1-1 0.0).
12136 - Target independent Split and Time_Of routines which service both
12137 Ada 95 and Ada 2005 code.
12138 - Target independent interface to the Ada 2005 children of Calendar.
12139 - Integrated leap seconds into Ada 95 and Ada 2005 mode.
12140 - Handling of non-leap centenial years.
12141 - Updated clock function.
12142 - Updated arithmetic and comparison operators.
12143
12144 * a-caldel.adb (To_Duration): Add call to target independent routine in
12145 Ada.Calendar to handle the conversion of time to duration.
12146
12147 * sysdep.c (__gnat_localtime_tzoff): Test timezone before setting off
12148 (UTC Offset).
12149 If timezone is obviously incorrect (outside of -14 hours .. 14 hours),
12150 set off to 0.
12151 (__gnat_localtime_tzoff for Lynx and VxWorks): Even though these
12152 targets do not have a natural time zone, GMT is used as a default.
12153 (__gnat_get_task_options): New.
12154
12155 * a-direct.adb (Modification_Time): Add with and use clauses for
12156 Ada.Calendar and Ada.
12157 Calendar.Formatting. Remove with clause for Ada.Unchecked_Conversion
12158 since it is no longer needed.
12159 (Duration_To_Time): Removed.
12160 (OS_Time_To_Long_Integer): Removed.
12161 (Modification_Time): Rewritten to use Ada.Calendar and Ada.Calendar.
12162 Formatting Time_Of routines which automatically handle time zones,
12163 buffer periods and leap seconds.
12164
12165 * a-calari.ads, a-calari.adb ("+", "-", Difference): Add calls to
12166 target independent routines in Ada.Calendar.
12167
12168 * a-calfor.ads, a-calfor.adb:
12169 Code cleanup and addition of validity checks in various routines.
12170 (Day_Of_Week, Split, Time_Of): Add call to target independent routine in
12171 Ada.Calendar.
12172
12173 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): Add call to target
12174 independent routine in Ada.Calendar.
12175
121762007-04-06 Olivier Hainque <hainque@adacore.com>
12177
12178 * adaint.c:
12179 (convert_addresses): Adjust prototype and dummy definition to expect an
12180 extra file_name argument.
12181
12182 * gmem.c (__gnat_convert_addresses): Wrapper to convert_addresses,
12183 filling the now expected file_name argument with the appropriate
12184 argv[0] expansion.
12185 (__gnat_gmem_a2l_initialize, __gnat_gmem_read_next_frame): Use it.
12186 (tracebk): Array of void * instead of char *, corresponding to what
12187 convert_addresses expects.
12188 (exename): New static global, to hold the executable file name to be
12189 used in all convert_addresses invocations.
12190 (gmem_read_backtrace, __gnat_gmem_symbolic): Account for tracebk type
12191 change.
12192 (__gnat_gmem_a2l_initialize): Resolve exename.
12193 (__gnat_convert_addresses): Use exename as the convert_addresses
12194 file_name argument.
12195
12196 * g-trasym.adb (Symbolic_Traceback): Adjust signature of imported
12197 "convert_addresses", now expecting a filename argument. Import the
12198 necessary entities to compute the filename to use and pass it to
12199 convert_addresses.
12200
122012007-04-06 Matt Gingell <gingell@adacore.com>
12202
12203 * system-aix.ads: Back out previous change.
12204 (Functions_Return_By_DSP): Removed
12205
122062007-04-06 Pascal Obry <obry@adacore.com>
12207
12208 * s-osprim-mingw.adb (Timed_Delay): Use the right clock (standard one
12209 or the monotonic used by Ada.Real_Time) to compute the sleep duration
12210 on Windows.
12211
122122007-04-06 Jose Ruiz <ruiz@adacore.com>
12213
12214 * s-osinte-vxworks.ads, s-osinte-vxworks.adb (VX_FP_TASK): Remove this
12215 function. Its value changes in different VxWorks versions, and it is
12216 now handled by the function __gnat_get_task_options.
12217
12218 * s-taprop-vxworks.adb (Create_Task): Call the function
12219 __gnat_get_task_options to get the required options for creating a task.
12220
122212007-04-06 Pascal Obry <obry@adacore.com>
12222 Thomas Quinot <quinot@adacore.com>
12223
12224 * adaint.c: Replace all occurences of S2WS to S2WSU (Unicode) when
12225 dealing with filename.
12226 (__gnat_fopen): Call the proper macro (8bits or UTF8) to convert the
12227 filename from a standard string to a wide-string depending on the
12228 encoding value.
12229 (__gnat_freopen): Idem.
12230 (__gnat_current_time): New function (wrapper for time(3) standard C
12231 function).
12232
12233 * g-os_lib.ads (Current_Time): New function. Returns the current
12234 system time as an OS_Time value.
12235
12236 * s-osprim.ads (Clock): Add more precise definition of UNIX epoch.
12237 (Monotonic_Clock): Same.
12238
122392007-04-06 Quentin Ochem <ochem@adacore.com>
12240
12241 * ali.ads, ali.adb (Get_Nat): Raise an exception if the file cursor is
12242 not on a natural.
12243 (Scan_ALI): Cancel the xref line if there has been a reading ALI error.
12244
122452007-04-06 Jose Ruiz <ruiz@adacore.com>
12246
12247 * a-retide.adb: Add elaboration code to ensure that the tasking run
12248 time is initialized when using delay operations even when no task is
12249 created.
12250
122512007-04-06 Javier Miranda <miranda@adacore.com>
12252
12253 * a-tags.ads, a-tags.adb (Object_Specific_Data): Remove
12254 component Num_Prim_Ops.
12255 (Set_Num_Prim_Ops): Removed.
12256 Remove all the assertions because all the routines of this
12257 package are inline always.
12258 (Get_Offset_Index): Add support to primary dispatch tables.
12259 Move the documentation about the dispatch table to a-tags.ads
12260 (Set_External_Tag): Removed
12261 (Inherit_TSD): Removed.
12262 (Interface_Data_Element, Interfaces_Array, Interface_Data): Declarations
12263 moved to a-tags.ads
12264 (Displace, IW_Membership, Inherit_TSD, Interface_Ancestor_Tags,
12265 Register_Interface_Tag, Set_Offset_To_Top): Update all the occurrences
12266 of the TSD field "Table" because this field has been renamed to
12267 "Ifaces_Table".
12268 (Inherit_CPP_DT): Removed.
12269 (K_Typeinfo, K_Offset_To_Top, K_Tagged_Kind, K_Signature,
12270 Cstring, Tag_Table, Type_Specific_Data, Dispatch_Table): These
12271 declarations have been moved to a-tags.ads
12272 (Check_Size): Removed.
12273 (Expanded_Name): Updated to get access to the new field of TSD
12274 containing the address of the expanded name.
12275 (Get_Access_Level/Set_Access_Level): Removed.
12276 (Get_Predefined_Prim_Op_Address): Removed.
12277 (Set_Predefined_Prim_Op_Address): Removed.
12278 (Get_Prim_Op_Address/Set_Prim_Op_Address): Removed.
12279 (Get_Remotely_Callable/Set_Remotely_Callable): Removed.
12280 (Set_Expanded_Name): Removed.
12281 (Inherit_DT): Removed.
12282 (Inherit_CPP_DT): Removed.
12283 (Set_RC_Offset): Removed.
12284 (Set_TSD): Removed.
12285 (Base_Address): New function that displaces "this" to point to the base
12286 of the object (that is, to point to the primary tag of the object).
12287
122882007-04-06 Ed Schonberg <schonberg@adacore.com>
12289 Javier Miranda <miranda@adacore.com>
12290
12291 * exp_ch3.ads, exp_ch3.adb (Analyze_N_Full_Type_Declaration): For an
12292 anonymous access component, do not create a master_id if type already
12293 has one, as may happen if the type is a subcomponent of a packed array
12294 type.
12295 (Build_Init_Procedure, Component_Needs_Simple_Initialization,
12296 Initialize_Tag): Remove code associated with the old CPP pragmas.
12297 CPP_Virtual and CPP_Vtable are no longer supported.
12298 (Build_Offset_To_Top_Internal): Add support for concurrent record types
12299 (Build_Offset_To_Top_Functions): Add support for concurrent record types
12300 (Freeze_Record_Type): Remove call to
12301 Init_Predefined_Interface_Primitives.
12302 (Init_Secondary_Tags.Initialize_Tag): New subprogram containing all the
12303 code required to initialize the tags of the secondary dispatch tables.
12304 This leaves the algoritm more clear.
12305 (Init_Secondary_Tags): Add support for concurrent record types
12306 (Make_Predefined_Primitive_Specs): Code cleanup.
12307 (Predefined_Primitive_Bodies): Code cleanup.
12308 (Build_Master_Renaming): New local subprogram.
12309 (Expand_N_Full_Type_Declaration): Build the master_id associated with
12310 anonymous access to task type components.
12311 (Expand_N_Subtype_Indication): The bounds of a range constraint in a
12312 subtype indication are resolved during analysis, and must not be done
12313 here.
12314 (Stream_Operation_OK): Check Restriction_Active before RTE_Available.
12315
123162007-04-06 Geert Bosch <bosch@adacore.com>
12317 Ed Schonberg <schonberg@adacore.com>
12318 Javier Miranda <miranda@adacore.com>
12319 Bob Duff <duff@adacore.com>
12320
12321 * exp_ch4.adb (Expand_N_Type_Conversion): Remove special processing
12322 for conversion of a Float_Type'Truncation to integer.
12323
12324 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): New function to
12325 check if a node is an attribute that can be handled directly by the
12326 back end.
12327 (Expand_N_Attribute_Reference): Suppress expansion of floating-point
12328 attributes that can be handled directly by the back end.
12329 (Expand_N_Attribute_Reference, case 'Access and 'Unchecked_Access):
12330 use new predicate Is_Access_Protected_Subprogram_Type.
12331 (Expand_N_Attribute_Reference, case 'Write): The reference is legal for
12332 and Unchecked_Union if it is generated as part of the default Output
12333 procedure for a type with default discriminants.
12334 (Expand_N_Attribute_Reference): Avoid the expansion of dispatching calls
12335 if we are compiling under restriction No_Dispatching_Calls.
12336 (Constrained): Use Underlying_Type, in case the type is private without
12337 discriminants, but the full type has discriminants.
12338 (Expand_N_Attribute_Reference): Replace call to Get_Access_Level by
12339 call to Build_Get_Access_Level.
12340 (Expand_N_Attribute_Reference): The use of 'Address with class-wide
12341 interface objects requires a call to the run-time subprogram that
12342 returns the base address of the object.
12343 (Valid_Conversion): Improve error message on illegal attempt to store
12344 an anonymous access to subprogram value into a record component.
12345
12346 * sem_res.adb (Resolve_Equality_Op): Detect ambiguity for "X'Access =
12347 null".
12348 (Simplify_Type_Conversion): New procedure that performs simplification
12349 of Int_Type (Float_Type'Truncation (X)).
12350 (Resolve_Type_Conversion): Call above procedure after resolving operand
12351 and before performing checks. This replaces the existing ineffective
12352 code in Exp_Ch4.
12353 (Set_String_Literal_Subtype): When creating the internal static lower
12354 bound subtype for a string literal, use a newly created copy of the
12355 subtree representing the lower bound.
12356 (Resolve_Call): Exclude build-in-place function calls from transient
12357 scope treatment. Update comments to describe this exception.
12358 (Resolve_Equality_Op): In case of dispatching call check violation of
12359 restriction No_Dispatching_Calls.
12360 (Resolve_Call): If the call returns an array, the context imposes the
12361 component type of the array, and the function has one non-defaulted
12362 parameter, rewrite the call as the indexing of a call with a single
12363 parameter, to handle an Ada 2005 syntactic ambiguity for calls written
12364 in prefix form.
12365 (Resolve_Actuals): If an actual is an allocator for an access parameter,
12366 the master of the created object is the innermost enclosing statement.
12367 (Remove_Conversions): For a binary operator, check if type of second
12368 formal is numeric, to check if an abstract interpretation is present
12369 in the case of exponentiation as well.
12370
123712007-04-06 Ed Schonberg <schonberg@adacore.com>
12372 Bob Duff <duff@adacore.com>
12373
12374 * atree.h, atree.ads, atree.adb (Copy_Node_With_Replacement): When
12375 copying a parameter list in a call, set properly the First_Named_Formal
12376 and Next_Named_Formal fields in the new list and in the enclosing call.
12377 (Watch_Node,New_Node_Breakpoint,New_Node_Debugging_Output): Shorten
12378 names, to ease typing in the debugger. Improve comments.
12379 (Watch_Node): New variable, intended to be set in the debugger.
12380 (New_Node_Breakpoint): New do-nothing procedure to set a breakpoint on,
12381 called when the watched node is created.
12382 (New_Node_Debugging_Output): Combined version of local procedures
12383 New_Node_Debugging_Output and New_Entity_Debugging_Output, now global,
12384 with a parameter so that conditional breakpoints like "if Node = 12345"
12385 work.
12386 (New_Node, New_Entity): Call the global New_Node_Debugging_Output.
12387 Add Elist1 function
12388
123892007-04-06 Thomas Quinot <quinot@adacore.com>
12390 Ed Schonberg <schonberg@adacore.com>
12391 Gary Dismukes <dismukes@adacore.com>
12392
12393 * checks.ads, checks.adb (Selected_Range_Checks): No range check is
12394 required for a conversion between two access-to-unconstrained-array
12395 types.
12396 (Expr_Known_Valid): Validity checks do not apply to discriminants, but
12397 to discriminant constraints on discriminant objects. This rule must
12398 apply as well to discriminants of protected types in private components.
12399 (Null_Exclusion_Static_Checks): If No_Initialization is set on an
12400 object of a null-excluding access type then don't require the
12401 the object declaration to have an expression and don't emit a
12402 run-time check.
12403
124042007-04-06 Arnaud Charlet <charlet@adacore.com>
9e94c78f 12405 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
12406
12407 * gnatvsn.ads, comperr.adb (Get_Gnat_build_Type): Renamed Build_Type
12408 and made constant.
12409
12410 * comperr.ads, comperr.adb (Compiler_Abort): Add third parameter
12411 Fallback_Loc. Use it as the sloc info when Current_Error_Node doesn't
12412 carry any.
12413
12414 * fe.h (Compiler_Abort): Add third parameter.
12415
12416 * misc.c (internal_error_function): Build third argument from current
12417 input location and pass it to Compiler_Abort.
12418
124192007-04-06 Gary Dismukes <dismukes@adacore.com>
12420
12421 * cstand.adb (Create_Standard): When the target's storage unit size is
12422 greater than a byte, set Has_Non_Standard_Rep and Has_Pragma_Pack on
12423 Standard_String.
12424
124252007-04-06 Nicolas Roche <roche@adacore.com>
12426
12427 * cstreams.c (__gnat_full_name): Fix issues on VxWorks 6.x for which
12428 absolute path can have the following form: device:/a/b. In this case
12429 '/' should be inserted between the path and the filename.
12430
124312007-04-06 Olivier Hainque <hainque@adacore.com>
9e94c78f 12432 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
12433
12434 * decl.c (gnat_to_gnu_entity) <E_Constant>: Associate an external
12435 VAR_DECL to a CONST_DECL we make for a public constant when we know the
12436 corresponding definition has created the so made visible variable.
12437 Handle anonymous access to protected subprogram.
12438 (gnat_to_gnu_entity) <E_Variable>: Do not make the underlying type of an
12439 object with an address clause volatile. Re-enable original fix.
12440 <E_Subprogram_Type>: Set TYPE_REF_CAN_ALIAS_ALL on the reference type
12441 too.
12442 (gnat_to_gnu_entity) <E_Class_Wide_Type>: Retrieve the TYPE_DECL
12443 associated with either the Equivalent or Root type, instead of the
12444 naked type node.
12445 (gnat_to_gnu_entity): Manually mark the top of the DECL_FIELD_OFFSET
12446 subtree for every field of a global record type.
12447 (gnat_to_gnu_entity) <E_Record_Subtype>: If the subtype has
12448 discriminants, invoke again variable_size on its newly computed sizes.
12449
124502007-04-06 Robert Dewar <dewar@adacore.com>
12451 Thomas Quinot <quinot@adacore.com>
12452 Ed Schonberg <schonberg@adacore.com>
12453 Bob Duff <duff@adacore.com>
12454
12455 * einfo.ads, einfo.adb: (First_Component_Or_Discriminant): New function
12456 (Next_Component_Or_Discriminant): New function and procedure
12457 (First_Index, First_Literal, Master_Id,
12458 Set_First_Index, Set_First_Literal, Set_Master_Id):
12459 Add missing Ekind assertions.
12460 (Is_Access_Protected_Subprogram_Type): New predicate.
12461 (Has_RACW): New entity flag, set on package entities to indicate that
12462 the package contains the declaration of a remote accecss-to-classwide
12463 type.
12464 (E_Return_Statement): This node type has the Finalization_Chain_Entity
12465 attribute, in case the result type has controlled parts.
12466 (Requires_Overriding): Add this new flag, because "requires
12467 overriding" is subtly different from "is abstract" (see AI-228).
12468 (Is_Abstract): Split Is_Abstract flag into Is_Abstract_Subprogram and
12469 Is_Abstract_Type. Make sure these are called only when appropriate.
12470 (Has_Pragma_Unreferenced_Objects): New flag
12471
12472 * exp_ch5.adb (Expand_N_Assignment_Statement): If the left-hand side is
12473 class-wide, the tag of the right-hand side must be an exact match, not
12474 an ancestor of that of the object on left-hand side.
12475 (Move_Activation_Chain): New procedure to create the call to
12476 System.Tasking.Stages.Move_Activation_Chain.
12477 (Expand_N_Extended_Return_Statement): Generate code to call
12478 System.Finalization_Implementation.Move_Final_List at the end of a
12479 return statement if the function's result type has controlled parts.
12480 Move asserts to Build_In_Place_Formal.
12481 (Move_Final_List): New function to create the call statement.
12482 (Expand_N_Assignment_Statement): In case of assignment to a class-wide
12483 tagged type, replace generation of call to the run-time subprogram
12484 CW_Membership by call to Build_CW_Membership.
12485 (Expand_N_Return_Statement): Replace generation of call to the run-time
12486 subprogram Get_Access_Level by call to Build_Get_Access_Level.
12487 (Expand_N_Simple_Function_Return): Replace generation of call to the
12488 run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
12489
12490 * exp_ch6.ads, exp_ch6.adb (Expand_Call): Use new predicate
12491 Is_Access_Protected_Subprogram_Type, to handle both named and anonymous
12492 access to protected operations.
12493 (Add_Task_Actuals_To_Build_In_Place_Call): New procedure to add the
12494 master and chain actual parameters to a build-in-place function call
12495 involving tasks.
12496 (BIP_Formal_Suffix): Add new enumeration literals to complete the case
12497 statement.
12498 (Make_Build_In_Place_Call_In_Allocator,
12499 Make_Build_In_Place_Call_In_Anonymous_Context,
12500 Make_Build_In_Place_Call_In_Assignment,
12501 Make_Build_In_Place_Call_In_Object_Declaration): Call
12502 Add_Task_Actuals_To_Build_In_Place_Call with the appropriate master.
12503 (Expand_Inlined_Call): If the subprogram is a null procedure, or a
12504 stubbed procedure with a null body, replace the call with a null
12505 statement without using the full inlining machinery, for efficiency
12506 and to avoid invalid values in source file table entries.
12507
12508 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Add support for
12509 renamings of calls to build-in-place functions.
12510
12511 * rtsfind.adb (RTE_Record_Component_Available): New subprogram that
12512 provides the functionality of RTE_Available to record components.
12513 (RTU_Entity): The function Entity has been renamed to RTU_Entity
12514 to avoid undesired overloading.
12515 (Entity): New subprogram that returns the entity for the referened
12516 unit. If this unit has not been loaded, it returns Empty.
12517 (RE_Activation_Chain_Access, RE_Move_Activation_Chain): New entities.
12518 Remove no longer used entities.
12519 (RE_Finalizable_Ptr_Ptr, RE_Move_Final_List): New entities.
12520 (RE_Type_Specific_Data): New entity.
12521 (RE_Move_Any_Value): New entity.
12522 (RE_TA_A, RE_Get_Any_Type): New entities.
12523 (RE_Access_Level, RE_Dispatch_Table, E_Default_Prim_Op_Count,
12524 RE_Prims_Ptr, RE_RC_Offset, RE_Remotely_Callable,
12525 RE_DT_Typeinfo_Ptr_Size, RE_Cstring_Ptr, RE_DT_Expanded_Name): Added.
12526 (Entity): New subprogram that returns the entity for the referened
12527 unit. If this unit has not been loaded, it returns Empty.
12528 (RTE): Addition of a new formal that extends the search to the scopes
12529 of the record types found in the chain of the package.
12530
12531 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Print
12532 "abstract subprograms must be visible" message, whether or not the type
12533 is an interface; that is, remove the special case for interface types.
12534 (Analyze_Function_Return): Remove error message "return of task objects
12535 is not yet implemented" because this is now implemented.
12536 (Create_Extra_Formals): Add the extra master and activation chain
12537 formals in case the result type has tasks.
12538 Remove error message "return of limited controlled objects is not yet
12539 implemented".
12540 (Create_Extra_Formals): Add the extra caller's finalization list formal
12541 in case the result type has controlled parts.
12542 (Process_Formals): In case of access formal types there is no need
12543 to continue with the analysis of the formals if we already notified
12544 errors.
12545 (Check_Overriding_Indicator): Add code to check overriding of predefined
12546 operators.
12547 (Create_Extra_Formals): Prevent creation of useless Extra_Constrained
12548 flags for formals that do not require them,.
12549 (Enter_Overloaded_Entity): Do not give -gnatwh warning message unless
12550 hidden entity is use visible or directly visible.
12551 (Analyze_Abstract_Subprogram_Declaration,Analyze_Subprogram_Body,
12552 Analyze_Subprogram_Declaration,Analyze_Subprogram_Specification,
12553 Check_Conventions,Check_Delayed_Subprogram,Make_Inequality_Operator,
12554 New_Overloaded_Entity): Split Is_Abstract flag into
12555 Is_Abstract_Subprogram and Is_Abstract_Type.
12556
12557 * s-finimp.ads, s-finimp.adb (Move_Final_List): New procedure to move
12558 a return statement's finalization list to the caller's list, used for
12559 build-in-place functions with result type with controlled parts.
12560 Remove no longer used entities.
12561
12562 * s-taskin.ads (Activation_Chain): Remove pragma Volatile. It is no
12563 longer needed, because the full type is now limited, and therefore a
12564 pass-by-reference type.
12565 (Foreign_Task_Level): New constant.
12566
12567 * s-tassta.ads, s-tassta.adb (Move_Activation_Chain): New procedure to
12568 move tasks from the activation chain belonging to a return statement to
12569 the one passed in by the caller, and update the master to the one
12570 passed in by the caller.
12571 (Vulnerable_Complete_Master, Check_Unactivated_Tasks): Check the master
12572 of unactivated tasks, so we don't kill the ones that are being returned
12573 by a build-in-place function.
12574 (Create_Task): Ignore AI-280 for foreign threads.
12575
125762007-04-06 Ed Schonberg <schonberg@adacore.com>
12577 Robert Dewar <dewar@adacore.com>
12578 Bob Duff <duff@adacore.com>
12579 Gary Dismukes <dismukes@adacore.com>
12580
12581 * errout.adb (Unwind_Internal_Type): Use predicate
12582 Is_Access__Protected_Subprogram_Type.
12583
12584 * freeze.adb (Size_Known): Use First/Next_Component_Or_Discriminant
12585 (Freeze_Entity, packed array case): Do not override explicitly set
12586 alignment and size clauses.
12587 (Freeze_Entity): An entity declared in an outer scope can be frozen if
12588 the enclosing subprogram is a child unit body that acts as a spec.
12589 (Freeze_Entity): Use new predicate Is_Access_Protected_Subprogram_Type.
12590 (Freeze_Record_Type): New Ada 2005 processing for reverse bit order
12591 Remove all code for DSP option
12592
12593 * layout.adb (Layout_Record_Type): Use First/
12594 Next_Component_Or_Discriminant
12595 (Layout_Type): Use new predicate Is_Access_Protected_Subprogram_Type,
12596 to handle properly the anonymous access case.
12597
12598 * sem_attr.adb (Build_Access_Object_Type): Use E_Access_Attribute_Type
12599 for all access attributes, because overload resolution should work the
12600 same for 'Access, 'Unchecked_Access, and 'Unrestricted_Access. This
12601 causes the error message for the ambiguous "X'Access = Y'Access" and
12602 "X'Unrestricted_Access = Y'Access" and so forth to match.
12603 (Resolve_Attribute, case 'Access): Remove use of Original_Access_Type,
12604 now that anonymous access to protected operations have their own kind.
12605 (Resolve_Attribute): In case of dispatching call check the violation of
12606 restriction No_Dispatching_Calls.
12607 (Check_Array_Type): Check new -gnatyA array index style option
12608
12609 * sem_ch3.ads, sem_ch3.adb (Derived_Type_Declaration): Reject an
12610 attempt to derive from a synchronized tagged type.
12611 (Analyze_Type_Declaration): If there is a incomplete tagged view of the
12612 type, inherit the class-wide type already created, because it may
12613 already have been used in a self-referential anonymous access component.
12614 (Mentions_T): Recognize self-referential anonymous access components
12615 that use (a subtype of) the class-wide type of the enclosing type.
12616 (Build_Derived_Record_Type): Add earlier setting of Is_Tagged_Type. Pass
12617 Derived_Type for Prev formal on call to
12618 Check_Anonymous_Access_Components rather than Empty.
12619 (Make_Incomplete_Type_Declaration): Add test for case where the type has
12620 a record extension in deciding whether to create a class-wide type,
12621 rather than just checking Tagged_Present.
12622 (Replace_Anonymous_Access_To_Protected_Subprogram): Procedure applies
12623 to stand-alone object declarations as well as component declarations.
12624 (Array_Type_Declaration): Initialize Packed_Array_Type to Empty, to
12625 prevent accidental overwriting when enclosing package appears in
12626 a limited_with_clause.
12627 (Array_Type_Declaration): If the component type is an anonymous access,
12628 the associated_node for the itype is the type declaration itself.
12629 (Add_Interface_Tag_Components): Modified to support concurrent
12630 types with abstract interfaces.
12631 (Check_Abstract_Interfaces): New subprogram that verifies the ARM
12632 rules 3.9.4 (15/2), 9.1 (9.d/2) and 9.4 (11.d/2).
12633 (Build_Derived_Record_Type): Add call to Analyze_Interface_Declaration
12634 to complete the decoration of synchronized interface types. Add also
12635 a call to Check_Abstract_Interfaces to verify the ARM rules.
12636 (Derive_Interface_Subprograms): Modified to support concurrent types
12637 with abstract interfaces.
12638 (Analyze_Subtype_Indication): Resolve the range with the given subtype
12639 mark, rather than delaying the full resolution depending on context.
12640 (Analyze_Component_Declaration,Analyze_Interface_Declaration,
12641 Analyze_Object_Declaration,Analyze_Subtype_Declaration,
12642 Array_Type_Declaration,Build_Derived_Record_Type,
12643 Build_Discriminated_Subtype,Check_Abstract_Overriding,Check_Completion,
12644 Derive_Interface_Subprograms,Derive_Subprogram,Make_Class_Wide_Type,
12645 Process_Full_View,Record_Type_Declaration): Split Is_Abstract flag into
12646 Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
12647 called only when appropriate.
12648 (Copy_And_Swap): Copy Has_Unreferenced_Objects flag from full type
12649 to private type.
12650 (Analyze_Subtype_Declaration): For an access subtype declaration, create
12651 an itype reference for the anonymous designated subtype, to prevent
12652 scope anonmalies in gigi.
12653 (Build_Itype_Reference): New utility, to simplify construction of such
12654 references.
12655
126562007-04-06 Vincent Celier <celier@adacore.com>
12657
12658 * errutil.adb (Initialize): Initialize warnings table, if all warnings
12659 are suppressed, supply an initial dummy entry covering all possible
12660 source locations.
12661
12662 * make.adb (Scan_Make_Arg): Reject options that should start with "--"
12663 and start with only one, such as "-RTS=none".
12664 (Collect_Arguments): Do not check for sources outside of projects.
12665 Do not collect arguments if project is externally built.
12666 (Compile_Sources): Do nothing, not even check if the source is up to
12667 date, if its project is externally built.
12668 (Compile): When compiling a predefined source, add -gnatpg
12669 as the second switch, after -c.
12670 (Compile_Sources): Allow compilation of Annex J renames without -a
12671 (Is_In_Object_Directory): Check if the ALI file is in the object
12672 even if there is no project extension.
12673 (Create_Binder_Mapping_File): Only put a unit in the mapping file for
12674 gnatbind if the ALI file effectively exists.
12675 (Initialize): Add the directory where gnatmake is invoked in front of
12676 the path if it is invoked from a bin directory, even without directory
12677 information, so that the correct GNAT tools will be used when spawned
12678 without directory information.
12679
12680 * makeusg.adb: Change switch -S to -eS
12681 Add lines for new switches -we, -wn and -ws
12682 Add line for new switch -p
12683
12684 * prj-proc.adb (Process): Set Success to False when Warning_Mode is
12685 Treat_As_Error and there are warnings.
12686
12687 * switch-m.ads, switch-m.adb (Normalize_Compiler_Switches): Do not skip
12688 -gnatww Change gnatmake switch -S to -eS
12689 (Scan_Make_Switches): Code reorganisation. Process separately multi
12690 character switches and single character switches.
12691 (Scan_Make_Switches): New Boolean out parameter Success. Set Success to
12692 False when switch is not recognized by gnatmake.
12693 (Scan_Make_Switches): Set Setup_Projects True when -p or
12694 --create-missing-dirs is specified.
12695
12696 * fname.adb (Is_Predefined_File_Name): Return True for annex J
12697 renamings Calendar, Machine_Code, Unchecked_Conversion and
12698 Unchecked_Deallocation only when Renamings_Included is True.
12699
12700 * par.adb: Allow library units Calendar, Machine_Code,
12701 Unchecked_Conversion and Unchecked_Deallocation to be recompiled even
12702 when -gnatg is not specified.
12703 (P_Interface_Type_Definition): Remove the formal Is_Synchronized because
12704 there is no need to generate always a record_definition_node in case
12705 of synchronized interface types.
12706 (SIS_Entry_Active): Initialize global variable to False
12707 (P_Null_Exclusion): For AI-447: Add parameter Allow_Anonymous_In_95 to
12708 indicate cases where AI-447 says "not null" is legal.
12709
12710 * makeutl.ads, makeutil.adb (Executable_Prefix_Path): New function
12711
12712 * makegpr.adb (Check_Compilation_Needed): Take into account dependency
12713 files with with several lines starting with the object fileb name.
12714 (Scan_Arg): Set Setup_Projects True when -p or --create-missing-dirs
12715 is specified.
12716 (Initialize): Add the directory where gprmake is invoked in front of the
12717 path, if it is invoked from a bin directory or with directory
12718 information, so that the correct GNAT tools will be used when invoked
12719 directly.
12720 (Check_Compilation_Needed): Process correctly backslashes on Windows.
12721
12722 * vms_data.ads: Update switches/qualifiers
12723
127242007-04-06 Ed Schonberg <schonberg@adacore.com>
12725 Thomas Quinot <quinot@adacore.com>
12726
12727 * exp_aggr.adb:
12728 If the array component is a discriminated record, the array aggregate
12729 is non-static even if the component is given by an aggregate with
12730 static components.
12731 (Expand_Record_Aggregate): Use First/Next_Component_Or_Discriminant
12732 (Convert_Aggr_In_Allocator): If the allocator is for an access
12733 discriminant and the type is controlled. do not place on a finalization
12734 list at this point. The proper list will be determined from the
12735 enclosing object.
12736 (Build_Record_Aggr_Code): If aggregate has box-initialized components,
12737 initialize record controller if needed, before the components, to ensure
12738 that they are properly finalized.
12739 (Build_Record_Aggr_Code): For the case of an array component that has a
12740 corresponding array aggregate in the record aggregate, perform sliding
12741 if required.
12742
127432007-04-06 Javier Miranda <miranda@adacore.com>
12744 Gary Dismukes <dismukes@adacore.com>
12745 Ed Schonberg <schonberg@adacore.com>
12746
12747 * exp_ch13.adb (Expand_External_Tag_Definition): Replace call to the
12748 run-time subprogram Set_External_Tag by call to Build_Set_External_Tag.
12749
12750 * exp_ch4.adb (Expand_Allocator_Expression): Don't perform a run-time
12751 accessibility on class-wide allocators if the allocator occurs at the
12752 same scope level as the allocator's type. The check is guaranteed to
12753 succeed in that case, even when the expression originates from a
12754 parameter of the containing subprogram.
12755 (Expand_N_Op_Eq): Do nothing in case of dispatching call if compiling
12756 under No_Dispatching_Calls restriction. During the semantic analysis
12757 we already notified such violation.
12758 (Tagged_Membership): Constant folding. There is no need to check
12759 the tag at run-time if the type of the right operand is non
12760 class-wide abstract.
12761 Replace call to Is_Ancestor by call to Is_Parent
12762 to support concurrent types with interface types.
12763 (Expand_N_Allocator): Add an assertion associated with the generation
12764 of the master_id.
12765 (Expand_N_Slice): Do not enable range check to nodes associated
12766 with the frontend expansion of the dispatch table.
12767 (Is_Local_Access_Discriminant): Subsidiary function to
12768 Expand_N_Allocator.
12769 (Tagged_Membership): Replace generation of call to the run-time
12770 subprogram CW_Membership by call to Build_CW_Membership.
12771 (Expand_Allocator_Expression): Replace generation of call to the
12772 run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
12773
12774 * exp_disp.ads, exp_disp.adb (Make_DT): Code reorganization to
12775 initialize most the TSD components by means of an aggregate.
12776 Modify the declaration of the object containing the TSD
12777 because we now expand code that has a higher level of abstraction.
12778 The TSD has a discriminant containing the Inheritance Depth Level,
12779 value that is used in the membership test but also to fix the size
12780 of the table of ancestors.
12781 (Expand_Interface_Conversion): Insert function body at the closest place
12782 to the conversion expression, to prevent access-before-elaboration
12783 errors in the backend.
12784 Code improved to reduce the size of the dispatch table if
12785 compiling under restriction No_Dispatching_Calls plus code cleanup.
12786 Code reorganization plus removal of calls to Set_Num_Prim_Ops
12787 (Make_Secondary_DT): Remove call to Set_Num_Prim_Ops.
12788 (Expand_Dispatching_Call): Minor code reorganization plus addition of
12789 code to return immediately if compiling under No_Dispatching_Calls
12790 restriction.
12791 (Set_All_DT_Position): Remove code associated with the old CPP pragmas.
12792 CPP_Virtual and CPP_Vtable are no longer supported.
12793 (Expand_Interface_Conversion): Add missing support for interface type
12794 derivations.
12795 (Expand_Interface_Actuals): Replace calls to Is_Ancestor by calls to
12796 Is_Parent to support concurrent types with interfaces.
12797 (Init_Predefined_Interface_Primitives): Removed.
12798 (Make_Secondary_DT): Modified to support concurrent record types.
12799 (Set_All_DT_Position): Modified to support concurrent record types.
12800 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated
12801 with Get_External_Tag, Inherit_TSD, Set_External_Tag.
12802 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entry associated
12803 with CW_Membership.
12804 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated
12805 with Get_Access_Level, Get_Predefined_Prim_Op_Address,
12806 Get_Prim_Op_Address Get_RC_Offset, Get_Remotely_Callable, Inherit_DT,
12807 Set_Access_Level, Set_Expanded_Name, Set_Predefined_Prim_Op_Address,
12808 Set_Prim_Op_Address, Set_RC_Offset, Set_Remotely_Callable, Set_TSD.
12809 (Expand_Dispatching_Call): Replace generation of call to the run-time
12810 subprograms Get_Predefined_Prim_Op_Address and Get_Prim_Op_Address by
12811 calls to Build_Get_Predefined_Prim_Op_Address, and Build_Get_Prim_Op_
12812 Address.
12813 (Fill_DT_Entry, Fill_Secondary_DT_Entry): Replace generation of call to
12814 the run-time subprograms Set_Predefined_Prim_Op_Address and Set_Prim_
12815 Op_Address by calls to Build_Set_Predefined_Prim_Op_Address, and
12816 Build_Set_Prim_Op_Address.
12817 (Get_Remotely_Callable): Subprogram removed.
12818 (Init_Predefined_Interface_Primitives): Replace generation of call to
12819 the run-time subprograms Inherit_DT by call to Build_Inherit_Predefined_
12820 Prims.
12821
12822 * sem_elab.adb (Set_Elaboration_Constraint): Replace the call to
12823 First (Parameter_Associations ()) with the call to First_Actual that
12824 returns an actual parameter expression for both named and positional
12825 associations.
12826
12827 * sem_disp.adb (Check_Dispatching_Call): In case of dispatching call
12828 check violation of restriction No_Dispatching_Calls.
12829 (Check_Controlling_Type): A formal of a tagged incomplete type is a
12830 controlling argument.
12831
12832 * exp_util.ads, exp_util.adb (Type_May_Have_Bit_Aligned_Components): Use
12833 First/Next_Component_Or_Discriminant
12834 (Insert_Actions): Add entries for new N_Push and N_Pop nodes
12835 (Find_Implemented_Interface): Removed. All the calls to this subprogram
12836 specify Any_Limited_Interface, and this functionality is already
12837 provided by the function Has_Abstract_Interfaces.
12838 (Find_Interface, Find_Interface_Tag, Find_Interface_ADT): Modified to
12839 support concurrent types implementing interfaces.
12840 (Find_Implemented_Interface): Removed. All the calls to this subprogram
12841 specify kind Any_Limited_Interface, and this functionality is already
12842 provided by the function Has_Abstract_Interfaces.
12843 (Remove_Side_Effects): replace Controlled_Type by
12844 CW_Or_Controlled_Type whenever the issue is related to
12845 using or not the secondary stack.
12846
12847 * par-ch12.adb (P_Formal_Type_Definition): Update calls to
12848 P_Interface_Type_Definition to fulfill the new interface (the formal
12849 Is_Synchronized is no longer required).
12850
12851 * Make-lang.in (GNAT_ADA_OBJS): Addition of exp_atag.o
12852 Update dependencies.
12853
12854 * exp_atag.ads, exp_atag.adb: New file
12855
128562007-04-06 Ed Schonberg <schonberg@adacore.com>
12857 Bob Duff <duff@adacore.com>
12858 Cyrille Comar <comar@adacore.com>
12859
12860 * exp_ch7.ads, exp_ch7.adb (Find_Final_List): If the access type is
12861 anonymous, use finalization list of enclosing dynamic scope.
12862 (Expand_N_Package_Declaration): For a library package declaration
12863 without a corresponding body, generate RACW subprogram bodies in the
12864 spec (just as we do for the task activation call).
12865 (Convert_View): Split Is_Abstract flag into Is_Abstract_Subprogram and
12866 Is_Abstract_Type. Make sure these are called only when appropriate.
12867 Remove all code for DSP option
12868 (CW_Or_Controlled_Type): new subprogram.
12869
9e94c78f 128702007-04-06 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
12871 Ed Schonberg <schonberg@adacore.com>
12872 Gary Dismukes <dismukes@adacore.com>
12873
12874 * exp_ch9.ads, exp_ch9.adb (Family_Offset): Add new 'Cap' boolean
12875 parameter. If it is set to true, return a result capped according to
12876 the global upper bound for the index of an entry family.
12877 (Family_Size): Add new 'Cap' boolean parameter. Pass it to Family_Offset
12878 (Build_Find_Body_Index): Adjust for above change.
12879 (Entry_Index_Expression): Likewise.
12880 (Is_Potentially_Large_Family): New function extracted from...
12881 (Collect_Entry_Families): ...here. Call it to detect whether the family
12882 is potentially large.
12883 (Build_Entry_Count_Expression): If the family is potentially large, call
12884 Family_Size with 'Cap' set to true.
12885 (Expand_N_Protected_Type_Declaration, Expand_N_Protected_Body): Generate
12886 a protected version of an operation declared in the private part of
12887 a protected object, because they may be invoked through a callback.
12888 (Set_Privals): If the type of a private component is an anonymous access
12889 type, do not create a new itype for each protected body.
12890 If the body of a protected operation creates
12891 controlled types (including allocators for class-widetypes), the
12892 body of the corresponding protected subprogram must include a
12893 finalization list.
12894 (Build_Activation_Chain_Entity): Build the chain entity for extended
12895 return statements.
12896 (Type_Conformant_Parameters): Use common predicate Conforming_Types
12897 to determine whether operation overrides an inherited primitive.
12898 (Build_Wrapper_Spec): Add code to examine the parents while looking
12899 for a possible overriding candidate.
12900 (Build_Simple_Entry_Call): Set No_Initialization on the object used to
12901 hold an actual parameter value since its initialization is separated
12902 from the the declaration. Prevents errors on null-excluding access
12903 formals.
12904
129052007-04-06 Thomas Quinot <quinot@adacore.com>
8a57e48f 12906 Pablo Oliveira <oliveira@adacore.com>
4b437c6b
AC
12907
12908 * exp_dist.ads, exp_dist.adb (Build_To_Any_Call, Build_From_Any_Call):
12909 Do an Unchecked_Conversion to handle the passage from the Underlying
12910 Type to the Base Type when calling Build_To_Any_Call and
12911 Build_From_Any_Call.
12912 (Build_Actual_Object_Declaration): Set Object's Ekind to E_Variable or
12913 E_Constant, depending upon Variable formal.
12914 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
12915 PolyORB_Support.Build_Subprogram_Receiving_Stubs): For a formal
12916 parameter that requires an extra constrained parameter, declare
12917 temporary for actual as a variable, not a constant.
12918 (Add_RACW_Primitive_Declarations_And_Bodies): Generate bodies only when
12919 the unit being compiled is the one that contains the stub type.
12920 Change primitive operation name for the RACW associated with a RAS
12921 from Call to _Call so it cannot clash with any legal identifier.
12922 (PolyORB_Support.Add_RACW_Write_Attribute): Remove unused constant
12923 Is_RAS.
12924 (Append_RACW_Bodies): New subprogram.
12925 (Expand_Receiving_Stubs_Bodies): Pass a 'Stmts' list to
12926 Add_Receiving_Stubs_To_Declarations functions.
12927 When expanding a package body, this list correspond to the
12928 statements in the HSS at the end of the pacakge.
12929 When expanding a package spec, this list correspond to the
12930 spec declarations.
12931 (Add_Receiving_Stubs_To_Declarations): Append the function
12932 registering the receiving stubs at the end of the 'Stmts' list.
12933 (RCI_Package_Locator): Pass the new Version generic formal when
12934 instantiating a RCI_Locator package.
12935 (Build_From_Any_Function): To compute the High bound for an
12936 unconstrained array actual, we add the Low bound with the length.
12937 Thus we must convert the low bound and the length to an appropriate
12938 type before doing the sum.
12939 (Build_Subprogram_Receiving_Stubs, PolyORB):
12940 * Retrieve the extra formals parameters at the
12941 end of the parameter stream.
12942 * Use Move_Any_Value to write back out parameters
12943 after executing the request as it is more efficient
12944 than Copy_Any_Value.
12945 * Build the any containing Extra Formals with the
12946 appropriate typecode.
12947 (PolyORB_Support.Helpers.Append_Record_Traversal): Nothing to do for an
12948 empty Component_List.
12949 (Build_Actual_Object_Declaration): New subprogram. Build and insert into
12950 the tree the declaration for an object that serves as actual parameter
12951 in server-side stubs.
12952 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
12953 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
12954 Use Build_Actual_Object_Declaration to prepare the actuals.
12955 (Add_Parameter_To_NVList): Set the parameter mode to In for
12956 Extra Constrained Parameters.
12957 (Build_General_Calling_Stubs): Set the parameter type to boolean for
12958 Extra Constrained parameters.
12959 (Build_To_Any_Function, Build_From_Any_Function,
12960 Built_TypeCode_Function): When Typ is implicit, call the correct
12961 function with the first not implicit parent type.
12962 (TC_Rec_Add_Process_Element, FA_Rec_Add_Process_Element,
12963 (FA_Ary_Add_Process_Element): When Datum is an Any, we cannot infer the
12964 typecode from the Etype. Therefore we retrieve the correct typecode
12965 with a call to Get_Any_Type.
12966 (Copy_Specification): Do controlling formal type substitution based on
12967 Is_Controlling_Formal flag, instead of caller-provided object type.
12968 (Build_Subprogram_Calling_Stubs): When retrieveing the original spec for
12969 a RACW primitive operation, we might get a subprogram declaration for an
12970 ancestor of the RACW designated type (not for the designated type
12971 itself), in the case where this operation is inherited. In this case we
12972 have no easy means of determining the original tagged type for which
12973 the primitive was declared, so instead we now rely on
12974 Copy_Specification to use the Is_Controlling_Formal flag to determine
12975 which formals require type substitution.
12976
129772007-04-06 Robert Dewar <dewar@adacore.com>
12978 Ed Schonberg <schonberg@adacore.com>
12979
12980 * exp_intr.adb (Expand_Exception_Call): Calls to subprograms in
12981 GNAT.Current_Exception are not allowed if pragma Restrictions
12982 (No_Exception_Propagation) is set and in any case make the associated
12983 handler unsuitable as a target for a local raise statement.
12984 (Expand_Dispatching_Constructor_Call): Replace generation of call to the
12985 run-time subprogram CW_Membership by call to Build_CW_Membership.
12986 (Expand_Dispatching_Constructor_Call): If the dispatching tag is given
12987 by a function call, a temporary must be created before expanding the
12988 Constructor_Call itself, to prevent out-of-order elaboration in the
12989 back-end when stack checking is enabled..
12990
129912007-04-06 Ed Schonberg <schonberg@adacore.com>
12992
12993 * exp_pakd.adb (Expand_Packed_Boolean_Operator): The bounds of the
12994 result are the bounds of the left operand, not the right.
12995
129962007-04-06 Ed Schonberg <schonberg@adacore.com>
12997
12998 * exp_strm.adb
12999 (Build_Mutable_Record_Write_Procedure): For an Unchecked_Union type, use
13000 discriminant defaults.
13001 (Build_Record_Or_Elementary_Output_Procedure): Ditto.
13002 (Make_Component_List_Attributes): Ditto.
13003
130042007-04-06 Ed Schonberg <schonberg@adacore.com>
13005 Bob Duff <duff@adacore.com>
13006
13007 * sem_aggr.adb (Resolve_Record_Aggregate): In semantics-only mode treat
13008 an association with a box as providing a value even though the
13009 initialization procedure for the type is not available.
13010 (Resolve_Record_Aggregate): Check that a choice of an association with a
13011 box corresponds to a component of the type.
13012 (Resolve_Record_Aggregate): Split Is_Abstract flag into
13013 Is_Abstract_Subprogram and Is_Abstract_Type.
13014
13015 * exp_tss.adb (Base_Init_Proc): Use Is_Type instead of Type_Kind for
13016 assert.
13017
13018 * inline.adb (Add_Inlined_Body): Split Is_Abstract flag into
13019 Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
13020 called only when appropriate.
13021
130222007-04-06 Olivier Hainque <hainque@adacore.com>
13023
13024 * g-alleve.ads (Low Level Vector type definitions): Map each to the
13025 associated vector view instead of all to the unsigned char view.
13026
13027 * g-altcon.adb (Generic_Conversions): New internal generic package,
13028 offering facilities for all the Vector/View conversion routines
13029 implemented by this unit.
13030 (To_View/To_Vector - all versions): Reimplemented in a systematic
13031 manner, using the internal Generic_Conversions facilities.
13032
130332007-04-06 Pascal Obry <obry@adacore.com>
13034
13035 * g-arrspl.adb (Free) [Element_Access]: New routine to free the source
13036 string.
13037 (Create): Free the source string before storing the new one.
13038
130392007-04-06 Vincent Celier <celier@adacore.com>
13040
13041 * g-debpoo.adb (Validity): New package with a complete new
13042 implementation of subprograms Is_Valid and Set_Valid.
13043 (Is_Valid): Move to local package Validity
13044 (Set_Valid): Move to local package Validity
13045
130462007-04-06 Arnaud Charlet <charlet@adacore.com>
8a57e48f 13047 Pablo Oliveira <oliveira@adacore.com>
4b437c6b
AC
13048
13049 * g-expect.adb (Get_Command_Output): When expanding the output buffer
13050 we must ensure that there is enough place for the new data we are going
13051 to copy in.
13052
130532007-04-06 Thomas Quinot <quinot@adacore.com>
13054
13055 * g-md5.ads, g-md5.adb (Digest): Fix off-by-one error in padding
13056 computation.
13057
130582007-04-06 Jose Ruiz <ruiz@adacore.com>
13059 Vincent Celier <celier@adacore.com>
13060
13061 * gnatcmd.adb (B_Start): Add prefix of binder generated file.
13062 (Stack_String): Add this String that contains the name of the Stack
13063 package in the project file.
13064 (Packages_To_Check_By_Stack): Add this list that contains the packages
13065 to be checked by gnatstack, which are the naming and the stack packages.
13066 (Check_Files): If no .ci files were specified for gnatstack we add all
13067 the .ci files belonging to the projects, including binder generated
13068 files.
13069 (Non_VMS_Usage): Document that gnatstack accept project file switches.
13070 (GNATCmd): Update the B_Start variable if we are in a VMS environment.
13071 Add gnatstack to the list of commands that use project file related
13072 switches, and get the single attribute Switches from the stack package
13073 in a project file when calling gnatstack. Parse the -U flag for
13074 processing files belonging to all projects in the project tree.
13075 Remove all processing for command Setup
13076
13077 * prj-attr.adb: Add new package Stack with single attribute Switches
13078
13079 * vms_conv.ads (Command_Type): Add command Stack.
13080 Move to body declarations that are only used in the body: types Item_Id,
13081 Translation_Type, Item_Ptr, Item and its subtypes.
13082
13083 * vms_conv.adb: (Initialize): Add data for new command Stack.
13084 Add declarations moved from the spec: types Item_Id, Translation_Type,
13085 Item_Ptr, Item and its subtypes.
13086 (Cargs_Buffer): New table
13087 (Cargs): New Boolean global variable
13088 (Process_Buffer): New procedure to create arguments
13089 (Place): Put character in table Buffer or Cargs_Buffer depending on the
13090 value of Cargs.
13091 (Process_Argument): Set Cargs when processing qualifiers for GNAT
13092 COMPILE
13093 (VMS_Conversion): Call Process_Buffer for table Buffer and, if it is not
13094 empty, for table Cargs_Buffer.
13095 (Initialize): Remove component Setup in Command_List
13096
130972007-04-06 Vincent Celier <celier@adacore.com>
13098
13099 * gprep.adb (Process_Files.Process_One_File): Use full file name when
13100 issuing pragma Source_Reference.
13101
131022007-04-06 Emmanuel Briot <briot@adacore.com>
13103
13104 * g-regpat.adb (Parse_Posix_Character_Class): Fix handling of
13105 [[:xdigit:]] character class.
13106 Also raise an exception when an invalid character class is used.
13107
131082007-04-06 Pascal Obry <obry@adacore.com>
13109
13110 * i-cstrea.ads: (fopen): Add encoding parameter.
13111 (freopen): Idem.
13112 Change reference from a-sysdep.c to sysdep.c in comment.
13113 Update copyright notice.
13114 This set of patch add support for the encoding form parameter.
13115
13116 * mingw32.h (S2WSU): New macro to convert from a string to a
13117 wide-string using the UTF-8 encoding. The S2WS macro supports now only
13118 standard 8bits encoding.
13119 (WS2SU): As above but converting from wide-sring to string.
13120 This is needed as it is necessary to have access to both versions in the
13121 runtime for the form parameter encoding support.
13122 This set of patch add support for the encoding form parameter.
13123 (S2WS): Improve implementation to handle cases where the filename is not
13124 UTF-8 encoded. In this case we default to using the current code page
13125 for the conversion.
13126
13127 * s-crtl-vms64.ads, s-crtl.ads (Filename_Encoding): New enumeration
13128 type (UTF8, ASCII_8bits). This enumeration has a rep clause to match
13129 the constants defined in adaint.h.
13130 (fopen): Add encoding parameter.
13131 (freopen): Idem.
13132
13133 * s-ficobl.ads (AFCB): Add Encoding field to record the filename
13134 encoding. This is needed for the Reset routine (freopen low level-call).
13135
13136 * s-fileio.adb (Open): Decode encoding form parameter and set the
13137 corresponding encoding value into AFCB structure.
13138 (Reset): Pass the encoding value to freopen.
13139 (Close): Move the call to Lock_Task to the beginning of the procedure.
13140
131412007-04-06 Geert Bosch <bosch@adacore.com>
13142 Robert Dewar <dewar@adacore.com>
13143
13144 * i-fortra.ads: Add Double_Complex type.
13145
13146 * impunit.adb: (Is_Known_Unit): New function
13147 Add Gnat.Byte_Swapping
13148 Add GNAT.SHA1
13149 Add new Ada 2005 units
13150 Ada.Numerics.Generic_Complex_Arrays, Ada.Numerics.Generic_Real_Arrays,
13151 Ada.Numerics.Complex_Arrays, Ada.Numerics.Real_Arrays,
13152 Ada.Numerics.Long_Complex_Arrays, Ada.Numerics.Long_Long_Complex_Arrays,
13153 Ada.Numerics.Long_Long_Real_Arrays and Ada.Numerics.Long_Real_Arrays
13154
13155 * impunit.ads (Is_Known_Unit): New function
13156
13157 * a-ngcoar.adb, a-ngcoar.ads, a-ngrear.adb,
13158 a-ngrear.ads, a-nlcoar.ads, a-nllcar.ads, a-nllrar.ads, a-nlrear.ads,
13159 a-nucoar.ads, a-nurear.ads, g-bytswa.adb, g-bytswa-x86.adb,
13160 g-bytswa.ads, g-sha1.adb, g-sha1.ads, i-forbla.ads, i-forlap.ads,
13161 s-gearop.adb, s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb,
13162 s-gecola.ads, s-gerebl.adb, s-gerebl.ads, s-gerela.adb, s-gerela.ads:
13163 New files.
13164
13165 * Makefile.rtl: Add g-bytswa, g-sha1, a-fzteio and a-izteio
13166
13167 * a-fzteio.ads, a-izteio.ads: New Ada 2005 run-time units.
13168
9e94c78f 131692007-04-06 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
13170 Arnaud Charlet <charlet@adacore.com>
13171
13172 * init.c: Reuse PA/HP-UX code for IA-64/HP-UX, except
13173 __gnat_adjust_context_for_raise.
13174 (__gnat_init_float): on x86 vxworks 5.x and 6.x, we use the same
13175 implementation of floating point operations as native x86 targets.
13176 So the FPU should be initialized in the same way using finit. Fix
13177 floating point operations accuracy issues.
13178 (__gnat_install_handler, case FreeBSD): Use proper type for sa_sigaction
13179 member in struct sigaction, so as to avoid warning for incompatible
13180 pointer types.
13181
9e94c78f 131822007-04-06 Serguei Rybin <rybin@adacore.com>
4b437c6b
AC
13183
13184 * lib.ads, lib.adb (Tree_Read): Release the memory occupied by the
13185 switches from previously loaded tree
13186
131872007-04-06 Thomas Quinot <quinot@adacore.com>
13188
13189 * lib-writ.adb (Write_With_Lines): Factor duplicated code between the
13190 cases where a given dependency has a body or not.
13191 (Write_With_File_Names): New subprogram, common code for the two cases
13192 above.
13193
131942007-04-06 Ed Schonberg <schonberg@adacore.com>
13195 Javier Miranda <miranda@adacore.com>
13196
13197 * lib-xref.ads, lib-xref.adb:
13198 Modify the loop that collects type references, to include interface
13199 types that the type implements. List each of these interfaces when
13200 building the entry for the type.
13201 (Generate_Definition): Initialize component Def and Typ of new entry
13202 in table Xrefs, to avoid to have these components unitialized.
13203 (Output_References): Split Is_Abstract flag into
13204 Is_Abstract_Subprogram and Is_Abstract_Type.
13205 (Generate_Reference): Add barrier to do not generate the warning
13206 associated with Ada 2005 entities with entities generated by the
13207 expander.
13208
132092007-04-06 Robert Dewar <dewar@adacore.com>
13210 Arnaud Charlet <charlet@adacore.com>
13211 Vincent Celier <celier@adacore.com>
13212
13213 * gnat_rm.texi, gnat_ugn.texi: Add -gnatyl documentation
13214 Update 'Exception Handling Control' chapter which was outdated.
13215 Minor fix to documentation of -gnatwq
13216 Remove section "Adapting the Run Time to a New C++ Compiler" because
13217 it is now obsolete.
13218 Add passage on need of -nostart-files in some non-ada-main cases.
13219 Document new switch -eS (/STANDARD_OUTPUT_FOR_COMMANDS) for gnatmake
13220 Update documentation about Interfacing with C++
13221 Add documentation for new gnatmake switch -p
13222 Add missing protocol part in URLs.
13223 Document -gnatyA
13224 Document pragma Compile_Time_Error
13225 Add documentation for Object_Size indicating that stand alone
13226 objects can have a larger size in some cases.
13227 Add node for GNAT.Byte_Swapping, GNAT.SHA1
13228 Update reference to the Ravenscar profile.
13229 Document pragma Unreferenced_Objects
13230
13231 * gnat-style.texi: Fix typo
13232
132332007-04-06 Vincent Celier <celier@adacore.com>
13234
13235 * mlib.adb (Building_Library): Only output "building a library..." in
13236 verbose mode
13237
13238 * mlib-prj.adb (Build_Library): Only output lists of object and ALI
13239 files in verbose mode.
13240
13241 * mlib-utl.adb (Ar): Only output the first object files when not in
13242 verbose mode.
13243 (Gcc): Do not display all the object files if not in verbose mode, only
13244 the first one.
13245
132462007-04-06 Robert Dewar <dewar@adacore.com>
13247
13248 * namet.ads, namet.adb (wn): Improve this debugging routine. Calling
13249 it no longer destroys the contents of Name_Buffer or Name_Len and
13250 non-standard and invalid names are handled better.
13251 (Get_Decoded_Name_String): Improve performance by using
13252 Name_Has_No_Encodings flag in the name table.
13253 (Is_Valid_Name): New function to determine whether a Name_Id is valid.
13254 Used for debugging printouts.
13255
132562007-04-06 Robert Dewar <dewar@adacore.com>
13257 Javier Miranda <miranda@adacore.com>
13258 Bob Duff <duff@adacore.com>
13259
13260 * par-ch3.adb: (P_Type_Declaration): Set Type_Token_Location
13261 (P_Interface_Type_Definition): Remove the formal Is_Synchronized because
13262 there is no need to generate always a record_definition_node in case
13263 of synchronized interface types.
13264 (P_Type_Declaration): Update calls to P_Interface_Type_Definition.
13265 (P_Null_Exclusion): For AI-447: Remove warnings about "not null" being
13266 illegal in Ada 95, in cases where it is legal. Change the warnings to
13267 errors in other cases. Don't give the error unless the "not null"
13268 parses properly. Correct the source position at which the error occurs.
13269 (P_Known_Discriminant_Part_Opt): Pass Allow_Anonymous_In_95 => True to
13270 P_Null_Exclusion, to suppress "not null" warnings.
13271 (P_Identifier_Declarations): Code cleanup. Removed unrequired label and
13272 associated goto statements.
13273
13274 * par-endh.adb (Pop_End_Context): Allow more flexibility in placement
13275 of END RECORD
13276
13277 * scans.ads (Type_Token_Location): New flag
13278
13279 * par-ch6.adb (P_Mode): Check specifically for case of IN ACCESS
13280 (P_Formal_Part): Pass Allow_Anonymous_In_95 => True to
13281 P_Null_Exclusion, to suppress "not null" warnings.
13282
132832007-04-06 Robert Dewar <dewar@adacore.com>
13284 Javier Miranda <miranda@adacore.com>
13285 Bob Duff <duff@adacore.com>
13286 Vincent Celier <celier@adacore.com>
13287
13288 * par-prag.adb (Prag): Add dummy entry for pragma Compile_Time_Error
13289 (Extensions_Allowed): No longer sets Ada_Version
13290 Entry for pragma Unreferenced_Objects
13291
13292 * sem_prag.adb (Analyze_Pragma, case Priority): Force with of
13293 system.tasking if pragma priority used in a procedure
13294 (Analyze_Pragma, case Warning): Handle dot warning switches
13295 (Process_Compile_Time_Warning_Or_Error): New procedure
13296 (Analyze_Pragma): Add processing for Compile_Time_Error
13297 Add support for extra arguments External_Name and Link_Name.
13298 Remove code associated with pragmas CPP_Virtual and CPP_Vtable.
13299 (Process_Import_Or_Interface): Add support for the use of pragma Import
13300 with tagged types.
13301 (Extensions_Allowed): No longer affects Ada_Version
13302 (Analyze_Pragma): Split Is_Abstract flag into Is_Abstract_Subprogram and
13303 Is_Abstract_Type. Make sure these are called only when appropriate.
13304 Add processing for pragma Unreferenced_Objects
13305
13306 * snames.h, snames.ads, snames.adb: Add entry for pragma
13307 Compile_Time_Error
13308 Add new standard name Minimum_Binder_Options for new gprmake
13309 Add new standard names for gprmake: Archive_Suffix,
13310 Library_Auto_Init_Supported, Library_Major_Minor_Id_Supported,
13311 Library_Support, Library_Version_Options,
13312 Shared_Library_Minimum_Options,
13313 Shared_Library_Prefix, Shared_Library_Suffix, Symbolic_Link_Supported.
13314 Change Name_Call to Name_uCall so that it cannot clash with a legal
13315 subprogram name.
13316 Add new standard names Mapping_Spec_Suffix and Mapping_Body_Suffix
13317 Append C_Plus_Plus to convention identifiers as synonym for CPP
13318 Add new standard names Stack and Builder_Switches
13319 Add new standard names: Compiler_Minimum_Options, Global_Config_File,
13320 Library_Builder, Local_Config_File, Objects_Path, Objects_Path_File,
13321 Run_Path_Option, Toolchain_Version.
13322 Entry for pragma Unreferenced_Objects
13323
13324 * switch-c.adb (Scan_Front_End_Switches): Store correct -gnateD
13325 switches, without repetition of "eD". Make sure that last character of
13326 -gnatep= switch is not taken as -gnat switch character.
13327 Complete rewrite of circuit for handling saving compilation options
13328 Occasioned by need to support dot switchs for -gnatw, but cleans up
13329 things in general.
13330 -gnatX does not affect Ada_Version
13331 Include -gnatyA in -gnatg style switches
13332
13333 * sem_warn.ads, sem_warn.adb (Output_Unreferenced_Messages): Exclude
13334 warnings on return objects.
13335 (Warn_On_Useless_Assignment): Exclude warnings on return objects
13336 (Set_Dot_Warning_Switch): New procedure
13337 (Check_References): Add missing case of test for
13338 Has_Pragma_Unreferenced_Objects
13339 (Output_Unreferenced_Messages): Implement effect of new pragma
13340 Unreferenced_Objects, remove special casing of limited controlled
13341 variables.
13342
133432007-04-06 Vincent Celier <celier@adacore.com>
13344
13345 * prj-ext.adb (Initialize_Project_Path): New procedure that initialize
13346 the default project path, initially done during elaboration of the
13347 package.
13348 If the prefix returned by Sdefault is null, get the prefix from a call
13349 to Executable_Prefix_Path.
13350 (Project_Path): Call Initialize_Project_Path if Current_Project_Path is
13351 null.
13352
13353 * prj-nmsc.adb (Get_Path_Names_And_Record_Sources): Use the non
13354 canonical directory name to open the directory from which files are
13355 retrieved.
13356 (Record_Other_Sources): Idem.
13357 (Locate_Directory): Add the possibility to create automatically missing
13358 directories when Setup_Projects is True.
13359 Call Locate_Directory so that the directory will be created when
13360 Setup_Projects is True, for object dir, library dir, library ALI dir,
13361 library source copy dir and exec dir.
13362
13363 * prj-pp.adb (Max_Line_Length): Set to 255 for compatibility with older
13364 versions of GNAT.
13365
133662007-04-06 Robert Dewar <dewar@adacore.com>
13367
13368 * sem_ch13.ads, sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
13369 Use First/Next_Component_Or_Discriminant
13370 (Analyze_Record_Representation_Clause):
13371 Use First/Next_Component_Or_Discriminant
13372 (Check_Component_Overlap): Use First/Next_Component_Or_Discriminant
13373 (Analyze_Attribute_Definition_Clause, case Value_Size): Reject
13374 definition if type is unconstrained.
13375 (Adjust_Record_For_Reverse_Bit_Order): New procedure
13376 (Analyze_Attribute_Definition_Clause): Split Is_Abstract flag into
13377 Is_Abstract_Subprogram and Is_Abstract_Type.
13378 (Adjust_Record_For_Reverse_Bit_Order): New procedure
13379
13380 * repinfo.adb (List_Record_Info): Use First/
13381 Next_Component_Or_Discriminant.
13382
13383 * style.ads, styleg-c.adb, styleg-c.ads (Check_Array_Attribute_Index):
13384 New procedure.
13385
13386 * stylesw.ads, stylesw.adb: Recognize new -gnatyA style switch
13387 Include -gnatyA in default switches
13388
13389 * opt.ads: (Warn_On_Non_Local_Exception): New flag
13390 (Warn_On_Reverse_Bit_Order): New flag
13391 (Extensions_Allowed): Update the documentation.
13392 (Warn_On_Questionable_Missing_Parens): Now on by default
13393
13394 * usage.adb: Add documentation of -gnatw.x/X switches
13395 Document new -gnatyA style switch
13396 -gnatq warnings are on by default
13397
133982007-04-06 Ed Falis <falis@adacore.com>
13399
13400 * s-carun8.adb, s-carsi8.adb (Compare_Array_?8): modify so that last
13401 full word is no longer compared twice.
13402
134032007-04-06 Ed Schonberg <schonberg@adacore.com>
13404
13405 * sem_ch10.adb (Install_Limited_Context_Clauses.
13406 Expand_Limited_With_Clause): Use a new copy of selector name in the
13407 call to Make_With_Clause. This fixes the tree structure for ASIS
13408 purposes. Nothing is changed in the compiler behaviour.
13409 (Process_Body_Clauses): Handle properly use clauses whose prefix is
13410 a package renaming.
13411 (Install_Limited_With_Clauses): Do not install non-limited view when it
13412 is still incomplete.
13413
134142007-04-06 Ed Schonberg <schonberg@adacore.com>
13415 Gary Dismukes <dismukes@adacore.com>
13416
13417 * sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual
13418 when capturing size information, instead of base type, which for a
13419 formal array type will be the unconstrained type.
13420 (Analyze_Formal_Object_Declaration): Add check for illegal default
13421 expressions for a formal in object of a limited type.
13422 (Instantiate_Object): Ditto.
13423 (Check_Formal_Package_Instance): Skip entities that are formal objects,
13424 because they were defaulted in the formal package and no check applies
13425 to them.
13426 (Check_Formal_Package_Instance): Extend conformance check to other
13427 discrete types beyond Integer.
13428 (Process_Default): Copy directly the unmatched formal. A generic copy
13429 has already been performed in Analyze_Formal_Package.
13430 (Analyze_Associations): If a formal subprogram has no match, check for
13431 partial parametrization before looking for a default, to prevent
13432 spurious errors.
13433 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Do
13434 not set the instantiation environment before analyzing the actuals.
13435 Fixes regression on 8515-003 with implementation of AI-133.
13436 Set_Instance_Env checks whether the generic unit is a predefined
13437 unit, in which case the instance must be analyzed with the latest Ada
13438 mode. This setting must take place after analysis of the actuals,
13439 because the actuals must be analyzed and frozen in the Ada mode extant
13440 outside of the current instantiation.
13441 (Save_Env, Restore_Env): Preserve and restore the configuration
13442 parameters so that predefined units can be compiled in the proper Ada
13443 mode.
13444 (Analyze_Formal_Object_Declaration,Analyze_Formal_Subprogram,
13445 Instantiate_Type): Split Is_Abstract flag into Is_Abstract_Subprogram
13446 and Is_Abstract_Type.
13447 (Analyze_Formal_Package): For better error recovery, Add exception
13448 handler to catch Instantion_Error, which can be raised in
13449 Analyze_Associations
13450
134512007-04-06 Ed Schonberg <schonberg@adacore.com>
13452 Bob Duff <duff@adacore.com>
13453 Gary Dismukes <dismukes@adacore.com>
13454
13455 * sem_ch4.adb (Try_Primitive_Operation): The call is legal if the
13456 prefix type is a discriminated subtype of the type of the formal.
13457 (Analyze_Allocator): Collect all coextensions regardless of the context.
13458 Whether they can be allocated statically is determined in exp_ch4.
13459 (Analyze_Selected_Component): If the prefix is a limited view and the
13460 non-limited view is available, use the non-limited one.
13461 (Operator_Check): For "X'Access = Y'Access" (which is ambiguous, and
13462 therefore illegal), suggest a qualified expression rather than a type
13463 conversion, because a type conversion would be illegal in this context.
13464 (Anayze_Allocator): Trace recursively all nested allocators so that all
13465 coextensions are on the corresponding list for the root. Do no mark
13466 coextensions if the root allocator is within a declaration for a stack-
13467 allocated object, because the access discriminants will be allocated on
13468 the stack as well.
13469 (Analyze_Call): Remove restriction on calls to limited functions for the
13470 cases of generic actuals for formal objects, defaults for formal objects
13471 and defaults for record components.
13472 (Analyze_Allocator): Before analysis, chain coextensions on the proper
13473 element list. Their expansion is delayed until the enclosing allocator
13474 is processed and its finalization list constructed.
13475 (Try_Primitive_Operation): If the prefix is a concurrent type, looks
13476 for an operation with the given name among the primitive operations of
13477 the corresponding record type.
13478 (Analyze_Selected_Component): If the prefix is a task type that
13479 implements an interface, and there is no entry with the given name,
13480 check whether there is another primitive operation (e.g. a function)
13481 with that name.
13482 (Try_Object_Operation, Analyze_One_Call, Try_Indexed_Call): Handle
13483 properly the indexing of a function call written in prefix form, where
13484 the function returns an array type, and all parameters of the function
13485 except the first have defaults.
13486 (Analyze_Equality_Op): If this is a call to an implicit inequality, keep
13487 the original operands, rather than relocating them, for efficiency and
13488 to work properly when an operand is overloaded.
13489 (Analyze_Allocator,Operator_Check,Remove_Abstract_Operations): Split
13490 Is_Abstract flag into Is_Abstract_Subprogram and Is_Abstract_Type.
13491 (Analyze_Selected_Component): If the prefix is a private extension, only
13492 scan the visible components, not those of the full view.
13493 (Try_Primitive_Operation): If the operation is a procedure, collect all
13494 possible interpretations, as for a function, because in the presence of
13495 classwide parameters several primitive operations of the type can match
13496 the given arguments.
13497
134982007-04-06 Ed Schonberg <schonberg@adacore.com>
13499 Robert Dewar <dewar@adacore.com>
13500
13501 * sem_ch5.adb (Analyze_Assignment): Reject a right-hand side that is a
13502 tag-indeterminate call to an abstract function, when the left-hand side
13503 is not classwide.
13504 (Analyze_Loop_Statement): Improve detection of infinite loops
13505
135062007-04-06 Ed Schonberg <schonberg@adacore.com>
13507 Thomas Quinot <quinot@adacore.com>
13508
13509 * sem_ch7.ads, sem_ch7.adb (Inspect_Deferred_Constant_Completion): Move
13510 out of Analyze_Package_Declaration, because processing must be applied
13511 to package bodies as well, for deferred constants completed by pragmas.
13512 (Analyze_Package_Declaration): When the package declaration being
13513 analyzed does not require an explicit body, call Check_Completion.
13514 (May_Need_Implicit_Body): An implicit body is required when a package
13515 spec contains the declaration of a remote access-to-classwide type.
13516 (Analyze_Package_Body): If the package contains RACWs, append the
13517 pending subprogram bodies generated by exp_dist at the end of the body.
13518 (New_Private_Type,Unit_Requires_Body): Split Is_Abstract flag into
13519 Is_Abstract_Subprogram and Is_Abstract_Type.
13520 (Preserve_Full_Attributes): The full entity list is not an attribute
13521 that must be preserved from full to partial view.
13522
13523 * sem_dist.adb (Add_RAS_Dereference_TSS):
13524 Change primitive name to _Call so it cannot clash with any legal
13525 identifier, and be special-cased in Check_Completion.
13526 Mark the full view of the designated type for the RACW associated with
13527 a RAS as Comes_From_Source to get proper view switching when installing
13528 private declarations.
13529 Provite a placeholder nested package body along with the nested spec
13530 to have a place for Append_RACW_Bodies to generate the calling stubs
13531 and stream attributes.
13532
135332007-04-06 Ed Schonberg <schonberg@adacore.com>
13534 Robert Dewar <dewar@adacore.com>
13535
13536 * sem_ch8.adb (Has_Components): If the argument is an incomplete type
13537 that is a limited view, check the non-limited view if available.
13538 (Undefined): Refine error message for missing with of Text_IO
13539 (Find_Expanded_Name): Use Is_Known_Unit for more accurate error message
13540 to distinguish real missing with cases.
13541 Fix format of all missing with messages
13542 (Analyze_Subprogram_Renaming): Emit proper error message on illegal
13543 renaming as body when renamed entity is abstract.
13544
135452007-04-06 Ed Schonberg <schonberg@adacore.com>
13546 Javier Miranda <miranda@adacore.com>
13547
13548 * sem_type.ads, sem_type.adb (Has_Abstract_Interpretation): Make
13549 predicate recursive, to handle complex expressions on literals whose
13550 spurious ambiguity comes from the abstract interpretation of some
13551 subexpression.
13552 (Interface_Present_In_Ancestor): Add support to concurrent record
13553 types.
13554 (Add_One_Interp,Disambiguate): Split Is_Abstract flag into
13555 Is_Abstract_Subprogram and Is_Abstract_Type.
13556
135572007-04-06 Ed Schonberg <schonberg@adacore.com>
13558 Javier Miranda <miranda@adacore.com>
13559
13560 * sem_util.ads, sem_util.adb (Object_Access_Level): If the object is a
13561 dereference of a local object R created as a reference to another
13562 object O, use the access level of O.
13563 (Matches_Prefixed_View_Profile): Use common predicate Conforming_Types,
13564 rather than local Same_Formal_Type, to check whether protected operation
13565 overrides an inherited one.
13566 (Same_Formal_Type): New predicate, used when matching signatures of
13567 overriding synchronized operations, to handle the case when a formal
13568 has a type that is a generic actual.
13569 (Is_Aliased_View): Replace check on E_Task_Type and E_Protected_Type by
13570 predicate Is_Concurrent_Type. This ensures supportin case of subtypes.
13571 (Needs_One_Actual): New predicate, for Ada 2005 use, to resolve
13572 syntactic ambiguities involving indexing of function calls that return
13573 arrays.
13574 (Abstract_Interface_List): New subprogram that returns the list of
13575 abstract interfaces associated with a concurrent type or a
13576 concurrent record type.
13577 (Interface_Present_In_Parent): New subprogram used to check if a
13578 given type or some of its parents implement a given interface.
13579 (Collect_Abstract_Interfaces): Add support for concurrent types
13580 with interface types.
13581 (Has_Abstract_Interfaces): Add support for concurrent types with
13582 interface types.
13583 (Is_Parent): New subprogram that determines whether E1 is a parent
13584 of E2. For a concurrent type its parent is the first element of its
13585 list of interface types; for other types this function provides the
13586 same result than Is_Ancestor.
13587 (Enclosing_Subprogram): Add test for N_Extended_Return_Statement.
13588 (Collect_Synchronized_Interfaces): Removed because the subprogram
13589 Collect_Abstract_Interfaces provides this functionality.
13590 (Collect_Abstract_Interfaces): Minor update to give support to
13591 concurrent types and thus avoid undesired code duplication.
13592 (Get_Subprogram_Entity): Handle entry calls.
13593 (May_Be_Lvalue): Include actuals that appear as in-out parameters in
13594 entry calls.
13595 (Enter_Name): Do not give -gnatwh hiding warning for record component
13596 entities, they never result in hiding.
13597
135982007-04-06 Ed Schonberg <schonberg@adacore.com>
13599 Robert Dewar <dewar@adacore.com>
13600
13601 * sinfo.ads, sinfo.adb (Coextensions): New element list for allocators,
13602 to chain nested components that are allocators for access discriminants
13603 of the enclosing object.
13604 Add N_Push and N_Pop nodes
13605 New field Exception_Label added
13606 (Local_Raise_Statements): New field in N_Exception_Handler_Node
13607 (Local_Raise_Not_OK): New flag in N_Exception_Handler_Node
13608 (Is_Coextension): New flag for allocators, to mark allocators that
13609 correspond to access discriminants of dynamically allocated objects.
13610 (N_Block_Statement): Document the fact that the corresponding entity
13611 can be an E_Return_Statement.
13612 (Is_Coextension): New flag for allocators.
13613 Remove all code for DSP option
13614
13615 * sprint.ads, sprint.adb: Display basic information for class_wide
13616 subtypes. Add handling of N_Push and N_Pop nodes
13617
136182007-04-06 Arnaud Charlet <charlet@adacore.com>
13619
13620 * s-tpobop.adb (Exceptional_Complete_Entry_Body): Undefer abortion
13621 before propagating exception.
13622
136232007-04-06 Olivier Hainque <hainque@adacore.com>
13624
13625 * tracebak.c (PC_ADJUST - ia64): -4 instead of -16, expected to yield
13626 an address always within the call instruction from a return address.
13627
136282007-04-06 Olivier Hainque <hainque@adacore.com>
9e94c78f 13629 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
13630
13631 * trans.c (call_to_gnu) <TYPE_RETURNS_BY_TARGET_PTR_P>: Return an
13632 expression with a COMPOUND_EXPR including the call instead of emitting
13633 the call directly here.
13634 (gnat_to_gnu) <N_Slice>: Do not return a non-constant low bound if the
13635 high bound is constant and the slice is empty. Tidy.
13636 (tree_transform, case N_Op_Not): Handle properly the case where the
13637 operation applies to a private type whose full view is a modular type.
13638 (Case_Statement_To_gnu): If an alternative is an E_Constant with an
13639 Address_Clause, use the associated Expression as the GNAT tree
13640 representing the choice value to ensure the corresponding GCC tree is
13641 of the proper kind.
13642 (maybe_stabilize_reference): Stabilize COMPOUND_EXPRs as a whole
13643 instead of just the operands, as the base GCC stabilize_reference does.
13644 <CALL_EXPR>: New case. Directly stabilize the call if an lvalue is not
13645 requested; otherwise fail.
13646 (addressable_p) <COMPONENT_REF>: Do not test DECL_NONADDRESSABLE_P.
13647
136482007-04-06 Thomas Quinot <quinot@adacore.com>
13649
13650 * uintp.ads, uintp.adb (UI_Div_Rem): New subprogram, extending previous
13651 implementation of UI_Div.
13652 (UI_Div): Reimplement as a call to UI_Div_Rem.
13653 (UI_Rem): Take advantage of the fact that UI_Div_Rem provides the
13654 remainder, avoiding the cost of a multiplication and a subtraction.
13655 (UI_Modular_Inverse): Take advantage of the fact that UI_Div_Rem
13656 provides both quotient and remainder in a single computation.
13657 (UI_Modular_Exponentiation, UI_Modular_Inverse): New modular arithmetic
13658 functions for uint.
13659 (UI_Modular_Inverse): Add a note that the behaviour of this subprogram
13660 is undefined if the given n is not inversible.
13661
136622007-04-06 Olivier Hainque <hainque@adacore.com>
13663
13664 * utils2.c (known_alignment): Handle COMPOUND_EXPR, COND_EXPR and
13665 BIT_AND_EXPR. Handle also VIEW_CONVERT_EXPR, as the other conversion
13666 opcodes.
13667
9e94c78f 136682007-04-06 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
13669 Olivier Hainque <hainque@adacore.com>
13670
13671 * utils.c (update_pointer_to): Make a copy of the couple of FIELD_DECLs
13672 when updating the contents of the old pointer to an unconstrained array.
13673 (end_subprog_body): Set error_gnat_node to Empty.
13674 (write_record_type_debug_info): Do not be unduly sparing with our bytes.
13675 (unchecked_convert): For subtype to base type conversions, require that
13676 the source be a subtype if it is an integer type.
13677 (builtin_decls): New global, vector of available builtin functions.
13678 (gnat_pushdecl): Add global builtin function declaration nodes to the
13679 builtin_decls list.
13680 (gnat_install_builtins): Adjust comments.
13681 (builtin_function): Set DECL_BUILTIN_CLASS and DECL_FUNCTION_CODE before
13682 calling gnat_pushdecl, so that it knows when it handed a builtin
13683 function declaration node.
13684 (builtin_decl_for): Search the builtin_decls list.
13685
9e94c78f 136862007-04-06 Eric Botcazou <botcazou@adacore.com>
4b437c6b
AC
13687
13688 * s-stchop-vxworks.adb:
13689 (Stack_Check): Raise Storage_Error if the argument has wrapped around.
13690
136912007-04-06 Robert Dewar <dewar@adacore.com>
13692 Arnaud Charlet <charlet@adacore.com>
13693
13694 * a-diroro.ads: Inserted the pragma Unimplemented_Unit
13695
13696 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Ada_95 at start
13697 of files
13698 Add mention of -Sev (set initialize_scalars option from environment
13699 variable at run time) in gnatbind usage message.
13700
13701 * elists.ads, elists.adb: (Append_Unique_Elmt): New procedure
13702
13703 * fname-uf.ads: Minor comment fix
13704
13705 * osint.ads: Change pragma Elaborate to Elaborate_All
13706
13707 * par-load.adb: Add documentation.
13708
13709 * sem_cat.ads, sem_cat.adb: Minor code reorganization
13710
13711 * s-parint.ads (RCI_Locator) : Add 'Version' generic formal
13712
13713 * s-secsta.ads: Extra comments
13714
13715 * s-soflin.ads: Minor comment fixes
13716
13717 * s-stratt.ads (Block_Stream_Ops_OK): Removed.
13718
13719 * s-wchcon.ads: Minor comment addition
13720
13721 * treepr.adb: Minor change in message
13722 (Print_Name,Print_Node): Make these debug printouts more robust: print
13723 "no such..." instead of crashing on bad input.
13724
47ecd38d
RAE
137252007-03-30 Rafael Avila de Espindola <espindola@google.com>
13726
13727 * trans.c (Attribute_to_gnu): Use get_signed_or_unsigned_type
13728 instead of gnat_signed_or_unsigned_type.
13729 * utils.c (gnat_signed_or_unsigned_type): Remove.
13730 * misc.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove
13731 * gigi.h (gnat_signed_or_unsigned_type): Remove
13732
9645c3c5
RS
137332007-03-09 Roger Sayle <roger@eyesopen.com>
13734
13735 * cuintp.c (UI_To_gnu): Use fold_buildN calls instead of calling
13736 fold with the result of buildN.
13737 * decl.c (gnat_to_gnu_entity): Likewise.
13738 * trans.c (Attribute_to_gnu, gnat_to_gnu, emit_check): Likewise.
13739 * utils.c (finish_record_type, merge_sizes, max_size, convert):
13740 Likewise.
13741 * utils2.c (gnat_truthvalue_conversion, compare_arrays,
13742 nonbinary_modular_operation, build_binary_op, build_unary_op,
13743 build_cond_expr): Likewise.
13744
13745 * utils.c (convert): Use fold_build1 when casting values to void.
13746 * utils2.c (gnat_truthvalue_conversion): Use build_int_cst and
13747 fold_convert instead of convert when appropriate.
13748
c279aa90
BM
137492007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
13750
13751 * Make-lang.in: Add install-pdf target as copied from
13752 automake v1.10 rules.
13753
c2615f30
AS
137542007-02-28 Andreas Schwab <schwab@suse.de>
13755
13756 * Make-lang.in (doc/gnat_ugn_unw.texi): Depend on
13757 $(gcc_docdir)/include/gcc-common.texi and gcc-vers.texi.
13758 (doc/gnat-style.info): Likewise.
13759
7771bb62
BM
137602007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
13761
13762 * gnat-style.texi: Standardize title page.
13763 * gnat_rm.texi: Likewise.
13764 * gnat_ugn.texi: Likewise.
13765
ae19c041
MM
137662007-02-25 Mark Mitchell <mark@codesourcery.com>
13767
13768 * decl.c (annotate_value): Adjust for refactoring of tree_map
13769 hierarchy.
13770
fc8600f9
MM
137712007-02-24 Mark Mitchell <mark@codesourcery.com>
13772
13773 * decl.c (annotate_value): Adjust for refactoring of tree_map
13774 hierarchy.
13775
c0bca7e1
EB
137762007-02-21 Ed Schonberg <schonberg@adacore.com>
13777
13778 PR ada/18819
13779 * sem_ch3.adb (Create_Constrained_Components): for a subtype of an
13780 untagged derived type, add hidden components to keep discriminant
13781 layout consistent, when a given discriminant of the derived type
13782 constraints several discriminants of the parent type.
13783
9f3432b8 137842007-02-16 Eric Botcazou <ebotcazou@adacore.com>
6f7f72f9 13785 Sandra Loosemore <sandra@codesourcery.com>
9f3432b8
EB
13786
13787 * trans.c (call_to_gnu): Use build_call_list instead of build3 to
13788 build the call expression.
13789 (gnat_stabilize_reference_1): Handle tcc_vl_exp.
13790 * utils.c (max_size) <tcc_exceptional>: Delete.
13791 <tcc_vl_exp>: New case.
13792 <tcc_expression>: Delete CALL_EXPR subcase.
13793 (build_global_cdtor): Use build_call_nary instead of build3.
13794 * utils2.c (build_call_1_expr): Likewise.
13795 (build_call_2_expr): Likewise.
13796 (build_call_0_expr): Likewise.
13797 (build_call_alloc_dealloc): Likewise.
13798
8438091f
AK
137992007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
13800
13801 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
ed41063a 13802 get_action_description_for): Replace _Unwind_Word with _uleb128_t
8438091f
AK
13803 and _Unwind_SWord with _sleb128_t.
13804
0802f6a2
PB
138052007-02-06 Paolo Bonzini <bonzini@gnu.org>
13806
13807 * Make-lang.in (ada/decl.o): Add gt-ada-decl.h dependency.
13808 * decl.c: Include gt-ada-decl.h.
13809 (annotate_value_cache): New.
13810 (annotate_value): Use it instead of TREE_COMPLEXITY.
13811
326f9a75
KH
138122007-02-03 Kazu Hirata <kazu@codesourcery.com>
13813
13814 * misc.c, utils2.c: Fix comment typos.
13815
cd259a98
RS
138162007-01-24 Roger Sayle <roger@eyesopen.com>
13817
13818 * decl.c (gnat_to_gnu_entity): Use TREE_OVERFLOW instead of
13819 TREE_CONSTANT_OVERFLOW.
13820 (allocatable_size_p, annotate_value): Likewise.
13821 * trans.c (gnat_to_gnu): Likewise.
13822 * utils.c (unchecked_convert): Likewise.
13823 * utils2.c (build_simple_component_ref): Likewise.
13824
5305be7e
RG
138252007-01-23 Richard Guenther <rguenther@suse.de>
13826
13827 PR bootstrap/30541
13828 * Make-lang.in: Replace invocations of gnatmake with $(GNATMAKE).
13829 (gnatboot2): Pass staged GNATMAKE instead of STAGE_PREFIX.
13830 (gnatboot3): Likewise.
13831 (GNATBIND): Do not define.
13832 * Makefile.in (GNATBIND): Do not define.
13833
2ac7cbb5
RG
138342007-01-08 Richard Guenther <rguenther@suse.de>
13835
13836 * cuintp.c (build_cst_from_int): Use built_int_cst_type.
13837 * trans.c (gnat_to_gnu): Likewise.
13838
2989d30c
GK
138392006-12-07 Geoffrey Keating <geoffk@apple.com>
13840
13841 * Makefile.in: Replace CROSS_COMPILE with CROSS_DIRECTORY_STRUCTURE.
13842 * adaint.c: Likewise.
13843
5848e34a
EB
138442006-12-05 Aldy Hernandez <aldyh@redhat.com>
13845
6f7f72f9 13846 Merge from gimple-tuples-branch:
5848e34a 13847 2006-11-02 Aldy Hernandez <aldyh@redhat.com>
6f7f72f9 13848
5848e34a
EB
13849 * ada-tree.h (lang_tree_node): Handle gimple tuples.
13850 * trans.c (gnat_gimplify_expr): Replace MODIFY_EXPR with
13851 GIMPLE_MODIFY_STMT.
13852
d3c56bc8
KH
138532006-12-02 Kazu Hirata <kazu@codesourcery.com>
13854
13855 * Makefile.in, mingw32.h, trans.c: Fix comment typos.
13856 * gnat_rm.texi, gnat_ugn.texi: Follow spelling conventions.
13857 Fix typos.
13858
9fa25ead
EB
138592006-11-17 Eric Botcazou <ebotcazou@adacore.com>
13860
13861 PR ada/27936
13862 * trans.c (add_decl_expr): Do not dynamically elaborate padded objects
13863 if the initializer takes into account the padding.
13864
f9f770a8
RG
138652006-11-11 Richard Guenther <rguenther@suse.de>
13866
13867 * trans.c (maybe_stabilize_reference): Remove handling of
13868 FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
13869
75c0ed05
AC
138702006-11-05 Arnaud Charlet <charlet@adacore.com>
13871
ed41063a 13872 PR ada/29707
75c0ed05
AC
13873 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
13874 (To_Target_Priority): New function.
75c0ed05 13875
70198b9f
AC
138762006-10-31 Robert Dewar <dewar@adacore.com>
13877
13878 * a-taster.adb, s-traent-vms.adb, a-elchha.ads, a-elchha.adb,
13879 a-exctra.adb, ali-util.adb, exp_disp.ads, s-stalib.ads, s-traent.adb,
13880 s-addope.ads, s-addope.adb, a-rbtgso.adb, a-crbltr.ads, a-coprnu.adb,
13881 a-cgcaso.adb, a-cgarso.adb, a-cgaaso.adb, a-coormu.adb, a-ciormu.adb,
13882 a-rbtgso.ads, a-stunha.adb, a-stunha.adb, a-ciorma.adb, a-coorma.adb,
13883 a-secain.adb, a-slcain.adb, a-shcain.adb, a-stwiha.adb, a-stwiha.adb,
13884 a-strhas.adb, a-strhas.adb, a-stzhas.adb, a-stzhas.adb, a-szuzha.adb,
13885 a-chacon.adb, a-chacon.adb, a-chacon.ads, a-stboha.adb, a-swbwha.adb,
13886 a-szbzha.adb: Minor reformatting. Fix header.
13887
13888 * a-numaux-x86.adb: Add parentheses for use of unary minus
13889 * a-ngcefu.adb: Supply missing parentheses for unary minus
13890 * a-ngcoty.adb: Add parens for use of unary minus
13891 * a-ngelfu.adb: Add missing parens for unary minus
13892 * a-tifiio.adb: Add parentheses for uses of unary minus
13893
138942006-10-31 Robert Dewar <dewar@adacore.com>
13895 Bob Duff <duff@adacore.com>
13896 Ed Schonberg <schonberg@adacore.com>
13897
6f7f72f9 13898 * sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus
70198b9f
AC
13899 with multiplying operator.
13900 (Expected_Type_Is_Any_Real): New function to determine from the Parent
13901 pointer whether the context expects "any real type".
13902 (Resolve_Arithmetic_Op): Do not give an error on calls to the
13903 universal_fixed "*" and "/" operators when they are used in a context
13904 that expects any real type. Also set the type of the node to
13905 Universal_Real in this case, because downstream processing requires it
13906 (mainly static expression evaluation).
13907 Reword some continuation messages
13908 Add some \\ sequences to continuation messages
13909 (Resolve_Call): Refine infinite recursion case. The test has been
13910 sharpened to eliminate some false positives.
13911 Check for Current_Task usage now includes entry barrier, and is now a
13912 warning, not an error.
13913 (Resolve): If the call is ambiguous, indicate whether an interpretation
13914 is an inherited operation.
13915 (Check_Aggr): When resolving aggregates, skip associations with a box,
13916 which are priori correct, and will be replaced by an actual default
13917 expression in the course of expansion.
13918 (Resolve_Type_Conversion): Add missing support for conversion from
13919 a class-wide interface to a tagged type. Minor code cleanup.
13920 (Valid_Tagged_Converion): Add support for abstact interface type
13921 conversions.
13922 (Resolve_Selected_Component): Call Generate_Reference here rather than
13923 during analysis, and use May_Be_Lvalue to distinguish read/write.
13924 (Valid_Array_Conversion): New procedure, abstracted from
13925 Valid_Conversion, to incorporate accessibility checks for arrays of
13926 anonymous access types.
13927 (Valid_Conversion): For a conversion to a numeric type occurring in an
13928 instance or inlined body, no need to check that the operand type is
13929 numeric, since this has been checked during analysis of the template.
13930 Remove legacy test for scope name Unchecked_Conversion.
13931
13932 * sem_res.ads: Minor reformatting
13933
13934 * a-except.adb, a-except-2005.adb: Turn off subprogram ordering
13935 (PE_Current_Task_In_Entry_Body): New exception code
13936 (SE_Restriction_Violation): Removed, not used
13937
13938 * a-except.ads: Update comments.
13939
13940 * types.h, types.ads: Add definition for Validity_Check
13941 (PE_Current_Task_In_Entry_Body): New exception code
13942 (SE_Restriction_Violation): Removed, not used
13943
139442006-10-31 Thomas Quinot <quinot@adacore.com>
13945
13946 * g-socthi-vxworks.adb (C_Gethostbyname): Fix wrong test for returned
13947 error status.
13948
139492006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
13950 Jose Ruiz <ruiz@adacore.com>
13951
13952 * a-calend-vms.adb (Leap_Sec_Ops): Temp body for package in private
13953 part of Ada.Calendar: all subprogram raise Unimplemented.
13954 (Split_W_Offset): Temp function body, raising Unimplemented
13955
13956 * a-calend.ads, a-calend-vms.ads:
13957 Add imported variable Invalid_TZ_Offset used to designate targets unable
13958 to support time zones.
13959 (Unimplemented): Temporary function raised by the body of new
13960 subprograms below.
13961 (Leap_Sec_Ops): New package in the private part of Ada.Calendar. This
13962 unit provides handling of leap seconds and is used by the new Ada 2005
13963 packages Ada.Calendar.Arithmetic and Ada.Calendar.Formatting.
13964 (Split_W_Offset): Identical spec to that of Ada.Calendar.Split. This
13965 version returns an extra value which is the offset to UTC.
13966
13967 * a-calend.adb (Split_W_Offset): Add call to localtime_tzoff.
13968 (Leap_Sec_Ops): New body for package in private part of Ada.Calendar.
13969 (Split_W_Offset): New function body.
13970 (Time_Of): When a date is close to UNIX epoch, compute the time for
13971 that date plus one day (that amount is later substracted after
13972 executing mktime) so there are no problems with time zone adjustments.
13973
13974 * a-calend-mingw.adb: Remove Windows specific version no longer needed.
13975
13976 * a-calari.ads, a-calari.adb, a-calfor.ads, a-calfor.adb,
13977 a-catizo.ads, a-catizo.adb: New files.
13978
6f7f72f9 13979 * impunit.adb: Add new Ada 2005 entries
70198b9f
AC
13980
13981 * sysdep.c: Add external variable __gnat_invalid_tz_offset.
13982 Rename all occurences of "__gnat_localtime_r" to
13983 "__gnat_localtime_tzoff".
13984 (__gnat_localtime_tzoff for Windows): Add logic to retrieve the time
13985 zone data and calculate the GMT offset.
13986 (__gnat_localtime_tzoff for Darwin, Free BSD, Linux, Lynx and Tru64):
13987 Use the field "tm_gmtoff" to extract the GMT offset.
13988 (__gnat_localtime_tzoff for AIX, HPUX, SGI Irix and Sun Solaris): Use
13989 the external variable "timezone" to calculate the GMT offset.
13990
139912006-10-31 Arnaud Charlet <charlet@adacore.com>
13992 Jose Ruiz <ruiz@adacore.com>
13993
13994 * s-osinte-posix.adb, s-osinte-linux.ads, s-osinte-freebsd.adb,
13995 s-osinte-freebsd.ads, s-osinte-solaris-posix.ads, s-osinte-hpux.ads,
13996 s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-lynxos-3.ads,
13997 s-osinte-lynxos-3.adb (To_Target_Priority): New function maps from
13998 System.Any_Priority to a POSIX priority on the target.
13999
14000 * system-linux-ia64.ads:
14001 Extend range of Priority types on Linux to use the whole range made
14002 available by the system.
14003
14004 * s-osinte-aix.adb, s-osinte-aix.ads (To_Target_Priority): New
14005 function maps from System.Any_Priority to a POSIX priority on the
14006 target.
14007 (PTHREAD_PRIO_PROTECT): Set real value.
14008 (PTHREAD_PRIO_INHERIT): Now a function.
14009 (SIGCPUFAIL): New signal.
14010 (Reserved): Add SIGALRM1, SIGWAITING, SIGCPUFAIL, since these signals
14011 are documented as reserved by the OS.
14012
14013 * system-aix.ads: Use the full range of priorities provided by the
14014 system on AIX.
14015
14016 * s-taprop-posix.adb: Call new function To_Target_Priority.
14017 (Set_Priority): Take into account Task_Dispatching_Policy and
14018 Priority_Specific_Dispatching pragmas when determining if Round Robin
14019 must be used for scheduling the task.
14020
14021 * system-linux-x86_64.ads, system-linux-x86.ads,
14022 system-linux-ppc.ads: Extend range of Priority types on Linux to use
14023 the whole range made available by the system.
14024
14025 * s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-irix.adb,
14026 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-hpux-dce.adb,
14027 s-taprop-lynxos.adb (Finalize_TCB): invalidate the stack-check cache
14028 when deallocating the TCB in order to avoid potential references to
14029 deallocated data.
14030 (Set_Priority): Take into account Task_Dispatching_Policy and
14031 Priority_Specific_Dispatching pragmas when determining if Round Robin
14032 or FIFO within priorities must be used for scheduling the task.
14033
14034 * s-taprop-vxworks.adb (Enter_Task): Store the user-level task id in
14035 the Thread field (to be used internally by the run-time system) and the
14036 kernel-level task id in the LWP field (to be used by the debugger).
14037 (Create_Task): Reorganize to unify the calls to taskSpawn into a single
14038 instance, and propagate the current task options to the spawned task.
14039 (Set_Priority): Take into account Priority_Specific_Dispatching pragmas.
14040 (Initialize): Set Round Robin dispatching when the corresponding pragma
14041 is in effect.
14042
140432006-10-31 Robert Dewar <dewar@adacore.com>
14044
14045 * system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
14046 system-linux-hppa.ads, system-hpux-ia64.ads,
14047 system-lynxos-ppc.ads, system-lynxos-x86.ads, system-tru64.ads,
14048 system-vxworks-sparcv9.ads, system-solaris-x86.ads,
14049 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
14050 system-vxworks-m68k.ads, system-vxworks-mips.ads, system-interix.ads,
14051 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
14052 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
14053 system-vxworks-alpha.ads, system.ads: Add pragma Warnings(Off,
14054 Default_Bit_Order) to kill constant condition warnings for references
14055 to this switch.
14056
140572006-10-31 Vincent Celier <celier@adacore.com>
14058 Eric Botcazou <ebotcazou@adacore.com>
14059
14060 * mlib-tgt-lynxos.adb, mlib-tgt-mingw.adb, mlib-tgt-tru64.adb,
14061 mlib-tgt-aix.adb, mlib-tgt-irix.adb, mlib-tgt-hpux.adb,
14062 mlib-tgt-linux.adb, mlib-tgt-solaris.adb: Use Append_To, instead of
14063 Ext_To, when building the library file name
14064
14065 * mlib-tgt-vxworks.adb: ditto.
14066 (Get_Target_Suffix): Add support for x86 targets.
14067
14068 * mlib-fil.ads, mlib-fil.adb: (Append_To): New function
14069
14070 * mlib-tgt-darwin.adb:
14071 Use Append_To, instead of Ext_To, when building the library file name
14072 (Flat_Namespace): New global variable.
14073 (No_Shared_Libgcc_Switch): Rename to No_Shared_Libgcc_Options.
14074 (Shared_Libgcc_Switch): Rename to With_Shared_Libgcc_Options.
14075 (Link_Shared_Libgcc): Delete.
14076 (Build_Dynamic_Library): Adjust for above changes.
14077 Use Opt package.
14078 (Build_Dynamic_Library): Pass -shared-libgcc if GCC 4 or later.
14079
140802006-10-31 Eric Botcazou <ebotcazou@adacore.com>
14081
14082 * s-taprop-solaris.adb: (Time_Slice_Val): Change type to Integer.
14083 (Initialize): Add type conversions required by above change.
14084
140852006-10-31 Jose Ruiz <ruiz@adacore.com>
14086
14087 * s-osinte-vxworks.ads, s-osinte-vxworks.adb:
14088 (getpid): New body for this function that uses the underlying taskIdSelf
14089 function for VxWorks 5 and VxWorks 6 in kernel mode.
14090 (unsigned_int): New type, modular to allow logical bit operations.
14091 (taskOptionsGet): New imported function.
14092
14093 * s-taspri-vxworks.ads (Private_Data): Change the type for the LWP
14094 field to be compliant with the type used by the corresponding operating
14095 system primitive.
14096
140972006-10-31 Pascal Obry <obry@adacore.com>
14098 Eric Botcazou <ebotcazou@adacore.com>
14099 Vincent Celier <celier@adacore.com>
14100
14101 * adaint.c (__gnat_get_libraries_from_registry): Call explicitly the
14102 ASCII version of the registry API. This is needed as the GNAT runtime
14103 is now UNICODE by default.
14104 Include version.h.
14105 (get_gcc_version): Do not hardcode the return value.
14106 (__gnat_file_time_name): On Windows properly set the default returned
14107 value to -1 which corresponds to Invalid_Time.
14108 (__gnat_fopen): New routine. A simple wrapper on all plateforms
14109 except on Windows where it does conversion for unicode support.
14110 (__gnat_freopen): Idem.
14111 (__gnat_locate_exec_on_path): If environment variable PATH does not
14112 exist, return a NULL pointer
14113
14114 * adaint.h: (__gnat_fopen): Declare.
14115 (__gnat_freopen): Likewise.
14116
14117 * mingw32.h (_tfreopen): Define this macro here for older MingW
14118 version.
14119 Activate the unicode support on platforms using a MingW runtime
14120 version 3.9 or newer.
14121
14122 * s-crtl.ads (fopen): Is now an import to the wrapper __gnat_freopen.
14123 This is needed for proper unicode support on Windows.
14124 (freopen): Idem.
14125
141262006-10-31 Eric Botcazou <ebotcazou@adacore.com>
14127 Nicolas Setton <setton@adacore.com>
14128 Olivier Hainque <hainque@adacore.com>
14129 Gary Dismukes <dismukes@adacore.com>
14130
14131 * gigi.h: (tree_code_for_record_type): Declare.
14132 (add_global_renaming_pointer): Rename to record_global_renaming_pointer.
14133 (get_global_renaming_pointers): Rename to
14134 invalidate_global_renaming_pointers.
14135 (static_ctors): Delete.
14136 (static_dtors): Likewise.
14137 (gnat_write_global_declarations): Declare.
14138 (create_var_decl): Adjust descriptive comment to indicate that the
14139 subprogram may return a CONST_DECL node.
14140 (create_true_var_decl): Declare new function, similar to
14141 create_var_decl but forcing the creation of a VAR_DECL node.
14142 (get_global_renaming_pointers): Declare.
14143 (add_global_renaming_pointer): Likewise.
14144
14145 * ada-tree.h (DECL_READONLY_ONCE_ELAB): New macro.
14146
14147 * decl.c (gnat_to_gnu_entity) <case E_Function>: Don't copy the type
14148 tree before setting TREE_ADDRESSABLE for by-reference return mechanism
14149 processing.
14150 (gnat_to_gnu_entity): Remove From_With_Type from computation for
14151 imported_p.
14152 <E_Access_Type>: Use the Non_Limited_View as the full view of the
14153 designated type if the pointer comes from a limited_with clause. Make
14154 incomplete designated type if it is in the main unit and has a freeze
14155 node.
14156 <E_Incomplete_Type>: Rework to treat Non_Limited_View, Full_View, and
14157 Underlying_Full_View similarly. Return earlier if the full view already
14158 has an associated tree.
14159 (gnat_to_gnu_entity) <E_Record_Type>: Restore comment.
14160 (gnat_to_gnu_entity) <E_Record_Type>: Do not use a dummy type.
14161 (gnat_to_gnu_entity) <E_Variable>: Set TYPE_REF_CAN_ALIAS_ALL on the
14162 reference type built for objects with an address clause.
14163 Use create_true_var_decl with const_flag set for
14164 DECL_CONST_CORRESPONDING_VARs, ensuring a VAR_DECL is created with
14165 TREE_READONLY set.
14166 (gnat_to_gnu_entity, case E_Enumeration_Type): Set TYPE_NAME
14167 for Character and Wide_Character types. This info is read by the
14168 dwarf-2 writer, and is needed to be able to use the command "ptype
14169 character" in the debugger.
14170 (gnat_to_gnu_entity): When generating a type representing
14171 a Character or Wide_Character type, set the flag TYPE_STRING_FLAG,
14172 so that debug writers can distinguish it from ordinary integers.
14173 (elaborate_expression_1): Test the DECL_READONLY_ONCE_ELAB flag in
14174 addition to TREE_READONLY to assert the constantness of variables for
14175 elaboration purposes.
14176 (gnat_to_gnu_entity, subprogram cases): Change loops on formal
14177 parameters to call new Einfo function First_Formal_With_Extras.
14178 (gnat_to_gnu_entity): In type_annotate mode, replace a discriminant of a
14179 protected type with its corresponding discriminant, to obtain a usable
14180 declaration
14181 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Be prepared
14182 for a multiple elaboration of the "equivalent" type.
14183 (gnat_to_gnu_entity): Adjust for renaming of add_global_renaming_pointer
14184 into record_global_renaming_pointer.
14185 (gnat_to_gnu_entity) <E_Array_Type>: Do not force
14186 TYPE_NONALIASED_COMPONENT to 0 if the element type is an aggregate.
14187 <E_Array_Subtype>: Likewise.
14188 (gnat_to_gnu_entity) <E_Incomplete_Subtype>: Add support for regular
14189 incomplete subtypes and incomplete subtypes of incomplete types visible
14190 through a limited with clause.
14191 (gnat_to_gnu_entity) <E_Array_Subtype>: Take into account the bounds of
14192 the base index type for the maximum size of the array only if they are
14193 constant.
14194 (gnat_to_gnu_entity, renaming object case): Do not wrap up the
14195 expression into a SAVE_EXPR if stabilization failed.
14196
14197 * utils.c (create_subprog_decl): Turn TREE_ADDRESSABLE on the type of
14198 a result decl into DECL_BY_REFERENCE on this decl, now what is expected
14199 by lower level compilation passes.
14200 (gnat_genericize): New function, lowering a function body to GENERIC.
14201 Turn the type of RESULT_DECL into a real reference type if the decl
14202 has been marked DECL_BY_REFERENCE, and adjust references to the latter
14203 accordingly.
14204 (gnat_genericize_r): New function. Tree walking callback for
14205 gnat_genericize.
14206 (convert_from_reference, is_byref_result): New functions. Helpers for
14207 gnat_genericize_r.
14208 (create_type_decl): Call gnat_pushdecl before calling
14209 rest_of_decl_compilation, to make sure that field TYPE_NAME of
14210 type_decl is properly set before calling the debug information writers.
14211 (write_record_type_debug_info): The heuristics which compute the
14212 alignment of a field in a variant record might not be accurate. Add a
14213 safety test to make sure no alignment is set to a smaller value than
14214 the alignment of the field type.
14215 (make_dummy_type): Use the Non_Limited_View as the underlying type if
14216 the type comes from a limited_with clause. Do not loop on the full view.
14217 (GET_GNU_TREE, SET_GNU_TREE, PRESENT_GNU_TREE): New macros.
14218 (dummy_node_table): New global variable, moved from decl.c.
14219 (GET_DUMMY_NODE, SET_DUMMY_NODE, PRESENT_DUMMY_NODE): New macros.
14220 (save_gnu_tree): Use above macros.
14221 (get_gnu_tree): Likewise.
14222 (present_gnu_tree): Likewise.
14223 (init_dummy_type): New function, moved from decl.c. Use above macros.
14224 (make_dummy_type): Likewise.
14225 (tree_code_for_record_type): New function extracted from make_dummy_type
14226 (init_gigi_decls): Set DECL_IS_MALLOC on gnat_malloc.
14227 (static_ctors): Change it to a vector, make static.
14228 (static_dtors): Likewise.
14229 (end_subprog_body): Adjust for above change.
14230 (build_global_cdtor): Moved from trans.c.
14231 (gnat_write_global_declarations): Emit global constructor and
14232 destructor, and call cgraph_optimize before emitting debug info for
14233 global declarations.
14234 (global_decls): New global variable.
14235 (gnat_pushdecl): Store the global declarations in global_decls, for
14236 later use.
14237 (gnat_write_global_declarations): Emit debug information for global
14238 declarations.
14239 (create_var_decl_1): Former create_var_decl, with an extra argument to
14240 state whether the creation of a CONST_DECL is allowed.
14241 (create_var_decl): Behavior unchanged. Now a wrapper around
14242 create_var_decl_1 allowing CONST_DECL creation.
14243 (create_true_var_decl): New function, similar to create_var_decl but
14244 forcing the creation of a VAR_DECL node (CONST_DECL not allowed).
14245 (create_field_decl): Do not always mark the field as addressable
14246 if its type is an aggregate.
14247 (global_renaming_pointers): New static variable.
14248 (add_global_renaming_pointer): New function.
14249 (get_global_renaming_pointers): Likewise.
14250
14251 * misc.c (gnat_dwarf_name): New function.
14252 (LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name.
14253 (gnat_post_options): Add comment about structural alias analysis.
14254 (gnat_parse_file): Do not call cgraph_optimize here.
14255 (LANG_HOOKS_WRITE_GLOBALS): Define to gnat_write_global_declarations.
14256
14257 * trans.c (process_freeze_entity): Don't abort if we already have a
14258 non dummy GCC tree for a Concurrent_Record_Type, as it might
14259 legitimately have been elaborated while processing the associated
14260 Concurrent_Type prior to this explicit freeze node.
14261 (Identifier_to_gnu): Do not make a variable referenced in a SJLJ
14262 exception handler volatile if it is of variable size.
14263 (process_type): Remove bypass for types coming from a limited_with
14264 clause.
14265 (call_to_gnu): When processing the copy-out of a N_Type_Conversion GNAT
14266 actual, convert the corresponding gnu_actual to the real destination
14267 type when necessary.
14268 (add_decl_expr): Set the DECL_READONLY_ONCE_ELAB flag on variables
14269 originally TREE_READONLY but whose elaboration cannot be performed
14270 statically.
14271 Part of fix for F504-021.
14272 (tree_transform, subprogram cases): Change loops on formal parameters to
14273 call new Einfo function First_Formal_With_Extras.
14274 (gnat_to_gnu) <N_Op_Shift_Right_Arithmetic>: Ignore constant overflow
14275 stemming from type conversion for the lhs.
14276 (Attribute_to_gnu) <Attr_Alignment>: Also divide the alignment by the
14277 number of bits per unit for components of records.
14278 (gnat_to_gnu) <N_Code_Statement>: Mark operands addressable if needed.
14279 (Handled_Sequence_Of_Statements_to_gnu): Register the cleanup associated
14280 with At_End_Proc after the SJLJ EH cleanup.
14281 (Compilation_Unit_to_gnu): Call elaborate_all_entities only on the main
14282 compilation unit.
14283 (elaborate_all_entities): Do not retest type_annotate_only.
14284 (tree_transform) <N_Abstract_Subprogram_Declaration>: Process the
14285 result type of an abstract subprogram, which may be an itype associated
14286 with an anonymous access result (related to AI-318-02).
14287 (build_global_cdtor): Move to utils.c.
14288 (Case_Statement_to_gnu): Avoid adding the choice of a when statement if
14289 this choice is not a null tree nor an integer constant.
14290 (gigi): Run unshare_save_expr via walk_tree_without_duplicates
14291 on the body of elaboration routines instead of mark_unvisited.
14292 (add_stmt): Do not mark the tree.
14293 (add_decl_expr): Tweak comment.
14294 (mark_unvisited): Delete.
14295 (unshare_save_expr): New static function.
14296 (call_to_gnu): Issue an error when making a temporary around a
14297 procedure call because of non-addressable actual parameter if the
14298 type of the formal is by_reference.
14299 (Compilation_Unit_to_gnu): Invalidate the global renaming pointers
14300 after building the elaboration routine.
14301
143022006-10-31 Bob Duff <duff@adacore.com>
14303
14304 * a-filico.adb (Finalize(List_Controller)): Mark the finalization list
14305 as finalization-started, so we can raise Program_Error on 'new'.
14306
14307 * s-finimp.adb: Raise Program_Error on 'new' if finalization of the
14308 collection has already started.
14309
14310 * s-finimp.ads (Collection_Finalization_Started): Added new special
14311 flag value for indicating that a collection's finalization has started.
14312
14313 * s-tassta.adb (Create_Task): Raise Program_Error on an attempt to
14314 create a task whose master has already waited for dependent tasks.
14315
143162006-10-31 Robert Dewar <dewar@adacore.com>
14317
14318 * lib.adb, lib.ads: (In_Predefined_Unit): New functions
14319
14320 * a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads,
14321 a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads,
14322 a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads,
14323 a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads,
14324 a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads,
14325 a-except-2005.ads: Add pragma Preelaborable_Warning
14326
143272006-10-31 Robert Dewar <dewar@adacore.com>
14328 Jose Ruiz <ruiz@adacore.com>
14329
14330 * a-dispat.ads, a-dispat.adb, a-diroro.ads, a-diroro.adb: New files.
14331
14332 * ali.adb (Get_Name): Properly handle scanning of wide character names
14333 encoded with brackets notation.
14334 (Known_ALI_Lines): Add S lines to this list.
14335 (Scan_ALI): Acquire S (priority specific dispatching) lines.
14336 New flag Elaborate_All_Desirable in unit table
14337
14338 * ali.ads (Priority_Specific_Dispatching): Add this range of
14339 identifiers to be used for Priority_Specific_Dispatching table entries.
14340 (ALIs_Record): Add First_Specific_Dispatching and
14341 Last_Specific_Dispatching that point to the first and last entries
14342 respectively in the priority specific dispatching table for this unit.
14343 (Specific_Dispatching): Add this table for storing each S (priority
14344 specific dispatching) line encountered in the input ALI file.
14345 New flag Elaborate_All_Desirable in unit table
14346
14347 * bcheck.adb: (Check_Configuration_Consistency): Add call to
14348 Check_Consistent_Dispatching_Policy.
14349 (Check_Consistent_Dispatching_Policy): Add this procedure in charge of
14350 verifying that the use of Priority_Specific_Dispatching,
14351 Task_Dispatching_Policy, and Locking_Policy is consistent across the
14352 partition.
14353
14354 * bindgen.adb: (Public_Version_Warning): function removed.
14355 (Set_PSD_Pragma_Table): Add this procedure in charge of getting the
14356 required information from ALI files in order to initialize the table
14357 containing the specific dispatching policy.
14358 (Gen_Adainit_Ada): Generate the variables required for priority specific
14359 dispatching entries (__gl_priority_specific_dispatching and
14360 __gl_num_specific_dispatching).
14361 (Gen_Adainit_C): Generate the variables required for priority specific
14362 dispatching entries (__gl_priority_specific_dispatching and
14363 __gl_num_specific_dispatching).
14364 (Gen_Output_File): Acquire settings for Priority_Specific_Dispatching
14365 pragma entries.
14366 (Gen_Restrictions_String_1, Gen_Restrictions_String_2): Removed.
14367 (Gen_Restrictions_Ada, Gen_Restrictions_C, Set_Boolean): New procedures.
14368 (Tab_To): Removed.
14369 (Gen_Output_File_Ada/_C): Set directly __gl_xxx variables instead of
14370 a call to gnat_set_globals.
14371 Generate a string containing settings from
14372 Priority_Specific_Dispatching pragma entries.
14373 (Gen_Object_Files_Options): Do not include the runtime libraries when
14374 pragma No_Run_Time is specified.
14375
14376 * init.c (__gnat_install_handler, case FreeBSD): Use SA_SIGINFO, for
14377 consistency with s-intman-posix.adb.
14378 (__gnat_error_handler, case FreeBSD): Account for the fact that the
14379 handler is installed with SA_SIGINFO.
14380 (__gnat_adjust_context_for_raise, FreeBSD case): New function for
14381 FreeBSD ZCX support, copied from Linux version.
14382 Add MaRTE-specific definitions for the linux target. Redefine sigaction,
14383 sigfillset, and sigemptyset so the routines defined by MaRTE.
14384 (__gl_priority_specific_dispatching): Add this variable that stores the
14385 string containing priority specific dispatching policies in the
14386 partition.
14387 (__gl_num_specific_dispatching): Add this variable that indicates the
14388 highest priority for which a priority specific dispatching pragma
14389 applies.
14390 (__gnat_get_specific_dispatching): Add this routine that returns the
14391 priority specific dispatching policy, as set by a
14392 Priority_Specific_Dispatching pragma appearing anywhere in the current
14393 partition. The input argument is the priority number, and the result
14394 is the upper case first character of the policy name.
14395 (__gnat_set_globals): Now a dummy function.
14396 (__gnat_handle_vms_condition): Feed adjust_context_for_raise with
14397 mechargs instead of sigargs, as the latter can be retrieved from the
14398 former and sigargs is not what we want on ia64.
14399 (__gnat_adjust_context_for_raise, alpha-vms): Fetch sigargs from the
14400 mechargs argument.
14401 (__gnat_adjust_context_for_raise, ia64-vms): New function.
14402 (tasking_error): Remove unused symbol.
14403 (_abort_signal): Move this symbol to the IRIX specific part since this
14404 is the only target that uses this definition.
14405 (Check_Abort_Status): Move this symbol to the IRIX specific part since
14406 this is the only target that uses this definition.
14407 (Lock_Task): Remove unused symbol.
14408 (Unlock_Task): Remove unused symbol.
14409
14410 * lib-writ.adb (Write_ALI): Output new S lines for
14411 Priority_Specific_Dispatching pragmas.
14412 Implement new flag BD for elaborate body desirable
14413
14414 * lib-writ.ads: Document S lines for Priority Specific Dispatching.
14415 (Specific_Dispatching): Add this table for storing the entries
14416 corresponding to Priority_Specific_Dispatching pragmas.
14417 Document new BD flag for elaborate body desirable
14418
14419 * par-prag.adb (Prag): Add Priority_Specific_Dispatching to the list
14420 of known pragmas.
14421
144222006-10-31 Javier Miranda <miranda@adacore.com>
14423
14424 * a-tags.ads, a-tags.adb:
14425 (Predefined_DT): New function that improves readability of the code.
14426 (Get_Predefined_Prim_Op_Address, Set_Predefined_Prim_Op_Address,
14427 Inherit_DT): Use the new function Predefined_DT to improve code
14428 readability.
14429 (Register_Interface_Tag): Update assertion.
14430 (Set_Interface_Table): Update assertion.
14431 (Interface_Ancestor_Tags): New subprogram required to implement AI-405:
14432 determining progenitor interfaces in Tags.
14433 (Inherit_CPP_DT): New subprogram.
14434
6f7f72f9 14435 * exp_disp.adb (Expand_Interface_Thunk): Suppress checks during the
70198b9f 14436 analysis of the thunk code.
6f7f72f9
EB
14437 (Expand_Interface_Conversion): Handle run-time conversion of
14438 access to class wide types.
70198b9f
AC
14439 (Expand_Dispatching_Call): When generating the profile for the
14440 subprogram itype for a dispatching operation, properly terminate the
14441 formal parameters chaind list (set the Next_Entity of the last formal
14442 to Empty).
14443 (Collect_All_Interfaces): Removed. This routine has been moved to
14444 sem_util and renamed as Collect_All_Abstract_Interfaces.
14445 (Set_All_DT_Position): Hidden entities associated with abstract
14446 interface primitives are not taken into account in the check for
14447 3.9.3(10); this check is done with the aliased entity.
14448 (Make_DT, Set_All_DT_Position): Enable full ABI compatibility for
14449 interfacing with CPP by default.
14450 (Expand_Interface_Conversion): Add missing support for static conversion
14451 from an interface to a tagged type.
14452 (Collect_All_Interfaces): Add new out formal containing the list of
14453 abstract interface types to cleanup the subprogram Make_DT.
14454 (Make_DT): Update the code to generate the table of interfaces in case
14455 of abstract interface types.
14456 (Is_Predefined_Dispatching_Alias): New function that returns true if
14457 a primitive is not a predefined dispatching primitive but it is an
14458 alias of a predefined dispatching primitive.
14459 (Make_DT): If the ancestor of the type is a CPP_Class and we are
14460 compiling under full ABI compatibility mode we avoid the generation of
14461 calls to run-time services that fill the dispatch tables because under
14462 this mode we currently inherit the dispatch tables in the IP subprogram.
14463 (Write_DT): Emit an "is null" indication for a null procedure primitive.
14464 (Expand_Interface_Conversion): Use an address as the type of the formal
14465 of the internally built function that handles the case in which the
14466 target type is an access type.
14467
144682006-10-31 Robert Dewar <dewar@adacore.com>
14469
14470 * binde.adb (Better_Choice, Worse_Choice): Implement new preferences.
14471
144722006-10-31 Robert Dewar <dewar@adacore.com>
14473
14474 * bindusg.ads, bindusg.adb:
14475 Change to package and rename procedure as Display, which
14476 now ensures that it only outputs usage information once.
14477
144782006-10-31 Jose Ruiz <ruiz@adacore.com>
14479
14480 * cal.c: Use the header sys/time.h for VxWorks 6.2 or greater when
14481 using RTPs.
14482
14483 * mkdir.c: Use a different version of mkdir for VxWorks 6.2 or greater
14484 when using RTPs.
14485
144862006-10-31 Robert Dewar <dewar@adacore.com>
14487 Ed Schonberg <schonberg@adacore.com>
14488
14489 * treepr.adb: Use new subtype N_Membership_Test
14490
6f7f72f9
EB
14491 * checks.ads, checks.adb: Add definition for Validity_Check
14492 (Range_Or_Validity_Checks_Suppressed): New function
14493 (Ensure_Valid): Test Validity_Check suppressed
14494 (Insert_Valid_Check): Test Validity_Check suppressed
14495 (Insert_Valid_Check): Preserve Do_Range_Check flag
70198b9f
AC
14496 (Validity_Check_Range): New procedure
14497 (Expr_Known_Valid): Result of membership test is always valid
14498 (Selected_Range_Checks): Range checks cannot be applied to discriminants
14499 by themselves. Disabling those checks must also be done for task types,
14500 where discriminants may be used for the bounds of entry families.
14501 (Apply_Address_Clause_Check): Remove side-effects if address expression
14502 is non-static and is not the name of a declared constant.
14503 (Null_Exclusion_Static_Checks): Extend to handle Function_Specification.
14504 Code cleanup and new error messages.
14505 (Enable_Range_Check): Test for some cases of suppressed checks
14506 (Generate_Index_Checks): Suppress index checks if index checks are
14507 suppressed for array object or array type.
14508 (Apply_Selected_Length_Checks): Give warning for compile-time detected
14509 length check failure, even if checks are off.
14510 (Ensure_Valid): Do not generate a check on an indexed component whose
14511 prefix is a packed boolean array.
14512 * checks.adb: (Alignment_Checks_Suppressed): New function
14513 (Apply_Address_Clause_Check): New procedure, this is a completely
14514 rewritten replacement for Apply_Alignment_Check
14515 (Get_E_Length/Get_E_First_Or_Last): Add missing barrier to ensure that
14516 we request a discriminal value only in case of discriminants.
14517 (Apply_Discriminant_Check): For Ada_05, only call Get_Actual_Subtype for
14518 assignments where the target subtype is unconstrained and the target
14519 object is a parameter or dereference (other aliased cases are known
14520 to be unconstrained).
14521
145222006-10-31 Robert Dewar <dewar@adacore.com>
14523
14524 * clean.adb, gnatname.adb, gnatsym.adb, prep.adb, prep.ads,
14525 prepcomp.adb, prj.ads, prj-strt.adb, sem_maps.ads,
14526 vms_conv.adb: Fix bad table increment values (much too small)
14527
14528 * table.adb (Realloc): Make sure we get at least some new elements
14529 Defends against silly small values for table increment
14530
145312006-10-31 Robert Dewar <dewar@adacore.com>
14532 Ed Schonberg <schonberg@adacore.com>
14533 Bob Duff <duff@adacore.com>
14534
14535 * einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all
14536 entities. Move other fields around to make this possible
14537 (Is_Derived_Type): Add missing call to Is_Type.
14538 (Extra_Formals): New function for subprograms, entries, subprogram
14539 types.
14540 (Set_Extra_Formals): New procedure for subprograms, entries, subp types.
14541 (First_Formal_With_Extras): New function for subprogs, entries, subp
14542 types.
14543 (Write_Field28_Name): New procedure for node display of "Extra_Formals".
14544 Add node information for E_Return_Statement.
14545 (Elaborate_Body_Desirable): New flag
14546 (Is_Return_By_Reference_Type): Rename Is_Return_By_Reference_Type
14547 to be Is_Inherently_Limited_Type, because return-by-reference has
14548 no meaning in Ada 2005.
14549 (E_Return_Statement): New entity kind.
14550 (Return_Applies_To): Field of E_Return_Statement.
14551 (Is_Return_Object): New flag in object entities.
14552 (Is_Dynamic_Scope): Make it True for E_Return_Statement.
14553 (Must_Have_Preelab_Init): New flag
14554 (Known_To_Have_Preelab_Init): New flag
14555 (Is_Formal_Object): Move from Sem_Ch8 body to Einfo
14556 (Is_Visible_Formal): New flag on entities in formal packages.
14557 (Low_Bound_Known): New flag
14558 (Non_Limited_View, Set_Non_Limited_View): Add membership test agains
14559 Incomplete_Kind.
14560 (Write_Field17_Name): Correct spelling of Non_Limited_View. Add name
14561 output when Id is an incomplete subtype.
14562
145632006-10-31 Robert Dewar <dewar@adacore.com>
14564
14565 * errout.ads, errout.adb (Finalize): Implement switch -gnatd.m
14566 Avoid abbreviation Creat
14567 (Finalize): List all sources in extended mail source if -gnatl
14568 switch is active.
14569 Suppress copyright notice to file in -gnatl=f mode if -gnatd7 set
14570 (Finalize): Implement new -gnatl=xxx switch to output listing to file
14571 (Set_Specific_Warning_On): New procedure
14572 (Set_Specific_Warning_Off): New procedure
14573 Add implementation of new insertion \\
14574 (Error_Msg_Internal): Add handling for Error_Msg_Line_Length
14575 (Unwind_Internal_Type): Improve report on anonymous access_to_subprogram
14576 types.
14577 (Error_Msg_Internal): Make sure that we set Last_Killed to
14578 True when a message from another package is suppressed.
14579 Implement insertion character ~ (insert string)
14580 (First_Node): Minor adjustments to get better placement.
14581
14582 * frontend.adb:
14583 Implement new -gnatl=xxx switch to output listing to file
14584
14585 * gnat1drv.adb:
14586 Implement new -gnatl=xxx switch to output listing to file
14587
6f7f72f9 14588 * opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
70198b9f
AC
14589 (Commands_To_Stdout): New flag
14590 Implement new -gnatl=xxx switch to output listing to file
14591 New switch Dump_Source_Text
14592 (Warn_On_Deleted_Code): New warning flag for -gnatwt
14593 Define Error_Msg_Line_Length
14594 (Warn_On_Assumed_Low_Bound): New switch
14595
14596 * osint.ads, osint.adb
14597 (Normalize_Directory_Name): Fix bug.
14598 Implement new -gnatl=xxx switch to output listing to file
14599 (Concat): Removed, replaced by real concatenation
14600 Make use of concatenation now allowed in compiler
14601 (Executable_Prefix.Get_Install_Dir): First get the full path, so that
14602 we find the 'lib' or 'bin' directory even when the tool has been
14603 invoked with a relative path.
14604 (Executable_Name): New function taking string parameters.
14605
14606 * osint-c.ads, osint-c.adb:
14607 Implement new -gnatl=xxx switch to output listing to file
14608
14609 * sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File
14610
14611 * switch-c.adb:
14612 Implement new -gnatl=xxx switch to output listing to file
14613 Recognize new -gnatL switch
14614 (no longer keep in old warning about old style usage)
14615 Use concatenation to simplify code
14616 Recognize -gnatjnn switch
14617 (Scan_Front_End_Switches): Clean up handling of -gnatW
14618 (Scan_Front_End_Switches): Include Warn_On_Assumed_Low_Bound for -gnatg
14619
146202006-10-31 Robert Dewar <dewar@adacore.com>
14621
14622 * erroutc.ads, erroutc.adb (Set_Specific_Warning_On): New procedure
14623 (Set_Specific_Warning_Off): New procedure
14624 (Warning_Specifically_Suppressed): New function
14625 (Validate_Specific_Warnings): New procedure
14626 (Output_Msg_Text): Complete rewrite to support -gnatjnn
14627
14628 * err_vars.ads: Implement insertion character ~ (insert string)
14629
146302006-10-31 Bob Duff <duff@adacore.com>
14631 Ed Schonberg <schonberg@adacore.com>
14632
14633 * exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates, if
14634 the parent part is a build-in-place function call, generate assignments.
14635 (Expand_Record_Aggregate): Call Convert_To_Assignments if any components
14636 are build-in-place function calls.
14637 (Replace_Self_Reference): New subsidiary of
14638 Make_OK_Assignment_Statement, to replace an access attribute that is a
14639 self-reference into an access to the appropriate component of the
14640 target object. Generalizes previous mechanism to handle self-references
14641 nested at any level.
14642 (Is_Self_Referential_Init): Remove, not needed.
14643 (Is_Self_Referential_Init): New predicate to simplify handling of self
14644 referential components in record aggregates.
14645 (Has_Default_Init_Comps, Make_OK_Assignment_Statement): Add guard to
14646 check for presence of entity before checking for self-reference.
14647 (Has_Default_Init_Comps): Return True if a component association is a
14648 self-reference to the enclosing type, which can only come from a
14649 default initialization.
14650 (Make_OK_Assignment_Statement): If the expression is of the form
14651 Typ'Acc, where Acc is an access attribute, the expression comes from a
14652 default initialized self-referential component.
14653 (Build_Record_Aggr_Code): If the type of the aggregate is a tagged type
14654 that has been derived from several abstract interfaces we must also
14655 initialize the tags of the secondary dispatch tables.
14656
146572006-10-31 Ed Schonberg <schonberg@adacore.com>
14658 Thomas Quinot <quinot@adacore.com>
14659 Javier Miranda <miranda@adacore.com>
14660 Robert Dewar <dewar@adacore.com>
6f7f72f9
EB
14661
14662 * exp_attr.adb:
14663 (Expand_Access_To_Protected_Op): If the context indicates that an access
14664 to a local operation may be transfered outside of the object, create an
14665 access to the wrapper operation that must be used in an external call.
70198b9f
AC
14666 (Expand_N_Attribute_Reference, case Attribute_Valid): For the AAMP
14667 target, pass the Valid attribute applied to a floating-point prefix on
14668 to the back end without expansion.
14669 (Storage_Size): Use the new run-time function Storage_Size to retrieve
14670 the allocated storage when it is specified by a per-object expression.
14671 (Expand_N_Attribute_Reference): Add case for Attribute_Stub_Type.
14672 Nothing to do here, the attribute has been rewritten during semantic
14673 analysis.
14674 (Expand_Attribute_Reference): Handle expansion of the new Priority
14675 attribute
14676 (Find_Fat_Info): Handle case of universal real
14677 (Expand_Access_To_Protected_Op): Fix use of access to protected
14678 subprogram from inside the body of a protected entry.
14679 (Expand_Access_To_Protected_Op): Common procedure for the expansion of
14680 'Access and 'Unrestricted_Access, to transform the attribute reference
14681 into a fat pointer.
14682 (Is_Constrained_Aliased_View): New predicate to help determine whether a
14683 subcomponent's enclosing variable is aliased with a constrained subtype.
14684 (Expand_N_Attribute_Reference, case Attribute_Constrained): For Ada_05,
14685 test Is_Constrained_Aliased_View rather than Is_Aliased_View, because
14686 an aliased prefix must be known to be constrained in order to use True
14687 for the attribute value, and now it's possible for some aliased views
14688 to be unconstrained.
14689
146902006-10-31 Robert Dewar <dewar@adacore.com>
14691
14692 * exp_ch2.adb: Change Is_Lvalue to May_Be_Lvalue
14693 (Expand_Entity_Reference): Correct error of not handling subprogram
14694 formals in current_value processing.
14695
146962006-10-31 Javier Miranda <miranda@adacore.com>
14697 Robert Dewar <dewar@adacore.com>
14698 Ed Schonberg <schonberg@adacore.com>
14699 Gary Dismukes <dismukes@adacore.com>
14700
6f7f72f9 14701 * exp_ch3.ads, exp_ch3.adb (Expand_N_Object_Declaration): Do not
70198b9f
AC
14702 register in the final list objects containing class-wide interfaces;
14703 otherwise we incorrectly register the tag of the interface in the final
14704 list.
6f7f72f9
EB
14705 (Make_Controlling_Function_Wrappers): Add missing barrier to do not
14706 generate the wrapper if the parent primitive is abstract. This is
14707 required to report the correct error message.
14708 (Expand_N_Subtype_Indication): Do validity checks on range
70198b9f
AC
14709 (Clean_Task_Names): If an initialization procedure includes a call to
14710 initialize a task (sub)component, indicate that the procedure will use
14711 the secondary stack.
14712 (Build_Init_Procedure, Init_Secondary_Tags): Enable full ABI
14713 compatibility for interfacing with CPP by default.
14714 (Expand_N_Object_Declaration): Only build an Adjust call when the
14715 object's type is a nonlimited controlled type.
14716 * exp_ch3.adb: Add with and use of Exp_Ch6.
14717 (Expand_N_Object_Declaration): Check for object initialization that is a
14718 call to build-in-place function and apply Make_Build_In_Place_Call_In_
14719 Object_Declaration to the call.
14720 (Freeze_Type): When the designated type of an RACW was not frozen at the
14721 point where the RACW was declared, validate the primitive operations
14722 with respect to E.2.2(14) when it finally is frozen.
14723 (Build_Initialization_Call,Expand_Record_Controller): Rename
14724 Is_Return_By_Reference_Type to be Is_Inherently_Limited_Type, because
14725 return-by-reference has no meaning in Ada 2005.
14726 (Init_Secondary_Tags): Add missing call to Set_Offset_To_Top
14727 to register tag of the immediate ancestor interfaces in the
14728 run-time structure.
14729 (Init_Secondary_Tags): Moved to the specification to allow the
14730 initialization of extension aggregates with abstract interfaces.
14731 (Build_Master_Renaming): Make public, for use by function declarations
14732 whose return type is an anonymous access type.
14733 (Freeze_Record_Type): Replace call to Insert_List_Before by call to
14734 Insert_List_Before_And_Analyze after the generation of the specs
14735 associated with null procedures.
14736 (Expand_Tagged_Root): Update documentation in its specification.
14737 (Init_Secondary_Tags): Update documentation.
14738 (Build_Init_Procedure): If we are compiling under CPP full ABI compa-
14739 tibility mode and the immediate ancestor is a CPP_Pragma tagged type
14740 then generate code to inherit the contents of the dispatch table
14741 directly from the ancestor.
14742 (Expand_Record_Controller): Insert controller component after tags of
14743 implemented interfaces.
14744 (Freeze_Record_Type): Call new procedure Make_Null_Procedure_Specs to
14745 create null procedure overridings when null procedures are inherited
14746 from interfaces.
14747 (Make_Null_Procedure_Specs): New procedure to generate null procedure
14748 declarations for overriding null primitives inherited from interfaces.
14749 (Is_Null_Interface_Procedure): New function in
14750 Make_Null_Procedure_Specs.
14751 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): If the
14752 immediate ancestor of a tagged type is an abstract interface type we
14753 must generate the specification of the predefined primitives associated
14754 with controlled types (because the dispatch table of the ancestor is
14755 null and hence these entries cannot be inherited). This is required to
14756 elaborate well the dispatch table.
14757
147582006-10-31 Javier Miranda <miranda@adacore.com>
14759 Ed Schonberg <schonberg@adacore.com>
14760 Bob Duff <duff@adacore.com>
14761 Gary Dismukes <dismukes@adacore.com>
14762 Robert Dewar <dewar@adacore.com>
6f7f72f9
EB
14763
14764 * exp_ch4.adb (Expand_N_Type_Conversion): Handle missing interface type
70198b9f 14765 conversion.
6f7f72f9 14766 (Expand_N_In): Do validity checks on range
70198b9f
AC
14767 (Expand_Selected_Component): Use updated for of Denotes_Discriminant.
14768 (Expand_N_Allocator): For "new T", if the object is constrained by
14769 discriminant defaults, allocate the right amount of memory, rather than
14770 the maximum for type T.
14771 (Expand_Allocator_Expression): Suppress the call to Remove_Side_Effects
14772 when the allocator is initialized by a build-in-place call, since the
14773 allocator is already rewritten as a reference to the function result,
14774 and this prevents an unwanted duplication of the function call.
14775 Add with and use of Exp_Ch6.
14776 (Expand_Allocator_Expresssion): Check for an allocator whose expression
14777 is a call to build-in-place function and apply
14778 Make_Build_In_Place_Call_In_Allocator to the call (for both tagged and
14779 untagged designated types).
14780 (Expand_N_Unchecked_Type_Conversion): Do not do integer literal
14781 optimization if source or target is biased.
14782 (Expand_N_Allocator): Add comments for case of an allocator within a
14783 function that returns an anonymous access type designating tasks.
14784 (Expand_N_Allocator): apply discriminant checks for access
14785 discriminants of anonymous access types (AI-402, AI-416)
14786
147872006-10-31 Bob Duff <duff@adacore.com>
14788 Robert Dewar <dewar@adacore.com>
14789 Gary Dismukes <dismukes@adacore.com>
14790 Ed Schonberg <schonberg@adacore.com>
14791
14792 * exp_ch5.ads (Expand_N_Extended_Return_Statement): New procedure.
14793
6f7f72f9 14794 * exp_ch5.adb (Expand_N_Loop_Statement): Do validity checks on range
70198b9f
AC
14795 (Expand_N_Assignment_Statement): Call
14796 Make_Build_In_Place_Call_In_Assignment if the right-hand side is a
14797 build-in-place function call. Currently, this can happen only for
14798 assignments that come from aggregates.
14799 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
14800 in order to alleviate the upward compatibility introduced by AI-318.
14801 (Expand_N_Extended_Return_Statement): Add support for handling the
14802 return object as a build-in-place result.
14803 (Expand_Non_Function_Return): Implement simple return statements nested
14804 within an extended return.
14805 (Enable_New_Return_Processing): Turn on the new processing of return
14806 statements.
14807 (Expand_Non_Function_Return): For a return within an extended return,
14808 don't raise Program_Error, because Sem_Ch6 now gives a warning.
14809 (Expand_N_Extended_Return_Statement): Implement AI-318
14810 (Expand_Simple_Function_Return): Ditto.
14811 (Expand_N_If_Statement): Handle new -gnatwt warning
14812 (Expand_N_Case_Statement): Handle new -gnatwt warning
14813 (Expand_N_Assignment): Handle assignment to the Priority attribute of
14814 a protected object.
14815 (Expand_N_Assignment_Statement): Implement -gnatVe/E to control
14816 validity checking of assignments to elementary record components.
14817 (Expand_N_Return_Statement): return Class Wide types on the secondary
14818 stack independantly of their controlled status since with HIE runtimes,
14819 class wide types are not potentially controlled anymore.
14820
14821 * expander.adb (Expand): Add case for new N_Extended_Return_Statement
14822 node kind.
14823
14824 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Avoid
14825 Expand_Cleanup_Actions in case of N_Extended_Return_Statement, because
14826 it expects a block, procedure, or task. The return statement will get
14827 turned into a block, and Expand_Cleanup_Actions will happen then.
14828
148292006-10-31 Robert Dewar <dewar@adacore.com>
14830 Ed Schonberg <schonberg@adacore.com>
14831 Bob Duff <duff@adacore.com>
14832 Gary Dismukes <dismukes@adacore.com>
14833
14834 * exp_ch6.ads, exp_ch6.adb: Use new Validity_Check suppression
14835 capability.
14836 (Expand_Inlined_Call): Tagged types are by-reference types, and
14837 therefore should be replaced by a renaming declaration in the expanded
14838 body, as is done for limited types.
14839 (Expand_Call): If this is a call to a function with dispatching access
14840 result, propagate tag from context.
14841 (Freeze_Subprogram): Enable full ABI compatibility for interfacing with
14842 CPP by default.
14843 (Make_Build_In_Place_Call_In_Assignment): New procedure to do
14844 build-in-place when the right-hand side of an assignment is a
14845 build-in-place function call.
14846 (Make_Build_In_Place_Call_In_Allocator): Apply an unchecked conversion
14847 of the explicit dereference of the allocator to the result subtype of
14848 the build-in-place function. This is needed to satisfy type checking
14849 in cases where the caller's return object is created by an allocator for
14850 a class-wide access type and the type named in the allocator is a
14851 specific type.
14852 (Make_Build_In_Place_Call_In_Object_Declaration): Apply an unchecked
14853 conversion of the reference to the declared object to the result subtype
14854 of the build-in-place function. This is needed to satisfy type checking
14855 in cases where the declared object has a class-wide type. Also, in the
14856 class-wide case, change the type of the object entity to the specific
14857 result subtype of the function, to avoid passing a class-wide object
14858 without explicit initialization to the back end.
14859 (Register_Interface_DT_Entry): Moved outside the body of
14860 Freeze_Subprogram because this routine is now public; it is called from
14861 Check_Dispatching_Overriding to handle late overriding of abstract
14862 interface primitives.
14863 (Add_Access_Actual_To_Build_In_Place_Call): New utility procedure for
14864 adding an implicit access actual on a call to a build-in-place function.
14865 (Expand_Actuals): Test for an actual parameter that is a call to a
14866 build-in-place function and apply
14867 Make_Build_In_Place_Call_In_Anonymous_Context to the call.
14868 (Is_Build_In_Place_Function): New function to determine whether an
14869 entity is a function whose calls should be handled as build-in-place.
14870 (Is_Build_In_Place_Function_Call): New function to determine whether an
14871 expression is a function call that should handled as build-in-place.
14872 (Make_Build_In_Place_Call_In_Allocator): New procedure for handling
14873 calls to build-in-place functions as the initialization of an allocator.
14874 (Make_Build_In_Place_Call_In_Anonymous_Context): New procedure for
14875 handling calls to build-in-place functions in contexts that do not
14876 involve init of a separate object (for example, actuals of subprogram
14877 calls).
14878 (Make_Build_In_Place_Call_In_Object_Declaration): New procedure for
14879 handling calls to build-in-place functions as the initialization of an
14880 object declaration.
14881 (Detect_Infinite_Recursion): Add explicit parameter Process to
14882 instantiation of Traverse_Body to avoid unreferenced warning.
14883 (Check_Overriding_Inherited_Interfaces): Removed.
14884 (Register_Interface_DT_Entry): Code cleanup.
14885 (Register_Predefined_DT_Entry): Code cleanup.
14886 (Expand_Inlined_Call.Rewrite_Procedure_Call): Do not omit block around
14887 inlined statements if within a transient scope.
14888 (Expand_Inlined_Call.Process_Formals): When replacing occurrences of
14889 formal parameters with occurrences of actuals in inlined body, establish
14890 visibility on the proper view of the actual's subtype for the body's
14891 context.
14892 (Freeze_Subprogram): Do nothing if we are compiling under full ABI
14893 compatibility mode and we have an imported CPP subprogram because
14894 for now we assume that imported CPP primitives correspond with
14895 objects whose constructor is in the CPP side (and therefore we
14896 don't need to generate code to register them in the dispatch table).
14897 (Expand_Actuals): Introduce copy of actual, only if it might be a bit-
14898 aligned selected component.
14899 (Add_Call_By_Copy_Node): Add missing code to handle the case in which
14900 the actual of an in-mode parameter is a type conversion.
14901 (Expand_Actuals): If the call does not come from source and the actual
14902 is potentially misaligned, let gigi handle it rather than rejecting the
14903 (Expand_N_Subprogram_Body, Freeze_Subprogram): set subprograms returning
14904 Class Wide types as returning by reference independantly of their
14905 controlled status since with HIE runtimes class wide types are not
14906 potentially controlled anymore.
14907
6f7f72f9 149082006-10-31 Ed Schonberg <schonberg@adacore.com>
70198b9f 14909
6f7f72f9 14910 * exp_ch9.adb (Update_Prival_Types): Simplify code for entity
70198b9f
AC
14911 references that are private components of the protected object.
14912 (Build_Barrier_Function): Set flag Is_Entry_Barrier_Function
14913 (Update_Prival_Subtypes): Add explicit Process argument to Traverse_Proc
14914 instantiation to deal with warnings.
14915 (Initialize_Protection): If expression for priority is non-static, use
14916 System_Priority as its expected type, in case the expression has not
14917 been analyzed yet.
14918
149192006-10-31 Robert Dewar <dewar@adacore.com>
14920
14921 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): Add missing
14922 initialization of Homonym_Len.
14923 (Fully_Qualify_Name): Remove kludge to eliminate anonymous block
14924 names from fully qualified name. Fixes problem of duplicate
14925 external names differing only in the presence of such a block name.
14926
149272006-10-31 Thomas Quinot <quinot@adacore.com>
14928 Pablo Oliveira <oliveira@adacore.com>
6f7f72f9
EB
14929
14930 * exp_dist.adb (Get_Subprogram_Ids): This function will no more assign
70198b9f
AC
14931 subprogram Ids, even if they are not yet assigned.
14932 (Build_Subprogram_Id): It is now this function that will take care of
14933 calling Assign_Subprogram_Ids if necessary.
14934 (Add_Receiving_Stubs_To_Declarations): Checking the subprograms ids
14935 should be done only once they are assigned.
14936 (Build_From_Any_Function, case of tagged types): Add missing call to
14937 Allocate_Buffer.
14938 (Corresponding_Stub_Type): New subprogram. Returns the associated stub
14939 type for an RACW type.
14940 (Add_RACW_Features): When processing an RACW declaration for which the
14941 designated type is already frozen, enforce E.2.2(14) rules immediately.
14942 (GARLIC_Support.Build_Subprogram_Receiving_Stubs): Do not perform any
14943 special reordering of controlling formals.
14944
14945 * exp_dist.ads (Corresponding_Stub_Type): New subprogram. Returns the
14946 associated stub type for an RACW type.
14947
149482006-10-31 Ed Schonberg <schonberg@adacore.com>
14949
14950 * exp_fixd.adb (Rounded_Result_Set): For multiplication and division of
14951 fixed-point operations in an integer context, i.e. as operands of a
14952 conversion to an integer type, indicate that result must be rounded.
14953
149542006-10-31 Robert Dewar <dewar@adacore.com>
14955
14956 * exp_imgv.adb (Expand_Image_Attribute): For Wide_[Wide_]Character
14957 cases, pass the encoding method, since it is now required by the run
14958 time.
14959
14960 * s-valwch.ads, s-valwch.adb (Value_Wide_Wide_Character): Avoid
14961 assumption that Str'First = 1.
14962 (Value_Wide_Character): Takes EM (encoding method) parameter and passes
14963 it on to the Value_Wide_Wide_Character call.
14964 (Value_Wide_Wide_Character): Takes EM (encoding method) parameter and
14965 properly handles a string of the form quote-encoded_wide_char-quote.
14966
14967 * s-wchcnv.adb: Minor reformatting
14968
149692006-10-31 Javier Miranda <miranda@adacore.com>
6f7f72f9 14970
70198b9f
AC
14971 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
14972 run-time membership test to ensure that the constructed object
14973 implements the target abstract interface.
14974
149752006-10-31 Robert Dewar <dewar@adacore.com>
14976
14977 * exp_prag.adb (Expand_Pragma_Common_Object): Use a single
14978 Machine_Attribute pragma internally to implement the user pragma.
14979 Add processing for pragma Interface so that it is now completely
14980 equivalent to pragma Import.
14981
14982 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Extend this pragma
14983 so that it can be applied to all entities, including record components
14984 and enumeration literals.
14985 (Analyze_Pragma, case Priority_Specific_Dispatching): Check whether
14986 priority ranges are correct, verify compatibility against task
14987 dispatching and locking policies, and if everything is correct an entry
14988 is added to the table containing priority specific dispatching entries
14989 for this compilation unit.
14990 (Delay_Config_Pragma_Analyze): Delay processing
14991 Priority_Specific_Dispatching pragmas because when processing the
14992 pragma we need to access run-time data, such as the range of
14993 System.Any_Priority.
14994 (Sig_Flags): Add Pragma_Priority_Specific_Dispatching.
14995 Allow pragma Unreferenced as a context item
14996 Add pragma Preelaborable_Initialization
14997 (Analyze_Pragma, case Interface): Interface is extended so that it is
14998 now syntactically and semantically equivalent to Import.
14999 (Analyze_Pragma, case Compile_Time_Warning): Fix error of blowups on
15000 insertion characters.
15001 Add handling for Pragma_Wide_Character_Encoding
15002 (Process_Restrictions_Restriction_Warnings): Ensure that a warning
15003 never supercedes a real restriction, and that a real restriction
15004 always supercedes a warning.
15005 (Analyze_Pragma, case Assert): Set Low_Bound_Known if assert is of
15006 appropriate form.
15007
150082006-10-31 Bob Duff <duff@adacore.com>
15009 Ed Schonberg <schonberg@adacore.com>
15010 Robert Dewar <dewar@adacore.com>
15011
15012 * exp_ch7.adb (Build_Array_Deep_Procs, Build_Record_Deep_Procs,
15013 Make_Deep_Record_Body): Rename Is_Return_By_Reference_Type to be
15014 Is_Inherently_Limited_Type, because return-by-reference has no meaning
15015 in Ada 2005.
15016 (Find_Node_To_Be_Wrapped): Use new method of determining the result
15017 type of the function containing a return statement, because the
15018 Return_Type field was removed. We now use the Return_Applies_To field.
15019
6f7f72f9 15020 * exp_util.ads, exp_util.adb: Use new subtype N_Membership_Test
70198b9f
AC
15021 (Build_Task_Image_Decl): If procedure is not called from an
15022 initialization procedure, indicate that function that builds task name
15023 uses the sec. stack. Otherwise the enclosing initialization procedure
15024 will carry the indication.
15025 (Insert_Actions): Remove N_Return_Object_Declaration. We now use
15026 N_Object_Declaration instead.
15027 (Kill_Dead_Code): New interface to implement -gnatwt warning for
15028 conditional dead code killed, and change implementation accordingly.
15029 (Insert_Actions): Add N_Return_Object_Declaration case.
15030 Correct comment to mention N_Extension_Aggregate node.
15031 (Set_Current_Value_Condition): Call Safe_To_Capture_Value to avoid bad
15032 attempts to save information for global variables which cannot be
15033 safely tracked.
15034 (Get_Current_Value_Condition): Handle conditions the other way round
15035 (constant on left). Also handle right operand of AND and AND THEN
15036 (Set_Current_Value_Condition): Corresponding changes
15037 (Append_Freeze_Action): Remove unnecessary initialization of Fnode.
15038 (Get_Current_Value_Condition): Handle simple boolean operands
15039 (Get_Current_Value_Condition): Handle left operand of AND or AND THEN
15040 (Get_Current_Value_Condition): If the variable reference is within an
15041 if-statement, does not appear in the list of then_statments, and does
15042 not come from source, treat it as being at unknown location.
15043 (Get_Current_Value_Condition): Enhance to allow while statements to be
15044 processed as well as if statements.
15045 (New_Class_Wide_Subtype): The entity for a class-wide subtype does not
15046 come from source.
15047 (OK_To_Do_Constant_Replacement): Allow constant replacement within body
15048 of loop. This is safe now that we fixed Kill_Current_Values.
15049 (OK_To_Do_Constant_Replacement): Check whether current scope is
15050 Standard, before examining outer scopes.
15051
150522006-10-31 Vincent Celier <celier@adacore.com>
15053
15054 * krunch.ads, krunch.adb (Krunch): New Boolean parameter VMS_On_Target.
15055 When True, apply VMS treatment to children of packages A, G, I and S.
15056 For F320-016
15057
15058 * fname-uf.adb (Get_File_Name): Call Krunch with OpenVMS_On_Target
15059
150602006-10-31 Robert Dewar <dewar@adacore.com>
15061 Ed Schonberg <schonberg@adacore.com>
15062
15063 * freeze.adb: Add handling of Last_Assignment field
15064 (Warn_Overlay): Supply missing continuation marks in error msgs
15065 (Freeze_Entity): Add check for Preelaborable_Initialization
15066
15067 * g-comlin.adb: Add Warnings (Off) to prevent new warning
15068
15069 * g-expect.adb: Add Warnings (Off) to prevent new warning
15070
15071 * lib-xref.adb: Add handling of Last_Assignment field
15072 (Generate_Reference): Centralize handling of pragma Obsolescent here
15073 (Generate_Reference): Accept an implicit reference generated for a
15074 default in an instance.
15075 (Generate_Reference): Accept a reference for a node that is not in the
15076 main unit, if it is the generic body corresponding to an subprogram
15077 instantiation.
15078
15079 * xref_lib.adb: Add pragma Warnings (Off) to avoid new warnings
15080
6f7f72f9 15081 * sem_warn.ads, sem_warn.adb (Set_Warning_Switch): Add processing for
70198b9f
AC
15082 -gnatwq/Q.
15083 (Warn_On_Useless_Assignment): Suppress warning if enclosing inner
15084 exception handler.
15085 (Output_Obsolescent_Entity_Warnings): Rewrite to avoid any messages on
15086 use clauses, to avoid messages on packages used to qualify, and also
15087 to avoid messages from obsolescent units.
15088 (Warn_On_Useless_Assignments): Don't generate messages for imported
15089 and exported variables.
15090 (Warn_On_Useless_Assignments): New procedure
15091 (Output_Obsolescent_Entity_Warnings): New procedure
15092 (Check_Code_Statement): New procedure
15093
6f7f72f9 15094 * einfo.ads, einfo.adb (Has_Static_Discriminants): New flag
70198b9f
AC
15095 Change name Is_Ada_2005 to Is_Ada_2005_Only
15096 (Last_Assignment): New field for useless assignment warning
15097
150982006-10-31 Olivier Hainque <hainque@adacore.com>
15099
15100 * g-alleve.adb (lvx, stvx): Ceil-Round the Effective Address to the
15101 closest multiple of VECTOR_ALIGNMENT and not the closest multiple of 16.
15102
151032006-10-31 Bob Duff <duff@adacore.com>
15104 Robert Dewar <dewar@adacore.com>
15105 Ed Schonberg <schonberg@adacore.com>
15106
15107 * g-awk.adb (Default_Session, Current_Session): Compile this file in
15108 Ada 95 mode, because it violates the new rules for AI-318.
15109
15110 * g-awk.ads: Use overloaded subprograms in every case where we used to
15111 have a default of Current_Session. This makes the code closer to be
15112 correct for both Ada 95 and 2005.
15113
15114 * g-moreex.adb (Occurrence): Turn off warnings for illegal-in-Ada-2005
15115 code, relying on the fact that the compiler generates a warning
15116 instead of an error in -gnatg mode.
15117
15118 * lib-xref.ads (Xref_Entity_Letters): Add entry for new
15119 E_Return_Statement entity kind.
15120 Add an entry for E_Incomplete_Subtype in Xref_Entity_Letters.
15121
15122 * par.adb (P_Interface_Type_Definition): Addition of one formal to
15123 report an error if the reserved word abstract has been previously found.
15124 (SS_End_Type): Add E_Return for new extended_return_statement syntax.
6f7f72f9
EB
15125
15126 * par-ch4.adb (P_Aggregate_Or_Paren_Expr): Improve message for
70198b9f
AC
15127 parenthesized range attribute usage
15128 (P_Expression_No_Right_Paren): Add missing comment about error recovery.
15129
15130 * par-ch6.adb (P_Return_Object_Declaration): AI-318: Allow "constant"
15131 in the syntax for extended_return_statement. This is not in the latest
15132 RM, but the ARG is expected to issue an AI allowing this.
15133 (P_Return_Subtype_Indication,P_Return_Subtype_Indication): Remove
15134 N_Return_Object_Declaration. We now use N_Object_Declaration instead.
15135 (P_Return_Object_Declaration, P_Return_Subtype_Indication,
15136 P_Return_Statement): Parse the new syntax for extended_return_statement.
15137
15138 * par-endh.adb (Check_End, Output_End_Deleted, Output_End_Expected,
15139 Output_End_Missing): Add error-recovery code for the new
15140 extended_return_statement syntax; that is, the new E_Return entry on
15141 the scope stack.
15142
15143 * s-auxdec-vms_64.ads, s-auxdec.ads (AST_Handler): Change type from
15144 limited to nonlimited, because otherwise we violate the new Ada 2005
15145 rules about returning limited types in function Create_AST_Handler in
15146 s-asthan.adb.
15147
15148 * sem.adb (Analyze): Add cases for new node kinds
15149 N_Extended_Return_Statement and N_Return_Object_Declaration.
15150
15151 * sem_aggr.adb (Aggregate_Constraint_Checks): Verify that component
15152 type is in the same category as type of context before applying check,
15153 to prevent anomalies in instantiations.
15154 (Resolve_Aggregate): Remove test for limited components in aggregates.
15155 It's unnecessary in Ada 95, because if it has limited components, then
15156 it must be limited. It's wrong in Ada 2005, because limited aggregates
15157 are now allowed.
15158 (Resolve_Record_Aggregate): Move check for limited types later, because
15159 OK_For_Limited_Init requires its argument to have been resolved.
15160 (Get_Value): When copying the component default expression for a
15161 defaulted association in an aggregate, use the sloc of the aggregate
15162 and not that of the original expression, to prevent spurious
15163 elaboration errors, when the expression includes function calls.
15164 (Check_Non_Limited_Type): Correct code for AI-287, extension aggregates
15165 were missing. We also didn't handle qualified expressions. Now also
15166 allow function calls. Use new common routine OK_For_Limited_Init.
15167 (Resolve_Extension_Aggregate): Minor fix to bad error message (started
15168 with space can upper case letter).
15169
6f7f72f9 15170 * sem_ch3.ads, sem_ch3.adb (Create_Constrained_Components): Set
70198b9f 15171 Has_Static_Discriminants flag
6f7f72f9
EB
15172 (Record_Type_Declaration): Diagnose an attempt to declare an interface
15173 type with discriminants.
15174 (Process_Range_Expr_In_Decl): Do validity checks on range
70198b9f
AC
15175 (Build_Discriminant_Constraints): Use updated form of
15176 Denotes_Discriminant.
15177 (Process_Subtype): If the subtype is a private subtype whose full view
15178 is a concurrent subtype, introduce an itype reference to prevent scope
15179 anomalies in gigi.
15180 (Build_Derived_Record_Type, Collect_Interface_Primitives,
15181 Record_Type_Declaration): The functionality of the subprograms
15182 Collect_Abstract_Interfaces and Collect_All_Abstract_Interfaces
15183 is now performed by a single routine.
15184 (Build_Derived_Record_Type): If the type definition includes an explicit
15185 indication of limitedness, then the type must be marked as limited here
15186 to ensure that any access discriminants will not be treated as having
15187 a local anonymous access type.
15188 (Check_Abstract_Overriding): Issue a detailed error message when an
15189 abstract subprogram was not overridden due to incorrect mode of its
15190 first parameter.
15191 (Analyze_Private_Extension_Declaration): Add support for the analysis of
15192 synchronized private extension declarations. Verify that the ancestor is
15193 a limited or synchronized interface or in the generic case, the ancestor
15194 is a tagged limited type or synchronized interface and all progenitors
15195 are either limited or synchronized interfaces.
15196 Derived_Type_Declaration): Check for presence of private extension when
15197 dealing with synchronized formal derived types.
15198 Process_Full_View): Enchance the check done on the usage of "limited" by
15199 testing whether the private view is synchronized.
15200 Verify that a synchronized private view is completed by a protected or
15201 task type.
15202 (OK_For_Limited_Init_In_05): New function.
15203 (Analyze_Object_Declaration): Move check for limited types later,
15204 because OK_For_Limited_Init requires its argument to have been resolved.
15205 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
15206 in order to alleviate the upward compatibility introduced by AI-318.
15207 (Constrain_Corresponding_Record): If the constraint is for a component
15208 subtype, mark the itype as frozen, to avoid out-of-scope references to
15209 discriminants in the back-end.
15210 (Collect_Implemented_Interfaces): Protect the recursive algorithm of
15211 this subprogram against wrong sources.
15212 (Get_Discr_Value, Is_Discriminant): Handle properly references to a
15213 discriminant of limited type completed with a protected type, when the
15214 discriminant is used to constrain a private component of the type, and
15215 expansion is disabled.
15216 (Find_Type_Of_Object): Do not treat a return subtype that is an
15217 anonymous subtype as a local_anonymous_type, because its accessibility
15218 level is the return type of the enclosing function.
15219 (Check_Initialization): In -gnatg mode, turn the error "cannot
15220 initialize entities of limited type" into a warning.
15221 (OK_For_Limited_Init): Return true for generated nodes, since it
15222 sometimes violates the legality rules.
15223 (Make_Incomplete_Declaration): If the type for which an incomplete
15224 declaration is created happens to be the currently visible entity,
15225 preserve the homonym chain when removing it from visibility.
15226 (Check_Conventions): Add support for Ada 2005 (AI-430): Conventions of
15227 inherited subprograms.
15228 (Access_Definition): If this is an access to function that is the return
15229 type of an access_to_function definition, context is a type declaration
15230 and the scope of the anonymous type is the current one.
15231 (Analyze_Subtype_Declaration): Add the defining identifier of a regular
15232 incomplete subtype to the set of private dependents of the original
15233 incomplete type.
15234 (Constrain_Discriminated_Type): Emit an error message whenever an
15235 incomplete subtype is being constrained.
15236 (Process_Incomplete_Dependents): Transform an incomplete subtype into a
15237 corresponding subtype of the full view of the original incomplete type.
15238 (Check_Incomplete): Properly detect invalid usage of incomplete types
15239 and subtypes.
15240
152412006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
15242
15243 * g-catiio.ads, g-catiio.adb (Value): New function.
15244 Given an input String, try and parse a valid Time value.
15245
152462006-10-31 Vincent Celier <celier@adacore.com>
15247
15248 * g-debpoo.adb (Is_Valid): Correctly compute Offset using
15249 Integer_Address arithmetic, as in Set_Valid.
15250
152512006-10-31 Arnaud Charlet <charlet@adacore.com>
15252 Robert Dewar <dewar@adacore.com>
15253
15254 * gnatcmd.adb (Process_Link): Use Osint.Executable_Name instead of
15255 handling executable extension manually and duplicating code.
15256
15257 * make.adb: Implement new -S switch
15258 (Gnatmake): Use new function Osint.Executable_Name instead
15259 of handling executable extension manually.
15260
15261 * prj-util.adb (Executable_Of): Make sure that if an Executable_Suffix
15262 is specified, the executable name ends with this suffix.
15263 Take advantage of Osint.Executable_Name instead of duplicating code.
15264
15265 * switch-m.adb: Recognize new gnatmake -S switch
15266
15267 * targparm.ads, targparm.adb (Executable_Extension_On_Target): New
15268 variable.
15269 (Get_Target_Parameters): Set Executable_Extension_On_Target if
15270 available.
15271
15272 * makeusg.adb: Add line for gnatmake -S switch
15273
152742006-10-31 Vincent Celier <celier@adacore.com>
15275
15276 * gnatlink.adb (Gnatlink): If gcc is not called with -shared-libgcc,
15277 call it with -static-libgcc, as there are some platforms, such as
15278 Darwin, where one of these two switches is compulsory to link.
15279
152802006-10-31 Vincent Celier <celier@adacore.com>
6f7f72f9 15281
70198b9f
AC
15282 * gnatls.adb: Take into account GPR_PROJECT_PATH, when it is defined,
15283 instead of ADA_PROJECT_PATH, for the project path.
15284 (Gnatls): When displaying the project path directories, use host dir
15285 specs.
15286
15287 * prj-ext.adb (Prj.Ext elaboration): On VMS, only expand relative path
15288 names in the project path, as absolute paths may correspond to
15289 multi-valued VMS logical names.
15290
152912006-10-31 Vincent Celier <celier@adacore.com>
15292
15293 * g-os_lib.ads, g-os_lib.adb (Locate_Exec_On_Path): Always return an
15294 absolute path name.
15295 (Locate_Regular_File): Ditto
15296 (Change_Dir): Remove, no longer used
15297 (Normalize_Pathname): Do not use Change_Dir to get the drive letter
15298 on Windows. Get it calling Get_Current_Dir.
15299 (OpenVMS): Remove imported boolean, no longer needed.
15300 (Normalize_Pathname)[VMS]: Do not resolve directory names.
15301 (Pid_To_Integer): New function to convert a Process_Id to Integer
15302
153032006-10-31 Thomas Quinot <quinot@adacore.com>
15304
15305 * g-socket.ads, g-socket.adb (Close_Selector): Once the signalling
15306 sockets are closed, reset the R_Sig_Socket and W_Sig_Socket components
15307 to No_Socket.
15308 (Selector_Type): Add default value of No_Socket for R_Sig_Socket and
15309 W_Sig_Socket.
15310
153112006-10-31 Robert Dewar <dewar@adacore.com>
15312
15313 * g-speche.ads, g-speche.adb: Add special case to recognize misspelling
15314 initial letter o as a zero.
15315
153162006-10-31 Robert Dewar <dewar@adacore.com>
15317
15318 * g-spipat.adb (S_To_PE): Remove incorrect use of 0 instead of Str'First
15319
153202006-10-31 Robert Dewar <dewar@adacore.com>
15321
6f7f72f9
EB
15322 * layout.adb (Layout_Record_Type): Deal with non-static subtypes of
15323 variant records
15324 (Layout_Variant_Record): Retrieve the discriminants from the entity
70198b9f
AC
15325 rather than from the type definition, because in the case of a full
15326 type for a private type we need to take the discriminants from the
15327 partial view.
6f7f72f9
EB
15328 (Layout_Component_List): When applying the Max operator to variants with
15329 a nonstatic size, check whether either operand is static and scale that
15330 operand from bits to storage units before applying Max.
70198b9f
AC
15331 (Layout_Type): In VMS, if a C-convention access type has no explicit
15332 size clause (and does not inherit one in the case of a derived type),
15333 then the size is reset to 32 from 64.
15334
153352006-10-31 Vincent Celier <celier@adacore.com>
15336
15337 * lib-load.adb (Load_Unit): Skip the test for a unit not found when
15338 its file has already been loaded, according to the unit being loaded,
15339 not to the current value of Multiple_Unit_Index.
15340
153412006-10-31 Thomas Quinot <quinot@adacore.com>
15342 Eric Botcazou <ebotcazou@adacore.com>
15343 Arnaud Charlet <charlet@adacore.com>
15344
15345 * Makefile.in: Set EH mechanism to ZCX for FreeBSD.
15346 (NO_REORDER_ADAFLAGS): New var defined to -fno-toplevel-reorder if
15347 possible.
15348 (a-except.o): Pass it to the compiler.
15349 (gnatlib-shared-vms): Removed -nostartfiles switch in link step.
15350 (LIBGNAT_TARGET_PAIRS for Windows): Avoid the use of the specific
15351 a-calend-mingw.adb version.
15352
6f7f72f9 15353 * Makefile.rtl: Added s-dsaser.
70198b9f
AC
15354 Add object entries for Ada.Calendar.[Arithmetic/Formatting/Time_Zones]
15355 (GNATRTL_TASKING_OBJS): Add Ada.Dispatching and
15356 Ada.Dispatching.Round_Robin.
15357 Added new unit Ada.Containers.Restricted_Bounded_Doubly_Linked_Lists
15358
15359 * Make-lang.in: Remove all references to gt-ada-decl.h.
15360 Add concatenation (s-strops/s-sopco3/s-sopco4/s-sopco5) to compiler
15361 sources.
15362 Add dependency on ada/s-restri.o for GNAT1 and GNATBIND objects.
15363 Update dependencies.
15364
15365 * system-freebsd-x86.ads: Make ZCX the default EH mechanism for FreeBSD
15366
153672006-10-31 Vincent Celier <celier@adacore.com>
15368
15369 * mlib-utl.adb (Initialized): Remove, no longer used
15370 (Initialize): Remove, no longer used
15371 (Ar): If Ar_Exec is null, get the location of the archive builder and,
15372 if there is one, the archive indexer. Fail if the archive builder cannot
15373 be found.
15374 (Gcc): If the driver path is unknown, get it. Fail if the driver cannot
15375 be found.
15376
153772006-10-31 Ed Schonberg <schonberg@adacore.com>
15378
15379 * sem_ch10.ads, sem_ch10.adb (Check_Redundant_Withs,
15380 Process_Body_Clauses): If the context of a body includes a use clause
15381 for P.Q then a with_clause for P in the same body is not redundant,
15382 even if the spec also has a with_clause on P.
15383 Add missing continuation mark to error msg
15384 (Build_Limited_Views): A limited view of a type is tagged if its
15385 declaration includes a record extension.
15386 (Analyze_Proper_Body): Set Corresponding_Stub field in N_Subunit
15387 node, even if the subunit has errors. This avoids malfunction by
15388 Lib.Check_Same_Extended_Unit in the presence of syntax errors.
15389 (Analyze_Compilation_Unit): Add circuit to make sure we get proper
15390 generation of obsolescent messages for with statements (cannot do
15391 this too early, or we cannot implement avoiding the messages in the
15392 case of obsolescent units withing obsolescent units).
15393 (Install_Siblings): If the with_clause is on a remote descendant of
15394 an ancestor of the current compilation unit, find whether there is
15395 a sibling child unit that is immediately visible.
15396 (Remove_Private_With_Clauses): New procedure, invoked after completing
15397 the analysis of the private part of a nested package, to remove from
15398 visibility the private with_clauses of the enclosing package
15399 declaration.
15400 (Analyze_With_Clause): Remove Check_Obsolescent call, this checking is
15401 now centralized in Generate_Reference.
15402 (Install_Limited_Context_Clauses): Remove superfluous error
15403 message associated with unlimited view visible through use
15404 and renamings. In addition, at the point in which the error
15405 is reported, we add the backslash to the text of the error
15406 to ensure that it is reported as a single error message.
15407 Use new // insertion for some continuation messages
15408 (Expand_Limited_With_Clause): Use copy of name rather than name itself,
15409 to create implicit with_clause for parent unit mentioned in original
15410 limited_with_clause.
15411 (Install_Limited_With_Unit): Set entity of parent identifiers if the
15412 unit is a child unit. For ASIS queries.
15413 (Analyze_Subunit): If the subunit appears within a child unit, make all
15414 ancestor child units directly visible again.
15415
154162006-10-31 Robert Dewar <dewar@adacore.com>
15417
15418 * par-ch10.adb (P_Context_Clause): Minor error message fix
15419
154202006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
15421 Javier Miranda <miranda@adacore.com>
15422
15423 * par-ch12.adb: Grammar update and cleanup.
15424 (P_Formal_Type_Definition, P_Formal_Derived_Type_Definition): Add
15425 support for synchronized derived type definitions.
15426 Add the new actual Abstract_Present to every call to
15427 P_Interface_Type_Definition.
15428 (P_Formal_Object_Declarations): Update grammar rules. Handle parsing of
15429 a formal object declaration with an access definition or a subtype mark
15430 with a null exclusion.
15431 (P_Generic_Association): Handle association with box, and others_choice
15432 with box, to support Ada 2005 partially parametrized formal packages.
15433
154342006-10-31 Robert Dewar <dewar@adacore.com>
15435 Javier Miranda <miranda@adacore.com>
6f7f72f9 15436
70198b9f
AC
15437 * par-ch3.adb (P_Range_Or_Subtype_Mark): Check for bad parentheses
15438 (P_Type_Declaration): Remove barrier against the reserved word "limited"
15439 after "abstract" to give support to the new syntax of AARM 3.4 (2/2).
15440 (P_Type_Declaration): Minor code cleanup. Add support for synchronized
15441 private extensions.
15442 (P_Type_Declaration): Add the new actual Abstract_Present to every call
15443 to P_Interface_Type_Definition.
15444 (P_Interface_Type_Definition): Addition of one formal to report an error
15445 if the reserved word abstract has been previously found.
15446 (P_Identifier_Declarations): Update grammar rules. Handle parsing of an
15447 object renaming declaration with an access definition or subtype mark
15448 with a possible null exclusion.
15449
15450 * par-ch9.adb: Minor error msg fix
15451
15452 * par-load.adb: Add missing continuation mark to error msg
15453
15454 * par-tchk.adb: (Wrong_Token): Code cleanup, use concatenation
15455
154562006-10-31 Vincent Celier <celier@adacore.com>
15457
15458 * prj-dect.adb (Parse_Attribute_Declaration): Do not issue warning for
15459 unknown attribute in unknown package or in package that does not need
15460 to be checked.
15461 (Parse_Package_Declaration): Do not issue warning for unknown package in
15462 quiet output.
15463
154642006-10-31 Vincent Celier <celier@adacore.com>
15465
15466 * prj-makr.adb (Packages_To_Check_By_Gnatname): New global constant
15467 (Make): Call Parse with Packages_To_Check_By_Gnatname for parameter
15468 Packages_To_Check.
15469
154702006-10-31 Vincent Celier <celier@adacore.com>
15471
15472 * prj-nmsc.adb (Check_Ada_Name): For children of package A, G, I and S
15473 on VMS, change "__" to '.' before checking the name.
15474 (Record_Ada_Source): Always add the source file name in the list of
15475 of sources, even if it is not the first time, as it is for another
15476 source index.
15477 (Get_Unit): Replace both '_' (after 'a', 'g', 'i' or 's') with a single
15478 dot, instead of replacing only the first '_'.
15479
15480 * prj-part.adb (Parse): Convert project file path to canonical form
15481
15482 * prj-proc.adb (Recursive_Process): Make sure that, when a project is
15483 extended, the project id of the project extending it is recorded in its
15484 data, even when it has already been processed as an imported project.
15485
154862006-10-31 Robert Dewar <dewar@adacore.com>
15487
15488 * repinfo.adb (List_Entities): Don't list entities from renaming
15489 declarations.
15490
154912006-10-31 Arnaud Charlet <charlet@adacore.com>
15492 Robert Dewar <dewar@adacore.com>
15493
15494 * restrict.ads, restrict.adb (Restriction_Active): Now returns False if
15495 only a restriction warning is active for the given restriction. This is
15496 desirable because we do not want to modify code in the case where only
15497 a warning is set.
15498 (Set_Profile_Restrictions): Make sure that a Profile_Warnings never
15499 causes overriding of real restrictions.
15500 Take advantage of new No_Restrictions constant.
15501
15502 * raise.h: (__gnat_set_globals): Change profile.
15503
155042006-10-31 Arnaud Charlet <charlet@adacore.com>
70198b9f 15505
6f7f72f9
EB
15506 * rtsfind.adb: Remove s-polint from comment as it exists no more.
15507
15508 * rtsfind.ads:
15509 Move entity RE_Get_Active_Partition_Id to package System.DSA_Services.
15510 Move all the entities in obsolete package System.PolyORB_Interface to
15511 System.Partition_Interface.
70198b9f
AC
15512 (RE_Storage_Size): New function in System.Tasking.
15513 (RE_Get_Ceiling): New entity.
15514 (RE_Set_Ceiling): New entity.
15515 (RO_PE_Get_Ceiling): New entity.
15516 (RO_RE_Set_Ceiling): New entity.
15517 (Inherit_CPP_DT): New entity
15518
155192006-10-31 Robert Dewar <dewar@adacore.com>
15520
15521 * scng.adb (Scan, case of numeric literal): Better msg for identifier
15522 starting with a digit.
15523
155242006-10-31 Ed Schonberg <schonberg@adacore.com>
15525 Thomas Quinot <quinot@adacore.com>
15526 Javier Miranda <miranda@adacore.com>
15527 Gary Dismukes <dismukes@adacore.com>
15528
15529 * sem_attr.ads, sem_attr.adb (Analyze_Access_Attribute): Diagnose
15530 properly an attempt to apply Unchecked_Access to a protected operation.
15531 (OK_Self_Reference): New subprogram to check the legality of an access
15532 attribute whose prefix is the type of an enclosing aggregate.
15533 Generalizes previous mechanism to handle attribute references nested
15534 arbitrarily deep within the aggregate.
15535 (Analyze_Access_Attribute): An access attribute whose prefix is a type
15536 can appear in an aggregate if this is a default-initialized aggregate
15537 for a self-referential type.
15538 (Resolve_Attribute, case Access): Ditto.
15539 Add support for new implementation defined attribute Stub_Type.
15540 (Eval_Attribute, case Attribute_Stub_Type): New case.
15541 (Analyze_Attribute, case Attribute_Stub_Type): New case.
15542 (Stream_Attribute_Available): Implement using new subprogram from
15543 sem_cat, Has_Stream_Attribute_Definition, instead of incorrect
15544 Has_Specified_Stream_Attribute flag.
15545 Disallow Storage_Size and Storage_Pool for access to subprogram
15546 (Resolve_Attribute, case 'Access et al): Take into account anonymous
15547 access types of return subtypes in extended return statements. Remove
15548 accessibility checks on anonymous access types when Unchecked_Access is
15549 used.
15550 (Analyze_Attribute): Add support for the use of 'Class to convert
15551 a class-wide interface to a tagged type.
15552 Add support for the attribute Priority.
15553 (Resolve_Attribute, case Attribute_Access): For Ada_05, add test for
15554 whether the designated type is discriminated with a constrained partial
15555 view and require static matching in that case.
15556 Add local variable Des_Btyp. The Designated_Type
15557 of an access to incomplete subtype is either its non-limited view if
15558 coming from a limited with or its etype if regular incomplete subtype.
15559
15560 * sem_cat.ads, sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type):
15561 Fix predicate to identify and allow cases of (expander-generated)
15562 references to tag of designated object of a RACW.
15563 (Validate_Static_Object_Name): In Ada 2005, a formal object is
15564 non-static, and therefore cannot appear as a primary in a preelaborable
15565 package.
15566 (Has_Stream_Attribute_Definition): New subprogram, abstracted from
15567 Has_Read_Write_Attributes.
15568 (Has_Read_Write_Attributes): Reimplement in termes of
15569 Has_Stream_Attribute_Definition.
15570 (Missing_Read_Write_Attributes): When checking component types in a
15571 record, unconditionally call Missing_Read_Write_Attributes recursively
15572 (remove guard checking for Is_Record_Type / Is_Access_Type).
15573
155742006-10-31 Robert Dewar <dewar@adacore.com>
15575
15576 * sem_ch11.adb (Analyze_Handled_Statements): Move final test for
15577 useless assignments here and conditionalize it on absence of exception
15578 handlers.
15579 (Analyze_Exception_Handlers): Small code reorganization of error
15580 detection code, for new handling of formal packages.
15581
155822006-10-31 Ed Schonberg <schonberg@adacore.com>
15583 Hristian Kirtchev <kirtchev@adacore.com>
6f7f72f9
EB
15584
15585 * sem_ch12.ads, sem_ch12.adb (Save_References): If node is an operator
70198b9f
AC
15586 that has been constant-folded, preserve information of original tree,
15587 for ASIS uses.
15588 (Analyze_Formal_Derived_Type): Set the limited present flag of the newly
15589 generated private extension declaration if the formal derived type is
15590 synchronized. Carry synchronized present over to the generated private
15591 extension.
15592 (Validate_Derived_Type_Instance): Ensure that the actual of a
15593 synchronized formal derived type is a synchronized tagged type.
15594 (Instantiate_Formal_Package): When creating the instantiation used to
15595 validate the actual package of a formal declared without a box, check
15596 whether the formal itself depends on a prior actual.
15597 (Instantiate_Formal_Subprogram): Create new entities for the defining
15598 identifiers of the formals in the renaming declaration, for ASIS use.
15599 (Instantiate_Formal_Subprogram, Instantiate_Formal_Type): When creating
15600 a renaming declaration or a subtype declaration for an actual in an
15601 instance, capture location information of declaration in generic, for
15602 ASIS use.
15603 (Instantiate_Formal_Package): Add comments on needed additional tests.
15604 AI-317 (partial parametrization) is fully implemented.
15605 (Validate_Private_Type_Instance): Add check for actual which
15606 must have preelaborable initialization
15607 Use new // insertion for some continuation messages
15608 (Analyze_Formal_Object_Declaration): Change usage of Expression to
15609 Default_Expression. Add type retrieval when the declaration has an
15610 access definition. Update premature usage of incomplete type check.
15611 (Check_Access_Definition): New subsidiary routine. Check whether the
15612 current compilation version is Ada 05 and the supplied node has an
15613 access definition.
15614 (Instantiate object): Alphabetize local variables. Handle the creation
15615 of new renaming declarations with respect to the kind of definition
15616 used - either an access definition or a subtype mark. Guard against
15617 unnecessary error message in the context of anonymous access types after
15618 they have been resolved. Add check for required null exclusion in a
15619 formal object declaration.
15620 (Switch_View): A private subtype of a non-private type needs to be
15621 switched (the base type can have been switched without its private
15622 dependents because of the last branch of Check_Private_View.
15623 (Check_Private_View): Do not recompute Base_Type (T), instead use cached
15624 value from BT.
15625 (Instantiate_Type): Emit an error message whenever a class-wide type of
15626 a tagged incomplete type is used as a generic actual.
15627 (Find_Actual_Type): Extend routine to handle a component type in a child
15628 unit that is imported from a formal package in a parent.
15629 (Validate_Derived_Type_Instance): Check that analyzed formal and actual
15630 agree on constrainedness, rather than checking against ultimate ancestor
15631 (Instantiate_Subprogram_Body): Create a cross-reference link to the
15632 generic body, for navigation purposes.
15633
156342006-10-31 Robert Dewar <dewar@adacore.com>
15635 Thomas Quinot <quinot@adacore.com>
15636
15637 * sem_ch13.adb: Storage pool cannot be given for access to subprogram
15638 type.
15639 (New_Stream_Subprogram): When processing an attribute definition clause
15640 for a stream-oriented subprogram, record an entity node occurring at
15641 the point of clause to use for checking the visibility of the clause,
15642 as defined by 8.3(23) as amended by AI-195.
15643 (New_Stream_Subprogram): New procedure, factoring behaviour from both
15644 New_Stream_Function and New_Stream_Procedure.
15645 (New_Stream_Function, New_Stream_Procedure): Removed.
15646 (Analyze_Attribute_Definition_Clause, case Address): Check new
15647 Alignment_Check check
15648
156492006-10-31 Ed Schonberg <schonberg@adacore.com>
15650 Javier Miranda <miranda@adacore.com>
15651 Robert Dewar <dewar@adacore.com>
15652
15653 * sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we
15654 generate the same errors compiling under -gnatc.
15655 (Try_Object_Operation): If no candidate interpretation succeeds, but
15656 there is at least one primitive operation with the right name, report
15657 error in call rather than on a malformed selected component.
15658 (Analyze_Selected_Component): If the prefix is an incomplete type from
15659 a limited view, and the full view is available, use the full view to
15660 determine whether this is a prefixed call to a primitive operation.
15661 (Operator_Check): Verify that a candidate interpretation is a binary
15662 operation before checking the type of its second formal.
15663 (Analyze_Call): Add additional warnings for function call contexts not
15664 yet supported.
15665 (Analyze_Allocator): Move the check for "initialization not allowed for
15666 limited types" after analyzing the expression. This is necessary,
15667 because OK_For_Limited_Init looks at the structure of the expression.
15668 Before analysis, we don't necessarily know what sort of expression it
15669 is. For example, we don't know whether F(X) is a function call or an
15670 indexed component; the former is legal in Ada 2005; the latter is not.
15671 (Analyze_Allocator): Correct code for AI-287 -- extension aggregates
15672 were missing. We also didn't handle qualified expressions. Now also
15673 allow function calls. Use new common routine OK_For_Limited_Init.
15674 (Analyze_Type_Conversion): Do not perform some legality checks in an
15675 instance, because the error message will be redundant or spurious.
15676 (Analyze_Overloaded_Selected_Component): Do not do style check when
15677 setting an entity, since we do not know it is the right entity yet.
15678 (Analyze_Selected_Component): Move Generate_Reference call to Sem_Res
15679 (Analyze_Overloaded_Selected_Component): Same change
15680 (Analyze_Selected_Component): Remove unnecessary prefix type retrieval
15681 since regular incomplete subtypes are transformed into corresponding
15682 subtypes of their full views.
15683 (Complete_Object_Operation): Treat name of transformed subprogram call
15684 as coming from source, for browsing purposes.
15685 (Try_Primitive_Operation): If formal is an access parameter, compare
15686 with base type of object to determine whether it is a primitive
15687 operation.
15688 (Operator_Check): If no interpretation of the operator matches, check
15689 whether a use clause on any candidate might make the operation legal.
15690 (Try_Class_Wide_Operation): Check whether the first parameter is an
15691 access type whose designated type is class-wide.
15692
156932006-10-31 Robert Dewar <dewar@adacore.com>
15694 Ed Schonberg <schonberg@adacore.com>
15695 Gary Dismukes <dismukes@adacore.com>
15696
15697 * sem_ch5.ads, sem_ch5.adb (Analyze_Loop_Statement): Add circuit to
15698 warn on infinite loops.
15699 Add \\ to some continuation messages
15700 (Analyze_Assignment_Statement): Call Warn_On_Useless_Assignment
15701 (Process_Bounds): If the bounds are integer literals that result from
15702 constant-folding, and they carry a user-defined type, preserve that type
15703 rather than treating this as an integer range.
15704 (Analyze_Exit_Statement): Test for E_Return_Statement in legality check.
15705 (Analyze_Goto_Statement): Test for E_Return_Stateemnt in legality check.
15706 (Analyze_Assignment_Statement): Add call to Check_Elab_Assign for
15707 left hand side of assignment.
15708 (Analyze_Assignment): Add suport to manage assigments to the attribute
15709 priority of a protected object.
15710 (Check_Possible_Current_Value_Condition): Allow fully qualified names
15711 not just identifiers.
15712 (Check_Possible_Current_Value_Condition): Acquire left operand of AND
15713 or AND THEN for possible tracking.
15714 (Analyze_Iteration_Scheme): Check for setting Current_Value for the
15715 case of while loops so we can track values in the loop body.
15716
157172006-10-31 Ed Schonberg <schonberg@adacore.com>
15718 Hristian Kirtchev <kirtchev@adacore.com>
15719 Bob Duff <duff@adacore.com>
6f7f72f9 15720
70198b9f
AC
15721 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Declaration): A null
15722 procedure cannot be a protected operation (it is a basic_declaration,
15723 not a subprogram_declaration).
15724 (Check_Overriding_Indicator): Rename formal Does_Override to Overridden_
15725 Subp. Add logic for entry processing.
15726 (Check_Synchronized_Overriding): New procedure in New_Overloaded_Entity.
15727 Determine whether an entry or subprogram of a protected or task type
15728 override an inherited primitive of an implemented interface.
15729 (New_Overloaded_Entity): Add calls to Check_Synchronized_Overriding.
15730 Update the actual used in calls to Check_Overriding_Indicator.
15731 (Analyze_Generic_Subprogram_Body): If the subprogram is a child unit,
15732 generate the proper reference to the parent unit, for cross-reference.
15733 (Analyze_Subprogram_Declaration): Protect Is_Controlling_Formal with
15734 Is_Formal.
15735 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
15736 (Add_Extra_Formal): Revise procedure to allow passing in associated
15737 entity, scope, and name suffix, and handle setting of the new
15738 Extra_Formals field.
15739 (Create_Extra_Formals): Change existing calls to Add_Extra_Formal to
15740 pass new parameters. Add support for adding the new extra access formal
15741 for functions whose calls are treated as build-in-place.
15742 (Analyze_A_Return_Statement): Correct casing in error message.
15743 Move Pop_Scope to after Analyze_Function_Return, because an extended
15744 return statement really is a full-fledged scope. Otherwise, visibility
15745 doesn't work right. Correct use of "\" for continuation messages.
15746 (Analyze_Function_Return): Call Analyze on the Obj_Decl, rather than
15747 evilly trying to call Analyze_Object_Declaration directly. Otherwise,
15748 the node doesn't get properly marked as analyzed.
15749 (Analyze_Subprogram_Body): If subprogram is a function that returns
15750 an anonymous access type that denotes a task, build a Master Entity
15751 for it.
15752 (Analyze_Return_Type): Add call to Null_Exclusion_Static_Checks. Verify
15753 proper usage of null exclusion in a result definition.
15754 (Process_Formals): Code cleanup and new error message.
15755 (Process_Formals): Detect incorrect application of null exclusion to
15756 non-access types.
15757 (Conforming_Types): Handle conformance between [sub]types and itypes
15758 generated for entities that have null exclusions applied to them.
15759 (Maybe_Primitive_Operation): Add an additional type retrieval when the
15760 base type is an access subtype. This case arrises with null exclusions.
15761 (New_Overloaded_Entity): Do not remove the overriden entity from the
15762 homonym chain if it corresponds with an abstract interface primitive.
15763 (Process_Formals): Replace membership test agains Incomplete_Kind with a
15764 call to the synthesized predicate Is_Incomplete_Type.
15765 (Analyze_Subprogram_Body): Check wrong placement of abstract interface
15766 primitives.
15767 (Analyze_Subprogram_Declaration): Check that abstract interface
15768 primitives are abstract or null.
15769 (Analyze_Subprogram_Specification): Remove previous check for abstract
15770 interfaces because it was not complete.
15771 (Has_Interface_Formals): Removed.
15772
157732006-10-31 Ed Schonberg <schonberg@adacore.com>
15774 Javier Miranda <miranda@adacore.com>
15775
15776 * sem_ch7.adb (Check_Anonymous_Access_Types): New procedure, subsidiary
15777 of Analyze_Package_Body, to create Itype references for anonymous
15778 access types created in the package declaration, whose designated types
15779 may have only a limited view.
15780 (Analyze_Package_Specification): For the private part of a nested
15781 package, install private_with_clauses of enclosing compilation unit if
15782 we are in its visible part.
15783 (Declare_Inherited_Private_Subprograms): Complete barrier
15784 to ensure that the primitive operation has an alias to some parent
15785 primitive. This is now required because, after the changes done for the
15786 implementation of abstract interfaces, the contents of the list of
15787 primitives has entities whose alias attribute references entities of
15788 such list of primitives.
15789 (Analyze_Package_Specification): Simplify code that handles parent units
15790 of instances and formal packages.
15791 (Uninstall_Declarations): Check the convention consistency among
15792 primitive overriding operations of a tagged record type.
15793
157942006-10-31 Robert Dewar <dewar@adacore.com>
15795 Hristian Kirtchev <kirtchev@adacore.com>
15796 Javier Miranda <miranda@adacore.com>
15797 Ed Schonberg <schonberg@adacore.com>
6f7f72f9 15798
70198b9f
AC
15799 * sem_ch8.adb: Minor error msg rewording
15800 (Undefined): When checking for misspellings, invert arguments (to get
15801 expected and found set right)
15802 (Analyze_Subprogram_Renaming): Propagate Is_Pure, Is_Preelaborated
15803 (Analyze_Generic_Renaming): Same fix
15804 (Use_One_Package): Do not take into account the internal entities of
15805 abstract interfaces during the analysis of entities that are marked
15806 as potentially use-visible.
15807 (Find_Type): Handle the case of an attribute reference for
15808 implementation defined attribute Stub_Type (simply let the analysis of
15809 the attribute reference rewrite it).
15810 (Use_One_Type, End_Use_Type): Reject a reference to a limited view of a
15811 type that appears in a Use_Type clause.
15812 (Analyze_Object_Renaming): Add support for renaming of the Priority
15813 attribute.
15814 (Find_Type): In Ada 2005, a task type can be used within its own body,
15815 when it appears in an access definition.
15816 (Analyze_Object_Renaming): Remove warning on null_exclusion.
15817 (Analyze_Object_Renaming): Introduce checks for required null exclusion
15818 in a formal object declaration or in a subtype declaration.
15819 (Analyze_Subprogram_Renaming): Add call to Check_Null_Exclusion.
15820 (Check_Null_Exclusion): New local routine to
15821 Analyze_Subprogram_Renaming. Check whether the formals and return
15822 profile of a renamed subprogram have required null exclusions when
15823 their counterparts of the renaming already impose them.
15824 (In_Generic_Scope): New local routine to Analyze_Object_Renaming.
15825 Determine whether an entity is inside a generic scope.
15826 (In_Open_Scope): First pass of documentation update.
15827 (Find_Expanded_Name): Add support for shadow entities associated with
15828 limited withed packages. This is required to handle nested packages.
15829 (Analyze_Package_Renaming): Remove the restriction imposed by AI-217
15830 that makes a renaming of a limited withed package illegal.
15831
158322006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
15833 Ed Schonberg <schonberg@adacore.com>
15834
15835 * sem_ch9.adb (Analyze_Protected_Definition): Remove call to
15836 Check_Overriding_Indicator.
15837 (Analyze_Task_Definition): Ditto.
15838 (Analyze_Protected_Type, Analyze_Task_Type): Code cleanup.
15839 (Check_Overriding_Indicator): To find overridden interface operation,
15840 examine only homonyms that have an explicit subprogram declaration, not
15841 inherited operations created by an unrelated type derivation.
15842 (Check_Overriding_Indicator): When checking for the presence of "null"
15843 in a procedure, ensure that the queried node is a procedure
15844 specification.
15845 (Matches_Prefixed_View_Profile): Add mechanism to retrieve the parameter
15846 type when the formal is an access to variable.
15847 (Analyze_Protected_Type): Add check for Preelaborable_Initialization
15848 (Analyze_Task_Type): Same addition
15849 (Analyze_Entry_Declaration): Call Generate_Reference_To_Formals, to
15850 provide navigation capabilities for entries.
15851
158522006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
15853 Ed Schonberg <schonberg@adacore.com>
15854 Javier Miranda <miranda@adacore.com>
15855 Gary Dismukes <dismukes@adacore.com>
15856
15857 * sem_disp.adb (Check_Dispatching_Operation): Do not flag subprograms
15858 inherited from an interface ancestor by another interface in the
15859 context of an instance as 'late'.
15860 (Is_Tag_Indeterminate, Propagate_Tag): Handle properly the dereference
15861 of a call to a function that dispatches on access result.
15862 (Check_Dispatching_Operation): In case of late overriding of a primitive
15863 that covers abstract interface subprograms we register it in all the
15864 secondary dispatch tables associated with abstract interfaces.
15865 (Check_Dispatching_Call): Add check that a dispatching call is not made
15866 to a function with a controlling result of a limited type. This is a
15867 current implementation restriction.
15868 (Check_Controlling_Formal): Remove bogus checks for E.2.2(14).
15869 (Check_Dispatching_Operation): Do no emit a warning if the controlling
15870 argument is an interface type that is a generic formal.
15871 (Is_Interface_Subprogram): Removed.
15872 (Check_Dispatching_Operation): If the subprogram is not a dispatching
15873 operation, check the formals to handle the case in which it is
15874 associated with an abstract interface type.
15875
158762006-10-31 Robert Dewar <dewar@adacore.com>
15877 Ed Schonberg <schonberg@adacore.com>
15878
15879 * sem_elab.ads, sem_elab.adb (Check_Elab_Assign): New procedure
15880 Add new calls to this procedure during traversal
15881 (Activate_Elaborate_All_Desirable): Do not set elaboration flag on
15882 another unit if expansion is disabled.
15883
158842006-10-31 Robert Dewar <dewar@adacore.com>
15885
15886 * sem_eval.adb (Compile_Time_Compare): Make use of information from
15887 Current_Value in the conditional case, to evaluate additional
15888 comparisons at compile time.
15889
158902006-10-31 Ed Schonberg <schonberg@adacore.com>
15891 Hristian Kirtchev <kirtchev@adacore.com>
15892 Javier Miranda <miranda@adacore.com>
15893
15894 * sem_type.adb (Add_One_Interp): If node is an indirect call, preserve
15895 subprogram type to provide better diagnostics in case of ambiguity.
15896 (Covers): Handle coverage of formal and actual anonymous access types in
15897 the context of generic instantiation.
15898 (Covers/Interface_Present_In_Ancestors): Use the base type to manage
15899 abstract interface types; this is required to handle concurrent types
15900 with discriminants and abstract interface types.
15901 (Covers): Include type coverage of both regular incomplete subtypes and
15902 incomplete subtypes of incomplete type visibles through a limited with
15903 clause.
15904
159052006-10-31 Robert Dewar <dewar@adacore.com>
15906 Hristian Kirtchev <kirtchev@adacore.com>
15907 Ed Schonberg <schonberg@adacore.com>
6f7f72f9
EB
15908
15909 * sem_util.ads, sem_util.adb (Enter_Name): Exclude -gnatwh warning
70198b9f
AC
15910 messages for entities in packages which are not used.
15911 (Collect_Synchronized_Interfaces): New procedure.
15912 (Overrides_Synchronized_Primitive): New function.
15913 (Denotes_Discriminant): Extend predicate to apply to task types.
15914 Add missing continuation marks in error msgs
15915 (Unqualify): New function for removing zero or more levels of
15916 qualification from an expression. There are numerous places where this
15917 ought to be used, but we currently only deal properly with zero or one
15918 level.
15919 (In_Instance); The analysis of the actuals in the instantiation of a
15920 child unit is not within an instantiation, even though the parent
15921 instance is on the scope stack.
15922 (Safe_To_Capture_Value): Exclude the case of variables that are
15923 renamings.
15924 (Check_Obsolescent): Removed
15925 (Is_Aliased_View): A reference to an enclosing instance in an aggregate
15926 is an aliased view, even when rewritten as a reference to the target
15927 object in an assignment.
15928 (Get_Subprogram_Entity): New function
15929 (Known_To_Be_Assigned): New function
15930 (Type_Access_Level): Compute properly the access level of a return
15931 subtype that is an anonymous access type.
15932 (Explain_Limited_Type): Correct use of "\" for continuation messages.
15933 (Is_Transfer): The new extended_return_statement causes a transfer of
15934 control.
15935 (Has_Preelaborable_Initialization): New function
15936 (Has_Null_Exclusion): New function. Given a node N, determine whether it
15937 has a null exclusion depending on its Nkind.
15938 Change Is_Lvalue to May_Be_Lvalue
15939 (May_Be_Lvalue): Extensive additional code to deal with subprogram
15940 arguments (IN parameters are not Lvalues, IN OUT parameters are).
15941 (Safe_To_Capture_Value): Extend functionality so it can be used for
15942 the current value condition case.
15943 (Has_Compatible_Alignment): New function
15944 (Is_Dependent_Component_Of_Mutable_Object): Revise the tests for mutable
15945 objects to handle the Ada 2005 case, where aliasedness no longer implies
15946 that the object is constrained. In particular, for dereferenced names,
15947 the designated object must be assumed to be unconstrained.
15948 (Kill_Current_Values): Properly deal with the case where we encounter
15949 a loop in the scope chain.
15950 (Safe_To_Capture_Value): Do not let a loop stop us from capturing
15951 a value.
15952 (Compile_Time_Constraint_Error): Improve error message in error case
15953
15954 * exp_ch13.adb (Expand_N_Freeze_Entity): Remove the freezing node
15955 associated with entities of abstract interface primitives.
15956 Call Apply_Address_Clause_Check instead of Apply_Alignment_Check
15957
159582006-10-31 Robert Dewar <dewar@adacore.com>
15959
15960 * s-osinte-tru64.adb:
15961 Mark Asm statements Volatile to prevent warnings (seems a
15962 reasonable change anyway)
15963 Fixes new warnings
15964
15965 * s-mastop-irix.adb: Add Volatile to Asm statements
15966 Suppresses warning, and seems appropriate in any case
15967
15968 * s-osinte-vms.adb: Add Volatile to Asm statement
15969
15970 * s-vaflop-vms-alpha.adb: Add Volatile to Asm statements
15971
15972 * exp_code.ads, exp_code.adb (Asm_Input_Value): Note that Error can be
15973 returned.
15974 Add call to Check_Code_Statement
15975
159762006-10-31 Robert Dewar <dewar@adacore.com>
15977 Ed Schonberg <schonberg@adacore.com>
15978 Bob Duff <duff@adacore.com>
15979
15980 * sinfo.ads, sinfo.adb (Set_Synchronized_Present,
15981 Synchronized_Present): Add Formal_Derived_Type_Definition and
15982 Private_Extension_Declaration to the list of assertions.
15983 (Is_Entry_Barrier_Function): New flag
15984 (Has_Self_Reference): New flag on aggregates, to indicate that they
15985 contain a reference to the enclosing type, inserted through a default
15986 initialization.
15987 (Next_Rep_Item): Move from Node4 to Node5.
15988 (Entity): Add this field for N_Attribute_Definition_Clause.
15989 (Comes_From_Extended_Return_Statement): New flag on N_Return_Statement
15990 (N_Return_Object_Declaration): Remove this node kind. We now use
15991 N_Object_Declaration instead.
15992 (Actual_Designated_Subtype): Move to a different place to make room in
15993 N_Extended_Return_Statement.
15994 (Procedure_To_Call): Move to a different place to make room in
15995 N_Extended_Return_Statement.
15996 (Return_Type): Removed this field to make room in return statements
15997 (both kinds).
15998 (Return_Statement_Entity): New field in return statements, in part to
15999 replace Return_Type, and in part to support the fact that return
16000 statements are now pushed on the scope stack during semantic analysis.
16001 (Return_Object_Declarations): New field to support extended return
16002 statements.
16003 (N_Extended_Return_Statement): New node for extended_return_statement
16004 nonterminal.
16005 (N_Return_Object_Declaration): New node for part of
16006 extended_return_statement nonterminal. Needed because all the necessary
16007 fields won't fit in N_Extended_Return_Statement.
16008 Generic_associations now carry the Box_Present flag, to indicate a
16009 default for an actual in a partially parametrized formal package.
16010
6f7f72f9 16011 * snames.h, snames.ads, snames.adb: Add definition for Validity_Check
70198b9f
AC
16012 (Preset_Names): Add entries for Priority_Specific_Dispatching pragma
16013 and for the new predefined dispatching policies: EDF_Across_Priorities,
16014 Non_Preemptive_Within_Priorities, and Round_Robin_Within_Priorities.
16015 Introduce new name Stub_Type for implementation defined attribute.
16016 Add pragma Preelaborable_Initialization
16017 Add entry for Priority attribute.
16018 Add Pragma_Wide_Character_Encoding
16019 (Get_Convention_Name): Given a convention id, this function returns the
16020 corresponding name id from the names table.
16021
160222006-10-31 Ed Schonberg <schonberg@adacore.com>
16023 Robert Dewar <dewar@adacore.com>
16024 Bob Duff <duff@adacore.com>
16025
16026 * sprint.adb (Sprint_Node_Actual, case Parameter_Specification): Do not
16027 print null exclusion twice in the case of an access definition,
16028 Implement new -gnatL switch
16029 Remove N_Return_Object_Declaration. We now use
16030 N_Object_Declaration instead. Implement the case for
16031 N_Extended_Return_Statement. Alphabetize the cases.
16032 Add cases for new nodes N_Extended_Return_Statement and
16033 N_Return_Object_Declaration. The code is not yet written.
16034 Update the output for N_Formal_Object_Declaration
16035 and N_Object_Renaming_Declaration.
16036 (Write_Itype): Account for the case of a modular integer subtype whose
16037 base type is private.
16038
160392006-10-31 Arnaud Charlet <charlet@adacore.com>
16040
16041 * s-restri.ads, s-restri.adb: Mark this package as Preelaborate.
16042 Remove elaboration code, now done in the binder.
16043
16044 * s-rident.ads: Make this unit Preelaborate.
16045 (No_Restrictions): New constant used to clean up code and follow
16046 preelaborate constraints.
16047
16048 * s-stalib.adb:
16049 Add System.Restrictions dependence, referenced directly from the
16050 binder generated file.
16051
160522006-10-31 Gary Dismukes <dismukes@adacore.com>
16053
16054 * s-scaval.adb (Initialize): Add new Boolean flag AFloat that is set
16055 True when AAMP extended floating-point is in use (48-bit). Change type
16056 ByteLF to ByteLLF, add new array type ByteLF and condition the size of
16057 the two byte array types on AFloat. Change type of IV_Ilf overlay
16058 variable from Byte8 to ByteLF. Add appropriate initializations of
16059 floating-point overlays for AAMP cases.
16060
160612006-10-31 Javier Miranda <miranda@adacore.com>
16062
16063 * s-tpoben.ads, s-tpoben.adb, s-taprob.ads, s-taprob.adb
16064 (Get_Ceiling): New subprogram that returns
16065 the ceiling priority of the protected object.
16066 (Set_Ceiling): New subprogram that sets the new ceiling priority of
16067 the protected object.
16068
16069 * s-tarest.adb: (Create_Restricted_Task): Fix potential CE.
16070
16071 * s-taskin.ads, s-taskin.adb: (Storage_Size): New function.
16072
160732006-10-31 Jose Ruiz <ruiz@adacore.com>
16074
16075 * s-tpobop.adb (Requeue_Call): Introduce a dispatching point when
16076 requeuing to the same protected object to give higher priority tasks
16077 the opportunity to execute.
16078
160792006-10-31 Robert Dewar <dewar@adacore.com>
16080
16081 * widechar.adb (Is_Start_Of_Wide_Char): In case of brackets encoding,
16082 add more precise check for the character sequence that follows '[' to
16083 avoid possible confusion in case if '[' is the last character of a
16084 string literals.
16085 (Scan_Wide): Always allow brackets encoding
16086
160872006-10-31 Olivier Hainque <hainque@adacore.com>
16088
16089 * s-stchop.ads: make this unit preelaborate. This is desirable in
16090 general and made mandatory by the use of this unit by s-taprop which
16091 is itself preelaborate.
16092
16093 * s-stchop-vxworks.adb (Set_Stack_Info, Task_Descriptor type): Add
16094 Td_Events component.
16095
160962006-10-31 Vincent Celier <celier@adacore.com>
16097
16098 * a-dirval-vms.adb (Invalid_Character): Specify that digits are allowed
16099 in file names.
16100
161012006-10-31 Vincent Celier <celier@adacore.com>
16102
16103 * a-direct.ads, a-direct.adb (Search): New procedure in Ada 2005
16104
161052006-10-31 Vincent Celier <celier@adacore.com>
16106
16107 * makegpr.adb (Check_Compilation_Needed): Take into account path names
16108 with spaces.
16109 (Check_Compilation_Needed): When checking a C or C++ source, do not
16110 resolve symbolic links.
16111 (Display_Command): New Boolean parameter Ellipse, defaulted to False.
16112 When not in verbose mode and Ellipse is True, display "..." for the
16113 first argument with Display set to False.
16114 (Build_Global_Archive): Always set Display True for the first object
16115 file. Call Display_Command with Ellipse set to True.
16116
161172006-10-31 Matt Heaney <heaney@adacore.com>
16118
16119 * a-crbtgo.ads: Commented each subprogram
16120
16121 * a-crbtgo.adb: Added reference to book from which algorithms were
16122 adapted.
16123
6f7f72f9 16124 * a-crbtgk.ads, a-crbtgk.adb (Generic_Insert_Post): pass flag to
70198b9f
AC
16125 indicate which child.
16126 (Generic_Conditional_Insert): changed parameter name from "Success" to
16127 "Inserted".
16128 (Generic_Unconditional_Insert_With_Hint): improved algorithm
16129
16130 * a-coorse.adb (Replace_Element): changed parameter name in call to
16131 conditional insert operation.
16132
16133 * a-convec.adb, a-coinve.adb (Insert): removed obsolete comment
16134
16135 * a-cohama.adb (Iterate): manipulate busy-bit here, instead of in
16136 Generic_Iteration
16137
16138 * a-ciorse.adb (Replace_Element): changed parameter name in call to
16139 conditional insert operation.
16140
16141 * a-cihama.adb (Iterate): manipulate busy-bit here, instead of in
16142 Generic_Iteration.
16143
16144 * a-cidlli.ads, a-cidlli.adb (Splice): Position param is now mode in
16145 instead of mode inout.
16146
16147 * a-chtgop.adb (Adjust): modified comments to reflect current AI-302
16148 draft
16149 (Generic_Read): preserve existing buckets array if possible
16150 (Generic_Write): don't send buckets array length anymore
16151
16152 * a-cdlili.ads, a-cdlili.adb (Splice): Position param is now mode in
16153 instead of mode inout.
16154
16155 * a-cihase.adb (Difference): iterate over smaller of Tgt and Src sets
16156 (Iterate): manipulate busy-bit here, instead of in Generic_Iteration
16157
16158 * a-cohase.adb (Difference): iterate over smaller of Tgt and Src sets
16159 (Iterate): manipulate busy-bit here, instead of in Generic_Iteration
16160 (Replace_Element): local operation is now an instantiation
16161
16162 * a-chtgke.ads, a-chtgke.adb (Generic_Conditional_Insert): manually
16163 check current length.
16164 (Generic_Replace_Element): new operation
16165
161662006-10-31 Doug Rupp <rupp@adacore.com>
16167
16168 * g-trasym-vms-alpha.adb: Dummy_User_Act_Proc: New function.
16169 Call TBK$SYMBOLIZE without omitting parameters.
16170
161712006-10-31 Vincent Celier <celier@adacore.com>
16172
16173 * symbols-processing-vms-ia64.adb,
16174 symbols-processing-vms-alpha.adb (Process): Do not include symbols
16175 that come from generic instantiations in bodies.
16176
161772006-10-31 Pat Rogers <rogers@adacore.com>
16178
16179 * a-rttiev.ads, a-rttiev.adb:
16180 This is a significant redesign primarily for the sake of automatic
16181 timer task termination but also to fix a design flaw.
16182 Therefore we are now using an RTS lock, instead of a protected
16183 object, to provide mutual exclusion to the queue of pending events
16184 and the type Timing_Event is no longer a protected type.
16185
161862006-10-31 Robert Dewar <dewar@adacore.com>
16187 Cyrille Comar <comar@adacore.com>
16188 Ben Brosgol <brosgol@adacore.com>
16189
16190 * debug.adb: Update flags documentation
16191
6f7f72f9
EB
16192 * gnat_ugn.texi: Add documentation for new -gnatwq switch
16193 Clean up documentation for several other warning switches
16194 Clarify how task stack size can be specified with various
16195 versions of Windows.
16196 Add note that -gnatVo includes ranges including loops
70198b9f
AC
16197 Add documentation for -gnatL switch
16198 Add note on elaboration warning for initializing variables
16199 Add documentation for new -gnatwt warning switch
16200 Document new form of pragma Warnings (On|Off, string)
16201 Add comment on use of pragma Warnings to control warnings
16202 Add documentation for -gnatjnn switch
16203 Modify section on interfacing with C for VMS 64-bit.
16204 Add doc for -gnatVe/E
16205 Add documentation of new warning flags -gnatww/-gnatwW
16206 Add warnings about address clause overlays to list of warnings
16207 (Exception Handling Control): Document that the option --RTS must be
16208 used consistently for gcc and gnatbind.
16209 Clarify that inlining is not always possible
16210 Update documentation on pragma Unchecked_Union.
16211
16212 * gnat_rm.texi:
16213 Add documentation for new extended version of pragma Obsolescent
16214 Add documentation for implementation defined attribute 'Stub_Type.
16215 Add note on use of Volatile in asm statements
16216 Add documentation on use of pragma Unreferenced in context clause
16217 Document new form of pragma Warnings (On|Off, pattern)
16218 Document pragma Wide_Character_Encoding
16219 Add note that pragma Restrictions (No_Elaboration_Code) is only fully
16220 enforced if code generation is active.
16221 Add section on pragma Suppress to document GNAT specific check
16222 Alignment_Check
16223 Clarify difference between No_Dispatching_Calls & No_Dispatch.
16224 Add documentation for pragma Restrictions (No_Elaboration_Code)
16225
16226 * gnat-style.texi:
16227 Add comments on layout of subprogram local variables in the
16228 presence of nested subprograms.
16229
6f7f72f9 16230 * ug_words: Resync.
70198b9f
AC
16231
16232 * elists.ads: Minor reformatting
16233 Node returns Node_Or_Entity_Id (doc change only)
16234
16235 * xgnatugn.adb: Replace ACADEMICEDITION with GPLEDITION
16236
16237 * g-arrspl.ads (Create): Update comments.
16238
16239 * sem.ads: Add details on the handling of the scope stack.
16240
6f7f72f9 16241 * usage.adb: Update documentation.
70198b9f
AC
16242
16243 * validsw.ads, validsw.adb:
16244 Add definition of Validity_Check_Components and implement -gnatVe/E
16245
6f7f72f9 16246 * vms_data.ads: Add missing VMS qualifiers.
70198b9f
AC
16247
16248 * s-addope.ads: Add documentation on overflow and divide by zero
16249
162502006-10-31 Robert Dewar <dewar@adacore.com>
16251 Thomas Quinot <quinot@adacore.com>
16252 Arnaud Charlet <charlet@adacore.com>
16253
16254 * fmap.adb: Put routines in alpha order
16255
16256 * g-boumai.ads: Remove redundant 'in' keywords
16257
16258 * g-cgi.adb: Minor reformatting
16259
16260 * g-cgi.ads: Remove redundant 'in' keywords
16261
16262 * get_targ.adb: Put routines in alpha order
16263
16264 * prj-attr.ads: Minor reformatting
16265
16266 * s-atacco.ads: Minor reformatting
16267
16268 * scn.adb: Put routines in alpha order
16269
16270 * sinput-l.adb: Minor comment fix
16271
16272 * sinput-p.adb: Minor comment fix
16273
16274 * s-maccod.ads: Minor reformatting
16275
16276 * s-memory.adb: Minor reformatting
16277
16278 * s-htable.adb: Fix typo in comment.
16279
16280 * s-secsta.adb: Minor comment update.
16281
16282 * s-soflin.adb: Minor reformatting
16283
16284 * s-stoele.ads:
16285 Add comment about odd qualification in Storage_Offset declaration
16286
16287 * s-strxdr.adb:
16288 Remove unnecessary 'in' keywords for formal parameters.
16289
16290 * treeprs.adt: Minor reformatting
16291
16292 * urealp.adb: Put routines in alpha order
16293
16294 * s-wchcon.ads, s-wchcon.adb (Get_WC_Encoding_Method): New version
16295 taking string.
16296
16297 * s-asthan-vms-alpha.adb: Remove redundant 'in' keywords
16298
16299 * g-trasym-vms-ia64.adb: Remove redundant 'in' keywords
16300
16301 * env.c (__gnat_unsetenv): Unsetenv is unavailable on LynxOS, so
16302 workaround as on other platforms.
16303
16304 * g-eacodu-vms.adb: Remove redundant 'in' keywords
16305 * g-expect-vms.adb: Remove redundant 'in' keywords
16306
16307 * gnatdll.adb (Add_Files_From_List): Handle Name_Error and report a
16308 clear error message if the list-of-files file cannot be opened.
16309
16310 * g-thread.adb (Unregister_Thread_Id): Add use type Thread_Id so the
16311 equality operator is always visible.
16312
16313 * lang.opt: Woverlength-strings: New option.
16314
16315 * nmake.adt:
16316 Update copyright, since nmake.ads and nmake.adb have changed.
16317
16318 * osint-b.ads, osint-b.adb (Time_From_Last_Bind): removed function .
16319 (Binder_Output_Time_Stamps_Set): removed.
16320 (Old_Binder_Output_Time_Stamp): idem.
16321 (New_Binder_Output_Time_Stamp): idem.
16322 (Recording_Time_From_Last_Bind): idem.
16323 (Recording_Time_From_Last_Bind): Make constant.
16324
16325 * output.ads, output.adb (Write_Str): Allow LF characters
16326 (Write_Spaces): New procedure
16327
16328 * prepcomp.adb (Preproc_Data_Table): Change Increment from 5% to 100%
16329
16330 * inline.adb: Minor reformatting
16331
16332 * s-asthan-vms-alpha.adb: Remove redundant 'in' keywords
16333
16334 * s-mastop-vms.adb: Remove redundant 'in' keywords
16335
16336 * s-osprim-vms.adb: Remove redundant 'in' keywords
16337
16338 * s-trafor-default.adb: Remove redundant 'in' keywords
16339
16340 * 9drpc.adb: Remove redundant 'in' keywords
16341
16342 * s-osinte-mingw.ads: Minor reformatting
16343
16344 * s-inmaop-posix.adb: Minor reformatting
16345
16346 * a-direio.ads: Remove quotes from Compile_Time_Warning message
16347
16348 * a-exexda.adb: Minor code reorganization
16349
16350 * a-filico.adb: Minor reformatting
16351
16352 * a-finali.adb: Minor reformatting
16353
16354 * a-nudira.ads: Remove quote from Compile_Time_Warning message
16355
16356 * a-numeri.ads: Minor reformatting
16357
16358 * a-sequio.ads: Remove quotes from Compile_Time_Warning message
16359
16360 * exp_pakd.ads: Fix obsolete comment
16361
16362 * a-ztenau.adb, a-ztenio.adb, a-wtenau.adb, a-tienau.adb,
16363 a-wtenio.adb (Put): Avoid assuming low bound of string is 1.
16364 Probably not a bug, but certainly neater and more efficient.
16365
16366 * a-tienio.adb: Minor reformatting
16367
16368 * comperr.adb (Compiler_Abort): Call Cancel_Special_Output at start
16369 Avoid assuming low bound of string is 1.
16370
16371 * gnatbind.adb: Change Bindusg to package and rename procedure as
16372 Display, which now ensures that it only outputs usage information once.
16373 (Scan_Bind_Arg): Avoid assuming low bound of string is 1.
16374
16375 * g-pehage.adb (Build_Identical_Keysets): Replace use of 1 by
16376 Table'First.
16377
16378 * g-regpat.adb (Insert_Operator): Add pragma Warnings (Off) to kill
16379 warning.
16380 (Match): Add pragma Assert to ensure that Matches'First is zero
16381
16382 * g-regpat.ads (Match): Document that Matches lower bound must be zero
16383
16384 * makeutl.adb (Is_External_Assignment): Add pragma Assert's to check
16385 documented preconditions (also kills warnings about bad indexes).
16386
16387 * mdll.adb (Build_Dynamic_Library): Avoid assumption that Afiles'First
16388 is 1.
16389 (Build_Import_Library): Ditto;
16390
16391 * mdll-utl.adb: (Gnatbind): Avoid assumption that Alis'First = 1
16392
16393 * rtsfind.adb (RTE_Error_Msg): Avoid assuming low bound of string is 1.
16394
16395 * sem_case.adb (Analyze_Choices): Add pragma Assert to check that
16396 lower bound of choice table is 1.
16397
16398 * sem_case.ads (Analyze_Choices): Document that lower bound of
16399 Choice_Table is 1.
16400
16401 * s-imgdec.adb (Set_Decimal_Digits): Avoid assuming low bound of
16402 string is 1.
16403
16404 * uintp.adb (Init_Operand): Document that low bound of Vec is always 1,
16405 and add appropriate Assert pragma to suppress warnings.
16406
16407 * atree.h, atree.ads, atree.adb
16408 Change Elist24 to Elist25
16409 Add definitions of Field28 and Node28
16410 (Traverse_Field): Use new syntactic parent table in sinfo.
16411
16412 * cstand.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only
16413
16414 * itypes.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only
16415
16416 * exp_tss.adb: Put routines in alpha order
16417
16418 * fe.h: Remove redundant declarations.
16419
c79efc4d 164202006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
ed41063a 16421
c79efc4d
RÁE
16422 * utils.c (builtin_function): Rename to gnat_builtin_function.
16423 Move common code to add_builtin_function.
16424 * misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
16425 gnat_builtin_function.
16426 * gigi.h (builtin_function): Rename to gnat_builtin_function.
16427 Change the signature.
16428
a8384928
BM
164292006-10-16 Brooks Moses <bmoses@stanford.edu>
16430
16431 * Makefile.in: Add TEXI2PDF definition.
16432 * Make-lang.in: Add "ada.pdf" target.
16433
2285b053
KH
164342006-10-03 Kazu Hirata <kazu@codesourcery.com>
16435
16436 * decl.c, utils.c: Fix comment typos.
c0a69967
KH
16437 * utils.c: Fix a typo.
16438
b55e7f34
EB
164392006-09-28 Eric Botcazou <ebotcazou@adacore.com>
16440
16441 * decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set "const" flag
16442 on "pure" Ada subprograms if SJLJ exceptions are used.
16443 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Set TREE_NO_WARNING
16444 on the declaration node of JMPBUF_SAVE.
16445 * utils.c (init_gigi_decls): Set DECL_IS_PURE on the declaration nodes
16446 of Get_Jmpbuf_Address_Soft and Get_GNAT_Exception.
16447 * utils2.c (build_call_0_expr): Do not set TREE_SIDE_EFFECTS.
16448
9e94c78f 164492006-08-20 Laurent Guerby <laurent@guerby.net>
d2b40c09 16450
7a197678
EB
16451 PR ada/28716
16452 g-socket.adb (Bind_Socket): Call Set_Address.
16453
41d9adc7
EB
164542006-09-15 Eric Botcazou <ebotcazou@adacore.com>
16455
16456 PR ada/15802
16457 * decl.c (same_discriminant_p): New static function.
16458 (gnat_to_gnu_entity) <E_Record_Type>: When there is a parent
16459 subtype and we have discriminants, fix up the COMPONENT_REFs
16460 for the discriminants to make them reference the corresponding
16461 fields of the parent subtype after it has been built.
16462
21cc3719
RS
164632006-09-15 Roger Sayle <roger@eyesopen.com>
16464
16465 PR ada/18817
16466 * utils.c (max_size): Perform constant folding of (A ? B : C) - D
16467 into A ? B - D : C - D when calculating the size of a MINUS_EXPR.
16468
6f2789da
OH
164692006-09-13 Olivier Hainque <hainque@adacore.com>
16470
16471 PR ada/29025
16472 * trans.c (gnat_gimplify_expr) <ADDR_EXPR>: When taking the address
16473 of a SAVE_EXPR, just make the operand addressable/not-readonly and
16474 let the common gimplifier code make and propagate a temporary copy.
16475 (call_to_gnu): Clarify the use of SAVE_EXPR for not addressable
16476 out/in-out actuals and defer setting the addressable/readonly bits
16477 to the gimplifier.
16478
efaa616e
EB
164792006-09-13 Eric Botcazou <ebotcazou@adacore.com>
16480
16481 PR ada/28591
16482 * decl.c (components_to_record): Defer emitting debug info for the
16483 record type associated with the variant until after we are sure to
16484 actually use it.
16485
2655f1c6
EB
164862006-09-13 Eric Botcazou <ebotcazou@adacore.com>
16487
16488 PR ada/21952
16489 * gigi.h (gnat_internal_attribute_table): Declare.
16490 * misc.c (LANG_HOOKS_ATTRIBUTE_TABLE): Define to above.
16491 * utils.c (gnat_internal_attribute_table): New global variable.
16492 (builtin_function): Always call decl_attributes on the builtin.
16493 (handle_const_attribute): New static function.
16494 (handle_nothrow_attribute): Likewise.
16495
48779194
VR
164962006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
16497
16498 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
16499
8df7d439
EB
165002006-06-23 Olivier Hainque <hainque@adacore.com>
16501
16502 * misc.c (gnat_type_max_size): Look at TYPE_ADA_SIZE if we have
16503 not been able to get a constant upper bound from TYPE_SIZE_UNIT.
16504
83fdc7c4 165052006-06-20 James A. Morrison <phython@gcc.gnu.org>
6f7f72f9 16506 Eric Botcazou <ebotcazou@adacore.com>
83fdc7c4
JM
16507
16508 PR ada/18692
16509 * Make-lang.in: Add check-gnat to lang_checks. Rename existing
16510 check-gnat into check-acats.
16511
5f516f59
KB
165122006-06-17 Karl Berry <karl@gnu.org>
16513
6f7f72f9 16514 * gnat-style.texi (@dircategory): Use "Software development"
5f516f59
KB
16515 instead of "Programming", following the Free Software Directory.
16516
ce0d1b88
JDA
165172006-06-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
16518
16519 PR ada/27944
16520 * s-taprop-hpux-dce.adb: Delete redundant 'with System.Parameters'.
16521
9e94c78f 165222006-06-06 Laurent Guerby <laurent@guerby.net>
8c60f779 16523
6f7f72f9
EB
16524 PR ada/27769
16525 mlib-utl.adb: Use Program_Name.
16526
ce2e12c2
KH
165272006-05-28 Kazu Hirata <kazu@codesourcery.com>
16528
16529 * decl.c, env.c, gigi.h, init.c, initialize.c, raise-gcc.c,
16530 sem_ch13.adb, sysdep.c, targtyps.c, tb-alvxw.c, tracebak.c,
16531 trans.c, utils.c: Fix comment typos. Follow spelling
16532 conventions.
16533 * gnat_rm.texi, gnat_ugn.texi, : Fix typos. Follow spelling
16534 conventions.
16535
ba4ac682
EB
165362006-05-19 Nicolas Setton <setton@adacore.com>
16537
16538 * misc.c (gnat_dwarf_name): New function.
16539 (LANG_HOOKS_DWARF_NAME): Define to it.
16540
05b44921
L
165412006-05-14 H.J. Lu <hongjiu.lu@intel.com>
16542
16543 * Make-lang.in (ada/decl.o): Replace target.h with $(TARGET_H).
16544 (ada/misc.o): Likewise.
16545 (ada/utils.o): Likewise.
16546
a3bd7058
AJ
165472006-04-08 Aurelien Jarno <aurel32@debian.org>
16548
16549 * Makefile.in: Add Ada support for GNU/kFreeBSD.
16550 * s-osinte-kfreebsd-gnu.ads: New file.
16551
ad3a7ce3
CD
165522006-03-29 Carlos O'Donell <carlos@codesourcery.com>
16553
16554 * Make-lang.in: Rename docdir to gcc_docdir.
16555
936a6fa7
EB
165562006-03-04 Eric Botcazou <ebotcazou@adacore.com>
16557
16558 * gigi.h (get_ada_base_type): Delete.
16559 * utils2.c (get_ada_base_type): Likewise.
16560 * trans.c (convert_with_check): Operate in the real base type.
16561
93f978b7
RK
165622006-03-03 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
16563
16564 * uintp.adb (Num_Bits): Handle Uint_Int_First specially.
16565
434aeebb
RS
165662006-03-02 Richard Sandiford <richard@codesourcery.com>
16567
16568 * utils.c (create_var_decl): Use have_global_bss_p when deciding
16569 whether to make the decl common.
16570
9e94c78f 16571