]> gcc.gnu.org Git - gcc.git/blame - gcc/ada/ChangeLog
re PR tree-optimization/26264 (Extraneous warning with __builtin_stdarg_start and...
[gcc.git] / gcc / ada / ChangeLog
CommitLineData
443b3472
RW
12008-02-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2
8dd07840
RW
3 * gnat_rm.texi, gnat_ugn.texi: Fix spacing after `e.g.' and
4 `i.e.' by adding comma or `@:' as appropriate.
5 * gnat_rm.texi (Pragma Wide_Character_Encoding): Instead of
6 plain characters `C', use `@samp{C}'.
7 * gnat_ugn.texi (File Naming Rules, About gnatkr)
8 (Krunching Method): Likewise.
9
443b3472
RW
10 * gnat_ugn.texi (Conventions): List environment variables and
11 metasyntactic variables.
12 (Compiling Programs): Fix notation of metasyntactic variables.
13 Add @file where appropriate. Use @file for file extensions,
14 @samp for strings.
15 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, use @samp
16 instead of @file, @env instead of @code.
17
9538dfb9
RW
182008-02-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
19
d488f6ea
RW
20 PR documentation/15479
21 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, replace `..'
22 and `...' with `@dots{}' or `@enddots{}'.
23
1992bbd9
RW
24 PR documentation/15479
25 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, add @command,
26 use @command instead of @code, @option instead of @samp or @code,
27 @code instead of @var, @samp instead of @file.
28
9538dfb9
RW
29 PR documentation/15479
30 * gnat_ugn.texi (Using gnatmake in a Makefile): Do not ignore errors
31 in Makefile rules, by using `&&' rather than `;'.
32
e69044cb
RW
332008-02-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
34
35 PR documentation/15479
36 * gnat_ugn.texi: In non-code, avoid space before colon.
37 (Regular Expressions in gnatfind and gnatxref): Fix indentation.
38 (Examples of gnatxref Usage): Use @command{vi} instead of
39 @file{vi}.
40 (Character Set Control): Do not use @code for UTF-8.
41 (Validity Checking): Fix typo "NaNs" instead of "NaN's". Do not
42 use @code for IEEE.
43 * gnat_rm.texi (Aggregates with static bounds): Fix typo in code
44 sample.
45 * gnat_rm.texi, gnat_ugn.texi: Fix typos. Bump copyright years.
46
6a333ca0
JS
472008-02-11 Joel Sherrill <joel.sherrill@oarcorp.com>
48
49 PR ada/35143
50 * env.c: Add __rtems__ to if defined.
51 * s-osinte-rtems.adb: Add To_Target_Priority. Fix formatting.
52 * s-osinte-rtems.ads: Add To_Target_Priority prototype and
53 PTHREAD_SCOPE_PROCESS/PTHREAD_SCOPE_SYSTEM constants. Add
54 pragma Convention as required.
55 * gsocket.h: Make compile in and out of RTS.
56 * Makefile.in: Add system-rtems.ads. Build DEC extensions.
57 Use g-soccon-rtems.ads.
58 * g-soccon-rtems.ads, system-rtems.ads: New files.
59
72fb133f
KG
602008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
61
62 PR other/35107
63 * Make-lang.in (gnat1): Add $(GMPLIBS).
64
8fa07a56
EB
652008-01-26 Eric Botcazou <ebotcazou@adacore.com>
66
67 * decl.c (components_to_record): Improve comment.
68
0bf38239
EB
692008-01-22 Eric Botcazou <ebotcazou@adacore.com>
70
71 * decl.c (components_to_record): Do not reuse the empty union type
72 if there is a representation clause on the record.
73 * trans.c (addressable_p): Return true for INTEGER_CST.
74
461d6eb3
EB
752008-01-21 Eric Botcazou <ebotcazou@adacore.com>
76
77 * trans.c (gnat_to_gnu) <N_Free_Statement>: Use POINTER_PLUS_EXPR
78 in pointer arithmetics.
79 * utils2.c (build_allocator): Likewise.
80
9328dd57
EB
812008-01-17 Eric Botcazou <ebotcazou@adacore.com>
82
83 * utils.c (build_function_stub): Properly build the call expression.
84
052cec9b
EB
852008-01-14 Eric Botcazou <ebotcazou@adacore.com>
86
87 * decl.c (gnat_to_gnu_entity) <object>: Process renamings
88 before converting the expression to the type of the object.
89 * trans.c (maybe_stabilize_reference) <CONSTRUCTOR>: New case.
90 Stabilize constructors for special wrapping types.
91
08ffbdad
EB
922008-01-13 Eric Botcazou <ebotcazou@adacore.com>
93
94 * trans.c (call_to_gnu):Invoke the addressable_p predicate only
6bf4cbe8 95 when necessary. Merge some conditional statements. Update comments.
08ffbdad
EB
96 Rename unchecked_convert_p local variable to suppress_type_conversion.
97 Do not suppress conversions in the In case.
98 (addressable_p) <VIEW_CONVERT_EXPR>: Do not take alignment issues
99 into account on non strict-alignment platforms.
100
7219c2c7
EB
1012008-01-12 Eric Botcazou <ebotcazou@adacore.com>
102
103 * utils.c (aggregate_type_contains_array_p): New predicate.
104 (create_field_decl): In a packed record, force byte alignment
105 for fields without specified position that contain an array.
106
52ef2874
EB
1072008-01-12 Eric Botcazou <ebotcazou@adacore.com>
108
109 * utils.c (unchecked_convert): Fold the VIEW_CONVERT_EXPR expression.
110
3fa87ef8
JDA
1112008-01-10 John David Anglin <dave.anglin.@nrc-cnrc.gc.ca>
112
113 PR ada/34466
114 * s-osinte-linux-hppa.ads (SC_NPROCESSORS_ONLN): New constant for
115 sysconf call.
116 (bit_field): New packed boolean type used by cpu_set_t.
117 (cpu_set_t): New type corresponding to the C type with
118 the same name. Note that on the Ada side we use a bit
119 field array for the affinity mask. There is not need
120 for the C macro for setting individual bit.
121 (pthread_setaffinity_np): New imported routine.
122
e0658eda
TK
1232008-01-03 Tero Koskinen <tero.koskinen@iki.fi>
124
125 PR ada/34647
126 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
127 on OpenBSD as is done on other BSD systems.
128
129 PR ada/34645
130 * sysdep.c (__gnat_ttyname, getc_immediate_nowait,
131 getc_immediate_common): Treat OpenBSD as FreeBSD regarding immediate
132 I/O.
133
134 PR ada/34644
135 * env.c (__gnat_clearenv): Treat OpenBSD as other BSD systems missing
136 clearenv().
137
138 PR ada/34646
139 * init.c (__gnat_error_handler, __gnat_install_handler,
140 __gnat_init_float): Define for OpenBSD.
141
142 * initialize.c (__gnat_initialize): Define for OpenBSD.
143
18bc9cca
ST
1442007-12-27 Samuel Tardieu <sam@rfc1149.net>
145
146 PR ada/34553
147 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
148 instead of mktemp() or tmpnam() on NetBSD.
149
f0bf503e
EB
1502007-12-23 Eric Botcazou <ebotcazou@adacore.com>
151
152 * trans.c (call_to_gnu): Make the temporary for non-addressable
153 In parameters passed by reference.
154 (addressable_p): Return true for STRING_CST and CALL_EXPR.
155
7469b7bc
AC
1562007-12-19 Robert Dewar <dewar@adacore.com>
157
158 * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
159 Add pragma Warnings (Off) for unassigned IN OUT arguments
160
161 * sem_warn.adb (Output_Reference): Suppress messages for internal names
162 (Check_References): Extensive changes to tune up warnings
163 (Output_Non_Modifed_In_Out_Warnings): Changes to tune up warnings
164 (Has_Pragma_Unmodifed_Check_Spec): New function
165 (Check_References): Implement pragma Unmodified
166 (Warn_On_Unassigned_Out_Parameter): Implement pragma Unmodified
167
168 * par-prag.adb: Dummy entry for pragma Unmodified
169
170 * sem_prag.adb: Implement pragma Unmodified
171
172 * einfo.ads, einfo.adb: (Has_Pragma_Unmodified): New flag
173 (Proc_Next_Component_Or_Discriminant): Fix typo.
174 Update comments.
175
176 * sem_util.adb (Note_Possible_Modification): Add processinng for pragma
177 Unmodified.
178 (Reset_Analyzed_Flags): Use Traverse_Proc instead of Traverse_Func,
179 because the former already takes care of discarding the result.
180 (Mark_Coextensions): Remove ununused initial value from Is_Dynamic.
181 Add comment.
182
183 * snames.h, snames.ads, snames.adb: Add entry for pragma Unmodified
184
1852007-12-19 Eric Botcazou <ebotcazou@adacore.com>
186
187 * targparm.adb, targparm.ads, system.ads, system-darwin-ppc.ads,
188 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
189 system-hpux-ia64.ads, system-vxworks-arm.ads, system-darwin-x86.ads,
190 system-vms_64.ads, system-vms-ia64.ads, system-linux-ia64.ads,
191 system-freebsd-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
192 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
193 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
194 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
195 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
196 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads
197 (Dynamic_Trampolines_Used): Delete.
198
199 * system-lynxos-x86.ads, system-lynxos-ppc.ads: Ditto.
200 Turn on stack probing mechanism on LynxOS.
201
2022007-12-19 Bob Duff <duff@adacore.com>
203
204 * atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate
205 the resulting tail recursion by hand. This prevents running out of
206 memory on deeply nested concatenations, since Field2 is where the left
207 operand of concatenations is stored.
208 Fix bug (was returning OK_Orig in some cases). Fix return subtype to
209 clarify that it can only return OK or Abandon.
210
211 * sem_res.adb (Resolve_Op_Concat): Replace the recursion on the left
212 operand by iteration, in order to avoid running out of memory on
213 deeply-nested concatenations. Use the Parent pointer to get back up the
214 tree.
215 (Resolve_Op_Concat_Arg, Resolve_Op_Concat_First,
216 Resolve_Op_Concat_Rest): New procedures split out of
217 Resolve_Op_Concat, so the iterative algorithm in Resolve_Op_Concat is
218 clearer.
219
220 * checks.adb (Remove_Checks): Use Traverse_Proc instead of
221 Traverse_Func, because the former already takes care of discarding the
222 result.
223
224 * errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
225 because the former already takes care of discarding the result.
226 (Remove_Warning_Messages): Use appropriate subtype for Status and
227 Discard
228
2292007-12-19 Ed Schonberg <schonberg@adacore.com>
230
231 * exp_aggr.adb (Not_OK_For_Backend): A component of a private type with
232 discriminants forces expansion of the aggregate into assignments.
233 (Init_Record_Controller): If the type of the aggregate is untagged and
234 is not inherently limited, the record controller is not limited either.
235
2362007-12-19 Robert Dewar <dewar@adacore.com>
237
238 * exp_attr.adb (Expand_N_Attribute_Reference, case Size): Fix error in
239 handling compile time known size of record or array (case of front end
240 layout active, e.g. in GNAAMP).
241
2422007-12-19 Javier Miranda <miranda@adacore.com>
243
244 * exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry
245 that forces the construction of static dispatch tables in case of
246 record subtypes.
247
2482007-12-19 Robert Dewar <dewar@adacore.com>
249
250 * exp_ch9.adb (Null_Statements): Moved to library level
251 (Trivial_Accept_OK): New function
252 (Expand_Accept_Declaration): Use Trivial_Accept_OK
253 (Expand_N_Accept_Statement): Use Trivial_Accept_OK
254
2552007-12-19 Robert Dewar <dewar@adacore.com>
256
257 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix packed array type
258 in complex case where array is Volatile.
259
2602007-12-19 Ed Schonberg <schonberg@adacore.com>
261
262 * freeze.adb (Freeze_Record_Type, Check_Current_Instance): Implement
263 properly the Ada2005 rules concerning when the current instance of a
264 record type is aliased.
265
2662007-12-19 Ed Schonberg <schonberg@adacore.com>
267
268 * par-ch3.adb (P_Record_Declaration): Guard against cascaded errors in
269 mangled declaration
270 (P_Type_Declaration): Diagnose misuse of "abstract" in untagged record
271 declarations.
272 (P_Variant_Part): Cleaner patch for parenthesized discriminant
273
2742007-12-19 Vincent Celier <celier@adacore.com>
275
276 * prj-attr.adb (Package_Node_Id_Of): Returns Unknown_Package when
277 package is not known
278
279 * prj-attr.ads (Unknown_Package): New constant
280 Do not crash when an unknown package is in several projects
281
282 * prj-dect.adb (Parse_Package_Declaration): Mark an unknown package as
283 ignored
284
285 * prj-nmsc.adb (Check): Remove obsolete code related to no longer
286 existing package Language_Processing.
287
2882007-12-19 Ed Schonberg <schonberg@adacore.com>
289 Gary Dismukes <dismukes@adacore.com>
44914a04 290 Samuel Tardieu <sam@rfc1149.net>
7469b7bc
AC
291
292 PR ada/15803, ada/15805
293 * sem_ch6.adb, sem_ch3.adb (Constrain_Access): In Ada2005, diagnose
294 illegal access subtypes when there is a constrained partial view.
295 (Check_For_Premature_Usage): New procedure inside
296 Access_Subprogram_Declaration for checking that an access-to-subprogram
297 type doesn't reference its own name within any formal parameters or
298 result type (including within nested anonymous access types).
299 (Access_Subprogram_Declaration): Add call to Check_For_Premature_Usage.
300 (Sem_Ch3.Analyze_Object_Declaration, Sem_ch6.Process_Formals): if the
301 context is an access_to_variable, the expression cannot be an
302 access_to_constant.
303
3042007-12-19 Bob Duff <duff@adacore.com>
305
306 * sem_ch4.adb (Analyze_Concatenation_Rest): New procedure.
307 (Analyze_Concatenation): Use iteration instead of recursion in order
308 to avoid running out of stack space for deeply nested concatenations.
309
3102007-12-19 Ed Schonberg <schonberg@adacore.com>
311 Gary Dismukes <dismukes@adacore.com>
312
313 * sem_ch8.adb (Analyze_Subprogram_Renaming): Diagnose illegal renamings
314 whose renamed entity is a subprogram that requires overriding.
315 (Premature_Usage): Test for the case of N_Full_Type_Declaration when
316 issuing an error for premature usage and issue a message that says
317 'type' rather than 'object'.
318
3192007-12-19 Gary Dismukes <dismukes@adacore.com>
320
321 PR ada/34149
322 * sem_disp.adb (Check_Dispatching_Call): Augment existing test for
323 presence of a statically tagged operand (Present (Static_Tag)) with
324 test for Indeterm_Ancestor_Call when determining whether to propagate
325 the static tag to tag-indeterminate operands (which forces dispatching
326 on such calls).
327 (Check_Controlling_Formals): Ada2005, access parameters can have
328 defaults.
329 (Add_Dispatching_Operation, Check_Operation_From_Private_View): do
330 not insert subprogram in list of primitive operations if already there.
331
3322007-12-19 Tristan Gingold <gingold@adacore.com>
333
334 * utils.c (create_var_decl_1): call rest_of_decl_compilation only for
335 global variable.
336
3372007-12-19 Thomas Quinot <quinot@adacore.com>
338
339 Part of PR ada/33688
340 * gen-soccon.c: Add constant IP_PKTINFO to allow getting ancillary
341 datagram info on Linux.
342
3432007-12-19 Vincent Celier <celier@adacore.com>
344
345 * makegpr.adb (Check_Compilation_Needed): Normalize C_Source_Path so
346 that the source path name is always found in the dependencies.
347
3482007-12-19 Robert Dewar <dewar@adacore.com>
349
350 * gnat_rm.texi, gnat_ugn.texi: Update documentation of -gnatw.o
351 Fix name of Wide_Wide_Latin_1/9 file names
352 Add documentation for Ada.Exceptions.Last_Chance_Handler (a-elchha.ads)
353 Add missing documentation for Ada.Wide_[Wide_]Characters.Unicode
354 Add missing documentation for Ada.Command_Line.Response_File
355 Update list of warning letters for Warnings pragma
356 Add documentation for pragma Unmodified
357
43779dea
ST
3582007-12-19 Samuel Tardieu <sam@rfc1149.net>
359
360 * Makefile.in: Add s-tasinf.ad[bs] substitutions for sh4-linux target.
361
5287c2bc
AC
3622007-12-17 Arnaud Charlet <charlet@adacore.com>
363
364 * s-vxwork-alpha.ads: Removed, no longer used.
365
6343804d
JJ
3662007-12-15 Jakub Jelinek <jakub@redhat.com>
367
368 * Make-lang.in (gnat1, gnatbind): Pass ALL_CFLAGS on the link line.
369
3958c9c8
ST
3702007-12-13 Samuel Tardieu <sam@rfc1149.net>
371
372 PR ada/34360
373 * Makefile.in: Change two occurrences of mlib-tgt.adb by correct name
374 mlib-tgt-specific.adb.
375
78185974
BD
3762007-12-13 Bob Duff <duff@adacore.com>
377
378 * trans.c (Attribute_to_gnu): Check for violations of the
379 No_Implicit_Dynamic_Code restriction. This checking used to be done in
380 the front end, but is moved here so we can make it more accurate.
381
e9b54d64
AC
3822007-12-13 Pascal Obry <obry@adacore.com>
383
384 * adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy
385 version is provided for older GNU/Linux distribution not
386 supporting thread affinity sets.
387
388 * s-osinte-linux.ads (SC_NPROCESSORS_ONLN): New constant for sysconf
389 call.
390 (bit_field): New packed boolean type used by cpu_set_t.
391 (cpu_set_t): New type corresponding to the C type with
392 the same name. Note that on the Ada side we use a bit
393 field array for the affinity mask. There is not need
394 for the C macro for setting individual bit.
395 (pthread_setaffinity_np): New imported routine.
396
397 * s-taprop-linux.adb (Enter_Task): Check that the CPU affinity mask is
398 no null.
399 (Create_Task): Set the processor affinity mask if information
400 is present.
401
402 * s-tasinf-linux.ads, s-tasinf-linux.adb: New files.
403
4042007-12-13 Robert Dewar <dewar@adacore.com>
405
406 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
407 s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-osinte-tru64.ads,
408 s-osinte-mingw.ads, s-osinte-aix.ads, s-osinte-hpux-dce.ads,
409 s-osinte-irix.ads, s-osinte-solaris.ads, s-intman-vms.adb,
410 s-osinte-vms.ads, s-osinte-vxworks6.ads, s-osinte-vxworks.ads,
411 s-auxdec.ads, s-auxdec-vms_64.ads, s-osinte-darwin.ads,
412 s-taprop-vms.adb, s-interr-sigaction.adb, s-osinte-linux-hppa.ads,
413 i-vxwork-x86.ads, s-tpopde-vms.ads: Add missing pragma Convention C
414 for subprogram pointers.
415
416 * g-ctrl_c.adb: New file.
417
418 * g-ctrl_c.ads (Install_Handler): New body.
419
420 * freeze.adb (Freeze_Subprogram): Use new flag Has_Pragma_Inline_Always
421 instead of obsolete function Is_Always_Inlined.
422 (Freeze_Entity): check for tagged type in imported C subprogram
423 (Freeze_Entity): check for 8-bit boolean in imported C subprogram
424 (Freeze_Entity): check for convention Ada subprogram pointer in
425 imported C subprogram.
426 (Freeze_Fixed_Point_Type): In the case of a base type where the low
427 bound would be chopped off and go from negative to zero, force
428 Loval_Excl_EP to be the same as Loval_Incl_EP (the included lower
429 bound) so that the size computation for the base type will take
430 negative values into account.
431
4322007-12-13 Eric Botcazou <ebotcazou@adacore.com>
433 Bob Duff <duff@adacore.com>
434 Tristan Gingold <gingold@adacore.com>
435
436 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
437 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
438 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
439 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
440 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
441 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
442 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
443 system-vxworks-arm.ads, system-darwin-x86.ads, system.ads,
444 system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
445 system-linux-ppc.ads, system-linux-hppa.ads, system-hpux-ia64.ads,
446 system-vms-ia64.ads (Stack_Check_Limits): New target parameter.
447 (Always_Compatible_Rep): New flag to control trampolines globally.
448 (Dynamic_Trampolines_Used): New flag for implementing the
449 No_Implicit_Dynamic_Code restriction more correctly (not yet used,
450 and not yet set correctly for some targets).
451
452 * s-taprop-vxworks.adb: Use stack limit method of stack checking.
453 Simply indirectly call s-stchop when a task is created.
454
455 * ali.ads:
456 New flag added: Stack_Check_Switch_Set which is set when '-fstack-check'
457 appears as an argument (entries A) in an ALI file.
458
459 * fe.h (Stack_Check_Limits): Declare new target parameter.
460 (Check_Implicit_Dynamic_Code_Allowed): New procedure.
461
462 * init.c: Declare __gnat_set_stack_limit_hook for VxWorks kernel RTS.
463 This variable is declared in C to be sure not subject to elaboration
464 code.
465 (__gnat_map_signal, VxWorks): In kernel mode, map SIGILL to
466 Storage_Error.
467
468 * targparm.ads, targparm.adb (Stack_Check_Limits): New parameter.
469 (Always_Compatible_Rep, Dynamic_Trampolines_Used): New parameters.
470
471 * s-stchop.ads: Add comments.
472
473 * s-stchop-vxworks.adb: Package almost fully rewritten to use stack
474 limit method of stack checking.
475
476 * s-stchop-limit.ads: New file.
477
4782007-12-13 Robert Dewar <dewar@adacore.com>
479
480 * sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
481 a-cihama.adb, g-awk.adb,
482 s-inmaop-posix.adb: Update handling of assigned value/unreferenced
483 warnings
484
485 * exp_smem.adb: Update handling of assigned value/unreferenced warnings
486
487 * sem.adb: Update handling of assigned value/unreferenced warnings
488
489 * a-exexpr-gcc.adb: Add a pragma warnings off for boolean return
490
491 * lib-xref.ads: Improve documentation for k xref type
492
493 * lib-xref.adb:
494 Update handling of assigned value/unreferenced warnings
495 (Generate_Reference): Warning for reference to entity for which a
496 pragma Unreferenced has been given should be unconditional.
497 If the entity is a discriminal, mark the original
498 discriminant as referenced.
499
500 * sem_warn.ads, sem_warn.adb
501 (Check_One_Unit): Test Renamed_In_Spec to control giving warning for
502 no entities referenced in package
503 (Check_One_Unit): Don't give message about no entities referenced in
504 a package if a pragma Unreferenced has appeared.
505 Handle new warning flag -gnatw.a/-gnatw.A
506 Update handling of assigned value/unreferenced warnings
507
508 * atree.h: Add flags up to Flag247
509 (Flag231): New macro.
510
5112007-12-13 Jose Ruiz <ruiz@adacore.com>
512
513 * adaint.h: (__gnat_plist_init): Not defined for RTX.
514
515 * initialize.c (__gnat_initialize): Do not call __gnat_plist_init for
516 RTX systems.
517
518 * Makefile.in: Add new files s-tasinf-linux.ads and s-tasinf-linux.adb.
519 (LIBGNAT_TARGET_PAIRS, MISCLIB, THREADSLIB,
520 EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
521 GNATLIB_SHARED for RTX run time): Use the versions required by RTX.
522
523 * mingw32.h:
524 Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.
525
526 * sysdep.c (winflush_function for RTX): Procedure that does nothing
527 since we only have problems with Windows 95/98, which are not
528 supported by RTX.
529 (__gnat_ttyname): Return the empty string on Nucleus, just as
530 done on vxworks.
531
5322007-12-13 Robert Dewar <dewar@adacore.com>
533
534 * a-textio.adb, a-textio.ads:
535 Extensive changes to private part for wide character encoding
536
537 * a-witeio.adb, a-witeio.ads, a-ztexio.ads, a-ztexio.adb
538 (Look_Ahead): Fix mishandling of encoded sequences
539 Move declaration of Wch_Con to private part (should not be visible)
540
541 * ali.adb (Scan_ALI): Set default encoding method to brackets instead of
542 UTF-8. Probably this is never used, but if it is, brackets is
543 clearly correct.
544
545 * bindgen.adb (Get_WC_Encoding): New procedure to properly handle
546 setting wide character encoding for no main program case and when
547 encoding is specified using -W?
548 Initialize stack limit of environment task if stack limit method of
549 stack checking is enabled.
550 (Gen_Adainit_Ada): Use Get_WC_Encoding to output encoding method
551 (Gen_Adainit_C): Use Get_WC_Encoding to output encoding method
552 (Get_Main_Unit_Name): New function.
553 (Gen_Adainit_Ada): Add call to main program for .NET when needed.
554 (Gen_Output_File): Set Bind_Main_Program to True for .NET
555
556 * bindusg.adb: Add line for -Wx switch
557
558 * s-wchcon.adb, s-wchcon.ads: (Is_Start_Of_Encoding): New function
559 Add comments
560 Add new useful constant WC_Longest_Sequences
561
562 * switch-b.adb: Clean up handling of -Wx switch
563 For -gnatWx, set Wide_Character_Encoding_Method_Specified
564
565 * switch-c.adb: -gnatg activates warning on assertion errors
566 For -gnatWx, set Wide_Character_Encoding_Method_Specified
567
568 * s-wchcon.adb: (Is_Start_Of_Encoding): New function
569
5702007-12-13 Robert Dewar <dewar@adacore.com>
571 Ed Schonberg <schonberg@adacore.com>
572
573 * a-ngcoty.adb: New pragma Fast_Math
574
575 * opt.adb: New pragma Fast_Math
576
577 * par-prag.adb:
578 Add Implemented_By_Entry to the list of pragmas which do not require any
579 special processing.
580 (Favor_Top_Level): New pragma.
581 New pragma Fast_Math
582
583 * exp_attr.adb: Move Wide_[Wide_]Image routines to Exp_Imgv
584 (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
585 Expand_Allocator_Expression): Take into account VM_Target
586 (Expand_Attribute, case 'Identity): Handle properly the case where
587 the prefix is a task interface.
588 New pragma Fast_Math
589
590 * par.adb (Next_Token_Is): New function
591 (P_Pragma): Add Skipping parameter
592 (U_Left_Paren): New procedure
593 (U_Right_Paren): New procedure
594 New pragma Fast_Math
595
596 * par-ch10.adb (P_Subunit): Unconditional msg for missing ) after
597 subunit
598 New pragma Fast_Math
599
600 * sem_prag.adb: Add significance value to table Sig_Flag for pragma
601 Implemented_By_Entry.
602 (Analyze_Pragma): Add case for Ada 2005 pragma Implemented_By_Entry.
603 (Set_Inline_Flags): Do not try to link pragma Inline onto chain of rep
604 items, since it can apply to more than one overloadable entity. Set
605 new flag Has_Pragma_Inline_Always for Inline_Always case.
606 (Analyze_Pragma, case Complex_Representation): Improve error message.
607 (Analyze_Pragma, case Assert): When assertions are disabled build the
608 rewritten code with Sloc of expression rather than pragma, so new
609 warning about failing is not deleted.
610 (Analyze_Pragma): Allow pragma Preelaborable_Initialization to apply to
611 protected types and update error message to reflect that. Test whether
612 the protected type is allowed for the pragma (an error is issued if the
613 type has any entries, or components that do not have preelaborable
614 initialization).
615 New pragma Fast_Math
616 (Analyze_Pragma, case No_Return): Handle generic instance
617
618 * snames.h, snames.ads, snames.adb:
619 Add new predefined name for interface primitive _Disp_Requeue.
620 New pragma Fast_Math
621
622 * a-tags.ads, a-tags.adb: New calling sequence for
623 String_To_Wide_[Wide_]String
624 (Secondary_Tag): New subprogram.
625
626 * exp_imgv.ads, exp_imgv.adb: Move Wide_[Wide_]Image routines here
627 from Exp_Attr
628 New calling sequence for String_To_Wide_[Wide_]String
629 (Expand_Image_Attribute): Major rewrite. New calling sequence avoids
630 the use of the secondary stack for image routines.
631
632 * a-except-2005.adb, s-wchstw.ads, s-wchstw.adb, s-wwdenu.adb: New
633 calling sequence for String_To_Wide_[Wide_]String
634
635 * par-ch3.adb (P_Declarative_Items): Recognize use of Overriding in
636 Ada 95 mode
637 (P_Unknown_Discriminant_Part_Opt): Handle missing parens gracefully
638 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
639
640 * par-ch6.adb (P_Subprogram): Recognize use of Overriding in Ada 95 mode
641 (P_Formal_Part): Use Skipping parameter in P_Pragma call
642 to improve error recovery
643
644 * par-util.adb (Next_Token_Is): New function
645 (Signal_Bad_Attribute): Use new Namet.Is_Bad_Spelling_Of function
646
647 * par-ch2.adb (Skip_Pragma_Semicolon): Do not resynchronize to
648 semicolon if missing
649 (P_Pragma): Implement new Skipping parameter
650 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
651 Fix location of flag for unrecognized pragma message
652
653 * par-tchk.adb (U_Left_Paren): New procedure
654 (U_Right_Paren): New procedure
655
6562007-12-13 Geert Bosch <bosch@adacore.com>
657
658 * a-tifiio.adb:
659 (Put_Int64): Use Put_Digit to advance Pos. This fixes a case where
660 the second or later Scaled_Divide would omit leading zeroes,
661 resulting in too few digits produced and a Layout_Error as result.
662 (Put): Initialize Pos.
663
6642007-12-13 Robert Dewar <dewar@adacore.com>
665
666 atree.ads, atree.adb (Flag231..Flag247): New functions
667 (Set_Flag231..Set_Flag247): New procedures
668 (Basic_Set_Convention): Rename Set_Convention to be
669 Basic_Set_Convention
670 (Nkind_In): New functions
671 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
672
673 * exp_ch6.adb (Expand_Call): Use new flag Has_Pragma_Inline_Always
674 instead
675 of obsolete function Is_Always_Inlined
676 (Register_Predefined_DT_Entry): Initialize slots of the second
677 secondary dispatch table.
678 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
679 (Expand_N_Function_Call): Remove special provision for stack checking.
680
681 * exp_util.ads, exp_util.adb (Is_Predefined_Dispatching_Operation):
682 Include _Disp_Requeue in the list of predefined operations.
683 (Find_Interface_ADT): Modified to fulfill the new specification.
684 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
685
686 * par-ch4.adb, nlists.ads, nlists.adb:
687 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
688
689 * sinfo.ads, sinfo.adb: (Nkind_In): New functions
690 Fix location of flag for unrecognized pragma message
691
692 * sem_ch7.adb: Use Nkind_In
693
6942007-12-13 Vincent Celier <celier@adacore.com>
695
696 * opt.ads:
697 Indicate what flags are used by the Project Manager, gprbuild and
698 gprclean.
699 (Opt.Follow_Links_For_Dirs): New flag
700 (Warn_On_Assertion_Failure): New flag
701 (Wide_Character_Encoding_Method_Specified): New flag
702 (Suppress_All_Inlining): New switch set by -fno-inline
703 (Real_VMS_Target): New flag
704 New pragma Fast_Math
705
7062007-12-13 Robert Dewar <dewar@adacore.com>
707
708 * back_end.adb: Recognize -fno-inline
709
7102007-12-13 Robert Dewar <dewar@adacore.com>
711
712 * checks.adb: Fix optimization problem with short-circuited form
713
7142007-12-13 Bob Duff <duff@adacore.com>
715
716 * clean.adb (Usage): Add line for -aP
717 (Check_Version_And_Help): Change Check_Version_And_Help to be generic,
718 with a parameter "procedure Usage", instead of passing a pointer to a
719 procedure. This is to eliminate trampolines (since the Usage procedure
720 is often nested in a main procedure, and it would be inconvenient to
721 unnest it).
722
723 * g-comlin.adb (For_Each_Simple_Switch): Change For_Each_Simple_Switch
724 to be generic, with a parameter "procedure Callback (...)", instead of
725 passing a pointer to a procedure. This is to eliminate trampolines
726 (since the Callback procedure is usually nested).
727
728 * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb,
729 gnatname.adb, gnatxref.adb, gnatchop.adb, gprep.adb, gnatbind.adb
730 (Check_Version_And_Help): Change Check_Version_And_Help to be generic.
731
732 * g-pehage.adb (Compute_Edges_And_Vertices, Build_Identical_Key_Sets):
733 Use the generic Heap_Sort_G instead of Heap_Sort_A.
734
7352007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
736
737 * einfo.ads, einfo.adb: Flag 232 is now Implemented_By_Entry.
738 (Implemented_By_Entry, Set_Implemented_By_Entry): New routines.
739 (Write_Entry_Flags): Add an entry for Implemented_By_Entry.
740 (Renamed_In_Spec): New flag
741 (Has_Pragma_Inline_Always): New flag
742 Add missing doc for pragma Obsolescent_Warning
743 Add missing doc for 17 additional unused flags (230-247)
744 (Is_Derived_Type): Remove condition "not Is_Generic_Type".
745 Alphabetize with clauses.
746 Separate Is_Thunk and Has_Thunks flags
747 (Write_Entity_Flags): Add forgotten entry for Has_Thunks
748 (Related_Interface): Renamed to Related_Type.
749 (Has_Thunks/Set_Has_Thunks): Subprograms of new attribute.
750 (Set_Is_Flag): Restrict the assertion.
751
7522007-12-13 Vincent Celier <celier@adacore.com>
753
754 * errout.adb (Output_Source_Line): Do not keep a trailing space after
755 the source line number if the source line is empty.
756
7572007-12-13 Geert Bosch <bosch@adacore.com>
758
759 * eval_fat.adb (Decompose_Int): Handle argument of zero.
760 (Compose): Remove special casing of zero.
761 (Exponent): Likewise.
762 (Fraction): Likewise.
763 (Machine): Likewise.
764 (Decompose): Update comment.
765
7662007-12-13 Ed Schonberg <schonberg@adacore.com>
767
768 * exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a
769 limited ancestor part, initialize controllers of enclosing record
770 before expanding ancestor aggregate.
771 (Gen_Assign): If a component of the aggregate is box-initialized, add
772 code to call Initialize if the component is controlled, and explicit
773 assignment of null if the component is an access type.
774
775 Handle properly aggregates for limited types that appear in object
776 declarations when the aggregate contains controlled values such as
777 protected types.
778 When expanding limited aggregates into individual components, do not
779 call Adjust on controlled components that are limited.
780
7812007-12-13 Ed Schonberg <schonberg@adacore.com>
782
783 * expander.adb: Take into account N_Subprogram_Renaming_Declaration
784
7852007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
786
787 * exp_ch3.adb (Predefined_Primitive_Bodies): Generate the body of
788 predefined primitive _Disp_Requeue.
789 (Make_Predefined_Primitive_Specs): Create the spec for predefined
790 primitive _Disp_Requeue.
791 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): Set the
792 type of formal Renamed_Eq to Entity_Id (instead of Node_Id).
793 (Make_Predefined_Primitive_Specs): Spec of "=" needed if the parent is
794 an interface type. In case of limited interfaces we now declare all the
795 predefined primitives associated with synchronized interfaces as
796 abstract.
797 (Predef_Spec_Or_Body): For interface types generate abstract subprogram
798 declarations.
799 (Predefined_Primitive_Bodies): Add body of "=" if the parent of the
800 tagged type is an interface type and there is no user-defined equality
801 function.
802 Add also bodies of predefined primitives associated with synchronized
803 interfaces.
804 (Freeze_Record_Type): Do not build bodies of predefined primitives of
805 interface types because they are now defined abstract.
806 Add missing documentation.
807 (Expand_Record_Controller): Update occurrence of Related_Interface
808 to Related_Type.
809 (Build_Offset_To_Top_Functions): Do nothing in case of VM.
810 (Expand_N_Object_Declaration): Take into account VM_Target when handling
811 class wide interface object declaration.
812 (Expand_Previous_Access_Type): Do not create a duplicate master entity
813 if the access type already has one.
814 (Expand_N_Object_Declaration): Defend against attempt to validity check
815 generic types. Noticed for -gnatVcf specified with previous errors.
816
8172007-12-13 Arnaud Charlet <charlet@adacore.com>
818
819 * exp_ch4.adb (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
820 Expand_Allocator_Expression): Take into account VM_Target
821
822 * exp_ch5.adb (Expand_N_Extended_Return_Statement): Do not use
823 secondary stack when VM_Target /= No_VM
824
8252007-12-13 Javier Miranda <miranda@adacore.com>
826 Ed Schonberg <schonberg@adacore.com>
827
828 * exp_ch7.adb (Expand_N_Package_Body): Replace occurrence of attribute
829 Is_Complation_Unit by Is_Library_Level_Entity in the code
830 that decides if the static dispatch tables need to be built.
831 (Wrap_Transient_Declaration): Do not generate a finalization call if
832 this is a renaming declaration and the renamed object is a component
833 of a controlled type.
834
8352007-12-13 Gary Dismukes <dismukes@adacore.com>
836
837 * exp_ch8.ads, exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration):
838 In the case where the renamed subprogram is a dereference, call
839 Force_Evaluation on the prefix.
840
8412007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
842 Ed Schonberg <schonberg@adacore.com>
843
844 * exp_ch9.adb (Expand_N_Asynchronous_Select,
845 Expand_N_Conditional_Entry_Call, Expand_N_Timed_Entry_Call): Code and
846 comment reformatting.
847 (Set_Privals): Inherit aliased flag from formal. From code reading.
848 (Build_Simple_Entry_Call): Out parameters of an access type are passed
849 by copy and initialized from the actual. This includes entry parameters.
850 (Expand_N_Requeue_Statement): Reimplement in order to handle both Ada 95
851 and Ada 2005 models of requeue.
852 (Null_Statements): Still connsider do-end block null if it contains
853 Unreferenced and Warnings pragmas.
854 (Expand_N_Accept_Statement): Do not optimize away null do end if
855 dispatching policy is other than defaulted.
856 (Expand_N_Timed_Entry_Call): When the triggering statement is a
857 dispatching call, manually analyze the delay statement.
858 (Find_Parameter_Type): Move subprogram to Sem_Util.
859
8602007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
861 Javier Miranda <miranda@adacore.com>
862
863 * exp_disp.ads, exp_disp.adb (Default_Prim_Op_Position): Primitive
864 _Disp_Requeue occupies dispatch table slot number 15. Move
865 _Disp_Timed_Select to slot 16.
866 (Make_Disp_Requeue_Body, Make_Disp_Requeue_Spec): New routines which
867 generate the spec and body of _Disp_Reqeueue.
868 (Make_DT): Build and initialize the second dispatch table.
869 Handle initialization of RC_Offset when the parent
870 is a private type with variable size components.
871 (Make_Secondary_DT): Complete documentation. Add support to
872 initialize the second dispatch table.
873 (Make_Tags): Generate the tag of the second dispatch table.
874 (Register_Primitive): Add support to register primitives in the
875 second dispatch table.
876
8772007-12-13 Pascal Obry <obry@adacore.com>
878
879 * expect.c (__gnat_kill) [WIN32]: Implement the SIGINT signal on
880 Windows. This signal is used by gnatmake to kill child processes for
881 example.
882
8832007-12-13 Javier Miranda <miranda@adacore.com>
884
885 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
886 support for generic dispatching constructor calls in which we need to
887 locate the tag of a secondary dispatch table associated with an
888 interface type to properly dispatch the call.
889 (Expand_N_Attribute_Reference [case Address],
890 Expand_Dispatching_Constructor_Call, Expand_Unc_Deallocation): Fix
891 handling of VM targets.
892
8932007-12-13 Robert Dewar <dewar@adacore.com>
894 Ed Schonberg <schonberg@adacore.com>
895
896 * exp_prag.adb (Expand_Pragma_Assert): Recognize new warning flag for
897 assert fail
898
899 * ug_words: Add entries for -gnatw.a -gnatw.A
900
901 * sem_res.adb (Set_String_Literal_Subtype): If the context of the
902 literal is a subtype with non-static constraints, use the base type of
903 the context as the base of the string subtype, to prevent type
904 mismatches in gigi.
905 (Resolve_Actuals): If the actual is an entity name, generate a
906 reference before the actual is resolved and expanded, to prevent
907 spurious warnings on formals of enclosing protected operations.
908 (Analyze_Overloaded_Selected_Component): If type of prefix if
909 class-wide, use visible components of base type.
910 (Resolve_Selected_Component): Ditto.
911 (Resolve_Short_Circuit): Detect case of pragma Assert argument
912 evaluating to False, and issue warning message.
913
914 * usage.adb: Add lines for -gnatw.a and -gnatw.A
915
9162007-12-13 Emmanuel Briot <briot@adacore.com>
917
918 * g-calend.ads (No_Time): New constant, to represent an uninitialized
919 time value
920
921 * g-catiio.ads, g-catiio.adb (Value): Added support for more date
922 formats.
923 (Month_Name_To_Number): New subprogram
924
925 * g-dirope.adb (Get_Current_Dir): On windows, normalize the drive
926 letter to upper-case.
927
9282007-12-13 Robert Dewar <dewar@adacore.com>
929 Ed Schonberg <schonberg@adacore.com>
930
931 * gnat1drv.adb (Gnat1drv): Properly set new flag Opt.Real_VMS_Target
932
933 * layout.adb (Resolve_Attribute, case 'Access): If designated type of
934 context is a limited view, use non-limited view when available. If the
935 non-limited view is an unconstrained array, this enforces consistency
936 requirements in 3.10.2 (27).
937 (Layout_Type): For an access type whose designated type is a limited
938 view, examine its declaration to determine if it is an unconstrained
939 array, and size the access type accordingly.
940 (Layout_Type): Do not force 32-bits for convention c subprogram
941 pointers in -gnatdm mode, only if real vms target.
942
943 * sem_attr.adb (Analyze_Access_Attribute): Use new flag
944 Has_Pragma_Inline_Always instead of obsolete function Is_Always_Inlined
945 (Analyze_Access_Attribute,Attribute_Address): Remove checks for
946 violations of the No_Implicit_Dynamic_Code restriction.
947 (Resolve_Attribute, case 'Access): If designated type of context is a
948 limited view, use non-limited view when available. If the non-limited
949 view is an unconstrained array, this enforces consistency requirements
950 in 3.10.2 (27).
951 (Layout_Type): For an access type whose designated type is a limited
952 view, examine its declaration to determine if it is an unconstrained
953 array, and size the access type accordingly.
954
9552007-12-13 Vincent Celier <celier@adacore.com>
956
957 * gnatcmd.adb (GNATCmd): Do not issue -d= switch to gnatmetric when
958 object directory of main project does not exist.
959 On VMS, correctly set then environment variable for the source
960 directories.
961
9622007-12-13 Vasiliy Fofanov <fofanov@adacore.com>
963
964 * g-regist.ads, g-regist.adb (Set_Value): new parameter Expand; when
965 set to True this procedure will create the value of type REG_EXPAND_SZ.
966 It was only possible to create REG_SZ values before.
967
9682007-12-13 Robert Dewar <dewar@adacore.com>
969
970 * g-spchge.ads, g-spchge.adb, g-u3spch.adb, g-u3spch.ads,
971 g-wispch.adb, g-wispch.ads, g-zspche.adb, g-zspche.ads,
972 namet-sp.adb, namet-sp.ads: New files.
973
974 * g-speche.adb: Use generic routine in g-spchge
975
976 * s-wchcnv.ads, s-wchcnv.adb:
977 Minor code cleanup (make formal type consistent with spec)
978
979 * namet.adb: Update comments.
980
981 * par-endh.adb (Evaluate_End_Entry): Use new
982 Namet.Sp.Is_Bad_Spelling_Of function
983
984 * par-load.adb (Load): Use new Namet.Sp.Is_Bad_Spelling_Of function
985
986 * sem_aggr.adb (Resolve_Record_Aggregate): If a component of an
987 ancestor is an access type initialized with a box, set its type
988 explicitly, for use in subsequent expansion.
989 (Check_Misspelled_Component): Use new Namet.Sp.Is_Bad_Spelling_Of
990 function
991
9922007-12-13 Robert Dewar <dewar@adacore.com>
993
994 * g-spipat.adb (Break): Fix accessibility error (vsn taking not null
995 access Vstring)
996
9972007-12-13 Robert Dewar <dewar@adacore.com>
998
999 * inline.adb (Back_End_Cannot_Inline): Use new flag
1000 Has_Pragma_Inline_Always instead of obsolete function Is_Always_Inlined
1001
1002 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Use new flag
1003 Has_Pragma_Inline_Always instead.
1004 of obsolete function Is_Always_Inlined
1005 (Build_Body_To_Inline): Same change
1006 (Cannot_Inline): Same change
1007 Do not give warning on exception raise in No_Return function
1008
1009 * sem_ch13.adb (Analyze_Record_Representation_Clause): If an inherited
1010 component has two inconsistent component clauses in the same record
1011 representation clause, favor the message that complains about
1012 duplication rather than inconsistency.
1013 Update comments.
1014 (Record_Representation_Clause): Do not warn on missing component
1015 clauses for inherited components of a type extension.
1016 (Rep_Item_Too_Late): Do not attempt to link pragma into rep chain for
1017 an overloadable item if it is a pragma that can apply to multiple
1018 overloadable entities (e.g. Inline) because a pragma cannot be on
1019 more than one chain at a time.
1020 (Validate_Unchecked_Conversion): Add code to warn on unchecked
1021 conversion where one of the operands is Ada.Calendar.Time.
1022 (Analyze_Attribute_Definition_Clause): Fix typo in error message.
1023 For now, ignore Component_Size clause on VM targets, as done for
1024 pragma Pack.
1025
10262007-12-13 Emmanuel Briot <briot@adacore.com>
1027 Vincent Celier <celier@adacore.com>
1028
1029 * prj.ads, prj.adb (Is_A_Language): Now takes a Name_Id instead of a
1030 string
1031 (Must_Check_Configuration, Default_Language_Is_Ada): new flags in
1032 prj.ads
1033 (Hash): Move instantiation of System.HTable.Hash from spec to body
1034 (prj-nmsc.adb): Optimize calls to Name_Find when on case sensitive
1035 systems, since we do not need to recompute the Name_Id for the canonical
1036 file name.
1037 (Body_Suffix_Id_Of, Spec_Suffix_Id_Of): new version that takes a name_id
1038 as a parameter. This parameter is in fact always "ada" in all calls, and
1039 we were doing 160560 extra calls to Name_Find to convert it to Name_Ada
1040 while loading a project with 40000 files
1041
1042 * prj-attr.adb: Fix name of attribute Dependency_Driver
1043 Change the kind of indexing for attribute Root
1044
1045 * prj-dect.adb (Parse_Declarative_Items): Allow redeclarations of
1046 variables already declared, in case constructions.
1047
1048 * prj-env.adb (Initialize): Reset Current_Source_Path_File and
1049 Current_Object_Path_File to No_Path.
1050
1051 * prj-ext.adb (Initialize_Project_Path): In multi language mode, use
1052 ADA_PROJECT_PATH if value of GPR_PROJECT_PATH is empty.
1053
1054 * prj-makr.adb: new parameter Current_Dir
1055
1056 * prj-nmsc.ads, prj-nmsc.adb (Find_Explicit_Sources): Do not look for
1057 Ada sources when language is not Ada.
1058 Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
1059 (Find_Excluded_Sources, Find_Explicit_Sources): new subprograms
1060 (Must_Check_Configuration, Default_Language_Is_Ada): new flags.
1061 (Locate_Directory): Always resolve links when computing Canonical_Path
1062 (Look_For_Sources): Make sure that Name_Buffer contains the file name
1063 in Source_Files before checking for the presence of a directory
1064 separator.
1065 Optimize calls to Name_Find when on case sensitive systems.
1066 (Body_Suffix_Id_Of, Spec_Suffix_Id_Of): new version that takes a name_id
1067 as a parameter.
1068 (Prj.Nmsc.Check): new parameter Current_Dir
1069 (Check_Ada_Naming_Schemes): Restrictions on suffixes are relaxed. They
1070 cannot be empty and the spec suffix cannot be the same as the body or
1071 separate suffix.
1072 (Get_Unit): When a file name can be of several unit kinds (spec, body or
1073 subunit), always consider the longest suffix.
1074 (Check_Configuration): Do not issue an error if there is no compiler
1075 for a language. Just issue a warning and ignore the sources for the
1076 language.
1077 (Check_Library_Attributes): Only check Library_Dir if Library_Name is
1078 not empty.
1079 (Check_Naming_Schemes.Maked_Unit): Only output message if high verbosity
1080 (Unit_Exceptions): New hash table
1081 (Check_Naming_Schemes): Check if a file that could be a unit because of
1082 the naming scheme is not in fact a source because there is an exception
1083 for the unit.
1084 (Look_For_Sources): Put the unit exceptions in hash table
1085 Unit_Exceptions
1086 (Get_Unit_Exceptions): Give initial value No_Source to local variable
1087 Other_Part to avoid exception when code is compiled with validity
1088 checking.
1089 (Get_Sources_From_File): Check that there is no directory information
1090 in the file names.
1091 (Look_For_Sources): Check that there is no directory information in the
1092 list of file names in Source_Files.
1093 (Look_For_Sources): In multi-language mode, do not allow exception file
1094 names that are excluded.
1095 (Excluded_Sources_Htable): New hash table
1096 (Search_Directories.Check_File): New procedure to simplify
1097 Search_Directories.
1098 (Search_Directories): Do not consider excluded sources
1099 (Look_For_Sources): Populate Excluded_Sources_Htable before calling
1100 Search_Directories.
1101 (Get_Exceptions): Set component Lang_Kind of Source_Data
1102 (Get_Unit_Exceptions): Ditto
1103 (Search_Directories): Ditto
1104
1105 * prj-pars.adb: new parameter Current_Dir
1106
1107 * prj-part.ads, prj-part.adb:
1108 Change Opt.Follow_Links to Opt.Follow_Links_For_Files.
1109 (Opt.Follow_Links_For_Dirs): New flag
1110 (Project_Path_Name_Of): Cache information returned by this routine as
1111 Locate_Regular_File is a costly routine. The code to output a log
1112 information and the effective call to Locate_Regular_File is now
1113 factorized into a routine (code clean-up).
1114 (Parse, Parse_Single_Project): new parameter Current_Dir
1115 When main project file cannot be found, indicate in the error
1116 message the project path that was used to do the search.
1117
1118 * prj-proc.ads, prj-proc.adb (Opt.Follow_Links_For_Dirs): New flag
1119 (Prj.Proc.Process*): new parameter Current_Dir
1120
1121 * switch-m.adb: Change Opt.Follow_Links to Opt.Follow_Links_For_Files
1122
11232007-12-13 Bob Duff <duff@adacore.com>
1124
1125 * restrict.ads, restrict.adb (Check_Implicit_Dynamic_Code_Allowed): New
1126 procedure to be called from the back end to check the
1127 No_Implicit_Dynamic_Code restriction.
1128
11292007-12-13 Arnaud Charlet <charlet@adacore.com>
1130
1131 * rtsfind.adb (Check_CRT): Take into account RTE_Available_Call
1132 Fixes another case where RTE_Available_Call was ignored instead of being
1133 taken into account.
1134 (Load_Fail): Ditto.
1135
1136 * rtsfind.ads: Add new entries.
1137
11382007-12-13 Robert Dewar <dewar@adacore.com>
1139
1140 * g-byorma.adb, g-byorma.ads, g-decstr.adb, g-decstr.ads,
1141 g-deutst.ads, g-encstr.adb, g-encstr.ads, g-enutst.ads: New files.
1142
1143 * scn.adb: Implement BOM recognition
1144
11452007-12-13 Thomas Quinot <quinot@adacore.com>
1146 Ed Schonberg <schonberg@adacore.com>
1147
1148 * sem_ch10.adb (Check_Private_Child_Unit): A non-private library level
1149 subprogram body that acts as its own spec may not have a non-private
1150 WITH clause on a private sibling.
1151 (Build_Unit_Name): If the parent unit in the name in a with_clause on a
1152 child unit is a renaming, create an implicit with_clause on that
1153 parent, and not on the unit it renames, to prevent visibility errors
1154 in the current unit.
1155
11562007-12-13 Ed Schonberg <schonberg@adacore.com>
1157
1158 * sem_ch12.adb (Instantiate_Formal_Subprogram): In the subprogram
1159 renaming declaration, use the Slocs of the formal parameters from the
1160 declaration of the formal subprogram when creating the formal parameter
1161 entities in the renaming declaration.
1162 (Analyze_Formal_Type_Declaration): Change the placement of the error
1163 message concerning illegal known discriminants. It is now posted on the
1164 type rather than on the first discriminant. This change ensures early
1165 error report.
1166 (Freeze_Subprogram_Body): If the generic subprogram is nested within
1167 the package body that contains the instance, do not generate an
1168 out-of-place freeze node for the enclosing package.
1169 (Collect_Previous_Instantiations): Ignore internal instantiations
1170 generated for formal packages.
1171 (Validate_Derived_Type_Instance): Add a check that when a formal
1172 derived type is Known_To_Have_Preelab_Init then the actual type must
1173 have preelaborable initialization, and issue an error when this
1174 condition is violated.
1175
11762007-12-13 Robert Dewar <dewar@adacore.com>
1177
1178 * s-imenne.adb, s-imenne.ads: New files.
1179
1180 * s-imgboo.adb, s-imgboo.ads, s-imgcha.adb, s-imgcha.ads, s-imgdec.adb,
1181 s-imgdec.ads, s-imgenu.ads, s-imgint.adb, s-imgint.ads, s-imglld.adb,
1182 s-imglld.ads, s-imglli.adb, s-imglli.ads, s-imgllu.adb, s-imgllu.ads,
1183 s-imgrea.adb, s-imgrea.ads, s-imguns.adb, s-imguns.ads, s-imgwch.adb,
1184 s-imgwch.ads: New calling sequence for Image routines to avoid sec
1185 stack usage.
1186
11872007-12-13 Javier Miranda <miranda@adacore.com>
1188 Ed Schonberg <schonberg@adacore.com>
1189
1190 * sem_ch3.ads, sem_ch3.adb (Check_Abstract_Overriding): Avoid
1191 generation of spurious error if parent is an interface type; caused
1192 because predefined primitive bodies will be generated later by
1193 Freeze_Record_Type.
1194 (Process_Subtype): The subtype inherits the Known_To_Have_Preelab_Init
1195 flag.
1196 (Derive_Subprograms): Handle derivations of predefined primitives
1197 after all the user-defined primitives to ensure that they are
1198 found in proper order in instantiations.
1199 (Add_Interface_Tag_Components, Inherit_Components): Update occurrences
1200 of Related_Interface to Related_Type.
1201 (Record_Type_Declaration): Minor reordering of calls to decorate the
1202 Tag component because the entity must have set its Ekind attribute
1203 before setting its Is_Tag attribute.
1204 (Analyze_Subtype_Declaration): In the case of subtypes with
1205 Private_Kind, inherit Known_To_Have_Preelab_Init from the parent.
1206
12072007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
1208 Ed Schonberg <schonberg@adacore.com>
1209
1210 * sem_ch4.adb (Analyze_Selected_Component): Include the requeue
1211 statement to the list of contexts where a selected component with a
1212 concurrent tagged type prefix should yield a primitive operation.
1213 (Find_Primitive_Operation): Handle case of class-wide types.
1214 (Analyze_Overloaded_Selected_Component): If type of prefix is
1215 class-wide, use visible components of base type.
1216 (Resolve_Selected_Component): Ditto.
1217 (Try_Primitive_Operation, Collect_Generic_Type_Ops): If the type is a
1218 formal of a generic subprogram. find candidate interpretations by
1219 scanning the list of generic formal declarations.:
1220 (Process_Implicit_Dereference_Prefix): If the prefix has an incomplete
1221 type from a limited_with_clause, and the full view is available, use it
1222 for subsequent semantic checks.
1223 (Check_Misspelled_Selector): Use Namet.Sp.Is_Bad_Spelling_Of function
1224 (Find_Primitive_Operation): New function.
1225 (Analyze_Overloaded_Selected_Component): insert explicit dereference
1226 only once if several interpretations of the prefix yield an access type.
1227 (Try_Object_Operation): Code and comment cleanup.
1228 (Analyze_Selected_Component): Reorder local variables. Minot comment and
1229 code reformatting. When the type of the prefix is tagged concurrent, a
1230 correct interpretation might be available in the primitive and
1231 class-wide operations of the type.
1232
12332007-12-13 Robert Dewar <dewar@adacore.com>
1234 Ed Schonberg <schonberg@adacore.com>
1235
1236 * sem_ch8.adb (Analyze_Subprogram_Renaming): Special error message for
1237 renaming entry as subprogram using rename-as-body if subprogram spec
1238 frozen.
1239 (Use_One_Type): The clause is legal on an access type whose designated
1240 type has a limited view.
1241 (Find_Direct_Name): Use Namet.Sp.Is_Bad_Spelling_Of function
1242 (Find_Expanded_Name): Use Namet.Sp.Is_Bad_Spelling_Of function
1243 (Analyze_Renamed_Primitive_Operation): new procedure to determine the
1244 operation denoted by a selected component.
1245 (Analyze_Renamed_Entry): Resolve the prefix of the entry name, because
1246 it can be an expression, possibly overloaded, that returns a task or
1247 an access to one.
1248
12492007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
1250 Gary Dismukes <dismukes@adacore.com>
1251
1252 * sem_ch9.adb (Analyze_Requeue): Add a local flag to capture whether a
1253 requeue statement is dispatching. Do not emit an error when the name is
1254 not an entry and the context is a dispatching select. Add code to
1255 perform subtype conformance between the formals of the current entry
1256 and those of the target interface primitive.
1257 (Analyze_Asynchronous_Select, Analyze_Conditional_Entry_Call, Analyze_
1258 Timed_Entry_Call): Analyze the triggering statement as the first step of
1259 the processing. If this is a dispatching select, postpone the analysis
1260 of all select statements until the Expander transforms the select. This
1261 approach avoids generating duplicate identifiers after the Expander has
1262 replicated some of the select statements. In case the Expander is
1263 disabled, perform regular analysis.
1264 (Check_Triggering_Statement): New routine.
1265 (Analyze_Requeue): Exclude any interpretations that are not entries when
1266 checking overloaded names in a requeue. Also test type conformance for
1267 matching interpretations rather than requiring subtype conformance at
1268 that point to conform with the RM's resolution rule for requeues.
1269
12702007-12-13 Ed Schonberg <schonberg@adacore.com>
1271
1272 * sem_disp.adb (Check_Dispatching_Call): If an actual in a call to an
1273 inherited operation is a defaulted tag-indeterminate call, and there is
1274 a statically tagged actual, use the static tag as a controlling actual
1275 for the defaulted actual.
1276
12772007-12-13 Geert Bosch <bosch@adacore.com>
1278
1279 * sem_eval.adb (Eval_Real_Literal): N_Constant_Declaration is a static
1280 context, so do not call Check_Non_Static_Context.
1281
12822007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
1283
1284 * sem_type.adb (Function_Interp_Has_Abstract_Op): Add guard to check
1285 whether formal E is an entity which may have parameters.
1286
12872007-12-13 Bob Duff <duff@adacore.com>
1288 Javier Miranda <miranda@adacore.com>
1289 Robert Dewar <dewar@adacore.com>
1290
1291 * sem_util.ads, sem_util.adb (Is_Concurrent_Interface): New routine.
1292 (Set_Convention): New procedure to set the Convention flag, and in
1293 addition make sure the Favor_Top_Level flag is kept in sync (all
1294 foreign-language conventions require Favor_Top_Level = True).
1295 (Collect_Abstract_Interfaces): Update occurrences of Related_Interface
1296 to Related_Type.
1297 (Collect_Interfaces_Info): Minor update to handle the two secondary
1298 dispatch tables. Update occurrence of Related_Interface to Related_Type.
1299 (Generate_Parent_Ref): Add parameter to specify entity to check
1300 (Is_Preelaborable_Expression): Allow the name of a discriminant to
1301 initialize a component of a type with preelaborable initialization.
1302 This includes the case of a discriminal used in such a context.
1303 (Is_Dependent_Component_Of_Mutable_Object): Take into account the
1304 latest Ada 2005 rules about renaming and 'Access of
1305 discriminant-dependent components.
1306 (Check_Nested_Access): Add handling when there are no enclosing
1307 subprograms (e.g. case of a package body).
1308 (Find_Parameter_Type): Factor routine from several other compiler files.
1309 Remove routine from Find_Overridden_Synchronized_Primitive.
1310
13112007-12-13 Thomas Quinot <quinot@adacore.com>
1312
1313 * sinput.adb (Get_Source_File_Index): Add assertion to guard against
1314 an invalid access to an uninitialized slot in the
1315 Source_File_Index_Table.
1316
13172007-12-13 Thomas Quinot <quinot@adacore.com>
1318
1319 * sinput-l.adb (Load_File): Disable style checks when preprocessing.
1320
13212007-12-13 Bob Duff <duff@adacore.com>
1322
1323 * s-soflin.ads: Apply new pragma Favor_Top_Level to all
1324 access-to-subprogram types in this package.
1325
13262007-12-13 Olivier Hainque <hainque@adacore.com>
1327
1328 * s-stausa.ads (Stack_Analyzer): Remove First_Is_Topmost, redundant
1329 with Stack_Grows_Down in System.Parameters. Rename Array_Address into
1330 Stack_Overlay_Address and document that we are using an internal
1331 abstraction.
1332 (Byte_Size, Unsigned_32_Size): Remove, now useless.
1333 (Pattern_Type, Bytes_Per_Pattern): New subtype and constant, to be used
1334 consistently throughout the various implementation pieces.
1335
1336 * s-stausa.adb (Stack_Slots): New type, abstraction for the stack
1337 overlay we are using to fill the stack area with patterns.
1338 (Top_Slot_Index_In, Bottom_Slot_Index_In): Operations on Stack_Slots.
1339 (Push_Index_Step_For, Pop_Index_Step_For): Likewise.
1340 (Fill_Stack, Compute_Result): Use the Stack_Slots abstraction.
1341
13422007-12-13 Robert Dewar <dewar@adacore.com>
1343
1344 * s-stoele.adb ("mod"): mod negative value raises Constraint_Error
1345
13462007-12-13 Arnaud Charlet <charlet@adacore.com>
1347
1348 * s-tassta.adb:
1349 (Create_Task): Take into account tasks created by foreign threads.
1350 Code clean up: use constants instead of hard coded values.
1351
13522007-12-13 Robert Dewar <dewar@adacore.com>
1353
1354 * styleg.adb (Check_Comment): More liberal rules for comment placement
1355
13562007-12-13 Olivier Hainque <hainque@adacore.com>
1357
1358 * tb-alvms.c (struct tb_entry_t, __gnat_backtrace): Revert back to use
1359 of Procedure Value instead of Frame Pointer as the invocation
1360 identifier associated with the instruction pointer in each traceback
1361 entry.
1362
1363 * g-trasym-vms-alpha.adb (Traceback_Entry, PV_For, FP_For,
1364 TB_Entry_For): Revert back to use of Procedure Value instead of Frame
1365 Pointer as the invocation identifier passed to tbk$symbolize.
1366
1367 * s-traent-vms.ads, s-traent-vms.adb
1368 (Traceback_Entry, PV_For, FP_For, TB_Entry_For): Revert back to use of
1369 Procedure Value instead of Frame Pointer as the invocation identifier
1370 passed to tbk$symbolize.
1371
13722007-12-13 Robert Dewar <dewar@adacore.com>
1373
1374 * tbuild.ads, tbuild.adb:
1375 Fix location of flag for unrecognized pragma message
1376
13772007-12-13 Robert Dewar <dewar@adacore.com>
1378
1379 * treepr.ads, treepr.adb: (pl): implement use of positive value
1380 shorthands
1381
13822007-12-13 Robert Dewar <dewar@adacore.com>
1383
1384 * xeinfo.adb: Remove warnings
1385 * xnmake.adb: Remove warnings
1386 * xsinfo.adb: Remove warnings
1387 * xtreeprs.adb: Remove warnings
1388 * xsnames.adb: Remove warnings
1389
1390 * a-ngcoar.adb: Fix typo.
1391 * s-interr.adb: Minor reformatting
1392 * env.c: Minor reformatting.
1393 * g-bytswa.adb: Minor reformatting.
1394 * g-rannum.ads: Minor documentation improvements
1395 * s-tasinf-mingw.adb: Minor header fix
1396 * a-clrefi.adb: Minor reformatting
1397 * g-sttsne.ads: Minor documentation improvement
1398 * g-sttsne-locking.ads: Minor documentation improvement
1399 * g-soliop-solaris.ads: Minor documentation improvement
1400 * g-soliop-mingw.ads: Minor documentation improvement
1401 * g-soliop.ads: Minor documentation improvement
1402 * exp_aggr.ads: Minor reformatting
1403 * debug.adb: Add documentation for the gprbuild debug flags
1404 * exp_ch2.adb: Use Nkind_In to simplify code throughout
1405 * exp_pakd.adb: Minor reformatting
1406
1407 * g-altive.ads, g-alleve.adb: Remove assertions.
1408 Add comment about minor differences between targets regarding
1409 floating-point operations.
1410
1411 * g-thread.adb: Remove pragma unreferenced.
1412 * lib.ads: Minor reformatting
1413 * par-ch9.adb: Minor reformatting of error messages
1414 * sem_case.adb: Minor reformatting
1415 * s-fileio.adb: Minor reformattinng
1416 * s-vmexta.ads: Minor typo
1417 * vxaddr2line.adb:
1418 Take into account 'Success' value as per new GNAT warning.
1419
14202007-12-13 Vincent Celier <celier@adacore.com>
1421
1422 * a-direct.adb (Create_Path): Always take '/' as a directory separator,
1423 even on Windows
1424
14252007-12-13 Robert Dewar <dewar@adacore.com>
1426 Bob Duff <duff@adacore.com>
1427
1428 * gnat_ugn.texi: Dcoument new rules for style check comment alignment
1429 Document that suffixes may be terminations of each others
1430 Add doc for -gnatw.a and -gnatw.A
1431 Document gnatbind -Wx switch
1432 Document BOM recognition
1433 Document pragma Implemented_By_Entry.
1434 Document new units.
1435
1436 * gnat_rm.texi: (Favor_Top_Level): Document new pragma.
1437 Add doc for pragma Unreferenced suppressing no entities referenced msg
1438 Add documentation of GNAT.Directory_Operations.Iteration
1439 Add documentation of GNAT.Random_Numbers
1440 Add documentation for pragma Shared.
1441 Correct documentation for Bit_Order
1442 Add documentation for the Pool_Address attribute.
1443 Fix and improve documentation of pragma machine_attribute.
1444 New pragma Fast_Math
1445 Document BOM recognition
1446
1447 * vms_data.ads: Add entries for -gnatw.a -gnatw.A
1448 Add /Wide_Character_Encoding for binder
1449 Add qualifier for the new gnatpp option --no-separate-loop-then
1450
14512007-12-13 Matthew Heaney <heaney@adacore.com>
1452
1453 * a-cohase.ads, a-cihama.ads, a-cihase.ads, a-cohama.ads: Document
1454 which generic formal operations are called for each operation.
1455
14562007-12-13 Olivier Hainque <hainque@adacore.com>
1457
1458 * tb-gcc.c (uw_data_t, trace_callback): Only define if not GCC-SJLJ eh.
1459 (__gnat_backtrace): Early return 0 if using GCC-SJLJ eh.
1460
14612007-12-13 Emmanuel Briot <briot@adacore.com>
1462
1463 * s-os_lib.ads, s-os_lib.adb (Normalize_Pathname): Do not compute
1464 Reference_Dir unless we actually need it.
1465
14662007-12-13 Vasiliy Fofanov <fofanov@adacore.com>
1467 Tristan Gingold <gingold@adacore.com>
1468
1469 * g-socthi-vms.ads (Fd_Set_Access): make it 32-bit.
1470
1471 * s-osprim-vms.adb,
1472 a-calend-vms.adb: Remove pragma warning off and add pragma
1473 unreferenced.
1474
14752007-12-13 Robert Dewar <dewar@adacore.com>
1476
1477 * impunit.adb: Add entries for missing units
1478
1479 * Makefile.rtl: Add new run-time units.
1480
1481 * Make-lang.in: Update dependencies.
1482
14832007-12-13 Bob Duff <duff@adacore.com>
1484
1485 * itypes.ads, itypes.adb (Create_Itype): For access-to-subprogram
1486 types, set Can_Use_Internal_Rep appropriately, based on
1487 Always_Compatible_Rep_On_Target.
1488
14892007-12-13 Gary Dismukes <dismukes@adacore.com>
1490 Arnaud Charlet <charlet@adacore.com>
1491
1492 * make.adb (Scan_Make_Arg): Add test for -aamp_target switch, passing
1493 it to the front end and setting the aamp_target environment variable
1494 to the switch's argument to ensure that gnaampbind and gnaamplink will
1495 take the specified library into account.
1496 (Make): Only set Check_Object_Consistency to False for JVM, not for CIL
1497 target, since the CIL compiler supports an "object" file (.il files).
1498
14992007-12-13 Vincent Celier <celier@adacore.com>
1500
1501 * symbols-processing-vms-ia64.adb (Process.Skip_Half): New procedure
1502 (Process.H): Remove variable. Replace Read_Half (H) with Skip_Half.
1503
15042007-12-13 Geert Bosch <bosch@adacore.com>
1505
1506 * s-parame-vxworks.adb:
1507 Update comments to reflect usage of this package by Nucleus.
1508
15092007-12-13 Arnaud Charlet <charlet@adacore.com>
1510
1511 * i-vxwork.ads: Kill new warning on Convention C, since changing the
1512 spec would break code.
1513
1514 * i-forbla-unimplemented.ads, vx_stack_info.c: New files.
1515
1516 * system-vxworks-alpha.ads: Removed.
1517
e74a122e
EB
15182007-12-10 Eric Botcazou <ebotcazou@adacore.com>
1519
1520 * ada-tree.h (TYPE_RETURNS_BY_TARGET_PTR_P): Move around.
1521
5320014a
ST
15222007-12-09 Samuel Tardieu <sam@rfc1149.net>
1523
1524 PR ada/34366
1525 * sem_ch3.adb (Designates_T): New function.
1526 (Mentions_T): Factor reusable part of the logic into Designates_T.
1527 Consider non-access parameters and access and non-access result.
1528 (Check_Anonymous_Access_Components): Set ekind of anonymous access to
1529 E_Subprogram_Type to E_Anonymous_Access_Subprogram_Type.
1530
1531 * einfo.ads: Update comment for E_Anonymous_Access_Subprogram_Type.
1532
da746f77
LB
15332007-12-07 Ludovic Brenta <ludovic@ludovic-brenta.org>
1534
9d651736 1535 PR ada/34361
da746f77
LB
1536 * mlib-tgt.adb, mlib-tgt.ads: Fix comments at the top to reflect
1537 the new implementation of target-specific calls.
1538
ebe0660b
OH
15392007-12-07 Olivier Hainque <hainque@adacore.com>
1540
1541 * decl.c (gnat_to_gnu_entity) <case E_Access_Type>: When computing
1542 the designated full view, only follow a second level Full_View link
1543 for Non_Limited_Views of from_limited_with references.
1544
2eb160f2
ST
15452007-12-07 Samuel Tardieu <sam@rfc1149.net>
1546
1547 PR ada/15805
1548 * sem_ch6.adb (Process_Formals): Prevent an access type formal
1549 to be initialized with an access to constant object.
1550
9cc11b58
ST
1551 * sem_ch3.adb (Analyze_Object_Declaration): Signal an error
1552 when an access to constant is used to initialize an access
1553 value.
1554
72f69ddf
ST
1555 PR ada/21346
1556 * a-direct.adb (Compose): Containing_Directory can be an empty string.
1557
5a2fe31a
OH
15582007-12-07 Olivier Hainque <hainque@adacore.com>
1559
1560 PR ada/34173
1561 * decl.c (gnat_to_gnu_entity) <case E_Array_Type>: When setting
1562 the alignment on the GCC XUA array type, set TYPE_USER_ALIGN if
1563 this is from an alignment clause on the GNAT entity.
1564 * utils.c (create_field_decl): Rewrite the computation of DECL_ALIGN
1565 to distinguish the case where we set it from the type's alignment.
1566 When so, propagate TYPE_USER_ALIGN into DECL_USER_ALIGN to indicate
1567 whether this alignment was set from an explicit alignment clause.
1568
4039fb35
EB
15692007-12-06 Eric Botcazou <ebotcazou@adacore.com>
1570
1571 * decl.c (make_packable_type): Revert last change.
1572 (gnat_to_gnu_field): Avoid setting size and position multiple times.
1573 * utils.c (finish_record_type): Retrieve the real name of the type.
1574
0ec479dc
EB
15752007-12-05 Eric Botcazou <ebotcazou@adacore.com>
1576
1577 * trans.c (lvalue_required_p): Take base node directly instead
1578 of its parent. Rename second parameter to 'gnu_type'.
1579 <N_Indexed_Component>: Return 0 if the node isn't the prefix.
1580 <N_Slice>: Likewise.
1581 (Identifier_to_gnu): Rename parent_requires_lvalue to require_lvalue.
1582 Adjust calls to lvalue_required_p.
1583
07c7262e
ST
15842007-12-05 Samuel Tardieu <sam@rfc1149.net>
1585
1586 PR ada/21489
1587 * exp_ch9.adb (Build_Simple_Entry_Call): Initialize OUT access type
1588 parameters of an entry call.
1589
403fd939
RD
15902007-12-03 Robert Dewar <dewar@adacore.com>
1591 Samuel Tardieu <sam@rfc1149.net>
1592
1593 PR ada/34287
1594 * sem_util.adb (Safe_To_Capture_Value): Do not capture values
1595 of variables declared in a library-level package.
1596
0bcb4d2a
ST
15972007-12-02 Samuel Tardieu <sam@rfc1149.net>
1598
1599 * clean.adb (Clean_Library_Directory): Use Empty_String'Access intead
1600 of Empty_String'Unchecked_Access.
1601
dd9c642a
ST
1602 * Makefile.in: Add support for sh4-linux.
1603
1604 * system-linux-sh4.ads: New file.
1605
35330114
KB
16062007-12-01 Kostik Belousov <kostikbel@ukr.net>
1607
1608 PR ada/33722
1609 * env.c (__gnat_setenv): FreeBSD 7 has a POSIX conformant putenv()
1610 and its argument must not be free()ed.
1611
a6dcb051
EB
16122007-11-29 Eric Botcazou <ebotcazou@adacore.com>
1613
1614 * decl.c (make_packable_type): Retrieve the real name of the type.
1615 (maybe_pad_type): Simplify similar code.
1616
39a97416
ST
16172007-11-28 Samuel Tardieu <sam@rfc1149.net>
1618
a6968b8b 1619 PR ada/15804
39a97416
ST
1620 * par-ch3.adb (P_Variant_Part): Signal an error when anything other
1621 than an identifier is used after "case" in a variant_part.
1622
b99dfeb3 1623 PR ada/17318
9c5a3a8d
ST
1624 * par-ch4.adb (Is_Parameterless_Attribute): New map.
1625 (P_Name, Scan_Apostrophe block): Parse left parenthesis following
1626 attribute name or not depending on the new map.
1627
1628 * sem-attr.adb (Analyze_Attribute): Parameterless attributes
1629 returning a string or a type will not be called with improper
1630 arguments.
1631
1632 * sem-attr.ads (Attribute_Class_Array): Move to snames.ads.
1633
1634 * snames.ads (Attribute_Class_Array): Moved from sem-attr.ads.
1635
5a218498
ST
1636 PR ada/32792
1637 * sem_attr.adb (Analyze_Attribute, Attribute_Integer_Value clause):
1638 Signal an error when attribute argument is a fixed-point value of
1639 an unknown type.
1640
7bde4677
ST
1641 PR ada/22559
1642 * sem_ch3.adb (Build_Derived_Numeric_Type): Do not set RM_Size on
1643 a derived ordinary fixed point type.
1644
1645 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Recompute
1646 RM_Size when a Small clause is found.
1647
182e0d71
AK
16482007-11-26 Andreas Krebbel <krebbel1@de.ibm.com>
1649
1650 PR 34081/C++
1651 * trans.c (Subprogram_Body_to_gnu, Compilation_Unit_to_gnu):
1652 Pass 'false' for the new allocate_struct_function parameter.
1653 * utils.c (build_function_stub): Likewise.
1654
87caf699
RG
16552007-11-25 Richard Guenther <rguenther@suse.de>
1656
4039fb35 1657 * utils.c (gnat_pushlevel): Use BLOCK_CHAIN.
87caf699
RG
1658 (gnat_poplevel): Likewise.
1659
f1c8c7ee
EB
16602007-11-25 Eric Botcazou <ebotcazou@adacore.com>
1661
1662 * decl.c (gnat_to_gnu_entity) <E_Record_Type>: If the type has
1663 strict alignment, no alignment clause and a known static size, cap
1664 the type alignment to the greatest power of 2 factor of the size.
1665 (gnat_to_gnu_field): If the field has a component clause, is aliased
1666 or of a type with strict alignment, require that its size be equal to
1667 that of the type.
1668 (validate_size): Use the type size as the minimum size for a type with
1669 strict alignment.
1670
bb1f5840
ST
16712007-11-23 Samuel Tardieu <sam@rfc1149.net>
1672
1673 * s-inmaop-posix.adb, s-intman-vxworks.adb, s-taprop-hpux-dce.adb,
1674 s-taprop-irix.adb, s-taprop-linux.adb, s-taprop-lynxos.adb,
1675 s-taprop-posix.adb, s-taprop-tru64.adb, s-taprop-vxworks.adb:
1676 Use 'Access instead of 'Unchecked_Access in second and third
1677 arguments of pthread_sigmask.
1678
5102fac5
EB
16792007-11-23 Eric Botcazou <ebotcazou@adacore.com>
1680
1681 * decl.c (ceil_alignment): New function.
1682 (gnat_to_gnu_entity): Use it to set the alignment on atomic types.
1683 (make_packable_type): Likewise.
1684
1fa4dfc6
OH
16852007-11-22 Olivier Hainque <hainque@adacore.com>
1686
1687 * trans.c (gnat_to_gnu) <case N_Free_Statement>: Reformat lines
1688 to fit in 80 columns.
1689
5f45b299
AJ
16902007-11-21 Aurelien Jarno <aurelien@aurel32.net>
1691
1692 * s-osinte-kfreebsd-gnu.ads (To_Target_Priority): New function.
1693 * Makefile.in: Add EH_MECHANISM=-gcc to kfreebsd-gnu. Remove SYMLIB.
1694
7634135a
EB
16952007-11-19 Eric Botcazou <ebotcazou@adacore.com>
1696
1697 PR ada/34098
1698 * misc.c (gnat_adjust_rli): Delete.
1699 (gnat_init): Do not initialize the translation code here.
1700 Do not call set_lang_adjust_rli.
1701 * trans.c (init_code_table): Make static.
1702 (gnat_init_stmt_group): Delete.
1703 (gigi): Initialize the translation code entirely here.
1704 Emit debug info for the common types here instead of...
1705 * utils.c (gnat_init_decl_processing): ...here.
1706 * gigi.h (init_code_table): Delete.
1707 (gnat_init_stmt_group): Likewise.
1708
b2c3bcf4
OH
17092007-11-16 Olivier Hainque <hainque@adacore.com>
1710
1711 * utils2.c (build_call_alloc_dealloc) <if gnu_obj>: Move the code
1712 retrieving an allocator return value from a super-aligned address from
1713 here to ...
1714 * trans.c (gnat_to_gnu) <case N_Free_Statement>: ... here, and don't
1715 expect a super-aligned address for a fat or thin pointer.
1716
a01e283f
EB
17172007-11-14 Eric Botcazou <ebotcazou@adacore.com>
1718
1719 * trans.c (call_to_gnu): Always set the source location on the call
1720 expression. If the function returns-by-target, also set it on the
1721 address expression.
1722
713c3145
ST
17232007-11-14 Samuel Tardieu <sam@rfc1149.net>
1724
356d8961 1725 * adaint.c, init.c, initialize.c, link.c: Remove system-specific
713c3145
ST
1726 sections of non-supported Interix target.
1727
1728 * s-osinte-interix.ads: Removed.
1729
1e992e16
ST
1730 * i-cstrin.ads (chars_ptr): Make it a C convention type.
1731
0e506c4b
ST
17322007-11-13 Samuel Tardieu <sam@rfc1149.net>
1733
1734 * a-tasatt.adb: Add a comment at the beginning of the package
1735 explaining why in general 'Unchecked_Access must be used instead
1736 of 'Access.
1737
66beb09b
ST
1738 * sem_prag.adb (Process_Convention): Move the test for the
1739 entity on which the Convention pragma applies down to also
1740 forbid pragma Convention on enumeration literals reached
1741 through renamings.
1742
14678e46
ST
17432007-11-10 Samuel Tardieu <sam@rfc1149.net>
1744
1745 * a-tasatt.adb: Revert previous change for this file as it will
1746 generate an error when this package is instantiated from a
1747 local context.
1748
f9d806de
ST
17492007-11-07 Samuel Tardieu <sam@rfc1149.net>
1750
1751 * a-tasatt.adb: Type Wrapper should be declared in comment instead
1752 of already declared type Node_Access.
dcbd752d
ST
1753 Use 'Access instead of 'Unchecked_Access when applicable. Local
1754 lifetime is the one of the package.
1755 (Set_Value): W is allocated on the heap.
1756
1757 * g-socket.adb: Use 'Access instead of 'Unchecked_Access when
1758 applicable.
1759 (Get_Socket_Option): Optlen formal of C_Getsockopt is of an anonymous
1760 access type.
1761 (Receive_Socket): Fromlen formal of C_Recvfrom is of an anonymous
1762 access type.
1763
1764 * s-taasde.adb: Use 'Access instead of 'Unchecked_Access when
1765 applicable.
1766 (elaboration code): Timer_Queue lifetime is the one of the
1767 package.
f9d806de 1768
bc01690e
ST
1769 * tracebak.c (i386 alternative): Remove useless comparaison
1770 which is always false; LOWEST_ADDRESS is 0 and is never greater
1771 than an unsigned integer.
1772
d9c1dc68
ST
1773 * sem_attr.adb (Analyze_Attribute): Remove duplicate identical
1774 embedded check for "Ada_Version >= Ada_05".
1775
cb88a3ea
OH
17762007-11-07 Olivier Hainque <hainque@adacore.com>
1777
1778 * decl.c (make_aligning_type): Set the mode of the RECORD_TYPE we
1779 craft and expand comment.
1780
233a722b
EB
17812007-11-01 Eric Botcazou <ebotcazou@adacore.com>
1782
1783 * lang-specs.h: Move translation of -fRTS= after -gnatez switch.
1784
6d1e8bff
EB
17852007-10-23 Eric Botcazou <ebotcazou@adacore.com>
1786
1787 * misc.c (gnat_handle_option): Replace call to abort with
1788 call to gcc_unreachable.
1789 (gnat_init): Likewise.
1790 (gnat_expand_expr): Likewise.
1791 (fp_prec_to_size): Likewise.
1792 (fp_size_to_prec): Likewise.
1793
262e7125
RG
17942007-10-23 Richard Guenther <rguenther@suse.de>
1795
1796 PR bootstrap/33608
1797 * tracebak.c: #undef abort after including system.h.
1798
c8f499a9
DS
17992007-10-20 Danny Smith <dannysmith@users.sourceforge.net>
1800
1801 * Makefile.in (LIBGNAT_TARGET_PAIRS) Add s-tasinf-mingw.adb,
1802 s-tasinf-mingw.ads, a-exetim-mingw.adb, a-exetim-mingw.ads
1803 for win32 targets.
1804 (EXTRA_GNATRTL_TASKING_OBJS): Add a-exetim.o for win32 targets.
1805
f0e1e807
AC
18062007-10-15 Eric Botcazou <ebotcazou@adacore.com>
1807
1808 * s-osinte-tru64.adb: (Hide_Yellow_Zone): Add On parameter.
1809 Set the protection status of the guard page based on the value of On.
1810
1811 * s-osinte-tru64.ads: (Hide_Yellow_Zone): Add On parameter.
1812
1813 * s-taprop-tru64.adb: (Enter_Task): Pass True to Hide_Yellow_Zone.
1814 (Exit_Task): Pass False to Hide_Yellow_Zone.
1815
18162007-10-15 Robert Dewar <dewar@adacore.com>
1817
1818 * s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
1819 s-taprop-vxworks.adb, s-taprop-posix.adb, a-calend-vms.adb,
1820 a-calend.adb, a-nuflra.adb, a-tigeau.adb, a-wtgeau.adb,
1821 checks.adb, bindgen.adb, eval_fat.adb, exp_fixd.adb, fmap.adb,
1822 freeze.adb, g-awk.adb, g-calend.adb, g-diopit.adb, g-expect.adb,
1823 gnatchop.adb, gnatlink.adb, g-spipat.adb, g-thread.adb, make.adb,
1824 mdll.adb, mlib.adb, mlib-prj.adb, osint.adb, par-ch3.adb, prj.adb,
1825 prj-makr.adb, sem_prag.adb, sem_type.adb, s-fatgen.adb, s-fileio.adb,
1826 sinfo.ads, sinput-d.adb, s-taasde.adb, s-tasdeb.ads, s-tasren.adb,
1827 s-tassta.adb, s-tpobop.adb, s-tposen.adb, stylesw.adb, types.ads,
1828 uintp.adb, validsw.adb, makegpr.adb, a-rbtgso.adb, a-crbtgo.adb,
1829 a-coorse.adb, a-convec.adb, a-coinve.adb, a-cohama.adb, a-ciorse.adb,
1830 a-cihama.adb, a-cidlli.adb, a-chtgop.adb, a-cdlili.adb, a-cdlili.adb,
1831 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cohase.adb, a-ciorma.adb,
1832 a-coorma.adb, a-ztgeau.adb, symbols-vms.adb, a-crdlli.adb,
1833 a-calari.adb, a-calfor.adb, s-os_lib.adb, s-regpat.adb, a-ngrear.adb:
1834 Minor reformatting.
1835 Add Unreferenced and Warnings (Off) pragmas for cases of
1836 variables modified calls where they are IN OUT or OUT parameters and
1837 the resulting values are not subsequently referenced. In a few cases,
1838 we also remove redundant code found by the new warnings.
1839
1840 * ug_words, vms_data.ads, usage.adb, sem_util.adb, sem_util.ads,
1841 sem_warn.adb, sem_warn.ads, sem_res.adb, sem_ch7.adb, sem_ch8.adb,
1842 sem_ch5.adb, opt.ads, lib-xref.adb, lib-xref.ads, exp_smem.adb,
1843 sem_ch11.adb, exp_ch6.adb, einfo.ads, einfo.adb: implement a new
1844 warning controlled by -gnatw.o that warns on cases of out parameter
1845 values being ignored.
1846
18472007-10-15 Geert Bosch <bosch@adacore.com>
1848
1849 * adaint.c, socket.c, cal.c: Initial port to arm-mentor-nucleus.
1850
1851 * expect.c: Initial port to arm-mentor-nucleus.
1852 Use kill for __gnat_kill() on VMS.
1853
18542007-10-15 Emmanuel Briot <briot@adacore.com>
1855
1856 * ali.ads, ali.adb (Scan_ALI): Initialize XE.Tref to a known default
1857 value.
1858 (Xref_Record): Change type for Line, since in the case of a reference to
1859 a predefined entity (as happens for array index types), the line is set
1860 to 0.
1861 Add support for parsing multiple array index types info, or
1862 multiple inherited interfaces info. This information cannot be stored
1863 in Xref_Entity_Record, which only supports a single instance of Tref_*,
1864 and is therefore stored in the list of references instead. It has a
1865 special treatement later on in tools that use this information.
1866
18672007-10-15 Tristan Gingold <gingold@adacore.com>
1868
1869 * debug.adb: Document use of -gnatd.a and -gnatd.I
1870
1871 * layout.adb: On OpenVMS -gnatd.a disables alignment optimization.
1872
18732007-10-15 Javier Miranda <miranda@adacore.com>
1874
1875 * exp_attr.adb (Expand_N_Attribute_Reference): Case Access,
1876 Unchecked_Access, and Unrestricted_Access. Cleanup code that takes
1877 care of access to class-wide interface types plus removal of bizarre
1878 conversion of tagged object to access type (reported by Gary
1879 Dismukes). After this patch there is no need to perform any
1880 additional management on these nodes in Expand_Interface_Actuals.
1881
1882 * exp_disp.adb (Expand_Interface_Actuals): Code cleanup. Remove code
1883 that handles use of 'Access and 'Unchecked_Access applied to
1884 actuals covering interface types. Such code is now
1885 centralized in Expand_N_Attribute_Reference.
1886
18872007-10-15 Ed Schonberg <schonberg@adacore.com>
1888
1889 * exp_ch3.adb (Build_Init_Procedure): Keep separate the initialization
1890 of tagged types whose ultimate ancestor is a CPP type.
1891 (Freeze_Array_Type): For a packed array type, generate an initialization
1892 procedure if the type is public, to handle properly a client that
1893 specifies Normalize_Scalars.
1894
18952007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
1896
1897 * exp_ch9.adb (Actual_Index_Expression): When the expansion occurs
1898 inside a generic body, retrieve the full view of the entry family
1899 discrete subtype if available.
1900
19012007-10-15 Thomas Quinot <quinot@adacore.com>
1902
1903 * exp_dist.adb (Add_RACW_Primitive_Declarations_And_Bodies): Do not
1904 attempt to generate stubs for hidden primitive operations.
1905
19062007-10-15 Vincent Celier <celier@adacore.com>
1907
1908 * mlib-tgt-specific.adb (Support_For_Libraries): New function,
1909 returning None, used when there is no platform specific body for
1910 MLib.Tgt.Specific.
1911
19122007-10-15 Bob Duff <duff@adacore.com>
1913
1914 * sem_case.adb, sem_ch13.adb, lib-sort.adb: Replace use of Heap_Sort_A
1915 (passing'Unrestricted_Access of nested subprograms to Sort) with use of
1916 the generic Heap_Sort_G, in order to avoid trampolines.
1917
19182007-10-15 Vasiliy Fofanov <fofanov@adacore.com>
1919 Jose Ruiz <ruiz@adacore.com>
1920
1921 * vx_stack_info.c: New file.
1922
1923 * i-forbla-unimplemented.ads: New file.
1924
1925 * Makefile.in: i-forbla-unimplemented.ads: a variant of i-forbla.ads
1926 for unsupported configurations; use it on VMS targets instead of the
1927 real one.
1928 (EXTRA_LIBGNAT_SRCS,EXTRA_LIBGNAT_OBJS for VxWorks): Include
1929 vx_stack_info.{c,o} that contains the routine __gnat_get_stack_info
1930 used by VxWorks targets to have access to task-specific data and be
1931 able to extract the stack boundaries for stack checking.
1932 Use system-vms-ia64.ads on ivms.
1933
1934 * Make-lang.in: Update dependencies.
1935
1936 * sysdep.c (__gnat_get_stack_info): Move to a standalone file
1937 (vx_stack_info.c).
1938
19392007-10-15 Vincent Celier <celier@adacore.com>
1940
1941 * snames.adb, snames.ads: Add new standard name runtime_library_dir
1942
1943 * prj.ads (Language_Config): Add new component Runtime_Library_Dir
1944
1945 * prj-attr.adb: Add project level attribute Runtime_Library_Dir
1946
1947 * prj-env.adb (Create_Mapping_File): Do not put an entry if the path of
1948 the source is unknown.
1949
1950 * prj-ext.adb: Spelling error fix
1951
1952 * prj-nmsc.adb (Check_Ada_Name): Reject any unit that includes an Ada
1953 95 reserved word in its name.
1954 (Process_Project_Level_Array_Attributes): Process new attribute
1955 Runtime_Library_Dir.
1956
1957 * prj-part.adb (Parse_Single_Project): Do not check the name of the
1958 config project against the user project names.
1959
1960 * prj-proc.adb (Expression): In multi-language mode, indexes that do
1961 not include a dot are always case insensitive.
1962 (Process_Declarative_Items): Ditto
1963 (Process_Project_Tree_Phase_1): Set Success to False in case an error is
1964 detected.
1965
1966 * prj-util.adb (Value_Of (In_Array)): When Force_Lower_Case_Index is
1967 True, compare both indexes in lower case.
1968
19692007-10-15 Robert Dewar <dewar@adacore.com>
1970
1971 * rtsfind.adb: (Load_RTU): Turn off style checks for Load call
1972
19732007-10-15 Gary Dismukes <dismukes@adacore.com>
1974
1975 * sem_aggr.adb (Resolve_Record_Aggregate): In the case of a box
1976 association for an access component, add an association with null as
1977 the expression. Remove testing for array subtypes and the setting in
1978 that case of Ctyp to the array component type, which prevented proper
1979 inclusion of an association for null-initialized arrays. Collapse
1980 condition that tests for array subtypes into just a test of
1981 Is_Partially_Initialized_Type (which already covers arrays anyway).
1982
19832007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
1984
1985 * sem_ch12.adb: Minor code reformatting.
1986 (Check_Generic_Child_Unit): Iterate over the homonym chain in order to
1987 find the parent package which may have been hidden by local
1988 declarations.
1989
19902007-10-15 Gary Dismukes <dismukes@adacore.com>
1991
1992 * sem_ch3.adb (Build_Derived_Concurrent_Type): Set the Is_Constrained
1993 flag of derived concurrent types, taking into account the flag setting
1994 on the parent subtype and any new set of discriminants.
1995
19962007-10-15 Hristian Kirtchev <kirtchev@adacore.com>
1997
1998 * sem_ch4.adb: Minor code and comment reformatting.
1999 (Analyze_Allocator): When the designated type of an unconstrained
2000 allocator is a record with unknown discriminants or an array with
2001 unknown range bounds, emit a detailed error message depending on the
2002 compilation mode and whether the designated type is limited.
2003
20042007-10-15 Tristan Gingold <gingold@adacore.com>
2005
2006 * system-vms-ia64.ads: New file.
2007
2008 * system-vms_64.ads: Minor comment fix.
2009
20102007-10-15 Ed Schonberg <schonberg@adacore.com>
2011
2012 * sem_ch6.adb (Find_Corresponding_Spec): If the previous entity is a
2013 body generated for a function with a controlling result that is a null
2014 extension, discard the generated body in favor of the current explicit
2015 one.
2016
20172007-10-15 Ed Schonberg <schonberg@adacore.com>
2018
2019 * sem_disp.adb (Find_Controlling_Arg): Examine the call node before
2020 examining its original form, to handle properly operator calls that
2021 have been rewritten.
2022
20232007-10-15 Olivier Hainque <hainque@adacore.com>
2024
2025 * tb-alvms.c (tb_entry_t, __gnat_backtrace): Store a frame pointer
2026 instead of a procedure value in each traceback entry.
2027
2028 * g-trasym-vms-alpha.adb (Symbolic_Traceback): Pass frame pointer
2029 instead of procedure value to TBK$SYMBOLIZE.
2030
2031 * s-traent-vms.adb (PV_For): Rename as FP_For and access the proper
2032 field.
2033 (TB_Entry_For): Account for the PV/FP renaming.
2034
2035 * s-traent-vms.ads (Traceback_Entry): Rename PV component into FP and
2036 add comment.
2037 (Null_TB_Entry): Account for change of component name.
2038 (PV_For): Rename as FP_For.
2039
20402007-10-15 Tristan Gingold <gingold@adacore.com>
2041
2042 * trans.c (gnat_to_gnu): Remove the padding structure more often.
2043 This optimize assignment to over-aligned record.
2044
20452007-10-15 Emmanuel Briot <briot@adacore.com>
2046
2047 * xref_lib.adb (Get_Full_Type): Add support for the 'h' entity type, ie
2048 interfaces.
2049
2050 * xr_tabls.adb (Add_Reference): Add support for the new 'R' reference
2051 type, for dispatching calls.
2052
20532007-10-15 Vincent Celier <celier@adacore.com>
2054 Robert Dewar <dewar@adacore.com>
2055
2056 * gnat_ugn.texi: Add documentation for switches --version and --help
2057 for the GNAT tools gnatbind, gnatlink, gnatmake, gnatchop, gnatname,
2058 gnatxref, gnatfind, gnatls, and gnatclean.
2059 Document -gnatw.o.
2060 Mention attribute Excluded_Source_Dirs
2061 Replace obsolescent attribute Locally_Removed_Files with attribute
2062 Excluded_Source_Files.
2063 Improve documentation of -u (gnatbind)
2064 Document how to do reliable stack checking for the environmental task
2065 on iVMS.
2066
2067 * gnat_rm.texi: Rewrite section about No_Implicit_Dynamic_Code.
2068 Document attribute Excluded_Source_Files and indicate that attribute
2069 Locally_Removed_Files is obsolescent.
2070
20712007-10-15 Thomas Quinot <quinot@adacore.com>
2072
2073 * g-soccon-vms.ads: Fix value of MSG_WAITALL.
2074
2075 * gen-soccon.c:
2076 Update documentation to note that OpenVMS 8.3 or later must be used
2077 to generate g-soccon-vms.ads.
2078
2079 * atree.adb: Add ??? comment
2080
2081 * exp_util.adb: Minor reformatting.
2082 Add ??? comment in Kill_Dead_Code.
2083
20842007-10-15 Robert Dewar <dewar@adacore.com>
2085
2086 * errout.ads: Comment clarification
2087
2088 * exp_ch4.adb (Expand_N_Allocator): Code cleanup.
2089 (Expand_N_Op_Eq): Improve handling of array equality with -gnatVa
2090
2091 * lib.ads: Comment update
2092
2093 * init.c: Minor reformatting.
2094
2095 * sem_attr.adb: Minor formatting
2096
2097 * osint-b.ads: Minor reformatting
2098
2099 * sem_ch9.adb: Implement -gnatd.I switch
2100
2101 * g-comlin.adb: (Start): Fix handling of empty command line.
2102
2103 * gnatcmd.adb (GNATCmd): Do not put the -rules in the -cargs section,
2104 even when -rules follows the -cargs section.
2105
6524147c
OW
21062007-10-08 Ollie Wild <aaw@google.com>
2107
2108 * misc.c (LANG_HOOKS_PUSHDECL): Replaced lhd_return_tree with
2109 gnat_return_tree.
2110 (gnat_init_gcc_eh): Replaced gnat_eh_runtime_type with
2111 gnat_return_tree.
2112 (gnat_eh_runtime_type): Removed.
2113 (gnat_return_tree): New function.
2114
dff6abb2
BE
21152007-10-08 Ben Elliston <bje@au.ibm.com>
2116
2117 PR ada/33454
2118 Revert:
2119 2007-08-31 Ben Elliston <bje@au.ibm.com>
2120
2121 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
2122 when compiling for powerpc64-*-linux.
2123 * system-linux-ppc64.ads: New file.
2124
c3048783
EB
21252007-09-27 Eric Botcazou <ebotcazou@adacore.com>
2126
2127 Mapped location support
2128 * back_end.adb (Call_Back_End): Pass information about source
2129 files instead of units to gigi.
2130 * gigi.h (struct File_Info_Type): New.
2131 (gigi): Rename and change type of number_units parameter, change
2132 type of file_info_ptr parameter.
2133 * trans.c (number_files): New global variable.
2134 (gigi): Rename and change type of number_units parameter, change
2135 type of file_info_ptr parameter.
2136 If mapped location support is enabled, create the isomorphic mapping
2137 between source files and line maps.
2138 (Sloc_to_locus): If mapped location support is enabled, translate
2139 source location into mapped location.
2140 (annotate_with_node): Rename into set_expr_location_from_node.
2141 Call set_expr_location instead of annotate_with_locus.
2142 (Pragma_to_gnu): Adjust for above change.
2143 (Loop_Statement_to_gnu): Likewise.
2144 (call_to_gnu): Likewise.
2145 (Handled_Sequence_Of_Statements_to_gnu): Likewise.
2146 (gnat_to_gnu): Likewise.
2147 (add_stmt_with_node): Likewise.
2148 (add_cleanup): Likewise.
2149 * utils.c (gnat_init_decl_processing): Do not set input_line.
2150
68b72a44
AC
21512007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
2152
2153 * sem_ch8.adb (Analyze_Use_Type): Code cleanup.
2154 (Applicable_Use): Emit a warning when a package tries to use itself.
2155 (Use_One_Type): Add variable Is_Known_Used. Emit a warning when a type
2156 is already in use or the package where it is declared is in use or is
2157 declared in the current package.
2158 (Spec_Reloaded_For_Body): New subsidiary routine for Use_One_Type.
2159
2160 * a-tasatt.adb, s-osprim-vxworks.adb, g-socthi-mingw.adb,
2161 s-intman-vms.adb, g-socket.adb, g-thread.adb, s-tarest.adb,
2162 s-tassta.adb, s-tporft.adb: Remove redundant 'use type' clause.
2163
21642007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
2165
2166 * a-calend-vms.adb, a-calend.adb:
2167 Add a section on leap seconds control along with two entities used to
2168 enable and disable leap seconds support. The array Leap_Second_Times is
2169 now constant and contains hard time values pre-generated. Remove
2170 all elaboration code used to populate the table of leap seconds.
2171
2172 * bindgen.adb:
2173 Add entity Leap_Seconds_Support to the list of global run-time variables
2174 along with a comment on its usage and values.
2175 (Gen_Adainit_Ada): Add code to generate the declaration and import of
2176 Integer variable Leap_Seconds_Support. Set its value to zero (disabled)
2177 or one (enabled) depending on the presence of binder switch "-y".
2178 (Gen_Adainit_C): Add code to generate the declaration of external int
2179 __gl_leap_seconds_support. Set is value to zero (disabled) or one
2180 (enabled) depending on the presence of binder switch "-y".
2181
2182 * init.c: Add __gl_leap_seconds_support to the list of global values
2183 computed by the binder.
2184
21852007-09-26 Jerome Guitton <guitton@adacore.com>
2186
2187 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
2188 s-taprop-hpux-dce.adb, s-taprop-linux.adb, s-taprop-dummy.adb,
2189 s-taprop-solaris.adb, s-taprop-vms.adb, s-taprop-mingw.adb,
2190 s-taprop-posix.adb (Stop_Task): New function, dummy implementation.
2191
2192 * s-taprop.ads, s-taprop-vxworks.adb (Stop_Task): New function.
2193
2194 * s-tasdeb.adb (Stop_All_Tasks): New function, implementing a run-time
2195 function which can be called by the debugger to interrupt the tasks of
2196 an Ada application asynchronously, as needed on VxWorks.
2197 (Stop_All_Tasks_Handler): Renamed from Stop_All_Tasks.
2198
2199 * s-tasdeb.ads (Stop_All_Tasks_Handler): New function declaration,
2200 renamed from Stop_All_Tasks. Update comments.
2201 (Stop_All_tasks): New function declaration.
2202
22032007-09-26 Olivier Hainque <hainque@adacore.com>
2204
2205 * adaint.c (if defined (__Lynx__)): Wrap #def/#undef VMOS_DEV around
2206 #include <utime.h> and #define GCC_RESOURCE_H before
2207 #include <sys/wait.h>.
2208 Add more protections in __gnat_translate_vms.
2209
2210 * expect.c (if defined (__Lynx__)): #define GCC_RESOURCE_H before
2211 #include <sys/wait.h>.
2212
22132007-09-26 Thomas Quinot <quinot@adacore.com>
2214 Sergey Rybin <rybin@adacore.com>
2215
2216 * gnatvsn.ads (PCS_Version_Number, ASIS_Version_Number): Removed.
2217
2218 * exp_dist.ads (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
2219 where it belongs.
2220
2221 * opt.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
2222
2223 * rtsfind.adb (PCS_Version_Number): Move from Gnatvsn to Exp_Dist,
2224 where it belongs.
2225
2226 * sem_dist.ads: Minor comment fix
2227
2228 * tree_io.ads: Move ASIS_Version_Number from Gnatvsn into Tree_IO.
2229
22302007-09-26 Javier Miranda <miranda@adacore.com>
2231 Eric Botcazou <ebotcazou@adacore.com>
2232
2233 * a-tags.adb:
2234 (Get_HT_Link/Set_HT_Link): Updated to handle the additional level of
2235 indirection added to the HT_Link component of the TSD. This is required
2236 to statically allocate the TSD.
2237
2238 * a-tags.ads:
2239 Minor reordering of the declarations in the private part. Required to
2240 add a level of indirection to the contents of the TSD component HT_Link.
2241 This is required to statically allocate the TSD.
2242
2243 * decl.c (gnat_to_gnu_entity) <object>: Do not exclude objects with
2244 Is_Statically_Allocated set from constant objects.
2245 Do not make exported constants created by the compiler volatile.
2246 (gnat_to_gnu_param): Do not treat an IN parameter whose address is taken
2247 as read-only.
2248
2249 * trans.c (Identifier_to_gnu): For constants, unshare initializers
2250 before returning them.
2251
2252 * exp_disp.ads, exp_disp.adb (Building_Static_DT): Spec moved to the
2253 public part of the package.
2254 (Make_DT): Move HT_Link component out of the TSD record. For this
2255 purpose Make_DT now declares a separate object that stores the
2256 HT_Link value, and initializes the TSD component with the address
2257 of this new object. The addition of this level of indirection is
2258 required to statically allocate the TSD because the TSD cannot
2259 have variable components.
2260 (Expand_Interface_Conversion): Improve the expanded code.
2261 (Expand_Interface_Thunk): Set Is_Thunk in the thunk entity.
2262
2263 * sem_disp.adb (Check_Dispatching_Operation): In case of a body
2264 declaring a primitive operation ---allowed by RM 3.9.2 (13.e/2)---,
2265 if we are building static dispatch tables then we must not generate
2266 extra code to register the primitive because the dispatch table will
2267 be built at the end of the library package; otherwise we notify that
2268 we cannot build the static dispatch table.
2269
22702007-09-26 Robert Dewar <dewar@adacore.com>
2271
2272 * checks.adb, gnat1drv.adb, sem_util.ads: Improve warnings for address
2273 overlays.
2274
2275 * sem_ch13.ads, sem_ch13.adb: Improve warnings for address overlays
2276 (Analyze_Record_Representation_Clause): Suppress junk warning for
2277 missing component clause.
2278 (Analyze_Attribute_Definition_Clause, case Address): Apply the special
2279 tests for controlled type overlay to composites with controlled
2280 components.
2281 (Analyze_Record_Representation_Clause): Add reference for component name
2282
22832007-09-26 Javier Miranda <miranda@adacore.com>
2284 Gary Dismukes <dismukes@adacore.com>
2285
2286 * einfo.adb (Is_Thunk): New attribute applicable to subprograms. True
2287 for thunks associated with interface types.
2288
2289 * einfo.ads: Improve documentatation of Is_Internal
2290 (Is_Thunk): New attribute applicable to subprograms. True for thunks
2291 associated with interface types.
2292 Extensive comment fixes regarding flags that appear in all entities. The
2293 documentation is now consistent for all such flags (there were a number
2294 of errors in the documentation in this regard).
2295
2296 * exp_attr.adb (Expand_N_Attribute_Reference): Minor code cleanup.
2297
2298 * exp_ch6.adb (Make_Build_In_Place_Call_*): Return immediately if any
2299 of these procedures are passed a function call that already has
2300 build-in-place actuals (testing new flag
2301 Is_Expanded_Build_In_Place_Call). Set the flag on the function call in
2302 the case where processing continues.
2303 (Expand_Call): If the call is generated from a thunk body then we
2304 propagate the extra actuals associated with the accessibility
2305 level of the access type actuals.
2306
2307 * sem_ch6.adb (Analyze_Subprogram_Body): Set the Protected_Formal field
2308 of each extra formal of a protected operation to reference the
2309 corresponding extra formal of the subprogram denoted by the
2310 operation's Protected_Body_Subprogram.
2311
2312 * sinfo.ads, sinfo.adb (Is_Expanded_Build_In_Place_Call): New flag on
2313 N_Function_Call nodes.
2314
23152007-09-26 Robert Dewar <dewar@adacore.com>
2316
2317 * exp_ch5.adb: Activate memmove type processing if debug flag d.s is set
2318
2319 * debug.adb: Add d.s flag.
2320
23212007-09-26 Gary Dismukes <dismukes@adacore.com>
2322
2323 * exp_dbug.adb (Debug_Renaming_Declaration): Set Is_Internal on the
2324 debug variable so that it won't be initialized when pragma
2325 Initialize_Scalars is in effect.
2326
23272007-09-26 Gary Dismukes <dismukes@adacore.com>
2328
2329 * freeze.adb (Freeze_Entity): Remove check for preelaborable
2330 initialization of a full view. This is moved to
2331 Analyze_Package_Specification.
2332
2333 * sem_ch7.adb (Analyze_Package_Specification): Add check for
2334 preelaborable initialization of a full view in entity loop.
2335 (Uninstall_Declarations): If entity is a use-visible compilation unit,
2336 its child units are use-visible only if they are visible child units.
2337
2338 * sem_util.adb (Is_Preelaborable_Expression): New function to determine
2339 whether an expression can be used within a type declaration that
2340 requires preelaborable init.
2341 (Check_Components): Replace inline code that does partial checking for
2342 preelaborable default expressions with call to
2343 Is_Preelaborable_Expression.
2344 (Has_Preelaborable_Initialization): In the case of a generic actual
2345 subtype, (that is, Is_Generic_Actual is True), return the result of
2346 applying Has_Preelaborable_Initialization to the generic actual's base
2347 type.
2348
23492007-09-26 Hristian Kirtchev <kirtchev@adacore.com>
2350
2351 * g-calend.adb (Has_53_Weeks): Rename to Last_Year_Has_53_Weeks. Add a
2352 call to Jan_1_Day _Of_Week to optimize its performance.
2353 (Is_Leap): Move the routine to the scope of Week_In_Year.
2354 (Jan_1_Day_Of_Week): New routine in Week_In_Year which calculates the
2355 weekday on which January 1 falls of Year - 1 and Year + 1. This function
2356 avoids calling Time_Of and Split, thus making it more efficent.
2357 (Week_In_Year): Reimplemented in oder to follow ISO 8601.
2358
2359 * g-calend.ads (Week_In_Year): Change comment to reflect new
2360 implementation.
2361
23622007-09-26 Emmanuel Briot <briot@adacore.com>
2363
2364 * g-comlin.ads, g-comlin.adb (Command_Line_Configuration,
2365 Command_Line): New types
2366 (Define_Alias, Define_Prefix, Free): New subprograms. These provide
2367 support for defining how switches can be grouped on a command line (as
2368 is the case for -gnatw... for GNAT), and how simple switches can be
2369 used as aliases for more complex switches (-gnatwa is same as
2370 -gnatwbcef...)
2371 (Set_Command_Line, Add_Switch, Remove_Switch): New subprogram
2372 (Start, Current_*): New subprograms
2373 Added support for parsing an array of strings in addition to the real
2374 command line.
2375 (Opt_Parser, Opt_Parser_Data): New type. As a result, some types had to
2376 be moved from the body to the private part of the spec.
2377 (*): All subprograms now have an extra parameter with default value to
2378 specify which parser should be used. For backward compatibility, it
2379 defaults to parsing the command line of the application. They were also
2380 modified to properly handle cases where each of the argument does not
2381 start at index 1 (which is always true for Ada.Command_Line, but not
2382 when processing any Argument_List).
2383 (Free): New subprogram
2384 (Internal_Initialize_Option_Scan, Find_Longuest_Matching_Switch,
2385 Argument): New subprograms
2386 (Switch_Parameter_Type): New enum, which clarifies the code. The extra
2387 special characters like ':', '=',... are now handled in a single place,
2388 which makes the code more extensible eventually.
2389 (Getopt, Full_Switch): When the switch was returned as part of the
2390 special character '*', make sure it is prepended by the switch character
2391 ('-' in general), so that the application knows whether "foo" or "-foo"
2392 was specified on the command line.
2393
23942007-09-26 Florian Villoing <villoing@adacore.com>
2395
2396 * g-dirope.adb (Remove_Dir): In case we are removing directories
2397 recursively, make sure that if an exception is raised during the
2398 processing, the current working directory is reset to its initial
2399 value before propagating the exception.
2400
24012007-09-26 Vincent Celier <celier@adacore.com>
2402
2403 * gnatbind.adb: If there are several ALI files specified and there is
2404 a main program to bind, the first ALI is expected to contain the main
2405 subprogram and the names of the binder generated files will be derived
2406 from the first ALI file name.
2407 (Gnatbind): Fix insertion character in invocation of Error_Msg
2408
24092007-09-26 Vincent Celier <celier@adacore.com>
2410
2411 * gnatcmd.adb (Check_Files): Do not include sources that have been
2412 removed by attributes Exclude_Source_Files or Locally_Removed_Files.
2413
24142007-09-26 Ed Schonberg <schonberg@adacore.com>
2415
2416 * lib-xref.ads, lib-xref.adb: The entry for array types now carries
2417 information about each of its index types, following the type
2418 reference for its component type.
2419
24202007-09-26 Vincent Celier <celier@adacore.com>
2421
2422 * make.adb: (Kill): New procedure (__gnat_kill imported)
2423 (Running_Compile, Outstanding_Compiles): Global variables that
2424 were previously local to procedure Compile_Sources.
2425 (Sigint_Intercepted): Send signal SIGINT to all outstanding
2426 compilation processes.
2427
2428 (Gnatmake): If project files are used, create the mapping of all the
2429 sources, so that the correct paths will be found.
2430
2431 * prj-env.ads, prj-env.adb (Create_Mapping): New procedure
2432
24332007-09-26 Vincent Celier <celier@adacore.com>
2434
2435 * makeutl.ads (Main_Config_Project): Moved to gpr_util.ads
2436
2437 * prj.ads, prj.adb (Default_Language): Remove function, no longer used
2438 Replace components Compiler_Min_Options and Binder_Min_Options with
2439 Compiler_Required_Switches and Binder_Required_Switches in record
2440 Language_Config.
2441 Remove components Default_Language and Config in Project_Tree_Data,
2442 no longer used.
2443
2444 * prj-attr.adb: New attributes Required_Switches (<language>) in
2445 packages Compiler and Binder.
2446
2447 * prj-nmsc.adb: Major rewrite of the processing of configuration
2448 attributes for gprbuild. No impact on GNAT tools.
2449
2450 * prj-proc.ads, prj-proc.adb (Process_Project_Tree_Phase_2): No longer
2451 process configuration attributes: this is done in Prj.Nmsc.Check.
2452 (Recursive_Process): Make a full copy of packages inherited from project
2453 being extended, instead of a shallow copy.
2454 (Process_Project_Tree_Phase_1): New procedure
2455 (Process_Project_Tree_Phase_1): New procedure
2456 (Process): Implementation now uses the two new procedures
2457
2458 * prj-util.adb (Executable_Of): Get the suffix and the default suffix
2459 from the project config, not the tree config that no longer exists.
2460
24612007-09-26 Vincent Celier <celier@adacore.com>
2462
2463 * Make-lang.in: Update dependencies..
2464
24652007-09-26 Vincent Celier <celier@adacore.com>
2466
2467 * osint.adb, osint.ads: Minor reformatting
2468
2469 * osint-b.adb, osint-b.ads (Set_Current_File_Name_Index): New procedure
2470
24712007-09-26 Gary Dismukes <dismukes@adacore.com>
2472
2473 * par-ch4.adb (P_Record_Or_Array_Component_Association): Change Ada 95
2474 message to cite use of <> in aggregate component associations rather
2475 than wrongly indicating use of limited aggregates.
2476
24772007-09-26 Robert Dewar <dewar@adacore.com>
2478
2479 * sem_attr.adb (Analyze_Access_Attribute): Fix missing set of
2480 Address_Taken.
2481
24822007-09-26 Ed Schonberg <schonberg@adacore.com>
2483
2484 * sem_ch3.adb (Derive_Subprograms): If the interface parent is a direct
2485 ancestor of the derived type, the operations are inherited from the
2486 primary dispatch table of the parent.
2487 (OK_For_Limited_Init_In_05): Remove old comment. Reject in-place calls
2488 when the context is an explicit type conversion.
2489
24902007-09-26 Ed Schonberg <schonberg@adacore.com>
2491
2492 * sem_ch4.adb (Analyze_Qualified_Expression): Apply name resolution
2493 rule for qualified expressions properly, to detect improper conversions
2494 and resolve some cases of overloading.
2495
24962007-09-26 Ed Schonberg <schonberg@adacore.com>
2497
2498 * sem_res.adb (Resolve_Call): If the call is dispatching, generate the
2499 proper kind of reference to the primitive operation, for better source
2500 navigation.
2501 (Valid_Conversion): A tagged conversion is legal if both operands are
2502 tagged.
2503
25042007-09-26 Robert Dewar <dewar@adacore.com>
2505
2506 * sem_warn.adb (Check_References): Catch more cases of unreferenced
2507 packages.
2508
25092007-09-26 Vincent Celier <celier@adacore.com>
2510
2511 * snames.adb, snames.ads: Change Include_Option to Include_Switches
2512
25132007-09-26 Robert Dewar <dewar@adacore.com>
2514
2515 * s-wchstw.adb: provide messages for run time unit exceptions
2516
2517 * a-witeio.adb: Minor reformatting
2518
2519 * exp_ch13.adb: Minor reformatting
2520
25212007-09-26 Sergey Rybin <rybin@adacore.com>
2522
2523 * vms_data.ads: Revise gnatmetric qualifiers.
2524 Add qualified for the new gnatbind option '-y'
2525
2526 * gnat_ugn.texi: Revise the gnatmetric section.
2527 Add entry for new gnatbind option '-y'.
2528
2529 * gnat_rm.texi: Minor spelling correction.
2530 Document restriction on overlaying controlled types
2531
25322007-09-26 Vincent Celier <celier@adacore.com>
2533
2534 * makegpr.adb (Link_Executables): Do not fail when the root project has
2535 no sources, but is an extending project.
2536
0a86bcc9
EB
25372007-09-25 Eric Botcazou <ebotcazou@adacore.com>
2538
2539 * trans.c: Fix misplaced #define.
2540
b235734c
EB
25412007-09-22 Eric Botcazou <ebotcazou@adacore.com>
2542
2543 * utils2.c (build_unary_op) <ADDR_EXPR> [INDIRECT_REF]: Propagate
2544 the TYPE_REF_CAN_ALIAS_ALL flag to the result.
2545
97237784
OH
25462007-09-21 Olivier Hainque <hainque@adacore.com>
2547
2548 * utils.c (type_for_nonaliased_component_p): Return false for
2549 all AGGREGATE_TYPEs.
2550
2adde4ff
EB
25512007-09-17 Eric Botcazou <ebotcazou@adacore.com>
2552
2553 * decl.c (gnat_to_gnu_entity) <object>: Make again the type of an
2554 object covered by 13.3(19) volatile.
2555
b693daa7
EB
25562007-09-12 Eric Botcazou <ebotcazou@adacore.com>
2557
2558 PR ada/26797
2559 PR ada/32407
2560 * utils.c (unchecked_convert): Use a subtype as the intermediate type
2561 in the special VIEW_CONVERT_EXPR case.
2562
82da9a90
AC
25632007-09-12 Robert Dewar <dewar@adacore.com>
2564
2565 * types.ads, a-charac.ads, freeze.adb: Minor reformatting.
2566
2567 * a-except.adb, g-hesora.adb, g-speche.adb, lib.adb, lib.ads,
2568 lib-load.adb, lib-writ.adb, s-assert.adb, s-carun8.adb,
2569 s-casuti.adb, s-crc32.adb, s-exctab.adb, s-htable.adb, s-imgenu.adb,
2570 s-mastop.adb, s-memory.adb, s-memory.ads, s-secsta.adb, s-soflin.adb,
2571 s-sopco3.adb, s-sopco4.adb, s-sopco5.adb, s-stache.adb, s-stalib.adb,
2572 s-stoele.adb, s-strcom.adb, s-strops.adb, s-traceb.adb, s-traent.adb,
2573 s-wchcnv.adb, s-wchcon.adb, s-wchjis.adb, s-addope.adb, s-except.adb,
160c5065 2574 s-os_lib.adb, s-string.adb, s-utf_32.adb, a-elchha.adb,
82da9a90
AC
2575 a-chlat1.ads, a-elchha.ads, a-except.ads, g-hesora.ads, g-htable.ads,
2576 g-speche.ads, par-prag.adb, restrict.adb, restrict.ads, s-assert.ads,
2577 s-carun8.ads, s-casuti.ads, s-crc32.ads, sem_ch11.adb, sem_prag.adb,
2578 s-exctab.ads, s-htable.ads, s-imgenu.ads, s-mastop.ads, snames.adb,
2579 snames.ads, snames.h, s-purexc.ads, s-secsta.ads, s-soflin.ads,
2580 s-sopco3.ads, s-sopco4.ads, s-sopco5.ads, s-stache.ads, s-stalib.ads,
2581 s-stoele.ads, s-strcom.ads, s-strops.ads, s-traceb.ads, s-traent.ads,
2582 s-unstyp.ads, s-wchcnv.ads, s-wchcon.ads, s-wchjis.ads, s-addope.ads,
2583 s-except.ads, s-os_lib.ads, s-string.ads, s-utf_32.ads: Implement
2584 pragma Compiler_Unit and adds it to relevant library units.
2585
25862007-09-12 Ed Schonberg <schonberg@adacore.com>
2587
2588 * sem_aggr.adb (Resolve_Record_Aggregate): An others association with
2589 a box need not correspond to any component.
2590
25912007-09-12 Robert Dewar <dewar@adacore.com>
2592
2593 * g-thread.ads: Document use of "with GNAT.Threads" to ensure loading
2594 the tasking version of the Ada run time when foreign threads are
2595 present and there are no explicit Ada tasks or tasking constructs.
2596
2597 * gnat_rm.texi: Clarify documentation of GNAT.Threads.
2598
25992007-09-12 Hristian Kirtchev <kirtchev@adacore.com>
2600
2601 * bindusg.adb (Display): Correct comment for switch -X. Add a line for
2602 the usage of switch -y.
2603
2604 * switch-b.adb (Scan_Binder_Switches): Set flag Leap_Seconds_Support
2605 when switch -y is present.
2606
2607 * opt.ads: Add binder flag Leap_Seconds_Support used to enable/disable
2608 leap seconds in Ada.Calendar and its children.
2609
26102007-09-12 Jose Ruiz <ruiz@adacore.com>
2611
2612 * a-extiti.ads (Timer): The discriminant is a "not null access
2613 constant" in the Reference Manual.
2614 (Cancel_Handler): Cancelled is an out parameter in the Reference Manual.
2615
26162007-09-12 Robert Dewar <dewar@adacore.com>
2617
2618 * a-swuwha.adb: Remove junk RM header
2619
26202007-09-12 Vincent Celier <celier@adacore.com>
2621
2622 * g-bytswa-x86.adb (Swap2, Swap4, Swap8): Remove explicit "in" mode
2623 indicator
2624
2625 * g-bytswa.ads: Minor reformatting
2626
26272007-09-12 Thomas Quinot <quinot@adacore.com>
2628
2629 * g-soccon-solaris-64.ads, g-soccon-hpux-ia64.ads:
2630 Add new constant Thread_Blocking_IO, always True by default, set False
2631 on a per-runtime basis.
2632 (Need_Netdb_Buffer): New constant.
2633
26342007-09-12 Arnaud Charlet <charlet@adacore.com>
2635
2636 * s-dsaser.ads (Get_Local_Partition_Id, Get_Passive_Partition_Id):
2637 Added renames for corresponding functions in System.Partition_Interface.
2638
26392007-09-12 Doug Rupp <rupp@adacore.com>
2640
2641 * Makefile.in: Remove VMS specific System.CRTL packages which are no
2642 longer needed.
2643
2644 * s-crtl-vms64.ads: Removed.
2645
09528ed9
OH
26462007-09-12 Olivier Hainque <hainque@adacore.com>
2647
2648 * decl.c (gnat_to_gnu_entity) <E_Record_Subtype>: For a subtype
2649 with discriminant constraints, generalize the code for BIT_FIELDs
2650 to PACKED fields of constant size and propagate DECL_PACKED.
2651
fa89b6ec
EB
26522007-09-11 Eric Botcazou <ebotcazou@adacore.com>
2653
2654 * decl.c (array_type_has_nonaliased_component): New predicate.
2655 (gnat_to_gnu_field) <E_Array_Type>: Invoke the above predicate to
2656 set the TYPE_NONALIASED_COMPONENT flag on the type.
2657 <E_Array_Subtype>: Likewise.
2658 * gigi.h (type_for_nonaliased_component_p): Declare.
2659 * utils.c (type_for_nonaliased_component_p): New predicate.
2660 (create_field_decl): Invoke the above predicate to set the
2661 DECL_NONADDRESSABLE_P flag on the field.
2662
e18d6a15
JM
26632007-09-11 Javier Miranda <miranda@adacore.com>
2664
2665 * einfo.ads, einfo.adb (Dispatch_Table_Wrapper): New attribute. Present
2666 in library level record type entities if we are generating statically
2667 allocated dispatch tables.
2668
2669 * exp_disp.adb (Make_Tags/Make_DT): Replace previous code
2670 importing/exporting the _tag declaration by new code
2671 importing/exporting the dispatch table wrapper. This change allows us
2672 to statically allocate of the TSD.
2673 (Make_DT.Export_DT): New procedure.
2674 (Build_Static_DT): New function.
2675 (Has_DT): New function.
2676
2677 * freeze.adb (Freeze_Static_Object): Code cleanup: Do not reset flags
2678 True_Constant and Current_Value. Required to statically
2679 allocate the dispatch tables.
2680 (Check_Allocator): Make function iterative instead of recursive.
2681 Also return inner allocator node, when present, so that we do not have
2682 to look for that node again in the caller.
2683
e89d6010
JH
26842007-09-11 Jan Hubicka <jh@suse.cz>
2685
2686 * misc.c (gnat_expand_body): Kill.
2687 (LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION): Kill.
2688
281b604e
AC
26892007-09-10 Robert Dewar <dewar@adacore.com>
2690
2691 * exp_atag.ads, exp_atag.adb, mlib-tgt-tru64.adb, mlib-tgt-aix.adb,
2692 mlib-tgt-irix.adb, mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
2693 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
2694 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, ali.adb, ali.ads,
2695 ali-util.adb, ali-util.ads, atree.h, back_end.adb, back_end.ads,
2696 bcheck.adb, bcheck.ads, binde.adb, binde.ads, binderr.adb, binderr.ads,
2697 bindgen.adb, bindgen.ads, bindusg.adb, bindusg.ads, butil.adb,
2698 butil.ads, checks.adb, checks.ads, clean.adb, clean.ads, comperr.adb,
2699 comperr.ads, cstand.adb, cstand.ads, debug_a.adb, debug_a.ads,
2700 elists.h, errout.adb, erroutc.ads, errutil.adb, errutil.ads,
2701 err_vars.ads, eval_fat.adb, eval_fat.ads, exp_sel.ads, exp_sel.adb,
2702 exp_aggr.adb, exp_aggr.ads, expander.adb, expander.ads, exp_attr.ads,
2703 exp_ch10.ads, exp_ch11.adb, exp_ch12.adb, exp_ch12.ads, exp_ch13.adb,
2704 exp_ch13.ads, exp_ch2.adb, exp_ch2.ads, exp_ch3.ads, exp_ch4.adb,
2705 exp_ch4.ads, exp_ch5.adb, exp_ch5.ads, exp_ch6.adb, exp_ch6.ads,
2706 exp_ch7.adb, exp_ch7.ads, exp_ch8.adb, exp_ch8.ads, exp_ch9.adb,
2707 exp_ch9.ads, exp_code.adb, exp_code.ads, exp_dbug.adb, exp_dbug.ads,
2708 exp_disp.ads, exp_dist.adb, exp_dist.ads, exp_fixd.adb, exp_fixd.ads,
2709 exp_imgv.adb, exp_imgv.ads, exp_intr.adb, exp_intr.ads, exp_pakd.adb,
2710 exp_pakd.ads, exp_prag.adb, exp_prag.ads, exp_smem.adb, exp_strm.adb,
2711 exp_strm.ads, exp_tss.adb, exp_tss.ads, exp_util.adb, exp_util.ads,
2712 exp_vfpt.adb, exp_vfpt.ads, fmap.adb, fmap.ads, fname-sf.adb,
2713 fname-sf.ads, fname-uf.adb, fname-uf.ads, frontend.adb, frontend.ads,
2714 get_targ.adb, get_targ.ads, gnat1drv.adb, gnat1drv.ads, gnatbind.adb,
2715 gnatbind.ads, gnatbl.c, gnatchop.adb, gnatclean.adb, gnatcmd.adb,
2716 gnatcmd.ads, gnatdll.adb, gnatfind.adb, gnatkr.adb, gnatkr.ads,
2717 gnatlbr.adb, gnatlink.adb, gnatlink.ads, gnatls.adb, gnatls.ads,
2718 gnatmake.adb, gnatmake.ads, gnatmem.adb, gnatname.adb, gnatname.ads,
2719 gnatprep.adb, gnatprep.ads, gnatsym.adb, gnatxref.adb,
2720 gprep.adb, gprep.ads, hlo.adb, hlo.ads, impunit.adb, impunit.ads,
2721 inline.adb, inline.ads, itypes.adb, itypes.ads, layout.adb, layout.ads,
2722 lib-load.adb, lib-load.ads, lib-util.adb, lib-util.ads, lib-writ.adb,
2723 lib-writ.ads, lib-xref.adb, lib-xref.ads, live.adb, live.ads,
2724 make.adb, make.ads, makeutl.ads, makeutl.adb, makeusg.adb, makeusg.ads,
2725 mdll.adb, mdll.ads, mdll-fil.adb, mdll-fil.ads, mdll-utl.adb,
2726 mdll-utl.ads, memroot.adb, memroot.ads, mlib.adb, mlib.ads,
2727 mlib-fil.adb, mlib-fil.ads, mlib-prj.adb, mlib-prj.ads, mlib-tgt.adb,
2728 mlib-tgt.ads, mlib-utl.adb, mlib-utl.ads, namet.h, nmake.adt,
2729 osint.adb, osint.ads, osint-b.adb, osint-b.ads, osint-c.adb,
2730 osint-c.ads, osint-l.adb, osint-l.ads, osint-m.adb, osint-m.ads,
2731 par.adb, par.ads, par-ch10.adb, par-ch11.adb, par-ch12.adb,
2732 par-ch13.adb, par-ch2.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
2733 par-ch6.adb, par-ch7.adb, par-ch8.adb, par-ch9.adb, par-endh.adb,
2734 par-labl.adb, par-load.adb, par-prag.adb, par-sync.adb, par-tchk.adb,
2735 par-util.adb, prep.adb, prep.ads, prepcomp.adb, prepcomp.ads,
2736 prj.adb, prj.ads, prj-attr.adb, prj-attr.ads, prj-com.ads,
2737 prj-dect.adb, prj-dect.ads, prj-err.adb, prj-err.ads, prj-ext.adb,
2738 prj-ext.ads, prj-makr.adb, prj-makr.ads, prj-nmsc.adb, prj-nmsc.ads,
2739 prj-pars.adb, prj-pars.ads, prj-part.adb, prj-part.ads,
2740 prj-pp.adb, prj-pp.ads, prj-proc.adb, prj-proc.ads,
2741 prj-strt.adb, prj-strt.ads, prj-tree.adb, prj-tree.ads,
2742 prj-util.adb, prj-util.ads, restrict.adb, restrict.ads,
2743 rtsfind.adb, rtsfind.ads, scn.adb, scn.ads,
2744 scng.adb, scng.ads, sdefault.ads, sem.ads, sem_aggr.ads, sem_attr.adb,
2745 sem_case.adb, sem_case.ads, sem_cat.adb, sem_cat.ads, sem_ch10.adb,
2746 sem_ch10.ads, sem_ch11.adb, sem_ch11.ads, sem_ch12.ads, sem_ch13.adb,
2747 sem_ch13.ads, sem_ch2.adb, sem_ch2.ads, sem_ch3.adb, sem_ch3.ads,
2748 sem_ch4.ads, sem_ch5.adb, sem_ch5.ads, sem_ch6.adb, sem_ch6.ads,
2749 sem_ch7.adb, sem_ch7.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
2750 sem_ch9.ads, sem_disp.adb, sem_disp.ads, sem_dist.adb, sem_dist.ads,
2751 sem_elab.adb, sem_elab.ads, sem_elim.adb, sem_elim.ads, sem_eval.adb,
2752 sem_eval.ads, sem_intr.adb, sem_intr.ads, sem_maps.adb, sem_maps.ads,
2753 sem_mech.adb, sem_mech.ads, sem_prag.adb, sem_prag.ads, sem_res.adb,
2754 sem_res.ads, sem_smem.adb, sem_smem.ads, sem_type.adb, sem_type.ads,
2755 sem_util.adb, sem_util.ads, sem_vfpt.adb, sem_vfpt.ads, sem_warn.adb,
2756 sem_warn.ads, sfn_scan.ads, sinfo-cn.adb, sinfo-cn.ads, sinput-c.adb,
2757 sinput-c.ads, sinput-d.adb, sinput-d.ads, sinput-l.adb, sinput-l.ads,
2758 sinput-p.adb, sinput-p.ads, snames.h, sprint.adb, sprint.ads,
2759 stringt.h, style.ads, styleg.adb, styleg.ads, styleg-c.adb,
2760 styleg-c.ads, stylesw.adb, stylesw.ads, switch.adb, switch.ads,
2761 switch-b.adb, switch-b.ads, switch-c.adb, switch-c.ads, switch-m.adb,
2762 switch-m.ads, symbols.adb, symbols.ads, targparm.adb, tbuild.adb,
2763 tbuild.ads, tempdir.adb, tempdir.ads, tree_gen.adb, tree_gen.ads,
2764 treepr.adb, treepr.ads, treeprs.adt, ttypef.ads, ttypes.ads,
2765 types.h, uintp.h, urealp.h, usage.adb, usage.ads,
2766 validsw.adb, validsw.ads, vxaddr2line.adb, xeinfo.adb, xnmake.adb,
2767 xref_lib.adb, xref_lib.ads, xr_tabls.adb, xr_tabls.ads, xsinfo.adb,
2768 xtreeprs.adb, xsnames.adb, vms_conv.ads, vms_conv.adb, xgnatugn.adb,
2769 gprmake.adb, makegpr.ads, makegpr.adb, prj-attr-pm.ads, prj-attr-pm.adb,
2770 mlib-tgt-lynxos.adb, mlib-tgt-darwin.adb, symbols-vms.adb,
2771 symbols-processing-vms-alpha.adb, symbols-processing-vms-ia64.adb,
2772 mlib-tgt-specific.adb, mlib-tgt-specific.ads, mlib-tgt-vms.adb,
2773 mlib-tgt-vms.ads: Replace headers with GPL v3 headers.
2774
27752007-09-10 Emmanuel Briot <briot@adacore.com>
2776
2777 * s-regpat.adb (Parse_Character_Class): Fix handling of empty character
2778 classes ("[]").
2779
27802007-09-10 Vasiliy Fofanov <fofanov@adacore.com>
2781
2782 * adaint.c (__gnat_translate_vms): new function.
2783
27842007-09-10 Gary Dismukes <dismukes@adacore.com>
2785 Thomas Quinot <quinot@adacore.com>
2786
2787 * exp_ch3.adb (Predef_Spec_Or_Body): When the type is abstract, only
2788 create an abstract subprogram in the case of 'Input. For 'Output we now
2789 create a real spec/body when the type is abstract, since it can
2790 potentially be called.
2791 (Predefined_Primitive_Bodies): Now allow the creation of a predefined
2792 body for 'Output when the type is abstract (only the creation of the
2793 body for 'Input is excluded when the type is abstract).
2794 (Stream_Operation_OK): Add an additional condition in the return
2795 statement, so that False will be returned for TTS_Stream_Input if the
2796 associated tagged type is an abstract extension. Add comments for
2797 return statement.
2798 (Expand_N_Object_Declaration): For the case of a shared passive
2799 variable, insert init proc call only after the shared variable
2800 procedures have been processed, because the IP call needs to undergo
2801 shared passive variable reference expansion, which requires these
2802 procedures to be available (and elaborated).
2803
28042007-09-10 Vincent Celier <celier@adacore.com>
2805
2806 * prj-env.ads, prj-env.adb (Create_Mapping_File (Language)): Remove
2807 parameter Runtime_Project.
2808
28092007-09-10 Ed Schonberg <schonberg@adacore.com>
2810
2811 * sem_aggr.adb (Build_Record_Aggr_Code): If an aggregate component is
2812 given a box association, the type of the component is discriminated,
2813 and the value of the discriminant is the discriminant of the enclosing
2814 type, retrieve its value from the aggregate itself, where it must have
2815 been supplied.
2816
2817 * sem_ch4.adb (Analyze_One_Call): Further refinement to previous fix,
2818 to remove other spurious ambiguities on arithmetic operations involving
2819 literals and addresses, on systems where Address is a visible integer
2820 type, when the operator is called in functional notation.
2821 (Try_Primitive_Operation): Within an instance, a call in prefixed form
2822 is legal when the types match, even if the operation is currently
2823 hidden.
2824
28252007-09-10 Ed Schonberg <schonberg@adacore.com>
2826
2827 * sem_ch12.adb (Build_Local_Package): A formal package with no
2828 associations is legal if all formals have defaults. It is not
2829 equivalent to a formal declared with a box.
2830
28312007-09-10 Sergey Rybin <rybin@adacore.com>
2832
2833 * vms_data.ads: Add qualifier for the new gnatmetric '-lratio' option
2834
28352007-09-10 Sergey Rybin <rybin@adacore.com>
2836
2837 * gnat_ugn.texi: Add description of the new '-lratio' option
2838 Update 7.3.1 section about availability of the feature.
2839
28402007-09-10 Thomas Quinot <quinot@adacore.com>
2841
2842 * exp_smem.ads, exp_smem.adb (Make_Shared_Var_Procs): Return last
2843 inserted node.
2844
28452007-09-10 Olivier Hainque <hainque@adacore.com>
2846
2847 * Makefile.in: (mips-irix section): Activate build of libgmem.
2848
a56955b1
EB
28492007-09-10 Eric Botcazou <ebotcazou@adacore.com>
2850
2851 * a-numaux-x86.adb (Logarithmic_Pow): Do not silently clobber
2852 x87 registers.
2853
c03550f6
EB
28542007-09-10 Eric Botcazou <ebotcazou@adacore.com>
2855
2856 * decl.c (gnat_to_gnu_entity) <object>: Deal with variable built for
2857 a debug renaming declaration specially.
2858
79646678
EB
28592007-09-08 Eric Botcazou <ebotcazou@adacore.com>
2860
2861 * decl.c (gnat_to_gnu_entity) <Object>: Simplify the condition under
2862 which a constant renaming is treated as a normal object declaration.
2863 * trans.c (lvalue_required_p) <N_Slice>: New case, extracted from
2864 the N_Indexed_Component case.
2865 <N_Indexed_Component>: Fall through to above case.
2866 <N_Object_Renaming_Declaration>: Return true for all composite types.
2867
d9e161ce
EB
28682007-09-08 Eric Botcazou <ebotcazou@adacore.com>
2869
2870 * decl.c (make_packable_type): If the new type has been given BLKmode,
2871 try again to get an integral mode for it.
2872
0ab29e91 28732007-09-07 Eric Botcazou <ebotcazou@adacore.com>
6ef9a246 2874
0ab29e91 2875 Re-apply accidentally reverted change:
6ef9a246 2876
0ab29e91 2877 2007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
6ef9a246 2878
0ab29e91
EB
2879 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
2880 get_action_description_for): Replace _Unwind_Word with _uleb128_t
2881 and _Unwind_SWord with _sleb128_t.
4b459ae4 2882
38f1f8cb
EB
28832007-09-06 Eric Botcazou <ebotcazou@adacore.com>
2884
2885 * trans.c (convert_with_check): Update call to real_2expN.
2886
db2960f4
SL
28872007-09-05 Sandra Loosemore <sandra@codesourcery.com>
2888
2889 * trans.c (Compilation_unit_to_gnu): Use set_cfun.
2890 * utils.c (end_subprog_body): Likewise.
2891
d70c0bd6
NC
28922007-09-03 Nick Clifton <nickc@redhat.com>
2893
2894 * Make-lang.in: Change copyright header to refer to version 3 of
2895 the GNU General Public License and to point readers at the
2896 COPYING3 file and the FSF's license web page.
2897 * ada-tree.def, nmake.adt, nlists.h, snames.h, utils.c,
2898 Makefile.rtl, Makefile.in, config-lang.in, uintp.h, urealp.h,
2899 namet.h, decl.c, utils2.c, lang.opt, elists.h, atree.h, types.h,
2900 treeprs.adt, lang-specs.h, cuintp.c, stringt.h, gnatbl.c:
2901 Likewise.
2902
8a26ebb6
AC
29032007-08-31 Vincent Celier <celier@adacore.com>
2904
2905 PR ada/4720
2906
2907 * gnatchop.adb, gnatfind.adb, gnatlink.adb, gnatls.adb,
2908 gnatname.adb, gnatxref.adb, gprep.adb, clean.adb gnatbind.adb
2909 (Check_Version_And_Help): New procedure in package Switch to process
2910 switches --version and --help.
2911 Use Check_Version_And_Help in GNAT tools
2912
2913 * make.adb: Ditto.
2914 (Compile_Sources): Make sure that sources that are "excluded" are not
2915 compiled.
2916 (Gnatmake): Do not issue -aO. to gnatbind and only issue -I- if a
2917 project file is used.
2918 (Version_Switch): Remove, moved to Switch
2919 (Help_Switch): Remove, moved to Switch
2920 (Display_Version): Remove, moved to Switch
2921
2922 * switch.ads, switch.adb (Check_Version_And_Help): New procedure in
2923 package Switch to process switches --version and --help.
2924 (Display_Version): New procedure
2925
2926 * gnatvsn.ads, gnatvsn.adb (Copyright_Holder): New function.
2927
29282007-08-31 Javier Miranda <miranda@adacore.com>
2929
2930 * a-tags.adb (Internal_Tag): Protect the run-time against wrong
2931 internal tags.
2932
29332007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2934
2935 * checks.adb (In_Declarative_Region_Of_Subprogram_Body): New routine.
2936 (Mark_Non_Null): If the node for which we just generated an access check
2937 is a reference to an *in* parameter and the reference appears in the
2938 declarative part of a subprogram body, mark the node as known non null.
2939
29402007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2941
2942 * einfo.ads, einfo.adb: New flag Is_Raised (Flag224). Update the
2943 structure of E_Exception to reflect the new flag.
2944 (Is_Raised, Set_Is_Raised): New inlined routines.
2945 Update the usage of available flag to reflect the addition of Is_Raised.
2946 (Is_Raised, Set_Is_Raised): Bodies of new routines.
2947 (Write_Entity_Flags): Write the status of flag Is_Raised.
2948 (Is_Descendent_Of_Address): New entity flag, to simplify handling of
2949 spurious ambiguities when integer literals appear in the context of an
2950 address type that is a visible integer type.
2951
2952 * sem_ch11.adb (Analyze_Exception_Handler): Add code to warn on local
2953 exceptions never being raised.
2954 (Analyze_Raise_Statement): When analyzing an exception, mark it as being
2955 explicitly raised.
2956
29572007-08-31 Javier Miranda <miranda@adacore.com>
2958
2959 * exp_ch11.adb (Expand_At_End_Handler): Avoid generation of raise
2960 statement when compiling under restriction No_Exceptions_Proparation.
2961
29622007-08-31 Ed Schonberg <schonberg@adacore.com>
2963
2964 * exp_ch3.adb (Build_Record_Init_Proc): If there is a static
2965 initialization aggregate for the type, generate itype references for
2966 thetypes of its (sub)components, to prevent out-of-scope errors in gigi.
2967
29682007-08-31 Gary Dismukes <dismukes@adacore.com>
2969
2970 * exp_ch8.adb (Expand_N_Package_Renaming_Declaration): In the case of a
2971 library-level package renaming, pass the declaration associated with
2972 the renaming's special debug variable to Qualify_Entity_Names to ensure
2973 that its encoded name is properly qualified.
2974
2975 * exp_dbug.adb (Qualify_All_Entity_Names): Check for a variable entity
2976 occurring in the list of entities to qualify, and do not attempt to
2977 traverse an entity list in that case. Variables associated with
2978` library-level package renamings can now occur in the table.
2979
2980 * exp_dbug.ads: Revise documentation of the encoding for renaming
2981 declarations.
2982
29832007-08-31 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2984
2985 * layout.adb (Layout_Type): Use Underlying_Type to determine whether an
2986 access type points to an unconstrained array.
2987
29882007-08-31 Hristian Kirtchev <kirtchev@adacore.com>
2989
2990 * restrict.adb, namet.adb, par-util.adb: Remove redundant type
2991 conversion.
2992
2993 * sem_res.adb (Resolve_Qualified_Expression): Add machinery to detect
2994 simple redundant qualifications. The check is performed whenever the
2995 expression is a non-overloaded identifier.
2996 (Resolve_Type_Conversion): Enchance the redundant type conversion check
2997 to include loop parameters.
2998 (Valid_Conversion): Avoid generation of spurious error message.
2999
30002007-08-31 Bob Duff <duff@adacore.com>
3001
3002 * par-ch4.adb (P_Simple_Expression): Fold long sequences of
3003 concatenations of string literals into a single literal, in order to
3004 avoid very deep recursion in the front end, which was causing stack
3005 overflow.
3006
3007 * sem_eval.adb (Eval_Concatenation): If the left operand is the empty
3008 string, and the right operand is a string literal (the case of "" &
3009 "..."), optimize by avoiding copying the right operand -- just use the
3010 value of the right operand directly.
3011
3012 * stringt.adb (Store_String_Chars): Optimize by growing the
3013 String_Chars table all at once, rather than appending characters one by
3014 one.
3015 (Write_String_Table_Entry): If the string to be printed is very long,
3016 just print the first few characters, followed by the length. Otherwise,
3017 doing "pn(n)" in the debugger can take an extremely long time.
3018
3019 * sem_prag.adb (Process_Interface_Name): Replace loop doing
3020 Store_String_Char with Store_String_Chars.
3021
30222007-08-31 Vincent Celier <celier@adacore.com>
3023
3024 * prj-attr.adb: Add new attribute Excluded_Source_Files
3025
3026 * prj-nmsc.adb: Use attribute Excluded_Source_Files before
3027 Locally_Removed_Files.
3028
3029 * snames.ads, snames.adb: New standard name Excluded_Source_Files
3030
30312007-08-31 Ed Schonberg <schonberg@adacore.com>
3032
3033 * sem_ch10.adb (Analyze_Subunit_Context): When analyzing context
3034 clauses of subunits, ignore limited_with_clauses that are illegal and
3035 have not been fully analyzed.
3036
30372007-08-31 Ed Schonberg <schonberg@adacore.com>
3038
3039 * sem_ch3.adb: The predicate Is_Descendent_Of_Address is now an entity
3040 flag, for effiency. It is called when analyzing arithmetic operators
3041 and also for actuals in calls that are universal_integers. The flag is
3042 set for the predefined type address, and for any type or subtype
3043 derived from it.
3044
3045 * sem_ch4.adb (Analyze_One_Call): Reject an actual that is a
3046 Universal_Integer, when the formal is a descendent of address and the
3047 call appears in user code.
3048 (Analyze_Selected_Component): if the prefix is a private extension, the
3049 tag component is visible.
3050
3051 * sem_util.ads, sem_util.adb: Remove Is_Descendent_Of_Address, now an
3052 entity flag.
3053
30542007-08-31 Robert Dewar <dewar@adacore.com>
3055
3056 * s-fileio.adb (Open): Normalize file name to lower case in non-case
3057 sensitive file name systems to avoid unexpected mismatch in Vista.
3058
30592007-08-31 Vincent Celier <celier@adacore.com>
3060
3061 * tempdir.adb: On VMS, take into account GNUTMPDIR before TMPDIR
3062
30632007-08-31 Vincent Celier <celier@adacore.com>
3064
3065 * symbols-vms.adb (Initialize): Read symbol files with continuation
3066 lines
3067 (Finalize): If symbol is long, split the line
3068
30692007-08-31 Vincent Celier <celier@adacore.com>
3070
3071 * fmap.ads: Minor comment updates
3072
30732007-08-31 GNAT Script <nobody@adacore.com>
3074
3075 * Make-lang.in: Makefile automatically updated
3076
30772007-08-31 Bob Duff <duff@adacore.com>
3078
3079 * sinfo.ads: Minor comment fix.
3080
30812007-08-31 Thomas Quinot <quinot@adacore.com>
3082
3083 * stand.ads: (Standard_Debug_Renaming_Type): Make comment consistent
3084 with implementation.
3085 Documentation cleanup only.
3086
30872007-08-31 Sergey Rybin <rybin@adacore.com>
3088
3089 * vms_data.ads: Add new qualifier /STMT_NAME_ON_NEW_LINE for the new
3090 gnatpp '--separate-stmt-name' option.
3091 Add new qualifier /USE_ON_NEW_LIN for the new gnatpp '--use-on-new-line'
3092 option.
3093
3094 * gnat_ugn.texi: Add description for the new gnatpp
3095 '--separate-stmt-name' and '--use-on-new-line' options.
3096
22d2aa96
BE
30972007-08-31 Ben Elliston <bje@au.ibm.com>
3098
3099 * Makefile.in (LIBGNAT_TARGET_PAIRS): Use system-linux-ppc64.ads
3100 when compiling for powerpc64-*-linux.
3101 * system-linux-ppc64.ads: New file.
3102
51743df8
KW
31032007-08-22 Krister Walfridsson <cato@df.lth.se>
3104
3105 * env.c ( __gnat_clearenv): Use the __gnat_unsetenv mechanism for
3106 NetBSD.
3107
ac7d7749
KG
31082007-08-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3109
3110 * misc.c (gnat_type_max_size): Constify.
3111
833eddff
AC
31122007-08-16 Gary Dismukes <dismukes@adacore.com>
3113
3114 * cstand.adb (Create_Standard): Create an entity for a zero-sized type
3115 associated with Standard_Debug_Renaming_Type, to be used as the type of
3116 the special variables whose names provide debugger encodings for
3117 renaming declarations.
3118
3119 * einfo.ads, einfo.adb (Debug_Renaming_Link): Change to return Node25.
3120 (Set_Debug_Renaming_Link): Change to set Node25.
3121 (Write_Field13_Name): Remove case for E_Enumeration_Literal.
3122 (Write_Field25_Name): Add case for E_Variable to output
3123 "Debug_Renaming_Link".
3124 (Write_Field23_Name): Correct the output string for "Limited_View".
3125
3126 * exp_dbug.adb: Add with and use of Tbuild.
3127 (Debug_Renaming_Declaration): Replace creation of an enumeration type
3128 and literal with creation of a variable of type
3129 Standard_Debug_Renaming_Type whose name encodes both the renamed object
3130 and the entity of the renaming declaration.
3131 (Qualify_Entity_Name): Add the delayed qualification of the entity name
3132 part of the name of a variable that has a Debug_Renaming_Link.
3133
3134 * stand.ads (Standard_Debug_Renaming_Type): New Entity_Id denoting a
3135 special type to be associated with variables that provide debugger
3136 encodings for renaming declarations.
3137
31382007-08-16 Gary Dismukes <dismukes@adacore.com>
3139 Ed Schonberg <schonberg@adacore.com>
3140 Javier Miranda <miranda@adacore.com>
3141
3142 * exp_aggr.adb (Build_Record_Aggr_Code): Extend the test for an
3143 ancestor part given by an aggregate to test for an unchecked conversion,
3144 since this can occur in some cases when the ancestor part is a function
3145 call, and we don't want to fall into the recursive call to this
3146 procedure in that case.
3147
3148 * exp_ch3.adb (Stream_Operation_OK): Revise tests for availability of
3149 stream attributes on limited types to account for user-specified
3150 attributes as well as whether Input (resp. Output) becomes available
3151 due to Read (resp. Write) being available for the type. Change Boolean
3152 variable to the more accurate name
3153 Has_Predefined_Or_Specified_Stream_Attribute. Change convoluted
3154 double-"not" predicate at beginning of return statement to more
3155 understandable form.
3156
3157 * exp_ch5.adb (Expand_N_Extended_Return_Statement): If the extended
3158 return has an associated N_Handled_Sequence_Of_Statements, then wrap it
3159 in a block statement and use that as the first statement of the
3160 expanded return rather than incorrectly using the handled sequence as
3161 the first statement.
3162
3163 * exp_ch6.adb (Expand_N_Subprogram_Declaration): If this is a protected
3164 operation, generate an explicit freeze node for it rather than
3165 generating extra formals, to ensure that gigi has the proper order of
3166 elaboration for anonymous subtypes in the signature of the subprograms.
3167 (Build_In_Place_Formal): Move assertion to beginning of loop.
3168 (Is_Build_In_Place_Function_Call): Allow for an unchecked conversion
3169 applied to a function call (occurs for some cases of 'Input).
3170 (Make_Build_In_Place_Call_In_*): Allow for an unchecked conversion
3171 applied to a function call (occurs for some cases of 'Input).
3172
3173 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): For Ada
3174 2005, generate an extended return statement enclosing the result object
3175 and 'Read call.
3176
3177 * freeze.adb (Freeze_Record_Type): Extend the current management of
3178 components that are access type with an allocator as default value: add
3179 missing support to the use of qualified expressions of the
3180 allocator (which also cause freezing of the designated type!)
3181 (Freeze_Entity): Call Freeze_Subprogram in the case of a predefined
3182 dispatching operation, since extra formals may be needed by calls to
3183 build-in-place functions (such as stream 'Input).
3184
3185 * sem_ch6.adb (Create_Extra_Formals): Skip creation of the extra
3186 formals for 'Constrained and accessibility level in the case of a
3187 predefined dispatching operation.
3188
3189 * exp_util.adb (Insert_Actions): A protected body is a valid insertion
3190 point, no need to find the parent node.
3191
31922007-08-16 Javier Miranda <miranda@adacore.com>
3193
3194 * exp_attr.adb (Attribute_Priority): Add missing support for entries
3195 and entry barriers.
3196
31972007-08-16 Javier Miranda <miranda@adacore.com>
3198
3199 * exp_ch9.adb (Build_Protected_Entry): Undo previous change because it
3200 is not really required and can introduce regression with the debugger.
3201 The original problem is fixed with the patch written for checks.adb.
3202
32032007-08-16 Thomas Quinot <quinot@adacore.com>
3204
3205 * g-dyntab.adb, g-table.adb, table.adb: (Set_Item): Suppress
3206 Range_Check on Allocated_Table.
3207
32082007-08-16 Vincent Celier <celier@adacore.com>
3209
3210 * make.adb (Collect_Arguments): Call Test_If_Relative_Path with
3211 Including_Non_Switch set to False.
3212 (Gnatmake): For the compiler, call Test_If_Relative_Path with
3213 Including_Non_Switch set to False.
3214
3215 * makeutl.adb, makeutl.ads (Test_If_Relative_Path): New Boolean
3216 parameter Including_Non_Switch, defaulted to True. When
3217 Including_Non_Switch is False, options that are not switches and
3218 appear as relative path are not converted to absolute paths.
3219
32202007-08-16 Nicolas Roche <roche@adacore.com>
3221
3222 * Makefile.in (gnatlib): Propagate FORCE_DEBUG_ADAFLAGS value to sub
3223 makefiles
3224
3225 * Make-lang.in: Update dependencies
3226
32272007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
3228
3229 * sem_ch10.adb (Has_With_Clause): If the name of the with clause
3230 currently inspected is a selected component, retrieve the entity of
3231 its selector.
3232 (Install_Limited_Withed_Unit): Call Has_Limited_With_Clause starting
3233 from the immediate ancestor of Main_Unit_Entity.
3234 (Install_Limited_Withed_Unit): Do not install the limited view of
3235 package P if P is reachable through an ancestor chain from package C
3236 and C also has a with clause for P in its body.
3237 (Has_Limited_With_Clause): New routine.
3238 (Has_With_Clause): New routine.
3239
32402007-08-16 Ed Schonberg <schonberg@adacore.com>
3241
3242 * sem_ch12.adb (Copy_Generic_Node): A reference to a child unit of the
3243 generic for an enclosing instance is a global reference, even though
3244 its scope is the enclosing instance.
3245
32462007-08-16 Gary Dismukes <dismukes@adacore.com>
3247 Javier Miranda <miranda@adacore.com>
3248
3249 * sem_ch3.adb (OK_For_Limited_Init_In_05): Allow calls to 'Input to
3250 initialize a limited object.
3251 (Build_Derived_Record_Type): Add missing check of rules ARM 3.9.4
3252 13/2 and 14/2.
3253 Make sure Has_Complex_Representation is inherited by derived type.
3254
32552007-08-16 Robert Dewar <dewar@adacore.com>
3256
3257 * sem_ch5.adb (Analyze_Assignment): Make sure we still note update in
3258 exception case
3259
32602007-08-16 Ed Schonberg <schonberg@adacore.com>
3261
3262 * sem_disp.adb (Check_Dispatching_Operation): If the operation
3263 implements an operation inherited from a progenitor interface, verify
3264 that they are subtype-conformant.
3265
32662007-08-16 Hristian Kirtchev <kirtchev@adacore.com>
3267 Bob Duff <duff@adacore.com>
3268 Nicolas Setton <setton@adacore.com>
3269
3270 * sem_res.adb (Comes_From_Predefined_Lib_Unit): New.
3271 (Resolve): Alphabetize local variables. Add new variable From_Lib. When
3272 the statement which is being resolved comes from a predefined library
3273 unit, all non-predefined library interpretations are skipped.
3274 (Resolve_Op_Concat): If string concatenation was folded in the parser,
3275 but the "&" is user defined, give an error, because the folding would
3276 be wrong.
3277
3278 * sinfo.ads, sinfo.adb (Is_Folded_In_Parser): New flag to indicate that
3279 the parser has folded a long sequence of concatenations of string
3280 literals.
3281
3282 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Mark "JMPBUF_SAVE"
3283 and "JMP_BUF" variables as artificial.
3284 (N_String_Literal): Do not use alloca for very long string literals. Use
3285 xmalloc/free instead. Otherwise the stack might overflow.
3286
3287 * utils.c (init_gigi_decls): Mark "JMPBUF_T" type as created by the
3288 compiler.
3289
32902007-08-16 Vincent Celier <celier@adacore.com>
3291
3292 * vms_conv.adb (Process_Argument): Ensure that project related options
3293 are not put in the -cargs section when using GNAT COMPILE.
3294
32952007-08-16 Robert Dewar <dewar@adacore.com>
3296
3297 * gnat_ugn.texi: Add note on preprocessing (output file not written)
3298
32992007-08-16 Thomas Quinot <quinot@adacore.com>
3300
3301 * a-tags.adb: Minor reformatting.
3302
33032007-08-16 Bob Duff <duff@adacore.com>
3304
3305 * sem_type.ads, sem_ch4.adb: Minor reformatting.
3306
ab6328d0
AC
33072007-08-14 Thomas Quinot <quinot@adacore.com>
3308
3309 * g-soccon-interix.ads, a-excpol-interix.adb, a-intnam-interix.ads,
3310 s-osinte-interix.ads, system-interix.ads: Removed.
3311
33122007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
3313
3314 * a-calend-vms.adb, a-calend.adb ("+", "-", Add, Subtract): Remove
3315 calls to Check_Within_Time_Bounds.
3316 ("+", "-", Add, Subtract): Remove calls to Check_Within_Time_Bounds.
3317 (Difference): Account for possible rounding of the resulting difference
3318
33192007-08-14 Robert Dewar <dewar@adacore.com>
3320
3321 * uintp.adb, a-ztedit.adb, s-wchcon.adb, xnmake.adb, s-wchcon.adb,
3322 par-ch5.adb, par-ch10.adb, get_targ.adb, a-wtedit.adb, a-teioed.adb,
3323 s-osinte-solaris.adb, s-osinte-solaris.ads,
3324 s-osinte-freebsd.ads, s-osinte-freebsd.adb: Minor reformatting.
3325
3326 * styleg.adb, styleg.ads, stylesw.adb, stylesw.ads: implement style
3327 switch -gnatyS. Enable -gnatyS in GNAT style check mode
3328
33292007-08-14 Robert Dewar <dewar@adacore.com>
3330 Ed Schonberg <schonberg@adacore.com>
3331
3332 * inline.adb, types.ads, inline.ads, frontend.adb, alloc.ads:
3333 Suppress unmodified in-out parameter warning in some cases
3334 This patch is a also fairly significant change to the way suppressible
3335 checks are handled.
3336
3337 * checks.ads, checks.adb (Install_Null_Excluding_Check): No check
3338 needed for access to concurrent record types generated by the expander.
3339 (Generate_Range_Check): When generating a temporary to capture the
3340 value of a conversion that requires a range check, set the type of the
3341 temporary before rewriting the node, so that the type is always
3342 properly placed for back-end use.
3343 (Apply_Float_Conversion_Check): Handle case where the conversion is
3344 truncating.
3345 (Get_Discriminal): Code reformatting. Climb the scope stack looking
3346 for a protected type in order to examine its discriminants.
3347
33482007-08-14 Robert Dewar <dewar@adacore.com>
3349 Gary Dismukes <dismukes@adacore.com>
3350 Ed Schonberg <schonberg@adacore.com>
3351 Thomas Quinot <quinot@adacore.com>
3352
3353 * a-stzsup.adb, nlists.adb, lib-util.adb, treepr.adb,
3354 a-stwisu.adb, a-strsup.adb: Fix warnings for range
3355 tests optimized out.
3356
3357 * exp_ch4.adb (Expand_N_In): Add warnings for range tests optimized out.
3358 (Get_Allocator_Final_List): For the case of an anonymous access type
3359 that has a specified Associated_Final_Chain, do not go up to the
3360 enclosing scope.
3361 (Expand_N_Type_Conversion): Test for the case of renamings of access
3362 parameters when deciding whether to apply a run-time accessibility
3363 check.
3364 (Convert_Aggr_In_Allocator): Use Insert_Actions to place expanded
3365 aggregate code before allocator, and ahead of declaration for
3366 temporary, to prevent access before elaboration when the allocator is
3367 an actual for an access parameter.
3368 (Expand_N_Type_Conversion): On an access type conversion involving an
3369 access parameter, do not apply an accessibility check when the
3370 operand's original node was an attribute other than 'Access. We now
3371 create access conversions for the expansion of 'Unchecked_Access and
3372 'Unrestricted_Access in certain cases and clearly accessibility should
3373 not be checked for those.
3374
3375 * exp_ch6.ads, exp_ch6.adb (Add_Call_By_Copy_Code): For an actual that
3376 includes a type conversion of a packed component that has been expanded,
3377 recover the original expression for the object, and use this expression
3378 in the post-call assignment statement, so that the assignment is made
3379 to the object and not to a back-end temporary.
3380 (Freeze_Subprogram): In case of primitives of tagged types not defined
3381 at the library level force generation of code to register the primitive
3382 in the dispatch table. In addition some code reorganization has been
3383 done to leave the implementation clear.
3384 (Expand_Call): When expanding an inherited implicit conversion,
3385 preserve the type of the inherited function after the intrinsic
3386 operation has been expanded.
3387
3388 * exp_ch2.ads, exp_ch2.adb
3389 (Expand_Entry_Parameter.In_Assignment_Context): An implicit dereference
3390 of an entry formal appearing in an assignment statement does not assign
3391 to the formal.
3392 (Expand_Current_Value): Instead of calling a routine to determine
3393 whether the prefix of an attribute reference should be optimized or
3394 not, prevent the optimization of such prefixes all together.
3395
3396 * lib-xref.adb (Generate_Reference.Is_On_LHS): An indexed or selected
3397 component whose prefix is known to be of an access type is an implicit
3398 dereference and does not assign to the prefix.
3399
34002007-08-14 Ed Schonberg <schonberg@adacore.com>
3401 Robert Dewar <dewar@adacore.com>
3402
3403 * atree.ads, atree.adb (New_Copy_Tree): If hash table is being used and
3404 itype is visited, make an entry into table to link associated node and
3405 new itype.
3406 Add comments and correct harmless error in Build_NCT_Hash_Tables
3407 (Array_Aggr_Subtype): Associate each itype created for an index type to
3408 the corresponding range construct, and not to the aggregate itself. to
3409 maintain a one-to-one correspondence between itype and its associated
3410 node, to prevent errors when complex expression is copied.
3411 Fix mishandling of multiple levels of parens
3412
3413 * sem_aggr.adb: Create a limited view of an incomplete type, to make
3414 treatment of limited views uniform for all visible declarations in a
3415 limited_withed package.
3416 (New_Copy_Tree): If hash table is being used and itype is visited,
3417 make an entry into table to link associated node and new itype.
3418 (Resolve_Record_Aggregate): Do not add an others box association for a
3419 discriminated record component that has only discriminants, when there
3420 is a box association for the component itself.
3421
3422 * par-ch4.adb: Fix mishandling of multiple levels of parens
3423
34242007-08-14 Robert Dewar <dewar@adacore.com>
3425
3426 * comperr.adb: Fix problem with suppressing warning messages from gigi
3427
3428 * erroutc.ads, erroutc.adb, errout.ads,
3429 errout.adb (Write_Eol): Remove trailing spaces before writing the line
3430 (Write_Eol_Keep_Blanks): New procedure to write a line, including
3431 possible trailing spaces.
3432 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
3433 Fix problem with suppressing warning messages from back end
3434 Improve handling of deleted warnings
3435
3436 * gnat1drv.adb:
3437 Fix problem with suppressing warning messages from back end
3438 Handle setting of Static_Dispatch_Tables flag.
3439
3440 * prepcomp.adb:
3441 Fix problem with suppressing warning messages from back end
3442
3443 * exp_intr.adb: Improve handling of deleted warnings
3444
34452007-08-14 Robert Dewar <dewar@adacore.com>
3446
3447 * debug.adb: Improve -gnatdI to cover all cases of serialization
3448 Add documentation of dZ, d.t
3449
3450 * sprint.ads, sprint.adb: Improve -gnatdI to cover all cases of
3451 serialization.
3452 (Sprint_Node_Actual): Generate new output associated with implicit
3453 importation and implicit exportation of object declarations.
3454
34552007-08-14 Ed Schonberg <schonberg@adacore.com>
3456 Robert Dewar <dewar@adacore.com>
3457 Javier Miranda <miranda@adacore.com>
3458 Gary Dismukes <dismukes@adacore.com>
3459
3460 * einfo.ads, einfo.adb: Create a limited view of an incomplete type,
3461 to make treatment of limited views uniform for all visible declarations
3462 in a limited_withed package.
3463 Improve warnings for in out parameters
3464 (Set_Related_Interaface/Related_Interface): Allow the use of this
3465 attribute with constants.
3466 (Write_Field26_Name): Handle attribute Related_Interface in constants.
3467 Warn on duplicate pragma Preelaborable_Initialialization
3468
3469 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Body): Force the
3470 generation of a freezing node to ensure proper management of null
3471 excluding access types in the backend.
3472 (Create_Extra_Formals): Test base type of the formal when checking for
3473 the need to add an extra accessibility-level formal. Pass the entity E
3474 on all calls to Add_Extra_Formal (rather than Scope (Formal) as was
3475 originally being done in a couple of cases), to ensure that the
3476 Extra_Formals list gets set on the entity E when the first entity is
3477 added.
3478 (Conforming_Types): Add missing calls to Base_Type to the code that
3479 handles anonymous access types. This is required to handle the
3480 general case because Process_Formals builds internal subtype entities
3481 to handle null-excluding access types.
3482 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
3483 functions that need it, even when not marked Requires_Overriding.
3484 Improve warnings for in out parameters
3485 (Analyze_Function_Return): Warn for disallowed null return
3486 Warn on return from procedure with unset out parameter
3487 Ensure consistent use of # in error messages
3488 (Check_Overriding_Indicator): Add in parameter Is_Primitive.
3489 (Analyze_Function_Return): Move call to Apply_Constraint_Check before
3490 the implicit conversion of the expression done for anonymous access
3491 types. This is required to generate the code of the null excluding
3492 check (if required).
3493
3494 * sem_warn.ads, sem_warn.adb (Check_References.Publicly_Referenceable):
3495 A formal parameter is never publicly referenceable outside of its body.
3496 (Check_References): For an unreferenced formal parameter in an accept
3497 statement, use the same warning circuitry as for subprogram formal
3498 parameters.
3499 (Warn_On_Unreferenced_Entity): New subprogram, taken from
3500 Output_Unreferenced_Messages, containing the part of that routine that
3501 is now reused for entry formals as described above.
3502 (Goto_Spec_Entity): New function
3503 (Check_References): Do not give IN OUT warning for dispatching operation
3504 Improve warnings for in out parameters
3505 (Test_Ref): Check that the entity is not undefinite before calling
3506 Scope_Within, in order to avoid infinite loops.
3507 Warn on return from procedure with unset out parameter
3508 Improved warnings for unused variables
3509
35102007-08-14 Robert Dewar <dewar@adacore.com>
3511 Javier Miranda <miranda@adacore.com>
3512 Gary Dismukes <dismukes@adacore.com>
3513
3514 * exp_attr.adb (Expand_N_Attribute_Reference): Handle case of child unit
3515 (Expand_N_Attribute_Reference): Further unify the handling of the
3516 three forms of access attributes, using common code now for all three
3517 cases. Add a test for the case of applying an access attribute to
3518 an explicit dereference when the context is an access-to-interface
3519 type. In that case we need to apply the conversion to the prefix
3520 of the explicit dereference rather than the prefix of the attribute.
3521 (Attribute_Version, UET_Address): Set entity as internal to ensure
3522 proper dg output of implicit importation.
3523 (Expand_Access_To_Type): Removed.
3524 (Expand_N_Attribute_Reference): Merge the code from the three cases
3525 of access attributes, since the processing is largely identical for
3526 these cases. The substantive fix here is to process the case of a
3527 type name prefix (current instance case) before handling the case
3528 of interface prefixes.
3529
35302007-08-14 Thomas Quinot <quinot@adacore.com>
3531 Ed Schonberg <schonberg@adacore.com>
3532 Javier Miranda <miranda@adacore.com>
3533 Robert Dewar <dewar@adacore.com>
3534
3535 * exp_ch3.ads, exp_ch3.adb (Add_Final_Chain): New subprogram.
3536 (Freeze_Array_Type, Freeze_Record_Type): For the case of a component
3537 type that is an anonymous access to controlled object, establish
3538 an associated finalization chain to avoid corrupting the global
3539 finalization list when a dynamically allocated object designated
3540 by such a component is deallocated.
3541 (Make_Controlling_Function_Wrappers): Create wrappers for constructor
3542 functions that need it, even when not marked Requires_Overriding.
3543 (Initialize_Tag): Replace call to has_discriminants by call to
3544 Is_Variable_Size_Record in the circuitry that handles the
3545 initialization of secondary tags.
3546 (Is_Variable_Size_Record): New implementation.
3547 (Expand_N_Object_Declaration): Suppress call to init proc if there is a
3548 Suppress_Initialization pragma for a derived type.
3549 (Is_Variable_Size_Record): New subprogram.
3550 (Build_Offset_To_Top_Functions): New implementation that simplifies the
3551 initial version of this routine and also fixes problems causing
3552 incomplete initialization of the table of interfaces.
3553 (Build_Init_Procedure): Improve the generation of code to initialize the
3554 the tag components of secondary dispatch tables.
3555 (Init_Secondary_Tags): New implementation that simplifies the previous
3556 version of this routine.
3557 (Make_DT): Add parameter to indicate when type has been frozen by an
3558 object declaration, for diagnostic purposes.
3559 (Check_Premature_Freezing): New subsidiary procedure of Make_DT, to
3560 diagnose attemps to freeze a subprogram when some untagged type of its
3561 profile is a private type whose full view has not been analyzed yet.
3562 (Freeze_Array_Type): Generate init proc for packed array if either
3563 Initialize or Normalize_Scalars is set.
3564 (Make_Controlling_Function_Wrappers, Make_Null_Procedure_Specs): when
3565 constructing the new profile, copy the null_exclusion indicator for each
3566 parameter, to ensure full conformance of the new body with the spec.
3567
3568 * sem_type.ads, sem_type.adb (Make_Controlling_Function_Wrappers):
3569 Create wrappers for constructor functions that need it, even when not
3570 marked Requires_Overriding.
3571 (Covers): Handle properly designated types of anonymous access types,
3572 whose non-limited views are themselves incomplete types.
3573 (Add_Entry): Use an entity to store the abstract operation which hides
3574 an interpretation.
3575 (Binary_Op_May_Be_Hidden): Rename to Binary_Op_Interp_Has_Abstract_Op.
3576 (Collect_Interps): Use Empty as an actual for Abstract_Op in the
3577 initialization aggregate.
3578 (Function_Interp_May_Be_Hidden): Rename to
3579 Function_Interp_Has_Abstract_Op.
3580 (Has_Compatible_Type): Remove machinery that skips interpretations if
3581 they are labeled as potentially hidden by an abstract operator.
3582 (Has_Hidden_Interp): Rename to Has_Abstract_Op.
3583 (Set_May_Be_Hidden): Rename to Set_Abstract_Op.
3584 (Write_Overloads): Output the abstract operator if present.
3585 (Add_Entry): Before inserting a new entry into the interpretation table
3586 for a node, determine whether the entry will be disabled by an abstract
3587 operator.
3588 (Binary_Op_Interp_May_Be_Hidden): New routine.
3589 (Collect_Interps): Add value for flag May_Be_Hidden in initialization
3590 aggregate.
3591 (Function_Interp_May_Be_Hidden): New routine.
3592 (Has_Compatible_Type): Do not consider interpretations hidden by
3593 abstract operators when trying to determine whether two types are
3594 compatible.
3595 (Has_Hidden_Interp): New routine.
3596 (Set_May_Be_Hidden_Interp): New routine.
3597 (Write_Overloads): Write the status of flag May_Be_Hidden.
3598
35992007-08-14 Ed Schonberg <schonberg@adacore.com>
3600 Javier Miranda <miranda@adacore.com>
3601
3602 * exp_disp.ads, exp_disp.adb (Build_Dispatch_Tables): Handle tagged
3603 types declared in the declarative part of a nested package body or in
3604 the proper body of a stub.
3605 (Set_All_DT_Position): Add missing check to avoid wrong assignation
3606 of the same dispatch table slot to renamed primitives.
3607 (Make_Select_Specific_Data_Table): Handle private types.
3608 (Tagged_Kind): Handle private types.
3609 (Make_Tags, Make_DT): Set tag entity as internal to ensure proper dg
3610 output of implicit importation and exportation.
3611 (Expand_Interface_Thunk): Fix bug in the expansion assuming that the
3612 first formal of the thunk is always associated with the controlling
3613 type. In addition perform the following code cleanup: remove formal
3614 Thunk_Alias which is no longer required, cleanup evaluation of the
3615 the controlling type, and update the documentation.
3616 Replace occurrence of Default_Prim_Op_Count by
3617 Max_Predef_Prims. Addition of compile-time check to verify
3618 that the value of Max_Predef_Prims is correct.
3619 (Check_Premature_Freezing): Apply check in Ada95 mode as well.
3620 (Make_DT): Add parameter to indicate when type has been frozen by an
3621 object declaration, for diagnostic purposes.
3622 (Build_Static_Dispatch_Tables): New subprogram that takes care of the
3623 construction of statically allocated dispatch tables.
3624 (Make_DT): In case of library-level tagged types export the declaration
3625 of the primary tag. Remove generation of tags (now done by Make_Tags).
3626 Additional modifications to handle non-static generation of dispatch
3627 tables. Take care of building tables for asynchronous interface types
3628 (Make_Tags): New subprogram that generates the entities associated with
3629 the primary and secondary tags of Typ and fills the contents of Access_
3630 Disp_Table. In case of library-level tagged types imports the forward
3631 declaration of the primary tag that will be declared later by Make_DT.
3632 (Expand_Interface_Conversion): In case of access types to interfaces
3633 replace an itype declaration by an explicit type declaration to avoid
3634 problems associated with the scope of such itype in transient blocks.
3635
36362007-08-14 Robert Dewar <dewar@adacore.com>
3637 Ed Schonberg <schonberg@adacore.com>
3638 Javier Miranda <miranda@adacore.com>
3639
3640 * exp_util.ads, exp_util.adb:
3641 This patch replaces a number of occurrences of explicit tests for N_Null
3642 with calls to Known_Null. This improves tracking of null values, since
3643 Known_Null also catches null constants, and variables currently known to
3644 be null, so we get better tracking.
3645 (Ensure_Defined): create an itype reference only in the scope of the
3646 itype.
3647 (Side_Effect_Free): A selected component of an access type that
3648 denotes a component with a rep clause must be treated as not
3649 side-effect free, because if it is part of a linked structure its
3650 value may be affected by a renaming.
3651 (Expand_Subtype_From_Expr): For limited objects initialized with build
3652 in place function calls, do nothing; otherwise we prematurely introduce
3653 an N_Reference node in the expression initializing the object, which
3654 breaks the circuitry that detects and adds the additional arguments to
3655 the called function. Bug found working in the new patch for statically
3656 allocated dispatch tables.
3657 (Is_Library_Level_Tagged_Type): New subprogram.
3658 (Remove_Side_Effects): If the expression of an elementary type is an
3659 operator treat as a function call.
3660 (Make_Literal_Range): If the index type of the array is not integer, use
3661 attributes properly to compute the constraint on the resulting aggregate
3662 which is a string.
3663
3664 * freeze.ads, freeze.adb (Freeze_Entity): If the entity is a
3665 class-wide type whose base type is an incomplete private type, leave
3666 class-wide type unfrozen so that freeze nodes can be generated
3667 properly at a later point.
3668 (Freeze_Entity, array case): Handle case of pragma Pack and component
3669 size attributre clause for same array.
3670
36712007-08-14 Vincent Celier <celier@adacore.com>
3672
3673 * prj.ads, prj.adb: Update Project Manager to new attribute names for
3674 gprbuild.
3675 Allow all valid declarations in configuration project files
3676 (Reset): Initialize all tables and hash tables in the project tree data
3677 Major update of the Project Manager and of the project aware tools,
3678 including gprmake, so that the same sources in the GNAT repository
3679 can be used by gprbuild.
3680 (Slash_Id): Change type to be Path_Name_Type
3681 (Slash): Return a Path_Name_Type instead of a File_Name_Type
3682
3683 * prj-attr.ads, prj-attr.adb: Remove attributes no longer used by
3684 gprbuild.
3685 Update Project Manager to new attribute names for ghprbuild
3686 Allow all valid declarations in configuration project files
3687 Major update of the Project Manager and of the project aware tools,
3688 including gprmake, so that the same sources in the GNAT repository
3689 can be used by gprbuild.
3690
3691 * prj-com.ads:
3692 Major update of the Project Manager and of the project aware tools,
3693 including gprmake, so that the same sources in the GNAT repository
3694 can be used by gprbuild.
3695
3696 * prj-dect.adb (Prj.Strt.Attribute_Reference): Set correctly the case
3697 insensitive flag for attributes with optional index.
3698 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
3699 array attribute, put the index in lower case.
3700 Update Project Manager to new attribute names for ghprbuild
3701 Allow all valid declarations in configuration project files
3702 Major update of the Project Manager and of the project aware tools,
3703 including gprmake, so that the same sources in the GNAT repository
3704 can be used by gprbuild.
3705
3706 * prj-env.ads, prj-env.adb:
3707 Major update of the Project Manager and of the project aware tools,
3708 including gprmake, so that the same sources in the GNAT repository
3709 can be used by gprbuild.
3710 (Get_Reference): Change type of parameter Path to Path_Name_Type
3711
3712 * prj-ext.ads, prj-ext.adb (Initialize_Project_Path): Make sure, after
3713 removing '-' from the path to start with the first character of the
3714 next directory.
3715 Major update of the Project Manager and of the project aware tools,
3716 including gprmake, so that the same sources in the GNAT repository
3717 can be used by gprbuild.
3718 Major update of the Project Manager and of the project aware tools,
3719 including gprmake, so that the same sources in the GNAT repository
3720 can be used by gprbuild.
3721
3722 * prj-nmsc.ads, prj-nmsc.adb:
3723 Update Project Manager to new attribute names for ghprbuild
3724 Allow all valid declarations in configuration project files
3725 (Search_Directories): Detect subunits that are specified with an
3726 attribute Body in package Naming. Do not replace a source/unit in the
3727 same project when the order of the source dirs are known. Detect
3728 duplicate sources/units in the same project when the order of the
3729 source dirs are not known.
3730 (Check_Ada_Name): Allow all identifiers that are not reserved words
3731 in Ada 95.
3732 Major update of the Project Manager and of the project aware tools,
3733 including gprmake, so that the same sources in the GNAT repository
3734 can be used by gprbuild.
3735 (Look_For_Sources): If the list of sources is empty, set the object
3736 directory of non extending project to nil.
3737 Change type of path name variables to be Path_Name_Type
3738 (Locate_Directory): Make sure that on Windows '/' is converted to '\',
3739 otherwise creating missing directories will fail.
3740
3741 * prj-attr-pm.adb, prj-tree.ads, prj-proc.ads, prj-proc.adb,
3742 prj-part.ads, prj-part.adb:
3743 Major update of the Project Manager and of the project aware tools,
3744 including gprmake, so that the same sources in the GNAT repository
3745 can be used by gprbuild.
3746
3747 * prj-strt.adb (Prj.Strt.Attribute_Reference): Set correctly the case
3748 insensitive flag for attributes with optional index.
3749 (Prj.Dect.Parse_Attribute_Declaration): For case insensitive associative
3750 array attribute, put the index in lower case.
3751 (Parse_Variable_Reference): Allow the current project name to be used in
3752 the prefix of an attribute reference.
3753
3754 * prj-util.ads, prj-util.adb
3755 (Value_Of (for arrays)): New Boolean parameter Force_Lower_Case_Index,
3756 defaulted to False. When True, always check against indexes in lower
3757 case.
3758
3759 * snames.ads, snames.h, snames.adb:
3760 Update Project Manager to new attribute names for gprbuild
3761 Allow all valid declarations in configuration project files
3762
37632007-08-14 Robert Dewar <dewar@adacore.com>
3764 Ed Schonberg <schonberg@adacore.com>
3765
3766 * opt.ads: Warning for non-local exception propagation now off by
3767 default
3768 New switch -gnatI to disable representation clauses
3769 Implement new pragma Implicit_Packing
3770
3771 * usage.adb:
3772 Warning for non-local exception propagation now off by default
3773 Add warning for unchecked conversion of pointers wi different
3774 conventions.
3775 New switch -gnatI to disable representation clauses
3776
3777 * usage.adb: new switch -gnatyS
3778
3779 * gnat_ugn.texi: For the gnatcheck Non_Qualified_Aggregates rule add a
3780 note that aggregates of anonymous array types are not flagged.
3781 -gnatwc now includes membership tests optimized away
3782 -gnatw.x warnings are now off by default
3783 Added conditional compilation Appendix
3784 Add documentation of -gnatI
3785 Add documentation for new -gnatyS style check
3786 Update documentation about SAL and auto-init on Windows.
3787
3788 * gnat_rm.texi:
3789 Add documentation for pragma Check_Name and 'Enabled attribute
3790 Document that Eliminate on dispatching operation is ignored
3791 Document IDE attributes VCS_Repository_Root and VCS_Patch_Root.
3792 Document pragma Main
3793 Document pragma Implicit_Packing
3794
3795 * sem_ch13.adb: Add warning for unchecked conversion of pointers wi
3796 different conventions
3797 New switch -gnatI to disable representation clauses
3798
3799 * switch-c.adb (Scan_Front_End_Switches): When a -gnat switch is not
3800 recognized, report the invalid characters including "-gnat" instead of
3801 just the first character in the switch.
3802 New switch -gnatI to disable representation clauses
3803 Set Warn_On_Object_Renames_Function true for -gnatg
3804
3805 * vms_data.ads: Add doc for /IGNORE_REP_CLAUSES
3806 Add STATEMENTS_AFTER_THEN_ELSE as synonym for -gnatyS
3807 Add qualifier /ADD_PROJECT_SEARCH_DIR= for different tools, equivalent
3808 to switch -aP (add directory to project search dir).
3809
3810 * par-prag.adb: Implement new pragma Implicit_Packing
3811
3812 * sem_prag.adb (Analyze_Pragma, case Complex_Representation): Mark the
3813 type as having a non-standard representation, to force expansion on
3814 conversion to related types.
3815 (Analyze_Pragma): Warn on misspelled pragma
3816 (Analyze_Pragma, case Convention_Identifier): Fix checking of second arg
3817 Ensure consistent use of # in error messages
3818 Implement pragma Implicit_Packing
3819
38202007-08-14 Olivier Hainque <hainque@adacore.com>
3821 Eric Botcazou <ebotcazou@adacore.com>
3822
3823 * targtyps.c (get_target_maximum_default_alignment): New function.
3824 Maximum alignment
3825 that the compiler might choose by default for a type or object.
3826 (get_target_default_allocator_alignment): New function. Alignment known
3827 to be honored by the target default allocator.
3828 (get_target_maximum_allowed_alignment): New function. Maximum alignment
3829 we might accept for any type or object on the target.
3830 (get_target_maximum_alignment): Now synonym of maximum_default_alignment
3831
3832 * gigi.h (get_target_maximum_default_alignment): Declare new function.
3833 (get_target_default_allocator_alignment): Likewise.
3834 (get_target_maximum_allowed_alignment): Likewise.
3835
3836 PR ada/19037
3837 * decl.c (gnat_to_gnu_entity) <object>: Except for the renaming of the
3838 result of a function call, first try to use a stabilized reference for
3839 a constant renaming too.
3840 (validate_alignment): Use target_maximum_allowed_alignment instead of
3841 MAX_OFILE_ALIGNMENT as the upper bound to what we accept.
3842 (gnat_to_gnu_entity): Use common nodes directly.
3843 (gnat_to_gnu_entity) <object>: Pick the values of the type to annotate
3844 alignment and size for the object.
3845 (lvalue_required_p): Handle N_Parameter_Association like N_Function_Call
3846 and N_Procedure_Call_Statement.
3847 (takes_address): Rename to lvalue_required_p, add third parameter
3848 'aliased' and adjust recursive calls.
3849 <N_Indexed_Component>: Update 'aliased' from the array type.
3850 <N_Selected_Component>: New case.
3851 <N_Object_Renaming_Declaration>: New Likewise.
3852 (Identifier_to_gnu): Adjust for above changes.
3853 (maybe_stabilize_reference) <CONST_DECL>: New case.
3854
3855 * utils2.c (build_binary_op) <ARRAY_RANGE_REF>: Look through conversion
3856 between type variants.
3857 (build_simple_component_ref): Likewise.
3858 (build_call_alloc_dealloc): Use target_default_allocator_alignment
3859 instead of BIGGEST_ALIGNMENT as the threshold to trigger the super
3860 aligning type circuitry for allocations from the default storage pool.
3861 (build_allocator): Likewise.
3862 (build_simple_component_ref): Manually fold the reference for a
3863 constructor if the record type contains a template.
3864
3865 * utils.c (value_zerop): Delete.
3866 (gnat_init_decl_processing): Emit debug info for common types.
3867 (rest_of_record_type_compilation): If a union contains a field
3868 with a non-constant qualifier, treat it as variable-sized.
3869 (finish_record_type): Give the stub TYPE_DECL a name.
3870 (rest_of_record_type_compilation): Likewise.
3871 (convert) <CONSTRUCTOR>: New case. Build a new constructor if
3872 types are equivalent array types.
3873 (create_field_decl): Claim fields of any ARRAY_TYPE are addressable,
3874 even if the type is not passed by reference.
3875 (static_ctors, static_dtors): Delete.
3876 (end_subprog_body): Do not record constructors and destructors.
3877 (build_global_cdtor): Delete.
3878 (gnat_write_global_declarations): Do not call build_global_cdtor.
3879
0ab29e91 3880 * lang-spARGET_VXWORKS_RTP is defined, append -mrtp when
ab6328d0
AC
3881 -fRTS=rtp is specified.
3882 If CONFIG_DUAL_EXCEPTIONS is 1, append -fsjlj when -fRTS=sjlj is
3883 specified.
3884
3885 * misc.c (gnat_init_gcc_eh): Use __gnat_eh_personality_sj for the name
3886 of the personality function with SJLJ exceptions.
3887
3888 * raise-gcc.c (PERSONALITY_FUNCTION): Use __gnat_eh_personality_sj for
3889 the name of the personality function with SJLJ exceptions.
3890
38912007-08-14 Robert Dewar <dewar@adacore.com>
3892 Ed Schonberg <schonberg@adacore.com>
3893
3894 * par.ads, par.adb: Improve handling of extra right parens.
3895 (Par): Remove flag From_Limited_With_Clause.
3896
3897 * par-util.adb, par-ch3.adb: Improve error recovery for bad constraint
3898 Improve handling of extra right parens.
3899
39002007-08-14 Robert Dewar <dewar@adacore.com>
3901
3902 * par-tchk.adb (TF_Semicolon): Improve error recovery
3903
39042007-08-14 Robert Dewar <dewar@adacore.com>
3905 Ed Schonberg <schonberg@adacore.com>
3906
3907 * sem_attr.ads, sem_attr.adb (Analyze_Attribute, case Value): For
3908 enumeration type, mark all literals as referenced.
3909 (Eval_Attribute, case 'Image): If the argument is an enumeration
3910 literal and names are available, constant-fold but mark nevertheless as
3911 non-static.
3912 Clean up function names.
3913 (Name_Modifies_Prefix): Rename to Name_Implies_Lvalue_Prefix. Clarify
3914 comment.
3915 (Requires_Simple_Name_Prefix): Removed.
3916
39172007-08-14 Robert Dewar <dewar@adacore.com>
3918 Ed Schonberg <schonberg@adacore.com>
3919
3920 * sem_ch11.adb: Improved warnings for unused variables
3921
3922 * sem_ch3.ads, sem_ch3.adb (Build_Derived_Record_Type): If the ancestor
3923 is a synchronized interface, the derived type is limited.
3924 (Analyze_Object_Declaration): Mark the potential coextensions in the
3925 definition and expression of an object declaration node.
3926 (Build_Derived_Type): For the completion of a private type declaration
3927 with a derived type declaration, chain the parent type's representation
3928 items to the last representation item of the derived type (not the
3929 first one) if they are not present already.
3930 (Analyze_Object_Declaration, Constant_Redeclaration): Allow incomplete
3931 object declaration of forward references to tags.
3932 (Access_Subprogram_Declaration): In Ada2005, anonymous access to
3933 subprogram types can appear as access discriminants of synchronized
3934 types.
3935 (OK_For_Limited_Init_In_05): The initialization is legal is it is a call
3936 given in prefixed form as a selected component.
3937 (Process_Discriminants): If not all discriminants have defaults, place
3938 error message on a default that is present.
3939 (Analyze_Private_Extension_Declaration): Diagnose properly an attempt to
3940 extend a synchronized tagged type.
3941 Improved warnings for unused variables
3942 (Is_Visible_Component): Fix a visibility hole on a component inherited
3943 by a private extension when parent is itself declared as a private
3944 extension, and the derivation is in a child unit.
3945 (Find_Hidden_Interface): Move spec from the package body.
3946
39472007-08-14 Robert Dewar <dewar@adacore.com>
3948 Ed Schonberg <schonberg@adacore.com>
3949
3950 * sem_ch5.adb: Improve warnings on redundant assignments
3951
3952 * sem_util.ads, sem_util.adb: (Is_Variable): Add defense against junk
3953 parameter
3954 (Is_Synchronized_Tagged_Type): New subprogram that returns true
3955 in case of synchronized tagged types (AARM 3.9.4 (6/2)).
3956 (Safe_To_Capture_Value): Can now return True for constants, even if Cond
3957 is set to False. Improves handling of Known_[Not_]Null.
3958 (Wrong_Type): Special case address arithmetic attempt
3959 (Collect_Abstract_Interfaces): Add new formal to allow collecting
3960 abstract interfaces just using the partial view of private types.
3961 (Has_Abstract_Interfaces): Add new formal to allow checking types
3962 covering interfaces using the partial view of private types.
3963 (Is_Fully_Initialized_Type): Special VM case for uTag component. This
3964 component still needs to be defined in this case, but is never
3965 initialized as VMs are using other dispatching mechanisms.
3966 (Abstract_Interface_List): For a protected type, use base type to get
3967 proper declaration.
3968 Improve warnings on redundant assignments
3969 (Is_Variable): Handle properly an implicit dereference of a prefixed
3970 function call.
3971 (Build_Actual_Subtype): If this is an actual subtype for an
3972 unconstrained formal parameter, use the sloc of the body for the new
3973 declaration, to prevent anomalises in the debugger.
3974
39752007-08-14 Robert Dewar <dewar@adacore.com>
3976
3977 * sem_elim.adb (Set_Eliminated): Ignore pragma Eliminate for
3978 dispatching operation
3979
39802007-08-14 Ed Schonberg <schonberg@adacore.com>
3981 Gary Dismukes <dismukes@adacore.com>
3982
3983 * exp_aggr.ads,
3984 exp_aggr.adb (Convert_Aggr_In_Allocator): Use Insert_Actions to place
3985 expanded aggregate code before allocator, and ahead of declaration for
3986 temporary, to prevent access before elaboration when the allocator is
3987 an actual for an access parameter.
3988 (Is_Static_Dispatch_Table_Aggregate): Handle aggregates initializing
3989 the TSD and the table of interfaces.
3990 (Convert_To_Assignments): Augment the test for delaying aggregate
3991 expansion for limited return statements to include the case of extended
3992 returns, to prevent creation of an unwanted transient scope.
3993 (Is_Static_Dispatch_Table_Aggregate): New subprogram.
3994 (Expand_Array_Aggregate): Handle aggregates associated with
3995 statically allocated dispatch tables.
3996 (Expand_Record_Aggregate): Handle aggregates associated with
3997 statically allocated dispatch tables.
3998 (Gen_Ctrl_Actions_For_Aggr): Generate a finalization list for allocators
3999 of anonymous access type.
4000
40012007-08-14 Ed Schonberg <schonberg@adacore.com>
4002
4003 * exp_ch5.adb (Expand_Assign_Array): If source or target of assignment
4004 is a variable that renames a slice, use the variable itself in the
4005 expannsion when the renamed expression itself may be modified between
4006 the declaration of the renaming and the array assignment.
4007
40082007-08-14 Jerome Guitton <guitton@adacore.com>
4009
4010 * s-taprop-lynxos.adb, s-taprop-tru64.adb, s-taprop-irix.adb,
4011 s-taprop-hpux-dce.adb, s-taprop-dummy.adb, s-taprop-solaris.adb,
4012 s-taprop-vms.adb, s-taprop-posix.adb (Continue_Task, Stop_All_Tasks):
4013 New functions; dummy implementations.
4014
4015 * s-osinte-vxworks.ads (Task_Stop, Task_Cont, Int_Lock, Int_Unlock): New
4016 functions, used to implement the multi-tasks mode routines on VxWorks.
4017
4018 * s-osinte-vxworks.adb, s-osinte-vxworks6.adb (Task_Cont, Task_Stop):
4019 New functions, thin
4020 binding to the VxWorks routines which have changed between VxWorks 5
4021 and 6.
4022 (Int_Lock, Int_Unlock): New function, thin binding to kernel routines
4023 which are not callable from a RTP.
4024
4025 * s-taprop-vxworks.adb (Stop_All_Tasks, Continue_Task): New functions,
4026 implemented for the multi-tasks mode on VxWorks 5 and 6.
4027
4028 * s-taprop.ads (Stop_All_Tasks, Continue_Task): New functions.
4029
4030 * s-tasdeb.ads, s-tasdeb.adb (Continue_All_Tasks, Stop_All_Tasks): New
4031 functions.
4032
40332007-08-14 Vincent Celier <celier@adacore.com>
4034
4035 * clean.adb, fmap.adb, sinput-p.adb, sinput-p.ads, gnatcmd.adb,
4036 gnatname.adb, makeutl.ads, makeutl.adb, makegpr.adb, mlib-tgt-vms.adb
4037 mlib-tgt-darwin.adb, mlib-tgt-lynxos.adb, mlib-prj.adb, mlib-tgt.adb,
4038 mlib-tgt.ads, mlib-tgt-irix.adb mlib-tgt-hpux.adb, mlib-tgt-linux.adb,
4039 mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
4040 mlib-tgt-mingw.adb, mlib-tgt-vxworks.adb, mlib-tgt-aix.adb,
4041 mlib-tgt-tru64.adb, mlib.ads, mlib.adb (Create_Sym_Links): New
4042 procedure.
4043 (Major_Id_Name): New function.
4044 mlib-tgt.ads/mlib.tgt.adb:
4045 (Library_Major_Minor_Id_Supported): New function, default returns True
4046 Most mlib-tgt-*.adb that support shared libraries and symbolic links:
4047 (Build_Dynamic_Library): Add support for major/minor ids for shared libs
4048 Other mlib-tgt-*.adb (aix, mingw, vms, vxworks, xi):
4049 Implementation of Library_Major_Minor_Id_Supported returns False
4050 clean.adb:
4051 (Clean_Library_Directory): If major/minor ids are supported, clean all
4052 library files.
4053 Major update of the Project Manager and of the project aware tools,
4054 including gprmake, so that the same sources in the GNAT repository
4055 can be used by gprbuild.
4056
40572007-08-14 Olivier Hainque <hainque@adacore.com>
4058
4059 * system-solaris-x86.ads (ZCX_By_Default): Switch to True.
4060 (GCC_ZCX_Support): Switch to True.
4061
4062 * s-intman-solaris.adb (Notify_Exception): Call
4063 Adjust_Context_For_Raise before raising, as expected for signal
4064 handlers in general.
4065
4066 * s-intman-posix.adb (Notify_Exception): Remove declaration of
4067 Adjust_Context_For_Raise, moved to the spec of this unit to be visible
4068 to other implementation bodies.
4069
4070 * s-intman.ads (Adjust_Context_For_Raise): Declare and import here, to
4071 be visible by multiple implementation bodies.
4072
4073 * init.c [VMS section] (__gnat_handle_vms_condition): Adjust context
4074 only for conditions coming from hardware.
4075 [alpha-tru64 section] (__gnat_adjust_context_for_raise): Implement,
4076 adjustments to signal context prior to exception raise from signal
4077 handler.
4078 (__gnat_map_signal for VxWorks): Map SIGSEGV to Storage_Error in RTP
4079 mode.
4080 Solaris section: (__gnat_adjust_context_for_raise): New function.
4081 Implementation of the machine context adjustments to perform prior to
4082 raise from a signal handler. Version for both sparc and x86.
4083 (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Define.
4084 (__gnat_error_handler): Expect a third argument, ucontext_t *. Adjust it
4085 prior to raising as expected for any handler, before possible nested
4086 faults to make sure all the contexts in a chain have been adjusted by
4087 the time we propagate.
4088
40892007-08-14 Pascal Obry <obry@adacore.com>
4090
4091 * s-osinte-mingw.ads: Add support for Ada.Execution_Time on Windows.
4092 (SYSTEM_INFO): New record.
4093 (SetThreadIdealProcessor): New imported routine needed for supporting
4094 task_info pragma on Windows.
4095
4096 * s-taprop-mingw.adb (Enter_Task): Check if CPU number given in task
4097 info can be applied to the current host.
4098 (Create_Task): Set the ideal processor if information is present.
4099
4100 * s-tasinf-mingw.adb, s-tasinf-mingw.ads,
4101 a-exetim-mingw.adb, a-exetim-mingw.ads: New files.
4102
41032007-08-14 Olivier Hainque <hainque@adacore.com>
4104
4105 * s-taprop-linux.adb (Get_Stack_Attributes): New subprogram. Fetch the
4106 stack size and initial stack pointer value for a given task.
4107 (Enter_Task): Get the stack attributes of the task we are entering and
4108 let the stack checking engine know about them.
4109
4110 * s-stchop.adb, s-stchop.ads (Notify_Stack_Attributes): New subprogram.
4111 Let the stack-checking engine know about the initial sp value and stack
4112 size associated with the current task.
4113 (Set_Stack_Info): If a stack base has been notified for the current
4114 task, honor it. Fallback to the previous less accurate method otherwise.
4115
4116 * s-stchop-vxworks.adb (Notify_Stack_Attributes): Dummy body.
4117
41182007-08-14 Ed Schonberg <schonberg@adacore.com>
4119
4120 * sem_ch10.adb: Create a limited view of an incomplete type, to make
4121 treatment of limited views uniform for all visible declarations in a
4122 limited_withed package.
4123 Set flag indicating that a subprogram body for a child unit has a
4124 generated spec.
4125 (Analyze_Compilation_Unit): If unit is a subprogram body that has no
4126 separate declaration, remove the unit name from visibility after
4127 compilation, so that environment is clean for subsequent compilations.
4128 (Install_Limited_Context_Clauses): Do not install a
4129 limited_private_with_clause unless the current unit is a body or a
4130 private child unit.
4131 (Analyze_Subunit, Install_Parents): Treat generic and non-generic units
4132 in the same fashion.
4133 (Install_Limited_Withed_Unit): Do not install a limited with clause if
4134 it applies to the declaration of the current package body.
4135 (Remove_Private_With_Clauses): If there is a regular with_clause for
4136 the unit, delete Private_With_Clause from context, to prevent improper
4137 hiding when processing subsequent nested packages and instantiations.
4138
41392007-08-14 Jose Ruiz <ruiz@adacore.com>
4140
4141 * adaint.c (__gnat_is_absolute_path): For VxWorks systems we accept
4142 dir/file, device:/dir/file, and device:drive_letter:/dir/file as
4143 representing absolute path names.
4144 __gnat_set_file_time_name [VMS]: Fix some 64/32 bit issues.
4145
4146 * cstreams.c (__gnat_full_name for VxWorks): Use
4147 __gnat_is_absolute_path to detect whether we need to add the current
4148 directory to normalize the path.
4149
41502007-08-14 Javier Miranda <miranda@adacore.com>
4151
4152 * a-tags.ads,
4153 a-tags.adb (Displace): Associate a message with the raised CE
4154 exception.
4155 (To_Addr_Ptr, To_Address, To_Dispatch_Table_Ptr,
4156 To_Object_Specific_Data_Ptr To_Predef_Prims_Ptr,
4157 To_Tag_Ptr, To_Type_Specific_Data_Ptr): Moved here from the package
4158 spec.
4159 (Default_Prim_Op_Count): Removed.
4160 (IW_Membership, Get_Entry_Index, Get_Offset_Index, Get_Prim_Op_Kind,
4161 Register_Tag, Set_Entry_Index, Set_Offset_To_Top, Set_Prim_Op_Kind):
4162 Remove pragma Inline_Always.
4163
4164 * rtsfind.ads (Default_Prim_Op_Count): Removed
4165 (Max_Predef_Prims): New entity
4166 (RE_Expanded_Name): Removed
4167 (RE_HT_Link): Removed
4168 (RE_Iface_Tag): Remmoved
4169 (RE_Ifaces_Table): Removed
4170 (RE_Interfaces_Array): Removed
4171 (RE_Interface_Data_Element): Removed
4172 (RE_Nb_Ifaces): Removed
4173 (RE_RC_Offset): Removed
4174 (RE_Static_Offset_To_Top): Removed
4175
4176 * exp_atag.ads, exp_atag.adb (Build_Inherit_Prims): Addition of a new
4177 formal.
4178 (Build_Inherit_Predefined_Prims): Replace occurrences of Default_
4179 Prim_Op_Count by Max_Predef_Prims.
4180
41812007-08-14 Thomas Quinot <quinot@adacore.com>
4182 Vincent Celier <celier@adacore.com>
4183
4184 * binde.adb (Elab_All_Links): Remove unnecessary call to
4185 Generic_Separately_Compiled (if a unit satisfies this predicate, there
4186 won't be an associated Afile).
4187 (Elab_All_Links): Fail if a referenced unit cannot be found
4188
4189 * bindgen.adb:
4190 Fix comments in bindgen regarding consistency checks done in Bcheck:
4191 the checks are made across units within a partition, not across several
4192 partitions.
4193 Fix generation of C binder file for VxWorks.
4194
4195 * lib.ads, lib.adb (Generic_Separately_Compiled): Rename to
4196 Generic_May_Lack_ALI, more descriptive of the current use of the
4197 predicate, and update documentation.
4198
4199 * lib-writ.ads, lib-writ.adb (Write_With_Lines): Minor code
4200 reorganization and documentation update for the case of predefined
4201 library generics (for which we do not reference an Afile).
4202
42032007-08-14 Robert Dewar <dewar@adacore.com>
4204
4205 * s-intman-irix.adb, s-osinte-irix.adb, s-osinte-irix.ads,
4206 s-proinf-irix-athread.ads, s-osinte-hpux-dce.adb, s-osinte-hpux-dce.ads,
4207 s-parame-hpux.ads, s-intman-dummy.adb, s-tasinf-solaris.adb,
4208 s-tasinf-solaris.ads, s-asthan-vms-alpha.adb, s-inmaop-vms.adb,
4209 s-intman-vms.adb, s-intman-vms.ads, s-osprim-mingw.adb,
4210 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-intman-vxworks.ads,
4211 s-intman-vxworks.ads, s-intman-vxworks.adb, s-parame-vxworks.ads,
4212 s-tfsetr-vxworks.adb, s-interr.adb, s-interr.ads, a-tasatt.adb,
4213 exp_ch13.adb, s-htable.ads, s-imgboo.ads, s-imglli.ads, s-imgllu.ads,
4214 s-imguns.ads, g-eacodu.adb, par-ch12.adb, s-stache.ads, s-stausa.adb,
4215 s-poosiz.adb, s-parame.ads, s-mastop.ads, s-osinte-darwin.ads,
4216 a-chtgke.adb, s-asthan-vms-alpha.adb, s-parame-vms-alpha.ads,
4217 s-parame-vms-ia64.ads, s-parame-vxworks.adb, s-except.ads,
4218 g-altcon.adb: Minor reformatting
4219
4220 ada-tree.h: Delete empty line.
4221
4222 ali.ads: Minor reformatting
4223 Clarification of comments.
4224 Minor spelling correction
4225
4226 * exp_dbug.adb: Add Warnings Off to suppress new warning
4227
4228 * a-witeio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
4229 formal
4230
4231 * a-strunb.adb (Set_Unbounded_String): Avoid memory leak by freeing old
4232 value
4233
4234 * a-textio.adb (Write): Remove an unnecessary IN OUT mode from
4235
4236 * a-textio.ads: Reorder the standard input/output/error declarations
4237 for consistency.
4238
4239 * g-dirope.adb, g-dirope.ads: Change Dir to mode IN for Open call
4240
4241 * par-ch2.adb: Recognize RM specially in errout
4242 Change 'R'M to RM in all error messages
4243
4244 * scng.adb: Recognize RM specially in errout
4245
4246 * sem.ads, sem.adb, exp_strm.adb, exp_ch5.ads, expander.adb: Rename
4247 N_Return node to be N_Simple_Return, to reflect Ada 2005 terminology.
4248
4249 * s-direio.adb: Add missing routine header box.
4250
4251 * sem_attr.ads: Add ??? comments
4252
4253 * sem_eval.adb: Recognize RM specially in errout
4254 Change 'R'M to RM in all error messages
4255
4256 * sem_maps.adb, sem_maps.ads: Remove some unnecessary IN OUT modes
4257
4258 * s-tasinf.ads: Fix minor comment typo.
4259
4260 * a-cihama.adb: Minor comment addition
4261
4262 * a-ztexio.adb (Write): Add Warnings (Off) for unneeded IN OUT mode
4263 formal
4264
4265 * s-tasinf-tru64.ads: Fix minor comment typo.
4266
4267 * itypes.ads: Comment update.
4268
4269 * ali-util.adb: Remove Generic_Separately_Compiled guard, not needed
4270 anymore.
4271
4272 * argv.c: Added protection against null gnat_argv and gnat_envp.
4273
4274 * bcheck.adb (Check_Consistency): Use correct markup character ({) in
4275 warning message when Tolerate_Consistency_Errors is True.
4276
4277 * cstand.adb (Create_Standard): Do not call Init_Size_Alignment for
4278 Any_Id, as this subprogram is only applicable to *type* entities (it
4279 sets RM_Size). Instead initialize just Esize and Alignment.
4280
42812007-08-14 Bob Duff <duff@adacore.com>
4282
4283 * a-cihama.ads, a-cidlli.ads, a-chtgop.ads, a-chtgop.adb, a-cdlili.ads,
4284 a-cihase.adb, a-cihase.ads, a-cohase.adb, a-cohase.ads, a-ciorma.ads,
4285 a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-ciorse.ads, a-cohama.ads,
4286 a-cohata.ads, a-convec.adb, a-coinve.ads, a-coinve.adb, a-convec.ads,
4287 a-coorse.ads (Next): Applied pragma Inline.
4288 Make all Containers packages Remote_Types (unless they are already
4289 Pure).
4290 (Previous): applied pragma Inline
4291 (Elements_Type): is now a record instead of an array
4292
42932007-08-14 Thomas Quinot <quinot@adacore.com>
4294
4295 * table.adb, g-table.adb, g-dyntab.adb (Append): Reimplement in terms
4296 of Set_Item.
4297 (Set_Item): When the new item is an element of the currently allocated
4298 table passed by reference, save a copy on the stack if we're going
4299 to reallocate. Also, in Table.Set_Item, make sure we test the proper
4300 variable to determine whether to call Set_Last.
4301
4302 * sinput-d.adb, sinput-l.adb, stringt.adb, switch-m.adb,
4303 symbols-vms.adb, symbols-processing-vms-alpha.adb,
4304 symbols-processing-vms-ia64.adb, sem_elab.adb, repinfo.adb: Replace
4305 some occurrences of the pattern
4306 T.Increment_Last;
4307 T.Table (T.Last) := Value;
4308 with a cleaner call to
4309 T.Append (Value);
4310
43112007-08-14 Ed Schonberg <schonberg@adacore.com>
4312 Gary Dismukes <dismukes@adacore.com>
4313 Thomas Quinot <quinot@adacore.com>
4314
4315 * sem_ch12.ads, sem_ch12.adb (Instantiate_Type): If the formal is a
4316 derived type with interface progenitors use the analyzed formal as the
4317 parent of the actual, to create renamings for all the inherited
4318 operations in Derive_Subprograms.
4319 (Collect_Previous_Instances): new procedure within of
4320 Load_Parent_Of_Generic, to instantiate all bodies in the compilation
4321 unit being loaded, to ensure that the generation of global symbols is
4322 consistent in different compilation modes.
4323 (Is_Tagged_Ancestor): New function testing the ancestor relation that
4324 takes progenitor types into account.
4325 (Validate_Derived_Type_Instance): Enforce the rule of 3.9.3(9) by
4326 traversing over the primitives of the formal and actual types to locate
4327 any abstract subprograms of the actual type that correspond to a
4328 nonabstract subprogram of the formal type's ancestor type(s), and issue
4329 an error if such is found.
4330 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation,
4331 Instantiate_Package_Body, Instantiate_Subprogram_Body):
4332 Remove bogus guard around calls to Inherit_Context.
4333 (Reset_Entity): If the entity is the selector of a selected component
4334 that denotes a named number, propagate constant-folding to the generic
4335 template only if the named number is global to the generic unit.
4336 (Set_Instance_Env): Only reset the compilation switches when compiling
4337 a predefined or internal unit.
4338
43392007-08-14 Ed Schonberg <schonberg@adacore.com>
4340
4341 * sem_ch4.adb (Try_Class_Wide_Operation): use base type of first
4342 parameter to determine whether operation applies to the prefix.
4343 (Complete_Object_Operation): If actual has an access type and
4344 controlling formal is not an in_parameter, reject the actual if it is
4345 an access_to_constant type.
4346 (Try_Primitive_Operation): If the type of the prefix is a formal tagged
4347 type, the candidate operations are found in the scope of declaration of
4348 the type, because the type has no primitive subprograms.
4349 (Analyze_Selected_Component): If prefix is class-wide, and root type is
4350 a private extension, only examine visible components before trying to
4351 analyze as a prefixed call.
4352 Change Entity_List to Type_To_Use, for better readability.
4353 (Has_Fixed_Op): Use base type when checking whether the type of an
4354 operator has a user-defined multiplication/division
4355 (Check_Arithmetic_Pair): Use Ada 2005 rules to remove ambiguities when
4356 user-defined operators are available for fixed-point types.
4357
43582007-08-14 Thomas Quinot <quinot@adacore.com>
4359 Ed Schonberg <schonberg@adacore.com>
4360
4361 * sem_cat.ads, sem_cat.adb (Has_Stream_Attribute_Definition): New
4362 formal At_Any_Place indicating, when True, that we want to test for
4363 availability of the stream attribute at any place (as opposed to the
4364 current visibility context only).
4365 (Missing_Read_Write_Attributes): A stream attribute is missing for the
4366 purpose of enforcing E.2.2(8) only if it is not available at any place.
4367 Take into account the Ada2005 pragma Has_Preelaborable_Initialization
4368 when checking the legality of an extension aggregate in a preelaborable
4369 package. Treat the literal null as a valid default expression in a
4370 component declaration for a type with preelaborable initialization.
4371 A limited interface is a legal progenitor for the designated type of a
4372 remote access to class-wide type.
4373
43742007-08-14 Thomas Quinot <quinot@adacore.com>
4375 Ed Schonberg <schonberg@adacore.com>
4376
4377 * sem_ch8.ads, sem_ch8.adb (Find_Type, case of a 'Base attribute
4378 reference): Use correct entity as denoted entity for the selector of
4379 the rewritten node.
4380 (Find_Direct_Name): Add comment about Generate_Reference incorrectly
4381 setting the Referenced_As_LHS flag for entities that are implicitly
4382 dereferenced.
4383 (Find_Type): If the type is an internally generated incomplete type,
4384 mark the full view as referenced, to prevent spurious warnings.
4385 (Find_Selected_Component, Has_Components): Handle properly non-limited
4386 views that are themselves incomplete types.
4387 Handle interfaces visible through limited-with clauses.
4388 (Analyze_Subprogram_Renaming): Disambiguate and set the entity of a
4389 subprogram generic actual for which we have generated a renaming.
4390 Warn when the renaming introduces a homonym of
4391 the renamed entity, and the renamed entity is directly visible.
4392
43932007-08-14 Ed Schonberg <schonberg@adacore.com>
4394 Hristian Kirtchev <kirtchev@adacore.com>
4395
4396 * sem_res.adb (Resolve_Allocator): Propagate any coextensions that
4397 appear in the subtree to the current allocator if it is not a static
4398 coextension.
4399 (Resolve_Allocator): Perform cleanup if resolution has determined that
4400 the allocator is not a coextension.
4401 (Resolve): Skip an interpretation hidden by an abstract operator only
4402 when the type of the interpretation matches that of the context.
4403 (Resolve): When looping through all possible interpretations of a node,
4404 do not consider those that are hidden by abstract operators.
4405 (Resolve_Actuals): When verifying that an access to class-wide object
4406 is an actual for a controlling formal, ignore anonymous access to
4407 subprograms whose return type is an access to class_wide type.
4408 (Resolve_Slice): If the prefix of the slice is a selected component
4409 whose type depends on discriminants, build its actual subtype before
4410 applying range checks on the bounds of the slice.
4411 (Valid_Conversion): In an instance or inlined body, compare root types,
4412 to prevent anomalies between private and public views.
4413 (Resolve): Improve error message for ambiguous fixed multiplication
4414 expressions that involve universal_fixed multiplying operations.
4415
44162007-08-14 Javier Miranda <miranda@adacore.com>
4417 Hristian Kirtchev <kirtchev@adacore.com>
4418
4419 * exp_ch9.adb (Build_Protected_Entry): Propagate the original source
4420 location to allow the correct generation of errors in case of
4421 restrictions applied to the expanded code.
4422 (Expand_Entry_Barrier): Remove all generated renamings for a barrier
4423 function if the condition does not reference them.
4424 (Expand_Entry_Body_Declarations): Mark the index constant as having a
4425 valid value.
4426
44272007-08-14 Thomas Quinot <quinot@adacore.com>
4428
4429 * exp_dist.adb (PolyORB_Support.Build_TypeCode_Function): When creating
4430 typecode parameters for a union (in a variant record), remove
4431 extraneous layer of Any wrapping for member label.
4432 (Expand_Receiving_Stubs_Bodies): For an RCI package body that has
4433 elabration statements, register the package with the name server
4434 at the beginning, not at the end, of the elaboration statements so
4435 that they can create remote access to subprogram values that designate
4436 remote subprograms from the package.
4437
44382007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
4439
4440 * g-catiio.adb (Image): For the case of %s, use Ada.Calendar.Time
4441 values to compute the number of seconds since the Unix Epoc in order to
4442 account for Daylight Savings Time. Perform special processing for dates
4443 that are earlier than the Unix Epoc to obtain a negative number.
4444
44452007-08-14 Emmanuel Briot <briot@adacore.com>
4446
4447 * g-comlin.adb (Getopt): Fix handling of "*" switch when not collapsing
4448 switches.
4449
44502007-08-14 Eric Botcazou <ebotcazou@adacore.com>
4451
4452 * gnatlink.adb (Gnatlink): Pass switches to the linker even if the
4453 binder-generated file is not in Ada.
4454 Pass -mrtp to the linker if it is GCC and --RTS=rtp has been
4455 recorded in the ALI file.
4456 Pass -fsjlj to the linker if it is GCC and --RTS=sjlj has been recorded.
4457
44582007-08-14 Vincent Celier <celier@adacore.com>
4459
4460 * gnatls.adb: (Corresponding_Sdep_Entry): Always return a value
4461 (Output_Source): Do nothing if parameter is No_Sdep_Id
4462
4463 * make.adb (Gnatmake): Do not rebuild an archive simply because a
4464 shared library it imports has a later time stamp.
4465 (Check): Resolve the symbolic links in the path name of the object
4466 directory.
4467 Check that the ALI file is in the correct object directory
4468 Check if a file name does not correspond to the mapping of units
4469 to file names.
4470 (Display_Version): New procedure
4471 (Initialize): Process switches --version and --help
4472 Use type Path_Name_Type for path name
4473
44742007-08-14 Paul Hilfinger <hilfinger@adacore.com>
4475
4476 * impunit.adb: Re-organize System.Random_Numbers and
4477 GNAT.Random_Numbers and add to builds.
4478
4479 * Makefile.rtl: Add s-rannum.ad* and g-rannum.ad*, a-assert*
4480
4481 * s-rannum.ads, s-rannum.adb, g-rannum.ads, g-rannum.adb: New files.
4482
4483 * a-assert.ads, a-assert.adb: New files.
4484
44852007-08-14 Gary Dismukes <dismukes@adacore.com>
4486
4487 * layout.adb (Layout_Type): In the case of access-to-subprogram types,
4488 if AAMP_On_Target is True, then the size of the type encompasses two
4489 addresses (a static link and a subprogram address), except in the case
4490 of library-level access types.
4491
44922007-08-14 Vincent Celier <celier@adacore.com>
4493
4494 * output.ads, output.adb (Write_Eol): Remove trailing spaces before
4495 writing the line.
4496 (Write_Eol_Keep_Blanks): New procedure to write a line, including
4497 possible trailing spaces.
4498 (Output_Source_Line): Call Write_Eol_Keep_Blanks to output a source line
4499
45002007-08-14 Javier Miranda <miranda@adacore.com>
4501
4502 * par-ch6.adb (P_Formal_Part): Fix wrong error message associated with
4503 null-excluding access types.
4504
45052007-08-14 Javier Miranda <miranda@adacore.com>
4506
4507 * sem_ch9.adb (Check_Interfaces): New subprogram that factorizes code
4508 that is common to Analyze_Protected_Type and Analyze_Task_Type. In case
4509 of private types add missing check on matching interfaces in the
4510 partial and full declarations.
4511 (Analyze_Protected_Type): Code cleanup.
4512 (Analyze_Task_Type): Code cleanup.
4513
45142007-08-14 Javier Miranda <miranda@adacore.com>
4515
4516 * sem_disp.adb (Check_Dispatching_Operation): Do not emit warning on a
4517 generated interface thunk.
4518
45192007-08-14 Ed Schonberg <schonberg@adacore.com>
4520
4521 * s-ficobl.ads: Declare AFCB as a tagged incomplete type, to prevent
4522 obsolescent warning on application of 'Class to an incomplete type.
4523
4524 * s-finroo.ads: Declare Root_Controlled as a tagged incomplete type, to
4525 prevent obsolescent warning on application of 'Class to an incomplete
4526 type.
4527
45282007-08-14 Pascal Obry <obry@adacore.com>
4529
4530 * s-fileio.adb (Is_Open): Add check for usability of the underlying
4531 file stream.
4532
45332007-08-14 Cyrille Comar <comar@adacore.com>
4534
4535 * s-finimp.adb (Detach_From_Final_List): make this procedure idempotent
4536 since it is potentially used in cases implying double finalization of
4537 the same object.
4538
45392007-08-14 Jose Ruiz <ruiz@adacore.com>
4540
4541 * s-tasini.adb (Get_Stack_Info): Move this function to
4542 System.Soft_Links.Tasking because it is common to the full and the
4543 restricted run times.
4544 (Init_RTS): Do not set the Get_Stack_Info soft link because it is done
4545 in SSL.Tasking.Init_Tasking_Soft_Links.
4546
4547 * s-solita.adb (Get_Stack_Info): Function moved from
4548 System.Tasking.Initialization because it is common to the full and the
4549 restricted run times.
4550 (Init_Tasking_Soft_Links): Set the tasking soft link for Get_Stack_Info.
4551
45522007-08-14 Arnaud Charlet <charlet@adacore.com>
4553
4554 * s-tpobop.ads, s-tpobop.adb, s-tasren.ads, s-tasren.adb,
4555 s-taskin.ads (Requeue_With_Abort): Rename field With_Abort.
4556 (PO_Do_Or_Queue, Task_Do_Or_Queue, Requeue_Call): Remove With_Abort
4557 parameter.
4558
4559 * s-tassta.adb (Task_Wrapper): Increased value of the small overflow
4560 guard to 12K.
4561
45622007-08-14 Gary Dismukes <dismukes@adacore.com>
4563
4564 * s-veboop.adb (SU): New named number initialized to
4565 System.Storage_Unit.
4566 (True_Val): The initialization expression is revised to use SU (=
4567 Storage_Unit) rather than assuming 8 for the component size of an
4568 unpacked Boolean array.
4569
45702007-08-14 Tristan Gingold <gingold@adacore.com>
4571
4572 * tracebak.c: Use tb-ivms.c on OpenVMS Itanium.
4573
4574 * tb-ivms.c: New file.
4575
4576 * g-trasym-vms-ia64.adb: Fixed for OpenVMS version 8.2
4577
45782007-08-14 Geert Bosch <bosch@adacore.com>
4579
4580 * i-forbla.ads, i-forbla.adb, a-ngcoar.adb, a-ngcoar.ads, i-forlap.ads,
4581 s-gearop.adb, s-gecobl.adb, s-gecobl.ads, s-gerela.adb, s-gerela.ads:
4582 Add required linker pragmas for automatically linking with the gnalasup
4583 linear algebra support library, and the systems math library.
4584 Rename cdot to cdotu and zdot to zdotu.
4585 Update header comment to describe purpose of package.
4586
45872007-08-14 Thomas Quinot <quinot@adacore.com>
4588
4589 * exp_ch7.adb (Find_Final_List): For an anonymous access type that has
4590 an explicitly specified Associated_Final_Chain, use that list.
4591 (Expand_N_Package_Body): Build dispatch tables of library level tagged
4592 types.
4593 (Expand_N_Package_Declaration): Build dispatch tables of library level
4594 tagged types. Minor code cleanup.
4595
45962007-08-14 Vincent Celier <celier@adacore.com>
4597
4598 * gnatchop.adb (Terminate_Program): Remove exception and use
4599 Types.Terminate_Program instead.
4600
4601 * osint.ads, osint.adb (Current_Exit_Status): New global variable
4602 (Find_Program_Name): Added protection against empty name.
4603 (OS_Exit_Through_Exception): New procedure
4604
4605 * s-os_lib.ads, s-os_lib.adb (OS_Exit): New procedure body
4606 (OS_Exit_Default): New procedure that contains the previous
4607 implementation of procedure OS_Exit.
4608 (Final_Value): Remove obsolete Interix stuff.
4609
46102007-08-14 Thomas Quinot <quinot@adacore.com>
4611
4612 * g-socket.ads: Reorganize example code so that it also works on
4613 Windows XP.
4614
46152007-08-14 Tristan Gingold <gingold@adacore.com>
4616
4617 * g-trasym.ads: AIX now supports symbolic backtraces.
4618
46192007-08-14 Ed Schonberg <schonberg@adacore.com>
4620
4621 * lib-load.adb (From_Limited_With_Chain): Always scan the stack of
4622 units being loaded to detect circularities. A circularity may be
4623 present even if the current chain of pending units to load starts from
4624 a limited_with_clause.
4625
4626 * lib-load.ads: Change profile of Load_Unit to use a with_clause
4627 rather than a boolean flag, in order to detect circularities in
4628 with_clauses.
4629
4630 * par-load.adb: Use current with_clause in calls to Load_Unit, rather
4631 than propagating the From_Limited_With flag, in order to handle
4632 properly circularities involving with_clauses.
4633
46342007-08-14 Nicolas Setton <setton@adacore.com>
4635
4636 * link.c (FreeBSD): Add "const" keyword where needed, to eliminate
4637 warnings.
4638
46392007-08-14 Arnaud Charlet <charlet@adacore.com>
4640
4641 * Makefile.in: GNATRTL_LINEARALGEBRA_OBJS: New variable holding objects
4642 to build for libgnala.
4643 libgnat: Add rules to build libgnala.a
4644 (LIBGNAT_TARGET_PAIRS for VxWorks): Remove s-osinte-vxworks.adb from
4645 target pairs of the VxWorks 6 kernel runtime, use it only for VxWorks 5.
4646 Add s-osinte-vxworks-kernel.adb to the target pairs of the
4647 kernel run-time lib for VxWorks 6, which would provide a different
4648 implementation for Task_Cont and Task_Stop than the VxWorks 5 version.
4649 x86-solaris section (EH_MECHANISM): Set to -gcc, as this port is now
4650 running ZCX by default.
4651 Add g-sttsne-locking to LynxOS version.
4652 Remove g-sttsne-vxworks.ads; use g-sttsne-locking.ads instead.
4653 On x86/darwin, use a-numaux-x86.ad? and system-darwin-x86.ads.
4654
4655 * system-darwin-x86.ads: New file.
4656
4657 * Make-lang.in: Delete files before copying onto them, so if they are
4658 read-only, the copy won't fail.
4659 Update dependencies
4660
46612007-08-14 Pascal Obry <obry@adacore.com>
4662
4663 * mdll-fil.adb, * mdll.adb: Implement a more consistent libraries
4664 naming scheme.
4665
46662007-08-14 Vincent Celier <celier@adacore.com>
4667
4668 * mlib-utl.adb (Gcc_Name): Change from constant String to String_Access
4669 (Gcc): Initialize Gcc_Name at the first call
4670
46712007-08-14 Ed Schonberg <schonberg@adacore.com>
4672
4673 * sem_ch7.adb (Analyze_Package_Specification): Do not install private
4674 with_clauses of the enclosing unit when analyzing the package
4675 specification of a nested instance.
4676
46772007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
4678
4679 * sinfo.ads, sinfo.adb (Is_Coextension, Set_Is_Coextension): Removed.
4680 (Is_Dynamic_Coextension, Set_Is_Dynamic_Coextension): New routines.
4681 Remove flag Is_Coextension. Add flag Is_Dynamic_Coextension. Update the
4682 layout of N_Allocator.
4683
46842007-08-14 Thomas Quinot <quinot@adacore.com>
4685
4686 * rtsfind.adb (Check_RPC): Add PCS version check.
4687
4688 * gnatvsn.ads, gnatvsn.adb: Add PCS version.
4689 (Gnat_Free_Software): New function.
4690
4691 * sem_dist.ads, sem_dist.adb (Get_PCS_Version): New subprogram. Returns
4692 the PCS_Version value from s-parint, used to check that it is consistent
4693 with what exp_dist expects.
4694
4695 * s-parint.ads (PCS_Version): New entity for checking consistency
4696 between exp_dist and PCS.
4697
4698 * gen-soccon.c: (SO_REUSEPORT): New constant.
4699
47002007-08-14 Hristian Kirtchev <kirtchev@adacore.com>
4701
4702 * a-calfor.adb (Image (Duration; Boolean)): Change type of local
4703 variable Sub_Second to Duration in order to accomodate a larger range
4704 of arithmetic operations.
4705
47062007-08-14 Bob Duff <duff@adacore.com>
4707
4708 * g-sttsne-locking.ads: Move comments from spec to body.
4709 * g-sttsne-locking.adb: Move comments from spec to body.
4710 * g-sttsne-vxworks.ads: Removed.
4711 * g-sttsne-vxworks.adb: Removed.
4712
4862826d
ILT
47132007-08-11 Ian Lance Taylor <iant@google.com>
4714
4715 * misc.c (gnat_get_alias_set): Change return type to
4716 alias_set_type.
4717
4d8a9bfe
KG
47182007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4719
4720 * decl.c, utils2.c: Fix whitespace in last change.
4721
39595763
KG
47222007-08-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4723
4724 * decl.c (compare_field_bitpos): Constify.
4725 * utils2.c (compare_elmt_bitpos): Likewise.
4726
08e7e8cb
AJ
47272007-07-27 Aurelien Jarno <aurelien@aurel32.net>
4728
4729 * s-osinte-kfreebsd-gnu.ads ((sigset_t_ptr): Removed, replaced by
4730 anonymous access type.
4731 (pthread_sigmask): Now take an access sigset_t.
4732
83983455
JS
47332007-07-05 Joel Sherrill <joel.sherrill@oarcorp.com>
4734
4735 * s-osinte-rtems.ads: Correct prototype of pthread_sigmask.
4736
a8257e58
EB
47372007-06-21 Eric Botcazou <ebotcazou@adacore.com>
4738
4739 PR tree-optimization/25737
4740 * misc.c (gnat_post_options): Do not force flag_tree_salias to 0.
4741
5be014d5
AP
47422007-06-15 Andrew Pinski <andrew_pinski@playstation.sony.com>
4743
4744 * trans.c (Attribute_to_gnu): When subtracting an
4745 offset from a pointer, use POINTER_PLUS_EXPR with
4746 NEGATE_EXPR instead of MINUS_EXPR.
4747 (gnat_to_gnu): Likewise.
4748 * utils.c (convert): When converting between
4749 thin pointers, use POINTER_PLUS_EXPR and sizetype
4750 for the offset.
4751 * utils2.c (known_alignment): POINTER_PLUS_EXPR
4752 have the same semantics as PLUS_EXPR for alignment.
4753 (build_binary_op): Add support for the semantics of
4754 POINTER_PLUS_EXPR's operands.
4755 When adding an offset to a pointer, use POINTER_PLUS_EXPR.
4756
b0464c88
RE
47572007-06-11 Rafael Avila de Espindola <espindola@google.com>
4758
a472f546
EB
4759 * trans.c (Attribute_to_gnu): Use signed_or_unsigned_type_for instead
4760 of get_signed_or_unsigned_type.
b0464c88
RE
4761 * misc.c (LANG_HOOKS_SIGNED_TYPE): Remove.
4762
93e17a25
BD
47632007-06-11 Bob Duff <duff@adacore.com>
4764 Thomas Quinot <quinot@adacore.com>
4765
4766 * g-stsifd-sockets.adb (Create): Work around strange behavior of
4767 'bind' on windows that causes 'connect' to fail intermittently, by
4768 retrying the 'bind'.
4769 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
4770
1bbf8502
DS
47712007-06-10 Duncan Sands <baldrick@free.fr>
4772
4773 * decl.c (gnat_to_gnu_entity): Use pointers to dummy nodes, rather
4774 than to void, for the fields when making a new fat pointer type.
4775 (gnat_substitute_in_type): Now substitute_in_type.
a472f546 4776 * gigi.h (gnat_substitute_in_type): Likewise. Adjust recursive calls.
1bbf8502
DS
4777 * trans.c (gnat_gimplify_expr): Remove COMPONENT_REF kludge.
4778 * utils.c (update_pointer_to): Update fat pointers by updating the
4779 dummy node pointers used for the fields.
4780
ec11296f
AC
47812007-06-06 Thomas Quinot <quinot@adacore.com>
4782 Bob Duff <duff@adacore.com>
4783
4784 * g-soccon-freebsd.ads, g-soccon-vxworks.ads:,
4785 g-soccon-aix.ads, g-soccon-irix.ads, g-soccon-hpux.ads,
4786 g-soccon-solaris.ads, g-soccon-vms.ads, g-soccon-tru64.ads: Add new
4787 constant Thread_Blocking_IO, always True by default, set False
4788 on a per-runtime basis.
4789 (Need_Netdb_Buffer): New constant.
4790
4791 * g-stheme.adb, g-sttsne.ads, g-sttsne-locking.ads,
4792 g-sttsne-locking.adb, g-sttsne-vxworks.ads, g-sttsne-vxworks.adb: New
4793 files.
4794
4795 * g-socthi-vxworks.ads, g-socthi-vxworks.adb,
4796 g-socthi-vms.ads, g-socthi-vms.adb (Safe_Gethostbyname,
4797 Safe_Gethostbyaddr, Safe_Getservbyname, Safe_Getservbyport): Use new
4798 child package Task_Safe_NetDB
4799 (Host_Error_Messages): Add stub body.
4800 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
4801
4802 * g-soccon-mingw.ads: Add Windows-specific constants.
4803 (Need_Netdb_Buffer): New constant.
4804 (GNAT.Sockets.Thin.C_Inet_Addr, Windows version): Remove useless Ada
4805 wrapper and import inet_addr(3) from the standard sockets library
4806 directly instead.
4807 (In_Addr): Add alignment clause.
4808 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
4809
48102007-06-06 Robert Dewar <dewar@adacore.com>
4811
4812 * a-taster.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
4813 s-osinte-irix.ads, s-interr-sigaction.adb, s-mastop-irix.adb,
4814 s-osinte-hpux-dce.ads, s-osinte-interix.ads, s-osinte-solaris.ads,
4815 s-taspri-solaris.ads, s-inmaop-vms.adb, s-interr-vms.adb,
4816 s-mastop-vms.adb, s-osinte-vms.ads, s-tpopde-vms.adb,
4817 s-osinte-mingw.ads, s-interr-vxworks.adb, i-cstrea-vms.adb,
4818 a-diocst.adb, a-direio.adb, a-interr.adb, a-sequio.adb, a-siocst.adb,
4819 a-ssicst.adb, a-storio.adb, a-ststio.adb, a-stwima.adb, a-tasatt.adb,
4820 a-taside.adb, a-tiocst.adb, a-witeio.adb, a-wtcstr.adb, g-crc32.adb,
4821 g-dirope.adb, g-dyntab.adb, g-memdum.adb, g-regexp.adb, g-spipat.adb,
4822 g-spitbo.adb, g-string.adb, g-string.ads, g-table.adb, g-thread.adb,
4823 i-cobol.adb, i-cpoint.adb, i-cstrea.adb, i-cstrin.adb, i-pacdec.adb,
4824 s-addima.adb, s-arit64.adb, s-auxdec.adb, s-auxdec.ads,
4825 s-auxdec-vms_64.ads, s-carsi8.adb, s-carun8.adb, s-casi16.adb,
4826 s-casi32.adb, s-casi64.adb, s-caun16.adb, s-caun32.adb, s-caun64.adb,
4827 s-direio.adb, s-fileio.adb, s-finimp.ads, s-geveop.adb, s-imgenu.adb,
4828 s-pack03.adb, s-pack05.adb, s-pack06.adb, s-pack07.adb, s-pack09.adb,
4829 s-pack10.adb, s-pack11.adb, s-pack12.adb, s-pack13.adb, s-pack14.adb,
4830 s-pack15.adb, s-pack17.adb, s-pack18.adb, s-pack19.adb, s-pack20.adb,
4831 s-pack21.adb, s-pack22.adb, s-pack23.adb, s-pack24.adb, s-pack25.adb,
4832 s-pack26.adb, s-pack27.adb, s-pack28.adb, s-pack29.adb, s-pack30.adb,
4833 s-pack31.adb, s-pack33.adb, s-pack34.adb, s-pack35.adb, s-pack36.adb,
4834 s-pack37.adb, s-pack38.adb, s-pack39.adb, s-pack40.adb, s-pack41.adb,
4835 s-pack42.adb, s-pack43.adb, s-pack44.adb, s-pack45.adb, s-pack46.adb,
4836 s-pack47.adb, s-pack48.adb, s-pack49.adb, s-pack50.adb, s-pack51.adb,
4837 s-pack52.adb, s-pack53.adb, s-pack54.adb, s-pack55.adb, s-pack56.adb,
4838 s-pack57.adb, s-pack58.adb, s-pack59.adb, s-pack60.adb, s-pack61.adb,
4839 s-pack62.adb, s-pack63.adb, s-pooloc.adb, s-poosiz.adb, s-scaval.adb,
4840 s-sequio.adb, s-shasto.adb, s-stalib.ads, s-stratt.adb, s-strcom.adb,
4841 s-taasde.adb, s-tasdeb.adb, s-tasuti.ads, s-tataat.ads, s-tpoben.ads,
4842 s-valenu.adb, s-widenu.adb, s-wwdenu.adb, s-addope.adb, a-stzmap.adb,
4843 a-ztcstr.adb, a-ztexio.adb, s-osinte-linux-hppa.ads: Replace
4844 Unchecked_* by Ada.Unchecked_*
4845
48462007-06-06 Robert Dewar <dewar@adacore.com>
4847
4848 * g-string.adb, s-proinf-irix-athread.adb, s-gloloc-mingw.adb,
4849 s-tfsetr-default.adb, gnatfind.adb, gnatxref.adb, gprep.adb,
4850 g-regexp.adb, g-regexp.ads, g-regpat.ads, g-tasloc.adb, g-tasloc.ads,
4851 output.adb, switch-m.ads, tree_in.ads, tree_io.ads, indepsw.ads,
4852 g-utf_32.adb, g-utf_32.ads, a-wichun.adb, a-wichun.ads, a-zchuni.adb,
4853 a-zchuni.ads: Replace GNAT.xxx by System.xxx when appropriate.
4854
4855 * s-utf_32.adb, s-utf_32.ads, s-os_lib.adb, s-os_lib.ads, s-regexp.adb,
4856 s-regexp.ads, s-regpat.adb, s-regpat.ads, s-string.adb, s-string.ads,
4857 s-tasloc.adb, s-tasloc.ads: New files.
4858
48592007-06-06 Bob Duff <duff@adacore.com>
4860
4861 * g-expect-vms.adb:
4862 (Send_Signal, Close): Raise Invalid_Process if the process id is invalid.
4863 * g-expect.ads, g-expect.adb (Send): Avoid useless copy of the string.
4864 (Send_Signal, Close): Raise Invalid_Process if the process id is
4865 invalid.
4866 (Pattern_Matcher_Access): Is now a general access type to be able to
4867 use aliased string.
4868
48692007-06-06 Thomas Quinot <quinot@adacore.com>
4870 Arnaud Charlet <charlet@adacore.com>
4871
a472f546
EB
4872 * a-intnam-aix.ads: Adjust comment to account for SIGADAABORT change
4873 (SIGEMT is now used instead of SIGTERM on AIX).
ec11296f
AC
4874
4875 * s-osinte-aix.ads (Linker_Options): Use -pthread instead of -lpthreads.
4876 (Time_Slice_Supported): Set to True.
a472f546 4877 Use SIGEMT instead of SIGTERM as SIGADAABORT.
ec11296f
AC
4878
48792007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
4880
4881 * a-calend.ads, a-calend.adb, a-calend-vms.ads, a-calend-vms.adb ("-"
4882 (Time, Time)): Use To_Relative_Time rather than manual calculation to
4883 express the bounds of Duration as Time. Raise Time_Error when the
4884 result is greater or equal to the higher bound of Duration (on the
4885 margin case).
4886 ("+" (Time, Duration)): Reorder code. Remove the declaration of constant
4887 Ada_High_And_Leaps.
4888 ("-" (Time, Duration)): Reorder code. Remove the declaration of constant
4889 Ada_High_And_Leaps.
4890 ("-" (Time, Time)): Reorder code.
4891 (All_Leap_Seconds): Removed.
4892 (Arithmetic_Operations.Add): Remove sign related kludge.
4893 (Arithmetic_Operations.Difference): Control the leaps seconds processing
4894 with flag Leap_Support.
4895 (Arithmetic_Operations.Subtract): Remove sign related kludge.
4896 (Check_Within_Time_Bounds): New procedure.
4897 (Clock): Control the leap seconds processing with flag Leap_Support.
4898 (Cumulative_Leap_Seconds): Assert that the target supports leap seconds.
4899 (Formatting_Operations.Split): Control the leap seconds processing with
4900 flag Leap_Support.
4901 (Formatting_Operations.Time_Of): Control the leaps seconds processing
4902 with flag Leap_Support. Adjust the year, month and day (if applicable)
4903 when the value of day seconds designates a new day.
4904 (Split): Use parameter associations for better readability. Integrate
4905 flag Is_Ada_05.
4906 (Time_Of): Use parameter associations for better readability. Integrate
4907 flag Is_Ada_05.
4908
4909 * a-calfor.adb (Split): Use parameter associations for better
4910 readability. Integrate flag Is_Ada_05.
4911 (Time_Of): Remove flag Leap_Checks. Use parameter associations for
4912 better readability. Integrate flag Is_Ada_05.
4913
49142007-06-06 Arnaud Charlet <charlet@adacore.com>
4915
4916 * s-taprop-vms.adb, s-taprop-hpux-dce.adb, s-taprop-vxworks.adb,
4917 s-osprim-posix.adb, s-taprop-posix.adb, s-osprim-vxworks.adb,
4918 s-taprop-solaris.adb, s-osprim-solaris.adb, s-taprop-dummy.adb,
4919 s-osprim-unix.adb, s-osinte-freebsd.adb, s-osinte-freebsd.ads,
4920 s-osinte-lynxos.adb, s-osinte-lynxos.ads, s-taprop-tru64.adb,
4921 s-taprop-lynxos.adb, s-taprop-irix.adb, s-osinte-tru64.adb,
4922 s-osinte-tru64.ads, s-taprop-linux.adb, s-parame.ads,
4923 s-parame-vms-alpha.ads, s-parame-vms-ia64.ads, s-parame-hpux.ads,
4924 s-parame-vms-restrict.ads, s-parame-ae653.ads, s-parame-vxworks.ads,
4925 s-taprop-mingw.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos-3.adb,
4926 s-osprim-mingw.adb (Timed_Delay, Timed_Sleep): Register the base
4927 time when entering this routine to detect a backward clock setting
4928 (manual setting or DST adjustment), to avoid waiting for a longer delay
4929 than needed.
4930 (Time_Duration, To_Timeval, struct_timeval): Removed when not relevant.
4931 Remove handling of deferred priority change, and replace by setting the
4932 task priority directly, as required by AI-188.
4933 Update comments.
4934 (Max_Task_Image_Length): New constant.
4935 Replace Warnings (Off) by Unreferenced pragma, cleaner.
4936 (Dynamic_Priority_Support): Removed, no longer needed.
4937 (Poll_Base_Priority_Change): Ditto.
4938 (Set_Ceiling): Add this procedure to change the ceiling priority
4939 associated to a lock. This is a dummy implementation because dynamic
4940 priority ceilings are not supported by the underlying system.
4941
4942 * a-dynpri.adb (Set_Priority): Take into account case where Target is
4943 accepting a RV with its priority boosted.
4944 Remove handling of deferred priority change, and replace by setting the
4945 task priority directly, as required by AI-188.
4946
4947 * s-taenca.adb (Try_To_Cancel_Entry_Call): Remove special case for
4948 Succeeded = True.
4949 Remove handling of deferred priority change, and replace by setting the
4950 task priority directly, as required by AI-188.
4951 (Wait_For_Completion, Wait_For_Call, Timed_Selective_Wait): Change state
4952 of Self_Id earlier.
4953
4954 * s-tasini.ads, s-tasini.adb (Wakeup_Entry_Caller): Relax assertion.
4955 (Poll_Base_Priority_Change): Removed.
4956 Code clean up: use SSL.Current_Target_Exception.
4957
4958 * s-tasren.adb (Task_Count): Call Yield to let a chance to other tasks
4959 to run as this is a potentially dispatching point.
4960 (Call_Synchronous): Use Local_Defer_Abort.
4961 (Callable): Relax assertion.
4962 (Selective_Wait): Relax assertion in case abort is not allowed.
4963 Remove handling of deferred priority change, and replace by setting the
4964 task priority directly, as required by AI-188.
4965
4966 * s-tasuti.adb (Make_Passive): Adjust assertions.
4967 Remove handling of deferred priority change, and replace by setting the
4968 task priority directly, as required by AI-188.
4969
49702007-06-06 Arnaud Charlet <charlet@adacore.com>
4971
4972 * system-vxworks-sparcv9.ads, system-solaris-x86.ads,
4973 system-irix-o32.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
4974 system-lynxos-x86.ads, system-vxworks-m68k.ads, system-linux-x86.ads,
4975 system-vxworks-mips.ads, system-vxworks-alpha.ads,
4976 system-vxworks-x86.ads, system-linux-ppc.ads, system-mingw.ads,
4977 system-vms-zcx.ads, system-darwin-ppc.ads, system-vxworks-ppc.ads,
4978 system-interix.ads, system-linux-hppa.ads, system-tru64.ads,
4979 system-hpux.ads, system-irix-n32.ads, system-solaris-sparc.ads,
4980 system-solaris-sparcv9.ads, system-vms.ads, system.ads,
4981 system-vms_64.ads, system-hpux-ia64.ads, system-linux-x86_64.ads,
4982 system-linux-ia64.ads: Document mapping between Ada and OS priorities.
4983 This patch changes the largest non-binary modulus from 2**31-1 to
4984 2**32-1.
4985 (Compiler_System_Version): Removed, no longer used.
4986 Clean up system files by removing flags only used on a single target.
4987 Also remove obsolete flags, only used during bootstrap from system.ads
4988 (Address): Add a pragma Preelaborable_Initialization.
4989
4990 * system-aix.ads: Ditto.
4991 (GCC_ZCX_Support): Set to true.
4992 Update priority range on AIX and map Ada priorities to target
4993 priorities appropriately for different scheduling policies.
4994
4995 * ttypes.ads: set largest non-binary modulus from 2**31-1 to 2**32-1
4996
49972007-06-06 Vincent Celier <celier@adacore.com>
4998
4999 * mlib-tgt-specific.adb, mlib-tgt-specific.ads,
5000 mlib-tgt-vms.adb, mlib-tgt-vms.ads: New files.
5001
5002 * mlib-tgt.adb, mlib-tgt.ads, mlib-tgt-darwin.adb,
5003 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb, mlib-tgt-lynxos.adb,
5004 mlib-tgt-linux.adb, mlib-tgt-solaris.adb, mlib-tgt-vms-alpha.adb,
5005 mlib-tgt-vms-ia64.adb, mlib-tgt-aix.adb, mlib-tgt-irix.adb,
5006 mlib-tgt-hpux.adb, mlib-tgt-tru64.adb: Make a common body for package
a472f546
EB
5007 MLib.Tgt, containing the default versions of the exported subprograms.
5008 For each platform, create a specific version of the body of new child
5009 package MLib.Tgt.Specific that contains only the body of subprograms
5010 that are different from the default.
5011 (Archive_Builder_Append_Options): New function.
ec11296f
AC
5012
50132007-06-06 Matthew Gingell <gingell@adacore.com>
5014
a472f546
EB
5015 * s-osinte-aix.adb: Map Ada priorities to target priorities
5016 appropriately for different scheduling policies.
ec11296f
AC
5017
50182007-06-06 Arnaud Charlet <charlet@adacore.com>
5019
5020 * s-osinte-linux.ads (sigset_t): Bump alignment to match more closely
5021 its C counterpart.
5022 Remove references to Unchecked_Conversion, and use Ada.xxx instead.
5023 Replace Unchecked_Conversion by Ada.Unchecked_Conversion.
5024
50252007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
5026
a472f546
EB
5027 * s-osprim-vms.ads, s-osprim-vms.adb (Initialize): New procedure.
5028 Noop on VMS, added for interface commonality.
ec11296f
AC
5029
50302007-06-06 Eric Botcazou <ebotcazou@adacore.com>
5031 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5032 Olivier Hainque <hainque@adacore.com>
5033
5034 * decl.c (gnat_to_gnu_entity) <object>: Manually mark the top of the
5035 renamed expression of a full renaming at toplevel.
5036 (gnat_to_gnu_entity, case object): If not defining, do not look inside
5037 the values the constant is initialized to if it is an N_Allocator.
5038 (gnat_to_gnu_entity) <E_Array_Subtype>: Manually mark the top of the
5039 TYPE_SIZE_UNIT of inner types after the stride is elaborated.
5040 (make_aligning_type): Accept an extra ROOM argument for storage to be
5041 made available before the aligned field, and an extra BASE_ALIGN
5042 argument for callers to pass the alignment guaranteed to be honored for
5043 the whole aligning object. Avoid call to finish_record_type, which only
5044 interferes with the sizes we want to set.
5045 (gnat_to_gnu_entity) <E_Variable>: Pass the required extra arguments to
5046 make_aligning_type for super-aligned objects on stack.
5047 (components_to_record): Pass the adjusted size of the type when creating
5048 fields in the qualified union for the variant part.
5049 (gnat_substitute_in_type): Copy TYPE_USER_ALIGN.
5050 (gnat_to_gnu_entity, case E_Signed_Integer_Subtype): Likewise for
5051 packed array type.
5052 (maybe_pad_type): Set TYPE_USER_ALIGN.
5053 (make_aligning_type): Likewise.
5054 ALIGN argument is unsigned int.
5055 (gnat_to_gnu_entity, case E_Function): Back annotate return mechanism.
5056 (gnat_to_gnu_param): Likewise, for parameters.
5057 (gnat_to_gnu_entity) <object>: Always instantiate the renaming object
5058 if it is constant and stems from a function call.
5059 (gnat_to_gnu_entity) <E_Record_Type>: Set packed to -2 if the alignment
5060 of the record is specified. Adjust accordingly.
5061 (adjust_packed): New static function.
5062 (gnat_to_gnu_field): Use it to adjust the packedness setting.
5063 (components_to_record): Likewise.
5064 (gnat_to_gnu_entity) <object>: Do not test the renamed expression for
5065 side-effects if the object is deemed constant.
5066 (gnat_to_gnu_entity) <E_Array_Type>: Create a name for the fat pointer
5067 type instead of merely finalizing it. Tidy.
5068 <E_Access_Subprogram_Type>: Retrieve the type from the TYPE_DECL.
5069 <E_Access_Type>: Likewise.
5070 (defer_debug_incomplete_list): Rename to defer_finalize_list.
5071 (defer_debug_level): Delete.
5072 (gnat_to_gnu_entity) <debug_deferred>: Likewise
5073 <E_Array_Type>: Call rest_of_record_type_compilation on the fat pointer
5074 type.
5075 <E_Record_Type>: Do not explicitly defer finalizing the type.
5076 Adjust for write_record_type_debug_info renaming.
5077 <E_Subprogram_Type>: Likewise.
5078 Finalize deferred types right after deferred incomplete types are
5079 expanded.
5080 (rest_of_type_decl_compilation): New global function.
5081 (components_to_record): Rename defer_debug parameter to do_not_finalize.
5082 (components_to_record): Propagate the packedness to the fields of the
5083 qualified union type if there is a variant part.
5084 (gnat_to_gnu_entity) <E_Array_Type>: Use new function
5085 instead of inline code to adjust the XUT field offsets.
5086 (gnat_to_gnu_entity): Adjust for new prototype of finish_record_type.
5087 <E_Record_Subtype>: Do not let finish_record_type compute the sizes
5088 and write the debug info if the type derives from a discriminated one.
5089 (gnat_to_gnu_entity) <E_Array_Type>: Adjust call to create_index_type.
5090 <E_Array_Subtype>: Likewise.
5091 <E_String_Literal_Subtype>: Likewise.
5092 (gnat_to_gnu_entity): Set TYPE_USER_ALIGN on types only if they have
5093 an alignment clause.
5094 (maybe_pad_type): Update ORIG_SIZE to the minimum required to meet ALIGN
5095 before giving warning.
5096 (prepend_one_attribute_to): New function, helper to prepend an attribute
5097 to an attribute list.
5098 (gnat_to_gnu_entity) <E_Procedure>: Use it.
5099 (prepend_attributes): Likewise.
5100 (gnat_to_gnu_entity) <E_Variable>: Use constants of the proper type.
5101 <E_Array_Type>: Declare the padding type for the element type, if any.
5102 <E_Array_Subtype>: Likewise.
5103 (defer_limited_with): New variable.
5104 (Gigi_Equivalent_Type): New function.
5105 (gnat_to_gnu_entity): Use it at start and use result throughout.
5106 (gnat_to_gnu_entity, case E_Access_Type): Rework to use
5107 Gigi_Equivalent_Type, support Limited_With, allow two levels of
5108 indirection, precompute if unconstrained array to simplify logic, and
5109 use defer_limited_with to defer elaboration of some types from limited
5110 with.
5111 (finalize_from_with_types): New function.
5112
51132007-06-06 Gary Dismukes <dismukes@adacore.com>
5114 Eric Botcazou <ebotcazou@adacore.com>
5115 Tristan Gingold <gingold@adacore.com>
5116 Olivier Hainque <hainque@adacore.com>
5117
a472f546
EB
5118 * trans.c (Identifier_to_gnu): Change test for deferred constant by
5119 adding guard that the entity is an E_Constant before testing presence
5120 of Full_view (and remove unnecessary test that entity is not a type).
ec11296f
AC
5121 For a CONST_DECL used by reference, manually retrieve
5122 the DECL_INITIAL. Do not invoke fold in the other DECL_P cases either.
5123 (struct language_function): Move from utils.c to here.
5124 (struct parm_attr): New structure.
5125 (parm_attr, parm_attr vector, parm_attr GC vector): New types.
5126 (f_parm_attr_cache): New macro.
5127 (Attribute_to_gnu) <Attr_Length>: When not optimizing, cache the
5128 expressions for the 'First, 'Last and 'Length attributes of the
5129 unconstrained array IN parameters.
5130 (Subprogram_Body_to_gnu): Use gnu_subprog_decl throughout.
5131 Allocate the information structure for the function earlier, as well
5132 as the language-specific part.
5133 If the parameter attributes cache has been populated, evaluate the
5134 cached expressions on entry.
5135 (takes_address): Add OPERAND_TYPE parameter. Handle N_Function_Call,
5136 N_Procedure_Call_Statement and N_Indexed_Component.
5137 (Pragma_to_gnu): Translate inspection_point to an asm statement
5138 containaing a comment and a reference to the object (either its address
5139 for BLKmode or its value).
5140 (Identifier_to_gnu): Use TREE_CONSTANT instead of CONST_DECL to decide
5141 to go to DECL_INITIAL. Together with the size constraint relaxation
5142 in create_var_decl, enlarges the set of situations in which an
5143 identifier may be used as an initializer without implying elaboration
5144 code.
5145 (Subprogram_Body_to_gnu): Do not fiddle with the debug interface but set
5146 DECL_IGNORED_P on the function if Needs_Debug_Info is not set on the
5147 node.
5148 (maybe_stabilize_reference): Remove lvalues_only parameter.
5149 (gnat_stabilize_reference): Adjust for above change.
5150 (gnat_to_gnu): Do not set location information on the result
5151 if it is a reference.
5152 (add_cleanup): Add gnat_node parameter and set the location of the
5153 cleanup to it.
5154 (Handled_Sequence_Of_Statements_to_gnu): Adjust calls to add_cleanup.
5155 (Exception_Handler_to_gnu_zcx): Likewise.
5156 (gigi): Remove the cgraph node if the elaboration procedure is empty.
5157 (Subprogram_Body_to_gnu): If a stub is attached to the subprogram, emit
5158 the former right after the latter.
5159 (start_stmt_group): Make global.
5160 (end_stmt_group): Likewise.
5161 (gnu_constraint_error_label_stack, gnu_storage_error_label_stack): New
5162 vars.
5163 (gnu_program_error_label_stack): Likewise.
5164 (gigi): Initialize them.
5165 (call_to_gnu, gnat_to_gnu, emit_check): Add new arg to build_call_raise.
5166 (gnat_to_gnu, N_{Push,Pop}_{Constraint,Storage,Program}_Error_Label):
5167 New cases.
5168 (push_exception_label_stack): New function.
5169 (takes_address): New function.
5170
5171 * utils.c (struct language_function): Move to trans.c from here.
5172 (unchecked_convert): Do not wrap up integer constants in
5173 VIEW_CONVERT_EXPRs.
5174 (create_var_decl_1): Decouple TREE_CONSTANT from CONST_DECL. Prevent
5175 the latter for aggregate types, unexpected by later passes, and relax an
5176 arbitrary size constraint on the former.
5177 (create_field_decl): Use tree_int_cst_equal instead of operand_equal_p
5178 to compare the sizes.
5179 (convert_vms_descriptor): When converting to a fat pointer type, be
5180 prepared for a S descriptor at runtime in spite of a SB specification.
5181 (shift_unc_components_for_thin_pointers): New function.
5182 (write_record_type_debug_info): For variable-sized fields, cap the
5183 alignment of the pointer to the computed alignment.
5184 (finish_record_type): Change HAS_REP parameter into REP_LEVEL.
5185 If REP_LEVEL is 2, do not compute the sizes.
5186 (build_vms_descriptor): Adjust for new prototype of finish_record_type.
5187 (build_unc_object_type): Likewise.
5188 (declare_debug_type): New function.
5189
5190 * ada-tree.def: USE_STMT: removed (not emitted anymore).
5191
5192 * misc.c (gnat_expand_expr): Call to gnat_expand_stmt removed because
5193 no statement is expandable anymore.
5194 (gnat_init_gcc_eh): Do not initialize the DWARF-2 CFI machinery twice.
5195 (gnat_handle_option): Only allow flag_eliminate_debug_types to be set
5196 when the user requested it explicitely.
5197 (gnat_post_options): By default, set flag_eliminate_unused_debug_types
5198 to 0 for Ada.
5199 (get_alias_set): Return alias set 0 for a type if
5200 TYPE_UNIVERSAL_ALIASING_P is set on its main variant.
5201
5202 * ada-tree.h: (TYPE_UNIVERSAL_ALIASING_P): New macro.
5203 (DECL_FUNCTION_STUB): New accessor macro.
5204 (SET_DECL_FUNCTION_STUB): New setter macro.
5205
5206 * lang.opt (feliminate-unused-debug-types): Intercept this flag for Ada.
5207
5208 * fe.h (Get_Local_Raise_Call_Entity, Get_RT_Exception_Entity): New
5209 declarations.
5210
52112007-06-06 Jose Ruiz <ruiz@adacore.com>
5212
5213 * s-intman-vxworks.ads, s-intman-vxworks.adb (Abort_Task_Signal):
5214 Rename to Abort_Task_Interrupt to be able to keep the same interface
5215 as the rest of the targets.
5216
5217 * s-osinte-vxworks.ads s-osinte-vxworks.adb
5218 (To_VxWorks_Priority): Remove explicit "in" mode indicator
5219
5220 * s-osinte-vxworks6.ads, s-vxwork-arm.ads, system-vxworks-arm.ads:
5221 New files.
5222
52232007-06-06 Robert Dewar <dewar@adacore.com>
5224
5225 * a-chahan.ads: Remove obsolescent pragmas
5226
5227 * a-chlat1.ads: Minor reformatting
5228
52292007-06-06 Robert Dewar <dewar@adacore.com>
5230
5231 * comperr.adb (Compiler_Abort): New Finalize/Output_Messages interface
5232 for Errout
5233
5234 * errout.adb: New Finalize/Compilation_Errors/Output_Messages
5235 implementation
5236
5237 * errout.ads (Finalize): Changed interface
5238 (Output_Messages): New procedure
5239 (Compilation_Errors): New Interface
5240
5241 * prepcomp.ads, prepcomp.adb (Parse_Preprocessing_Data_File): New
5242 Finalize/Output_Messages interface for Errout
5243 (Prepare_To_Preprocess): New Finalize/Output_Messages interface for
5244 Errout.
5245
52462007-06-06 Thomas Quinot <quinot@adacore.com>
5247 Olivier Hainque <hainque@adacore.com>
5248 Robert Dewar <dewar@adacore.com>
5249
5250 * a-except.ads, a-except.adb: (Rmsg_28): Fix description for E.4(18)
5251 check.
5252 (Raise_Current_Excep): Call Debug_Raise_Exception just before
5253 propagation starts, to let debuggers know about the event in a reliable
5254 fashion.
5255 (Local_Raise): Moved to System.Exceptions
5256 More convenient to have this as a separate unit
5257
5258 * s-except.adb, s-except.ads: New files.
5259
5260 * a-exextr.adb (Unhandled_Exception): Delete - replaced by
5261 Debug_Unhandled_Exception in System.Exceptions where it belongs
5262 together with a couple of other debug helpers.
5263 (Notify_Unhandled_Exception): Use Debug_Unhandled_Exception instead of
5264 the former Unhandled_Exception.
5265
5266 * exp_ch11.ads, exp_ch11.adb: (Possible_Local_Raise): New procedure
5267 (Warn_No_Exception_Propagation): New procedure
5268 (Warn_If_No_Propagation): Rewritten for new warning generation
5269 (Expand_Exception_Handlers): New warning generation
5270 (Expand_N_Raise_xxx_Error): Rewritten for new warnings
5271 (Add_Exception_Label): Use Special_Exception_Package_Used for test
5272 instead of Most_Recent_Exception_Used (accomodates Exception_Traces)
5273 (Expand_Local_Exception_Handlers): Unconditionally add extra block wrap
5274 even if restriction is set (makes life easier in Check_Returns)
5275 (Expand_Local_Exception_Handlers): Follow renamed entity chain when
5276 checking exception identities.
5277 (Expand_Local_Exception_Handlers): Do not optimize when all others case
5278 (Expand_Local_Exception_Handlers): Set Exception_Junk flag on generated
5279 block for handler (used by Check_Returns)
5280 (Expand_Local_Exception_Handlers): Local_Raise now takes an address
5281 (Expand_N_Handled_Sequence_Of_Statements): Properly handle -gnatd.x to
5282 remove all exception handlers when optimizing local raise statements.
5283 (Find_Local_Handler): Use Get_Renamed_Entity
5284 (Expand_N_Handled_Sequence_Of_Statements): If the handled sequence is
5285 marked analyzed after expanding exception handlers, do not generate
5286 redundant cleanup actions, because they have been constructed already.
5287
52882007-06-06 Thomas Quinot <quinot@adacore.com>
5289
5290 * a-finali.ads (Ada.Finalization): Add missing pragma Remote_Types. The
5291 presence of this categorization pragma is mandated by the language.
5292 (Limited_Controlled): Add missing pragma Preelaborable_Initialization
5293 for this type.
5294
52952007-06-06 Vincent Celier <celier@adacore.com>
5296 Robert Dewar <dewar@adacore.com>
5297
5298 * bcheck.adb, binde.adb, binderr.adb, binderr.ads, butil.adb,
5299 butil.ads, erroutc.adb, erroutc.ads, errutil.adb, errutil.ads,
5300 err_vars.ads, exp_tss.adb, exp_tss.ads, fmap.adb, fmap.ads,
5301 fname.adb, fname.ads, fname-sf.adb, fname-uf.adb, fname-uf.ads,
5302 lib-sort.adb, lib-util.adb, lib-util.ads, lib-xref.adb, makeutl.ads,
5303 makeutl.adb, nmake.adt, osint.adb, osint.ads, osint-b.adb,
5304 par-load.adb, prj-attr.adb, prj-dect.adb, prj-err.adb, prj-makr.adb,
5305 prj-part.adb, prj-pp.adb, prj-proc.adb, prj-tree.adb, prj-tree.ads,
5306 prj-util.adb, prj-util.ads, scans.adb, scans.ads, sem_ch2.adb,
5307 sinput-c.adb, styleg-c.adb, tempdir.adb, tempdir.ads, uname.adb,
5308 uname.ads, atree.h, atree.ads, atree.adb, ali-util.ads, ali-util.adb,
5309 ali.ads, ali.adb:
5310 Move Name_Id, File_Name_Type and Unit_Name_Type from package Types to
5311 package Namet. Make File_Name_Type and Unit_Name_Type types derived from
5312 Mame_Id. Add new type Path_Name_Type, also derived from Name_Id.
5313 Use variables of types File_Name_Type and Unit_Name_Type in error
5314 messages.
5315 (Get_Name): Add parameter Ignore_Special, and set it reading file name
5316 (New_Copy): When debugging the compiler, call New_Node_Debugging_Output
5317 here.
5318 Define flags Flag217-Flag230 with associated subprograms
5319 (Flag_Word5): New record type.
5320 (Flag_Word5_Ptr): New access type.
5321 (To_Flag_Word5): New unchecked conversion.
5322 (To_Flag_Word5_Ptr): Likewise.
5323 (Flag216): New function.
5324 (Set_Flag216): New procedure.
5325
53262007-06-06 Arnaud Charlet <charlet@adacore.com>
5327
5328 * a-stzunb.adb, a-stwiun.adb, a-strunb.adb: (Insert): Use 'Length
5329 instead of 'Size.
5330
5331 * a-stwifi.ads, a-stzfix.ads: Minor reformatting
5332
53332007-06-06 Javier Miranda <miranda@adacore.com>
5334
5335 * a-tags.ads, a-tags.adb (Tag_Size): This constant is now internal to
5336 the package.
5337 (Object_Specific_Data_Array): This is now internal to the package.
5338 (Object_Specific_Data): This is now internal to the package.
5339 (Select_Specific_Data_Element): This is now internal to the package.
5340 (Select_Specific_Data_Array): This is now internal to the package.
5341 (Select_Specific_Data): This is now internal to the package.
5342 (Offset_To_Top_Function_Ptr): This is now public.
5343 (To_Offset_To_Top_Function_Ptr): Removed.
5344 (Storage_Offset_Ptr,To_Storage_Offset_Ptr): These declarations are now
5345 local to subprogram Offset_To_Top.
5346 (Predefined_DT): Removed.
5347 (Typeinfo_Ptr): Removed.
5348 (OSD): This function is now internal to this package.
5349 (SSD): This function is now internal to this package.
5350 (DT): New function that displaces the pointer to the table of primitives
5351 to get access to the enclosing wrapper record.
5352 (IW_Membership): Code cleanup.
5353 (Offset_To_Top): Code cleanup.
5354 (Predefined_DT): Removed.
5355 (Register_Interface_Tag): Removed.
5356 (Set_Interface_Table): Removed.
5357 (Set_Offset_Index): Removed.
5358 (Set_Offset_To_Top): Code cleanup.
5359 (Set_OSD): Removed.
5360 (Set_Signature): Removed.
5361 (Set_SSD): Removed.
5362 (Set_Tagged_Kind): Removed.
5363 (Typeinfo_Ptr): Removed.
5364 (TSD): Removed.
5365 (Displace): Add missing check on null actual.
5366
5367 * exp_disp.ads, exp_disp.adb
5368 (Select_Expansion_Utilities): Removed.
5369 (Build_Common_Dispatching_Select_Statements): Moved to exp_atags.
5370 (Expand_Dispatching_Call): Update calls to Get_Prim_Op_Address because
5371 the interface requires a new parameter.
5372 (Make_Disp_Asynchronous_Select_Spec, Make_Disp_Conditional_Select_Spec,
5373 Make_Disp_Get_Prim_Op_Kind_Spec, Make_Disp_Timed_Select_Spec): Replace
5374 calls to subprograms Build_T, Build_S, etc. by the corresponding code.
5375 Done to remove package Select_Expansion_Utilities.
5376 (Make_DT): New implementation for statically allocated dispatch tables.
5377 (Make_Secondary_DT): Moved to the scope of Make_DT.
5378 (Register_Primitive): Code cleanup plus incoporate the use of the new
5379 function DT_Address_Attribute.
5380 (Expand_Interface_Thunk): The profile of this subprogram has been
5381 changed to return the Thunk_Id and the corresponding code.
5382 (Fill_DT_Entry): Removed. Its functionality is now provided by
5383 subprogram Register_Primitive.
5384 (Fill_Secondary_DT_Entry): Removed. Its functionality is now provided by
5385 subprogram Register_Primitive.
5386 (Register_Primitive): New subprogram that incorporates the previous
5387 functionalities of Fill_DT_Entry and Fill_Secondary_DT_Entry.
5388 (Build_Common_Dispatching_Select_Statements): Remove formal Typ. This
5389 was only required to call Make_DT_Access_Action, which is now removed.
5390 (Ada_Actions): Removed
5391 (Action_Is_Proc): Removed
5392 (Action_Nb_Arg): Removed
5393 Replace all the calls to Make_DT_Access_Action by direct calls to
5394 Make_Procedure_Call_Statement or Make_Function_Call.
5395 (Set_DTC_Entity_Value): New subprogram.
5396 (Set_All_DT_Position): Add call to new subprogram Set_DTC_Entity_Value.
5397 (Expand_Interface_Thunk): Add missing support for primitives that are
5398 functions with a controlling result (case in which there is no need
5399 to generate the thunk).
5400
5401 * exp_atag.ads, exp_atag.adb
5402 (Build_DT): New subprogram that displaces the pointer to reference the
5403 base of the wrapper record.
5404 (Build_Typeinfo_Offset): Removed.
5405 (RTE_Tag_Node): Removed.
5406 (Build_Common_Dispatching_Select_Statements): Moved here from exp_disp
5407 (Build_Get_RC_Offset): Removed.
5408 (Build_Inherit_Predefined_Prims): Removed.
5409 (Build_Inherit_TSD: Removed.
5410 (Build_New_TSD): Removed.
5411 (Build_Set_External_Tag): Removed.
5412 (Build_Set_Predefined_Prim_Op_Address): Add documentation.
5413 (Build_Set_Prim_Op_Address): Add documentation.
5414 (Build_Set_TSD): Removed.
5415
5416 * rtsfind.ads, rtsfind.adb
5417 (Load_Fail): If load fails and we are not in configurable run-time
5418 mode, then raise Unrecoverable_Error.
5419 (Text_IO_Kludge): Generate an error message if a run-time library is
5420 not available in a given run-time (ie. zfp run-time).
5421 (RTE_Record_Component): Add code to check that the component we search
5422 for is not found in two records in the given run-time package.
5423 (RE_DT_Offset_To_Top_Size, RE_DT_Predef_Prims_Size): Removed
5424 (RE_DT_Predef_Prims_Offset): New entity
5425 (RE_Static_Offset_To_Top): New entity
5426 (RE_HT_Link): New entity.
5427 (System_Address_Image): Addition of this run-time package.
5428 (RE_Address_Image): New entity.
5429 (RE_Abstract_Interface): Removed.
5430 (RE_Default_Prim_Op_Count): Removed.
5431 (RE_DT_Entry_Size): Removed.
5432 (RE_DT_Min_Prologue_Size): Removed.
5433 (RE_DT_Prologue_Size): Removed.
5434 (RE_Ifaces_Table_Ptr): Removed.
5435 (RE_Interface_Data_Ptr): Removed.
5436 (RE_Type_Specific_Data): Removed.
5437 (RE_Primary_DT): Removed.
5438 (RE_Register_Interface_Tag): Removed.
5439 (RE_Set_Offset_Index): Removed.
5440 (RE_Set_OSD): Removed.
5441 (RE_Set_SSD): Removed.
5442 (RE_Set_Signature): Removed.
5443 (RE_Set_Tagged_Kind): Removed.
5444 (RE_Address_Array): New entity.
5445 (RE_DT): New entity.
5446 (RE_Iface_Tag): New entity.
5447 (RE_Interfaces_Table): New entity.
5448 (RE_No_Dispatch_Table): New entity.
5449 (RE_NDT_Prims_Ptr): New entity.
5450 (RE_NDT_TSD): New entity.
5451 (RE_Num_Prims): New entity.
5452 (RE_Offset_To_Top_Function_Ptr): New entity.
5453 (RE_OSD_Table): New entity.
5454 (RE_OSD_Num_Prims): New entity.
5455 (RE_Predef_Prims): New entity
5456 (RE_Predef_Prims_Table_Ptr): New entity.
5457 (RE_Primary_DT): New entity.
5458 (RE_Signature): New entity.
5459 (RE_SSD): New entity.
5460 (RE_TSD): New entity.
5461 (RE_Type_Specific_Data): New entity.
5462 (RE_Tag_Kind): New entity.
5463
54642007-06-06 Thomas Quinot <quinot@adacore.com>
5465
5466 * a-textio.ads, a-textio.adb (Write): Add explicit size clause for the
5467 C imported variable.
5468 (Skip_Line): Do not reset Before_LM_PM immediately when Before_LM is set
5469 on entry.
5470
54712007-06-06 Robert Dewar <dewar@adacore.com>
5472
5473 * a-tienio.adb (Get): Adjust buffer size to accomodate one extra
5474 character
5475
54762007-06-06 Vincent Celier <celier@adacore.com>
5477
5478 * a-tifiio.adb (Put, internal): For negative numbers, check that there
5479 is room for at least one digit and the minus sign.
5480 (Put.Put_Character): Never put a character outside of the range of
5481 string To.
5482
54832007-06-06 Olivier Hainque <hainque@adacore.com>
5484 Eric Botcazou <ebotcazou@adacore.com>
5485
5486 * utils2.c (build_allocator): Provide the extra arguments to
5487 make_aligning_type for super-aligned objects allocated from the default
5488 pool. Leave enough room for a pointer before the aligning field, and
5489 store the system's allocator return value there.
5490 (build_call_alloc_dealloc): When releasing a super-aligned object,
5491 retrieve the system's allocator return value from where build_allocator
5492 has stored it, just ahead of the adjusted address we are passed.
5493 (build_call_raise): Handle properly the generation of line numbers when
5494 the node is marked No_Location.
5495 (compare_elmt_bitpos): Use tree_int_cst_compare. Stabilize the sort
5496 by using DECL_UID on ties.
5497 (build_binary_op) <EQ_EXPR>: Accept fat pointer types with the same
5498 main variant.
5499 (build_call_raise): Handle converting exception into goto; support new
5500 argument KIND.
5501 (build_component_ref): Add new arg to build_call_raise.
5502
55032007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
5504
5505 * a-ztflau.adb, a-wtflau.adb, a-tiflau.adb (Load_Real): Do not parse
5506 "." in the case of nnn.xxx when nnn terminates with an underscore.
5507 Parse the remaining "#" or ":" in the case of nnn#.xxx#
5508
55092007-06-06 Robert Dewar <dewar@adacore.com>
5510
5511 * a-tigeau.ads, a-tigeau.adb: (Store_Char): Change Buf to IN OUT
5512
55132007-06-06 Arnaud Charlet <charlet@adacore.com>
5514 Vincent Celier <celier@adacore.com>
5515 Robert Dewar <dewar@adacore.com>
5516
5517 * bindgen.adb (Gen_Output_File_Ada): Generate pragma No_Run_Time when
5518 needed.
5519 (Gen_Output_File_Ada, Gen_Output_File_C): Never use __attribute
5520 ((destructor)) for adafinal, even when switch -a is used.
5521 Do not issue pragma Linker_Destructor for adafinal when switch -a is
5522 used.
5523 (Gen_Object_Files_Options): Add formatting of Linker Options, when
5524 Output_Linker_Option_List is set. Suppress this formatting when
5525 Zero_Formatting is set.
5526 Add case for CLI_Target.
5527 (System_Restrictions_Used): New flag, used to avoid generating with of
5528 System_Restrictions and initialization of the data unless there is
5529 some use of System.Restrictions in the partition.
5530 (Check_System_Restrictions_Used): New procedure
5531
5532 * s-stalib.adb: Remove with of System.Restrictions. No longer needed
5533 since we only with this unit in the binder file if it is used elsewhere
5534 in the partition.
5535
55362007-06-06 Vincent Celier <celier@adacore.com>
5537
5538 * bindusg.adb: Add line for @<response file>
5539 Add lines for new switches -R and -Z
5540
5541 * gnatbind.adb (Gnatbind): Do not include sources from the GNAT
5542 hierarchy in the list of files of the closure when -R is used
5543 (Gnatbind): Accept arguments starting with '@' to indicate response
5544 files and take the arguments from the response files.
5545 If List_Closure is set, display the referenced files
5546
55472007-06-06 Javier Miranda <miranda@adacore.com>
5548 Robert Dewar <dewar@adacore.com>
5549 Ed Schonberg <schonberg@adacore.com>
5550
5551 * checks.ads, checks.adb (Apply_Address_Clause_Check): Handle case in
5552 which the address-clause is applied to in-mode actuals (allowed by
5553 13.1(22)).
5554 (Apply_Discriminant_Check): Do not generate a check if the type is
5555 constrained by a current instance.
5556 (Activate_Division_Check): New procedure
5557 (Activate_Overflow_Check): New procedure
5558 (Activate_Range_Check): New procedure
5559 Call these new Activate procedures instead of setting flags directly
5560 (Apply_Array_Size_Check): Removed, no longer needed.
5561 Code clean up: remove obsolete code related to GCC 2.
5562 (Get_E_Length): Protect against bomb in case scope is standard
5563 (Selected_Range_Checks): If the node to be checked is a conversion to
5564 an unconstrained array type, and the expression is a slice, use the
5565 bounds of the slice to construct the required constraint checks.
5566 Improve NOT NULL error messages
5567 (Apply_Constraint_Check): If the context is a null-excluding access
5568 type, diagnose properly the literal null.
5569
55702007-06-06 Pascal Obry <obry@adacore.com>
5571
5572 * clean.adb (Clean_Archive): Use untouched casing for the archive name
5573 and the corresponding .deps file.
5574 (Clean_Interface_Copy_Directory): Use untouched casing for the library
5575 src directory. Minor code-clean-up. Use untouched casing for files
5576 read into the library src dir.
5577 (Clean_Library_Directory): Idem.
5578 (Parse_Cmd_Line): Accept new switch -aP
5579
55802007-06-06 Javier Miranda <miranda@adacore.com>
5581 Ed Schonberg <schonberg@adacore.com>
5582 Robert Dewar <dewar@adacore.com>
5583 Eric Botcazou <ebotcazou@adacore.com>
5584 Arnaud Charlet <charlet@adacore.com>
5585
5586 * einfo.ads, einfo.adb (Available_View): New synthesized attribute
5587 applicable to types that have the With_Type flag set. Returns the
5588 non-limited view of the type, if available, otherwise the type itself.
5589 For class-wide types, there is no direct link in the tree, so we have
5590 to retrieve the class-wide type of the non-limited view of the Etype.
5591 New attributes Static_Initialization and Static_Elaboration_Desired.
5592 Remove the pragma Thread_Body, and the associated flag
5593 Is_Thread_Body in entities, and all related code.
5594 (Suppress_Value_Tracking_On_Call): New flag
5595 E_Exception has Esize and Alignment fields
5596 (Universal_Aliasing): New function.
5597 (Set_Universal_Aliasing): New procedure.
5598 (Write_Entity_Flags): Deal with Universal_Aliasing flag.
5599 (Check_Nested_Access): New procedure.
5600 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
5601 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
5602 (Related_Interface): New attribute. Present in dispatch table pointer
5603 components of records. Set to point to the entity of the corresponding
5604 interface type.
5605 (Is_By_Reference_Type): Recurse on the full view of an incomplete type.
5606 (Original_Access_Type): Remove, not needed.
5607 (Root_Type): Handle properly subtypes of class-wide-types.
5608 Update comments.
5609
5610 * sem_ch4.adb (Analyze_Explicit_Dereference): Add support for
5611 class-wide types visible through limited-with clauses.
5612 (Try_Primitive_Operation): When examining all primitive operations of a
5613 tagged type, do not consider subprograms labeled as hidden unless they
5614 belong to a private generic type with a tagged parent.
5615 (Try_Object_Operation): Extensive rewriting, to handle properly various
5616 overloading cases, when several ancestors may have class-wide operations
5617 that are possible candidates, and when the overloaded functions return
5618 array types and have defaulted parameters so that the call may be
5619 interpreted as an indexing.
5620 (Analyze_Allocator): Remove Mark_Allocator and its invocation.
5621 (Process_Function_Call): use Next, rather than Next_Actual, to analyze
5622 successive actuals before analyzing the call itself.
5623 (Try_Primitive_Operation): A primitive operation is compatible with the
5624 prefix if the prefix has a synchronized type and the type of the formal
5625 is its corresponding record, as can be the case when the primitive
5626 operation is declared outside of the body of the type.
5627 (Traverse_Homonyms): New subprocedure of Try_Class_Wide_Operation, to
5628 perform homonym traversal, looking for class-wide operation matches
5629 (formerly done in statements of Try_Class_Wide_Operation). Matches on
5630 access parameters are now restricted to anonymous access types.
5631 (Mark_Allocator): An allocator with a discriminant association parent is
5632 a coextension.
5633 (Try_One_Prefix_Interpretation): If the type of the object is
5634 incomplete, as can be happen when it is a limited view obtained through
5635 a limited_with_clause, the selected component is not part of a prefixed
5636 call.
5637 (Complete_Object_Operation): Diagnose properly an object that is not
5638 aliased when the corresponding controlling formal is an access
5639 parameter.
5640 (Try_Primitive_Operation, Try_Class_Wide_Operation): Diagnose properly
5641 ambiguous calls in prefixed notation, where two primitives differ only
5642 in that the controlling argument of one is an access parameter.
5643
5644 * sem_ch6.adb (Has_Single_Return): Add guard in code that determines
5645 whether a function that returns an unconstrained type can be inlined.
5646 (Process_Formals): Diagnose properly the illegal use of an incomplete
5647 type in the profile of an access_to_subprogram declaration.
5648 (Check_Synchronized_Overriding): Nothing check for concurrent types, the
5649 operations are attached to the corresponding record.
5650 (Analyze_Subprogram_Specification): Add variables Formal and Formal_Typ.
5651 When processing a primitive of a concurrent type which implements an
5652 interface change the type of all controlling formals to that of the
5653 corresponding record type.
5654 (Check_Synchronized_Overriding): Relax the conditional logic when trying
5655 to determine the tagged type to which a primitive belongs.
5656 (Check_Conventions): Capture condition to ignore a primitive operation
5657 (which is shared between the loop in Check_Conventions and the one in
5658 Check_Convention) in a new local function Skip_Check.
5659 (Check_Convention): Rename Prim_Op to Second_Prim_Op to avoid possible
5660 confusion with Check_Conventions' own Prim_Op local variable.
5661 (Create_Extra_Formals): Test for a tagged result type rather than a
5662 controlling result when determining whether to add a BIP_Alloc_Form
5663 formal and a BIP_Final_List formal to the function.
5664 (Check_Conformance); For parameters that are anonymous access types,
5665 subtype conformance requires that the not null and the constant
5666 indicators must match
5667 (Check_Synchronized_Overriding): New parameter Formal_Typ. Add machinery
5668 to retrieve the appropriate type when processing a concurrent type
5669 declared within a generic. Minor comment reformatting. Change invocation
5670 of Overrides_Synchronized_Primitive to Find_Overridden_Synchronized_Pri-
5671 mitive.
5672 (Analyze_Subprogram_Body): If the return type of a function is an
5673 anonymous access to the limited view of a class-wide type, and the
5674 non-limited view of the type is available, update the type of the
5675 function so that code can be generated.
5676 (Process_Formals): In case of access-subtype itype whose designated
5677 type is also an itype (situation that happens now with access to
5678 subprograms) we mark the access-type itype with the Has_Delayed_Freeze
5679 attribute to avoid backend problems.
5680 (Check_Return_Subtype_Indication): Replace R_Type with R_Stm_Type in
5681 init of R_Stm_Type_Is_Anon_Access. Also check that base types of the
5682 anonymous types' designated types are same before testing
5683 Subtypes_Statically_Match.
5684 (Create_Extra_Formals): Test for a named access parameter that is a
5685 controlling formal as an additional condition for adding an
5686 accessibility level formal. This can occur in the subp type created for
5687 dispatching calls in Expand_Dispatching_Call, and allows calling
5688 Create_Extra_Formals from that procedure rather than special-casing the
5689 extra formals there.
5690 (Create_Extra_Formals): Add BIP_Alloc_Form and BIP_Final_List formals
5691 when the function has a controlling result.
5692 (Check_Returns): Add much more knowledge of the optimization of local
5693 raise statements to gotos, to retain proper warnings in this case.
5694 (Check_Statement_Sequence): Ignore N_Push_xxx_Label and N_Pop_xxx_Label
5695 nodes when looking for last statement.
5696
5697 * sem_type.ads, sem_type.adb (Specific_Type): Add support for
5698 class-wide types visible through limited with clauses.
5699 (Add_One_Interp): If the operands are anonymous access types, the
5700 predefined operator on universal_access is immediately visibles
5701 (Find_Unique_Type): Handle anonymous access to subprogram types just as
5702 other anonymous access types.
5703 (Disambiguate): Take into account CIL convention.
5704 (Interface_Present_In_Ancestor): Add support for class-wide interfaces.
5705
57062007-06-06 Robert Dewar <dewar@adacore.com>
5707
5708 * sinput.ads, sinput.adb, uintp.ads, urealp.adb, stringt.adb,
5709 sem_elim.adb, prj-strt.adb, repinfo.ads, repinfo.adb, namet.ads,
5710 elists.ads, elists.adb, lib.ads, lib.adb (Unlock): New procedure.
5711 Fix lower bound of tables.
5712 Add rep clauses.
5713
5714 * nlists.adb: Ditto.
5715 (Prev_Node, Next_Node): Change index type to Int so that it properly
5716 covers the range First_Node_Id - 1 up.
5717
57182007-06-06 Javier Miranda <miranda@adacore.com>
5719 Ed Schonberg <schonberg@adacore.com>
5720 Bob Duff <duff@adacore.com>
5721 Hristian Kirtchev <kirtchev@adacore.com>
5722
5723 * exp_aggr.ads, exp_aggr.adb:
5724 (Build_Record_Aggr_Code): Add missing initialization of secondary tags
5725 in extension aggregates.
5726 (Flatten): Other conditions being met, an aggregate is static if the
5727 low bound given by component associations is different from the low
5728 bound of the base index type.
5729 (Packed_Array_Aggregate_Handled): If the component type is itself a
5730 packed array or record, the front-end must expand into assignments.
5731 (Gen_Ctrl_Actions_For_Aggr): In call to Init_Controller, pass False to
5732 Init_Pr, instead of Ancestor_Is_Expression.
5733 (Gen_Ctrl_Actions_For_Aggr): When processing an aggregate of a
5734 coextension chain root, either generate a list controller or use the
5735 already existing one.
5736 (Static_Array_Aggregate): New procedure to construct a positional
5737 aggregate that can be handled by the backend, when all bounds and
5738 components are compile-time known constants.
5739 (Expand_Record_Aggregate): Force conversion of aggregates of tagged
5740 types covering interface types into assignments.
5741 (Replace_Type): move to Build_Record_Aggr_Code.
5742 (Expand_Record_Aggr_Code): if the target of the aggregate is an
5743 interface type, convert to the definite type of the aggregate itself,
5744 so that needed components are visible.
5745 (Convert_Aggr_In_Object_Decl): If the aggregate has controlled
5746 components and the context is an extended return statement do not
5747 create a transient block for it, to prevent premature finalization
5748 before the return is executed.
5749 (Gen_Assign): Do not generate a call to deep adjust routine if the
5750 component type is itself an array of controlled (sub)-components
5751 initialized with an inner aggregate.
5752 (Component_Check): New name for Static_Check. This name is now more
5753 appropriate, and documentation is added which was missing.
5754 (Component_Check): Add test for bit aligned component value
5755 (Component_Not_OK_For_Backend): Renames Has_Delayed_Nested_Aggregate_Or_
5756 Tagged_Comps, name is more appropriate given added function below.
5757 (Component_Not_OK_For_Backend): Check for bit aligned component ref.
5758
57592007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
5760 Javier Miranda <miranda@adacore.com>
5761 Robert Dewar <dewar@adacore.com>
5762
5763 * exp_attr.adb (Expand_N_Attribute_Reference): Case Callable and
5764 Terminated: Add unchecked type conversion from System.Address to
5765 System.Tasking.Task_Id when calling the predefined primitive
5766 _disp_get_task_id.
5767 Disable new Ada 05 accessibility check for JVM.NET targets, which
5768 cannot be implemented in a practical way.
5769 (Expand_N_Attribute_Reference: case Attribute_Tag): The use of 'Tag in
5770 the sources always references the tag of the actual object. Therefore,
5771 if 'Tag is applied in the sources to class-wide interface objects we
5772 generate code that displaces "this" to reference the base of the object.
5773 (Expand_N_Attribute_Reference, case Size): Return specified size if
5774 known to front end.
5775 (Expand_N_Attribute_Reference): The expansion of the 'Address attribute
5776 has code that displaces the pointer of the object to manage interface
5777 types. However this code must not be executed when the prefix is a
5778 subprogram. This bug caused the wrong expansion of the internally
5779 generated assignment that fills the dispatch table when the primitive
5780 is a function returning a class-wide interface type.
5781 (Expand_N_Attribute_Reference:Attribute_Valid): Remove incorrect call to
5782 Set_Attribute_Name for Name_Unaligned_Valid.
5783
57842007-06-06 Ed Schonberg <schonberg@adacore.com>
5785 Gary Dismukes <dismukes@adacore.com>
5786
5787 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case 'Address):
5788 If the initialization is the equivalent aggregate of the initialization
5789 procedure of the type, do not remove it.
5790 (Expand_N_Attribute_Definition_Clause): Exclude access variables
5791 initialized to null from having their expression reset to empty and
5792 note this exception in the comment.
5793
57942007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
5795 Robert Dewar <dewar@adacore.com>
5796 Ed Schonberg <schonberg@adacore.com>
5797 Gary Dismukes <dismukes@adacore.com>
5798
5799 * exp_ch2.adb: Remove "with" and "use" clauses for Namet and Snames.
5800 Add "with" and "use" clauses for Sem_Attr.
5801 (Expand_Current_Value): Do not replace occurences of attribute
5802 references where the prefix must be a simple name.
5803
5804 * sem_attr.ads, sem_attr.adb: Remove "with" and "use" clauses for
5805 Namet. Add new arrays Attribute_Name_Modifies_Prefix and
5806 Attribute_Requires_Simple_Name_Prefix.
5807 (Name_Modifies_Prefix): Body of new function.
5808 (Requires_Simple_Name_Prefix): Body of new function.
5809 (Resolve_Attribute, case Access): Improve error message for case of
5810 mismatched conventions.
5811 (Analyze_Attribute, case 'Tag): The prefix the attribute cannot be of an
5812 incomplete type.
5813 (Analyze_Attribute, case 'Access): If the type of the prefix is a
5814 constrained subtype for a nominal unconstrained type, use its base type
5815 to check for conformance with the context.
5816 (Resolve_Attribute): Remove test of the access type being associated
5817 with a return statement from condition for performing accessibility
5818 checks on access attributes, since this case is now captured by
5819 Is_Local_Anonymous_Access.
5820 (Analyze_Access_Attribute): Set Address_Taken on entity
5821 (Analyze_Attribute, case Address): Set Address_Taken on entity
5822 (OK_Self_Reference): Traverse tree to locate enclosing aggregate when
5823 validating an access attribute whose prefix is a current instance.
5824 (Resolve_Attribute): In case of attributes 'Code_Address and 'Address
5825 applied to dispatching operations, if freezing is required then we set
5826 the attribute Has_Delayed_Freeze in the prefix's entity.
5827 (Check_Local_Access): Set flag Suppress_Value_Tracking_On_Call in
5828 current scope if access of local subprogram taken
5829 (Analyze_Access_Attribute): Check legality of self-reference even if the
5830 expression comes from source, as when a single component association in
5831 an aggregate has a box association.
5832 (Resolve_Attribute, case 'Access): Do not apply accessibility checks to
5833 the prefix if it is a protected operation and the attribute is
5834 Unrestricted_Access.
5835 (Resolve_Attribute, case 'Access): Set the Etype of the attribute
5836 reference to the base type of the context, to force a constraint check
5837 when the context is an access subtype with an explicit constraint.
5838 (Analyze_Attribute, case 'Class): If the prefix is an interface and the
5839 node is rewritten as an interface conversion. leave unanalyzed after
5840 resolution, to ensure that type checking against the context will take
5841 place.
5842
58432007-06-06 Ed Schonberg <schonberg@adacore.com>
5844 Javier Miranda <miranda@adacore.com>
5845 Robert Dewar <dewar@adacore.com>
5846
5847 * exp_ch3.adb (Make_Controlling_Function_Wrappers): generate wrapper a
5848 wrapper when the full view of the controlling type of an inherited
5849 function that dispatches on result implements interfaces.
5850 (Expand_N_Object_Declaration): In cases where the type of the
5851 declaration is anonymous access, create finalization list for it.
5852 (Expand_N_Object_Declaration): Generate a persistent_bss directive only
5853 if the object has no explicit initialization, to match description of
5854 functionality of pragam Persistent_BSS.
5855 (Build_Equivalent_Array_Aggregate, Build_Equivalent_Record_Aggregate):
5856 new function to build static aggregates, to replace initialization call
5857 when static initialization is desired.
5858 (Freeze_Type): Generate a list controller for an access type whenever
5859 its designated type has controlled anonymous access discriminants.
5860 (Build_Equivalent_Aggregate): New procedure to compute a static
5861 aggregate to be used as default initialization for composite types,
5862 instead of a generating a call to the initialization procedure for the
5863 type.
5864 (Build_Initialization_Call): When available, replace a call to the
5865 initialization procedure with a copy of the equivalent static aggregate
5866 for the type.
5867 (Expand_N_Object_Declaration): Use New_Occurrence_Of in generated
5868 declarations for objects of a class-wide interface type, rather than
5869 just identifiers, to prevent visibility problems.
5870 (Expand_N_Object_Declaration): When expanding the declaration for an
5871 object of a class-wide interface type, preserve the homonym chain of
5872 the original entity before exchanging it with that of the generated
5873 renaming declaration.
5874 (Freeze_Enumeration_Type): Don't raise CE if No_Exception_Propagation
5875 active, because there is no way to handle the exception.
5876 (Freeze_Record_Type): In case of CPP_Class types add a call to Make_DT
5877 to do a minimum decoration of the Access_Disp_Table list.
5878 (Expand_Record_Controller): Avoid the addition of the controller between
5879 the component containing the tag of a secondary dispatch table and its
5880 adjacent component that stores the offset to the base of the object.
5881 This latter component is only generated when the parent type has
5882 discriminants ---documented in Add_Interface_Tag_Components).
5883 (Apply_Array_Size_Check): Removed, no longer needed.
5884 (Expand_N_Full_Type_Declaration): If the type has anonymous access
5885 components, create a Master_Entity for it only if it contains tasks.
5886 (Build_Init_Procedure): Suppress the tag assignment compiling under
5887 no run-time mode.
5888 (Freeze_Record_Type): Remove code associated with creation of dispatch
5889 table.
5890 (Init_Secondary_Tags): Update type of actuals when generating calls to
5891 Ada.Tags.Set_Offset_To_Top
5892 (Stream_Operation_OK): Disable use of streams compiling under no
5893 run-time mode
5894 (Expand_N_Object_Declaration): Don't do Initialize_Scalars initalization
5895 if Has_Init_Expression set.
5896 (Build_Init_Procedure): Replace call to Fill_DT_Entry by call to
5897 Register_Primitive, which provides the same functionality.
5898 (Requires_Init_Proc): Return false in case of interface types.
5899 (Add_Secondary_Tables): Use the new attribute Related_Interface to
5900 cleanup the code.
5901 (Predefined_Primitive_Freeze): Do not assume that an internal entity
5902 is always associated with a predefined primitive because the internal
5903 entities associated with interface types are not predefined primitives.
5904 Therefore, the call to Is_Internal is replaced by a call to the
5905 function Is_Predefined_Dispatching_Operation.
5906 (Make_Eq_If): When generating the list of comparisons for the
5907 components of a given variant, omit the controller component that is
5908 present if the variant has controlled components.
5909
59102007-06-06 Javier Miranda <miranda@adacore.com>
5911 Hristian Kirtchev <kirtchev@adacore.com>
5912 Bob Duff <duff@adacore.com>
5913
5914 * exp_ch4.adb (Complete_Coextension_Finalization): Add machinery to
5915 handle the creation of finalization lists and calls for nested
5916 coextensions when the root of the chains is part of a return statement.
5917 (Inside_A_Return_Statement): New function inside Complete_Coextension_
5918 Finalization.
5919 (Expand_Record_Equality): Skip components that are interface types.
5920 (Displace_Allocator_Pointer): Add missing support for interface subtypes
5921 (Expand_N_Allocator): Replace invocation of Is_Local_Access_Discriminant
5922 with Rewrite_Coextension. Change the condition for detecting coextension
5923 root nodes.
5924 (Is_Local_Access_Discriminant): Removed.
5925 (Rewrite_Coextension): New routine which rewrites a static coextension
5926 as a temporary and uses its unrestricted access in the construction of
5927 the outer object.
5928 (Complete_Coextension_Finalization): New routine. Generate finalization
5929 attachment calls to all delayed coextensions.
5930 (Expand_N_Allocator): Call Complete_Coextension_Finalization whenever
5931 the allocator is not a coextension itself and has delayed coextensions.
5932 If the current allocator is controlled, but also a coextension, delay
5933 the generation of the finalization attachment call.
5934 Rename local variable "Node" to "Nod" in order to avoid confusion with
5935 "Elists.Node".
5936 (Expand_Allocator_Expression): Call Adjust for initialized allocators of
5937 limited types that are not inherently limited. Such an allocator is
5938 illegal, but is generated by the expander for a return statement, to
5939 copy the result onto the secondary stack. This is the only case where a
5940 limited object can be copied. Generate code to displace the pointer
5941 to the object if the qualified expression is a class-wide interface
5942 object. Such displacement was missing and hence the copy of the object
5943 was wrong.
5944 (Apply_Accessibility_Check): Handle allocated objects initialized in
5945 place.
5946 (Displace_Allocator_Pointer): Subsidiary procedure to Expand_N_Allocator
5947 and Expand_Allocator_Expression. Allocating class-wide interface objects
5948 this routine displaces the pointer to the allocated object to reference
5949 the component referencing the corresponding secondary dispatch table.
5950 Expand_Allocator_Expression): Add missing support to allocate class-wide
5951 interface objects initialized with a qualified expression.
5952 (Get_Allocator_Final_List): Test for an anonymous access type that is a
5953 function result type, and use the finalization list associated with the
5954 function scope in that case (such an anonymous type should not be
5955 treated like an access parameter's type).
5956
59572007-06-06 Ed Schonberg <schonberg@adacore.com>
5958 Gary Dismukes <dismukes@adacore.com>
5959 Javier Miranda <miranda@adacore.com>
5960
5961 * exp_ch5.adb (Expand_N_Assignment_Statement): For the assignment of a
5962 controlled type, use Make_Handler_For_Ctrl_Operation to construct the
5963 required exception handler.
5964 (Expand_Simple_Function_Return, Expand_N_Return_Statement): Handle
5965 properly the case of a function whose return type is a limited
5966 class-wide interface type. Modify the code of the accessibility
5967 check to handle class-wide interface objects. In this case we need to
5968 displace "this" to reference the primary dispatch table to get access
5969 to the TSD of the object (to evaluate its accessibility level).
5970 (Expand_N_Extended_Return_Statement): Test for a tagged result type
5971 rather than a controlling result as one of the conditions for
5972 generating tests of the implicit BIP_Alloc_Form formal. The
5973 initialization assignment is also handled according to whether the
5974 result is tagged instead of controlling.
5975 In the case where the init assignment is inserted in the "then" part of
5976 the allocation conditional, rewrite the target to be a dereference of
5977 the implicit BIP_Object_Access formal.
5978 If the returned value is unconstrained and created on the secondary
5979 stack, mark the enclosing block and function so that the secondary
5980 stack is not reclaimed on return.
5981 Treat returns from functions with controlling results similarly to
5982 returns from functions with unconstrained result subtypes.
5983 If the object returned is unconstrained, and an allocator must be
5984 created for it, analyze the allocator once the block for the extended
5985 return is installed, to ensure that finalizable components
5986 of the expression use the proper finalization list. Guard the call to
5987 Move_Final_List with a check that there is something to finalize.
5988 (Make_Tag_Ctrl_Assignment): Use "old" handling
5989 of controlled type assignment for virtual machines, since new code uses
5990 unsupported features (such as direct access to bytes in memory).
5991
59922007-06-06 Gary Dismukes <dismukes@adacore.com>
5993 Ed Schonberg <schonberg@adacore.com>
5994
5995 * exp_ch6.ads, exp_ch6.adb (Expand_Call): When adding an extra
5996 accessibility actual, check for the case of an aliased object that has
5997 been rewritten as an Access attribute, and assign Prev to Prev_Orig so
5998 we fall into processing for the attribute rather than the name of the
5999 object.
6000 (Expand_Inline_Call): If an actual is a literal, and the corresponding
6001 formal has its address taken in the body, create a temporary to capture
6002 value. If the return type is a limited interface, do not treat the
6003 return value as Controlled.
6004 (Is_In_Place_Function): If the return type is a limited interface,
6005 treat as returning in place. The actual returned object may not always
6006 be limited, but the caller has to assume that it is returned in place.
6007 (Add_Final_List_Actual_To_Build_In_Place_Call): If the call is the
6008 context of an allocator, use the correct finalization chain (that is,
6009 the chain belonging to the access type, rather than the chain belonging
6010 to the current scope).
6011 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Test for a tagged
6012 result type rather than a controlling result as a precondition for
6013 adding an allocation form actual to a build-in-place call.
6014 (Add_Final_List_Actual_To_Build_In_Place_Call): Ditto.
6015 (Freeze_Subprogram): Code cleanup. Remove all the code that register the
6016 primitive in the dispatch tables. This work is now done by Make_DT when
6017 the type is frozen.
6018 (Register_Predefined_DT_Entry): Removed.
6019 (Add_Return): If end label is not present, use sloc of last statement
6020 for generated return statement in procedure, for better gdb behavior
6021 on expanded code.
6022 (Add_Access_Actual_To_Build_In_Place_Call): Set parent fields of the
6023 object address nodes to ensure proper processing by routines like
6024 Insert_After*.
6025 (Expand_Call): Fix generation of validity check for parameter
6026 (Add_Alloc_Form_Actual_To_Build_In_Place_Call): Return without passing
6027 the allocation form parameter if the result subtype is constrained,
6028 except when the function has a controlling result.
6029 (Add_Final_List_Actual_To_Build_In_Place_Call): Test Controlled_Type
6030 rather than Is_Controlled and Has_Controlled_Component, since we want to
6031 include class-wide result types in this treatment. Also test for a
6032 controlling result, since that also requires passing a finalization
6033 list.
6034 (Make_Build_In_Place_Call_In_Allocator): Call Add_Alloc_Form_Actual_*
6035 even when the result subtype is constrained, to handle calls involving
6036 controlling results.
6037 (Make_Build_In_Place_Call_In_Anonymous_Context): Add_Alloc_Form_Actual_*
6038 is now called even when the result subtype is constrained, to handle
6039 calls involving controlling results.
6040 (Make_Build_In_Place_Call_In_Assignment): Remove test for Is_Constrained
6041 on call to Add_Alloc_Form_Actual_To_Build_In_Place_Call (that procedure
6042 now performs the test).
6043 (Make_Build_In_Place_Call_In_Object_Declaration):
6044 Add_Alloc_Form_Actual_* is now called even when the result subtype is
6045 constrained, to handle calls involving controlling results.
6046 (Add_Return): Accomodate rewritten pattern from local raise to goto
6047 transformation, so that we still recognize an transfer statement
6048 and do the right thing here in that case.
6049 (Expand_N_Subprogram_Body): Add dummy Push/Pop_xxx_Label nodes at start
6050 and end of subprogram code.
6051 (Register_Interface_DT_Entry, Register_Predefined_DT_Entry): Add missing
6052 support for primitives that are functions (without formals) with a
6053 controlling result.
6054 (Inherited_From_Formal): If the actual subtype has not generic parent
6055 type, it is not an actual for a formal derived type, and there is no
6056 operation to inherit from the formal.
6057
60582007-06-06 Ed Schonberg <schonberg@adacore.com>
6059 Thomas Quinot <quinot@adacore.com>
6060
6061 * exp_ch7.ads, exp_ch7.adb (Expand_Cleanup_Actions): Set Sloc of
6062 inserted cleanup code appropriately for GDB use.
6063 (Make_Deep_Proc): Use Make_Handler_For_Ctrl_Operation to create
6064 exception handler for Deep_Adjust or Deep_Finalize.
6065 (Make_Handler_For_Ctrl_Operation): New subprogram. When runtime entity
6066 Raise_From_Controlled_Operation is available, use a call to that
6067 subprogram instead of a plain "raise Program_Error" node to raise
6068 Program_Error if an exception is propagated from an Adjust or Finalize
6069 operation.
6070 (Insert_Actions_In_Scope_Around): If the statement to be wrapped
6071 appears in the optional statement list of a triggering alternative, the
6072 scope actions can be inserted directly there, and not in the list that
6073 includes the asynchronous select itself.
6074
60752007-06-06 Ed Schonberg <schonberg@adacore.com>
6076 Robert Dewar <dewar@adacore.com>
6077 Hristian Kirtchev <kirtchev@adacore.com>
6078
6079 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry): Set sloc of
6080 generated exception handler appropriately when debugging generated code.
6081 Deal properly with No_Exception_Propagation restriction mode.
6082 (Expand_N_Abort_Statement): Add an unchecked type conversion from
6083 System.Address to System.Tasking.Task_Id when processing the result of
6084 the predefined primitive _disp_get_task_id.
6085 (Expand_N_Asynchronous_Select): Clarify comment.
6086 (Expand_N_Protected_Type_Declaration): Minor code cleanup.
6087 (Find_Parameter_Type): New routine inside Type_Conformant_Parameters.
6088 (Type_Conformant_Parameters): New parameter Prim_Op_Typ. Code cleanup.
6089 (Add_Private_Declarations, Build_Protected_Body): Use proper slocs for
6090 privals and for generated call to Complete_Entry_Body, for better gdb
6091 behavior.
6092 (Copy_Result_Type): Utility to construct a parameter and result profile
6093 for protected functions whose return type is an anonymous access to
6094 subprogram.
6095 (Build_Protected_Sub_Spec and Expand_Access_Protected_Subprogram_Type):
6096 call the above.
6097 (Build_Task_Activation_Call): Insert Activate_Tasks call at proper
6098 point when the local-raise-to-goto transformation has taken place.
6099
61002007-06-06 Javier Miranda <miranda@adacore.com>
6101 Nicolas Setton <setton@adacore.com>
6102
6103 * exp_dbug.adb (Get_Encoded_Name): Modified to continue providing its
6104 functionality when the backend is generating code.
6105 Otherwise any serious error
6106 reported by the backend calling the frontend routine Error_Msg
6107 changes the Compilation_Mode to Check_Semantics, disables the
6108 functionality of this routine and causes the generation of
6109 spureous additional errors.
6110
6111 * exp_dbug.ads (Pointers to Unconstrained Arrays): Document the
6112 debugging information now generated by the compiler for fat-pointer
6113 types.
6114 Document the contents of DW_AT_producer in the GNAT Vendor extensions to
6115 DWARF2/3.
6116 Document GNAT Vendor extensions to DWARF 2/3 and the "-gdwarf+" switch.
6117
61182007-06-06 Thomas Quinot <quinot@adacore.com>
6119
6120 * exp_dist.ads, exp_dist.adb (Make_Transportable_Check): New subprogram
6121 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
6122 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
6123 For a remote call to a function with a classwide return type, apply an
6124 E.4(18) check to the returned value.
6125 (Add_RACW_Primitive_Declarations_And_Bodies): Do not generate stubs for
6126 stream attributes of the designated type of an RACW, as they are not
6127 dispatching primitive operations.
6128
61292007-06-06 Geert Bosch <bosch@adacore.com>
6130
6131 * exp_fixd.adb (Integer_Literal): Add optional argument to construct a
6132 negative literal
6133 (Do_Divide_Fixed_Fixed): Add comments to indicate Frac is always
6134 positive
6135 (Do_Divide_Fixed_Universal): Handle case of negative Frac.
6136 (Do_Multiply_Fixed_Fixed): Add coments to indicate Frac is always
6137 positive
6138 (Do_Multiply_Fixed_Universal): Handle case of negative Frac.
6139
61402007-06-06 Javier Miranda <miranda@adacore.com>
6141
6142 * exp_imgv.adb (Expand_Value_Attribute): Disable compilation of this
6143 attribute compiling package Ada.Tags under No_Run_Time_Mode.
6144
61452007-06-06 Javier Miranda <miranda@adacore.com>
6146
6147 * exp_intr.adb (Expand_Unc_Deallocation): Add missing support for
6148 deallocation of class-wide interface objects.
6149 (Expand_Dispatching_Constructor_Call): Take into account that if the
6150 result of the dispatching constructor is an interface type, the
6151 function returns a class-wide interface type; otherwise the returned
6152 object would be actual. The frontend previously accepted returning
6153 interface types because Expand_Interface_Actuals silently performed
6154 the management of the returned type "as if" it were a class-wide
6155 interface type.
6156 (Expand_Dispatching_Constructor_Call): Replace call to
6157 Make_DT_Access_Action by direct call to Make_Function_Call.
6158
61592007-06-06 Robert Dewar <dewar@adacore.com>
6160 Ed Schonberg <schonberg@adacore.com>
6161
6162 * exp_pakd.adb (Expand_Packed_Not): Use RM_Size rather than ESize to
6163 compute masking constant, since we now set Esize properly to the
6164 underlying size.
6165 (Create_Packed_Array_Type): Set proper Esize value adjusted as required
6166 to match the alignment.
6167 (Create_Packed_Array_Type): Use Short_Short_Unsigned as base type for
6168 packed arrays of 8 bits or less.
6169
6170 * freeze.adb (Freeze_Entity): When freezing the formals of a
6171 subprogram, freeze the designated type of a parameter of an access type
6172 only if it is an access parameter.
6173 Increase size of C convention enumeration object
6174 (Freeze_Entity, array type case): Make sure Esize value is properly
6175 adjusted for the alignment if it is known.
6176 (Freeze_Entity, array type case): When checking bit packed arrays for
6177 the size being incorrect, check RM_Size, not Esize.
6178 (Freeze_Record_Type): Check for bad discriminated record convention
6179 (In_Exp_Body): Return true if the body is generated for a subprogram
6180 renaming, either an attribute renaming or a renaming as body.
6181 (Check_Itype): If the designated type of an anonymous access component
6182 is a non-protected subprogram type, indicate that it is frozen, to
6183 prevent out-of-scope freeze node at some subsequent call.
6184 (Freeze_Subprogram): On OpenVMS, reject descriptor passing mechanism
6185 only if the subprogram is neither imported nor exported, as well as the
6186 NCA descriptor class if the subprogram is exported.
6187
61882007-06-06 Ed Schonberg <schonberg@adacore.com>
6189 Arnaud Charlet <charlet@adacore.com>
6190 Robert Dewar <dewar@adacore.com>
6191 Gary Dismukes <dismukes@adacore.com>
6192
6193 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Remove properly a
6194 default initialization on an imported object, when there is no
6195 initialization call generated for it.
6196 (Expand_Pragma_Assert): Add handling of No_Exception_Propagation
6197 restriction
6198
6199 * snames.h, snames.ads, snames.adb, par-prag.adb: New pragma
6200 Static_Elaboration_Desired.
6201 Remove pragma Thread_Body.
6202 Implement a new pragma No_Body
6203 Removes the Explicit_Overriding pragma
6204 Remove Optional_Overriding pragma
6205 (Prag): Deal with Universal_Aliasing.
6206 (Name_CIL, Name_CIL_Constructor, Convention_CIL,
6207 Pragma_CIL_Constructor): New names.
6208
6209 * sem_cat.adb (Validate_Object_Declaration): An initialization that
6210 uses the equivalent aggregate of a type must be treated as an implicit
6211 initialization.
6212 (Get_Categorization): Check a unit for pragma Preelaborate only if it
6213 has none of the other categories.
6214 (Process_Import_Or_Interface_Pragma): Report an error for an attempt
6215 to apply Import to an object renaming declaration.
6216
6217 * sem_prag.adb (Process_Import_Or_Interface): Warn that a type imported
6218 from a C++ class should be declared as limited and that it will be
6219 considererd limited.
6220 (Analyze_Pragma): Warn that a type specified with pragma CPP_Class
6221 should be declared as limited and that it will be considererd limited.
6222 (Ada_2005_Pragma): New procedure, used to deal with Ada 2005 pragmas
6223 (Analyze_Pragma, case Export): Diagnose export of enumeration literal
6224 (Analyze_Pragma): Deal with Universal_Aliasing.
6225 (Sig_Flags): Likewise.
6226 (Set_Encoded_Interface_Name): Suppress encoding when compiling for AAMP.
6227 (Overflow_Checks_Unsuppressed): New flag.
6228 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
6229 (Analyze_Pragma [case Pack]): Ignore pragma Pack and post warning in
6230 case of JVM or .NET targets, and compiling user code.
6231 Add debugging convenience routine rv
6232
62332007-06-06 Robert Dewar <dewar@adacore.com>
6234
6235 * exp_strm.adb (Make_Field_Attributes): Avoid _Parent components that
6236 are interface type.
6237 (Build_Elementary_Input_Call): For floating-point use right type in the
6238 absence of strange size or stream size clauses.
6239 (Build_Elementary_Write_Call): Same fix
6240 (Has_Stream_Standard_Rep): Returns False if Stream_Size attribute
6241 set to value that does not match base type size.
6242
62432007-06-06 Ed Schonberg <schonberg@adacore.com>
6244
6245 * exp_util.ads, exp_util.adb (Expand_Subtype_From_Expr): In Ada2005, an
6246 object of a limited type can be initialized with a call to a function
6247 that returns in place. If the limited type has unknown discriminants,
6248 and the underlying type is a constrained composite type, build an actual
6249 subtype from the function call, as is done for private types.
6250 (Side_Effect_Free): An expression that is the renaming of an object or
6251 whose prefix is the renaming of a object, is not side-effect free
6252 because it may be assigned through the renaming and its value must be
6253 captured in a temporary.
6254 (Has_Controlled_Coextensions): New routine.
6255 (Expand_Subtype_From_Expr): Do nothing if type is a limited interface,
6256 as is done for other limited types.
6257 (Non_Limited_Designated_Type): new predicate.
6258 (Make_CW_Equivalent_Type): Modified to handle class-wide interface
6259 objects.
6260 Remove all handling of with_type clauses.
6261
6262 * par-ch10.adb: Remove all handling of with_type clauses.
6263
6264 * lib-load.ads, lib-load.adb (Load_Main_Source): Do not get the
6265 checksum if the main source could not be parsed.
6266 (Loat_Unit): When processing a child unit, determine properly whether
6267 the parent unit is a renaming when the parent is itself a child unit.
6268 Remove handling of with_type clauses.
6269
6270 * sinfo.ads, sinfo.adb (Is_Static_Coextension): New function.
6271 (Set_Is_Static_Coextension): New procedure.
6272 (Has_Local_Raise): New function
6273 (Set_Has_Local_Raise): New procedure
6274 (Renaming_Exception): New field
6275 (Has_Init_Expression): New flag
6276 (Delay_Finalize_Attach): Remove because flag is obsolete.
6277 (Set_Delay_Finalize_Attach): Remove because flag is obsolete.
6278 Remove all handling of with_type clauses.
6279 (Exception_Junk): Can now be set in N_Block_Statement
6280
62812007-06-06 Vincent Celier <celier@adacore.com>
6282 Robert Dewar <dewar@adacore.com>
6283
6284 * frontend.adb (Frontend): Return immediately if the main source could
6285 not be parsed, because of preprocessing errors.
6286
6287 * gnat1drv.adb (gnat1drv): Handle RE_Not_Available gracefully.
6288 (Gnat1drv): Exit with errors if the main source could not be parsed,
6289 because of preprocessing errors.
6290 (Check_Rep_Info): New procedure
6291
62922007-06-06 Robert Dewar <dewar@adacore.com>
6293
6294 * g-hesorg.ads, g-heasor.ads,
6295 g-busorg.ads, g-bubsor.ads: Update documentation
6296 GNAT.Heap/Bubble_Sort_G is now pure
6297
62982007-06-06 Robert Dewar <dewar@adacore.com>
6299
6300 * g-catiio.ads, g-catiio.adb (Image): Check for null picture string
6301
63022007-06-06 Robert Dewar <dewar@adacore.com>
6303 Ed Schonberg <schonberg@adacore.com>
6304
6305 * g-comlin.ads, g-comlin.adb:
6306 Add new warning for renaming of function return objects
6307
6308 * opt.adb (Tree_Write, Tree_Read): Use proper expressions for size
6309 (Tree_Read): Use size of object instead of type'object_size, since the
6310 latter is incorrect for packed array types.
6311 (Tree_Write): Same fix
6312
6313 * opt.ads: Add new warning for renaming of function return objects
6314 (Generating_Code): New boolean variable used to indicate that the
6315 frontend as finished its work and has called the backend to process
6316 the tree and generate the object file.
6317 (GCC_Version): Is now private
6318 (Static_Dispatch_Tables): New constant declaration.
6319 (Overflow_Checks_Unsuppressed): New flag.
6320 (Process_Suppress_Unsuppress): Set Overflow_Checks_Unsuppressed.
6321 (List_Closure): New flag for gnatbind (-R)
6322 Zero_Formatting: New flag for gnatbind (-Z)
6323 (Special_Exception_Package_Used): New flag.
6324 (Warn_On_Unrepped_Components): New flag.
6325
6326 * sem_ch8.adb (Check_Library_Unit_Renaming): Check that the renamed
6327 unit is a compilation unit, rather than relying on its scope, so that
6328 Standard can be renamed.
6329 (Analyze_Object_Renaming): Add new warning for renaming of function
6330 return objects.
6331 Also reject attempt to rename function return object in Ada 83 mode.
6332 (Attribute_Renaming): In case of tagged types, add the body of the
6333 generated function to the freezing actions of the type.
6334 (Find_Type): A protected type is visible right after the reserved word
6335 "is" is encountered in its type declaration. Set the entity and type
6336 rather than emitting an error message.
6337 (New_Scope): Properly propagate Discard_Names to inner scopes
6338 (Check_Nested_Access): New procedure.
6339 (Has_Nested_Access, Set_Has_Nested_Access): New procedures.
6340 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
6341
6342 * sem_warn.ads, sem_warn.adb: Improvements to infinite loop warning
6343 Add new warning for renaming of function return objects
6344 (Check_References): Suppress warnings for objects whose type or
6345 base type has Warnings suppressed.
6346 (Set_Dot_Warning_Switch): Add processing for -gnatw.c/C
6347 (Set_Warning_Switch): Include new -gnatwc in -gnatwa
6348
63492007-06-06 Vincent Celier <celier@adacore.com>
6350 Emmanuel Briot <briot@adacore.com>
6351 Olivier Hainque <hainque@adacore.com>
6352
6353 * g-debpoo.ads, g-debpoo.adb (Free_Physically.Free_Blocks): Use the
6354 absolute value of Header.Block_Size when displaying the freed physical
6355 memory in traces.
6356 (Allocate): Compute Storage_Address using Integer_Address, not
6357 Storage_Offset, because the range of Storage_Offset may not be large
6358 enough.
6359 (Configure): New parameter Low_Level_Traces
6360 (Allocate, Deallocation, Free_Physically): Added low-level traces
6361 (Configure): new parameter Errors_To_Stdout.
6362 (Output_File): new subprogram
6363 (Deallocate, Dereference): Send error messages to the proper stream
6364 (Print_Pool, Print_Info_Stdout): Make sure the output goes to stdout, as
6365 documented. Previous code would send it to the current output file
6366 defined in GNAT.IO, which might not be stdout
6367 (Is_Valid): Adjust comment to mention that a positive reply means that
6368 Header_Of may be used to retrieve the allocation header associated with
6369 the subprogram Storage address argument. Return False early if this
6370 address argument is misaligned.
6371
63722007-06-06 Vincent Celier <celier@adacore.com>
6373
6374 * gnatcmd.adb (GNATCmd): Accept switch -aP for commands that accept
6375 switch -P
6376 (ASIS_Main): New global variable
6377 (Get_Closure): New procedure
6378 (GNATCmd): Set ASIS_Main when -P and -U with a main is used for gnat
6379 check, metric or pretty. Call Get_Closure in this case.
6380 (Check_Files): For GNAT LIST, check all sources of all projects when
6381 All_Projects is True.
6382 (GNATCmd): Accept -U for GNAT LIST
6383
63842007-06-06 Vincent Celier <celier@adacore.com>
6385
6386 * gnatlink.adb (Gnatlink): Do not specify -static-libgcc when --LINK=
6387 has been specified
6388 Correct error message when invocation of the linker fails
6389 Add explicit size clause for the C imported variables
6390 Object_List_File_Supported and Using_GNU_Linker to emphasize that
6391 we expect char size.
6392 Read target parameters earlier, since this is needed to set
6393 Target_VM properly. Also do not use -static/shared-libgcc for non GCC
6394 targets.
6395
63962007-06-06 Vincent Celier <celier@adacore.com>
6397
6398 * gnatls.adb:
6399 Add 3 spaces before the default project directory when displaying
6400 the project search path.
6401 Add new command line switch '-l' to display license information.
6402
64032007-06-06 Vasiliy Fofanov <fofanov@adacore.com>
6404
6405 * gmem.c: Add support for timestamps on memory operations.
6406
6407 * memtrack.adb, gnatmem.adb: Add support for timestamps on memory
6408 operations (not used currently, just foundation for future
6409 enhancements). Add possibility to perform full dump of gmem.out file.
6410 (Print_Back_Traces): Declare accesses to root arrays constants since
6411 they aren't modified.
6412 (Print_Back_Traces): allocate root arrays on the heap rather than stack.
6413
64142007-06-06 Vincent Celier <celier@adacore.com>
6415
6416 * gnatsym.adb: Update Copyright notice
6417 (Parse_Cmd_Line): Accept new switch -D
6418 (Gnatsym): In Direct policy (switch -D) copy reference file to symbol
6419 file.
6420
6421 * prj.ads (Policy): New policy Direct
6422 (Yes_No_Unknown): New enumeration type
6423 (Project_Data): New component Libgnarl_Needed
6424
6425 * prj-nmsc.adb (Check_For_Source): When recording a source file make
6426 use the untouched pathname casing.
6427 (Get_Directories): Ensure that the Display_Exec_Directory is using the
6428 proper casing on non case-sensitive platforms like Windows.
6429 (Get_Unit): Accept file names x__... and x~... (where x = a, g, i or s)
6430 on all platforms, as it is not possible to know which one is allowed
6431 before processing the project files.
6432 (Check_Stand_Alone_Library): Check that Library_Reference_Symbol_File is
6433 specified when symbol policy is Direct. Check that when there is a
6434 symbol file defined (either by default or with attribute
6435 Library_Symbol_File) it is not the same as the reference symbol file.
6436 (Check_Stand_Alone_Library): Recognize new symbol policy Direct.
6437 (Look_For_Sources): Allow Locally_Removed_Files to be declare in non
6438 extending projects.
6439 (Record_Ada_Source): Record a source that has been locally removed in an
6440 imported project.
6441
6442 * symbols.ads (Policy): New policy Direct
6443
6444 * symbols-vms.adb (Initialize): Take new policy Direct in case
6445 statement
6446
64472007-06-06 Vincent Celier <celier@adacore.com>
6448
6449 * g-os_lib.ads, g-os_lib.adb (Normalize_Pathname.Get_Directory):
6450 Correct obvious bug (return Dir; instead of return Directory;).
6451 (Normalize_Pathname): Use Reference_Dir'Length, not Reference_Dir'Last
6452
64532007-06-06 Thomas Quinot <quinot@adacore.com>
6454
6455 * g-pehage.adb (Produce): Open output files in Binary mode, so that
6456 they have UNIX line endings (LF only) even on Windows, and thus pass
6457 all GNAT style checks.
6458
64592007-06-06 Emmanuel Briot <briot@adacore.com>
6460
6461 * g-regpat.adb (Quote): Fix improper quoting of '.'
6462
64632007-06-06 Thomas Quinot <quinot@adacore.com>
6464
6465 * g-soccon.ads: Add new constant Thread_Blocking_IO, always True by
6466 default, set False on a per-runtime basis.
6467 (Need_Netdb_Buffer): New constant.
6468
6469 * g-socket.ads, g-socket.adb: Import new package
6470 GNAT.Sockets.Thin.Task_Safe_NetDB.
6471 (Raise_Host_Error): Use Host_Error_Message from platform-specific thin
6472 binding to obtain proper message.
6473 (Close_Selector): Use GNAT.Sockets.Thin.Signalling_Fds.Close.
6474 Replace various occurrences of Arry (Arry'First)'Address with the
6475 equivalent Arry'Address (GNAT always follows implementation advice from
6476 13.3(14)).
6477 (Get_Host_By_Address, Get_Host_By_Name,
6478 Get_Service_By_Name, Get_Service_By_Port): Do not use GNAT.Task_Lock;
6479 instead, rely on platform-specific task safe netdb operations provided
6480 by g-socthi.
6481
6482 * g-socthi.ads, g-socthi.adb (Initialize): Remove obsolete formal
6483 parameter Process_Blocking_IO.
6484 (Host_Error_Messages): Add stub body.
6485 (GNAT.Sockets.Thin.Signalling_Fds): New procedure Close.
6486 (Safe_Gethostbyname, Safe_Gethostbyaddr, Safe_Getservbyname,
6487 Safe_Getservbyport): Move functions into new child package
6488 Task_Safe_NetDB.
6489 (Nonreentrant_Gethostbyname, Nonreentrant_Gethostbyaddr,
6490 Nonreentrant_Getservbyname, Nonreentrant_Getservbyport): New routines.
6491 (In_Addr): Add alignment clause.
6492
64932007-06-06 Robert Dewar <dewar@adacore.com>
6494
6495 * g-trasym.ads, g-traceb.ads: Update list of supported targets
6496 Add note about symbolic traceback
6497
64982007-06-06 Pascal Obry <obry@adacore.com>
6499
6500 * hostparm.ads (Normalized_CWD): Use the host directory separator
6501 instead of the hardcoded forward slash which is not the proper
6502 character on Windows for example.
6503 (Java_VM): Removed.
6504
65052007-06-06 Vincent Celier <celier@adacore.com>
6506 Arnaud Charlet <charlet@adacore.com>
6507
6508 * a-clrefi.adb, a-clrefi.ads: New files
6509
6510 * impunit.adb: Add s-os_lib in the list of user visible units.
6511 (Non_Imp_File_Names_95): Add a-clrefi to this list
6512 Remove obsolete run-time entries.
6513 (Non_Imp_File_Names_05): Add Ada 2005 entries for:
6514 "a-exetim" -- Ada.Execution_Time
6515 "a-extiti" -- Ada.Execution_Time.Timers
6516
6517 * mlib-prj.ads, mlib-prj.adb
6518 (Build_Library): Use untouched object dir and library dir. At the
6519 same time makes sure that the checks are done using the canonical
6520 form. Removes hard-coded directory separator and use the proper host
6521 one instead.
6522 (Process_Project): Do not look in object directory to check if libgnarl
6523 is needed for a library, if there is no object directory.
6524 (Build_Library): Scan the ALI files to decide if libgnarl is needed for
6525 linking.
6526 (Build_Library): When invoking gnatbind, use a response file if the
6527 total size of the arguments is too large.
6528
6529 * Makefile.rtl: (g-sttsne): New object file.
6530 Add entry for a-clrefi, s-utf_32, System.Exceptions
6531
6532 * Make-lang.in: Remove bogus dependency of s-memory.o on memtrack.o.
6533 (GNAT_ADA_OBJS, GNATBIND_OBJS): Add s-except.o.
6534 (GNATBIND_OBJS): Add new objects a-clrefi.o and a-comlin.o
6535 Change g-string to s-string, g-os_lib to s-os_lib
6536 Change all g-utf_32 references to s-utf_32
6537
65382007-06-06 Tristan Gingold <gingold@adacore.com>
6539 Olivier Hainque <hainque@adacore.com>
6540
6541 * init.c: Do not adjust IP of an imported VMS exception of ia64.
6542 LIB$STOP is called to raise an exception and the IP of the exception
6543 is the instruction right after the call.
6544 (__gnat_adjust_context_for_raise, AIX): Implement.
6545 (__gnat_error_handler, AIX): Accept SIGINFO related arguments and call
6546 adjust_context_for_raise before Raise_From_Signal_Hanler.
6547 (__gnat_install_handler, AIX): Add SA_SIGINFO to the sa_flags, to ensure
6548 siginfo is passed to the handler, necessary to let the zcx propagation
6549 engine unwind past it.
6550
65512007-06-06 Olivier Hainque <hainque@adacore.com>
6552
6553 * initialize.c (__gnat_initialize for vxworks): Update documentation
6554 on the ZCX support, using different sets of crtstuff objects than with
6555 GCC 3.4.
6556
65572007-06-06 Robert Dewar <dewar@adacore.com>
6558
6559 * layout.ads, layout.adb (Adjust_Esize_Alignment): Move spec to package
6560 spec from body
6561 (Layout_Type): Fix recomputation of size from alignment.
6562
65632007-06-06 Ed Schonberg <schonberg@adacore.com>
6564 Javier Miranda <miranda@adacore.com>
6565
6566 * sem_ch12.adb (Analyze_Associations): Diagnose use of an others
6567 association in an instance.
6568 (Copy_Generic_Node): If the node is a string literal, no need to copy
6569 its descendants.
6570 (Is_Generic_Formal): For a formal subprogram, the declaration is the
6571 grandparent of the entity.
6572 (Analyze_Formal_Interface_Type): Transform into a full type declaration,
6573 to simplify handling of formal interfaces that derive from other formal
6574 interfaces.
6575 (Instantiate_Subprogram_Body): The defining unit name of the body of
6576 the instance should be a defining identifier.
6577 (Install_Formal_Packages): make global to the package, for use in
6578 instantiations of child units.
6579 (Analyze_Package_Instantiation): Do not attempt to set information on an
6580 enclosing master of an entry when expansion is disabled.
6581 (Instantiate_Type): If the actual is a tagged synchronized type and the
6582 generic ancestor is an interface, create a generic actual for the
6583 corresponding record.
6584 (Analyze_Formal_Derived_Interface_Type): Rewrite as a derived type
6585 declaration, to ensure that the interface list is processed correctly.
6586 (Inline_Instance_Body): If enclosing scope is an instance body, remove
6587 its entities from visibiility as well.
6588 (Pre_Analyze_Actuals): if the actual is an allocator with constraints
6589 given with a named association, analyze the expression only, not the
6590 discriminant association itself.
6591 (Reset_Entity): If the analysis of a selected component is transformed
6592 into an expanded name in the prefix of a call with parameters, do not
6593 transform the original node into an expanded name, to prevent visibility
6594 errors in the case of nested generics.
6595 (Check_Private_View): For an array type, check whether the index types
6596 may need exchanging.
6597
65982007-06-06 Arnaud Charlet <charlet@adacore.com>
6599 Vincent Celier <celier@adacore.com>
6600
6601 * lib-writ.adb: Handle Convention_CIL in addition to Convention_Java,
6602 since both are separated.
6603 Add support for imported CIL packages.
6604 Add further special handling of "value_type" for CIL.
6605 Add special handling of pragma Import for CIL.
6606
6607 * make.ads, make.adb: When switch -eS is used, direct all outputs to
6608 standard output instead of standard error, except errors.
6609 (Absolute_Path): Use untouched casing for the parent directory.
6610 (Add_Library_Search_Dir): Use the untouched directory name.
6611 (Add_Source_Search_Dir): Idem.
6612 (Change_To_Object_Directory): Update output to use proper casing.
6613 (Create_Binder_Mapping_File): Use the untouched filename to set
6614 ALI_Name.
6615 (Gnatmake): Use untouched library and executable directory names.
6616 (Insert_Project_Sources): Use untouched filename for spec and body.
6617 (Is_In_Object_Directory): Use untouched object directory.
6618 (Mark_Directory): Idem.
6619 (Collect_Arguments_And_Compile): Ensure that Full_Source_File always
6620 contains the non-canonical filename in all cases.
6621 (Change_To_Object_Directory): In verbose mode, display the name of the
6622 object directory we're changing to.
6623 (Compile_Sources): Make sure, when a project file is used, to compile
6624 the body of the unit, when there is one, even when only the spec is
6625 recorded in an ALI file.
6626 (Gcc_Switches, Binder_Switches, Linker_Switches): Tables moved from the
6627 spec to the body.
6628 (Report_Compilation_Failed): New procedure
6629 (Bind, Display_Commands, Compile_Sources, Initialize, Scan_Make_Arg):
6630 procedures moved from the spec to the body.
6631 (Extract_Failure): Removed, not used
6632 Replace explicit raises of exception Bind_Failed and Link_Failed with
6633 calls to Make_Failed with the proper message.
6634 Replace explicit raises of exception Compilation_Failed with calls to
6635 procedure Report_Compilation_Failed.
6636 (Initialize): Create mapping files unconditionally when using project
6637 files.
6638
6639 * sem_mech.adb: (Name_CIL, Name_CIL_Constructor, Convention_CIL,
6640 Pragma_CIL_Constructor): New names.
6641
6642 * targparm.ads, targparm.adb
6643 (Compiler_System_Version): Removed, no longer used.
6644 (Get_Target_Parameters): Relax checks on system.ads validity. Add
6645 handling of two new system flags: JVM and CLI.
6646
66472007-06-06 Jose Ruiz <ruiz@adacore.com>
6648 Arnaud Charlet <charlet@adacore.com>
6649
6650 * Makefile.in (LIBGNAT_TARGET_PAIRS for VxWorks 6): For the RTP run
6651 time, use the default s-interr body that provides interrupt support
6652 based on signals.
6653 (LIBGNAT_TARGET_PAIRS for x86-linux): Use specialized versions of
6654 a-exetim.ad{s,b}, a-extiti.ad{s,b}, a-rttiev.ad{s,b}, s-osinte.ad{s,b},
6655 g-soccon.ads, and s-taprop.adb for the marte run time.
6656 (EXTRA_GNATRTL_TASKING_OBJS for x86-linux): Execution time clocks and
6657 timers are supported on marte.
6658 (EH_MECHANISM for marte): Do not use ZCX.
6659 (THREADSLIB for marte): Use -lmarte.
6660 Add mlib-tgt-vms.o to the list of objects for gnatmake for VMS
6661 Add mlib-tgt-specific.o to gnatmake objects
6662 mlib-tgt-<platforms>.adb is now the body of MLib.Tgt.Specific, no
6663 longer of MLib.Tgt.
6664 (LIBGNAT_TARGET_PAIRS for vxworks): When building a run time for VxWorks
6665 6, either kernel or rtp, use a specialized version of s-osinte.ads.
6666
66672007-06-06 Pascal Obry <obry@adacore.com>
6668
6669 * mkdir.c (__gnat_mkdir): Add support for UTF-8.
6670
66712007-06-06 Vincent Celier <celier@adacore.com>
6672
6673 * mlib.ads, mlib.adb (Build_Library): Do not use hard-coded directory
6674 separator, use instead the proper host directory separator.
6675 (Copy_ALI_Files): Make sure that an already existing ALI file in the
6676 ALI copy dir is writable, before doing the copy.
6677
6678 * mlib-utl.ads, mlib-utl.adb:
6679 (Gcc): If length of command line is too long, put the list of object
6680 files in a response file, if this is supported by the platform.
6681 (Ar): If invocation of the archive builder is allowed to be done in
6682 chunks and building it in one shot would go above an OS dependent
6683 limit on the number of characters on the command line, build the archive
6684 in chunks.
6685
66862007-06-06 Vincent Celier <celier@adacore.com>
6687
6688 * osinte-c.ads, osint-c.adb (Set_Library_Info_Name): Fail if base name
6689 of specified object file is not equal to base name of source.
6690
66912007-06-06 Javier Miranda <miranda@adacore.com>
6692 Hristian Kirtchev <kirtchev@adacore.com>
6693 Ed Schonberg <schonberg@adacore.com>
6694
6695 * sem_ch3.adb (Process_Full_View): Propagate the CPP_Class attribute to
6696 the full type declaration.
6697 (Analyze_Component_Declaration): Add local variable E to capture the
6698 initialization expression of the declaration. Replace the occurences of
6699 Expression (N) with E.
6700 (OK_For_Limited_Init_In_05): Allow initialization of class-wide
6701 limited interface object with a function call.
6702 (Array_Type_Declaration): If the declaration lacks subtype marks for
6703 indices, create a simple index list to prevent cascaded errors.
6704 (Is_Null_Extension): Ignore internal components created for secondary
6705 tags when checking whether a record extension is a null extension.
6706 (Check_Abstract_Interfaces): Add missing support for interface subtypes
6707 and generic formals.
6708 (Derived_Type_Declaration): Add missing support for interface subtypes
6709 and generic formals.
6710 (Analyze_Object_Declaration): If an initialization expression is
6711 present, traverse its subtree and mark all allocators as static
6712 coextensions.
6713 (Add_Interface_Tag_Component): When looking for components that may be
6714 secondary tags, ignore pragmas that can appear within a record
6715 declaration.
6716 (Check_Abstract_Overriding): an inherited function that dispatches on
6717 result does not need to be overriden if the controlling type is a null
6718 extension.
6719 (Mentions_T): Handle properly a 'class attribute in an anonymous access
6720 component declaration, when the prefix is an expanded name.
6721 (Inherit_Component): If the derivation is for a private extension,
6722 inherited components remain visible and their ekind should not be set
6723 to Void.
6724 (Find_Type_Of_Object): In the case of an access definition, always set
6725 Is_Local_Anonymous_Access. We were previously not marking the anonymous
6726 access type of a return object as a local anonymous type.
6727 (Make_Index): Use Ambiguous_Character to report ambiguity on a discrete
6728 range with character literal bounds.
6729 (Constrain_Array): Initialize the Packed_Array_Type field to Empty.
6730 (Access_Subprogram_Declaration): Indicate that the type declaration
6731 depends on an incomplete type only if the incomplete type is declared
6732 in an open scope.
6733 (Analyze_Subtype_Declaration): Handle properly subtypes of
6734 synchronized types that are tagged, and that may appear as generic
6735 actuals.
6736 (Access_Subprogram_Declaration): An anonymous access to subprogram can
6737 appear as an access discriminant in a private type declaration.
6738 (Add_Interface_Tag_Components): Complete decoration of the component
6739 containing the tag of a secondary dispatch table and the component
6740 containing the offset to the base of the object (this latter component
6741 is only generated when the parent type has discriminants --as documented
6742 in this routine).
6743 (Inherit_Components): Use the new decoration of the tag components to
6744 improve the condition that avoids inheriting the components associated
6745 with secondary tags of the parent.
6746 (Build_Discriminanted_Subtype): Indicate to the backend that the
6747 size of record types associated with dispatch tables is known at
6748 compile time.
6749 (Analyze_Subtype_Declaration): Propagate Is_Interface flag when needed.
6750 (Analyze_Interface_Declaration): Change setting of Is_Limited_Interface
6751 to include task, protected, and synchronized interfaces as limited
6752 interfaces.
6753 (Process_Discriminants): Remove the setting of
6754 Is_Local_Anonymous_Access on the type of (anonymous) access
6755 discriminants of nonlimited types.
6756 (Analyze_Interface_Type_Declaration): Complete the decoration of the
6757 class-wide entity it is is already present. This situation occurs if
6758 the limited-view has been previously built.
6759 (Enumeration_Type_Declaration): Initialize properly the Enum_Pos_To_Rep
6760 field.
6761 (Add_Interface_Tag_Components.Add_Tag): Set the value of the attribute
6762 Related_Interface.
6763
67642007-06-06 Ed Schonberg <schonberg@adacore.com>
6765
6766 * sem_aggr.adb (Resolve_Record_Aggregate): Ignore internal components
6767 of the type that specify the position of interface tags when the type
6768 inherits discriminated array components from the parent type.
6769 If a component is initialized with a box, check for the presence of a
6770 default expression in its declaration before using its default
6771 initialization procedure.
6772 (Resolve_Record_Aggregate): If a component is box-initialized, and the
6773 component type has a discriminants, create a partial aggregate for it
6774 by copying the discriminants of the component subtype.
6775 Reject attempt to initialize a discriminant with a box.
6776 (Array_Aggr_Subtype): Indicate to the backend that the size of arrays
6777 associated with dispatch tables is known at compile time.
6778 (Get_Value): If an association in a record aggregate has a box
6779 association, and the corresponding record component has a default
6780 expression, always copy the default expression, even when the
6781 association has a single choice, in order to create a proper
6782 association for the expanded aggregate.
6783
67842007-06-06 Ed Schonberg <schonberg@adacore.com>
6785 Robert Dewar <dewar@adacore.com>
6786
6787 * par-ch12.adb (P_Generic_Associations): The source position of an
6788 Others association is that of the others keyword, not that of the token
6789 that follows the box.
6790 (P_Formal_Type_Definition): Handle formal access types that carry a
6791 not null indicator.
6792
6793 * par-ch3.adb (P_Known_Discriminant_Part_Opt, P_Component_Items): If
6794 multiple identifier are present, save Scan_State before scanning the
6795 colon, to ensure that separate trees are constructed for each
6796 declaration.
6797 (P_Identifier_Declarations): For object declaration, set new flag
6798 Has_Init_Expression if initialization expression present.
6799 (P_Null_Exclusion): Properly diagnose NOT NULL coming before NULL
6800 Improve NOT NULL error messages
6801
68022007-06-06 Robert Dewar <dewar@adacore.com>
6803
6804 * par-ch4.adb: (P_Name): Recover from literal used as name
6805
68062007-06-06 Vincent Celier <celier@adacore.com>
6807
6808 * prep.ads, prep.adb (Expression): New Boolean parameter Complemented,
6809 defaulted to False.
6810 In the "not" case, recursive call with Complemented set to True.
6811 Do not allow "or" or "and" operators when Complemented is True.
6812
68132007-06-06 Vincent Celier <celier@adacore.com>
6814
6815 * prj.adb (Project_Empty): Gives default value for new component
6816 Libgnarl_Needed
6817
6818 * prj-attr.ads: Minor reformatting
6819
6820 * prj-env.ads, prj-env.adb (For_All_Object_Dirs): Register object
6821 directory using the untouched casing.
6822 (For_All_Source_Dirs): Idem.
6823
6824 * prj-ext.ads, prj-ext.adb (Search_Directories): New table to record
6825 directories specified with switches -aP.
6826 (Add_Search_Project_Directory): New procedure
6827 (Initialize_Project_Path): Put the directories in table
6828 Search_Directories in the project search path.
6829 (Initialize_Project_Path): For VMS, transform into canonical form the
6830 project path.
6831
68322007-06-06 Arnaud Charlet <charlet@adacore.com>
6833
6834 * restrict.ads, restrict.adb (No_Exception_Handlers_Set): Only return
6835 true if configurable run-time or No_Run_Time is set.
6836 (Set_Restriction): Avoid setting restriction No_Elaboration_Code when
6837 processing an unit which is not the one being compiled.
6838
68392007-06-06 Arnaud Charlet <charlet@adacore.com>
6840
6841 * s-arit64.adb: Replace System.Pure_Exceptions by Ada 05 syntax.
6842 Replace UC by Ada.UC
6843
6844 * s-bitops.adb: Get rid of System.Pure_Exceptions.
6845 Replace UC by Ada.UC
6846
68472007-06-06 Robert Dewar <dewar@adacore.com>
6848
6849 * scng.adb: (Check_End_Of_Line): Deal with very long lines
6850
68512007-06-06 Robert Dewar <dewar@adacore.com>
6852
6853 * sem.ads, sem.adb (Semantics): Save and restore Global_Discard_Names
6854 Remove no longer used nodes.
6855
68562007-06-06 Javier Miranda <miranda@adacore.com>
6857 Ed Schonberg <schonberg@adacore.com>
6858 Robert Dewar <dewar@adacore.com>
6859
6860 * sem_ch10.ads, sem_ch10.adb (Analyze_Compilation_Unit): Disable check
6861 on obsolescent withed unit in case of limited-withed units.
6862 (Analyze_Compilation_Unit): Add guard to code that removed an
6863 instantiation from visibility, to prevent compiler aborts when
6864 instantiation is abandoned early on.
6865 (Install_Limited_Withed_Unit): Recognize a limited-with clause on the
6866 current unit being analyzed, and Distinguish local incomplete types
6867 from limited views of types declared elsewhere.
6868 (Build_Limited_Views.Decorate_Tagged_Type): Add documentation
6869 to state that the class-wide entity is shared by the limited-view
6870 and the full-view.
6871 (Analyze_With_Clause): Improve placement of flag for case of
6872 unimplemented unit.
6873 (Analyze_With_Clause): Recognize use of GNAT.Exception_Traces in a
6874 manner similar to GNAT.Current_Exception. This is a violation of
6875 restriction (No_Exception_Propagation), and also inhibits the
6876 optimization of local raise to goto.
6877 (Analyze_With_Clause): Check for Most_Recent_Exception being with'ed,
6878 and if so set Most_Recent_Exception_Used flag in Opt, and also check
6879 for violation of restriction No_Exception_Propagation.
6880
68812007-06-06 Javier Miranda <miranda@adacore.com>
6882 Hristian Kirtchev <kirtchev@adacore.com>
6883 Gary Dismukes <dismukes@adacore.com>
6884
6885 * sem_ch11.adb (Analyze_Exception_Handlers): Add barrier to avoid the
6886 use of entity Exception_Occurrence if it is not available in the
6887 target run-time.
6888
6889 * sem_ch9.adb (Analyze_Protected_Type, Analyze_Task_Type): When
6890 concurrent types are declared within an Ada 2005 generic, build their
6891 corresponding record types since they are needed for overriding-related
6892 semantic checks.
6893 (Analyze_Protected_Type): Rearrange and simplify code for testing that a
6894 protected type does not implement a task interface or a nonlimited
6895 interface.
6896 (Analyze_Task_Type): Rearrange and simplify code for testing that a task
6897 type does not implement a protected interface or a nonlimited interface.
6898 (Single_Task_Declaration, Single_Protected_Declaration): use original
6899 entity for variable declaration, to ensure that debugging information
6900 is correcty generated.
6901 (Analyze_Protected_Type, Analyze_Task_Type): Do not call expander
6902 routines if the expander is not active.
6903 (Analyze_Task_Body): Mark all handlers to stop optimization of local
6904 raise, since special things happen for task exception handlers.
6905
6906 * sem_disp.adb (Check_Controlling_Formals): Add type retrieval for
6907 concurrent types declared within a generic.
6908 (Check_Dispatching_Operation): Do not emit warning about late interface
6909 operations in the context of an instance.
6910 (Check_Dispatching_Call): Remove restriction against calling a
6911 dispatching operation with a limited controlling result.
6912 (Check_Dispatching_Operation): Replace calls to Fill_DT_Entry and
6913 Register_Interface_DT_Entry by calls to Register_Primitive.
6914 (Check_Dispatching_Formals): Handle properly a function with a
6915 controlling access result.
6916
69172007-06-06 Robert Dewar <dewar@adacore.com>
6918 Arnaud Charlet <charlet@adacore.com>
6919
6920 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Stream_Size):
6921 Check for restriction No_Implementation_Attributes if in Ada 95 mode.
6922 (Storage_Pool): Do not crash when RE_Stack_Bounded_Pool is not available
6923 (Analyze_Attribute_Definition_Clause [External_Tag]): Generate error
6924 message when using a VM, since this attribute is not supported.
6925 (Analyze_Record_Representation_Clause): Give unrepped component warnings
6926
6927 * usage.adb: Add new warning for renaming of function return objects
6928 Indicate that -gnatwp and -gnatwP concern front-end inlining
6929 Add line for -gnatyg
6930 Add usage information for -gnatw.c/C
6931
69322007-06-06 Robert Dewar <dewar@adacore.com>
6933 Ed Schonberg <schonberg@adacore.com>
6934
6935 * sem_ch5.adb
6936 (Find_Var): Do not consider function call in test for infinite loop
6937 warning if warnings set off for function entity.
6938 (One_Bound): Do not create a temporary for a loop bound if it is a
6939 character literal.
6940 (Analyze_Assignment): Traverse the right hand side of an assignment and
6941 mark all allocators as static coextensions.
6942 (Analyze_Assignment): Exempt assignments involving a dispatching call
6943 to a function with a controlling access result from the check requiring
6944 the target to be class-wide.
6945
69462007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
6947 Ed Schonberg <schonberg@adacore.com>
6948 Robert Dewar <dewar@adacore.com>
6949 Javier Miranda <miranda@adacore.com>
6950
6951 * sem_res.ads, sem_res.adb (Process_Allocator): Do not propagate the
6952 chain of coextensions when an allocator serves as the root of such a
6953 chain.
6954 (Propagate_Coextensions): Remove the test for the root being an
6955 allocator.
6956 (Resolve_Allocator): Add condition to ensure that all future decoration
6957 occurs on an allocator node. Add processing and cleanup for static
6958 coextensions.
6959 (Valid_Conversion): If the operand type is the limited view of a
6960 class-wide type, use the non-limited view is available to determine
6961 legality of operation.
6962 (Ambiguous_Character): move to spec, for use elsewhere.
6963 (Ambiguous_Character): Handle Wide_Wide_Character in Ada 2005 mode
6964 (Resolve_Range): Diagnose properly an ambiguous range whose bounds are
6965 character literals.
6966 (Resolve_Arithmetic_Op): Call Activate_Division_Check instead of setting
6967 Do_Division_Check flag explicitly.
6968 (Resolve_Actuals): If the actual is of a synchronized type, and the
6969 formal is of the corresponding record type, this is a call to a
6970 primitive operation of the type, that is declared outside of the type;
6971 the actual must be unchecked-converted to the type of the actual
6972 (Resolve_Call): Kill all current values for any subprogram call if
6973 flag Suppress_Value_Tracking_On_Call is set.
6974 (Resolve_Type_Conversion): Generate error message the the operand
6975 or target of interface conversions come from a limited view.
6976 (Check_Infinite_Recursion): Ignore generated calls
6977 (Check_Allocator_Discrim_Accessibility): New procedure for checking
6978 that an expression that constrains an access discriminant in an
6979 allocator does not denote an object with a deeper level than the
6980 allocator's access type.
6981 (Resolve_Allocator): In the case of an allocator initialized by an
6982 aggregate of a discriminated type, check that associations for any
6983 access discriminants satisfy accessibility requirements by calling
6984 Check_Allocator_Discrim_Accessibility.
6985 (Resolve_Equality_Op): Handle comparisons of anonymous access to
6986 subprogram types in the same fashion as other anonymous access types.
6987 (Resolve_Concatenation_Arg): Remove initial character '\' in an error
6988 message that is not a continuation message.
6989 (Resolve_Type_Conversion): Add missing support for conversion to
6990 interface type.
6991 (Resolve_Actuals): Introduce a transient scope around the call if an
6992 actual is a call to a function returning a limited type, because the
6993 resulting value must be finalized after the call.
6994 (Resolve_Actuals): If the call was given in prefix notations, check
6995 whether an implicit 'Access reference or implicit dereference must be
6996 added to make the actual conform to the controlling formal.
6997
69982007-06-06 Robert Dewar <dewar@adacore.com>
6999 Javier Miranda <miranda@adacore.com>
7000
7001 * sem_ch7.adb (Check_Anonymous_Access_Types): Fix error for null body
7002 (Derive_Inherited_Private_Subprogram): Code cleanup. In case of explicit
7003 overriding of an inherited private subprogram now there is no need to
7004 inherit its dispatching slot and reduce the size of the dispatch table.
7005 Set_All_DT_Position now ensures that the same slot is now assigned to
7006 both entities. This is required to statically build the dispatch table.
7007 (Declare_Inherited_Private_Subprograms): Rewriten to avoid the need
7008 of calling Set_All_DT_Position to re-evaluate the position of the
7009 entries in the dispatch table. Such reevaluation is not desired if
7010 the tagged type is already frozen.
7011
70122007-06-06 Hristian Kirtchev <kirtchev@adacore.com>
7013 Gary Dismukes <dismukes@adacore.com>
7014 Robert Dewar <dewar@adacore.com>
7015 Javier Miranda <miranda@adacore.com>
7016
7017 * sem_util.ads, sem_util.adb (May_Be_Lvalue): A prefix of an attribute
7018 reference acts as an lvalue when the attribute name modifies the prefix
7019 (Is_Coextension_Root): New routine.
7020 (Mark_Static_Coextensions): New routine.
7021 (Type_Access_Level): Revise code for checking the level of the
7022 anonymous access type of a return object.
7023 (Safe_To_Capture_Value): Not safe to capture if Address_Taken
7024 (Matches_Prefixed_View_Profile): Remove the no longer necessary
7025 retrieval of the corresponding controlling record type.
7026 (Find_Overridden_Synchronized_Primitive): Code cleanup. Add handling of
7027 concurrent types declared within a generic as well as class wide types.
7028 Emit a mode incompatibility error whenever a protected entry or routine
7029 override an interface routine whose first parameter is not of mode
7030 "out", "in out" or access to variable.
7031 (Overrides_Synchronized_Primitive): Rename to
7032 Find_Overridden_Synchronized_Primitive.
7033 (Collect_Interface_Components): New subprogram that collects all the
7034 components of a tagged record containing tags of secondary dispatch
7035 tables.
7036 (Add_Global_Declaration): New procedure
7037 (Abstract_Interface_List): Handle properly the case of a subtype of a
7038 private extension.
7039 (Type_Access_Level): In the case of a type whose parent scope is a
7040 return statement, call Type_Access_Level recursively on the enclosing
7041 function's result type to determine the level of the return object's
7042 type.
7043 (Build_Elaboration_Entity): Build name of elaboration entity from the
7044 scope chain of the entity, rather than the unit name of the file name.
7045 (Check_Nested_Access): New procedure.
7046 (Has_Up_Level_Access, Set_Has_Up_Level_Access): New procedures.
7047 (Find_Direct_Name, Note_Possible_Modification): Use Check_Nested_Access.
7048 (Get_Renamed_Entity): Utility routine for performing common operation
7049 of chasing the Renamed_Entity field of an entity.
7050
70512007-06-06 Robert Dewar <dewar@adacore.com>
7052
7053 * sem_elab.adb (Check_A_Call): Specialize elaboration warnings on
7054 elaboration model
7055 (Check_A_Call): Add check for entry call which was causing blowup
7056
70572007-06-06 Olivier Hainque <hainque@adacore.com>
7058
7059 * raise-gcc.c (__gnat_eh_personality): Tweak the signature and add
7060 special code on ia64-vms to handle major incompatibilities between the
7061 GCC unwinding ABI and the VMS Condition Handling Facility, both calling
7062 this routine with a very different set of arguments and expectations on
7063 the return value.
7064
70652007-06-06 Thomas Quinot <quinot@adacore.com>
7066
7067 * socket.c (__gnat_close_signalling_fd): New function.
7068 (__gnat_safe_gethostbyaddr, __gnat_safe_gethostbyname,
7069 __gnat_safe_getservbyname, __gnat_safe_getservbyport):
7070 New supporting functions for task safe Netdb operations.
7071
70722007-06-06 Thomas Quinot <quinot@adacore.com>
7073 Olivier Hainque <hainque@adacore.com>
7074
7075 * a-except-2005.ads, a-except-2005.adb
7076 (Raise_From_Controlled_Operation): New procedure in
7077 (private part of) Ada.Exceptions (standard runtime version). Used to
7078 provide informational exception message when Program_Error is raised as
7079 a result of an Adjust or Finalize operation propagating an exception.
7080 (Rmsg_28): Fix description for E.4(18) check.
7081 (Raise_Current_Excep): Call Debug_Raise_Exception just before
7082 propagation starts, to let debuggers know about the event in a reliable
7083 fashion.
7084 Take the address of E and dereference to make sure it is homed on stack
7085 and prevent the stores from being deleted, necessary for proper
7086 debugger behavior on "break exception" hits.
7087 (Local_Raise): Moved to System.Exceptions
7088
7089 * s-finimp.adb (Raise_From_Finalize): Code to construct an appropriate
7090 exception message from the current occurrence and raise Program_Error
7091 has been moved to Ada.Exceptions.Raise_From_Controlled_Operation.
7092
70932007-06-06 Jose Ruiz <ruiz@adacore.com>
7094 Arnaud Charlet <charlet@adacore.com>
7095
7096 * s-taprob.adb (Unlock): Change the ceiling priority of the underlying
7097 lock, if needed.
7098
7099 * s-taprop.ads (Set_Ceiling): Add this procedure to change the ceiling
7100 priority associated to a lock.
7101
7102 * s-tpoben.adb ([Vulnerable_]Complete_Task, Lock_Entries): Relax
7103 assertion to take into account case of no abort restriction.
7104 (Initialize_Protection_Entries): Add initialization for the field
7105 New_Ceiling associated to the protected object.
7106 (Unlock_Entries): Change the ceiling priority of the underlying lock, if
7107 needed.
7108
7109 * s-solita.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
7110 since this function needs to be set consistently with Update_Exception.
7111
7112 * s-tarest.adb (Get_Current_Excep): Moved back to s-tasini/s-tarest,
7113 since this function needs to be set consistently with Update_Exception.
7114
7115 * s-taskin.ads: Update comments on
7116 Interrupt_Server_Blocked_On_Event_Flag.
7117 (Unbind_Handler): Fix handling of server_task wakeup
7118 (Server_Task): Set self's state so that Unbind_Handler can take
7119 appropriate actions.
7120 (Common_ATCB): Now use a constant from System.Parameters to determine
7121 the max size of the Task_Image field.
7122
7123 * s-tassta.adb (Task_Wrapper): Now pass the overflow guard to the
7124 Initialize_Analyzer function.
7125 ([Vulnerable_]Complete_Task, Lock_Entries): Relax assertion to
7126 take into account case of no abort restriction.
7127 ([Vulnerable_]Complete_Master): Modify assertion.
7128
7129 * s-tataat.adb (Finalize): Use the nestable versions of
7130 Defer/Undefer_Abort.
7131
7132 * s-tpobop.adb (Protected_Entry_Call): Relax assertion.
7133
7134 * s-tpobop.ads: Update comments.
7135
7136 * s-tposen.adb (Protected_Single_Entry_Call): Call Lock_Entry instead
7137 of locking the object manually, to avoid inconsistencies between
7138 Lock/Unlock_Entry assertions.
7139
7140 * s-interr.ads, s-interr.adb (Server_Task): Fix race condition when
7141 terminating
7142 application and System.Parameters.No_Abort is True.
7143 Update comments on Interrupt_Server_Blocked_On_Event_Flag.
7144 (Unbind_Handler): Fix handling of server_task wakeup
7145 (Server_Task): Set self's state so that Unbind_Handler can take
7146 appropriate actions.
7147
71482007-06-06 Thomas Quinot <quinot@adacore.com>
7149
7150 * s-finroo.ads, s-finroo.adb (Read, Write): Use null procedure
7151 declarations instead of an explicit null body, for conciseness.
7152
71532007-06-06 Robert Dewar <dewar@adacore.com>
7154
7155 * sem_eval.adb (Eval_Relational_Op): nothing to do if an operand is an
7156 illegal aggregate and the type is still Any_Composite.
7157 (Subtypes_Statically_Match): Fix problem of empty discriminant list
7158
71592007-06-06 Ed Schonberg <schonberg@adacore.com>
7160
7161 * sem_smem.adb (Check_Shared_Var): Check explicitly for as task object,
7162 to prevent subsequent expansion.
7163
71642007-06-06 Robert Dewar <dewar@adacore.com>
7165
7166 * sinput-l.ads, sinput-l.adb: implement a new pragma No_Body
7167
71682007-06-06 Ed Schonberg <schonberg@adacore.com>
7169 Robert Dewar <dewar@adacore.com>
7170
7171 * sprint.ads, sprint.adb (Sprint_Node_Actual): Output aggregate for
7172 exceptions.
7173 (Write_Itype): Handle case of string literal subtype, which
7174 comes up in this context.
7175 (Update_Itype): when debugging expanded code, update sloc of itypes
7176 associated with defining_identifiers and ranges, for gdb use.
7177 (Sprint_Node_Actual): Add static keyword to object or exception
7178 declaration output if Is_Statically_Allocated is True.
7179 (Sprint_End_Label): Set entity of end marker for a subprogram, package,
7180 or task body, so that the tree carries the proper Sloc information for
7181 debugging use.
7182 (Write_Indent): In Dump_Source_Text mode, ignore implicit label nodes
7183
71842007-06-06 Arnaud Charlet <charlet@adacore.com>
7185
7186 * s-secsta.adb (Chunk): Ensure this object has a static size known at
7187 compile time, to avoid dynamic memory allocation
7188 (Elaboration code): Only use dynamic memory allocation when needed.
7189
71902007-06-06 Quentin Ochem <ochem@adacore.com>
7191
7192 * s-stausa.ads, s-stausa.adb (Initialize_Analyzer): Added parameter
7193 "Overflow_Guard".
7194 (Stack_Analyzer): Added field "Overflow_Guard"
7195 (Task_Result): Added field "Overflow_Guard".
7196 (Index_Str): New constant.
7197 (Task_Name_Str): New constant.
7198 (Actual_Size_Str): New constant.
7199 (Pattern_Array_Element_Size): New constant.
7200 (Get_Usage_Range): New subprogram.
7201 (Output_Result): Added parameter Max_Size_Len and Max_Actual_Use_Len.
7202 Now align the output.
7203 Added comments.
7204 (Initialize): Added value for Overflow_Guard.
7205 (Fill_Stack): Use constant Pattern_Array_Elem_Size when relevant.
7206 Update the value of the overflow guard according to the actual
7207 beginning of the pattern array.
7208 (Initialize_Analyzer): Added parameter Overflow_Guard.
7209 Take this parameter into accound when computing the max size.
7210 (Compute_Result): Use constant Pattern_Array_Elem_Size when relevant.
7211 (Report_Result): Removed extra useless procedure.
7212 Updated call to Output_Result.
7213 Moved full computation of the Task_Result here.
7214
72152007-06-06 Thomas Quinot <quinot@adacore.com>
7216
7217 * g-soccon-darwin.ads, gen-soccon.c: Add new constant
7218 Thread_Blocking_IO, always True by default, set False on a per-runtime
7219 basis.
7220 Add Windows-specific constants
7221 Add new constant Need_Netdb_Buffer.
7222 Add new macros to indicate whether getXXXbyYYY is thread safe and, if
7223 not, whether to use getXXXbyYYY_r.
7224
7225 * gsocket.h: Add new constant Need_Netdb_Buffer.
7226 Add new macros to indicate whether getXXXbyYYY is thread safe and, if
7227 not, whether to use getXXXbyYYY_r.
7228
72292007-06-06 Eric Botcazou <ebotcazou@adacore.com>
7230
7231 * s-stoele.ads, s-stoele.adb: Move inline_always subprograms earlier
7232 than their first call.
7233 Add type Dummy_Communication_Block used in the generation of the pre-
7234 defined dispatching primitive _disp_asynchronous_select.
7235 (Storage_Element): Put Pragma Universal_Aliasing on it.
7236
72372007-06-06 Vincent Celier <celier@adacore.com>
7238
7239 * a-dirval-vms.adb, a-dirval.ads, a-dirval.adb (Windows): New Boolean
7240 function.
7241
7242 * a-dirval-mingw.adb (Is_Valid_Path_Name): Forbid a path with a drive
7243 letter if it is not followed by a '/' or a '\'.
7244 (Windows): New Boolean function
7245
7246 * a-direct.ads, a-direct.adb: Remove unnecessary and misplaced pragma
7247 Ada 2005.
7248 (Containing_Directory): On Windows, keep at least one '/' or '\' after a
7249 drive letter.
7250 (Containing_Directory): Raise Use_Error when the directory is a root
7251 directory.
7252 (Extension): When returning the result, use a conversion to Result_Type,
7253 not a qualification.
7254
72552007-06-06 Robert Dewar <dewar@adacore.com>
7256
7257 * stylesw.ads, stylesw.adb (Set_GNAT_Style_Check): New procedure
7258 (Set_Style_Check_Options): Recognize new -gnatyg style switch
7259
7260 * switch-c.adb (Scan_Front_End_Switches, case -gnatg): Set
7261 Warn_On_Non_Local_Exception to False, to turn off warnings for
7262 No_Exception_Propagation in ZFP runtime.
7263 (Scan_Front_End_Switches): Fix handling of --RTS switch for non GCC
7264 back-ends.
7265 (Scan_Front_End_Switches): For 'g', call Set_GNAT_Style_Checks
7266
72672007-06-06 Vincent Celier <celier@adacore.com>
7268
7269 * switch-b.adb (Scan_Binder_Switches): Add processing for new
7270 switches -R and -Z
7271
7272 * switch-m.adb (Normalize_Compiler_Switches): Do not record switch -E
7273 (Scan_Make_Switches): Recognize new switch -aP
7274
72752007-06-06 Matthew Gingell <gingell@adacore.com>
7276 Jose Ruiz <ruiz@adacore.com>
7277
7278 * s-stchop-vxworks.adb (Set_Stack_Info): Instead of trying to map the
7279 VxWorks task descriptor in the Ada run time, call a C subprogram
7280 (__gnat_get_stack_info) that extracts the required information.
7281
7282 * sysdep.c: Back out temporary lynxos workaround.
7283 (__gnat_get_stack_info): Add this procedure that passes to the Ada run
7284 time the stack information associated to the currently executing task.
7285 Only VxWorks systems require this function.
7286
72872007-06-06 Eric Botcazou <ebotcazou@adacore.com>
7288
7289 * tracebak.c (FRAME_OFFSET): Add parameter FP. On SPARC/Solaris, do not
7290 add the stack bias if the offset is computed from a frame address.
7291 (__gnat_backtrace): Adjust for above change.
7292
72932007-06-06 Thomas Quinot <quinot@adacore.com>
7294
7295 * types.h, types.ads: Rename PE_Illegal_CW_Actual_E_4_18 to
7296 PE_Non_Transportable_Actual.
7297 (By_Descriptor_Last): New constant.
7298 (By_Copy_Return): Likewise.
7299
73002007-06-06 Vincent Celier <celier@adacore.com>
7301
7302 * vms_conv.adb (Process_Argument): Keep arguments starting with '+' as
7303 is.
7304
7305 * vms_data.ads: Add entries for -gnatw.x and -gnatw.X
7306 /STYLE_CHECKS=GNAT: Change meaning to -gnatyg
7307 /GNAT_INTERNAL: New compiler qualifier corresponding to -gnatg
7308 Add missing comment for /OPTIMIZE=SPACE
7309 Add entry for OPTIMIZE=SPACE
7310 Add new qualifier /ALL_PROJECTS (= -U) for GNAT LIST
7311 Add documentation for new qualifiers corresponding to -gnatw.c/.C
7312
73132007-06-06 Vincent Celier <celier@adacore.com>
7314 Robert Dewar <dewar@adacore.com>
7315
7316 * xgnatugn.adb: Allow dots to be used in ug_words (-gnatw.c and
7317 -gnatw.C)
7318
7319 * gnat_ugn.texi: Fix ordering of -g switch for gnatmake
7320 Document gnatbind switch -a
7321 (case Constructions): Document that variables declarations are allowed
7322 for previously declared variables.
7323 Fix external lib project example
7324 -gnatg: Indicate new VMS qualifier /GNAT_INTERNAL
7325 Indicate that "#if not X or Y then" is not allowed in input files to
7326 gnatprep.
7327 Document gnatw.x and gnatw.X warning flags
7328 Mention -Winline switch to activate warnings when back-end inlining is
7329 ineffective.
7330 Add gnatcheck rule descriptions
7331 Describe how to use the GNAT driver to call a tool on a closure.
7332 Describe how to run project-wide checks or metrics.
7333 Document gnatbind's -R option
7334 Updated to account for Ada 2005 support
7335
7336 * gnat_rm.texi (Case Construction): Allow variable declarations for
7337 previously declared variables.
7338 (Representation Clauses and Pragmas): Lift restriction on alignment
7339 clauses for record types.
7340 (Ada.Characters.*): Fix typo in reference to A.3.3(27).
7341 Document No_Exception_Propagation restriction
7342 Document No_Body pragma
7343 Updated to account for Ada 2005 support; corrected some typos
7344 (Implementation Defined Pragmas): Document pragma Universal_Aliasing.
7345
7346 * gnat-style.texi: Make it clear that we never use mode IN for
7347 procedures or functions
7348
7349 * ug_words: Add entries for -gnatw.x and -gnatw.X
7350 Add entries for -gnatw.c/.C
7351
73522007-06-06 Pascal Obry <obry@adacore.com>
7353 Vincent Celier <celier@adacore.com>
7354
7355 * makegpr.adb (Add_Archive_Path): Use untouched object and library
7356 dirs and library name.
7357 (Build_Global_Archive): Idem. Minor code clean-up. Removes duplicate
7358 comments.
7359 (Build_Library): Idem.
7360 (Compile_Individual_Sources): Idem.
7361 (Compile_Link_With_Gnatmake): Idem.
7362 (Compile_Sources): Idem.
7363 (Get_Imported_Directories): Idem.
7364 (Link_Executables): Idem. Same change for the executable dir.
7365 (Check_Compilation_Needed): C_Source_Path new variable containing
7366 the canonical form of Source_Path to check against the source names
7367 in the dependency file.
7368 (Build_Global_Archive, Compile_Individual_Sources, Compile_Sources): In
7369 verbose mode, display the name of the object directory we're changing
7370 to.
7371 (Saved_Switches): New name of table X_Switches
7372 (Scan_Arg): Recognize new switch -aP and save in table Saved_Switches
7373 (Usage): New line for switch -aP
7374 (Get_Imported_Directories.Add): Make sure that Add_Arg is True before
7375 testing if a directory should be added to the search path.
7376
73772007-06-06 Javier Miranda <miranda@adacore.com>
7378
7379 * a-cidlli.ads, a-cdlili.ads, a-cohama.ads, a-coinve.ads,
7380 a-convec.ads (Empty_Vector, Empty_Map, Empty_List): Move this object
7381 declaration after freezing point of all its associated tagged types;
7382 otherwise such types are frozen too early.
7383
73842007-06-06 Robert Dewar <dewar@adacore.com>
7385
7386 * a-reatim.adb: Documentation addition
7387
7388 * g-cgideb.adb: Minor code reorganization
7389
7390 * tree_io.adb, treepr.adb, cstand.adb, krunch.adb, par.adb,
7391 mdll-utl.adb, par-ch5.adb, par-tchk.adb, s-exctab.ads, s-memory.ads,
7392 s-osprim.ads, s-restri.ads, s-soflin.ads: Minor reformatting.
7393
7394 * debug.ads, debug.adb (Get_Debug_Flag_K): Remove unused obsolete
7395 function. Change name New_Scope to Push_Scope
7396 (Get_Debug_Flag_K): Remove unused obsolete function.
7397
7398 * exp_ch8.adb, inline.adb, sem_ch8.ads: Change name New_Scope to
7399 Push_Scope.
7400
7401 * makeusg.adb: Update Copyright notice
7402 Add line for switch -aP
7403
7404 * makeusg.adb: Fix wording of some usage messages
7405
7406 * s-assert.adb (Raise_Assert_Failure): Add call to
7407 Debug_Raise_Assert_Failure.
7408
7409 * s-unstyp.ads (type Packed_Bytes2): Change alignment to use 'Min
7410 (2, Standard'Alignment) for compatibility with AAMP (where alignment
7411 is restricted to 1).
7412
7413 * s-wchjis.adb: Remove use of System.Pure_Exceptions
7414
7415 * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): Set the
7416 node location to No_Location when we're not debugging the expanded
7417 code.
7418
dbc30a96
AO
74192007-05-22 Alexandre Oliva <aoliva@redhat.com>
7420
7421 * misc.c (enumerate_modes): Consider log2_b to always be one.
7422
ca5ba2a3
RAE
74232007-05-14 Rafael Avila de Espindola <espindola@google.com>
7424
7425 * misc.c (LANG_HOOKS_UNSIGNED_TYPE): Remove.
7426
d7598e11
PO
74272007-05-02 Pascal Obry <obry@adacore.com>
7428
7429 * gnatchop.adb (Write_Source_Reference_Pragma): Change implementation
7430 to use Stream_IO.File_Type. This is needed to make use of the UTF-8
7431 encoding support of Stream_IO.
7432 (Write_Unit): Idem.
7433
7434 * adaint.h, adaint.c (__gnat_os_filename): New routine. Returns the
7435 filename and corresponding encoding to match the OS requirement.
7436 (__gnat_file_exists): Do not call __gnat_stat() on Windows as this
7437 routine will fail on specific devices like CON: AUX: ...
7438
7439 PR ada/29856: Add missing braces
7440
1be52f61
AP
74412007-04-22 Andrew Pinski <andrew_pinski@playstation.sony.com>
7442
7443 PR ada/31660
7444 * ada-tree.h (lang_tree_node): Fix typo in chain_next.
7445
395a40e0
JH
74462007-04-21 Jan Hubicka <jh@suse.cz>
7447
7448 * misc.c (gnat_expand_body): Don't call target for destructors,
7449 avoid redundant check on syntax errors.
7450
3d95caa4
AP
74512007-04-21 Andrew Pinski <andrew_pinski@playstation.sony.com>
7452
7453 * ada-tree.h (lang_tree_node): Use GENERIC_NEXT
7454 instead of checking GIMPLE_STMT_P in chain_next.
7455
ea30850a
AK
74562007-04-17 Andreas Krebbel <krebbel1@de.ibm.com>
7457
7458 PR ada/31576
7459 * system-linux-alpha.ads: Disable constant condition warning for the
7460 Default_Bit_Order variable.
7461 * system-linux-s390.ads: Likewise.
7462 * system-linux-s390x.ads: Likewise.
7463 * system-linux-sparc.ads: Likewise.
7464
4b437c6b
AC
74652007-04-06 Javier Miranda <miranda@adacore.com>
7466 Matt Heaney <heaney@adacore.com>
7467 Robert Dewar <dewar@adacore.com>
7468
7469 a-coprnu.ads, a-cohata.ads, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
7470 a-cgarso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads, a-chtgke.ads,
7471 a-chtgke.ads, a-coprnu.ads, a-contai.ads, a-chtgke.ads, a-chtgke.adb,
7472 a-stwiha.ads, a-strhas.ads, a-lfztio.ads, a-liztio.ads, a-llfzti.ads,
7473 a-llizti.ads, a-sfztio.ads, a-siztio.ads, a-ssizti.ads, a-stzfix.ads,
7474 a-stzhas.ads, a-szuzha.ads, a-tiunio.ads, a-wwunio.ads, a-ztcoio.ads,
7475 a-ztinio.ads, a-zttest.ads, a-zzunio.ads, a-astaco.ads, a-charac.ads,
7476 a-chlat1.ads, ada.ads, a-dynpri.ads, a-flteio.ads, a-fwteio.ads,
7477 a-inteio.ads, a-intnam.ads, a-ioexce.ads, a-iwteio.ads, a-lfteio.ads,
7478 a-lfwtio.ads, a-liteio.ads, a-liwtio.ads, a-llftio.ads, a-llfwti.ads,
7479 a-llitio.ads, a-lliwti.ads, a-ncelfu.ads, a-ngcefu.ads, a-ngelfu.ads,
7480 a-nlcefu.ads, a-nlcoty.ads, a-nlelfu.ads, a-nllcef.ads, a-nllcty.ads,
7481 a-nllefu.ads, a-nscefu.ads, a-nscoty.ads, a-nselfu.ads, a-nucoty.ads,
7482 a-nuelfu.ads, a-numeri.ads, a-sfteio.ads, a-sfwtio.ads, a-siteio.ads,
7483 a-siwtio.ads, a-ssitio.ads, a-ssiwti.ads, a-storio.ads, a-strfix.ads,
7484 a-string.ads, a-stwifi.ads, a-titest.ads, a-unccon.ads, a-uncdea.ads,
7485 a-wtcoio.ads, a-wtinio.ads, a-wttest.ads, calendar.ads, directio.ads,
7486 i-c.ads, ioexcept.ads, machcode.ads, sequenio.ads, text_io.ads,
7487 unchconv.ads, unchdeal.ads, a-widcha.ads, a-zchara.ads, a-stboha.ads,
7488 a-stfiha.ads, a-coteio.ads, a-envvar.ads, a-lcteio.ads, a-llctio.ads,
7489 a-scteio.ads, a-swbwha.ads, a-swfwha.ads, a-szbzha.ads, a-szfzha.ads,
7490 a-tiboio.ads, a-wwboio.ads, a-zzboio.ads, a-dispat.ads, a-tgdico.ads,
7491 expander.adb, g-socket.ads, par-labl.adb, sinput-c.adb, s-tarest.ads,
7492 s-stchop.ads, g-expect-vms.adb, s-taprop-lynxos.adb,
7493 s-taprop-tru64.adb, s-taprop-irix.adb,
7494 s-taprop-hpux-dce.adb, s-traceb-hpux.adb,
7495 s-taprop-linux.adb, s-taprop-dummy.adb, s-osprim-unix.adb,
7496 s-osprim-solaris.adb, s-taprop-solaris.adb, s-taprop-vms.adb,
7497 s-osprim-mingw.adb, s-taprop-mingw.adb, s-osprim-posix.adb,
7498 s-taprop-posix.adb, a-exexpr-gcc.adb, a-ststio.adb, a-ststio.ads,
7499 a-textio.adb, a-textio.ads, a-tideau.adb, a-tideau.ads, a-witeio.adb,
7500 a-witeio.ads, a-wtdeau.adb, a-wtdeau.ads, g-calend.adb, g-calend.ads,
7501 g-dirope.adb, g-expect.ads, gnatchop.adb, g-spipat.adb, g-spipat.ads,
7502 s-direio.adb, s-direio.ads, s-fatgen.adb, s-fatgen.ads, s-parint.adb,
7503 s-sequio.adb, s-sequio.ads, s-taprop.ads, s-valdec.adb, s-valdec.ads,
7504 s-valint.adb, s-valint.ads, s-vallld.adb, s-vallld.ads, s-vallli.adb,
7505 s-vallli.ads, s-valllu.adb, s-valllu.ads, s-valrea.adb, s-valrea.ads,
7506 s-valuns.adb, s-valuns.ads, s-valuti.adb, s-valuti.ads, xref_lib.adb,
7507 s-stchop.adb, i-vxwork-x86.ads, a-crbtgo.ads, a-crbtgo.adb,
7508 a-coorse.ads, a-coorse.adb, a-cohama.ads, a-cohama.adb, a-ciorse.ads,
7509 a-ciorse.adb, a-cihama.ads, a-cihama.adb, a-chtgop.ads, a-chtgop.ads,
7510 a-coormu.adb, a-ciormu.adb, a-cihase.adb, a-cihase.ads, a-cohase.adb,
7511 a-cohase.ads, a-swuwha.ads, a-ciormu.ads, a-coormu.ads, a-rbtgso.ads,
7512 a-stunha.ads, a-ciorma.adb, a-coorma.adb, a-ztdeau.adb, a-ztdeau.ads,
7513 a-ztexio.adb, a-ztexio.ads: Addition of null-exclusion to anonymous
7514 access types.
7515 Update documentation.
7516 Minor rewording.
7517
75182007-04-06 Robert Dewar <dewar@adacore.com>
7519
7520 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
7521 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
7522 system-vxworks-sparcv9.ads, system-solaris-x86.ads, system-irix-o32.ads,
7523 system-irix-n32.ads, system-hpux.ads, system-vxworks-m68k.ads,
7524 system-linux-x86.ads, system-vxworks-mips.ads, system-interix.ads,
7525 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
7526 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
7527 system-vxworks-alpha.ads, system-vms_64.ads, system-darwin-ppc.ads,
7528 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
7529 system-hpux-ia64.ads, targparm.adb,
7530 targparm.ads (Functions_Return_By_DSP_On_Target): Removed
7531
7532 * system.ads: Move Functions_Return_By_DSP to obsolete section,
7533 kept for bootstrap purposes only.
7534
75352007-04-06 Arnaud Charlet <charlet@adacore.com>
7536
7537 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
7538 s-osinte-freebsd.ads, s-osinte-aix.ads, s-osinte-darwin.ads,
7539 s-taprop-posix.adb (Create_Task): Fix handling of Task_Info.
7540 (PTHREAD_SCOPE_PROCESS, PTHREAD_SCOPE_SYSTEM): New constants.
7541
75422007-04-06 Robert Dewar <dewar@adacore.com>
7543
7544 * a-except.adb, a-except.ads, a-except-2005.ads, a-except-2005.adb
7545 (Local_Raise): New dummy procedure called when a raise is converted
7546 to a local goto. Used for debugger to detect that the exception
7547 is raised.
7548
7549 * debug.adb: Document new d.g flag (expand local raise statements to
7550 gotos even if pragma Restriction (No_Exception_Propagation) is not set)
7551
7552 * exp_sel.adb: Use Make_Implicit_Exception_Handler
7553
7554 * exp_ch11.adb (Expand_Exception_Handlers): Use new flag -gnatw.x to
7555 suppress warnings for unused handlers.
7556 (Warn_If_No_Propagation): Use new flag -gnatw.x to suppress
7557 warnings for raise statements not handled locally.
7558 (Get_RT_Exception_Entity): New function
7559 (Get_Local_Call_Entity): New function
7560 (Find_Local_Handler): New function
7561 (Warn_If_No_Propagation): New procedure
7562 (Expand_At_End_Handler): Call Make_Implicit_Handler
7563 (Expand_Exception_Handlers): Major additions to deal with local handlers
7564 (Expand_N_Raise_Constraint_Error, Expand_N_Raise_Program_Error,
7565 Expand_N_Raise_Storage_Error, (Expand_N_Raise_Statement): Add handling
7566 for local raise
7567
7568 * exp_ch11.ads (Get_RT_Exception_Entity): New function
7569 (Get_Local_Call_Entity): New function
7570
7571 * gnatbind.adb (Restriction_List): Add No_Exception_Propagation to list
7572 of restrictions that the binder will never suggest adding.
7573
7574 * par-ch11.adb (P_Exception_Handler): Set Local_Raise_Statements field
7575 to No_Elist.
7576
7577 * restrict.adb (Check_Restricted_Unit): GNAT.Current_Exception may not
7578 be with'ed in the presence of pragma Restriction
7579 (No_Exception_Propagation).
7580
7581 * sem.adb (Analyze): Add entries for N_Push and N_Pop nodes
7582
7583 * sem_ch11.adb (Analyze_Exception_Handler): If there is a choice
7584 parameter, then the handler is not a suitable target for a local raise,
7585 and this is a violation of restriction No_Exception_Propagation.
7586 (Analyze_Handled_Statements): Analyze choice parameters in exception
7587 handlers before analyzing statement sequence (needed for proper
7588 detection of local raise statements).
7589 (Analyze_Raise_Statement): Reraise statement is a violation of the
7590 No_Exception_Propagation restriction.
7591
7592 * s-rident.ads: Add new restriction No_Exception_Propagation
7593
7594 * tbuild.ads, tbuild.adb (Make_Implicit_Exception_Handler): New
7595 function, like Make_Exception_Handler but sets Local_Raise_Statements
7596 to No_List.
7597 (Add_Unique_Serial_Number): Deal with case where this is called during
7598 processing of configuration pragmas.
7599
76002007-04-06 Thomas Quinot <quinot@adacore.com>
7601 Pat Rogers <rogers@adacore.com>
7602 Pascal Obry <obry@adacore.com>
7603
7604 * g-stsifd-sockets.adb: New file.
7605
7606 * g-socthi.ads, g-socket.adb, g-socthi-vxworks.adb,
7607 g-socthi-vxworks.ads, g-socthi-mingw.ads, g-socthi-vms.ads,
7608 g-socthi-vms.adb: Move signalling
7609 fd management to a nested package, so that they can conveniently be
7610 moved to a subunit that is shared across Windows, VMS, and VxWorks
7611 (Ada implementation) or completed with imported bodies from socket.c
7612 (UNIX case).
7613 (Read_Signalling_Fd, Write_Signalling_Fd, Create_Signalling_Fds): New
7614 subprograms.
7615 (Check_Selector): Use Read_Signalling_Fd to read and discard data from
7616 the signalling file descriptor.
7617 (Abort_Selector): Use Write_Signalling_Fd to write dummy data to the
7618 signalling file descriptor.
7619 (Create_Selector): Use new C-imported subprogram Create_Signalling_Fds
7620 instead of creating a pair of sockets for signalling here.
7621
7622 * g-socthi.adb: Ditto.
7623 Set the runtime process to ignore SIGPIPEs on platforms that support
7624 neither SO_NOSIGPIPE nor MSG_NOSIGNAL functionality.
7625
7626 * g-socthi-mingw.adb: Ditto.
7627 (WS_Version): Use Windows 2.2.
7628 Use Winsock 2.2 (instead of 1.1) for the GNAT.Socket API.
7629
7630 * g-soliop-mingw.ads: Link with ws2_32 for Windows 2.x support.
7631 Use Winsock 2.2 (instead of 1.1) for the GNAT.Socket API.
7632
7633 * Makefile.in: New libgnat pair g-stsifd.adb<g-stsifd-sockets.adb.
7634 added GNAT byte swapping facility
7635 Update FreeBSD THREADSLIB from -lc_r to -lpthread, for FreeBSD 6.
7636
7637 * g-bytswa.adb, g-bytswa-x86.adb, g-bytswa.ads: New files.
7638
7639 * socket.c (__gnat_read_signalling_fd, __gnat_write_controlling_fd):
7640 New subprograms.
7641 (__gnat_create_signalling_fds): New subprogram.
7642 Set the runtime process to ignore SIGPIPEs on platforms that support
7643 neither SO_NOSIGPIPE nor MSG_NOSIGNAL functionality.
7644
76452007-04-06 Hristian Kirtchev <kirtchev@adacore.com>
7646 Vincent Celier <celier@adacore.com>
7647
7648 * a-calend-vms.ads, a-calend.ads, a-calend.adb, a-calend-vms.adb:
7649 New version of Ada.Calendar which supports the new upper bound of Ada
7650 time (2399-12-31 86_399.999999999).
7651 The following modifications have been made to the package:
7652 - New representation of time as count of nanoseconds since the start of
7653 Ada time (1901-1-1 0.0).
7654 - Target independent Split and Time_Of routines which service both
7655 Ada 95 and Ada 2005 code.
7656 - Target independent interface to the Ada 2005 children of Calendar.
7657 - Integrated leap seconds into Ada 95 and Ada 2005 mode.
7658 - Handling of non-leap centenial years.
7659 - Updated clock function.
7660 - Updated arithmetic and comparison operators.
7661
7662 * a-caldel.adb (To_Duration): Add call to target independent routine in
7663 Ada.Calendar to handle the conversion of time to duration.
7664
7665 * sysdep.c (__gnat_localtime_tzoff): Test timezone before setting off
7666 (UTC Offset).
7667 If timezone is obviously incorrect (outside of -14 hours .. 14 hours),
7668 set off to 0.
7669 (__gnat_localtime_tzoff for Lynx and VxWorks): Even though these
7670 targets do not have a natural time zone, GMT is used as a default.
7671 (__gnat_get_task_options): New.
7672
7673 * a-direct.adb (Modification_Time): Add with and use clauses for
7674 Ada.Calendar and Ada.
7675 Calendar.Formatting. Remove with clause for Ada.Unchecked_Conversion
7676 since it is no longer needed.
7677 (Duration_To_Time): Removed.
7678 (OS_Time_To_Long_Integer): Removed.
7679 (Modification_Time): Rewritten to use Ada.Calendar and Ada.Calendar.
7680 Formatting Time_Of routines which automatically handle time zones,
7681 buffer periods and leap seconds.
7682
7683 * a-calari.ads, a-calari.adb ("+", "-", Difference): Add calls to
7684 target independent routines in Ada.Calendar.
7685
7686 * a-calfor.ads, a-calfor.adb:
7687 Code cleanup and addition of validity checks in various routines.
7688 (Day_Of_Week, Split, Time_Of): Add call to target independent routine in
7689 Ada.Calendar.
7690
7691 * a-catizo.ads, a-catizo.adb (UTC_Time_Offset): Add call to target
7692 independent routine in Ada.Calendar.
7693
76942007-04-06 Olivier Hainque <hainque@adacore.com>
7695
7696 * adaint.c:
7697 (convert_addresses): Adjust prototype and dummy definition to expect an
7698 extra file_name argument.
7699
7700 * gmem.c (__gnat_convert_addresses): Wrapper to convert_addresses,
7701 filling the now expected file_name argument with the appropriate
7702 argv[0] expansion.
7703 (__gnat_gmem_a2l_initialize, __gnat_gmem_read_next_frame): Use it.
7704 (tracebk): Array of void * instead of char *, corresponding to what
7705 convert_addresses expects.
7706 (exename): New static global, to hold the executable file name to be
7707 used in all convert_addresses invocations.
7708 (gmem_read_backtrace, __gnat_gmem_symbolic): Account for tracebk type
7709 change.
7710 (__gnat_gmem_a2l_initialize): Resolve exename.
7711 (__gnat_convert_addresses): Use exename as the convert_addresses
7712 file_name argument.
7713
7714 * g-trasym.adb (Symbolic_Traceback): Adjust signature of imported
7715 "convert_addresses", now expecting a filename argument. Import the
7716 necessary entities to compute the filename to use and pass it to
7717 convert_addresses.
7718
77192007-04-06 Matt Gingell <gingell@adacore.com>
7720
7721 * system-aix.ads: Back out previous change.
7722 (Functions_Return_By_DSP): Removed
7723
77242007-04-06 Pascal Obry <obry@adacore.com>
7725
7726 * s-osprim-mingw.adb (Timed_Delay): Use the right clock (standard one
7727 or the monotonic used by Ada.Real_Time) to compute the sleep duration
7728 on Windows.
7729
77302007-04-06 Jose Ruiz <ruiz@adacore.com>
7731
7732 * s-osinte-vxworks.ads, s-osinte-vxworks.adb (VX_FP_TASK): Remove this
7733 function. Its value changes in different VxWorks versions, and it is
7734 now handled by the function __gnat_get_task_options.
7735
7736 * s-taprop-vxworks.adb (Create_Task): Call the function
7737 __gnat_get_task_options to get the required options for creating a task.
7738
77392007-04-06 Pascal Obry <obry@adacore.com>
7740 Thomas Quinot <quinot@adacore.com>
7741
7742 * adaint.c: Replace all occurences of S2WS to S2WSU (Unicode) when
7743 dealing with filename.
7744 (__gnat_fopen): Call the proper macro (8bits or UTF8) to convert the
7745 filename from a standard string to a wide-string depending on the
7746 encoding value.
7747 (__gnat_freopen): Idem.
7748 (__gnat_current_time): New function (wrapper for time(3) standard C
7749 function).
7750
7751 * g-os_lib.ads (Current_Time): New function. Returns the current
7752 system time as an OS_Time value.
7753
7754 * s-osprim.ads (Clock): Add more precise definition of UNIX epoch.
7755 (Monotonic_Clock): Same.
7756
77572007-04-06 Quentin Ochem <ochem@adacore.com>
7758
7759 * ali.ads, ali.adb (Get_Nat): Raise an exception if the file cursor is
7760 not on a natural.
7761 (Scan_ALI): Cancel the xref line if there has been a reading ALI error.
7762
77632007-04-06 Jose Ruiz <ruiz@adacore.com>
7764
7765 * a-retide.adb: Add elaboration code to ensure that the tasking run
7766 time is initialized when using delay operations even when no task is
7767 created.
7768
77692007-04-06 Javier Miranda <miranda@adacore.com>
7770
7771 * a-tags.ads, a-tags.adb (Object_Specific_Data): Remove
7772 component Num_Prim_Ops.
7773 (Set_Num_Prim_Ops): Removed.
7774 Remove all the assertions because all the routines of this
7775 package are inline always.
7776 (Get_Offset_Index): Add support to primary dispatch tables.
7777 Move the documentation about the dispatch table to a-tags.ads
7778 (Set_External_Tag): Removed
7779 (Inherit_TSD): Removed.
7780 (Interface_Data_Element, Interfaces_Array, Interface_Data): Declarations
7781 moved to a-tags.ads
7782 (Displace, IW_Membership, Inherit_TSD, Interface_Ancestor_Tags,
7783 Register_Interface_Tag, Set_Offset_To_Top): Update all the occurrences
7784 of the TSD field "Table" because this field has been renamed to
7785 "Ifaces_Table".
7786 (Inherit_CPP_DT): Removed.
7787 (K_Typeinfo, K_Offset_To_Top, K_Tagged_Kind, K_Signature,
7788 Cstring, Tag_Table, Type_Specific_Data, Dispatch_Table): These
7789 declarations have been moved to a-tags.ads
7790 (Check_Size): Removed.
7791 (Expanded_Name): Updated to get access to the new field of TSD
7792 containing the address of the expanded name.
7793 (Get_Access_Level/Set_Access_Level): Removed.
7794 (Get_Predefined_Prim_Op_Address): Removed.
7795 (Set_Predefined_Prim_Op_Address): Removed.
7796 (Get_Prim_Op_Address/Set_Prim_Op_Address): Removed.
7797 (Get_Remotely_Callable/Set_Remotely_Callable): Removed.
7798 (Set_Expanded_Name): Removed.
7799 (Inherit_DT): Removed.
7800 (Inherit_CPP_DT): Removed.
7801 (Set_RC_Offset): Removed.
7802 (Set_TSD): Removed.
7803 (Base_Address): New function that displaces "this" to point to the base
7804 of the object (that is, to point to the primary tag of the object).
7805
78062007-04-06 Ed Schonberg <schonberg@adacore.com>
7807 Javier Miranda <miranda@adacore.com>
7808
7809 * exp_ch3.ads, exp_ch3.adb (Analyze_N_Full_Type_Declaration): For an
7810 anonymous access component, do not create a master_id if type already
7811 has one, as may happen if the type is a subcomponent of a packed array
7812 type.
7813 (Build_Init_Procedure, Component_Needs_Simple_Initialization,
7814 Initialize_Tag): Remove code associated with the old CPP pragmas.
7815 CPP_Virtual and CPP_Vtable are no longer supported.
7816 (Build_Offset_To_Top_Internal): Add support for concurrent record types
7817 (Build_Offset_To_Top_Functions): Add support for concurrent record types
7818 (Freeze_Record_Type): Remove call to
7819 Init_Predefined_Interface_Primitives.
7820 (Init_Secondary_Tags.Initialize_Tag): New subprogram containing all the
7821 code required to initialize the tags of the secondary dispatch tables.
7822 This leaves the algoritm more clear.
7823 (Init_Secondary_Tags): Add support for concurrent record types
7824 (Make_Predefined_Primitive_Specs): Code cleanup.
7825 (Predefined_Primitive_Bodies): Code cleanup.
7826 (Build_Master_Renaming): New local subprogram.
7827 (Expand_N_Full_Type_Declaration): Build the master_id associated with
7828 anonymous access to task type components.
7829 (Expand_N_Subtype_Indication): The bounds of a range constraint in a
7830 subtype indication are resolved during analysis, and must not be done
7831 here.
7832 (Stream_Operation_OK): Check Restriction_Active before RTE_Available.
7833
78342007-04-06 Geert Bosch <bosch@adacore.com>
7835 Ed Schonberg <schonberg@adacore.com>
7836 Javier Miranda <miranda@adacore.com>
7837 Bob Duff <duff@adacore.com>
7838
7839 * exp_ch4.adb (Expand_N_Type_Conversion): Remove special processing
7840 for conversion of a Float_Type'Truncation to integer.
7841
7842 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): New function to
7843 check if a node is an attribute that can be handled directly by the
7844 back end.
7845 (Expand_N_Attribute_Reference): Suppress expansion of floating-point
7846 attributes that can be handled directly by the back end.
7847 (Expand_N_Attribute_Reference, case 'Access and 'Unchecked_Access):
7848 use new predicate Is_Access_Protected_Subprogram_Type.
7849 (Expand_N_Attribute_Reference, case 'Write): The reference is legal for
7850 and Unchecked_Union if it is generated as part of the default Output
7851 procedure for a type with default discriminants.
7852 (Expand_N_Attribute_Reference): Avoid the expansion of dispatching calls
7853 if we are compiling under restriction No_Dispatching_Calls.
7854 (Constrained): Use Underlying_Type, in case the type is private without
7855 discriminants, but the full type has discriminants.
7856 (Expand_N_Attribute_Reference): Replace call to Get_Access_Level by
7857 call to Build_Get_Access_Level.
7858 (Expand_N_Attribute_Reference): The use of 'Address with class-wide
7859 interface objects requires a call to the run-time subprogram that
7860 returns the base address of the object.
7861 (Valid_Conversion): Improve error message on illegal attempt to store
7862 an anonymous access to subprogram value into a record component.
7863
7864 * sem_res.adb (Resolve_Equality_Op): Detect ambiguity for "X'Access =
7865 null".
7866 (Simplify_Type_Conversion): New procedure that performs simplification
7867 of Int_Type (Float_Type'Truncation (X)).
7868 (Resolve_Type_Conversion): Call above procedure after resolving operand
7869 and before performing checks. This replaces the existing ineffective
7870 code in Exp_Ch4.
7871 (Set_String_Literal_Subtype): When creating the internal static lower
7872 bound subtype for a string literal, use a newly created copy of the
7873 subtree representing the lower bound.
7874 (Resolve_Call): Exclude build-in-place function calls from transient
7875 scope treatment. Update comments to describe this exception.
7876 (Resolve_Equality_Op): In case of dispatching call check violation of
7877 restriction No_Dispatching_Calls.
7878 (Resolve_Call): If the call returns an array, the context imposes the
7879 component type of the array, and the function has one non-defaulted
7880 parameter, rewrite the call as the indexing of a call with a single
7881 parameter, to handle an Ada 2005 syntactic ambiguity for calls written
7882 in prefix form.
7883 (Resolve_Actuals): If an actual is an allocator for an access parameter,
7884 the master of the created object is the innermost enclosing statement.
7885 (Remove_Conversions): For a binary operator, check if type of second
7886 formal is numeric, to check if an abstract interpretation is present
7887 in the case of exponentiation as well.
7888
78892007-04-06 Ed Schonberg <schonberg@adacore.com>
7890 Bob Duff <duff@adacore.com>
7891
7892 * atree.h, atree.ads, atree.adb (Copy_Node_With_Replacement): When
7893 copying a parameter list in a call, set properly the First_Named_Formal
7894 and Next_Named_Formal fields in the new list and in the enclosing call.
7895 (Watch_Node,New_Node_Breakpoint,New_Node_Debugging_Output): Shorten
7896 names, to ease typing in the debugger. Improve comments.
7897 (Watch_Node): New variable, intended to be set in the debugger.
7898 (New_Node_Breakpoint): New do-nothing procedure to set a breakpoint on,
7899 called when the watched node is created.
7900 (New_Node_Debugging_Output): Combined version of local procedures
7901 New_Node_Debugging_Output and New_Entity_Debugging_Output, now global,
7902 with a parameter so that conditional breakpoints like "if Node = 12345"
7903 work.
7904 (New_Node, New_Entity): Call the global New_Node_Debugging_Output.
7905 Add Elist1 function
7906
79072007-04-06 Thomas Quinot <quinot@adacore.com>
7908 Ed Schonberg <schonberg@adacore.com>
7909 Gary Dismukes <dismukes@adacore.com>
7910
7911 * checks.ads, checks.adb (Selected_Range_Checks): No range check is
7912 required for a conversion between two access-to-unconstrained-array
7913 types.
7914 (Expr_Known_Valid): Validity checks do not apply to discriminants, but
7915 to discriminant constraints on discriminant objects. This rule must
7916 apply as well to discriminants of protected types in private components.
7917 (Null_Exclusion_Static_Checks): If No_Initialization is set on an
7918 object of a null-excluding access type then don't require the
7919 the object declaration to have an expression and don't emit a
7920 run-time check.
7921
79222007-04-06 Arnaud Charlet <charlet@adacore.com>
7923 Eric Botcazou <botcazou@adacore.com>
7924
7925 * gnatvsn.ads, comperr.adb (Get_Gnat_build_Type): Renamed Build_Type
7926 and made constant.
7927
7928 * comperr.ads, comperr.adb (Compiler_Abort): Add third parameter
7929 Fallback_Loc. Use it as the sloc info when Current_Error_Node doesn't
7930 carry any.
7931
7932 * fe.h (Compiler_Abort): Add third parameter.
7933
7934 * misc.c (internal_error_function): Build third argument from current
7935 input location and pass it to Compiler_Abort.
7936
79372007-04-06 Gary Dismukes <dismukes@adacore.com>
7938
7939 * cstand.adb (Create_Standard): When the target's storage unit size is
7940 greater than a byte, set Has_Non_Standard_Rep and Has_Pragma_Pack on
7941 Standard_String.
7942
79432007-04-06 Nicolas Roche <roche@adacore.com>
7944
7945 * cstreams.c (__gnat_full_name): Fix issues on VxWorks 6.x for which
7946 absolute path can have the following form: device:/a/b. In this case
7947 '/' should be inserted between the path and the filename.
7948
79492007-04-06 Olivier Hainque <hainque@adacore.com>
7950 Eric Botcazou <botcazou@adacore.com>
7951
7952 * decl.c (gnat_to_gnu_entity) <E_Constant>: Associate an external
7953 VAR_DECL to a CONST_DECL we make for a public constant when we know the
7954 corresponding definition has created the so made visible variable.
7955 Handle anonymous access to protected subprogram.
7956 (gnat_to_gnu_entity) <E_Variable>: Do not make the underlying type of an
7957 object with an address clause volatile. Re-enable original fix.
7958 <E_Subprogram_Type>: Set TYPE_REF_CAN_ALIAS_ALL on the reference type
7959 too.
7960 (gnat_to_gnu_entity) <E_Class_Wide_Type>: Retrieve the TYPE_DECL
7961 associated with either the Equivalent or Root type, instead of the
7962 naked type node.
7963 (gnat_to_gnu_entity): Manually mark the top of the DECL_FIELD_OFFSET
7964 subtree for every field of a global record type.
7965 (gnat_to_gnu_entity) <E_Record_Subtype>: If the subtype has
7966 discriminants, invoke again variable_size on its newly computed sizes.
7967
79682007-04-06 Robert Dewar <dewar@adacore.com>
7969 Thomas Quinot <quinot@adacore.com>
7970 Ed Schonberg <schonberg@adacore.com>
7971 Bob Duff <duff@adacore.com>
7972
7973 * einfo.ads, einfo.adb: (First_Component_Or_Discriminant): New function
7974 (Next_Component_Or_Discriminant): New function and procedure
7975 (First_Index, First_Literal, Master_Id,
7976 Set_First_Index, Set_First_Literal, Set_Master_Id):
7977 Add missing Ekind assertions.
7978 (Is_Access_Protected_Subprogram_Type): New predicate.
7979 (Has_RACW): New entity flag, set on package entities to indicate that
7980 the package contains the declaration of a remote accecss-to-classwide
7981 type.
7982 (E_Return_Statement): This node type has the Finalization_Chain_Entity
7983 attribute, in case the result type has controlled parts.
7984 (Requires_Overriding): Add this new flag, because "requires
7985 overriding" is subtly different from "is abstract" (see AI-228).
7986 (Is_Abstract): Split Is_Abstract flag into Is_Abstract_Subprogram and
7987 Is_Abstract_Type. Make sure these are called only when appropriate.
7988 (Has_Pragma_Unreferenced_Objects): New flag
7989
7990 * exp_ch5.adb (Expand_N_Assignment_Statement): If the left-hand side is
7991 class-wide, the tag of the right-hand side must be an exact match, not
7992 an ancestor of that of the object on left-hand side.
7993 (Move_Activation_Chain): New procedure to create the call to
7994 System.Tasking.Stages.Move_Activation_Chain.
7995 (Expand_N_Extended_Return_Statement): Generate code to call
7996 System.Finalization_Implementation.Move_Final_List at the end of a
7997 return statement if the function's result type has controlled parts.
7998 Move asserts to Build_In_Place_Formal.
7999 (Move_Final_List): New function to create the call statement.
8000 (Expand_N_Assignment_Statement): In case of assignment to a class-wide
8001 tagged type, replace generation of call to the run-time subprogram
8002 CW_Membership by call to Build_CW_Membership.
8003 (Expand_N_Return_Statement): Replace generation of call to the run-time
8004 subprogram Get_Access_Level by call to Build_Get_Access_Level.
8005 (Expand_N_Simple_Function_Return): Replace generation of call to the
8006 run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
8007
8008 * exp_ch6.ads, exp_ch6.adb (Expand_Call): Use new predicate
8009 Is_Access_Protected_Subprogram_Type, to handle both named and anonymous
8010 access to protected operations.
8011 (Add_Task_Actuals_To_Build_In_Place_Call): New procedure to add the
8012 master and chain actual parameters to a build-in-place function call
8013 involving tasks.
8014 (BIP_Formal_Suffix): Add new enumeration literals to complete the case
8015 statement.
8016 (Make_Build_In_Place_Call_In_Allocator,
8017 Make_Build_In_Place_Call_In_Anonymous_Context,
8018 Make_Build_In_Place_Call_In_Assignment,
8019 Make_Build_In_Place_Call_In_Object_Declaration): Call
8020 Add_Task_Actuals_To_Build_In_Place_Call with the appropriate master.
8021 (Expand_Inlined_Call): If the subprogram is a null procedure, or a
8022 stubbed procedure with a null body, replace the call with a null
8023 statement without using the full inlining machinery, for efficiency
8024 and to avoid invalid values in source file table entries.
8025
8026 * exp_ch8.adb (Expand_N_Object_Renaming_Declaration): Add support for
8027 renamings of calls to build-in-place functions.
8028
8029 * rtsfind.adb (RTE_Record_Component_Available): New subprogram that
8030 provides the functionality of RTE_Available to record components.
8031 (RTU_Entity): The function Entity has been renamed to RTU_Entity
8032 to avoid undesired overloading.
8033 (Entity): New subprogram that returns the entity for the referened
8034 unit. If this unit has not been loaded, it returns Empty.
8035 (RE_Activation_Chain_Access, RE_Move_Activation_Chain): New entities.
8036 Remove no longer used entities.
8037 (RE_Finalizable_Ptr_Ptr, RE_Move_Final_List): New entities.
8038 (RE_Type_Specific_Data): New entity.
8039 (RE_Move_Any_Value): New entity.
8040 (RE_TA_A, RE_Get_Any_Type): New entities.
8041 (RE_Access_Level, RE_Dispatch_Table, E_Default_Prim_Op_Count,
8042 RE_Prims_Ptr, RE_RC_Offset, RE_Remotely_Callable,
8043 RE_DT_Typeinfo_Ptr_Size, RE_Cstring_Ptr, RE_DT_Expanded_Name): Added.
8044 (Entity): New subprogram that returns the entity for the referened
8045 unit. If this unit has not been loaded, it returns Empty.
8046 (RTE): Addition of a new formal that extends the search to the scopes
8047 of the record types found in the chain of the package.
8048
8049 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Print
8050 "abstract subprograms must be visible" message, whether or not the type
8051 is an interface; that is, remove the special case for interface types.
8052 (Analyze_Function_Return): Remove error message "return of task objects
8053 is not yet implemented" because this is now implemented.
8054 (Create_Extra_Formals): Add the extra master and activation chain
8055 formals in case the result type has tasks.
8056 Remove error message "return of limited controlled objects is not yet
8057 implemented".
8058 (Create_Extra_Formals): Add the extra caller's finalization list formal
8059 in case the result type has controlled parts.
8060 (Process_Formals): In case of access formal types there is no need
8061 to continue with the analysis of the formals if we already notified
8062 errors.
8063 (Check_Overriding_Indicator): Add code to check overriding of predefined
8064 operators.
8065 (Create_Extra_Formals): Prevent creation of useless Extra_Constrained
8066 flags for formals that do not require them,.
8067 (Enter_Overloaded_Entity): Do not give -gnatwh warning message unless
8068 hidden entity is use visible or directly visible.
8069 (Analyze_Abstract_Subprogram_Declaration,Analyze_Subprogram_Body,
8070 Analyze_Subprogram_Declaration,Analyze_Subprogram_Specification,
8071 Check_Conventions,Check_Delayed_Subprogram,Make_Inequality_Operator,
8072 New_Overloaded_Entity): Split Is_Abstract flag into
8073 Is_Abstract_Subprogram and Is_Abstract_Type.
8074
8075 * s-finimp.ads, s-finimp.adb (Move_Final_List): New procedure to move
8076 a return statement's finalization list to the caller's list, used for
8077 build-in-place functions with result type with controlled parts.
8078 Remove no longer used entities.
8079
8080 * s-taskin.ads (Activation_Chain): Remove pragma Volatile. It is no
8081 longer needed, because the full type is now limited, and therefore a
8082 pass-by-reference type.
8083 (Foreign_Task_Level): New constant.
8084
8085 * s-tassta.ads, s-tassta.adb (Move_Activation_Chain): New procedure to
8086 move tasks from the activation chain belonging to a return statement to
8087 the one passed in by the caller, and update the master to the one
8088 passed in by the caller.
8089 (Vulnerable_Complete_Master, Check_Unactivated_Tasks): Check the master
8090 of unactivated tasks, so we don't kill the ones that are being returned
8091 by a build-in-place function.
8092 (Create_Task): Ignore AI-280 for foreign threads.
8093
80942007-04-06 Ed Schonberg <schonberg@adacore.com>
8095 Robert Dewar <dewar@adacore.com>
8096 Bob Duff <duff@adacore.com>
8097 Gary Dismukes <dismukes@adacore.com>
8098
8099 * errout.adb (Unwind_Internal_Type): Use predicate
8100 Is_Access__Protected_Subprogram_Type.
8101
8102 * freeze.adb (Size_Known): Use First/Next_Component_Or_Discriminant
8103 (Freeze_Entity, packed array case): Do not override explicitly set
8104 alignment and size clauses.
8105 (Freeze_Entity): An entity declared in an outer scope can be frozen if
8106 the enclosing subprogram is a child unit body that acts as a spec.
8107 (Freeze_Entity): Use new predicate Is_Access_Protected_Subprogram_Type.
8108 (Freeze_Record_Type): New Ada 2005 processing for reverse bit order
8109 Remove all code for DSP option
8110
8111 * layout.adb (Layout_Record_Type): Use First/
8112 Next_Component_Or_Discriminant
8113 (Layout_Type): Use new predicate Is_Access_Protected_Subprogram_Type,
8114 to handle properly the anonymous access case.
8115
8116 * sem_attr.adb (Build_Access_Object_Type): Use E_Access_Attribute_Type
8117 for all access attributes, because overload resolution should work the
8118 same for 'Access, 'Unchecked_Access, and 'Unrestricted_Access. This
8119 causes the error message for the ambiguous "X'Access = Y'Access" and
8120 "X'Unrestricted_Access = Y'Access" and so forth to match.
8121 (Resolve_Attribute, case 'Access): Remove use of Original_Access_Type,
8122 now that anonymous access to protected operations have their own kind.
8123 (Resolve_Attribute): In case of dispatching call check the violation of
8124 restriction No_Dispatching_Calls.
8125 (Check_Array_Type): Check new -gnatyA array index style option
8126
8127 * sem_ch3.ads, sem_ch3.adb (Derived_Type_Declaration): Reject an
8128 attempt to derive from a synchronized tagged type.
8129 (Analyze_Type_Declaration): If there is a incomplete tagged view of the
8130 type, inherit the class-wide type already created, because it may
8131 already have been used in a self-referential anonymous access component.
8132 (Mentions_T): Recognize self-referential anonymous access components
8133 that use (a subtype of) the class-wide type of the enclosing type.
8134 (Build_Derived_Record_Type): Add earlier setting of Is_Tagged_Type. Pass
8135 Derived_Type for Prev formal on call to
8136 Check_Anonymous_Access_Components rather than Empty.
8137 (Make_Incomplete_Type_Declaration): Add test for case where the type has
8138 a record extension in deciding whether to create a class-wide type,
8139 rather than just checking Tagged_Present.
8140 (Replace_Anonymous_Access_To_Protected_Subprogram): Procedure applies
8141 to stand-alone object declarations as well as component declarations.
8142 (Array_Type_Declaration): Initialize Packed_Array_Type to Empty, to
8143 prevent accidental overwriting when enclosing package appears in
8144 a limited_with_clause.
8145 (Array_Type_Declaration): If the component type is an anonymous access,
8146 the associated_node for the itype is the type declaration itself.
8147 (Add_Interface_Tag_Components): Modified to support concurrent
8148 types with abstract interfaces.
8149 (Check_Abstract_Interfaces): New subprogram that verifies the ARM
8150 rules 3.9.4 (15/2), 9.1 (9.d/2) and 9.4 (11.d/2).
8151 (Build_Derived_Record_Type): Add call to Analyze_Interface_Declaration
8152 to complete the decoration of synchronized interface types. Add also
8153 a call to Check_Abstract_Interfaces to verify the ARM rules.
8154 (Derive_Interface_Subprograms): Modified to support concurrent types
8155 with abstract interfaces.
8156 (Analyze_Subtype_Indication): Resolve the range with the given subtype
8157 mark, rather than delaying the full resolution depending on context.
8158 (Analyze_Component_Declaration,Analyze_Interface_Declaration,
8159 Analyze_Object_Declaration,Analyze_Subtype_Declaration,
8160 Array_Type_Declaration,Build_Derived_Record_Type,
8161 Build_Discriminated_Subtype,Check_Abstract_Overriding,Check_Completion,
8162 Derive_Interface_Subprograms,Derive_Subprogram,Make_Class_Wide_Type,
8163 Process_Full_View,Record_Type_Declaration): Split Is_Abstract flag into
8164 Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
8165 called only when appropriate.
8166 (Copy_And_Swap): Copy Has_Unreferenced_Objects flag from full type
8167 to private type.
8168 (Analyze_Subtype_Declaration): For an access subtype declaration, create
8169 an itype reference for the anonymous designated subtype, to prevent
8170 scope anonmalies in gigi.
8171 (Build_Itype_Reference): New utility, to simplify construction of such
8172 references.
8173
81742007-04-06 Vincent Celier <celier@adacore.com>
8175
8176 * errutil.adb (Initialize): Initialize warnings table, if all warnings
8177 are suppressed, supply an initial dummy entry covering all possible
8178 source locations.
8179
8180 * make.adb (Scan_Make_Arg): Reject options that should start with "--"
8181 and start with only one, such as "-RTS=none".
8182 (Collect_Arguments): Do not check for sources outside of projects.
8183 Do not collect arguments if project is externally built.
8184 (Compile_Sources): Do nothing, not even check if the source is up to
8185 date, if its project is externally built.
8186 (Compile): When compiling a predefined source, add -gnatpg
8187 as the second switch, after -c.
8188 (Compile_Sources): Allow compilation of Annex J renames without -a
8189 (Is_In_Object_Directory): Check if the ALI file is in the object
8190 even if there is no project extension.
8191 (Create_Binder_Mapping_File): Only put a unit in the mapping file for
8192 gnatbind if the ALI file effectively exists.
8193 (Initialize): Add the directory where gnatmake is invoked in front of
8194 the path if it is invoked from a bin directory, even without directory
8195 information, so that the correct GNAT tools will be used when spawned
8196 without directory information.
8197
8198 * makeusg.adb: Change switch -S to -eS
8199 Add lines for new switches -we, -wn and -ws
8200 Add line for new switch -p
8201
8202 * prj-proc.adb (Process): Set Success to False when Warning_Mode is
8203 Treat_As_Error and there are warnings.
8204
8205 * switch-m.ads, switch-m.adb (Normalize_Compiler_Switches): Do not skip
8206 -gnatww Change gnatmake switch -S to -eS
8207 (Scan_Make_Switches): Code reorganisation. Process separately multi
8208 character switches and single character switches.
8209 (Scan_Make_Switches): New Boolean out parameter Success. Set Success to
8210 False when switch is not recognized by gnatmake.
8211 (Scan_Make_Switches): Set Setup_Projects True when -p or
8212 --create-missing-dirs is specified.
8213
8214 * fname.adb (Is_Predefined_File_Name): Return True for annex J
8215 renamings Calendar, Machine_Code, Unchecked_Conversion and
8216 Unchecked_Deallocation only when Renamings_Included is True.
8217
8218 * par.adb: Allow library units Calendar, Machine_Code,
8219 Unchecked_Conversion and Unchecked_Deallocation to be recompiled even
8220 when -gnatg is not specified.
8221 (P_Interface_Type_Definition): Remove the formal Is_Synchronized because
8222 there is no need to generate always a record_definition_node in case
8223 of synchronized interface types.
8224 (SIS_Entry_Active): Initialize global variable to False
8225 (P_Null_Exclusion): For AI-447: Add parameter Allow_Anonymous_In_95 to
8226 indicate cases where AI-447 says "not null" is legal.
8227
8228 * makeutl.ads, makeutil.adb (Executable_Prefix_Path): New function
8229
8230 * makegpr.adb (Check_Compilation_Needed): Take into account dependency
8231 files with with several lines starting with the object fileb name.
8232 (Scan_Arg): Set Setup_Projects True when -p or --create-missing-dirs
8233 is specified.
8234 (Initialize): Add the directory where gprmake is invoked in front of the
8235 path, if it is invoked from a bin directory or with directory
8236 information, so that the correct GNAT tools will be used when invoked
8237 directly.
8238 (Check_Compilation_Needed): Process correctly backslashes on Windows.
8239
8240 * vms_data.ads: Update switches/qualifiers
8241
82422007-04-06 Ed Schonberg <schonberg@adacore.com>
8243 Thomas Quinot <quinot@adacore.com>
8244
8245 * exp_aggr.adb:
8246 If the array component is a discriminated record, the array aggregate
8247 is non-static even if the component is given by an aggregate with
8248 static components.
8249 (Expand_Record_Aggregate): Use First/Next_Component_Or_Discriminant
8250 (Convert_Aggr_In_Allocator): If the allocator is for an access
8251 discriminant and the type is controlled. do not place on a finalization
8252 list at this point. The proper list will be determined from the
8253 enclosing object.
8254 (Build_Record_Aggr_Code): If aggregate has box-initialized components,
8255 initialize record controller if needed, before the components, to ensure
8256 that they are properly finalized.
8257 (Build_Record_Aggr_Code): For the case of an array component that has a
8258 corresponding array aggregate in the record aggregate, perform sliding
8259 if required.
8260
82612007-04-06 Javier Miranda <miranda@adacore.com>
8262 Gary Dismukes <dismukes@adacore.com>
8263 Ed Schonberg <schonberg@adacore.com>
8264
8265 * exp_ch13.adb (Expand_External_Tag_Definition): Replace call to the
8266 run-time subprogram Set_External_Tag by call to Build_Set_External_Tag.
8267
8268 * exp_ch4.adb (Expand_Allocator_Expression): Don't perform a run-time
8269 accessibility on class-wide allocators if the allocator occurs at the
8270 same scope level as the allocator's type. The check is guaranteed to
8271 succeed in that case, even when the expression originates from a
8272 parameter of the containing subprogram.
8273 (Expand_N_Op_Eq): Do nothing in case of dispatching call if compiling
8274 under No_Dispatching_Calls restriction. During the semantic analysis
8275 we already notified such violation.
8276 (Tagged_Membership): Constant folding. There is no need to check
8277 the tag at run-time if the type of the right operand is non
8278 class-wide abstract.
8279 Replace call to Is_Ancestor by call to Is_Parent
8280 to support concurrent types with interface types.
8281 (Expand_N_Allocator): Add an assertion associated with the generation
8282 of the master_id.
8283 (Expand_N_Slice): Do not enable range check to nodes associated
8284 with the frontend expansion of the dispatch table.
8285 (Is_Local_Access_Discriminant): Subsidiary function to
8286 Expand_N_Allocator.
8287 (Tagged_Membership): Replace generation of call to the run-time
8288 subprogram CW_Membership by call to Build_CW_Membership.
8289 (Expand_Allocator_Expression): Replace generation of call to the
8290 run-time subprogram Get_Access_Level by call to Build_Get_Access_Level.
8291
8292 * exp_disp.ads, exp_disp.adb (Make_DT): Code reorganization to
8293 initialize most the TSD components by means of an aggregate.
8294 Modify the declaration of the object containing the TSD
8295 because we now expand code that has a higher level of abstraction.
8296 The TSD has a discriminant containing the Inheritance Depth Level,
8297 value that is used in the membership test but also to fix the size
8298 of the table of ancestors.
8299 (Expand_Interface_Conversion): Insert function body at the closest place
8300 to the conversion expression, to prevent access-before-elaboration
8301 errors in the backend.
8302 Code improved to reduce the size of the dispatch table if
8303 compiling under restriction No_Dispatching_Calls plus code cleanup.
8304 Code reorganization plus removal of calls to Set_Num_Prim_Ops
8305 (Make_Secondary_DT): Remove call to Set_Num_Prim_Ops.
8306 (Expand_Dispatching_Call): Minor code reorganization plus addition of
8307 code to return immediately if compiling under No_Dispatching_Calls
8308 restriction.
8309 (Set_All_DT_Position): Remove code associated with the old CPP pragmas.
8310 CPP_Virtual and CPP_Vtable are no longer supported.
8311 (Expand_Interface_Conversion): Add missing support for interface type
8312 derivations.
8313 (Expand_Interface_Actuals): Replace calls to Is_Ancestor by calls to
8314 Is_Parent to support concurrent types with interfaces.
8315 (Init_Predefined_Interface_Primitives): Removed.
8316 (Make_Secondary_DT): Modified to support concurrent record types.
8317 (Set_All_DT_Position): Modified to support concurrent record types.
8318 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated
8319 with Get_External_Tag, Inherit_TSD, Set_External_Tag.
8320 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entry associated
8321 with CW_Membership.
8322 (Ada_Actions, Action_Is_Proc, Action_Nb_Arg): Remove entries associated
8323 with Get_Access_Level, Get_Predefined_Prim_Op_Address,
8324 Get_Prim_Op_Address Get_RC_Offset, Get_Remotely_Callable, Inherit_DT,
8325 Set_Access_Level, Set_Expanded_Name, Set_Predefined_Prim_Op_Address,
8326 Set_Prim_Op_Address, Set_RC_Offset, Set_Remotely_Callable, Set_TSD.
8327 (Expand_Dispatching_Call): Replace generation of call to the run-time
8328 subprograms Get_Predefined_Prim_Op_Address and Get_Prim_Op_Address by
8329 calls to Build_Get_Predefined_Prim_Op_Address, and Build_Get_Prim_Op_
8330 Address.
8331 (Fill_DT_Entry, Fill_Secondary_DT_Entry): Replace generation of call to
8332 the run-time subprograms Set_Predefined_Prim_Op_Address and Set_Prim_
8333 Op_Address by calls to Build_Set_Predefined_Prim_Op_Address, and
8334 Build_Set_Prim_Op_Address.
8335 (Get_Remotely_Callable): Subprogram removed.
8336 (Init_Predefined_Interface_Primitives): Replace generation of call to
8337 the run-time subprograms Inherit_DT by call to Build_Inherit_Predefined_
8338 Prims.
8339
8340 * sem_elab.adb (Set_Elaboration_Constraint): Replace the call to
8341 First (Parameter_Associations ()) with the call to First_Actual that
8342 returns an actual parameter expression for both named and positional
8343 associations.
8344
8345 * sem_disp.adb (Check_Dispatching_Call): In case of dispatching call
8346 check violation of restriction No_Dispatching_Calls.
8347 (Check_Controlling_Type): A formal of a tagged incomplete type is a
8348 controlling argument.
8349
8350 * exp_util.ads, exp_util.adb (Type_May_Have_Bit_Aligned_Components): Use
8351 First/Next_Component_Or_Discriminant
8352 (Insert_Actions): Add entries for new N_Push and N_Pop nodes
8353 (Find_Implemented_Interface): Removed. All the calls to this subprogram
8354 specify Any_Limited_Interface, and this functionality is already
8355 provided by the function Has_Abstract_Interfaces.
8356 (Find_Interface, Find_Interface_Tag, Find_Interface_ADT): Modified to
8357 support concurrent types implementing interfaces.
8358 (Find_Implemented_Interface): Removed. All the calls to this subprogram
8359 specify kind Any_Limited_Interface, and this functionality is already
8360 provided by the function Has_Abstract_Interfaces.
8361 (Remove_Side_Effects): replace Controlled_Type by
8362 CW_Or_Controlled_Type whenever the issue is related to
8363 using or not the secondary stack.
8364
8365 * par-ch12.adb (P_Formal_Type_Definition): Update calls to
8366 P_Interface_Type_Definition to fulfill the new interface (the formal
8367 Is_Synchronized is no longer required).
8368
8369 * Make-lang.in (GNAT_ADA_OBJS): Addition of exp_atag.o
8370 Update dependencies.
8371
8372 * exp_atag.ads, exp_atag.adb: New file
8373
83742007-04-06 Ed Schonberg <schonberg@adacore.com>
8375 Bob Duff <duff@adacore.com>
8376 Cyrille Comar <comar@adacore.com>
8377
8378 * exp_ch7.ads, exp_ch7.adb (Find_Final_List): If the access type is
8379 anonymous, use finalization list of enclosing dynamic scope.
8380 (Expand_N_Package_Declaration): For a library package declaration
8381 without a corresponding body, generate RACW subprogram bodies in the
8382 spec (just as we do for the task activation call).
8383 (Convert_View): Split Is_Abstract flag into Is_Abstract_Subprogram and
8384 Is_Abstract_Type. Make sure these are called only when appropriate.
8385 Remove all code for DSP option
8386 (CW_Or_Controlled_Type): new subprogram.
8387
83882007-04-06 Eric Botcazou <botcazou@adacore.com>
8389 Ed Schonberg <schonberg@adacore.com>
8390 Gary Dismukes <dismukes@adacore.com>
8391
8392 * exp_ch9.ads, exp_ch9.adb (Family_Offset): Add new 'Cap' boolean
8393 parameter. If it is set to true, return a result capped according to
8394 the global upper bound for the index of an entry family.
8395 (Family_Size): Add new 'Cap' boolean parameter. Pass it to Family_Offset
8396 (Build_Find_Body_Index): Adjust for above change.
8397 (Entry_Index_Expression): Likewise.
8398 (Is_Potentially_Large_Family): New function extracted from...
8399 (Collect_Entry_Families): ...here. Call it to detect whether the family
8400 is potentially large.
8401 (Build_Entry_Count_Expression): If the family is potentially large, call
8402 Family_Size with 'Cap' set to true.
8403 (Expand_N_Protected_Type_Declaration, Expand_N_Protected_Body): Generate
8404 a protected version of an operation declared in the private part of
8405 a protected object, because they may be invoked through a callback.
8406 (Set_Privals): If the type of a private component is an anonymous access
8407 type, do not create a new itype for each protected body.
8408 If the body of a protected operation creates
8409 controlled types (including allocators for class-widetypes), the
8410 body of the corresponding protected subprogram must include a
8411 finalization list.
8412 (Build_Activation_Chain_Entity): Build the chain entity for extended
8413 return statements.
8414 (Type_Conformant_Parameters): Use common predicate Conforming_Types
8415 to determine whether operation overrides an inherited primitive.
8416 (Build_Wrapper_Spec): Add code to examine the parents while looking
8417 for a possible overriding candidate.
8418 (Build_Simple_Entry_Call): Set No_Initialization on the object used to
8419 hold an actual parameter value since its initialization is separated
8420 from the the declaration. Prevents errors on null-excluding access
8421 formals.
8422
84232007-04-06 Thomas Quinot <quinot@adacore.com>
8424
8425 * exp_dist.ads, exp_dist.adb (Build_To_Any_Call, Build_From_Any_Call):
8426 Do an Unchecked_Conversion to handle the passage from the Underlying
8427 Type to the Base Type when calling Build_To_Any_Call and
8428 Build_From_Any_Call.
8429 (Build_Actual_Object_Declaration): Set Object's Ekind to E_Variable or
8430 E_Constant, depending upon Variable formal.
8431 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
8432 PolyORB_Support.Build_Subprogram_Receiving_Stubs): For a formal
8433 parameter that requires an extra constrained parameter, declare
8434 temporary for actual as a variable, not a constant.
8435 (Add_RACW_Primitive_Declarations_And_Bodies): Generate bodies only when
8436 the unit being compiled is the one that contains the stub type.
8437 Change primitive operation name for the RACW associated with a RAS
8438 from Call to _Call so it cannot clash with any legal identifier.
8439 (PolyORB_Support.Add_RACW_Write_Attribute): Remove unused constant
8440 Is_RAS.
8441 (Append_RACW_Bodies): New subprogram.
8442 (Expand_Receiving_Stubs_Bodies): Pass a 'Stmts' list to
8443 Add_Receiving_Stubs_To_Declarations functions.
8444 When expanding a package body, this list correspond to the
8445 statements in the HSS at the end of the pacakge.
8446 When expanding a package spec, this list correspond to the
8447 spec declarations.
8448 (Add_Receiving_Stubs_To_Declarations): Append the function
8449 registering the receiving stubs at the end of the 'Stmts' list.
8450 (RCI_Package_Locator): Pass the new Version generic formal when
8451 instantiating a RCI_Locator package.
8452 (Build_From_Any_Function): To compute the High bound for an
8453 unconstrained array actual, we add the Low bound with the length.
8454 Thus we must convert the low bound and the length to an appropriate
8455 type before doing the sum.
8456 (Build_Subprogram_Receiving_Stubs, PolyORB):
8457 * Retrieve the extra formals parameters at the
8458 end of the parameter stream.
8459 * Use Move_Any_Value to write back out parameters
8460 after executing the request as it is more efficient
8461 than Copy_Any_Value.
8462 * Build the any containing Extra Formals with the
8463 appropriate typecode.
8464 (PolyORB_Support.Helpers.Append_Record_Traversal): Nothing to do for an
8465 empty Component_List.
8466 (Build_Actual_Object_Declaration): New subprogram. Build and insert into
8467 the tree the declaration for an object that serves as actual parameter
8468 in server-side stubs.
8469 (GARLIC_Support.Build_Subprogram_Receiving_Stubs,
8470 PolyORB_Support.Build_Subprogram_Receiving_Stubs):
8471 Use Build_Actual_Object_Declaration to prepare the actuals.
8472 (Add_Parameter_To_NVList): Set the parameter mode to In for
8473 Extra Constrained Parameters.
8474 (Build_General_Calling_Stubs): Set the parameter type to boolean for
8475 Extra Constrained parameters.
8476 (Build_To_Any_Function, Build_From_Any_Function,
8477 Built_TypeCode_Function): When Typ is implicit, call the correct
8478 function with the first not implicit parent type.
8479 (TC_Rec_Add_Process_Element, FA_Rec_Add_Process_Element,
8480 (FA_Ary_Add_Process_Element): When Datum is an Any, we cannot infer the
8481 typecode from the Etype. Therefore we retrieve the correct typecode
8482 with a call to Get_Any_Type.
8483 (Copy_Specification): Do controlling formal type substitution based on
8484 Is_Controlling_Formal flag, instead of caller-provided object type.
8485 (Build_Subprogram_Calling_Stubs): When retrieveing the original spec for
8486 a RACW primitive operation, we might get a subprogram declaration for an
8487 ancestor of the RACW designated type (not for the designated type
8488 itself), in the case where this operation is inherited. In this case we
8489 have no easy means of determining the original tagged type for which
8490 the primitive was declared, so instead we now rely on
8491 Copy_Specification to use the Is_Controlling_Formal flag to determine
8492 which formals require type substitution.
8493
84942007-04-06 Robert Dewar <dewar@adacore.com>
8495 Ed Schonberg <schonberg@adacore.com>
8496
8497 * exp_intr.adb (Expand_Exception_Call): Calls to subprograms in
8498 GNAT.Current_Exception are not allowed if pragma Restrictions
8499 (No_Exception_Propagation) is set and in any case make the associated
8500 handler unsuitable as a target for a local raise statement.
8501 (Expand_Dispatching_Constructor_Call): Replace generation of call to the
8502 run-time subprogram CW_Membership by call to Build_CW_Membership.
8503 (Expand_Dispatching_Constructor_Call): If the dispatching tag is given
8504 by a function call, a temporary must be created before expanding the
8505 Constructor_Call itself, to prevent out-of-order elaboration in the
8506 back-end when stack checking is enabled..
8507
85082007-04-06 Ed Schonberg <schonberg@adacore.com>
8509
8510 * exp_pakd.adb (Expand_Packed_Boolean_Operator): The bounds of the
8511 result are the bounds of the left operand, not the right.
8512
85132007-04-06 Ed Schonberg <schonberg@adacore.com>
8514
8515 * exp_strm.adb
8516 (Build_Mutable_Record_Write_Procedure): For an Unchecked_Union type, use
8517 discriminant defaults.
8518 (Build_Record_Or_Elementary_Output_Procedure): Ditto.
8519 (Make_Component_List_Attributes): Ditto.
8520
85212007-04-06 Ed Schonberg <schonberg@adacore.com>
8522 Bob Duff <duff@adacore.com>
8523
8524 * sem_aggr.adb (Resolve_Record_Aggregate): In semantics-only mode treat
8525 an association with a box as providing a value even though the
8526 initialization procedure for the type is not available.
8527 (Resolve_Record_Aggregate): Check that a choice of an association with a
8528 box corresponds to a component of the type.
8529 (Resolve_Record_Aggregate): Split Is_Abstract flag into
8530 Is_Abstract_Subprogram and Is_Abstract_Type.
8531
8532 * exp_tss.adb (Base_Init_Proc): Use Is_Type instead of Type_Kind for
8533 assert.
8534
8535 * inline.adb (Add_Inlined_Body): Split Is_Abstract flag into
8536 Is_Abstract_Subprogram and Is_Abstract_Type. Make sure these are
8537 called only when appropriate.
8538
85392007-04-06 Olivier Hainque <hainque@adacore.com>
8540
8541 * g-alleve.ads (Low Level Vector type definitions): Map each to the
8542 associated vector view instead of all to the unsigned char view.
8543
8544 * g-altcon.adb (Generic_Conversions): New internal generic package,
8545 offering facilities for all the Vector/View conversion routines
8546 implemented by this unit.
8547 (To_View/To_Vector - all versions): Reimplemented in a systematic
8548 manner, using the internal Generic_Conversions facilities.
8549
85502007-04-06 Pascal Obry <obry@adacore.com>
8551
8552 * g-arrspl.adb (Free) [Element_Access]: New routine to free the source
8553 string.
8554 (Create): Free the source string before storing the new one.
8555
85562007-04-06 Vincent Celier <celier@adacore.com>
8557
8558 * g-debpoo.adb (Validity): New package with a complete new
8559 implementation of subprograms Is_Valid and Set_Valid.
8560 (Is_Valid): Move to local package Validity
8561 (Set_Valid): Move to local package Validity
8562
85632007-04-06 Arnaud Charlet <charlet@adacore.com>
8564
8565 * g-expect.adb (Get_Command_Output): When expanding the output buffer
8566 we must ensure that there is enough place for the new data we are going
8567 to copy in.
8568
85692007-04-06 Thomas Quinot <quinot@adacore.com>
8570
8571 * g-md5.ads, g-md5.adb (Digest): Fix off-by-one error in padding
8572 computation.
8573
85742007-04-06 Jose Ruiz <ruiz@adacore.com>
8575 Vincent Celier <celier@adacore.com>
8576
8577 * gnatcmd.adb (B_Start): Add prefix of binder generated file.
8578 (Stack_String): Add this String that contains the name of the Stack
8579 package in the project file.
8580 (Packages_To_Check_By_Stack): Add this list that contains the packages
8581 to be checked by gnatstack, which are the naming and the stack packages.
8582 (Check_Files): If no .ci files were specified for gnatstack we add all
8583 the .ci files belonging to the projects, including binder generated
8584 files.
8585 (Non_VMS_Usage): Document that gnatstack accept project file switches.
8586 (GNATCmd): Update the B_Start variable if we are in a VMS environment.
8587 Add gnatstack to the list of commands that use project file related
8588 switches, and get the single attribute Switches from the stack package
8589 in a project file when calling gnatstack. Parse the -U flag for
8590 processing files belonging to all projects in the project tree.
8591 Remove all processing for command Setup
8592
8593 * prj-attr.adb: Add new package Stack with single attribute Switches
8594
8595 * vms_conv.ads (Command_Type): Add command Stack.
8596 Move to body declarations that are only used in the body: types Item_Id,
8597 Translation_Type, Item_Ptr, Item and its subtypes.
8598
8599 * vms_conv.adb: (Initialize): Add data for new command Stack.
8600 Add declarations moved from the spec: types Item_Id, Translation_Type,
8601 Item_Ptr, Item and its subtypes.
8602 (Cargs_Buffer): New table
8603 (Cargs): New Boolean global variable
8604 (Process_Buffer): New procedure to create arguments
8605 (Place): Put character in table Buffer or Cargs_Buffer depending on the
8606 value of Cargs.
8607 (Process_Argument): Set Cargs when processing qualifiers for GNAT
8608 COMPILE
8609 (VMS_Conversion): Call Process_Buffer for table Buffer and, if it is not
8610 empty, for table Cargs_Buffer.
8611 (Initialize): Remove component Setup in Command_List
8612
86132007-04-06 Vincent Celier <celier@adacore.com>
8614
8615 * gprep.adb (Process_Files.Process_One_File): Use full file name when
8616 issuing pragma Source_Reference.
8617
86182007-04-06 Emmanuel Briot <briot@adacore.com>
8619
8620 * g-regpat.adb (Parse_Posix_Character_Class): Fix handling of
8621 [[:xdigit:]] character class.
8622 Also raise an exception when an invalid character class is used.
8623
86242007-04-06 Pascal Obry <obry@adacore.com>
8625
8626 * i-cstrea.ads: (fopen): Add encoding parameter.
8627 (freopen): Idem.
8628 Change reference from a-sysdep.c to sysdep.c in comment.
8629 Update copyright notice.
8630 This set of patch add support for the encoding form parameter.
8631
8632 * mingw32.h (S2WSU): New macro to convert from a string to a
8633 wide-string using the UTF-8 encoding. The S2WS macro supports now only
8634 standard 8bits encoding.
8635 (WS2SU): As above but converting from wide-sring to string.
8636 This is needed as it is necessary to have access to both versions in the
8637 runtime for the form parameter encoding support.
8638 This set of patch add support for the encoding form parameter.
8639 (S2WS): Improve implementation to handle cases where the filename is not
8640 UTF-8 encoded. In this case we default to using the current code page
8641 for the conversion.
8642
8643 * s-crtl-vms64.ads, s-crtl.ads (Filename_Encoding): New enumeration
8644 type (UTF8, ASCII_8bits). This enumeration has a rep clause to match
8645 the constants defined in adaint.h.
8646 (fopen): Add encoding parameter.
8647 (freopen): Idem.
8648
8649 * s-ficobl.ads (AFCB): Add Encoding field to record the filename
8650 encoding. This is needed for the Reset routine (freopen low level-call).
8651
8652 * s-fileio.adb (Open): Decode encoding form parameter and set the
8653 corresponding encoding value into AFCB structure.
8654 (Reset): Pass the encoding value to freopen.
8655 (Close): Move the call to Lock_Task to the beginning of the procedure.
8656
86572007-04-06 Geert Bosch <bosch@adacore.com>
8658 Robert Dewar <dewar@adacore.com>
8659
8660 * i-fortra.ads: Add Double_Complex type.
8661
8662 * impunit.adb: (Is_Known_Unit): New function
8663 Add Gnat.Byte_Swapping
8664 Add GNAT.SHA1
8665 Add new Ada 2005 units
8666 Ada.Numerics.Generic_Complex_Arrays, Ada.Numerics.Generic_Real_Arrays,
8667 Ada.Numerics.Complex_Arrays, Ada.Numerics.Real_Arrays,
8668 Ada.Numerics.Long_Complex_Arrays, Ada.Numerics.Long_Long_Complex_Arrays,
8669 Ada.Numerics.Long_Long_Real_Arrays and Ada.Numerics.Long_Real_Arrays
8670
8671 * impunit.ads (Is_Known_Unit): New function
8672
8673 * a-ngcoar.adb, a-ngcoar.ads, a-ngrear.adb,
8674 a-ngrear.ads, a-nlcoar.ads, a-nllcar.ads, a-nllrar.ads, a-nlrear.ads,
8675 a-nucoar.ads, a-nurear.ads, g-bytswa.adb, g-bytswa-x86.adb,
8676 g-bytswa.ads, g-sha1.adb, g-sha1.ads, i-forbla.ads, i-forlap.ads,
8677 s-gearop.adb, s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb,
8678 s-gecola.ads, s-gerebl.adb, s-gerebl.ads, s-gerela.adb, s-gerela.ads:
8679 New files.
8680
8681 * Makefile.rtl: Add g-bytswa, g-sha1, a-fzteio and a-izteio
8682
8683 * a-fzteio.ads, a-izteio.ads: New Ada 2005 run-time units.
8684
86852007-04-06 Eric Botcazou <botcazou@adacore.com>
8686 Arnaud Charlet <charlet@adacore.com>
8687
8688 * init.c: Reuse PA/HP-UX code for IA-64/HP-UX, except
8689 __gnat_adjust_context_for_raise.
8690 (__gnat_init_float): on x86 vxworks 5.x and 6.x, we use the same
8691 implementation of floating point operations as native x86 targets.
8692 So the FPU should be initialized in the same way using finit. Fix
8693 floating point operations accuracy issues.
8694 (__gnat_install_handler, case FreeBSD): Use proper type for sa_sigaction
8695 member in struct sigaction, so as to avoid warning for incompatible
8696 pointer types.
8697
86982007-04-06 Serguei Rybin <rybin@adacore.com>
8699
8700 * lib.ads, lib.adb (Tree_Read): Release the memory occupied by the
8701 switches from previously loaded tree
8702
87032007-04-06 Thomas Quinot <quinot@adacore.com>
8704
8705 * lib-writ.adb (Write_With_Lines): Factor duplicated code between the
8706 cases where a given dependency has a body or not.
8707 (Write_With_File_Names): New subprogram, common code for the two cases
8708 above.
8709
87102007-04-06 Ed Schonberg <schonberg@adacore.com>
8711 Javier Miranda <miranda@adacore.com>
8712
8713 * lib-xref.ads, lib-xref.adb:
8714 Modify the loop that collects type references, to include interface
8715 types that the type implements. List each of these interfaces when
8716 building the entry for the type.
8717 (Generate_Definition): Initialize component Def and Typ of new entry
8718 in table Xrefs, to avoid to have these components unitialized.
8719 (Output_References): Split Is_Abstract flag into
8720 Is_Abstract_Subprogram and Is_Abstract_Type.
8721 (Generate_Reference): Add barrier to do not generate the warning
8722 associated with Ada 2005 entities with entities generated by the
8723 expander.
8724
87252007-04-06 Robert Dewar <dewar@adacore.com>
8726 Arnaud Charlet <charlet@adacore.com>
8727 Vincent Celier <celier@adacore.com>
8728
8729 * gnat_rm.texi, gnat_ugn.texi: Add -gnatyl documentation
8730 Update 'Exception Handling Control' chapter which was outdated.
8731 Minor fix to documentation of -gnatwq
8732 Remove section "Adapting the Run Time to a New C++ Compiler" because
8733 it is now obsolete.
8734 Add passage on need of -nostart-files in some non-ada-main cases.
8735 Document new switch -eS (/STANDARD_OUTPUT_FOR_COMMANDS) for gnatmake
8736 Update documentation about Interfacing with C++
8737 Add documentation for new gnatmake switch -p
8738 Add missing protocol part in URLs.
8739 Document -gnatyA
8740 Document pragma Compile_Time_Error
8741 Add documentation for Object_Size indicating that stand alone
8742 objects can have a larger size in some cases.
8743 Add node for GNAT.Byte_Swapping, GNAT.SHA1
8744 Update reference to the Ravenscar profile.
8745 Document pragma Unreferenced_Objects
8746
8747 * gnat-style.texi: Fix typo
8748
87492007-04-06 Vincent Celier <celier@adacore.com>
8750
8751 * mlib.adb (Building_Library): Only output "building a library..." in
8752 verbose mode
8753
8754 * mlib-prj.adb (Build_Library): Only output lists of object and ALI
8755 files in verbose mode.
8756
8757 * mlib-utl.adb (Ar): Only output the first object files when not in
8758 verbose mode.
8759 (Gcc): Do not display all the object files if not in verbose mode, only
8760 the first one.
8761
87622007-04-06 Robert Dewar <dewar@adacore.com>
8763
8764 * namet.ads, namet.adb (wn): Improve this debugging routine. Calling
8765 it no longer destroys the contents of Name_Buffer or Name_Len and
8766 non-standard and invalid names are handled better.
8767 (Get_Decoded_Name_String): Improve performance by using
8768 Name_Has_No_Encodings flag in the name table.
8769 (Is_Valid_Name): New function to determine whether a Name_Id is valid.
8770 Used for debugging printouts.
8771
87722007-04-06 Robert Dewar <dewar@adacore.com>
8773 Javier Miranda <miranda@adacore.com>
8774 Bob Duff <duff@adacore.com>
8775
8776 * par-ch3.adb: (P_Type_Declaration): Set Type_Token_Location
8777 (P_Interface_Type_Definition): Remove the formal Is_Synchronized because
8778 there is no need to generate always a record_definition_node in case
8779 of synchronized interface types.
8780 (P_Type_Declaration): Update calls to P_Interface_Type_Definition.
8781 (P_Null_Exclusion): For AI-447: Remove warnings about "not null" being
8782 illegal in Ada 95, in cases where it is legal. Change the warnings to
8783 errors in other cases. Don't give the error unless the "not null"
8784 parses properly. Correct the source position at which the error occurs.
8785 (P_Known_Discriminant_Part_Opt): Pass Allow_Anonymous_In_95 => True to
8786 P_Null_Exclusion, to suppress "not null" warnings.
8787 (P_Identifier_Declarations): Code cleanup. Removed unrequired label and
8788 associated goto statements.
8789
8790 * par-endh.adb (Pop_End_Context): Allow more flexibility in placement
8791 of END RECORD
8792
8793 * scans.ads (Type_Token_Location): New flag
8794
8795 * par-ch6.adb (P_Mode): Check specifically for case of IN ACCESS
8796 (P_Formal_Part): Pass Allow_Anonymous_In_95 => True to
8797 P_Null_Exclusion, to suppress "not null" warnings.
8798
87992007-04-06 Robert Dewar <dewar@adacore.com>
8800 Javier Miranda <miranda@adacore.com>
8801 Bob Duff <duff@adacore.com>
8802 Vincent Celier <celier@adacore.com>
8803
8804 * par-prag.adb (Prag): Add dummy entry for pragma Compile_Time_Error
8805 (Extensions_Allowed): No longer sets Ada_Version
8806 Entry for pragma Unreferenced_Objects
8807
8808 * sem_prag.adb (Analyze_Pragma, case Priority): Force with of
8809 system.tasking if pragma priority used in a procedure
8810 (Analyze_Pragma, case Warning): Handle dot warning switches
8811 (Process_Compile_Time_Warning_Or_Error): New procedure
8812 (Analyze_Pragma): Add processing for Compile_Time_Error
8813 Add support for extra arguments External_Name and Link_Name.
8814 Remove code associated with pragmas CPP_Virtual and CPP_Vtable.
8815 (Process_Import_Or_Interface): Add support for the use of pragma Import
8816 with tagged types.
8817 (Extensions_Allowed): No longer affects Ada_Version
8818 (Analyze_Pragma): Split Is_Abstract flag into Is_Abstract_Subprogram and
8819 Is_Abstract_Type. Make sure these are called only when appropriate.
8820 Add processing for pragma Unreferenced_Objects
8821
8822 * snames.h, snames.ads, snames.adb: Add entry for pragma
8823 Compile_Time_Error
8824 Add new standard name Minimum_Binder_Options for new gprmake
8825 Add new standard names for gprmake: Archive_Suffix,
8826 Library_Auto_Init_Supported, Library_Major_Minor_Id_Supported,
8827 Library_Support, Library_Version_Options,
8828 Shared_Library_Minimum_Options,
8829 Shared_Library_Prefix, Shared_Library_Suffix, Symbolic_Link_Supported.
8830 Change Name_Call to Name_uCall so that it cannot clash with a legal
8831 subprogram name.
8832 Add new standard names Mapping_Spec_Suffix and Mapping_Body_Suffix
8833 Append C_Plus_Plus to convention identifiers as synonym for CPP
8834 Add new standard names Stack and Builder_Switches
8835 Add new standard names: Compiler_Minimum_Options, Global_Config_File,
8836 Library_Builder, Local_Config_File, Objects_Path, Objects_Path_File,
8837 Run_Path_Option, Toolchain_Version.
8838 Entry for pragma Unreferenced_Objects
8839
8840 * switch-c.adb (Scan_Front_End_Switches): Store correct -gnateD
8841 switches, without repetition of "eD". Make sure that last character of
8842 -gnatep= switch is not taken as -gnat switch character.
8843 Complete rewrite of circuit for handling saving compilation options
8844 Occasioned by need to support dot switchs for -gnatw, but cleans up
8845 things in general.
8846 -gnatX does not affect Ada_Version
8847 Include -gnatyA in -gnatg style switches
8848
8849 * sem_warn.ads, sem_warn.adb (Output_Unreferenced_Messages): Exclude
8850 warnings on return objects.
8851 (Warn_On_Useless_Assignment): Exclude warnings on return objects
8852 (Set_Dot_Warning_Switch): New procedure
8853 (Check_References): Add missing case of test for
8854 Has_Pragma_Unreferenced_Objects
8855 (Output_Unreferenced_Messages): Implement effect of new pragma
8856 Unreferenced_Objects, remove special casing of limited controlled
8857 variables.
8858
88592007-04-06 Vincent Celier <celier@adacore.com>
8860
8861 * prj-ext.adb (Initialize_Project_Path): New procedure that initialize
8862 the default project path, initially done during elaboration of the
8863 package.
8864 If the prefix returned by Sdefault is null, get the prefix from a call
8865 to Executable_Prefix_Path.
8866 (Project_Path): Call Initialize_Project_Path if Current_Project_Path is
8867 null.
8868
8869 * prj-nmsc.adb (Get_Path_Names_And_Record_Sources): Use the non
8870 canonical directory name to open the directory from which files are
8871 retrieved.
8872 (Record_Other_Sources): Idem.
8873 (Locate_Directory): Add the possibility to create automatically missing
8874 directories when Setup_Projects is True.
8875 Call Locate_Directory so that the directory will be created when
8876 Setup_Projects is True, for object dir, library dir, library ALI dir,
8877 library source copy dir and exec dir.
8878
8879 * prj-pp.adb (Max_Line_Length): Set to 255 for compatibility with older
8880 versions of GNAT.
8881
88822007-04-06 Robert Dewar <dewar@adacore.com>
8883
8884 * sem_ch13.ads, sem_ch13.adb (Adjust_Record_For_Reverse_Bit_Order):
8885 Use First/Next_Component_Or_Discriminant
8886 (Analyze_Record_Representation_Clause):
8887 Use First/Next_Component_Or_Discriminant
8888 (Check_Component_Overlap): Use First/Next_Component_Or_Discriminant
8889 (Analyze_Attribute_Definition_Clause, case Value_Size): Reject
8890 definition if type is unconstrained.
8891 (Adjust_Record_For_Reverse_Bit_Order): New procedure
8892 (Analyze_Attribute_Definition_Clause): Split Is_Abstract flag into
8893 Is_Abstract_Subprogram and Is_Abstract_Type.
8894 (Adjust_Record_For_Reverse_Bit_Order): New procedure
8895
8896 * repinfo.adb (List_Record_Info): Use First/
8897 Next_Component_Or_Discriminant.
8898
8899 * style.ads, styleg-c.adb, styleg-c.ads (Check_Array_Attribute_Index):
8900 New procedure.
8901
8902 * stylesw.ads, stylesw.adb: Recognize new -gnatyA style switch
8903 Include -gnatyA in default switches
8904
8905 * opt.ads: (Warn_On_Non_Local_Exception): New flag
8906 (Warn_On_Reverse_Bit_Order): New flag
8907 (Extensions_Allowed): Update the documentation.
8908 (Warn_On_Questionable_Missing_Parens): Now on by default
8909
8910 * usage.adb: Add documentation of -gnatw.x/X switches
8911 Document new -gnatyA style switch
8912 -gnatq warnings are on by default
8913
89142007-04-06 Ed Falis <falis@adacore.com>
8915
8916 * s-carun8.adb, s-carsi8.adb (Compare_Array_?8): modify so that last
8917 full word is no longer compared twice.
8918
89192007-04-06 Ed Schonberg <schonberg@adacore.com>
8920
8921 * sem_ch10.adb (Install_Limited_Context_Clauses.
8922 Expand_Limited_With_Clause): Use a new copy of selector name in the
8923 call to Make_With_Clause. This fixes the tree structure for ASIS
8924 purposes. Nothing is changed in the compiler behaviour.
8925 (Process_Body_Clauses): Handle properly use clauses whose prefix is
8926 a package renaming.
8927 (Install_Limited_With_Clauses): Do not install non-limited view when it
8928 is still incomplete.
8929
89302007-04-06 Ed Schonberg <schonberg@adacore.com>
8931 Gary Dismukes <dismukes@adacore.com>
8932
8933 * sem_ch12.adb (Check_Generic_Actuals): Use first subtype of actual
8934 when capturing size information, instead of base type, which for a
8935 formal array type will be the unconstrained type.
8936 (Analyze_Formal_Object_Declaration): Add check for illegal default
8937 expressions for a formal in object of a limited type.
8938 (Instantiate_Object): Ditto.
8939 (Check_Formal_Package_Instance): Skip entities that are formal objects,
8940 because they were defaulted in the formal package and no check applies
8941 to them.
8942 (Check_Formal_Package_Instance): Extend conformance check to other
8943 discrete types beyond Integer.
8944 (Process_Default): Copy directly the unmatched formal. A generic copy
8945 has already been performed in Analyze_Formal_Package.
8946 (Analyze_Associations): If a formal subprogram has no match, check for
8947 partial parametrization before looking for a default, to prevent
8948 spurious errors.
8949 (Analyze_Package_Instantiation, Analyze_Subprogram_Instantiation): Do
8950 not set the instantiation environment before analyzing the actuals.
8951 Fixes regression on 8515-003 with implementation of AI-133.
8952 Set_Instance_Env checks whether the generic unit is a predefined
8953 unit, in which case the instance must be analyzed with the latest Ada
8954 mode. This setting must take place after analysis of the actuals,
8955 because the actuals must be analyzed and frozen in the Ada mode extant
8956 outside of the current instantiation.
8957 (Save_Env, Restore_Env): Preserve and restore the configuration
8958 parameters so that predefined units can be compiled in the proper Ada
8959 mode.
8960 (Analyze_Formal_Object_Declaration,Analyze_Formal_Subprogram,
8961 Instantiate_Type): Split Is_Abstract flag into Is_Abstract_Subprogram
8962 and Is_Abstract_Type.
8963 (Analyze_Formal_Package): For better error recovery, Add exception
8964 handler to catch Instantion_Error, which can be raised in
8965 Analyze_Associations
8966
89672007-04-06 Ed Schonberg <schonberg@adacore.com>
8968 Bob Duff <duff@adacore.com>
8969 Gary Dismukes <dismukes@adacore.com>
8970
8971 * sem_ch4.adb (Try_Primitive_Operation): The call is legal if the
8972 prefix type is a discriminated subtype of the type of the formal.
8973 (Analyze_Allocator): Collect all coextensions regardless of the context.
8974 Whether they can be allocated statically is determined in exp_ch4.
8975 (Analyze_Selected_Component): If the prefix is a limited view and the
8976 non-limited view is available, use the non-limited one.
8977 (Operator_Check): For "X'Access = Y'Access" (which is ambiguous, and
8978 therefore illegal), suggest a qualified expression rather than a type
8979 conversion, because a type conversion would be illegal in this context.
8980 (Anayze_Allocator): Trace recursively all nested allocators so that all
8981 coextensions are on the corresponding list for the root. Do no mark
8982 coextensions if the root allocator is within a declaration for a stack-
8983 allocated object, because the access discriminants will be allocated on
8984 the stack as well.
8985 (Analyze_Call): Remove restriction on calls to limited functions for the
8986 cases of generic actuals for formal objects, defaults for formal objects
8987 and defaults for record components.
8988 (Analyze_Allocator): Before analysis, chain coextensions on the proper
8989 element list. Their expansion is delayed until the enclosing allocator
8990 is processed and its finalization list constructed.
8991 (Try_Primitive_Operation): If the prefix is a concurrent type, looks
8992 for an operation with the given name among the primitive operations of
8993 the corresponding record type.
8994 (Analyze_Selected_Component): If the prefix is a task type that
8995 implements an interface, and there is no entry with the given name,
8996 check whether there is another primitive operation (e.g. a function)
8997 with that name.
8998 (Try_Object_Operation, Analyze_One_Call, Try_Indexed_Call): Handle
8999 properly the indexing of a function call written in prefix form, where
9000 the function returns an array type, and all parameters of the function
9001 except the first have defaults.
9002 (Analyze_Equality_Op): If this is a call to an implicit inequality, keep
9003 the original operands, rather than relocating them, for efficiency and
9004 to work properly when an operand is overloaded.
9005 (Analyze_Allocator,Operator_Check,Remove_Abstract_Operations): Split
9006 Is_Abstract flag into Is_Abstract_Subprogram and Is_Abstract_Type.
9007 (Analyze_Selected_Component): If the prefix is a private extension, only
9008 scan the visible components, not those of the full view.
9009 (Try_Primitive_Operation): If the operation is a procedure, collect all
9010 possible interpretations, as for a function, because in the presence of
9011 classwide parameters several primitive operations of the type can match
9012 the given arguments.
9013
90142007-04-06 Ed Schonberg <schonberg@adacore.com>
9015 Robert Dewar <dewar@adacore.com>
9016
9017 * sem_ch5.adb (Analyze_Assignment): Reject a right-hand side that is a
9018 tag-indeterminate call to an abstract function, when the left-hand side
9019 is not classwide.
9020 (Analyze_Loop_Statement): Improve detection of infinite loops
9021
90222007-04-06 Ed Schonberg <schonberg@adacore.com>
9023 Thomas Quinot <quinot@adacore.com>
9024
9025 * sem_ch7.ads, sem_ch7.adb (Inspect_Deferred_Constant_Completion): Move
9026 out of Analyze_Package_Declaration, because processing must be applied
9027 to package bodies as well, for deferred constants completed by pragmas.
9028 (Analyze_Package_Declaration): When the package declaration being
9029 analyzed does not require an explicit body, call Check_Completion.
9030 (May_Need_Implicit_Body): An implicit body is required when a package
9031 spec contains the declaration of a remote access-to-classwide type.
9032 (Analyze_Package_Body): If the package contains RACWs, append the
9033 pending subprogram bodies generated by exp_dist at the end of the body.
9034 (New_Private_Type,Unit_Requires_Body): Split Is_Abstract flag into
9035 Is_Abstract_Subprogram and Is_Abstract_Type.
9036 (Preserve_Full_Attributes): The full entity list is not an attribute
9037 that must be preserved from full to partial view.
9038
9039 * sem_dist.adb (Add_RAS_Dereference_TSS):
9040 Change primitive name to _Call so it cannot clash with any legal
9041 identifier, and be special-cased in Check_Completion.
9042 Mark the full view of the designated type for the RACW associated with
9043 a RAS as Comes_From_Source to get proper view switching when installing
9044 private declarations.
9045 Provite a placeholder nested package body along with the nested spec
9046 to have a place for Append_RACW_Bodies to generate the calling stubs
9047 and stream attributes.
9048
90492007-04-06 Ed Schonberg <schonberg@adacore.com>
9050 Robert Dewar <dewar@adacore.com>
9051
9052 * sem_ch8.adb (Has_Components): If the argument is an incomplete type
9053 that is a limited view, check the non-limited view if available.
9054 (Undefined): Refine error message for missing with of Text_IO
9055 (Find_Expanded_Name): Use Is_Known_Unit for more accurate error message
9056 to distinguish real missing with cases.
9057 Fix format of all missing with messages
9058 (Analyze_Subprogram_Renaming): Emit proper error message on illegal
9059 renaming as body when renamed entity is abstract.
9060
90612007-04-06 Ed Schonberg <schonberg@adacore.com>
9062 Javier Miranda <miranda@adacore.com>
9063
9064 * sem_type.ads, sem_type.adb (Has_Abstract_Interpretation): Make
9065 predicate recursive, to handle complex expressions on literals whose
9066 spurious ambiguity comes from the abstract interpretation of some
9067 subexpression.
9068 (Interface_Present_In_Ancestor): Add support to concurrent record
9069 types.
9070 (Add_One_Interp,Disambiguate): Split Is_Abstract flag into
9071 Is_Abstract_Subprogram and Is_Abstract_Type.
9072
90732007-04-06 Ed Schonberg <schonberg@adacore.com>
9074 Javier Miranda <miranda@adacore.com>
9075
9076 * sem_util.ads, sem_util.adb (Object_Access_Level): If the object is a
9077 dereference of a local object R created as a reference to another
9078 object O, use the access level of O.
9079 (Matches_Prefixed_View_Profile): Use common predicate Conforming_Types,
9080 rather than local Same_Formal_Type, to check whether protected operation
9081 overrides an inherited one.
9082 (Same_Formal_Type): New predicate, used when matching signatures of
9083 overriding synchronized operations, to handle the case when a formal
9084 has a type that is a generic actual.
9085 (Is_Aliased_View): Replace check on E_Task_Type and E_Protected_Type by
9086 predicate Is_Concurrent_Type. This ensures supportin case of subtypes.
9087 (Needs_One_Actual): New predicate, for Ada 2005 use, to resolve
9088 syntactic ambiguities involving indexing of function calls that return
9089 arrays.
9090 (Abstract_Interface_List): New subprogram that returns the list of
9091 abstract interfaces associated with a concurrent type or a
9092 concurrent record type.
9093 (Interface_Present_In_Parent): New subprogram used to check if a
9094 given type or some of its parents implement a given interface.
9095 (Collect_Abstract_Interfaces): Add support for concurrent types
9096 with interface types.
9097 (Has_Abstract_Interfaces): Add support for concurrent types with
9098 interface types.
9099 (Is_Parent): New subprogram that determines whether E1 is a parent
9100 of E2. For a concurrent type its parent is the first element of its
9101 list of interface types; for other types this function provides the
9102 same result than Is_Ancestor.
9103 (Enclosing_Subprogram): Add test for N_Extended_Return_Statement.
9104 (Collect_Synchronized_Interfaces): Removed because the subprogram
9105 Collect_Abstract_Interfaces provides this functionality.
9106 (Collect_Abstract_Interfaces): Minor update to give support to
9107 concurrent types and thus avoid undesired code duplication.
9108 (Get_Subprogram_Entity): Handle entry calls.
9109 (May_Be_Lvalue): Include actuals that appear as in-out parameters in
9110 entry calls.
9111 (Enter_Name): Do not give -gnatwh hiding warning for record component
9112 entities, they never result in hiding.
9113
91142007-04-06 Ed Schonberg <schonberg@adacore.com>
9115 Robert Dewar <dewar@adacore.com>
9116
9117 * sinfo.ads, sinfo.adb (Coextensions): New element list for allocators,
9118 to chain nested components that are allocators for access discriminants
9119 of the enclosing object.
9120 Add N_Push and N_Pop nodes
9121 New field Exception_Label added
9122 (Local_Raise_Statements): New field in N_Exception_Handler_Node
9123 (Local_Raise_Not_OK): New flag in N_Exception_Handler_Node
9124 (Is_Coextension): New flag for allocators, to mark allocators that
9125 correspond to access discriminants of dynamically allocated objects.
9126 (N_Block_Statement): Document the fact that the corresponding entity
9127 can be an E_Return_Statement.
9128 (Is_Coextension): New flag for allocators.
9129 Remove all code for DSP option
9130
9131 * sprint.ads, sprint.adb: Display basic information for class_wide
9132 subtypes. Add handling of N_Push and N_Pop nodes
9133
91342007-04-06 Arnaud Charlet <charlet@adacore.com>
9135
9136 * s-tpobop.adb (Exceptional_Complete_Entry_Body): Undefer abortion
9137 before propagating exception.
9138
91392007-04-06 Olivier Hainque <hainque@adacore.com>
9140
9141 * tracebak.c (PC_ADJUST - ia64): -4 instead of -16, expected to yield
9142 an address always within the call instruction from a return address.
9143
91442007-04-06 Olivier Hainque <hainque@adacore.com>
9145 Eric Botcazou <botcazou@adacore.com>
9146
9147 * trans.c (call_to_gnu) <TYPE_RETURNS_BY_TARGET_PTR_P>: Return an
9148 expression with a COMPOUND_EXPR including the call instead of emitting
9149 the call directly here.
9150 (gnat_to_gnu) <N_Slice>: Do not return a non-constant low bound if the
9151 high bound is constant and the slice is empty. Tidy.
9152 (tree_transform, case N_Op_Not): Handle properly the case where the
9153 operation applies to a private type whose full view is a modular type.
9154 (Case_Statement_To_gnu): If an alternative is an E_Constant with an
9155 Address_Clause, use the associated Expression as the GNAT tree
9156 representing the choice value to ensure the corresponding GCC tree is
9157 of the proper kind.
9158 (maybe_stabilize_reference): Stabilize COMPOUND_EXPRs as a whole
9159 instead of just the operands, as the base GCC stabilize_reference does.
9160 <CALL_EXPR>: New case. Directly stabilize the call if an lvalue is not
9161 requested; otherwise fail.
9162 (addressable_p) <COMPONENT_REF>: Do not test DECL_NONADDRESSABLE_P.
9163
91642007-04-06 Thomas Quinot <quinot@adacore.com>
9165
9166 * uintp.ads, uintp.adb (UI_Div_Rem): New subprogram, extending previous
9167 implementation of UI_Div.
9168 (UI_Div): Reimplement as a call to UI_Div_Rem.
9169 (UI_Rem): Take advantage of the fact that UI_Div_Rem provides the
9170 remainder, avoiding the cost of a multiplication and a subtraction.
9171 (UI_Modular_Inverse): Take advantage of the fact that UI_Div_Rem
9172 provides both quotient and remainder in a single computation.
9173 (UI_Modular_Exponentiation, UI_Modular_Inverse): New modular arithmetic
9174 functions for uint.
9175 (UI_Modular_Inverse): Add a note that the behaviour of this subprogram
9176 is undefined if the given n is not inversible.
9177
91782007-04-06 Olivier Hainque <hainque@adacore.com>
9179
9180 * utils2.c (known_alignment): Handle COMPOUND_EXPR, COND_EXPR and
9181 BIT_AND_EXPR. Handle also VIEW_CONVERT_EXPR, as the other conversion
9182 opcodes.
9183
91842007-04-06 Eric Botcazou <botcazou@adacore.com>
9185 Olivier Hainque <hainque@adacore.com>
9186
9187 * utils.c (update_pointer_to): Make a copy of the couple of FIELD_DECLs
9188 when updating the contents of the old pointer to an unconstrained array.
9189 (end_subprog_body): Set error_gnat_node to Empty.
9190 (write_record_type_debug_info): Do not be unduly sparing with our bytes.
9191 (unchecked_convert): For subtype to base type conversions, require that
9192 the source be a subtype if it is an integer type.
9193 (builtin_decls): New global, vector of available builtin functions.
9194 (gnat_pushdecl): Add global builtin function declaration nodes to the
9195 builtin_decls list.
9196 (gnat_install_builtins): Adjust comments.
9197 (builtin_function): Set DECL_BUILTIN_CLASS and DECL_FUNCTION_CODE before
9198 calling gnat_pushdecl, so that it knows when it handed a builtin
9199 function declaration node.
9200 (builtin_decl_for): Search the builtin_decls list.
9201
92022007-04-06 Eric Botcazou <botcazou@adacore.com>
9203
9204 * s-stchop-vxworks.adb:
9205 (Stack_Check): Raise Storage_Error if the argument has wrapped around.
9206
92072007-04-06 Robert Dewar <dewar@adacore.com>
9208 Arnaud Charlet <charlet@adacore.com>
9209
9210 * a-diroro.ads: Inserted the pragma Unimplemented_Unit
9211
9212 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Ada_95 at start
9213 of files
9214 Add mention of -Sev (set initialize_scalars option from environment
9215 variable at run time) in gnatbind usage message.
9216
9217 * elists.ads, elists.adb: (Append_Unique_Elmt): New procedure
9218
9219 * fname-uf.ads: Minor comment fix
9220
9221 * osint.ads: Change pragma Elaborate to Elaborate_All
9222
9223 * par-load.adb: Add documentation.
9224
9225 * sem_cat.ads, sem_cat.adb: Minor code reorganization
9226
9227 * s-parint.ads (RCI_Locator) : Add 'Version' generic formal
9228
9229 * s-secsta.ads: Extra comments
9230
9231 * s-soflin.ads: Minor comment fixes
9232
9233 * s-stratt.ads (Block_Stream_Ops_OK): Removed.
9234
9235 * s-wchcon.ads: Minor comment addition
9236
9237 * treepr.adb: Minor change in message
9238 (Print_Name,Print_Node): Make these debug printouts more robust: print
9239 "no such..." instead of crashing on bad input.
9240
47ecd38d
RAE
92412007-03-30 Rafael Avila de Espindola <espindola@google.com>
9242
9243 * trans.c (Attribute_to_gnu): Use get_signed_or_unsigned_type
9244 instead of gnat_signed_or_unsigned_type.
9245 * utils.c (gnat_signed_or_unsigned_type): Remove.
9246 * misc.c (LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): Remove
9247 * gigi.h (gnat_signed_or_unsigned_type): Remove
9248
9645c3c5
RS
92492007-03-09 Roger Sayle <roger@eyesopen.com>
9250
9251 * cuintp.c (UI_To_gnu): Use fold_buildN calls instead of calling
9252 fold with the result of buildN.
9253 * decl.c (gnat_to_gnu_entity): Likewise.
9254 * trans.c (Attribute_to_gnu, gnat_to_gnu, emit_check): Likewise.
9255 * utils.c (finish_record_type, merge_sizes, max_size, convert):
9256 Likewise.
9257 * utils2.c (gnat_truthvalue_conversion, compare_arrays,
9258 nonbinary_modular_operation, build_binary_op, build_unary_op,
9259 build_cond_expr): Likewise.
9260
9261 * utils.c (convert): Use fold_build1 when casting values to void.
9262 * utils2.c (gnat_truthvalue_conversion): Use build_int_cst and
9263 fold_convert instead of convert when appropriate.
9264
c279aa90
BM
92652007-03-01 Brooks Moses <brooks.moses@codesourcery.com>
9266
9267 * Make-lang.in: Add install-pdf target as copied from
9268 automake v1.10 rules.
9269
c2615f30
AS
92702007-02-28 Andreas Schwab <schwab@suse.de>
9271
9272 * Make-lang.in (doc/gnat_ugn_unw.texi): Depend on
9273 $(gcc_docdir)/include/gcc-common.texi and gcc-vers.texi.
9274 (doc/gnat-style.info): Likewise.
9275
7771bb62
BM
92762007-02-26 Brooks Moses <brooks.moses@codesourcery.com>
9277
9278 * gnat-style.texi: Standardize title page.
9279 * gnat_rm.texi: Likewise.
9280 * gnat_ugn.texi: Likewise.
9281
ae19c041
MM
92822007-02-25 Mark Mitchell <mark@codesourcery.com>
9283
9284 * decl.c (annotate_value): Adjust for refactoring of tree_map
9285 hierarchy.
9286
fc8600f9
MM
92872007-02-24 Mark Mitchell <mark@codesourcery.com>
9288
9289 * decl.c (annotate_value): Adjust for refactoring of tree_map
9290 hierarchy.
9291
c0bca7e1
EB
92922007-02-21 Ed Schonberg <schonberg@adacore.com>
9293
9294 PR ada/18819
9295 * sem_ch3.adb (Create_Constrained_Components): for a subtype of an
9296 untagged derived type, add hidden components to keep discriminant
9297 layout consistent, when a given discriminant of the derived type
9298 constraints several discriminants of the parent type.
9299
9f3432b8 93002007-02-16 Eric Botcazou <ebotcazou@adacore.com>
6f7f72f9 9301 Sandra Loosemore <sandra@codesourcery.com>
9f3432b8
EB
9302
9303 * trans.c (call_to_gnu): Use build_call_list instead of build3 to
9304 build the call expression.
9305 (gnat_stabilize_reference_1): Handle tcc_vl_exp.
9306 * utils.c (max_size) <tcc_exceptional>: Delete.
9307 <tcc_vl_exp>: New case.
9308 <tcc_expression>: Delete CALL_EXPR subcase.
9309 (build_global_cdtor): Use build_call_nary instead of build3.
9310 * utils2.c (build_call_1_expr): Likewise.
9311 (build_call_2_expr): Likewise.
9312 (build_call_0_expr): Likewise.
9313 (build_call_alloc_dealloc): Likewise.
9314
8438091f
AK
93152007-02-07 Andreas Krebbel <krebbel1@de.ibm.com>
9316
9317 * raise-gcc.c (get_region_description_for, get_call_site_action_for,
ed41063a 9318 get_action_description_for): Replace _Unwind_Word with _uleb128_t
8438091f
AK
9319 and _Unwind_SWord with _sleb128_t.
9320
0802f6a2
PB
93212007-02-06 Paolo Bonzini <bonzini@gnu.org>
9322
9323 * Make-lang.in (ada/decl.o): Add gt-ada-decl.h dependency.
9324 * decl.c: Include gt-ada-decl.h.
9325 (annotate_value_cache): New.
9326 (annotate_value): Use it instead of TREE_COMPLEXITY.
9327
326f9a75
KH
93282007-02-03 Kazu Hirata <kazu@codesourcery.com>
9329
9330 * misc.c, utils2.c: Fix comment typos.
9331
cd259a98
RS
93322007-01-24 Roger Sayle <roger@eyesopen.com>
9333
9334 * decl.c (gnat_to_gnu_entity): Use TREE_OVERFLOW instead of
9335 TREE_CONSTANT_OVERFLOW.
9336 (allocatable_size_p, annotate_value): Likewise.
9337 * trans.c (gnat_to_gnu): Likewise.
9338 * utils.c (unchecked_convert): Likewise.
9339 * utils2.c (build_simple_component_ref): Likewise.
9340
5305be7e
RG
93412007-01-23 Richard Guenther <rguenther@suse.de>
9342
9343 PR bootstrap/30541
9344 * Make-lang.in: Replace invocations of gnatmake with $(GNATMAKE).
9345 (gnatboot2): Pass staged GNATMAKE instead of STAGE_PREFIX.
9346 (gnatboot3): Likewise.
9347 (GNATBIND): Do not define.
9348 * Makefile.in (GNATBIND): Do not define.
9349
2ac7cbb5
RG
93502007-01-08 Richard Guenther <rguenther@suse.de>
9351
9352 * cuintp.c (build_cst_from_int): Use built_int_cst_type.
9353 * trans.c (gnat_to_gnu): Likewise.
9354
2989d30c
GK
93552006-12-07 Geoffrey Keating <geoffk@apple.com>
9356
9357 * Makefile.in: Replace CROSS_COMPILE with CROSS_DIRECTORY_STRUCTURE.
9358 * adaint.c: Likewise.
9359
5848e34a
EB
93602006-12-05 Aldy Hernandez <aldyh@redhat.com>
9361
6f7f72f9 9362 Merge from gimple-tuples-branch:
5848e34a 9363 2006-11-02 Aldy Hernandez <aldyh@redhat.com>
6f7f72f9 9364
5848e34a
EB
9365 * ada-tree.h (lang_tree_node): Handle gimple tuples.
9366 * trans.c (gnat_gimplify_expr): Replace MODIFY_EXPR with
9367 GIMPLE_MODIFY_STMT.
9368
d3c56bc8
KH
93692006-12-02 Kazu Hirata <kazu@codesourcery.com>
9370
9371 * Makefile.in, mingw32.h, trans.c: Fix comment typos.
9372 * gnat_rm.texi, gnat_ugn.texi: Follow spelling conventions.
9373 Fix typos.
9374
9fa25ead
EB
93752006-11-17 Eric Botcazou <ebotcazou@adacore.com>
9376
9377 PR ada/27936
9378 * trans.c (add_decl_expr): Do not dynamically elaborate padded objects
9379 if the initializer takes into account the padding.
9380
f9f770a8
RG
93812006-11-11 Richard Guenther <rguenther@suse.de>
9382
9383 * trans.c (maybe_stabilize_reference): Remove handling of
9384 FIX_CEIL_EXPR, FIX_FLOOR_EXPR and FIX_ROUND_EXPR.
9385
75c0ed05
AC
93862006-11-05 Arnaud Charlet <charlet@adacore.com>
9387
ed41063a 9388 PR ada/29707
75c0ed05
AC
9389 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads
9390 (To_Target_Priority): New function.
75c0ed05 9391
70198b9f
AC
93922006-10-31 Robert Dewar <dewar@adacore.com>
9393
9394 * a-taster.adb, s-traent-vms.adb, a-elchha.ads, a-elchha.adb,
9395 a-exctra.adb, ali-util.adb, exp_disp.ads, s-stalib.ads, s-traent.adb,
9396 s-addope.ads, s-addope.adb, a-rbtgso.adb, a-crbltr.ads, a-coprnu.adb,
9397 a-cgcaso.adb, a-cgarso.adb, a-cgaaso.adb, a-coormu.adb, a-ciormu.adb,
9398 a-rbtgso.ads, a-stunha.adb, a-stunha.adb, a-ciorma.adb, a-coorma.adb,
9399 a-secain.adb, a-slcain.adb, a-shcain.adb, a-stwiha.adb, a-stwiha.adb,
9400 a-strhas.adb, a-strhas.adb, a-stzhas.adb, a-stzhas.adb, a-szuzha.adb,
9401 a-chacon.adb, a-chacon.adb, a-chacon.ads, a-stboha.adb, a-swbwha.adb,
9402 a-szbzha.adb: Minor reformatting. Fix header.
9403
9404 * a-numaux-x86.adb: Add parentheses for use of unary minus
9405 * a-ngcefu.adb: Supply missing parentheses for unary minus
9406 * a-ngcoty.adb: Add parens for use of unary minus
9407 * a-ngelfu.adb: Add missing parens for unary minus
9408 * a-tifiio.adb: Add parentheses for uses of unary minus
9409
94102006-10-31 Robert Dewar <dewar@adacore.com>
9411 Bob Duff <duff@adacore.com>
9412 Ed Schonberg <schonberg@adacore.com>
9413
6f7f72f9 9414 * sem_res.adb (Resolve_Unary_Op): Add warning for use of unary minus
70198b9f
AC
9415 with multiplying operator.
9416 (Expected_Type_Is_Any_Real): New function to determine from the Parent
9417 pointer whether the context expects "any real type".
9418 (Resolve_Arithmetic_Op): Do not give an error on calls to the
9419 universal_fixed "*" and "/" operators when they are used in a context
9420 that expects any real type. Also set the type of the node to
9421 Universal_Real in this case, because downstream processing requires it
9422 (mainly static expression evaluation).
9423 Reword some continuation messages
9424 Add some \\ sequences to continuation messages
9425 (Resolve_Call): Refine infinite recursion case. The test has been
9426 sharpened to eliminate some false positives.
9427 Check for Current_Task usage now includes entry barrier, and is now a
9428 warning, not an error.
9429 (Resolve): If the call is ambiguous, indicate whether an interpretation
9430 is an inherited operation.
9431 (Check_Aggr): When resolving aggregates, skip associations with a box,
9432 which are priori correct, and will be replaced by an actual default
9433 expression in the course of expansion.
9434 (Resolve_Type_Conversion): Add missing support for conversion from
9435 a class-wide interface to a tagged type. Minor code cleanup.
9436 (Valid_Tagged_Converion): Add support for abstact interface type
9437 conversions.
9438 (Resolve_Selected_Component): Call Generate_Reference here rather than
9439 during analysis, and use May_Be_Lvalue to distinguish read/write.
9440 (Valid_Array_Conversion): New procedure, abstracted from
9441 Valid_Conversion, to incorporate accessibility checks for arrays of
9442 anonymous access types.
9443 (Valid_Conversion): For a conversion to a numeric type occurring in an
9444 instance or inlined body, no need to check that the operand type is
9445 numeric, since this has been checked during analysis of the template.
9446 Remove legacy test for scope name Unchecked_Conversion.
9447
9448 * sem_res.ads: Minor reformatting
9449
9450 * a-except.adb, a-except-2005.adb: Turn off subprogram ordering
9451 (PE_Current_Task_In_Entry_Body): New exception code
9452 (SE_Restriction_Violation): Removed, not used
9453
9454 * a-except.ads: Update comments.
9455
9456 * types.h, types.ads: Add definition for Validity_Check
9457 (PE_Current_Task_In_Entry_Body): New exception code
9458 (SE_Restriction_Violation): Removed, not used
9459
94602006-10-31 Thomas Quinot <quinot@adacore.com>
9461
9462 * g-socthi-vxworks.adb (C_Gethostbyname): Fix wrong test for returned
9463 error status.
9464
94652006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
9466 Jose Ruiz <ruiz@adacore.com>
9467
9468 * a-calend-vms.adb (Leap_Sec_Ops): Temp body for package in private
9469 part of Ada.Calendar: all subprogram raise Unimplemented.
9470 (Split_W_Offset): Temp function body, raising Unimplemented
9471
9472 * a-calend.ads, a-calend-vms.ads:
9473 Add imported variable Invalid_TZ_Offset used to designate targets unable
9474 to support time zones.
9475 (Unimplemented): Temporary function raised by the body of new
9476 subprograms below.
9477 (Leap_Sec_Ops): New package in the private part of Ada.Calendar. This
9478 unit provides handling of leap seconds and is used by the new Ada 2005
9479 packages Ada.Calendar.Arithmetic and Ada.Calendar.Formatting.
9480 (Split_W_Offset): Identical spec to that of Ada.Calendar.Split. This
9481 version returns an extra value which is the offset to UTC.
9482
9483 * a-calend.adb (Split_W_Offset): Add call to localtime_tzoff.
9484 (Leap_Sec_Ops): New body for package in private part of Ada.Calendar.
9485 (Split_W_Offset): New function body.
9486 (Time_Of): When a date is close to UNIX epoch, compute the time for
9487 that date plus one day (that amount is later substracted after
9488 executing mktime) so there are no problems with time zone adjustments.
9489
9490 * a-calend-mingw.adb: Remove Windows specific version no longer needed.
9491
9492 * a-calari.ads, a-calari.adb, a-calfor.ads, a-calfor.adb,
9493 a-catizo.ads, a-catizo.adb: New files.
9494
6f7f72f9 9495 * impunit.adb: Add new Ada 2005 entries
70198b9f
AC
9496
9497 * sysdep.c: Add external variable __gnat_invalid_tz_offset.
9498 Rename all occurences of "__gnat_localtime_r" to
9499 "__gnat_localtime_tzoff".
9500 (__gnat_localtime_tzoff for Windows): Add logic to retrieve the time
9501 zone data and calculate the GMT offset.
9502 (__gnat_localtime_tzoff for Darwin, Free BSD, Linux, Lynx and Tru64):
9503 Use the field "tm_gmtoff" to extract the GMT offset.
9504 (__gnat_localtime_tzoff for AIX, HPUX, SGI Irix and Sun Solaris): Use
9505 the external variable "timezone" to calculate the GMT offset.
9506
95072006-10-31 Arnaud Charlet <charlet@adacore.com>
9508 Jose Ruiz <ruiz@adacore.com>
9509
9510 * s-osinte-posix.adb, s-osinte-linux.ads, s-osinte-freebsd.adb,
9511 s-osinte-freebsd.ads, s-osinte-solaris-posix.ads, s-osinte-hpux.ads,
9512 s-osinte-darwin.adb, s-osinte-darwin.ads, s-osinte-lynxos-3.ads,
9513 s-osinte-lynxos-3.adb (To_Target_Priority): New function maps from
9514 System.Any_Priority to a POSIX priority on the target.
9515
9516 * system-linux-ia64.ads:
9517 Extend range of Priority types on Linux to use the whole range made
9518 available by the system.
9519
9520 * s-osinte-aix.adb, s-osinte-aix.ads (To_Target_Priority): New
9521 function maps from System.Any_Priority to a POSIX priority on the
9522 target.
9523 (PTHREAD_PRIO_PROTECT): Set real value.
9524 (PTHREAD_PRIO_INHERIT): Now a function.
9525 (SIGCPUFAIL): New signal.
9526 (Reserved): Add SIGALRM1, SIGWAITING, SIGCPUFAIL, since these signals
9527 are documented as reserved by the OS.
9528
9529 * system-aix.ads: Use the full range of priorities provided by the
9530 system on AIX.
9531
9532 * s-taprop-posix.adb: Call new function To_Target_Priority.
9533 (Set_Priority): Take into account Task_Dispatching_Policy and
9534 Priority_Specific_Dispatching pragmas when determining if Round Robin
9535 must be used for scheduling the task.
9536
9537 * system-linux-x86_64.ads, system-linux-x86.ads,
9538 system-linux-ppc.ads: Extend range of Priority types on Linux to use
9539 the whole range made available by the system.
9540
9541 * s-taprop-vms.adb, s-taprop-mingw.adb, s-taprop-irix.adb,
9542 s-taprop-tru64.adb, s-taprop-linux.adb, s-taprop-hpux-dce.adb,
9543 s-taprop-lynxos.adb (Finalize_TCB): invalidate the stack-check cache
9544 when deallocating the TCB in order to avoid potential references to
9545 deallocated data.
9546 (Set_Priority): Take into account Task_Dispatching_Policy and
9547 Priority_Specific_Dispatching pragmas when determining if Round Robin
9548 or FIFO within priorities must be used for scheduling the task.
9549
9550 * s-taprop-vxworks.adb (Enter_Task): Store the user-level task id in
9551 the Thread field (to be used internally by the run-time system) and the
9552 kernel-level task id in the LWP field (to be used by the debugger).
9553 (Create_Task): Reorganize to unify the calls to taskSpawn into a single
9554 instance, and propagate the current task options to the spawned task.
9555 (Set_Priority): Take into account Priority_Specific_Dispatching pragmas.
9556 (Initialize): Set Round Robin dispatching when the corresponding pragma
9557 is in effect.
9558
95592006-10-31 Robert Dewar <dewar@adacore.com>
9560
9561 * system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
9562 system-linux-hppa.ads, system-hpux-ia64.ads,
9563 system-lynxos-ppc.ads, system-lynxos-x86.ads, system-tru64.ads,
9564 system-vxworks-sparcv9.ads, system-solaris-x86.ads,
9565 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
9566 system-vxworks-m68k.ads, system-vxworks-mips.ads, system-interix.ads,
9567 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
9568 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
9569 system-vxworks-alpha.ads, system.ads: Add pragma Warnings(Off,
9570 Default_Bit_Order) to kill constant condition warnings for references
9571 to this switch.
9572
95732006-10-31 Vincent Celier <celier@adacore.com>
9574 Eric Botcazou <ebotcazou@adacore.com>
9575
9576 * mlib-tgt-lynxos.adb, mlib-tgt-mingw.adb, mlib-tgt-tru64.adb,
9577 mlib-tgt-aix.adb, mlib-tgt-irix.adb, mlib-tgt-hpux.adb,
9578 mlib-tgt-linux.adb, mlib-tgt-solaris.adb: Use Append_To, instead of
9579 Ext_To, when building the library file name
9580
9581 * mlib-tgt-vxworks.adb: ditto.
9582 (Get_Target_Suffix): Add support for x86 targets.
9583
9584 * mlib-fil.ads, mlib-fil.adb: (Append_To): New function
9585
9586 * mlib-tgt-darwin.adb:
9587 Use Append_To, instead of Ext_To, when building the library file name
9588 (Flat_Namespace): New global variable.
9589 (No_Shared_Libgcc_Switch): Rename to No_Shared_Libgcc_Options.
9590 (Shared_Libgcc_Switch): Rename to With_Shared_Libgcc_Options.
9591 (Link_Shared_Libgcc): Delete.
9592 (Build_Dynamic_Library): Adjust for above changes.
9593 Use Opt package.
9594 (Build_Dynamic_Library): Pass -shared-libgcc if GCC 4 or later.
9595
95962006-10-31 Eric Botcazou <ebotcazou@adacore.com>
9597
9598 * s-taprop-solaris.adb: (Time_Slice_Val): Change type to Integer.
9599 (Initialize): Add type conversions required by above change.
9600
96012006-10-31 Jose Ruiz <ruiz@adacore.com>
9602
9603 * s-osinte-vxworks.ads, s-osinte-vxworks.adb:
9604 (getpid): New body for this function that uses the underlying taskIdSelf
9605 function for VxWorks 5 and VxWorks 6 in kernel mode.
9606 (unsigned_int): New type, modular to allow logical bit operations.
9607 (taskOptionsGet): New imported function.
9608
9609 * s-taspri-vxworks.ads (Private_Data): Change the type for the LWP
9610 field to be compliant with the type used by the corresponding operating
9611 system primitive.
9612
96132006-10-31 Pascal Obry <obry@adacore.com>
9614 Eric Botcazou <ebotcazou@adacore.com>
9615 Vincent Celier <celier@adacore.com>
9616
9617 * adaint.c (__gnat_get_libraries_from_registry): Call explicitly the
9618 ASCII version of the registry API. This is needed as the GNAT runtime
9619 is now UNICODE by default.
9620 Include version.h.
9621 (get_gcc_version): Do not hardcode the return value.
9622 (__gnat_file_time_name): On Windows properly set the default returned
9623 value to -1 which corresponds to Invalid_Time.
9624 (__gnat_fopen): New routine. A simple wrapper on all plateforms
9625 except on Windows where it does conversion for unicode support.
9626 (__gnat_freopen): Idem.
9627 (__gnat_locate_exec_on_path): If environment variable PATH does not
9628 exist, return a NULL pointer
9629
9630 * adaint.h: (__gnat_fopen): Declare.
9631 (__gnat_freopen): Likewise.
9632
9633 * mingw32.h (_tfreopen): Define this macro here for older MingW
9634 version.
9635 Activate the unicode support on platforms using a MingW runtime
9636 version 3.9 or newer.
9637
9638 * s-crtl.ads (fopen): Is now an import to the wrapper __gnat_freopen.
9639 This is needed for proper unicode support on Windows.
9640 (freopen): Idem.
9641
96422006-10-31 Eric Botcazou <ebotcazou@adacore.com>
9643 Nicolas Setton <setton@adacore.com>
9644 Olivier Hainque <hainque@adacore.com>
9645 Gary Dismukes <dismukes@adacore.com>
9646
9647 * gigi.h: (tree_code_for_record_type): Declare.
9648 (add_global_renaming_pointer): Rename to record_global_renaming_pointer.
9649 (get_global_renaming_pointers): Rename to
9650 invalidate_global_renaming_pointers.
9651 (static_ctors): Delete.
9652 (static_dtors): Likewise.
9653 (gnat_write_global_declarations): Declare.
9654 (create_var_decl): Adjust descriptive comment to indicate that the
9655 subprogram may return a CONST_DECL node.
9656 (create_true_var_decl): Declare new function, similar to
9657 create_var_decl but forcing the creation of a VAR_DECL node.
9658 (get_global_renaming_pointers): Declare.
9659 (add_global_renaming_pointer): Likewise.
9660
9661 * ada-tree.h (DECL_READONLY_ONCE_ELAB): New macro.
9662
9663 * decl.c (gnat_to_gnu_entity) <case E_Function>: Don't copy the type
9664 tree before setting TREE_ADDRESSABLE for by-reference return mechanism
9665 processing.
9666 (gnat_to_gnu_entity): Remove From_With_Type from computation for
9667 imported_p.
9668 <E_Access_Type>: Use the Non_Limited_View as the full view of the
9669 designated type if the pointer comes from a limited_with clause. Make
9670 incomplete designated type if it is in the main unit and has a freeze
9671 node.
9672 <E_Incomplete_Type>: Rework to treat Non_Limited_View, Full_View, and
9673 Underlying_Full_View similarly. Return earlier if the full view already
9674 has an associated tree.
9675 (gnat_to_gnu_entity) <E_Record_Type>: Restore comment.
9676 (gnat_to_gnu_entity) <E_Record_Type>: Do not use a dummy type.
9677 (gnat_to_gnu_entity) <E_Variable>: Set TYPE_REF_CAN_ALIAS_ALL on the
9678 reference type built for objects with an address clause.
9679 Use create_true_var_decl with const_flag set for
9680 DECL_CONST_CORRESPONDING_VARs, ensuring a VAR_DECL is created with
9681 TREE_READONLY set.
9682 (gnat_to_gnu_entity, case E_Enumeration_Type): Set TYPE_NAME
9683 for Character and Wide_Character types. This info is read by the
9684 dwarf-2 writer, and is needed to be able to use the command "ptype
9685 character" in the debugger.
9686 (gnat_to_gnu_entity): When generating a type representing
9687 a Character or Wide_Character type, set the flag TYPE_STRING_FLAG,
9688 so that debug writers can distinguish it from ordinary integers.
9689 (elaborate_expression_1): Test the DECL_READONLY_ONCE_ELAB flag in
9690 addition to TREE_READONLY to assert the constantness of variables for
9691 elaboration purposes.
9692 (gnat_to_gnu_entity, subprogram cases): Change loops on formal
9693 parameters to call new Einfo function First_Formal_With_Extras.
9694 (gnat_to_gnu_entity): In type_annotate mode, replace a discriminant of a
9695 protected type with its corresponding discriminant, to obtain a usable
9696 declaration
9697 (gnat_to_gnu_entity) <E_Access_Protected_Subprogram_Type>: Be prepared
9698 for a multiple elaboration of the "equivalent" type.
9699 (gnat_to_gnu_entity): Adjust for renaming of add_global_renaming_pointer
9700 into record_global_renaming_pointer.
9701 (gnat_to_gnu_entity) <E_Array_Type>: Do not force
9702 TYPE_NONALIASED_COMPONENT to 0 if the element type is an aggregate.
9703 <E_Array_Subtype>: Likewise.
9704 (gnat_to_gnu_entity) <E_Incomplete_Subtype>: Add support for regular
9705 incomplete subtypes and incomplete subtypes of incomplete types visible
9706 through a limited with clause.
9707 (gnat_to_gnu_entity) <E_Array_Subtype>: Take into account the bounds of
9708 the base index type for the maximum size of the array only if they are
9709 constant.
9710 (gnat_to_gnu_entity, renaming object case): Do not wrap up the
9711 expression into a SAVE_EXPR if stabilization failed.
9712
9713 * utils.c (create_subprog_decl): Turn TREE_ADDRESSABLE on the type of
9714 a result decl into DECL_BY_REFERENCE on this decl, now what is expected
9715 by lower level compilation passes.
9716 (gnat_genericize): New function, lowering a function body to GENERIC.
9717 Turn the type of RESULT_DECL into a real reference type if the decl
9718 has been marked DECL_BY_REFERENCE, and adjust references to the latter
9719 accordingly.
9720 (gnat_genericize_r): New function. Tree walking callback for
9721 gnat_genericize.
9722 (convert_from_reference, is_byref_result): New functions. Helpers for
9723 gnat_genericize_r.
9724 (create_type_decl): Call gnat_pushdecl before calling
9725 rest_of_decl_compilation, to make sure that field TYPE_NAME of
9726 type_decl is properly set before calling the debug information writers.
9727 (write_record_type_debug_info): The heuristics which compute the
9728 alignment of a field in a variant record might not be accurate. Add a
9729 safety test to make sure no alignment is set to a smaller value than
9730 the alignment of the field type.
9731 (make_dummy_type): Use the Non_Limited_View as the underlying type if
9732 the type comes from a limited_with clause. Do not loop on the full view.
9733 (GET_GNU_TREE, SET_GNU_TREE, PRESENT_GNU_TREE): New macros.
9734 (dummy_node_table): New global variable, moved from decl.c.
9735 (GET_DUMMY_NODE, SET_DUMMY_NODE, PRESENT_DUMMY_NODE): New macros.
9736 (save_gnu_tree): Use above macros.
9737 (get_gnu_tree): Likewise.
9738 (present_gnu_tree): Likewise.
9739 (init_dummy_type): New function, moved from decl.c. Use above macros.
9740 (make_dummy_type): Likewise.
9741 (tree_code_for_record_type): New function extracted from make_dummy_type
9742 (init_gigi_decls): Set DECL_IS_MALLOC on gnat_malloc.
9743 (static_ctors): Change it to a vector, make static.
9744 (static_dtors): Likewise.
9745 (end_subprog_body): Adjust for above change.
9746 (build_global_cdtor): Moved from trans.c.
9747 (gnat_write_global_declarations): Emit global constructor and
9748 destructor, and call cgraph_optimize before emitting debug info for
9749 global declarations.
9750 (global_decls): New global variable.
9751 (gnat_pushdecl): Store the global declarations in global_decls, for
9752 later use.
9753 (gnat_write_global_declarations): Emit debug information for global
9754 declarations.
9755 (create_var_decl_1): Former create_var_decl, with an extra argument to
9756 state whether the creation of a CONST_DECL is allowed.
9757 (create_var_decl): Behavior unchanged. Now a wrapper around
9758 create_var_decl_1 allowing CONST_DECL creation.
9759 (create_true_var_decl): New function, similar to create_var_decl but
9760 forcing the creation of a VAR_DECL node (CONST_DECL not allowed).
9761 (create_field_decl): Do not always mark the field as addressable
9762 if its type is an aggregate.
9763 (global_renaming_pointers): New static variable.
9764 (add_global_renaming_pointer): New function.
9765 (get_global_renaming_pointers): Likewise.
9766
9767 * misc.c (gnat_dwarf_name): New function.
9768 (LANG_HOOKS_DWARF_NAME): Define to gnat_dwarf_name.
9769 (gnat_post_options): Add comment about structural alias analysis.
9770 (gnat_parse_file): Do not call cgraph_optimize here.
9771 (LANG_HOOKS_WRITE_GLOBALS): Define to gnat_write_global_declarations.
9772
9773 * trans.c (process_freeze_entity): Don't abort if we already have a
9774 non dummy GCC tree for a Concurrent_Record_Type, as it might
9775 legitimately have been elaborated while processing the associated
9776 Concurrent_Type prior to this explicit freeze node.
9777 (Identifier_to_gnu): Do not make a variable referenced in a SJLJ
9778 exception handler volatile if it is of variable size.
9779 (process_type): Remove bypass for types coming from a limited_with
9780 clause.
9781 (call_to_gnu): When processing the copy-out of a N_Type_Conversion GNAT
9782 actual, convert the corresponding gnu_actual to the real destination
9783 type when necessary.
9784 (add_decl_expr): Set the DECL_READONLY_ONCE_ELAB flag on variables
9785 originally TREE_READONLY but whose elaboration cannot be performed
9786 statically.
9787 Part of fix for F504-021.
9788 (tree_transform, subprogram cases): Change loops on formal parameters to
9789 call new Einfo function First_Formal_With_Extras.
9790 (gnat_to_gnu) <N_Op_Shift_Right_Arithmetic>: Ignore constant overflow
9791 stemming from type conversion for the lhs.
9792 (Attribute_to_gnu) <Attr_Alignment>: Also divide the alignment by the
9793 number of bits per unit for components of records.
9794 (gnat_to_gnu) <N_Code_Statement>: Mark operands addressable if needed.
9795 (Handled_Sequence_Of_Statements_to_gnu): Register the cleanup associated
9796 with At_End_Proc after the SJLJ EH cleanup.
9797 (Compilation_Unit_to_gnu): Call elaborate_all_entities only on the main
9798 compilation unit.
9799 (elaborate_all_entities): Do not retest type_annotate_only.
9800 (tree_transform) <N_Abstract_Subprogram_Declaration>: Process the
9801 result type of an abstract subprogram, which may be an itype associated
9802 with an anonymous access result (related to AI-318-02).
9803 (build_global_cdtor): Move to utils.c.
9804 (Case_Statement_to_gnu): Avoid adding the choice of a when statement if
9805 this choice is not a null tree nor an integer constant.
9806 (gigi): Run unshare_save_expr via walk_tree_without_duplicates
9807 on the body of elaboration routines instead of mark_unvisited.
9808 (add_stmt): Do not mark the tree.
9809 (add_decl_expr): Tweak comment.
9810 (mark_unvisited): Delete.
9811 (unshare_save_expr): New static function.
9812 (call_to_gnu): Issue an error when making a temporary around a
9813 procedure call because of non-addressable actual parameter if the
9814 type of the formal is by_reference.
9815 (Compilation_Unit_to_gnu): Invalidate the global renaming pointers
9816 after building the elaboration routine.
9817
98182006-10-31 Bob Duff <duff@adacore.com>
9819
9820 * a-filico.adb (Finalize(List_Controller)): Mark the finalization list
9821 as finalization-started, so we can raise Program_Error on 'new'.
9822
9823 * s-finimp.adb: Raise Program_Error on 'new' if finalization of the
9824 collection has already started.
9825
9826 * s-finimp.ads (Collection_Finalization_Started): Added new special
9827 flag value for indicating that a collection's finalization has started.
9828
9829 * s-tassta.adb (Create_Task): Raise Program_Error on an attempt to
9830 create a task whose master has already waited for dependent tasks.
9831
98322006-10-31 Robert Dewar <dewar@adacore.com>
9833
9834 * lib.adb, lib.ads: (In_Predefined_Unit): New functions
9835
9836 * a-finali.ads, a-ngcoty.ads, a-strbou.ads, a-stream.ads, a-strmap.ads,
9837 a-strunb.ads, a-stwibo.ads, a-stwima.ads, a-stwiun.ads, a-taside.ads,
9838 a-coorse.ads, a-convec.ads, a-coinve.ads, a-cohama.ads, a-ciorse.ads,
9839 a-cihama.ads, a-cihase.ads, a-cohase.ads, a-ciorma.ads, a-coorma.ads,
9840 a-ciormu.ads, a-coormu.ads, a-stzbou.ads, a-stzmap.ads, a-stzunb.ads,
9841 a-except-2005.ads: Add pragma Preelaborable_Warning
9842
98432006-10-31 Robert Dewar <dewar@adacore.com>
9844 Jose Ruiz <ruiz@adacore.com>
9845
9846 * a-dispat.ads, a-dispat.adb, a-diroro.ads, a-diroro.adb: New files.
9847
9848 * ali.adb (Get_Name): Properly handle scanning of wide character names
9849 encoded with brackets notation.
9850 (Known_ALI_Lines): Add S lines to this list.
9851 (Scan_ALI): Acquire S (priority specific dispatching) lines.
9852 New flag Elaborate_All_Desirable in unit table
9853
9854 * ali.ads (Priority_Specific_Dispatching): Add this range of
9855 identifiers to be used for Priority_Specific_Dispatching table entries.
9856 (ALIs_Record): Add First_Specific_Dispatching and
9857 Last_Specific_Dispatching that point to the first and last entries
9858 respectively in the priority specific dispatching table for this unit.
9859 (Specific_Dispatching): Add this table for storing each S (priority
9860 specific dispatching) line encountered in the input ALI file.
9861 New flag Elaborate_All_Desirable in unit table
9862
9863 * bcheck.adb: (Check_Configuration_Consistency): Add call to
9864 Check_Consistent_Dispatching_Policy.
9865 (Check_Consistent_Dispatching_Policy): Add this procedure in charge of
9866 verifying that the use of Priority_Specific_Dispatching,
9867 Task_Dispatching_Policy, and Locking_Policy is consistent across the
9868 partition.
9869
9870 * bindgen.adb: (Public_Version_Warning): function removed.
9871 (Set_PSD_Pragma_Table): Add this procedure in charge of getting the
9872 required information from ALI files in order to initialize the table
9873 containing the specific dispatching policy.
9874 (Gen_Adainit_Ada): Generate the variables required for priority specific
9875 dispatching entries (__gl_priority_specific_dispatching and
9876 __gl_num_specific_dispatching).
9877 (Gen_Adainit_C): Generate the variables required for priority specific
9878 dispatching entries (__gl_priority_specific_dispatching and
9879 __gl_num_specific_dispatching).
9880 (Gen_Output_File): Acquire settings for Priority_Specific_Dispatching
9881 pragma entries.
9882 (Gen_Restrictions_String_1, Gen_Restrictions_String_2): Removed.
9883 (Gen_Restrictions_Ada, Gen_Restrictions_C, Set_Boolean): New procedures.
9884 (Tab_To): Removed.
9885 (Gen_Output_File_Ada/_C): Set directly __gl_xxx variables instead of
9886 a call to gnat_set_globals.
9887 Generate a string containing settings from
9888 Priority_Specific_Dispatching pragma entries.
9889 (Gen_Object_Files_Options): Do not include the runtime libraries when
9890 pragma No_Run_Time is specified.
9891
9892 * init.c (__gnat_install_handler, case FreeBSD): Use SA_SIGINFO, for
9893 consistency with s-intman-posix.adb.
9894 (__gnat_error_handler, case FreeBSD): Account for the fact that the
9895 handler is installed with SA_SIGINFO.
9896 (__gnat_adjust_context_for_raise, FreeBSD case): New function for
9897 FreeBSD ZCX support, copied from Linux version.
9898 Add MaRTE-specific definitions for the linux target. Redefine sigaction,
9899 sigfillset, and sigemptyset so the routines defined by MaRTE.
9900 (__gl_priority_specific_dispatching): Add this variable that stores the
9901 string containing priority specific dispatching policies in the
9902 partition.
9903 (__gl_num_specific_dispatching): Add this variable that indicates the
9904 highest priority for which a priority specific dispatching pragma
9905 applies.
9906 (__gnat_get_specific_dispatching): Add this routine that returns the
9907 priority specific dispatching policy, as set by a
9908 Priority_Specific_Dispatching pragma appearing anywhere in the current
9909 partition. The input argument is the priority number, and the result
9910 is the upper case first character of the policy name.
9911 (__gnat_set_globals): Now a dummy function.
9912 (__gnat_handle_vms_condition): Feed adjust_context_for_raise with
9913 mechargs instead of sigargs, as the latter can be retrieved from the
9914 former and sigargs is not what we want on ia64.
9915 (__gnat_adjust_context_for_raise, alpha-vms): Fetch sigargs from the
9916 mechargs argument.
9917 (__gnat_adjust_context_for_raise, ia64-vms): New function.
9918 (tasking_error): Remove unused symbol.
9919 (_abort_signal): Move this symbol to the IRIX specific part since this
9920 is the only target that uses this definition.
9921 (Check_Abort_Status): Move this symbol to the IRIX specific part since
9922 this is the only target that uses this definition.
9923 (Lock_Task): Remove unused symbol.
9924 (Unlock_Task): Remove unused symbol.
9925
9926 * lib-writ.adb (Write_ALI): Output new S lines for
9927 Priority_Specific_Dispatching pragmas.
9928 Implement new flag BD for elaborate body desirable
9929
9930 * lib-writ.ads: Document S lines for Priority Specific Dispatching.
9931 (Specific_Dispatching): Add this table for storing the entries
9932 corresponding to Priority_Specific_Dispatching pragmas.
9933 Document new BD flag for elaborate body desirable
9934
9935 * par-prag.adb (Prag): Add Priority_Specific_Dispatching to the list
9936 of known pragmas.
9937
99382006-10-31 Javier Miranda <miranda@adacore.com>
9939
9940 * a-tags.ads, a-tags.adb:
9941 (Predefined_DT): New function that improves readability of the code.
9942 (Get_Predefined_Prim_Op_Address, Set_Predefined_Prim_Op_Address,
9943 Inherit_DT): Use the new function Predefined_DT to improve code
9944 readability.
9945 (Register_Interface_Tag): Update assertion.
9946 (Set_Interface_Table): Update assertion.
9947 (Interface_Ancestor_Tags): New subprogram required to implement AI-405:
9948 determining progenitor interfaces in Tags.
9949 (Inherit_CPP_DT): New subprogram.
9950
6f7f72f9 9951 * exp_disp.adb (Expand_Interface_Thunk): Suppress checks during the
70198b9f 9952 analysis of the thunk code.
6f7f72f9
EB
9953 (Expand_Interface_Conversion): Handle run-time conversion of
9954 access to class wide types.
70198b9f
AC
9955 (Expand_Dispatching_Call): When generating the profile for the
9956 subprogram itype for a dispatching operation, properly terminate the
9957 formal parameters chaind list (set the Next_Entity of the last formal
9958 to Empty).
9959 (Collect_All_Interfaces): Removed. This routine has been moved to
9960 sem_util and renamed as Collect_All_Abstract_Interfaces.
9961 (Set_All_DT_Position): Hidden entities associated with abstract
9962 interface primitives are not taken into account in the check for
9963 3.9.3(10); this check is done with the aliased entity.
9964 (Make_DT, Set_All_DT_Position): Enable full ABI compatibility for
9965 interfacing with CPP by default.
9966 (Expand_Interface_Conversion): Add missing support for static conversion
9967 from an interface to a tagged type.
9968 (Collect_All_Interfaces): Add new out formal containing the list of
9969 abstract interface types to cleanup the subprogram Make_DT.
9970 (Make_DT): Update the code to generate the table of interfaces in case
9971 of abstract interface types.
9972 (Is_Predefined_Dispatching_Alias): New function that returns true if
9973 a primitive is not a predefined dispatching primitive but it is an
9974 alias of a predefined dispatching primitive.
9975 (Make_DT): If the ancestor of the type is a CPP_Class and we are
9976 compiling under full ABI compatibility mode we avoid the generation of
9977 calls to run-time services that fill the dispatch tables because under
9978 this mode we currently inherit the dispatch tables in the IP subprogram.
9979 (Write_DT): Emit an "is null" indication for a null procedure primitive.
9980 (Expand_Interface_Conversion): Use an address as the type of the formal
9981 of the internally built function that handles the case in which the
9982 target type is an access type.
9983
99842006-10-31 Robert Dewar <dewar@adacore.com>
9985
9986 * binde.adb (Better_Choice, Worse_Choice): Implement new preferences.
9987
99882006-10-31 Robert Dewar <dewar@adacore.com>
9989
9990 * bindusg.ads, bindusg.adb:
9991 Change to package and rename procedure as Display, which
9992 now ensures that it only outputs usage information once.
9993
99942006-10-31 Jose Ruiz <ruiz@adacore.com>
9995
9996 * cal.c: Use the header sys/time.h for VxWorks 6.2 or greater when
9997 using RTPs.
9998
9999 * mkdir.c: Use a different version of mkdir for VxWorks 6.2 or greater
10000 when using RTPs.
10001
100022006-10-31 Robert Dewar <dewar@adacore.com>
10003 Ed Schonberg <schonberg@adacore.com>
10004
10005 * treepr.adb: Use new subtype N_Membership_Test
10006
6f7f72f9
EB
10007 * checks.ads, checks.adb: Add definition for Validity_Check
10008 (Range_Or_Validity_Checks_Suppressed): New function
10009 (Ensure_Valid): Test Validity_Check suppressed
10010 (Insert_Valid_Check): Test Validity_Check suppressed
10011 (Insert_Valid_Check): Preserve Do_Range_Check flag
70198b9f
AC
10012 (Validity_Check_Range): New procedure
10013 (Expr_Known_Valid): Result of membership test is always valid
10014 (Selected_Range_Checks): Range checks cannot be applied to discriminants
10015 by themselves. Disabling those checks must also be done for task types,
10016 where discriminants may be used for the bounds of entry families.
10017 (Apply_Address_Clause_Check): Remove side-effects if address expression
10018 is non-static and is not the name of a declared constant.
10019 (Null_Exclusion_Static_Checks): Extend to handle Function_Specification.
10020 Code cleanup and new error messages.
10021 (Enable_Range_Check): Test for some cases of suppressed checks
10022 (Generate_Index_Checks): Suppress index checks if index checks are
10023 suppressed for array object or array type.
10024 (Apply_Selected_Length_Checks): Give warning for compile-time detected
10025 length check failure, even if checks are off.
10026 (Ensure_Valid): Do not generate a check on an indexed component whose
10027 prefix is a packed boolean array.
10028 * checks.adb: (Alignment_Checks_Suppressed): New function
10029 (Apply_Address_Clause_Check): New procedure, this is a completely
10030 rewritten replacement for Apply_Alignment_Check
10031 (Get_E_Length/Get_E_First_Or_Last): Add missing barrier to ensure that
10032 we request a discriminal value only in case of discriminants.
10033 (Apply_Discriminant_Check): For Ada_05, only call Get_Actual_Subtype for
10034 assignments where the target subtype is unconstrained and the target
10035 object is a parameter or dereference (other aliased cases are known
10036 to be unconstrained).
10037
100382006-10-31 Robert Dewar <dewar@adacore.com>
10039
10040 * clean.adb, gnatname.adb, gnatsym.adb, prep.adb, prep.ads,
10041 prepcomp.adb, prj.ads, prj-strt.adb, sem_maps.ads,
10042 vms_conv.adb: Fix bad table increment values (much too small)
10043
10044 * table.adb (Realloc): Make sure we get at least some new elements
10045 Defends against silly small values for table increment
10046
100472006-10-31 Robert Dewar <dewar@adacore.com>
10048 Ed Schonberg <schonberg@adacore.com>
10049 Bob Duff <duff@adacore.com>
10050
10051 * einfo.ads, einfo.adb (Obsolescent_Warning): Now defined on all
10052 entities. Move other fields around to make this possible
10053 (Is_Derived_Type): Add missing call to Is_Type.
10054 (Extra_Formals): New function for subprograms, entries, subprogram
10055 types.
10056 (Set_Extra_Formals): New procedure for subprograms, entries, subp types.
10057 (First_Formal_With_Extras): New function for subprogs, entries, subp
10058 types.
10059 (Write_Field28_Name): New procedure for node display of "Extra_Formals".
10060 Add node information for E_Return_Statement.
10061 (Elaborate_Body_Desirable): New flag
10062 (Is_Return_By_Reference_Type): Rename Is_Return_By_Reference_Type
10063 to be Is_Inherently_Limited_Type, because return-by-reference has
10064 no meaning in Ada 2005.
10065 (E_Return_Statement): New entity kind.
10066 (Return_Applies_To): Field of E_Return_Statement.
10067 (Is_Return_Object): New flag in object entities.
10068 (Is_Dynamic_Scope): Make it True for E_Return_Statement.
10069 (Must_Have_Preelab_Init): New flag
10070 (Known_To_Have_Preelab_Init): New flag
10071 (Is_Formal_Object): Move from Sem_Ch8 body to Einfo
10072 (Is_Visible_Formal): New flag on entities in formal packages.
10073 (Low_Bound_Known): New flag
10074 (Non_Limited_View, Set_Non_Limited_View): Add membership test agains
10075 Incomplete_Kind.
10076 (Write_Field17_Name): Correct spelling of Non_Limited_View. Add name
10077 output when Id is an incomplete subtype.
10078
100792006-10-31 Robert Dewar <dewar@adacore.com>
10080
10081 * errout.ads, errout.adb (Finalize): Implement switch -gnatd.m
10082 Avoid abbreviation Creat
10083 (Finalize): List all sources in extended mail source if -gnatl
10084 switch is active.
10085 Suppress copyright notice to file in -gnatl=f mode if -gnatd7 set
10086 (Finalize): Implement new -gnatl=xxx switch to output listing to file
10087 (Set_Specific_Warning_On): New procedure
10088 (Set_Specific_Warning_Off): New procedure
10089 Add implementation of new insertion \\
10090 (Error_Msg_Internal): Add handling for Error_Msg_Line_Length
10091 (Unwind_Internal_Type): Improve report on anonymous access_to_subprogram
10092 types.
10093 (Error_Msg_Internal): Make sure that we set Last_Killed to
10094 True when a message from another package is suppressed.
10095 Implement insertion character ~ (insert string)
10096 (First_Node): Minor adjustments to get better placement.
10097
10098 * frontend.adb:
10099 Implement new -gnatl=xxx switch to output listing to file
10100
10101 * gnat1drv.adb:
10102 Implement new -gnatl=xxx switch to output listing to file
10103
6f7f72f9 10104 * opt.ads: (Warn_On_Questionable_Missing_Paren): New switch
70198b9f
AC
10105 (Commands_To_Stdout): New flag
10106 Implement new -gnatl=xxx switch to output listing to file
10107 New switch Dump_Source_Text
10108 (Warn_On_Deleted_Code): New warning flag for -gnatwt
10109 Define Error_Msg_Line_Length
10110 (Warn_On_Assumed_Low_Bound): New switch
10111
10112 * osint.ads, osint.adb
10113 (Normalize_Directory_Name): Fix bug.
10114 Implement new -gnatl=xxx switch to output listing to file
10115 (Concat): Removed, replaced by real concatenation
10116 Make use of concatenation now allowed in compiler
10117 (Executable_Prefix.Get_Install_Dir): First get the full path, so that
10118 we find the 'lib' or 'bin' directory even when the tool has been
10119 invoked with a relative path.
10120 (Executable_Name): New function taking string parameters.
10121
10122 * osint-c.ads, osint-c.adb:
10123 Implement new -gnatl=xxx switch to output listing to file
10124
10125 * sinput-d.adb: Change name Creat_Debug_File to Create_Debug_File
10126
10127 * switch-c.adb:
10128 Implement new -gnatl=xxx switch to output listing to file
10129 Recognize new -gnatL switch
10130 (no longer keep in old warning about old style usage)
10131 Use concatenation to simplify code
10132 Recognize -gnatjnn switch
10133 (Scan_Front_End_Switches): Clean up handling of -gnatW
10134 (Scan_Front_End_Switches): Include Warn_On_Assumed_Low_Bound for -gnatg
10135
101362006-10-31 Robert Dewar <dewar@adacore.com>
10137
10138 * erroutc.ads, erroutc.adb (Set_Specific_Warning_On): New procedure
10139 (Set_Specific_Warning_Off): New procedure
10140 (Warning_Specifically_Suppressed): New function
10141 (Validate_Specific_Warnings): New procedure
10142 (Output_Msg_Text): Complete rewrite to support -gnatjnn
10143
10144 * err_vars.ads: Implement insertion character ~ (insert string)
10145
101462006-10-31 Bob Duff <duff@adacore.com>
10147 Ed Schonberg <schonberg@adacore.com>
10148
10149 * exp_aggr.adb (Build_Record_Aggr_Code): For extension aggregates, if
10150 the parent part is a build-in-place function call, generate assignments.
10151 (Expand_Record_Aggregate): Call Convert_To_Assignments if any components
10152 are build-in-place function calls.
10153 (Replace_Self_Reference): New subsidiary of
10154 Make_OK_Assignment_Statement, to replace an access attribute that is a
10155 self-reference into an access to the appropriate component of the
10156 target object. Generalizes previous mechanism to handle self-references
10157 nested at any level.
10158 (Is_Self_Referential_Init): Remove, not needed.
10159 (Is_Self_Referential_Init): New predicate to simplify handling of self
10160 referential components in record aggregates.
10161 (Has_Default_Init_Comps, Make_OK_Assignment_Statement): Add guard to
10162 check for presence of entity before checking for self-reference.
10163 (Has_Default_Init_Comps): Return True if a component association is a
10164 self-reference to the enclosing type, which can only come from a
10165 default initialization.
10166 (Make_OK_Assignment_Statement): If the expression is of the form
10167 Typ'Acc, where Acc is an access attribute, the expression comes from a
10168 default initialized self-referential component.
10169 (Build_Record_Aggr_Code): If the type of the aggregate is a tagged type
10170 that has been derived from several abstract interfaces we must also
10171 initialize the tags of the secondary dispatch tables.
10172
101732006-10-31 Ed Schonberg <schonberg@adacore.com>
10174 Thomas Quinot <quinot@adacore.com>
10175 Javier Miranda <miranda@adacore.com>
10176 Robert Dewar <dewar@adacore.com>
6f7f72f9
EB
10177
10178 * exp_attr.adb:
10179 (Expand_Access_To_Protected_Op): If the context indicates that an access
10180 to a local operation may be transfered outside of the object, create an
10181 access to the wrapper operation that must be used in an external call.
70198b9f
AC
10182 (Expand_N_Attribute_Reference, case Attribute_Valid): For the AAMP
10183 target, pass the Valid attribute applied to a floating-point prefix on
10184 to the back end without expansion.
10185 (Storage_Size): Use the new run-time function Storage_Size to retrieve
10186 the allocated storage when it is specified by a per-object expression.
10187 (Expand_N_Attribute_Reference): Add case for Attribute_Stub_Type.
10188 Nothing to do here, the attribute has been rewritten during semantic
10189 analysis.
10190 (Expand_Attribute_Reference): Handle expansion of the new Priority
10191 attribute
10192 (Find_Fat_Info): Handle case of universal real
10193 (Expand_Access_To_Protected_Op): Fix use of access to protected
10194 subprogram from inside the body of a protected entry.
10195 (Expand_Access_To_Protected_Op): Common procedure for the expansion of
10196 'Access and 'Unrestricted_Access, to transform the attribute reference
10197 into a fat pointer.
10198 (Is_Constrained_Aliased_View): New predicate to help determine whether a
10199 subcomponent's enclosing variable is aliased with a constrained subtype.
10200 (Expand_N_Attribute_Reference, case Attribute_Constrained): For Ada_05,
10201 test Is_Constrained_Aliased_View rather than Is_Aliased_View, because
10202 an aliased prefix must be known to be constrained in order to use True
10203 for the attribute value, and now it's possible for some aliased views
10204 to be unconstrained.
10205
102062006-10-31 Robert Dewar <dewar@adacore.com>
10207
10208 * exp_ch2.adb: Change Is_Lvalue to May_Be_Lvalue
10209 (Expand_Entity_Reference): Correct error of not handling subprogram
10210 formals in current_value processing.
10211
102122006-10-31 Javier Miranda <miranda@adacore.com>
10213 Robert Dewar <dewar@adacore.com>
10214 Ed Schonberg <schonberg@adacore.com>
10215 Gary Dismukes <dismukes@adacore.com>
10216
6f7f72f9 10217 * exp_ch3.ads, exp_ch3.adb (Expand_N_Object_Declaration): Do not
70198b9f
AC
10218 register in the final list objects containing class-wide interfaces;
10219 otherwise we incorrectly register the tag of the interface in the final
10220 list.
6f7f72f9
EB
10221 (Make_Controlling_Function_Wrappers): Add missing barrier to do not
10222 generate the wrapper if the parent primitive is abstract. This is
10223 required to report the correct error message.
10224 (Expand_N_Subtype_Indication): Do validity checks on range
70198b9f
AC
10225 (Clean_Task_Names): If an initialization procedure includes a call to
10226 initialize a task (sub)component, indicate that the procedure will use
10227 the secondary stack.
10228 (Build_Init_Procedure, Init_Secondary_Tags): Enable full ABI
10229 compatibility for interfacing with CPP by default.
10230 (Expand_N_Object_Declaration): Only build an Adjust call when the
10231 object's type is a nonlimited controlled type.
10232 * exp_ch3.adb: Add with and use of Exp_Ch6.
10233 (Expand_N_Object_Declaration): Check for object initialization that is a
10234 call to build-in-place function and apply Make_Build_In_Place_Call_In_
10235 Object_Declaration to the call.
10236 (Freeze_Type): When the designated type of an RACW was not frozen at the
10237 point where the RACW was declared, validate the primitive operations
10238 with respect to E.2.2(14) when it finally is frozen.
10239 (Build_Initialization_Call,Expand_Record_Controller): Rename
10240 Is_Return_By_Reference_Type to be Is_Inherently_Limited_Type, because
10241 return-by-reference has no meaning in Ada 2005.
10242 (Init_Secondary_Tags): Add missing call to Set_Offset_To_Top
10243 to register tag of the immediate ancestor interfaces in the
10244 run-time structure.
10245 (Init_Secondary_Tags): Moved to the specification to allow the
10246 initialization of extension aggregates with abstract interfaces.
10247 (Build_Master_Renaming): Make public, for use by function declarations
10248 whose return type is an anonymous access type.
10249 (Freeze_Record_Type): Replace call to Insert_List_Before by call to
10250 Insert_List_Before_And_Analyze after the generation of the specs
10251 associated with null procedures.
10252 (Expand_Tagged_Root): Update documentation in its specification.
10253 (Init_Secondary_Tags): Update documentation.
10254 (Build_Init_Procedure): If we are compiling under CPP full ABI compa-
10255 tibility mode and the immediate ancestor is a CPP_Pragma tagged type
10256 then generate code to inherit the contents of the dispatch table
10257 directly from the ancestor.
10258 (Expand_Record_Controller): Insert controller component after tags of
10259 implemented interfaces.
10260 (Freeze_Record_Type): Call new procedure Make_Null_Procedure_Specs to
10261 create null procedure overridings when null procedures are inherited
10262 from interfaces.
10263 (Make_Null_Procedure_Specs): New procedure to generate null procedure
10264 declarations for overriding null primitives inherited from interfaces.
10265 (Is_Null_Interface_Procedure): New function in
10266 Make_Null_Procedure_Specs.
10267 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): If the
10268 immediate ancestor of a tagged type is an abstract interface type we
10269 must generate the specification of the predefined primitives associated
10270 with controlled types (because the dispatch table of the ancestor is
10271 null and hence these entries cannot be inherited). This is required to
10272 elaborate well the dispatch table.
10273
102742006-10-31 Javier Miranda <miranda@adacore.com>
10275 Ed Schonberg <schonberg@adacore.com>
10276 Bob Duff <duff@adacore.com>
10277 Gary Dismukes <dismukes@adacore.com>
10278 Robert Dewar <dewar@adacore.com>
6f7f72f9
EB
10279
10280 * exp_ch4.adb (Expand_N_Type_Conversion): Handle missing interface type
70198b9f 10281 conversion.
6f7f72f9 10282 (Expand_N_In): Do validity checks on range
70198b9f
AC
10283 (Expand_Selected_Component): Use updated for of Denotes_Discriminant.
10284 (Expand_N_Allocator): For "new T", if the object is constrained by
10285 discriminant defaults, allocate the right amount of memory, rather than
10286 the maximum for type T.
10287 (Expand_Allocator_Expression): Suppress the call to Remove_Side_Effects
10288 when the allocator is initialized by a build-in-place call, since the
10289 allocator is already rewritten as a reference to the function result,
10290 and this prevents an unwanted duplication of the function call.
10291 Add with and use of Exp_Ch6.
10292 (Expand_Allocator_Expresssion): Check for an allocator whose expression
10293 is a call to build-in-place function and apply
10294 Make_Build_In_Place_Call_In_Allocator to the call (for both tagged and
10295 untagged designated types).
10296 (Expand_N_Unchecked_Type_Conversion): Do not do integer literal
10297 optimization if source or target is biased.
10298 (Expand_N_Allocator): Add comments for case of an allocator within a
10299 function that returns an anonymous access type designating tasks.
10300 (Expand_N_Allocator): apply discriminant checks for access
10301 discriminants of anonymous access types (AI-402, AI-416)
10302
103032006-10-31 Bob Duff <duff@adacore.com>
10304 Robert Dewar <dewar@adacore.com>
10305 Gary Dismukes <dismukes@adacore.com>
10306 Ed Schonberg <schonberg@adacore.com>
10307
10308 * exp_ch5.ads (Expand_N_Extended_Return_Statement): New procedure.
10309
6f7f72f9 10310 * exp_ch5.adb (Expand_N_Loop_Statement): Do validity checks on range
70198b9f
AC
10311 (Expand_N_Assignment_Statement): Call
10312 Make_Build_In_Place_Call_In_Assignment if the right-hand side is a
10313 build-in-place function call. Currently, this can happen only for
10314 assignments that come from aggregates.
10315 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
10316 in order to alleviate the upward compatibility introduced by AI-318.
10317 (Expand_N_Extended_Return_Statement): Add support for handling the
10318 return object as a build-in-place result.
10319 (Expand_Non_Function_Return): Implement simple return statements nested
10320 within an extended return.
10321 (Enable_New_Return_Processing): Turn on the new processing of return
10322 statements.
10323 (Expand_Non_Function_Return): For a return within an extended return,
10324 don't raise Program_Error, because Sem_Ch6 now gives a warning.
10325 (Expand_N_Extended_Return_Statement): Implement AI-318
10326 (Expand_Simple_Function_Return): Ditto.
10327 (Expand_N_If_Statement): Handle new -gnatwt warning
10328 (Expand_N_Case_Statement): Handle new -gnatwt warning
10329 (Expand_N_Assignment): Handle assignment to the Priority attribute of
10330 a protected object.
10331 (Expand_N_Assignment_Statement): Implement -gnatVe/E to control
10332 validity checking of assignments to elementary record components.
10333 (Expand_N_Return_Statement): return Class Wide types on the secondary
10334 stack independantly of their controlled status since with HIE runtimes,
10335 class wide types are not potentially controlled anymore.
10336
10337 * expander.adb (Expand): Add case for new N_Extended_Return_Statement
10338 node kind.
10339
10340 * exp_ch11.adb (Expand_N_Handled_Sequence_Of_Statements): Avoid
10341 Expand_Cleanup_Actions in case of N_Extended_Return_Statement, because
10342 it expects a block, procedure, or task. The return statement will get
10343 turned into a block, and Expand_Cleanup_Actions will happen then.
10344
103452006-10-31 Robert Dewar <dewar@adacore.com>
10346 Ed Schonberg <schonberg@adacore.com>
10347 Bob Duff <duff@adacore.com>
10348 Gary Dismukes <dismukes@adacore.com>
10349
10350 * exp_ch6.ads, exp_ch6.adb: Use new Validity_Check suppression
10351 capability.
10352 (Expand_Inlined_Call): Tagged types are by-reference types, and
10353 therefore should be replaced by a renaming declaration in the expanded
10354 body, as is done for limited types.
10355 (Expand_Call): If this is a call to a function with dispatching access
10356 result, propagate tag from context.
10357 (Freeze_Subprogram): Enable full ABI compatibility for interfacing with
10358 CPP by default.
10359 (Make_Build_In_Place_Call_In_Assignment): New procedure to do
10360 build-in-place when the right-hand side of an assignment is a
10361 build-in-place function call.
10362 (Make_Build_In_Place_Call_In_Allocator): Apply an unchecked conversion
10363 of the explicit dereference of the allocator to the result subtype of
10364 the build-in-place function. This is needed to satisfy type checking
10365 in cases where the caller's return object is created by an allocator for
10366 a class-wide access type and the type named in the allocator is a
10367 specific type.
10368 (Make_Build_In_Place_Call_In_Object_Declaration): Apply an unchecked
10369 conversion of the reference to the declared object to the result subtype
10370 of the build-in-place function. This is needed to satisfy type checking
10371 in cases where the declared object has a class-wide type. Also, in the
10372 class-wide case, change the type of the object entity to the specific
10373 result subtype of the function, to avoid passing a class-wide object
10374 without explicit initialization to the back end.
10375 (Register_Interface_DT_Entry): Moved outside the body of
10376 Freeze_Subprogram because this routine is now public; it is called from
10377 Check_Dispatching_Overriding to handle late overriding of abstract
10378 interface primitives.
10379 (Add_Access_Actual_To_Build_In_Place_Call): New utility procedure for
10380 adding an implicit access actual on a call to a build-in-place function.
10381 (Expand_Actuals): Test for an actual parameter that is a call to a
10382 build-in-place function and apply
10383 Make_Build_In_Place_Call_In_Anonymous_Context to the call.
10384 (Is_Build_In_Place_Function): New function to determine whether an
10385 entity is a function whose calls should be handled as build-in-place.
10386 (Is_Build_In_Place_Function_Call): New function to determine whether an
10387 expression is a function call that should handled as build-in-place.
10388 (Make_Build_In_Place_Call_In_Allocator): New procedure for handling
10389 calls to build-in-place functions as the initialization of an allocator.
10390 (Make_Build_In_Place_Call_In_Anonymous_Context): New procedure for
10391 handling calls to build-in-place functions in contexts that do not
10392 involve init of a separate object (for example, actuals of subprogram
10393 calls).
10394 (Make_Build_In_Place_Call_In_Object_Declaration): New procedure for
10395 handling calls to build-in-place functions as the initialization of an
10396 object declaration.
10397 (Detect_Infinite_Recursion): Add explicit parameter Process to
10398 instantiation of Traverse_Body to avoid unreferenced warning.
10399 (Check_Overriding_Inherited_Interfaces): Removed.
10400 (Register_Interface_DT_Entry): Code cleanup.
10401 (Register_Predefined_DT_Entry): Code cleanup.
10402 (Expand_Inlined_Call.Rewrite_Procedure_Call): Do not omit block around
10403 inlined statements if within a transient scope.
10404 (Expand_Inlined_Call.Process_Formals): When replacing occurrences of
10405 formal parameters with occurrences of actuals in inlined body, establish
10406 visibility on the proper view of the actual's subtype for the body's
10407 context.
10408 (Freeze_Subprogram): Do nothing if we are compiling under full ABI
10409 compatibility mode and we have an imported CPP subprogram because
10410 for now we assume that imported CPP primitives correspond with
10411 objects whose constructor is in the CPP side (and therefore we
10412 don't need to generate code to register them in the dispatch table).
10413 (Expand_Actuals): Introduce copy of actual, only if it might be a bit-
10414 aligned selected component.
10415 (Add_Call_By_Copy_Node): Add missing code to handle the case in which
10416 the actual of an in-mode parameter is a type conversion.
10417 (Expand_Actuals): If the call does not come from source and the actual
10418 is potentially misaligned, let gigi handle it rather than rejecting the
10419 (Expand_N_Subprogram_Body, Freeze_Subprogram): set subprograms returning
10420 Class Wide types as returning by reference independantly of their
10421 controlled status since with HIE runtimes class wide types are not
10422 potentially controlled anymore.
10423
6f7f72f9 104242006-10-31 Ed Schonberg <schonberg@adacore.com>
70198b9f 10425
6f7f72f9 10426 * exp_ch9.adb (Update_Prival_Types): Simplify code for entity
70198b9f
AC
10427 references that are private components of the protected object.
10428 (Build_Barrier_Function): Set flag Is_Entry_Barrier_Function
10429 (Update_Prival_Subtypes): Add explicit Process argument to Traverse_Proc
10430 instantiation to deal with warnings.
10431 (Initialize_Protection): If expression for priority is non-static, use
10432 System_Priority as its expected type, in case the expression has not
10433 been analyzed yet.
10434
104352006-10-31 Robert Dewar <dewar@adacore.com>
10436
10437 * exp_dbug.ads, exp_dbug.adb (Get_External_Name): Add missing
10438 initialization of Homonym_Len.
10439 (Fully_Qualify_Name): Remove kludge to eliminate anonymous block
10440 names from fully qualified name. Fixes problem of duplicate
10441 external names differing only in the presence of such a block name.
10442
104432006-10-31 Thomas Quinot <quinot@adacore.com>
10444 Pablo Oliveira <oliveira@adacore.com>
6f7f72f9
EB
10445
10446 * exp_dist.adb (Get_Subprogram_Ids): This function will no more assign
70198b9f
AC
10447 subprogram Ids, even if they are not yet assigned.
10448 (Build_Subprogram_Id): It is now this function that will take care of
10449 calling Assign_Subprogram_Ids if necessary.
10450 (Add_Receiving_Stubs_To_Declarations): Checking the subprograms ids
10451 should be done only once they are assigned.
10452 (Build_From_Any_Function, case of tagged types): Add missing call to
10453 Allocate_Buffer.
10454 (Corresponding_Stub_Type): New subprogram. Returns the associated stub
10455 type for an RACW type.
10456 (Add_RACW_Features): When processing an RACW declaration for which the
10457 designated type is already frozen, enforce E.2.2(14) rules immediately.
10458 (GARLIC_Support.Build_Subprogram_Receiving_Stubs): Do not perform any
10459 special reordering of controlling formals.
10460
10461 * exp_dist.ads (Corresponding_Stub_Type): New subprogram. Returns the
10462 associated stub type for an RACW type.
10463
104642006-10-31 Ed Schonberg <schonberg@adacore.com>
10465
10466 * exp_fixd.adb (Rounded_Result_Set): For multiplication and division of
10467 fixed-point operations in an integer context, i.e. as operands of a
10468 conversion to an integer type, indicate that result must be rounded.
10469
104702006-10-31 Robert Dewar <dewar@adacore.com>
10471
10472 * exp_imgv.adb (Expand_Image_Attribute): For Wide_[Wide_]Character
10473 cases, pass the encoding method, since it is now required by the run
10474 time.
10475
10476 * s-valwch.ads, s-valwch.adb (Value_Wide_Wide_Character): Avoid
10477 assumption that Str'First = 1.
10478 (Value_Wide_Character): Takes EM (encoding method) parameter and passes
10479 it on to the Value_Wide_Wide_Character call.
10480 (Value_Wide_Wide_Character): Takes EM (encoding method) parameter and
10481 properly handles a string of the form quote-encoded_wide_char-quote.
10482
10483 * s-wchcnv.adb: Minor reformatting
10484
104852006-10-31 Javier Miranda <miranda@adacore.com>
6f7f72f9 10486
70198b9f
AC
10487 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
10488 run-time membership test to ensure that the constructed object
10489 implements the target abstract interface.
10490
104912006-10-31 Robert Dewar <dewar@adacore.com>
10492
10493 * exp_prag.adb (Expand_Pragma_Common_Object): Use a single
10494 Machine_Attribute pragma internally to implement the user pragma.
10495 Add processing for pragma Interface so that it is now completely
10496 equivalent to pragma Import.
10497
10498 * sem_prag.adb (Analyze_Pragma, case Obsolescent): Extend this pragma
10499 so that it can be applied to all entities, including record components
10500 and enumeration literals.
10501 (Analyze_Pragma, case Priority_Specific_Dispatching): Check whether
10502 priority ranges are correct, verify compatibility against task
10503 dispatching and locking policies, and if everything is correct an entry
10504 is added to the table containing priority specific dispatching entries
10505 for this compilation unit.
10506 (Delay_Config_Pragma_Analyze): Delay processing
10507 Priority_Specific_Dispatching pragmas because when processing the
10508 pragma we need to access run-time data, such as the range of
10509 System.Any_Priority.
10510 (Sig_Flags): Add Pragma_Priority_Specific_Dispatching.
10511 Allow pragma Unreferenced as a context item
10512 Add pragma Preelaborable_Initialization
10513 (Analyze_Pragma, case Interface): Interface is extended so that it is
10514 now syntactically and semantically equivalent to Import.
10515 (Analyze_Pragma, case Compile_Time_Warning): Fix error of blowups on
10516 insertion characters.
10517 Add handling for Pragma_Wide_Character_Encoding
10518 (Process_Restrictions_Restriction_Warnings): Ensure that a warning
10519 never supercedes a real restriction, and that a real restriction
10520 always supercedes a warning.
10521 (Analyze_Pragma, case Assert): Set Low_Bound_Known if assert is of
10522 appropriate form.
10523
105242006-10-31 Bob Duff <duff@adacore.com>
10525 Ed Schonberg <schonberg@adacore.com>
10526 Robert Dewar <dewar@adacore.com>
10527
10528 * exp_ch7.adb (Build_Array_Deep_Procs, Build_Record_Deep_Procs,
10529 Make_Deep_Record_Body): Rename Is_Return_By_Reference_Type to be
10530 Is_Inherently_Limited_Type, because return-by-reference has no meaning
10531 in Ada 2005.
10532 (Find_Node_To_Be_Wrapped): Use new method of determining the result
10533 type of the function containing a return statement, because the
10534 Return_Type field was removed. We now use the Return_Applies_To field.
10535
6f7f72f9 10536 * exp_util.ads, exp_util.adb: Use new subtype N_Membership_Test
70198b9f
AC
10537 (Build_Task_Image_Decl): If procedure is not called from an
10538 initialization procedure, indicate that function that builds task name
10539 uses the sec. stack. Otherwise the enclosing initialization procedure
10540 will carry the indication.
10541 (Insert_Actions): Remove N_Return_Object_Declaration. We now use
10542 N_Object_Declaration instead.
10543 (Kill_Dead_Code): New interface to implement -gnatwt warning for
10544 conditional dead code killed, and change implementation accordingly.
10545 (Insert_Actions): Add N_Return_Object_Declaration case.
10546 Correct comment to mention N_Extension_Aggregate node.
10547 (Set_Current_Value_Condition): Call Safe_To_Capture_Value to avoid bad
10548 attempts to save information for global variables which cannot be
10549 safely tracked.
10550 (Get_Current_Value_Condition): Handle conditions the other way round
10551 (constant on left). Also handle right operand of AND and AND THEN
10552 (Set_Current_Value_Condition): Corresponding changes
10553 (Append_Freeze_Action): Remove unnecessary initialization of Fnode.
10554 (Get_Current_Value_Condition): Handle simple boolean operands
10555 (Get_Current_Value_Condition): Handle left operand of AND or AND THEN
10556 (Get_Current_Value_Condition): If the variable reference is within an
10557 if-statement, does not appear in the list of then_statments, and does
10558 not come from source, treat it as being at unknown location.
10559 (Get_Current_Value_Condition): Enhance to allow while statements to be
10560 processed as well as if statements.
10561 (New_Class_Wide_Subtype): The entity for a class-wide subtype does not
10562 come from source.
10563 (OK_To_Do_Constant_Replacement): Allow constant replacement within body
10564 of loop. This is safe now that we fixed Kill_Current_Values.
10565 (OK_To_Do_Constant_Replacement): Check whether current scope is
10566 Standard, before examining outer scopes.
10567
105682006-10-31 Vincent Celier <celier@adacore.com>
10569
10570 * krunch.ads, krunch.adb (Krunch): New Boolean parameter VMS_On_Target.
10571 When True, apply VMS treatment to children of packages A, G, I and S.
10572 For F320-016
10573
10574 * fname-uf.adb (Get_File_Name): Call Krunch with OpenVMS_On_Target
10575
105762006-10-31 Robert Dewar <dewar@adacore.com>
10577 Ed Schonberg <schonberg@adacore.com>
10578
10579 * freeze.adb: Add handling of Last_Assignment field
10580 (Warn_Overlay): Supply missing continuation marks in error msgs
10581 (Freeze_Entity): Add check for Preelaborable_Initialization
10582
10583 * g-comlin.adb: Add Warnings (Off) to prevent new warning
10584
10585 * g-expect.adb: Add Warnings (Off) to prevent new warning
10586
10587 * lib-xref.adb: Add handling of Last_Assignment field
10588 (Generate_Reference): Centralize handling of pragma Obsolescent here
10589 (Generate_Reference): Accept an implicit reference generated for a
10590 default in an instance.
10591 (Generate_Reference): Accept a reference for a node that is not in the
10592 main unit, if it is the generic body corresponding to an subprogram
10593 instantiation.
10594
10595 * xref_lib.adb: Add pragma Warnings (Off) to avoid new warnings
10596
6f7f72f9 10597 * sem_warn.ads, sem_warn.adb (Set_Warning_Switch): Add processing for
70198b9f
AC
10598 -gnatwq/Q.
10599 (Warn_On_Useless_Assignment): Suppress warning if enclosing inner
10600 exception handler.
10601 (Output_Obsolescent_Entity_Warnings): Rewrite to avoid any messages on
10602 use clauses, to avoid messages on packages used to qualify, and also
10603 to avoid messages from obsolescent units.
10604 (Warn_On_Useless_Assignments): Don't generate messages for imported
10605 and exported variables.
10606 (Warn_On_Useless_Assignments): New procedure
10607 (Output_Obsolescent_Entity_Warnings): New procedure
10608 (Check_Code_Statement): New procedure
10609
6f7f72f9 10610 * einfo.ads, einfo.adb (Has_Static_Discriminants): New flag
70198b9f
AC
10611 Change name Is_Ada_2005 to Is_Ada_2005_Only
10612 (Last_Assignment): New field for useless assignment warning
10613
106142006-10-31 Olivier Hainque <hainque@adacore.com>
10615
10616 * g-alleve.adb (lvx, stvx): Ceil-Round the Effective Address to the
10617 closest multiple of VECTOR_ALIGNMENT and not the closest multiple of 16.
10618
106192006-10-31 Bob Duff <duff@adacore.com>
10620 Robert Dewar <dewar@adacore.com>
10621 Ed Schonberg <schonberg@adacore.com>
10622
10623 * g-awk.adb (Default_Session, Current_Session): Compile this file in
10624 Ada 95 mode, because it violates the new rules for AI-318.
10625
10626 * g-awk.ads: Use overloaded subprograms in every case where we used to
10627 have a default of Current_Session. This makes the code closer to be
10628 correct for both Ada 95 and 2005.
10629
10630 * g-moreex.adb (Occurrence): Turn off warnings for illegal-in-Ada-2005
10631 code, relying on the fact that the compiler generates a warning
10632 instead of an error in -gnatg mode.
10633
10634 * lib-xref.ads (Xref_Entity_Letters): Add entry for new
10635 E_Return_Statement entity kind.
10636 Add an entry for E_Incomplete_Subtype in Xref_Entity_Letters.
10637
10638 * par.adb (P_Interface_Type_Definition): Addition of one formal to
10639 report an error if the reserved word abstract has been previously found.
10640 (SS_End_Type): Add E_Return for new extended_return_statement syntax.
6f7f72f9
EB
10641
10642 * par-ch4.adb (P_Aggregate_Or_Paren_Expr): Improve message for
70198b9f
AC
10643 parenthesized range attribute usage
10644 (P_Expression_No_Right_Paren): Add missing comment about error recovery.
10645
10646 * par-ch6.adb (P_Return_Object_Declaration): AI-318: Allow "constant"
10647 in the syntax for extended_return_statement. This is not in the latest
10648 RM, but the ARG is expected to issue an AI allowing this.
10649 (P_Return_Subtype_Indication,P_Return_Subtype_Indication): Remove
10650 N_Return_Object_Declaration. We now use N_Object_Declaration instead.
10651 (P_Return_Object_Declaration, P_Return_Subtype_Indication,
10652 P_Return_Statement): Parse the new syntax for extended_return_statement.
10653
10654 * par-endh.adb (Check_End, Output_End_Deleted, Output_End_Expected,
10655 Output_End_Missing): Add error-recovery code for the new
10656 extended_return_statement syntax; that is, the new E_Return entry on
10657 the scope stack.
10658
10659 * s-auxdec-vms_64.ads, s-auxdec.ads (AST_Handler): Change type from
10660 limited to nonlimited, because otherwise we violate the new Ada 2005
10661 rules about returning limited types in function Create_AST_Handler in
10662 s-asthan.adb.
10663
10664 * sem.adb (Analyze): Add cases for new node kinds
10665 N_Extended_Return_Statement and N_Return_Object_Declaration.
10666
10667 * sem_aggr.adb (Aggregate_Constraint_Checks): Verify that component
10668 type is in the same category as type of context before applying check,
10669 to prevent anomalies in instantiations.
10670 (Resolve_Aggregate): Remove test for limited components in aggregates.
10671 It's unnecessary in Ada 95, because if it has limited components, then
10672 it must be limited. It's wrong in Ada 2005, because limited aggregates
10673 are now allowed.
10674 (Resolve_Record_Aggregate): Move check for limited types later, because
10675 OK_For_Limited_Init requires its argument to have been resolved.
10676 (Get_Value): When copying the component default expression for a
10677 defaulted association in an aggregate, use the sloc of the aggregate
10678 and not that of the original expression, to prevent spurious
10679 elaboration errors, when the expression includes function calls.
10680 (Check_Non_Limited_Type): Correct code for AI-287, extension aggregates
10681 were missing. We also didn't handle qualified expressions. Now also
10682 allow function calls. Use new common routine OK_For_Limited_Init.
10683 (Resolve_Extension_Aggregate): Minor fix to bad error message (started
10684 with space can upper case letter).
10685
6f7f72f9 10686 * sem_ch3.ads, sem_ch3.adb (Create_Constrained_Components): Set
70198b9f 10687 Has_Static_Discriminants flag
6f7f72f9
EB
10688 (Record_Type_Declaration): Diagnose an attempt to declare an interface
10689 type with discriminants.
10690 (Process_Range_Expr_In_Decl): Do validity checks on range
70198b9f
AC
10691 (Build_Discriminant_Constraints): Use updated form of
10692 Denotes_Discriminant.
10693 (Process_Subtype): If the subtype is a private subtype whose full view
10694 is a concurrent subtype, introduce an itype reference to prevent scope
10695 anomalies in gigi.
10696 (Build_Derived_Record_Type, Collect_Interface_Primitives,
10697 Record_Type_Declaration): The functionality of the subprograms
10698 Collect_Abstract_Interfaces and Collect_All_Abstract_Interfaces
10699 is now performed by a single routine.
10700 (Build_Derived_Record_Type): If the type definition includes an explicit
10701 indication of limitedness, then the type must be marked as limited here
10702 to ensure that any access discriminants will not be treated as having
10703 a local anonymous access type.
10704 (Check_Abstract_Overriding): Issue a detailed error message when an
10705 abstract subprogram was not overridden due to incorrect mode of its
10706 first parameter.
10707 (Analyze_Private_Extension_Declaration): Add support for the analysis of
10708 synchronized private extension declarations. Verify that the ancestor is
10709 a limited or synchronized interface or in the generic case, the ancestor
10710 is a tagged limited type or synchronized interface and all progenitors
10711 are either limited or synchronized interfaces.
10712 Derived_Type_Declaration): Check for presence of private extension when
10713 dealing with synchronized formal derived types.
10714 Process_Full_View): Enchance the check done on the usage of "limited" by
10715 testing whether the private view is synchronized.
10716 Verify that a synchronized private view is completed by a protected or
10717 task type.
10718 (OK_For_Limited_Init_In_05): New function.
10719 (Analyze_Object_Declaration): Move check for limited types later,
10720 because OK_For_Limited_Init requires its argument to have been resolved.
10721 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
10722 in order to alleviate the upward compatibility introduced by AI-318.
10723 (Constrain_Corresponding_Record): If the constraint is for a component
10724 subtype, mark the itype as frozen, to avoid out-of-scope references to
10725 discriminants in the back-end.
10726 (Collect_Implemented_Interfaces): Protect the recursive algorithm of
10727 this subprogram against wrong sources.
10728 (Get_Discr_Value, Is_Discriminant): Handle properly references to a
10729 discriminant of limited type completed with a protected type, when the
10730 discriminant is used to constrain a private component of the type, and
10731 expansion is disabled.
10732 (Find_Type_Of_Object): Do not treat a return subtype that is an
10733 anonymous subtype as a local_anonymous_type, because its accessibility
10734 level is the return type of the enclosing function.
10735 (Check_Initialization): In -gnatg mode, turn the error "cannot
10736 initialize entities of limited type" into a warning.
10737 (OK_For_Limited_Init): Return true for generated nodes, since it
10738 sometimes violates the legality rules.
10739 (Make_Incomplete_Declaration): If the type for which an incomplete
10740 declaration is created happens to be the currently visible entity,
10741 preserve the homonym chain when removing it from visibility.
10742 (Check_Conventions): Add support for Ada 2005 (AI-430): Conventions of
10743 inherited subprograms.
10744 (Access_Definition): If this is an access to function that is the return
10745 type of an access_to_function definition, context is a type declaration
10746 and the scope of the anonymous type is the current one.
10747 (Analyze_Subtype_Declaration): Add the defining identifier of a regular
10748 incomplete subtype to the set of private dependents of the original
10749 incomplete type.
10750 (Constrain_Discriminated_Type): Emit an error message whenever an
10751 incomplete subtype is being constrained.
10752 (Process_Incomplete_Dependents): Transform an incomplete subtype into a
10753 corresponding subtype of the full view of the original incomplete type.
10754 (Check_Incomplete): Properly detect invalid usage of incomplete types
10755 and subtypes.
10756
107572006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
10758
10759 * g-catiio.ads, g-catiio.adb (Value): New function.
10760 Given an input String, try and parse a valid Time value.
10761
107622006-10-31 Vincent Celier <celier@adacore.com>
10763
10764 * g-debpoo.adb (Is_Valid): Correctly compute Offset using
10765 Integer_Address arithmetic, as in Set_Valid.
10766
107672006-10-31 Arnaud Charlet <charlet@adacore.com>
10768 Robert Dewar <dewar@adacore.com>
10769
10770 * gnatcmd.adb (Process_Link): Use Osint.Executable_Name instead of
10771 handling executable extension manually and duplicating code.
10772
10773 * make.adb: Implement new -S switch
10774 (Gnatmake): Use new function Osint.Executable_Name instead
10775 of handling executable extension manually.
10776
10777 * prj-util.adb (Executable_Of): Make sure that if an Executable_Suffix
10778 is specified, the executable name ends with this suffix.
10779 Take advantage of Osint.Executable_Name instead of duplicating code.
10780
10781 * switch-m.adb: Recognize new gnatmake -S switch
10782
10783 * targparm.ads, targparm.adb (Executable_Extension_On_Target): New
10784 variable.
10785 (Get_Target_Parameters): Set Executable_Extension_On_Target if
10786 available.
10787
10788 * makeusg.adb: Add line for gnatmake -S switch
10789
107902006-10-31 Vincent Celier <celier@adacore.com>
10791
10792 * gnatlink.adb (Gnatlink): If gcc is not called with -shared-libgcc,
10793 call it with -static-libgcc, as there are some platforms, such as
10794 Darwin, where one of these two switches is compulsory to link.
10795
107962006-10-31 Vincent Celier <celier@adacore.com>
6f7f72f9 10797
70198b9f
AC
10798 * gnatls.adb: Take into account GPR_PROJECT_PATH, when it is defined,
10799 instead of ADA_PROJECT_PATH, for the project path.
10800 (Gnatls): When displaying the project path directories, use host dir
10801 specs.
10802
10803 * prj-ext.adb (Prj.Ext elaboration): On VMS, only expand relative path
10804 names in the project path, as absolute paths may correspond to
10805 multi-valued VMS logical names.
10806
108072006-10-31 Vincent Celier <celier@adacore.com>
10808
10809 * g-os_lib.ads, g-os_lib.adb (Locate_Exec_On_Path): Always return an
10810 absolute path name.
10811 (Locate_Regular_File): Ditto
10812 (Change_Dir): Remove, no longer used
10813 (Normalize_Pathname): Do not use Change_Dir to get the drive letter
10814 on Windows. Get it calling Get_Current_Dir.
10815 (OpenVMS): Remove imported boolean, no longer needed.
10816 (Normalize_Pathname)[VMS]: Do not resolve directory names.
10817 (Pid_To_Integer): New function to convert a Process_Id to Integer
10818
108192006-10-31 Thomas Quinot <quinot@adacore.com>
10820
10821 * g-socket.ads, g-socket.adb (Close_Selector): Once the signalling
10822 sockets are closed, reset the R_Sig_Socket and W_Sig_Socket components
10823 to No_Socket.
10824 (Selector_Type): Add default value of No_Socket for R_Sig_Socket and
10825 W_Sig_Socket.
10826
108272006-10-31 Robert Dewar <dewar@adacore.com>
10828
10829 * g-speche.ads, g-speche.adb: Add special case to recognize misspelling
10830 initial letter o as a zero.
10831
108322006-10-31 Robert Dewar <dewar@adacore.com>
10833
10834 * g-spipat.adb (S_To_PE): Remove incorrect use of 0 instead of Str'First
10835
108362006-10-31 Robert Dewar <dewar@adacore.com>
10837
6f7f72f9
EB
10838 * layout.adb (Layout_Record_Type): Deal with non-static subtypes of
10839 variant records
10840 (Layout_Variant_Record): Retrieve the discriminants from the entity
70198b9f
AC
10841 rather than from the type definition, because in the case of a full
10842 type for a private type we need to take the discriminants from the
10843 partial view.
6f7f72f9
EB
10844 (Layout_Component_List): When applying the Max operator to variants with
10845 a nonstatic size, check whether either operand is static and scale that
10846 operand from bits to storage units before applying Max.
70198b9f
AC
10847 (Layout_Type): In VMS, if a C-convention access type has no explicit
10848 size clause (and does not inherit one in the case of a derived type),
10849 then the size is reset to 32 from 64.
10850
108512006-10-31 Vincent Celier <celier@adacore.com>
10852
10853 * lib-load.adb (Load_Unit): Skip the test for a unit not found when
10854 its file has already been loaded, according to the unit being loaded,
10855 not to the current value of Multiple_Unit_Index.
10856
108572006-10-31 Thomas Quinot <quinot@adacore.com>
10858 Eric Botcazou <ebotcazou@adacore.com>
10859 Arnaud Charlet <charlet@adacore.com>
10860
10861 * Makefile.in: Set EH mechanism to ZCX for FreeBSD.
10862 (NO_REORDER_ADAFLAGS): New var defined to -fno-toplevel-reorder if
10863 possible.
10864 (a-except.o): Pass it to the compiler.
10865 (gnatlib-shared-vms): Removed -nostartfiles switch in link step.
10866 (LIBGNAT_TARGET_PAIRS for Windows): Avoid the use of the specific
10867 a-calend-mingw.adb version.
10868
6f7f72f9 10869 * Makefile.rtl: Added s-dsaser.
70198b9f
AC
10870 Add object entries for Ada.Calendar.[Arithmetic/Formatting/Time_Zones]
10871 (GNATRTL_TASKING_OBJS): Add Ada.Dispatching and
10872 Ada.Dispatching.Round_Robin.
10873 Added new unit Ada.Containers.Restricted_Bounded_Doubly_Linked_Lists
10874
10875 * Make-lang.in: Remove all references to gt-ada-decl.h.
10876 Add concatenation (s-strops/s-sopco3/s-sopco4/s-sopco5) to compiler
10877 sources.
10878 Add dependency on ada/s-restri.o for GNAT1 and GNATBIND objects.
10879 Update dependencies.
10880
10881 * system-freebsd-x86.ads: Make ZCX the default EH mechanism for FreeBSD
10882
108832006-10-31 Vincent Celier <celier@adacore.com>
10884
10885 * mlib-utl.adb (Initialized): Remove, no longer used
10886 (Initialize): Remove, no longer used
10887 (Ar): If Ar_Exec is null, get the location of the archive builder and,
10888 if there is one, the archive indexer. Fail if the archive builder cannot
10889 be found.
10890 (Gcc): If the driver path is unknown, get it. Fail if the driver cannot
10891 be found.
10892
108932006-10-31 Ed Schonberg <schonberg@adacore.com>
10894
10895 * sem_ch10.ads, sem_ch10.adb (Check_Redundant_Withs,
10896 Process_Body_Clauses): If the context of a body includes a use clause
10897 for P.Q then a with_clause for P in the same body is not redundant,
10898 even if the spec also has a with_clause on P.
10899 Add missing continuation mark to error msg
10900 (Build_Limited_Views): A limited view of a type is tagged if its
10901 declaration includes a record extension.
10902 (Analyze_Proper_Body): Set Corresponding_Stub field in N_Subunit
10903 node, even if the subunit has errors. This avoids malfunction by
10904 Lib.Check_Same_Extended_Unit in the presence of syntax errors.
10905 (Analyze_Compilation_Unit): Add circuit to make sure we get proper
10906 generation of obsolescent messages for with statements (cannot do
10907 this too early, or we cannot implement avoiding the messages in the
10908 case of obsolescent units withing obsolescent units).
10909 (Install_Siblings): If the with_clause is on a remote descendant of
10910 an ancestor of the current compilation unit, find whether there is
10911 a sibling child unit that is immediately visible.
10912 (Remove_Private_With_Clauses): New procedure, invoked after completing
10913 the analysis of the private part of a nested package, to remove from
10914 visibility the private with_clauses of the enclosing package
10915 declaration.
10916 (Analyze_With_Clause): Remove Check_Obsolescent call, this checking is
10917 now centralized in Generate_Reference.
10918 (Install_Limited_Context_Clauses): Remove superfluous error
10919 message associated with unlimited view visible through use
10920 and renamings. In addition, at the point in which the error
10921 is reported, we add the backslash to the text of the error
10922 to ensure that it is reported as a single error message.
10923 Use new // insertion for some continuation messages
10924 (Expand_Limited_With_Clause): Use copy of name rather than name itself,
10925 to create implicit with_clause for parent unit mentioned in original
10926 limited_with_clause.
10927 (Install_Limited_With_Unit): Set entity of parent identifiers if the
10928 unit is a child unit. For ASIS queries.
10929 (Analyze_Subunit): If the subunit appears within a child unit, make all
10930 ancestor child units directly visible again.
10931
109322006-10-31 Robert Dewar <dewar@adacore.com>
10933
10934 * par-ch10.adb (P_Context_Clause): Minor error message fix
10935
109362006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
10937 Javier Miranda <miranda@adacore.com>
10938
10939 * par-ch12.adb: Grammar update and cleanup.
10940 (P_Formal_Type_Definition, P_Formal_Derived_Type_Definition): Add
10941 support for synchronized derived type definitions.
10942 Add the new actual Abstract_Present to every call to
10943 P_Interface_Type_Definition.
10944 (P_Formal_Object_Declarations): Update grammar rules. Handle parsing of
10945 a formal object declaration with an access definition or a subtype mark
10946 with a null exclusion.
10947 (P_Generic_Association): Handle association with box, and others_choice
10948 with box, to support Ada 2005 partially parametrized formal packages.
10949
109502006-10-31 Robert Dewar <dewar@adacore.com>
10951 Javier Miranda <miranda@adacore.com>
6f7f72f9 10952
70198b9f
AC
10953 * par-ch3.adb (P_Range_Or_Subtype_Mark): Check for bad parentheses
10954 (P_Type_Declaration): Remove barrier against the reserved word "limited"
10955 after "abstract" to give support to the new syntax of AARM 3.4 (2/2).
10956 (P_Type_Declaration): Minor code cleanup. Add support for synchronized
10957 private extensions.
10958 (P_Type_Declaration): Add the new actual Abstract_Present to every call
10959 to P_Interface_Type_Definition.
10960 (P_Interface_Type_Definition): Addition of one formal to report an error
10961 if the reserved word abstract has been previously found.
10962 (P_Identifier_Declarations): Update grammar rules. Handle parsing of an
10963 object renaming declaration with an access definition or subtype mark
10964 with a possible null exclusion.
10965
10966 * par-ch9.adb: Minor error msg fix
10967
10968 * par-load.adb: Add missing continuation mark to error msg
10969
10970 * par-tchk.adb: (Wrong_Token): Code cleanup, use concatenation
10971
109722006-10-31 Vincent Celier <celier@adacore.com>
10973
10974 * prj-dect.adb (Parse_Attribute_Declaration): Do not issue warning for
10975 unknown attribute in unknown package or in package that does not need
10976 to be checked.
10977 (Parse_Package_Declaration): Do not issue warning for unknown package in
10978 quiet output.
10979
109802006-10-31 Vincent Celier <celier@adacore.com>
10981
10982 * prj-makr.adb (Packages_To_Check_By_Gnatname): New global constant
10983 (Make): Call Parse with Packages_To_Check_By_Gnatname for parameter
10984 Packages_To_Check.
10985
109862006-10-31 Vincent Celier <celier@adacore.com>
10987
10988 * prj-nmsc.adb (Check_Ada_Name): For children of package A, G, I and S
10989 on VMS, change "__" to '.' before checking the name.
10990 (Record_Ada_Source): Always add the source file name in the list of
10991 of sources, even if it is not the first time, as it is for another
10992 source index.
10993 (Get_Unit): Replace both '_' (after 'a', 'g', 'i' or 's') with a single
10994 dot, instead of replacing only the first '_'.
10995
10996 * prj-part.adb (Parse): Convert project file path to canonical form
10997
10998 * prj-proc.adb (Recursive_Process): Make sure that, when a project is
10999 extended, the project id of the project extending it is recorded in its
11000 data, even when it has already been processed as an imported project.
11001
110022006-10-31 Robert Dewar <dewar@adacore.com>
11003
11004 * repinfo.adb (List_Entities): Don't list entities from renaming
11005 declarations.
11006
110072006-10-31 Arnaud Charlet <charlet@adacore.com>
11008 Robert Dewar <dewar@adacore.com>
11009
11010 * restrict.ads, restrict.adb (Restriction_Active): Now returns False if
11011 only a restriction warning is active for the given restriction. This is
11012 desirable because we do not want to modify code in the case where only
11013 a warning is set.
11014 (Set_Profile_Restrictions): Make sure that a Profile_Warnings never
11015 causes overriding of real restrictions.
11016 Take advantage of new No_Restrictions constant.
11017
11018 * raise.h: (__gnat_set_globals): Change profile.
11019
110202006-10-31 Arnaud Charlet <charlet@adacore.com>
70198b9f 11021
6f7f72f9
EB
11022 * rtsfind.adb: Remove s-polint from comment as it exists no more.
11023
11024 * rtsfind.ads:
11025 Move entity RE_Get_Active_Partition_Id to package System.DSA_Services.
11026 Move all the entities in obsolete package System.PolyORB_Interface to
11027 System.Partition_Interface.
70198b9f
AC
11028 (RE_Storage_Size): New function in System.Tasking.
11029 (RE_Get_Ceiling): New entity.
11030 (RE_Set_Ceiling): New entity.
11031 (RO_PE_Get_Ceiling): New entity.
11032 (RO_RE_Set_Ceiling): New entity.
11033 (Inherit_CPP_DT): New entity
11034
110352006-10-31 Robert Dewar <dewar@adacore.com>
11036
11037 * scng.adb (Scan, case of numeric literal): Better msg for identifier
11038 starting with a digit.
11039
110402006-10-31 Ed Schonberg <schonberg@adacore.com>
11041 Thomas Quinot <quinot@adacore.com>
11042 Javier Miranda <miranda@adacore.com>
11043 Gary Dismukes <dismukes@adacore.com>
11044
11045 * sem_attr.ads, sem_attr.adb (Analyze_Access_Attribute): Diagnose
11046 properly an attempt to apply Unchecked_Access to a protected operation.
11047 (OK_Self_Reference): New subprogram to check the legality of an access
11048 attribute whose prefix is the type of an enclosing aggregate.
11049 Generalizes previous mechanism to handle attribute references nested
11050 arbitrarily deep within the aggregate.
11051 (Analyze_Access_Attribute): An access attribute whose prefix is a type
11052 can appear in an aggregate if this is a default-initialized aggregate
11053 for a self-referential type.
11054 (Resolve_Attribute, case Access): Ditto.
11055 Add support for new implementation defined attribute Stub_Type.
11056 (Eval_Attribute, case Attribute_Stub_Type): New case.
11057 (Analyze_Attribute, case Attribute_Stub_Type): New case.
11058 (Stream_Attribute_Available): Implement using new subprogram from
11059 sem_cat, Has_Stream_Attribute_Definition, instead of incorrect
11060 Has_Specified_Stream_Attribute flag.
11061 Disallow Storage_Size and Storage_Pool for access to subprogram
11062 (Resolve_Attribute, case 'Access et al): Take into account anonymous
11063 access types of return subtypes in extended return statements. Remove
11064 accessibility checks on anonymous access types when Unchecked_Access is
11065 used.
11066 (Analyze_Attribute): Add support for the use of 'Class to convert
11067 a class-wide interface to a tagged type.
11068 Add support for the attribute Priority.
11069 (Resolve_Attribute, case Attribute_Access): For Ada_05, add test for
11070 whether the designated type is discriminated with a constrained partial
11071 view and require static matching in that case.
11072 Add local variable Des_Btyp. The Designated_Type
11073 of an access to incomplete subtype is either its non-limited view if
11074 coming from a limited with or its etype if regular incomplete subtype.
11075
11076 * sem_cat.ads, sem_cat.adb (Validate_Remote_Access_To_Class_Wide_Type):
11077 Fix predicate to identify and allow cases of (expander-generated)
11078 references to tag of designated object of a RACW.
11079 (Validate_Static_Object_Name): In Ada 2005, a formal object is
11080 non-static, and therefore cannot appear as a primary in a preelaborable
11081 package.
11082 (Has_Stream_Attribute_Definition): New subprogram, abstracted from
11083 Has_Read_Write_Attributes.
11084 (Has_Read_Write_Attributes): Reimplement in termes of
11085 Has_Stream_Attribute_Definition.
11086 (Missing_Read_Write_Attributes): When checking component types in a
11087 record, unconditionally call Missing_Read_Write_Attributes recursively
11088 (remove guard checking for Is_Record_Type / Is_Access_Type).
11089
110902006-10-31 Robert Dewar <dewar@adacore.com>
11091
11092 * sem_ch11.adb (Analyze_Handled_Statements): Move final test for
11093 useless assignments here and conditionalize it on absence of exception
11094 handlers.
11095 (Analyze_Exception_Handlers): Small code reorganization of error
11096 detection code, for new handling of formal packages.
11097
110982006-10-31 Ed Schonberg <schonberg@adacore.com>
11099 Hristian Kirtchev <kirtchev@adacore.com>
6f7f72f9
EB
11100
11101 * sem_ch12.ads, sem_ch12.adb (Save_References): If node is an operator
70198b9f
AC
11102 that has been constant-folded, preserve information of original tree,
11103 for ASIS uses.
11104 (Analyze_Formal_Derived_Type): Set the limited present flag of the newly
11105 generated private extension declaration if the formal derived type is
11106 synchronized. Carry synchronized present over to the generated private
11107 extension.
11108 (Validate_Derived_Type_Instance): Ensure that the actual of a
11109 synchronized formal derived type is a synchronized tagged type.
11110 (Instantiate_Formal_Package): When creating the instantiation used to
11111 validate the actual package of a formal declared without a box, check
11112 whether the formal itself depends on a prior actual.
11113 (Instantiate_Formal_Subprogram): Create new entities for the defining
11114 identifiers of the formals in the renaming declaration, for ASIS use.
11115 (Instantiate_Formal_Subprogram, Instantiate_Formal_Type): When creating
11116 a renaming declaration or a subtype declaration for an actual in an
11117 instance, capture location information of declaration in generic, for
11118 ASIS use.
11119 (Instantiate_Formal_Package): Add comments on needed additional tests.
11120 AI-317 (partial parametrization) is fully implemented.
11121 (Validate_Private_Type_Instance): Add check for actual which
11122 must have preelaborable initialization
11123 Use new // insertion for some continuation messages
11124 (Analyze_Formal_Object_Declaration): Change usage of Expression to
11125 Default_Expression. Add type retrieval when the declaration has an
11126 access definition. Update premature usage of incomplete type check.
11127 (Check_Access_Definition): New subsidiary routine. Check whether the
11128 current compilation version is Ada 05 and the supplied node has an
11129 access definition.
11130 (Instantiate object): Alphabetize local variables. Handle the creation
11131 of new renaming declarations with respect to the kind of definition
11132 used - either an access definition or a subtype mark. Guard against
11133 unnecessary error message in the context of anonymous access types after
11134 they have been resolved. Add check for required null exclusion in a
11135 formal object declaration.
11136 (Switch_View): A private subtype of a non-private type needs to be
11137 switched (the base type can have been switched without its private
11138 dependents because of the last branch of Check_Private_View.
11139 (Check_Private_View): Do not recompute Base_Type (T), instead use cached
11140 value from BT.
11141 (Instantiate_Type): Emit an error message whenever a class-wide type of
11142 a tagged incomplete type is used as a generic actual.
11143 (Find_Actual_Type): Extend routine to handle a component type in a child
11144 unit that is imported from a formal package in a parent.
11145 (Validate_Derived_Type_Instance): Check that analyzed formal and actual
11146 agree on constrainedness, rather than checking against ultimate ancestor
11147 (Instantiate_Subprogram_Body): Create a cross-reference link to the
11148 generic body, for navigation purposes.
11149
111502006-10-31 Robert Dewar <dewar@adacore.com>
11151 Thomas Quinot <quinot@adacore.com>
11152
11153 * sem_ch13.adb: Storage pool cannot be given for access to subprogram
11154 type.
11155 (New_Stream_Subprogram): When processing an attribute definition clause
11156 for a stream-oriented subprogram, record an entity node occurring at
11157 the point of clause to use for checking the visibility of the clause,
11158 as defined by 8.3(23) as amended by AI-195.
11159 (New_Stream_Subprogram): New procedure, factoring behaviour from both
11160 New_Stream_Function and New_Stream_Procedure.
11161 (New_Stream_Function, New_Stream_Procedure): Removed.
11162 (Analyze_Attribute_Definition_Clause, case Address): Check new
11163 Alignment_Check check
11164
111652006-10-31 Ed Schonberg <schonberg@adacore.com>
11166 Javier Miranda <miranda@adacore.com>
11167 Robert Dewar <dewar@adacore.com>
11168
11169 * sem_ch4.adb (Try_Primitive_Operation): Code cleanup to ensure that we
11170 generate the same errors compiling under -gnatc.
11171 (Try_Object_Operation): If no candidate interpretation succeeds, but
11172 there is at least one primitive operation with the right name, report
11173 error in call rather than on a malformed selected component.
11174 (Analyze_Selected_Component): If the prefix is an incomplete type from
11175 a limited view, and the full view is available, use the full view to
11176 determine whether this is a prefixed call to a primitive operation.
11177 (Operator_Check): Verify that a candidate interpretation is a binary
11178 operation before checking the type of its second formal.
11179 (Analyze_Call): Add additional warnings for function call contexts not
11180 yet supported.
11181 (Analyze_Allocator): Move the check for "initialization not allowed for
11182 limited types" after analyzing the expression. This is necessary,
11183 because OK_For_Limited_Init looks at the structure of the expression.
11184 Before analysis, we don't necessarily know what sort of expression it
11185 is. For example, we don't know whether F(X) is a function call or an
11186 indexed component; the former is legal in Ada 2005; the latter is not.
11187 (Analyze_Allocator): Correct code for AI-287 -- extension aggregates
11188 were missing. We also didn't handle qualified expressions. Now also
11189 allow function calls. Use new common routine OK_For_Limited_Init.
11190 (Analyze_Type_Conversion): Do not perform some legality checks in an
11191 instance, because the error message will be redundant or spurious.
11192 (Analyze_Overloaded_Selected_Component): Do not do style check when
11193 setting an entity, since we do not know it is the right entity yet.
11194 (Analyze_Selected_Component): Move Generate_Reference call to Sem_Res
11195 (Analyze_Overloaded_Selected_Component): Same change
11196 (Analyze_Selected_Component): Remove unnecessary prefix type retrieval
11197 since regular incomplete subtypes are transformed into corresponding
11198 subtypes of their full views.
11199 (Complete_Object_Operation): Treat name of transformed subprogram call
11200 as coming from source, for browsing purposes.
11201 (Try_Primitive_Operation): If formal is an access parameter, compare
11202 with base type of object to determine whether it is a primitive
11203 operation.
11204 (Operator_Check): If no interpretation of the operator matches, check
11205 whether a use clause on any candidate might make the operation legal.
11206 (Try_Class_Wide_Operation): Check whether the first parameter is an
11207 access type whose designated type is class-wide.
11208
112092006-10-31 Robert Dewar <dewar@adacore.com>
11210 Ed Schonberg <schonberg@adacore.com>
11211 Gary Dismukes <dismukes@adacore.com>
11212
11213 * sem_ch5.ads, sem_ch5.adb (Analyze_Loop_Statement): Add circuit to
11214 warn on infinite loops.
11215 Add \\ to some continuation messages
11216 (Analyze_Assignment_Statement): Call Warn_On_Useless_Assignment
11217 (Process_Bounds): If the bounds are integer literals that result from
11218 constant-folding, and they carry a user-defined type, preserve that type
11219 rather than treating this as an integer range.
11220 (Analyze_Exit_Statement): Test for E_Return_Statement in legality check.
11221 (Analyze_Goto_Statement): Test for E_Return_Stateemnt in legality check.
11222 (Analyze_Assignment_Statement): Add call to Check_Elab_Assign for
11223 left hand side of assignment.
11224 (Analyze_Assignment): Add suport to manage assigments to the attribute
11225 priority of a protected object.
11226 (Check_Possible_Current_Value_Condition): Allow fully qualified names
11227 not just identifiers.
11228 (Check_Possible_Current_Value_Condition): Acquire left operand of AND
11229 or AND THEN for possible tracking.
11230 (Analyze_Iteration_Scheme): Check for setting Current_Value for the
11231 case of while loops so we can track values in the loop body.
11232
112332006-10-31 Ed Schonberg <schonberg@adacore.com>
11234 Hristian Kirtchev <kirtchev@adacore.com>
11235 Bob Duff <duff@adacore.com>
6f7f72f9 11236
70198b9f
AC
11237 * sem_ch6.ads, sem_ch6.adb (Analyze_Subprogram_Declaration): A null
11238 procedure cannot be a protected operation (it is a basic_declaration,
11239 not a subprogram_declaration).
11240 (Check_Overriding_Indicator): Rename formal Does_Override to Overridden_
11241 Subp. Add logic for entry processing.
11242 (Check_Synchronized_Overriding): New procedure in New_Overloaded_Entity.
11243 Determine whether an entry or subprogram of a protected or task type
11244 override an inherited primitive of an implemented interface.
11245 (New_Overloaded_Entity): Add calls to Check_Synchronized_Overriding.
11246 Update the actual used in calls to Check_Overriding_Indicator.
11247 (Analyze_Generic_Subprogram_Body): If the subprogram is a child unit,
11248 generate the proper reference to the parent unit, for cross-reference.
11249 (Analyze_Subprogram_Declaration): Protect Is_Controlling_Formal with
11250 Is_Formal.
11251 Add -gnatd.l --Use Ada 95 semantics for limited function returns,
11252 (Add_Extra_Formal): Revise procedure to allow passing in associated
11253 entity, scope, and name suffix, and handle setting of the new
11254 Extra_Formals field.
11255 (Create_Extra_Formals): Change existing calls to Add_Extra_Formal to
11256 pass new parameters. Add support for adding the new extra access formal
11257 for functions whose calls are treated as build-in-place.
11258 (Analyze_A_Return_Statement): Correct casing in error message.
11259 Move Pop_Scope to after Analyze_Function_Return, because an extended
11260 return statement really is a full-fledged scope. Otherwise, visibility
11261 doesn't work right. Correct use of "\" for continuation messages.
11262 (Analyze_Function_Return): Call Analyze on the Obj_Decl, rather than
11263 evilly trying to call Analyze_Object_Declaration directly. Otherwise,
11264 the node doesn't get properly marked as analyzed.
11265 (Analyze_Subprogram_Body): If subprogram is a function that returns
11266 an anonymous access type that denotes a task, build a Master Entity
11267 for it.
11268 (Analyze_Return_Type): Add call to Null_Exclusion_Static_Checks. Verify
11269 proper usage of null exclusion in a result definition.
11270 (Process_Formals): Code cleanup and new error message.
11271 (Process_Formals): Detect incorrect application of null exclusion to
11272 non-access types.
11273 (Conforming_Types): Handle conformance between [sub]types and itypes
11274 generated for entities that have null exclusions applied to them.
11275 (Maybe_Primitive_Operation): Add an additional type retrieval when the
11276 base type is an access subtype. This case arrises with null exclusions.
11277 (New_Overloaded_Entity): Do not remove the overriden entity from the
11278 homonym chain if it corresponds with an abstract interface primitive.
11279 (Process_Formals): Replace membership test agains Incomplete_Kind with a
11280 call to the synthesized predicate Is_Incomplete_Type.
11281 (Analyze_Subprogram_Body): Check wrong placement of abstract interface
11282 primitives.
11283 (Analyze_Subprogram_Declaration): Check that abstract interface
11284 primitives are abstract or null.
11285 (Analyze_Subprogram_Specification): Remove previous check for abstract
11286 interfaces because it was not complete.
11287 (Has_Interface_Formals): Removed.
11288
112892006-10-31 Ed Schonberg <schonberg@adacore.com>
11290 Javier Miranda <miranda@adacore.com>
11291
11292 * sem_ch7.adb (Check_Anonymous_Access_Types): New procedure, subsidiary
11293 of Analyze_Package_Body, to create Itype references for anonymous
11294 access types created in the package declaration, whose designated types
11295 may have only a limited view.
11296 (Analyze_Package_Specification): For the private part of a nested
11297 package, install private_with_clauses of enclosing compilation unit if
11298 we are in its visible part.
11299 (Declare_Inherited_Private_Subprograms): Complete barrier
11300 to ensure that the primitive operation has an alias to some parent
11301 primitive. This is now required because, after the changes done for the
11302 implementation of abstract interfaces, the contents of the list of
11303 primitives has entities whose alias attribute references entities of
11304 such list of primitives.
11305 (Analyze_Package_Specification): Simplify code that handles parent units
11306 of instances and formal packages.
11307 (Uninstall_Declarations): Check the convention consistency among
11308 primitive overriding operations of a tagged record type.
11309
113102006-10-31 Robert Dewar <dewar@adacore.com>
11311 Hristian Kirtchev <kirtchev@adacore.com>
11312 Javier Miranda <miranda@adacore.com>
11313 Ed Schonberg <schonberg@adacore.com>
6f7f72f9 11314
70198b9f
AC
11315 * sem_ch8.adb: Minor error msg rewording
11316 (Undefined): When checking for misspellings, invert arguments (to get
11317 expected and found set right)
11318 (Analyze_Subprogram_Renaming): Propagate Is_Pure, Is_Preelaborated
11319 (Analyze_Generic_Renaming): Same fix
11320 (Use_One_Package): Do not take into account the internal entities of
11321 abstract interfaces during the analysis of entities that are marked
11322 as potentially use-visible.
11323 (Find_Type): Handle the case of an attribute reference for
11324 implementation defined attribute Stub_Type (simply let the analysis of
11325 the attribute reference rewrite it).
11326 (Use_One_Type, End_Use_Type): Reject a reference to a limited view of a
11327 type that appears in a Use_Type clause.
11328 (Analyze_Object_Renaming): Add support for renaming of the Priority
11329 attribute.
11330 (Find_Type): In Ada 2005, a task type can be used within its own body,
11331 when it appears in an access definition.
11332 (Analyze_Object_Renaming): Remove warning on null_exclusion.
11333 (Analyze_Object_Renaming): Introduce checks for required null exclusion
11334 in a formal object declaration or in a subtype declaration.
11335 (Analyze_Subprogram_Renaming): Add call to Check_Null_Exclusion.
11336 (Check_Null_Exclusion): New local routine to
11337 Analyze_Subprogram_Renaming. Check whether the formals and return
11338 profile of a renamed subprogram have required null exclusions when
11339 their counterparts of the renaming already impose them.
11340 (In_Generic_Scope): New local routine to Analyze_Object_Renaming.
11341 Determine whether an entity is inside a generic scope.
11342 (In_Open_Scope): First pass of documentation update.
11343 (Find_Expanded_Name): Add support for shadow entities associated with
11344 limited withed packages. This is required to handle nested packages.
11345 (Analyze_Package_Renaming): Remove the restriction imposed by AI-217
11346 that makes a renaming of a limited withed package illegal.
11347
113482006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
11349 Ed Schonberg <schonberg@adacore.com>
11350
11351 * sem_ch9.adb (Analyze_Protected_Definition): Remove call to
11352 Check_Overriding_Indicator.
11353 (Analyze_Task_Definition): Ditto.
11354 (Analyze_Protected_Type, Analyze_Task_Type): Code cleanup.
11355 (Check_Overriding_Indicator): To find overridden interface operation,
11356 examine only homonyms that have an explicit subprogram declaration, not
11357 inherited operations created by an unrelated type derivation.
11358 (Check_Overriding_Indicator): When checking for the presence of "null"
11359 in a procedure, ensure that the queried node is a procedure
11360 specification.
11361 (Matches_Prefixed_View_Profile): Add mechanism to retrieve the parameter
11362 type when the formal is an access to variable.
11363 (Analyze_Protected_Type): Add check for Preelaborable_Initialization
11364 (Analyze_Task_Type): Same addition
11365 (Analyze_Entry_Declaration): Call Generate_Reference_To_Formals, to
11366 provide navigation capabilities for entries.
11367
113682006-10-31 Hristian Kirtchev <kirtchev@adacore.com>
11369 Ed Schonberg <schonberg@adacore.com>
11370 Javier Miranda <miranda@adacore.com>
11371 Gary Dismukes <dismukes@adacore.com>
11372
11373 * sem_disp.adb (Check_Dispatching_Operation): Do not flag subprograms
11374 inherited from an interface ancestor by another interface in the
11375 context of an instance as 'late'.
11376 (Is_Tag_Indeterminate, Propagate_Tag): Handle properly the dereference
11377 of a call to a function that dispatches on access result.
11378 (Check_Dispatching_Operation): In case of late overriding of a primitive
11379 that covers abstract interface subprograms we register it in all the
11380 secondary dispatch tables associated with abstract interfaces.
11381 (Check_Dispatching_Call): Add check that a dispatching call is not made
11382 to a function with a controlling result of a limited type. This is a
11383 current implementation restriction.
11384 (Check_Controlling_Formal): Remove bogus checks for E.2.2(14).
11385 (Check_Dispatching_Operation): Do no emit a warning if the controlling
11386 argument is an interface type that is a generic formal.
11387 (Is_Interface_Subprogram): Removed.
11388 (Check_Dispatching_Operation): If the subprogram is not a dispatching
11389 operation, check the formals to handle the case in which it is
11390 associated with an abstract interface type.
11391
113922006-10-31 Robert Dewar <dewar@adacore.com>
11393 Ed Schonberg <schonberg@adacore.com>
11394
11395 * sem_elab.ads, sem_elab.adb (Check_Elab_Assign): New procedure
11396 Add new calls to this procedure during traversal
11397 (Activate_Elaborate_All_Desirable): Do not set elaboration flag on
11398 another unit if expansion is disabled.
11399
114002006-10-31 Robert Dewar <dewar@adacore.com>
11401
11402 * sem_eval.adb (Compile_Time_Compare): Make use of information from
11403 Current_Value in the conditional case, to evaluate additional
11404 comparisons at compile time.
11405
114062006-10-31 Ed Schonberg <schonberg@adacore.com>
11407 Hristian Kirtchev <kirtchev@adacore.com>
11408 Javier Miranda <miranda@adacore.com>
11409
11410 * sem_type.adb (Add_One_Interp): If node is an indirect call, preserve
11411 subprogram type to provide better diagnostics in case of ambiguity.
11412 (Covers): Handle coverage of formal and actual anonymous access types in
11413 the context of generic instantiation.
11414 (Covers/Interface_Present_In_Ancestors): Use the base type to manage
11415 abstract interface types; this is required to handle concurrent types
11416 with discriminants and abstract interface types.
11417 (Covers): Include type coverage of both regular incomplete subtypes and
11418 incomplete subtypes of incomplete type visibles through a limited with
11419 clause.
11420
114212006-10-31 Robert Dewar <dewar@adacore.com>
11422 Hristian Kirtchev <kirtchev@adacore.com>
11423 Ed Schonberg <schonberg@adacore.com>
6f7f72f9
EB
11424
11425 * sem_util.ads, sem_util.adb (Enter_Name): Exclude -gnatwh warning
70198b9f
AC
11426 messages for entities in packages which are not used.
11427 (Collect_Synchronized_Interfaces): New procedure.
11428 (Overrides_Synchronized_Primitive): New function.
11429 (Denotes_Discriminant): Extend predicate to apply to task types.
11430 Add missing continuation marks in error msgs
11431 (Unqualify): New function for removing zero or more levels of
11432 qualification from an expression. There are numerous places where this
11433 ought to be used, but we currently only deal properly with zero or one
11434 level.
11435 (In_Instance); The analysis of the actuals in the instantiation of a
11436 child unit is not within an instantiation, even though the parent
11437 instance is on the scope stack.
11438 (Safe_To_Capture_Value): Exclude the case of variables that are
11439 renamings.
11440 (Check_Obsolescent): Removed
11441 (Is_Aliased_View): A reference to an enclosing instance in an aggregate
11442 is an aliased view, even when rewritten as a reference to the target
11443 object in an assignment.
11444 (Get_Subprogram_Entity): New function
11445 (Known_To_Be_Assigned): New function
11446 (Type_Access_Level): Compute properly the access level of a return
11447 subtype that is an anonymous access type.
11448 (Explain_Limited_Type): Correct use of "\" for continuation messages.
11449 (Is_Transfer): The new extended_return_statement causes a transfer of
11450 control.
11451 (Has_Preelaborable_Initialization): New function
11452 (Has_Null_Exclusion): New function. Given a node N, determine whether it
11453 has a null exclusion depending on its Nkind.
11454 Change Is_Lvalue to May_Be_Lvalue
11455 (May_Be_Lvalue): Extensive additional code to deal with subprogram
11456 arguments (IN parameters are not Lvalues, IN OUT parameters are).
11457 (Safe_To_Capture_Value): Extend functionality so it can be used for
11458 the current value condition case.
11459 (Has_Compatible_Alignment): New function
11460 (Is_Dependent_Component_Of_Mutable_Object): Revise the tests for mutable
11461 objects to handle the Ada 2005 case, where aliasedness no longer implies
11462 that the object is constrained. In particular, for dereferenced names,
11463 the designated object must be assumed to be unconstrained.
11464 (Kill_Current_Values): Properly deal with the case where we encounter
11465 a loop in the scope chain.
11466 (Safe_To_Capture_Value): Do not let a loop stop us from capturing
11467 a value.
11468 (Compile_Time_Constraint_Error): Improve error message in error case
11469
11470 * exp_ch13.adb (Expand_N_Freeze_Entity): Remove the freezing node
11471 associated with entities of abstract interface primitives.
11472 Call Apply_Address_Clause_Check instead of Apply_Alignment_Check
11473
114742006-10-31 Robert Dewar <dewar@adacore.com>
11475
11476 * s-osinte-tru64.adb:
11477 Mark Asm statements Volatile to prevent warnings (seems a
11478 reasonable change anyway)
11479 Fixes new warnings
11480
11481 * s-mastop-irix.adb: Add Volatile to Asm statements
11482 Suppresses warning, and seems appropriate in any case
11483
11484 * s-osinte-vms.adb: Add Volatile to Asm statement
11485
11486 * s-vaflop-vms-alpha.adb: Add Volatile to Asm statements
11487
11488 * exp_code.ads, exp_code.adb (Asm_Input_Value): Note that Error can be
11489 returned.
11490 Add call to Check_Code_Statement
11491
114922006-10-31 Robert Dewar <dewar@adacore.com>
11493 Ed Schonberg <schonberg@adacore.com>
11494 Bob Duff <duff@adacore.com>
11495
11496 * sinfo.ads, sinfo.adb (Set_Synchronized_Present,
11497 Synchronized_Present): Add Formal_Derived_Type_Definition and
11498 Private_Extension_Declaration to the list of assertions.
11499 (Is_Entry_Barrier_Function): New flag
11500 (Has_Self_Reference): New flag on aggregates, to indicate that they
11501 contain a reference to the enclosing type, inserted through a default
11502 initialization.
11503 (Next_Rep_Item): Move from Node4 to Node5.
11504 (Entity): Add this field for N_Attribute_Definition_Clause.
11505 (Comes_From_Extended_Return_Statement): New flag on N_Return_Statement
11506 (N_Return_Object_Declaration): Remove this node kind. We now use
11507 N_Object_Declaration instead.
11508 (Actual_Designated_Subtype): Move to a different place to make room in
11509 N_Extended_Return_Statement.
11510 (Procedure_To_Call): Move to a different place to make room in
11511 N_Extended_Return_Statement.
11512 (Return_Type): Removed this field to make room in return statements
11513 (both kinds).
11514 (Return_Statement_Entity): New field in return statements, in part to
11515 replace Return_Type, and in part to support the fact that return
11516 statements are now pushed on the scope stack during semantic analysis.
11517 (Return_Object_Declarations): New field to support extended return
11518 statements.
11519 (N_Extended_Return_Statement): New node for extended_return_statement
11520 nonterminal.
11521 (N_Return_Object_Declaration): New node for part of
11522 extended_return_statement nonterminal. Needed because all the necessary
11523 fields won't fit in N_Extended_Return_Statement.
11524 Generic_associations now carry the Box_Present flag, to indicate a
11525 default for an actual in a partially parametrized formal package.
11526
6f7f72f9 11527 * snames.h, snames.ads, snames.adb: Add definition for Validity_Check
70198b9f
AC
11528 (Preset_Names): Add entries for Priority_Specific_Dispatching pragma
11529 and for the new predefined dispatching policies: EDF_Across_Priorities,
11530 Non_Preemptive_Within_Priorities, and Round_Robin_Within_Priorities.
11531 Introduce new name Stub_Type for implementation defined attribute.
11532 Add pragma Preelaborable_Initialization
11533 Add entry for Priority attribute.
11534 Add Pragma_Wide_Character_Encoding
11535 (Get_Convention_Name): Given a convention id, this function returns the
11536 corresponding name id from the names table.
11537
115382006-10-31 Ed Schonberg <schonberg@adacore.com>
11539 Robert Dewar <dewar@adacore.com>
11540 Bob Duff <duff@adacore.com>
11541
11542 * sprint.adb (Sprint_Node_Actual, case Parameter_Specification): Do not
11543 print null exclusion twice in the case of an access definition,
11544 Implement new -gnatL switch
11545 Remove N_Return_Object_Declaration. We now use
11546 N_Object_Declaration instead. Implement the case for
11547 N_Extended_Return_Statement. Alphabetize the cases.
11548 Add cases for new nodes N_Extended_Return_Statement and
11549 N_Return_Object_Declaration. The code is not yet written.
11550 Update the output for N_Formal_Object_Declaration
11551 and N_Object_Renaming_Declaration.
11552 (Write_Itype): Account for the case of a modular integer subtype whose
11553 base type is private.
11554
115552006-10-31 Arnaud Charlet <charlet@adacore.com>
11556
11557 * s-restri.ads, s-restri.adb: Mark this package as Preelaborate.
11558 Remove elaboration code, now done in the binder.
11559
11560 * s-rident.ads: Make this unit Preelaborate.
11561 (No_Restrictions): New constant used to clean up code and follow
11562 preelaborate constraints.
11563
11564 * s-stalib.adb:
11565 Add System.Restrictions dependence, referenced directly from the
11566 binder generated file.
11567
115682006-10-31 Gary Dismukes <dismukes@adacore.com>
11569
11570 * s-scaval.adb (Initialize): Add new Boolean flag AFloat that is set
11571 True when AAMP extended floating-point is in use (48-bit). Change type
11572 ByteLF to ByteLLF, add new array type ByteLF and condition the size of
11573 the two byte array types on AFloat. Change type of IV_Ilf overlay
11574 variable from Byte8 to ByteLF. Add appropriate initializations of
11575 floating-point overlays for AAMP cases.
11576
115772006-10-31 Javier Miranda <miranda@adacore.com>
11578
11579 * s-tpoben.ads, s-tpoben.adb, s-taprob.ads, s-taprob.adb
11580 (Get_Ceiling): New subprogram that returns
11581 the ceiling priority of the protected object.
11582 (Set_Ceiling): New subprogram that sets the new ceiling priority of
11583 the protected object.
11584
11585 * s-tarest.adb: (Create_Restricted_Task): Fix potential CE.
11586
11587 * s-taskin.ads, s-taskin.adb: (Storage_Size): New function.
11588
115892006-10-31 Jose Ruiz <ruiz@adacore.com>
11590
11591 * s-tpobop.adb (Requeue_Call): Introduce a dispatching point when
11592 requeuing to the same protected object to give higher priority tasks
11593 the opportunity to execute.
11594
115952006-10-31 Robert Dewar <dewar@adacore.com>
11596
11597 * widechar.adb (Is_Start_Of_Wide_Char): In case of brackets encoding,
11598 add more precise check for the character sequence that follows '[' to
11599 avoid possible confusion in case if '[' is the last character of a
11600 string literals.
11601 (Scan_Wide): Always allow brackets encoding
11602
116032006-10-31 Olivier Hainque <hainque@adacore.com>
11604
11605 * s-stchop.ads: make this unit preelaborate. This is desirable in
11606 general and made mandatory by the use of this unit by s-taprop which
11607 is itself preelaborate.
11608
11609 * s-stchop-vxworks.adb (Set_Stack_Info, Task_Descriptor type): Add
11610 Td_Events component.
11611
116122006-10-31 Vincent Celier <celier@adacore.com>
11613
11614 * a-dirval-vms.adb (Invalid_Character): Specify that digits are allowed
11615 in file names.
11616
116172006-10-31 Vincent Celier <celier@adacore.com>
11618
11619 * a-direct.ads, a-direct.adb (Search): New procedure in Ada 2005
11620
116212006-10-31 Vincent Celier <celier@adacore.com>
11622
11623 * makegpr.adb (Check_Compilation_Needed): Take into account path names
11624 with spaces.
11625 (Check_Compilation_Needed): When checking a C or C++ source, do not
11626 resolve symbolic links.
11627 (Display_Command): New Boolean parameter Ellipse, defaulted to False.
11628 When not in verbose mode and Ellipse is True, display "..." for the
11629 first argument with Display set to False.
11630 (Build_Global_Archive): Always set Display True for the first object
11631 file. Call Display_Command with Ellipse set to True.
11632
116332006-10-31 Matt Heaney <heaney@adacore.com>
11634
11635 * a-crbtgo.ads: Commented each subprogram
11636
11637 * a-crbtgo.adb: Added reference to book from which algorithms were
11638 adapted.
11639
6f7f72f9 11640 * a-crbtgk.ads, a-crbtgk.adb (Generic_Insert_Post): pass flag to
70198b9f
AC
11641 indicate which child.
11642 (Generic_Conditional_Insert): changed parameter name from "Success" to
11643 "Inserted".
11644 (Generic_Unconditional_Insert_With_Hint): improved algorithm
11645
11646 * a-coorse.adb (Replace_Element): changed parameter name in call to
11647 conditional insert operation.
11648
11649 * a-convec.adb, a-coinve.adb (Insert): removed obsolete comment
11650
11651 * a-cohama.adb (Iterate): manipulate busy-bit here, instead of in
11652 Generic_Iteration
11653
11654 * a-ciorse.adb (Replace_Element): changed parameter name in call to
11655 conditional insert operation.
11656
11657 * a-cihama.adb (Iterate): manipulate busy-bit here, instead of in
11658 Generic_Iteration.
11659
11660 * a-cidlli.ads, a-cidlli.adb (Splice): Position param is now mode in
11661 instead of mode inout.
11662
11663 * a-chtgop.adb (Adjust): modified comments to reflect current AI-302
11664 draft
11665 (Generic_Read): preserve existing buckets array if possible
11666 (Generic_Write): don't send buckets array length anymore
11667
11668 * a-cdlili.ads, a-cdlili.adb (Splice): Position param is now mode in
11669 instead of mode inout.
11670
11671 * a-cihase.adb (Difference): iterate over smaller of Tgt and Src sets
11672 (Iterate): manipulate busy-bit here, instead of in Generic_Iteration
11673
11674 * a-cohase.adb (Difference): iterate over smaller of Tgt and Src sets
11675 (Iterate): manipulate busy-bit here, instead of in Generic_Iteration
11676 (Replace_Element): local operation is now an instantiation
11677
11678 * a-chtgke.ads, a-chtgke.adb (Generic_Conditional_Insert): manually
11679 check current length.
11680 (Generic_Replace_Element): new operation
11681
116822006-10-31 Doug Rupp <rupp@adacore.com>
11683
11684 * g-trasym-vms-alpha.adb: Dummy_User_Act_Proc: New function.
11685 Call TBK$SYMBOLIZE without omitting parameters.
11686
116872006-10-31 Vincent Celier <celier@adacore.com>
11688
11689 * symbols-processing-vms-ia64.adb,
11690 symbols-processing-vms-alpha.adb (Process): Do not include symbols
11691 that come from generic instantiations in bodies.
11692
116932006-10-31 Pat Rogers <rogers@adacore.com>
11694
11695 * a-rttiev.ads, a-rttiev.adb:
11696 This is a significant redesign primarily for the sake of automatic
11697 timer task termination but also to fix a design flaw.
11698 Therefore we are now using an RTS lock, instead of a protected
11699 object, to provide mutual exclusion to the queue of pending events
11700 and the type Timing_Event is no longer a protected type.
11701
117022006-10-31 Robert Dewar <dewar@adacore.com>
11703 Cyrille Comar <comar@adacore.com>
11704 Ben Brosgol <brosgol@adacore.com>
11705
11706 * debug.adb: Update flags documentation
11707
6f7f72f9
EB
11708 * gnat_ugn.texi: Add documentation for new -gnatwq switch
11709 Clean up documentation for several other warning switches
11710 Clarify how task stack size can be specified with various
11711 versions of Windows.
11712 Add note that -gnatVo includes ranges including loops
70198b9f
AC
11713 Add documentation for -gnatL switch
11714 Add note on elaboration warning for initializing variables
11715 Add documentation for new -gnatwt warning switch
11716 Document new form of pragma Warnings (On|Off, string)
11717 Add comment on use of pragma Warnings to control warnings
11718 Add documentation for -gnatjnn switch
11719 Modify section on interfacing with C for VMS 64-bit.
11720 Add doc for -gnatVe/E
11721 Add documentation of new warning flags -gnatww/-gnatwW
11722 Add warnings about address clause overlays to list of warnings
11723 (Exception Handling Control): Document that the option --RTS must be
11724 used consistently for gcc and gnatbind.
11725 Clarify that inlining is not always possible
11726 Update documentation on pragma Unchecked_Union.
11727
11728 * gnat_rm.texi:
11729 Add documentation for new extended version of pragma Obsolescent
11730 Add documentation for implementation defined attribute 'Stub_Type.
11731 Add note on use of Volatile in asm statements
11732 Add documentation on use of pragma Unreferenced in context clause
11733 Document new form of pragma Warnings (On|Off, pattern)
11734 Document pragma Wide_Character_Encoding
11735 Add note that pragma Restrictions (No_Elaboration_Code) is only fully
11736 enforced if code generation is active.
11737 Add section on pragma Suppress to document GNAT specific check
11738 Alignment_Check
11739 Clarify difference between No_Dispatching_Calls & No_Dispatch.
11740 Add documentation for pragma Restrictions (No_Elaboration_Code)
11741
11742 * gnat-style.texi:
11743 Add comments on layout of subprogram local variables in the
11744 presence of nested subprograms.
11745
6f7f72f9 11746 * ug_words: Resync.
70198b9f
AC
11747
11748 * elists.ads: Minor reformatting
11749 Node returns Node_Or_Entity_Id (doc change only)
11750
11751 * xgnatugn.adb: Replace ACADEMICEDITION with GPLEDITION
11752
11753 * g-arrspl.ads (Create): Update comments.
11754
11755 * sem.ads: Add details on the handling of the scope stack.
11756
6f7f72f9 11757 * usage.adb: Update documentation.
70198b9f
AC
11758
11759 * validsw.ads, validsw.adb:
11760 Add definition of Validity_Check_Components and implement -gnatVe/E
11761
6f7f72f9 11762 * vms_data.ads: Add missing VMS qualifiers.
70198b9f
AC
11763
11764 * s-addope.ads: Add documentation on overflow and divide by zero
11765
117662006-10-31 Robert Dewar <dewar@adacore.com>
11767 Thomas Quinot <quinot@adacore.com>
11768 Arnaud Charlet <charlet@adacore.com>
11769
11770 * fmap.adb: Put routines in alpha order
11771
11772 * g-boumai.ads: Remove redundant 'in' keywords
11773
11774 * g-cgi.adb: Minor reformatting
11775
11776 * g-cgi.ads: Remove redundant 'in' keywords
11777
11778 * get_targ.adb: Put routines in alpha order
11779
11780 * prj-attr.ads: Minor reformatting
11781
11782 * s-atacco.ads: Minor reformatting
11783
11784 * scn.adb: Put routines in alpha order
11785
11786 * sinput-l.adb: Minor comment fix
11787
11788 * sinput-p.adb: Minor comment fix
11789
11790 * s-maccod.ads: Minor reformatting
11791
11792 * s-memory.adb: Minor reformatting
11793
11794 * s-htable.adb: Fix typo in comment.
11795
11796 * s-secsta.adb: Minor comment update.
11797
11798 * s-soflin.adb: Minor reformatting
11799
11800 * s-stoele.ads:
11801 Add comment about odd qualification in Storage_Offset declaration
11802
11803 * s-strxdr.adb:
11804 Remove unnecessary 'in' keywords for formal parameters.
11805
11806 * treeprs.adt: Minor reformatting
11807
11808 * urealp.adb: Put routines in alpha order
11809
11810 * s-wchcon.ads, s-wchcon.adb (Get_WC_Encoding_Method): New version
11811 taking string.
11812
11813 * s-asthan-vms-alpha.adb: Remove redundant 'in' keywords
11814
11815 * g-trasym-vms-ia64.adb: Remove redundant 'in' keywords
11816
11817 * env.c (__gnat_unsetenv): Unsetenv is unavailable on LynxOS, so
11818 workaround as on other platforms.
11819
11820 * g-eacodu-vms.adb: Remove redundant 'in' keywords
11821 * g-expect-vms.adb: Remove redundant 'in' keywords
11822
11823 * gnatdll.adb (Add_Files_From_List): Handle Name_Error and report a
11824 clear error message if the list-of-files file cannot be opened.
11825
11826 * g-thread.adb (Unregister_Thread_Id): Add use type Thread_Id so the
11827 equality operator is always visible.
11828
11829 * lang.opt: Woverlength-strings: New option.
11830
11831 * nmake.adt:
11832 Update copyright, since nmake.ads and nmake.adb have changed.
11833
11834 * osint-b.ads, osint-b.adb (Time_From_Last_Bind): removed function .
11835 (Binder_Output_Time_Stamps_Set): removed.
11836 (Old_Binder_Output_Time_Stamp): idem.
11837 (New_Binder_Output_Time_Stamp): idem.
11838 (Recording_Time_From_Last_Bind): idem.
11839 (Recording_Time_From_Last_Bind): Make constant.
11840
11841 * output.ads, output.adb (Write_Str): Allow LF characters
11842 (Write_Spaces): New procedure
11843
11844 * prepcomp.adb (Preproc_Data_Table): Change Increment from 5% to 100%
11845
11846 * inline.adb: Minor reformatting
11847
11848 * s-asthan-vms-alpha.adb: Remove redundant 'in' keywords
11849
11850 * s-mastop-vms.adb: Remove redundant 'in' keywords
11851
11852 * s-osprim-vms.adb: Remove redundant 'in' keywords
11853
11854 * s-trafor-default.adb: Remove redundant 'in' keywords
11855
11856 * 9drpc.adb: Remove redundant 'in' keywords
11857
11858 * s-osinte-mingw.ads: Minor reformatting
11859
11860 * s-inmaop-posix.adb: Minor reformatting
11861
11862 * a-direio.ads: Remove quotes from Compile_Time_Warning message
11863
11864 * a-exexda.adb: Minor code reorganization
11865
11866 * a-filico.adb: Minor reformatting
11867
11868 * a-finali.adb: Minor reformatting
11869
11870 * a-nudira.ads: Remove quote from Compile_Time_Warning message
11871
11872 * a-numeri.ads: Minor reformatting
11873
11874 * a-sequio.ads: Remove quotes from Compile_Time_Warning message
11875
11876 * exp_pakd.ads: Fix obsolete comment
11877
11878 * a-ztenau.adb, a-ztenio.adb, a-wtenau.adb, a-tienau.adb,
11879 a-wtenio.adb (Put): Avoid assuming low bound of string is 1.
11880 Probably not a bug, but certainly neater and more efficient.
11881
11882 * a-tienio.adb: Minor reformatting
11883
11884 * comperr.adb (Compiler_Abort): Call Cancel_Special_Output at start
11885 Avoid assuming low bound of string is 1.
11886
11887 * gnatbind.adb: Change Bindusg to package and rename procedure as
11888 Display, which now ensures that it only outputs usage information once.
11889 (Scan_Bind_Arg): Avoid assuming low bound of string is 1.
11890
11891 * g-pehage.adb (Build_Identical_Keysets): Replace use of 1 by
11892 Table'First.
11893
11894 * g-regpat.adb (Insert_Operator): Add pragma Warnings (Off) to kill
11895 warning.
11896 (Match): Add pragma Assert to ensure that Matches'First is zero
11897
11898 * g-regpat.ads (Match): Document that Matches lower bound must be zero
11899
11900 * makeutl.adb (Is_External_Assignment): Add pragma Assert's to check
11901 documented preconditions (also kills warnings about bad indexes).
11902
11903 * mdll.adb (Build_Dynamic_Library): Avoid assumption that Afiles'First
11904 is 1.
11905 (Build_Import_Library): Ditto;
11906
11907 * mdll-utl.adb: (Gnatbind): Avoid assumption that Alis'First = 1
11908
11909 * rtsfind.adb (RTE_Error_Msg): Avoid assuming low bound of string is 1.
11910
11911 * sem_case.adb (Analyze_Choices): Add pragma Assert to check that
11912 lower bound of choice table is 1.
11913
11914 * sem_case.ads (Analyze_Choices): Document that lower bound of
11915 Choice_Table is 1.
11916
11917 * s-imgdec.adb (Set_Decimal_Digits): Avoid assuming low bound of
11918 string is 1.
11919
11920 * uintp.adb (Init_Operand): Document that low bound of Vec is always 1,
11921 and add appropriate Assert pragma to suppress warnings.
11922
11923 * atree.h, atree.ads, atree.adb
11924 Change Elist24 to Elist25
11925 Add definitions of Field28 and Node28
11926 (Traverse_Field): Use new syntactic parent table in sinfo.
11927
11928 * cstand.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only
11929
11930 * itypes.adb: Change name Is_Ada_2005 to Is_Ada_2005_Only
11931
11932 * exp_tss.adb: Put routines in alpha order
11933
11934 * fe.h: Remove redundant declarations.
11935
c79efc4d 119362006-10-23 Rafael Avila de Espindola <rafael.espindola@gmail.com>
ed41063a 11937
c79efc4d
RÁE
11938 * utils.c (builtin_function): Rename to gnat_builtin_function.
11939 Move common code to add_builtin_function.
11940 * misc.c (LANG_HOOKS_BUILTIN_FUNCTION): Define as
11941 gnat_builtin_function.
11942 * gigi.h (builtin_function): Rename to gnat_builtin_function.
11943 Change the signature.
11944
a8384928
BM
119452006-10-16 Brooks Moses <bmoses@stanford.edu>
11946
11947 * Makefile.in: Add TEXI2PDF definition.
11948 * Make-lang.in: Add "ada.pdf" target.
11949
2285b053
KH
119502006-10-03 Kazu Hirata <kazu@codesourcery.com>
11951
11952 * decl.c, utils.c: Fix comment typos.
c0a69967
KH
11953 * utils.c: Fix a typo.
11954
b55e7f34
EB
119552006-09-28 Eric Botcazou <ebotcazou@adacore.com>
11956
11957 * decl.c (gnat_to_gnu_entity) <E_Procedure>: Do not set "const" flag
11958 on "pure" Ada subprograms if SJLJ exceptions are used.
11959 * trans.c (Handled_Sequence_Of_Statements_to_gnu): Set TREE_NO_WARNING
11960 on the declaration node of JMPBUF_SAVE.
11961 * utils.c (init_gigi_decls): Set DECL_IS_PURE on the declaration nodes
11962 of Get_Jmpbuf_Address_Soft and Get_GNAT_Exception.
11963 * utils2.c (build_call_0_expr): Do not set TREE_SIDE_EFFECTS.
11964
d2b40c09
LG
119652006-08-20 Laurent GUERBY <laurent@guerby.net>
11966
7a197678
EB
11967 PR ada/28716
11968 g-socket.adb (Bind_Socket): Call Set_Address.
11969
41d9adc7
EB
119702006-09-15 Eric Botcazou <ebotcazou@adacore.com>
11971
11972 PR ada/15802
11973 * decl.c (same_discriminant_p): New static function.
11974 (gnat_to_gnu_entity) <E_Record_Type>: When there is a parent
11975 subtype and we have discriminants, fix up the COMPONENT_REFs
11976 for the discriminants to make them reference the corresponding
11977 fields of the parent subtype after it has been built.
11978
21cc3719
RS
119792006-09-15 Roger Sayle <roger@eyesopen.com>
11980
11981 PR ada/18817
11982 * utils.c (max_size): Perform constant folding of (A ? B : C) - D
11983 into A ? B - D : C - D when calculating the size of a MINUS_EXPR.
11984
6f2789da
OH
119852006-09-13 Olivier Hainque <hainque@adacore.com>
11986
11987 PR ada/29025
11988 * trans.c (gnat_gimplify_expr) <ADDR_EXPR>: When taking the address
11989 of a SAVE_EXPR, just make the operand addressable/not-readonly and
11990 let the common gimplifier code make and propagate a temporary copy.
11991 (call_to_gnu): Clarify the use of SAVE_EXPR for not addressable
11992 out/in-out actuals and defer setting the addressable/readonly bits
11993 to the gimplifier.
11994
efaa616e
EB
119952006-09-13 Eric Botcazou <ebotcazou@adacore.com>
11996
11997 PR ada/28591
11998 * decl.c (components_to_record): Defer emitting debug info for the
11999 record type associated with the variant until after we are sure to
12000 actually use it.
12001
2655f1c6
EB
120022006-09-13 Eric Botcazou <ebotcazou@adacore.com>
12003
12004 PR ada/21952
12005 * gigi.h (gnat_internal_attribute_table): Declare.
12006 * misc.c (LANG_HOOKS_ATTRIBUTE_TABLE): Define to above.
12007 * utils.c (gnat_internal_attribute_table): New global variable.
12008 (builtin_function): Always call decl_attributes on the builtin.
12009 (handle_const_attribute): New static function.
12010 (handle_nothrow_attribute): Likewise.
12011
48779194
VR
120122006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
12013
12014 * Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
12015
8df7d439
EB
120162006-06-23 Olivier Hainque <hainque@adacore.com>
12017
12018 * misc.c (gnat_type_max_size): Look at TYPE_ADA_SIZE if we have
12019 not been able to get a constant upper bound from TYPE_SIZE_UNIT.
12020
83fdc7c4 120212006-06-20 James A. Morrison <phython@gcc.gnu.org>
6f7f72f9 12022 Eric Botcazou <ebotcazou@adacore.com>
83fdc7c4
JM
12023
12024 PR ada/18692
12025 * Make-lang.in: Add check-gnat to lang_checks. Rename existing
12026 check-gnat into check-acats.
12027
5f516f59
KB
120282006-06-17 Karl Berry <karl@gnu.org>
12029
6f7f72f9 12030 * gnat-style.texi (@dircategory): Use "Software development"
5f516f59
KB
12031 instead of "Programming", following the Free Software Directory.
12032
ce0d1b88
JDA
120332006-06-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
12034
12035 PR ada/27944
12036 * s-taprop-hpux-dce.adb: Delete redundant 'with System.Parameters'.
12037
8c60f779
LG
120382006-06-06 Laurent GUERBY <laurent@guerby.net>
12039
6f7f72f9
EB
12040 PR ada/27769
12041 mlib-utl.adb: Use Program_Name.
12042
ce2e12c2
KH
120432006-05-28 Kazu Hirata <kazu@codesourcery.com>
12044
12045 * decl.c, env.c, gigi.h, init.c, initialize.c, raise-gcc.c,
12046 sem_ch13.adb, sysdep.c, targtyps.c, tb-alvxw.c, tracebak.c,
12047 trans.c, utils.c: Fix comment typos. Follow spelling
12048 conventions.
12049 * gnat_rm.texi, gnat_ugn.texi, : Fix typos. Follow spelling
12050 conventions.
12051
ba4ac682
EB
120522006-05-19 Nicolas Setton <setton@adacore.com>
12053
12054 * misc.c (gnat_dwarf_name): New function.
12055 (LANG_HOOKS_DWARF_NAME): Define to it.
12056
05b44921
L
120572006-05-14 H.J. Lu <hongjiu.lu@intel.com>
12058
12059 * Make-lang.in (ada/decl.o): Replace target.h with $(TARGET_H).
12060 (ada/misc.o): Likewise.
12061 (ada/utils.o): Likewise.
12062
a3bd7058
AJ
120632006-04-08 Aurelien Jarno <aurel32@debian.org>
12064
12065 * Makefile.in: Add Ada support for GNU/kFreeBSD.
12066 * s-osinte-kfreebsd-gnu.ads: New file.
12067
ad3a7ce3
CD
120682006-03-29 Carlos O'Donell <carlos@codesourcery.com>
12069
12070 * Make-lang.in: Rename docdir to gcc_docdir.
12071
936a6fa7
EB
120722006-03-04 Eric Botcazou <ebotcazou@adacore.com>
12073
12074 * gigi.h (get_ada_base_type): Delete.
12075 * utils2.c (get_ada_base_type): Likewise.
12076 * trans.c (convert_with_check): Operate in the real base type.
12077
93f978b7
RK
120782006-03-03 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
12079
12080 * uintp.adb (Num_Bits): Handle Uint_Int_First specially.
12081
434aeebb
RS
120822006-03-02 Richard Sandiford <richard@codesourcery.com>
12083
12084 * utils.c (create_var_decl): Use have_global_bss_p when deciding
12085 whether to make the decl common.
12086
6f7f72f9 12087