1 2008-04-24 Olivier Hainque <hainque@adacore.com>
3 * trans.c (Attribute_to_gnu) <case Attr_Length>: Length computation
4 doesn't require signed arithmetic anymore.
6 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
8 * trans.c (Attribute_to_gnu): Don't set TREE_INVARIANT.
9 (call_to_gnu): Don't set TREE_INVARIANT.
10 * utils2.c (gnat_build_constructor): Don't set TREE_INVARIANT.
12 2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
14 * s-osinte-rtems.adb: Add sigalstack function.
15 * s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack
16 function. Add Alternate_Stack and Alternate_Stack_Size.
17 Add missing process_shared field to pthread_condattr_t
18 and change ss_low_priority to int from timespec.
20 2008-04-22 Samuel Tardieu <sam@rfc1149.net>
22 * i-forbla.adb: Link against -llapack and -lblas by default
23 instead of the private -lgnalasup.
25 2008-04-21 Olivier Hainque <hainque@adacore.com>
27 Access to most C builtins from Ada
28 * utils.c: #include "langhooks.h" and define GCC_DIAG_STYLE.
29 (handle_pure_attribute, handle_novops_attribute,
30 handle_nonnull_attribute, handle_sentinel_attribute,
31 handle_noreturn_attribute, handle_malloc_attribute,
32 handle_type_generic_attribute): New attribute handlers, from C fe.
33 (gnat_internal_attribute_table): Map the new handlers.
34 (gnat_init_decl_processing): Move call to gnat_install_builtins to ...
35 (init_gigi_decls): ... here.
36 (handle_const_attribute, handle_nothrow_attribute, builtin_decl_for):
37 Move to a section dedicated to builtins processing.
38 (build_void_list_node, builtin_type_for_size): New functions.
39 (def_fn_type, get_nonnull_operand): Likewise.
40 (install_builtin_elementary_type, install_builtin_function_types,
41 install_builtin_attributes): Likewise.
42 (fake_attribute_handler): Fake handler for attributes we don't
44 (def_builtin_1): New function, worker for DEF_BUILTIN.
45 (install_builtin_functions): New function.
46 (gnat_install_builtins): Move to the builtins processing section.
47 Now calling the newly introduced installers.
49 2008-04-20 Eric Botcazou <ebotcazou@adacore.com>
51 * decl.c (gnat_to_gnu_entity) <object>: Also promote the alignment of
52 constant objects, but not exceptions.
53 * trans.c (add_decl_expr): Use gnat_types_compatible_p for type
55 * utils.c (create_var_decl_1): Likewise.
56 * utils2.c (build_binary_op) <MODIFY_EXPR>: Also use the padded view of
57 the type when copying to padded object and the source is a constructor.
59 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
61 * decl.c (gnat_to_gnu_entity) <object>: When trying to promote the
62 alignment, reset it to zero if it would end up not being greater
63 than that of the type.
65 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
67 * decl.c (maybe_pad_type): Only generate the XVS parallel type if
68 the padded type has a variable size.
70 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
72 * decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Use the return by
73 target pointer mechanism as soon as the size is not constant.
75 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
77 * gigi.h (create_var_decl_1): Declare.
78 (create_var_decl): Turn into a macro invoking create_var_decl_1.
79 (create_true_var_decl): Likewise.
80 * utils.c (create_var_decl_1): Make global and reorder parameters.
81 (create_var_decl): Delete.
82 (create_true_var_decl): Likewise.
84 2008-04-17 Eric Botcazou <ebotcazou@adacore.com>
86 * decl.c (gnat_to_gnu_entity) <object>: Promote the alignment of
88 * fe.h (Debug_Flag_Dot_A): Delete.
89 * debug.adb (-gnatd.a): Update documentation.
91 2008-04-17 Samuel Tardieu <sam@rfc1149.net>
93 * g-socket.ads, g-socket.adb (Get_Address): Make Stream a
96 2008-04-17 Samuel Tardieu <sam@rfc1149.net>
98 * g-socket.adb: Add a message "IPv6 not supported" to the
99 Socket_Error exception.
101 2008-04-16 Samuel Tardieu <sam@rfc1149.net>
104 * sem_ch12.adb (Instantiate_Type): Check whether the full view of
105 the type is known instead of the underlying type.
107 2008-04-15 Ed Schonberg <schonberg@adacore.com>
110 * exp_ch5.adb (Expand_Assign_Record): Within an initialization
111 procedure for a derived type retrieve the discriminant values from
112 the parent using the corresponding discriminant.
114 2008-04-15 Samuel Tardieu <sam@rfc1149.net>
115 Gary Dismukes <dismukes@adacore.com>
118 * sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
119 which is not an entity (and hence not a package).
120 (End_Use_Package): Ditto.
122 2008-04-15 Ed Schonberg <schonberg@adacore.com>
125 * sem_ch12.adb (Analyze_Formal_Subprogram): The default can be any
126 protected operation that matches the signature, not only an entry, a
127 regular subprogram or a literal.
129 2008-04-15 Eric Botcazou <ebotcazou@adacore.com>
131 * ada-tree.h (DECL_BY_COMPONENT_PTR_P): Use DECL_LANG_FLAG_3.
132 * decl.c (gnat_to_gnu_entity) <object>: Call maybe_pad_type only
133 if a size or alignment is specified. Do not take into account
134 alignment promotions for the computation of the object's size.
135 <type>: Call maybe_pad_type only if a size or alignment is specified.
136 (maybe_pad_type): Really reuse the RM_Size of the original type if
138 * trans.c (Attribute_to_gnu): Fix a couple of nits.
139 * utils2.c (build_binary_op) <MODIFY_EXPR>: Merge related conditional
140 statements. Use the padded view of the type when copying between
141 padded objects of the same underlying type.
143 2008-04-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
145 * vms_data.ads: Fix typo in constant.
146 * gen-soccon.c: Fix typo in error string.
147 * gnat_rm.texi (Pragma Optimize_Alignment, Pragma Postcondition):
149 * a-calcon.ads, a-calend-vms.adb, a-calend.adb, a-crdlli.ads,
150 bcheck.adb, checks.adb, einfo.ads, errout.adb, erroutc.adb,
151 erroutc.ads, exp_attr.adb, exp_ch11.adb, exp_ch2.adb,
152 exp_ch5.adb, exp_ch9.adb, exp_ch9.ads, exp_pakd.adb,
153 exp_util.adb, fmap.adb, g-soccon-linux-mips.ads,
154 g-soccon-rtems.ads, g-timsta.adb, g-timsta.ads, lib-writ.ads,
155 mlib-tgt-specific-linux.adb, mlib-tgt-specific-tru64.adb,
156 s-interr-vxworks.adb, s-interr.adb, s-osinte-lynxos.ads,
157 s-rident.ads, s-taprop-solaris.adb, s-tassta.adb, s-win32.ads,
158 sem_aggr.adb, sem_attr.ads, sem_ch10.adb, sem_ch13.ads,
159 sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb,
160 sem_prag.ads, sem_res.adb, sem_util.adb, sem_util.ads,
161 sinfo.ads: Fix typos in comments.
163 2008-04-14 Robert Dewar <dewar@adacore.com>
165 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Extend error
166 to every non-object and change error message.
168 2008-04-14 Robert Dewar <dewar@adacore.com>
170 * sem_util.ads, sem_util.adb (In_Subprogram): Remove.
171 * sem_attr.adb (Anayze_Attribute): Check for Current_Subprogram
174 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
177 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Refuse to
178 apply pragma Linker_Section on type.
180 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
183 * sem_prag.adb (Error_Pragma_Ref): New.
184 (Process_Convention): Specialized message for non-local
185 subprogram renaming. Detect the problem in homonyms as well.
187 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
190 * sem_util.ads, sem_util.adb (Denotes_Variable): New function.
191 * sem_ch12.adb (Instantiate_Object): Use it.
192 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ensure that
193 storage pool denotes a variable as per RM 13.11(15).
195 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
197 * sem_util.ads, sem_util.adb (In_Subprogram): New function.
198 * sem_attr.adb (Analyze_Attribute, Attribute_Old case): Use it.
200 2008-04-14 Rolf Ebert <rolf.ebert.gcc@gmx.de>
203 * xgnatugn.adb (Put_Line): New procedure, ensuring Unix
204 line endings even on non-Unix platforms.
206 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
209 * xref_lib.adb (Parse_Identifier_Info): Correctly parse and ignore the
210 renaming information.
212 2008-04-13 Samuel Tardieu <sam@rfc1149.net>
215 * sem_aggr.adb (Valid_Ancestor_Type): A type is not an ancestor of
218 2008-04-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
220 * sfn_scan.adb, sfn_scan.ads, sinfo.ads,
221 sinput-d.ads, sinput-l.adb, sinput-l.ads, sinput.ads,
222 snames.ads, sprint.adb, stand.ads, stringt.ads,
223 styleg.adb, styleg.ads, stylesw.adb, stylesw.ads,
224 switch.ads, sysdep.c, table.adb, table.ads,
225 targparm.ads, tb-gcc.c, tbuild.ads, tracebak.c,
226 trans.c, tree_io.adb, treepr.adb, types.adb, types.ads,
227 uintp.adb, uintp.ads, utils.c, utils2.c, validsw.ads,
228 vms_conv.adb, vms_conv.ads, vms_data.ads, widechar.adb,
229 widechar.ads, xeinfo.adb, xgnatugn.adb, xr_tabls.adb,
230 xr_tabls.ads, xref_lib.adb, xref_lib.ads, xsinfo.adb:
233 * sem_ch10.adb, sem_ch10.ads,
234 sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads,
235 sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
236 sem_ch6.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
237 sem_elab.adb, sem_elab.ads, sem_elim.ads, sem_eval.adb,
238 sem_eval.ads, sem_intr.adb, sem_mech.adb, sem_mech.ads,
239 sem_prag.adb, sem_prag.ads, sem_res.adb, sem_res.ads,
240 sem_type.adb, sem_util.adb, sem_util.ads, sem_warn.adb,
241 sem_warn.ads: Fix comment typos.
243 * s-secsta.adb, s-sequio.ads, s-shasto.ads,
244 s-soflin.ads, s-stalib.ads, s-stausa.adb,
245 s-stausa.ads, s-strxdr.adb, s-taenca.adb, s-taenca.ads,
246 s-taprob.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
247 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-posix.adb,
248 s-taprop-solaris.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
249 s-taprop-vxworks.adb, s-taprop.ads, s-tarest.adb,
250 s-tarest.ads, s-tasini.adb, s-tasini.ads, s-taskin.ads,
251 s-tasque.ads, s-tassta.adb, s-tassta.ads, s-tasuti.ads,
252 s-tpoben.adb, s-tpoben.ads, s-tpobop.adb,
253 s-tpopsp-posix.adb, s-tpopsp-rtems.adb, s-tposen.adb,
254 s-tposen.ads, s-traceb-hpux.adb, s-traces.ads,
255 s-trafor-default.ads, s-unstyp.ads, s-utf_32.ads,
256 s-vaflop.adb, s-vaflop.ads, s-valrea.adb, s-valuti.adb,
257 s-wchstw.ads, s-wchwts.adb, s-wchwts.ads, scans.ads,
258 scn.adb, scng.adb, seh_init.c, sem.ads, sem_aggr.adb,
259 sem_attr.adb, sem_attr.ads, sem_case.adb, sem_case.ads,
260 sem_cat.adb, sem_cat.ads: Fix comment typos.
262 2008-04-12 Joel Sherrill <joel@oarcorp.com>
265 * g-soccon-rtems.ads: Add IP_PKTINFO as unsupported.
267 2008-04-12 Arnaud Charlet <charlet@adacore.com>
269 * s-linux-hppa.ads: Fix syntax errors.
271 2008-04-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
273 * gnat_ugn.texi: Fix typos.
274 * raise-gcc.c, repinfo.adb, repinfo.ads, restrict.adb,
275 restrict.ads, rtsfind.adb, rtsfind.ads, s-arit64.ads,
276 s-asthan-vms-alpha.adb, s-auxdec.ads, s-casuti.ads,
277 s-fatflt.ads, s-fatgen.adb, s-fatlfl.ads,
278 s-fatllf.ads, s-fatsfl.ads, s-filofl.ads,
279 s-finimp.adb, s-finroo.ads, s-fishfl.ads,
280 s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
281 s-hibaen.ads, s-htable.ads, s-imgcha.adb,
282 s-imgenu.ads, s-imgint.adb, s-imgrea.adb,
283 s-inmaop-dummy.adb, s-inmaop.ads, s-interr-vms.adb,
284 s-interr-vxworks.adb, s-interr.adb, s-interr.ads,
285 s-intman-vxworks.ads, s-intman.ads, s-mastop-irix.adb,
286 s-os_lib.adb, s-os_lib.ads, s-osinte-aix.ads,
287 s-osinte-darwin.ads, s-osinte-freebsd.ads,
288 s-osinte-hpux.ads, s-osinte-lynxos-3.adb,
289 s-osinte-lynxos-3.ads, s-osinte-lynxos.ads,
290 s-osinte-rtems.ads, s-osinte-solaris-posix.ads,
291 s-osprim-mingw.adb, s-osprim-vms.adb, s-parame-ae653.ads,
292 s-parame-hpux.ads, s-parame-vms-alpha.ads,
293 s-parame-vms-ia64.ads, s-parame-vms-restrict.ads,
294 s-parame-vxworks.ads, s-parame.ads, s-parint.adb,
295 s-parint.ads, s-poosiz.adb, s-proinf-irix-athread.ads,
296 s-proinf.ads, s-regexp.adb, s-regpat.adb, s-regpat.ads,
297 s-rident.ads: Fix comment typos.
299 2008-04-09 Samuel Tardieu <sam@rfc1149.net>
302 * sem_ch6.adb (Build_Body_To_Inline): Do not save and restore
303 environment if generic instance is a top-level one.
305 2008-04-09 Doug Rupp <rupp@adacore.com>
307 * decl.c (validate_size): Set minimum size for fat pointers same as
308 access types. Code clean ups.
310 * gmem.c (xstrdup32): New macro for 32bit dup on VMS, noop otherwise
311 (__gnat_gmem_a2l_initialize): Dup exename into 32 bit memory on VMS
313 * s-auxdec-vms_64.ads, s-auxdec.ads (Short_Address_Size): New constant
315 * s-crtl.ads (malloc32) New function, alias for malloc
316 (realloc32) New function, alias for realloc
318 * socket.c (__gnat_new_socket_set): Malloc fd_set in 32 bits on VMS
320 * utils2.c (build_call_alloc_dealloc): Return call to short malloc if
321 allocator size is 32 and default pointer size is 64.
322 (find_common_type): Document assumption on t1/t2 vs lhs/rhs. Force use of
323 lhs type if smaller, whatever the modes.
325 * gigi.h (malloc32_decl): New macro definition
327 * utils.c (init_gigi_decls): New malloc32_decl
328 Various code clean ups.
330 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
331 Task_Address vice System.Address.
333 * s-taspri-vms.ads: Import System.Aux_DEC
334 (Task_Address): New subtype of System.Aux_DEC.Short_Address
335 (Task_Address_Size): New constant size of System.Aux_DEC.Short_Address
337 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
338 Task_Address vice System.Address.
340 * s-inmaop-vms.adb: Import System.Task_Primitives
341 (To_Address): Unchecked convert to Task_Address vice System.Address
343 * s-taprop-vms.adb (Timed_Delay): Always set the timer even if delay
345 (To_Task_ID) Unchecked convert from Task_Adddress vice System.Address
346 (To_Address) Unchecked convert to Task_Address vice System.Address
348 * s-tpopde-vms.adb: Remove unnecessary warning pragmas
350 * g-socthi-vms.ads: Add 32bit size clauses on socket access types.
352 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
354 * gigi.h (standard_datatypes): Add ADT_fdesc_type and ADT_null_fdesc.
355 (fdesc_type_node): Define.
356 (null_fdesc_node): Likewise.
357 * decl.c (gnat_to_gnu_entity) <E_Access_Subprogram_Type>: If the target
358 uses descriptors for vtables and the type comes from a dispatch table,
359 return the descriptor type.
360 * trans.c (Attribute_to_gnu) <Attr_Unrestricted_Access>: If the target
361 uses descriptors for vtables and the type comes from a dispatch table,
362 build a descriptor in the static case and copy the existing one in the
364 (gnat_to_gnu) <N_Null>: If the target uses descriptors for vtables and
365 the type is a pointer-to-subprogram coming from a dispatch table,
366 return the null descriptor.
367 <N_Unchecked_Type_Conversion>: If the target uses descriptors for
368 vtables, the source type is the descriptor type and the target type
369 is a pointer type, first build the pointer.
370 * utils.c (init_gigi_decls): If the target uses descriptors for vtables
371 build the descriptor type and the null descriptor.
373 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
375 * decl.c (prepend_attributes): Fix typo.
376 * trans.c (Pragma_to_gnu): Likewise.
377 * utils.c (gnat_genericize): Likewise.
379 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
380 Richard Kenner <kenner@adacore.com>
382 * ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Only set it when bit-packed.
383 * decl.c (gnat_to_gnu_entity): Adjust for above change.
384 <E_Record_Type>: Try to get a better form of the component for
385 packing, even if it has an integral mode.
386 <E_Record_Subtype>: Likewise.
387 * trans.c (gnat_to_gnu): Do not require BLKmode for the special
388 exception suppressing the final conversion between record types.
390 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
392 * decl.c (gnat_to_gnu_entity) <object>: If -gnatd.a and not optimizing
393 alignment for space, promote the alignment of non-scalar variables with
394 no size and alignment.
395 * gigi.h (gnat_types_compatible_p): Declare.
396 * misc.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Set to above predicate.
397 * trans.c (gnat_to_gnu): Revert revision 129339 change. Minor cleanup.
398 * utils.c (gnat_types_compatible_p) : New predicate.
399 (convert): Use it throughout to test for cases where a mere view
400 conversion is sufficient.
401 * utils2.c (build_binary_op): Minor tweaks.
402 (build_unary_op): Likewise.
404 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
406 * decl.c (adjust_packed): Expand comment.
408 2008-04-08 Arnaud Charlet <charlet@adacore.com>
410 * s-tasuti.ads: Use Task_Address instead of System.Address.
412 * makeutl.adb (Path_Or_File_Name): New function
414 * nlists.ads, itypes.ads: Update comments.
416 * s-crtl.ads (malloc32, realloc32): New functions.
418 * s-auxdec.ads (Short_Address_Size): New constant.
420 * a-taside.adb, s-tasdeb.adb: Use Task_Address.
422 * s-ststop.ads, s-ststop.adb: New file.
424 * exp_tss.ads, s-taprop-lynxos.adb: Update comments.
427 2008-04-08 Pascal Obry <obry@adacore.com>
429 * g-sercom.ads, g-sercom.adb (Data_Rate): Add B115200.
430 (Stop_Bits_Number): New type.
431 (Parity_Check): Likewise.
432 (Set): Add parameter to set the number of stop bits and
433 the parity. Parameter timeout is now a duration instead
436 * g-sercom-linux.adb:
437 Implement the stop bits and parity support for GNU/Linux.
438 Fix handling of timeout, it must be given in tenth of seconds.
440 * g-sercom-mingw.adb:
441 Implement the stop bits and parity support for Windows.
442 Use new s-win32.ads unit instead of declaring Win32 services
443 directly into this body.
444 Update handling of timeout as now a duration.
446 * s-win32.ads, s-winext.ads: New files.
448 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
449 Arnaud Charlet <charlet@adacore.com>
451 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads: Removed.
453 s-taspri-posix-noaltstack.ads, s-linux.ads, s-linux-alpha.ads,
454 s-linux-hppa.ads: New files. Disable alternate stack on ia64-hpux.
456 * s-osinte-lynxos-3.ads,
457 (Alternate_Stack): Remove when not needed. Simplify declaration
459 (Alternate_Stack_Size): New constant.
461 s-osinte-mingw.ads, s-taprop-mingw.adb: Code clean up: avoid use of
462 'Unrestricted_Access.
464 * s-osinte-hpux.ads, s-osinte-solaris-posix.ads, s-osinte-aix.ads,
465 s-osinte-lynxos.ads, s-osinte-freebsd.ads s-osinte-darwin.ads,
466 s-osinte-tru64.ads, s-osinte-irix.ads, s-osinte-linux.ads,
467 s-osinte-solaris.ads, s-osinte-vms.ads
468 (SA_ONSTACK): New constant.
469 (stack_t): New record type.
470 (sigaltstack): New imported function.
471 (Alternate_Stack): New imported variable.
472 (Alternate_Stack_Size): New constant.
474 * system-linux-x86_64.ads: (Stack_Check_Probes): Set to True.
476 * s-taspri-lynxos.ads, s-taspri-solaris.ads, s-taspri-tru64.ads,
477 s-taspri-hpux-dce.ads, s-taspri-dummy.ads, s-taspri-posix.ads,
478 s-taspri-vms.ads (Task_Address): New subtype of System.Address
479 (Task_Address_Size): New constant size of System.Address
480 (Alternate_Stack_Size): New constant.
482 * s-taprop-posix.adb, s-taprop-linux.adb (Get_Stack_Attributes): Delete.
483 (Enter_Task): Do not notify stack to System.Stack_Checking.Operations.
484 Establish the alternate stack if the platform makes use of n alternate
485 signal stack for stack overflows.
486 (Create_Task): Take into account the alternate stack in the stack size.
487 (Initialize): Save the address of the alternate stack into the ATCB for
488 the environment task.
489 (Create_Task): Fix assertions for NPTL library (vs old LinuxThreads).
491 * s-parame.adb (Minimum_Stack_Size): Increase value to 16K
493 * system-linux-x86.ads: (Stack_Check_Probes): Set to True.
495 * s-intman-posix.adb:
496 (Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an
497 alternate signal stack for stack overflows.
499 * init.c (__gnat_adjust_context_for_raise, Linux version): On i386 and
500 x86-64, adjust the saved value of the stack pointer if the signal was
501 raised by a stack checking probe.
502 (HP-UX section): Use global __gnat_alternate_stack as signal handler
503 stack and only for SIGSEGV.
504 (Linux section): Likewise on x86 and x86-64.
506 (__gnat_map_signal): Now static.
507 (__gnat_error_handler): Not static any more.
508 (__gnat_adjust_context_for_raise): New function. Signal context
509 adjustment for PPC && !VTHREADS && !RTP, as required by the zcx
510 propagation circuitry.
511 (__gnat_error_handler): Second argument of a sigaction handler is a
512 pointer, not an int, and is unused.
513 Adjust signal context before mapping to exception.
514 Install signal handlers for LynxOS case.
516 * s-taskin.ads (Common_ATCB): New field Task_Alternate_Stack.
517 (Task_Id): Set size to Task_Address_Size
518 (To_Task_id): Unchecked convert from Task_Address vice System.Address
519 (To_Address): Unchecked convert to Task_Address vice System.Address
521 * s-tassta.adb (Task_Wrapper): Define the alternate stack and save its
522 address into the ATCB if the platform makes use of an alternate signal
523 stack for stack overflows.
524 (Free_Task): Add call to Finalize_Attributes_Link.
525 Add argument Relative_Deadline to pass the value specified for
526 the task. This is not yet used for any target.
528 * s-tassta.ads (Create_Task): Add argument Relative_Deadline to pass
529 the value specified for the task.
531 2008-04-08 Arnaud Charlet <charlet@adacore.com>
533 (s-osinte-vxworks6.ads): Removed, merged with s-osinte-vxworks.ads/.adb
534 (s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads,
535 s-vxwext-rtp.adb): New files.
537 * s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-osinte-vxworks.adb:
538 Minor updates to accomodate changes above.
540 2008-04-08 Pascal Obry <obry@adacore.com>
542 * a-exetim-mingw.adb, s-gloloc-mingw.adb, s-taprop-mingw.adb,
543 s-tasinf-mingw.ad{s,b}, s-taspri-mingw.ads:
544 Use new s-win32.ads unit instead of declaration
545 from s-osinte-mingw.ads.
547 * s-osinte-mingw.ads:
548 Move all non tasking based interface to s-win32.ads.
550 * s-osprim-mingw.adb:
551 Remove duplicated declarations and use s-win32.ads
554 2008-04-08 Vincent Celier <celier@adacore.com>
555 Arnaud Charlet <charlet@adacore.com>
557 * mlib-tgt-aix.adb, mlib-tgt-darwin.adb, mlib-tgt-hpux.adb,
558 mlib-tgt-irix.adb, mlib-tgt-linux.adb, mlib-tgt-lynxos.adb,
559 mlib-tgt-solaris.adb, mlib-tgt-tru64.adb, mlib-tgt-vms.adb,
560 mlib-tgt-vms.ads, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
561 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb: Renamed into...
563 * mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
564 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-irix.adb,
565 mlib-tgt-specific-linux.adb, mlib-tgt-specific-lynxos.adb,
566 mlib-tgt-specific-solaris.adb, mlib-tgt-specific-tru64.adb,
567 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads,
568 mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
569 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb,
570 mlib-tgt-specific-mingw.adb: New names.
573 On VxWorks platforms use s-stchop-limit.ads for s-stchop.ads
575 (EXTRA_GNATRTL_NONTASKING_OBJS): Add s-win32.o
576 Files mlib-tgt-*.adb have been renamed mlib-tgt-specific-*.adb
577 Minor updates for VMS
581 2008-04-08 Thomas Quinot <quinot@adacore.com>
583 * g-expect-vms.adb, a-textio.adb, a-witeio.adb, exp_dbug.adb,
584 g-expect.adb, g-locfil.adb, gnatchop.adb, gnatdll.adb, gnatlbr.adb,
585 gnatmem.adb, g-regist.adb, i-vxwork.ads, mlib-utl.adb, i-vxwork-x86.ads,
586 a-ztexio.adb, g-enblsp-vms-alpha.adb, g-enblsp-vms-ia64.adb,
587 s-os_lib.adb, s-regpat.adb, s-regpat.ads: Fix incorrect casing of
588 ASCII.NUL throughout.
590 2008-04-08 Arnaud Charlet <charlet@adacore.com>
591 Matthew Heaney <heaney@adacore.com>
593 * a-cgcaso.adb, a-convec.adb: (Swap, Sift): Avoid use of complex
596 * a-cgaaso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads,
597 a-crdlli.ads, a-coormu.ads, a-ciormu.ads: modified header to conform
598 to convention for non-RM specs.
599 Add descriptive header, and documented each operation
600 document each operation
602 2008-04-08 Robert Dewar <dewar@adacore.com>
603 Bob Duff <duff@adacore.com>
604 Gary Dismukes <dismukes@adacore.com>
605 Ed Schonberg <schonberg@adacore.com>
607 * alloc.ads: Add entries for Obsolescent_Warnings table
609 * einfo.ads, einfo.adb: Minor reformatting.
610 (Is_Discriminal): New subprogram.
611 (Is_Prival): New subprogram.
612 (Is_Protected_Component): New subprogram.
613 (Is_Protected_Private): Removed.
614 (Object_Ref, Set_Object_Ref): Removed.
615 (Prival, Set_Prival): Change assertion.
616 (Privals_Chain, Set_Privals_Chain): Removed.
617 (Prival_Link, Set_Prival_Link): New subprogram.
618 (Protected_Operation, Set_Protected_Operation): Removed.
619 (Protection_Object, Set_Protection_Object): New subprogram.
620 (Write_Field17_Name): Remove case for Object_Ref.
621 (Write_Field20_Name): Add case for Prival_Link.
622 (Write_Field22_Name): Remove case for Protected_Operation,
624 Add case for Protection_Object.
625 (Can_Use_Internal_Rep): Make this into a [base type only] attribute,
627 (Overlays_Constant): New flag
628 (Is_Constant_Object): New predicate
629 (Is_Standard_Character_Type): New predicate
630 (Optimize_Alignment_Space): New flag
631 (Optimize_Alignment_Time): New flag
632 (Has_Postconditions): New flag
633 (Obsolescent_Warrning): Field removed
634 (Spec_PPC_List): New field
635 (Relative_Deadline_Variable, Set_Relative_Deadline_Variable): Add
636 subprograms to get and set the relative deadline associated to a task.
638 * exp_attr.adb (May_Be_External_Call): Account for the case where the
639 Access attribute is part of a named parameter association.
640 (Expand_Access_To_Protected_Op): Test for the attribute occurring
641 within an init proc and use that directly as the scope rather than
642 traversing up to the protected operation's enclosing scope. Only apply
643 assertion on Is_Open_Scopes in the case the scope traversal is done.
644 For the init proc case use the address of the first formal (_init) as
645 the protected object reference.
646 Implement Invalid_Value attribute
647 (Expand_N_Attribute_Reference): Case Attribute_Unrestricted_Access.
648 contents of the dispatch table there is no need to duplicate the
649 itypes associated with record types (i.e. the implicit full view
651 Implement Enum_Val attribute
652 (Expand_N_Attribute_Reference, case Old): Properly handle appearence
653 within _Postconditions procedure
654 (Expand_N_Attribute_Reference, case Result): Implement new attribute
656 * exp_ch5.adb (Expand_N_Simple_Return_Statement): Handle case in which
657 a return statement calls a function that is not available in
658 configurable runtime.
659 (Analyze_If_Statement): don't optimize simple True/False cases in -O0
660 (Expand_Non_Function_Return): Generate call to _Postconditions proc
661 (Expand_Simple_Function_Return): Ditto
663 * frontend.adb: Add call to Sem_Aux.Initialize
665 * sem_aux.ads, sem_aux.adb: New file.
667 * par-prag.adb: Add entries for pragmas Precondition/Postcondition
668 Add new Pragma_Relative_Deadline.
669 Add support for pragmas Check and Check_Policy
671 * sem_attr.ads, sem_attr.adb (Check_Not_CPP_Type): New subprogram.
672 (Check_Stream_Attribute): Add missing check (not allowed in CPP types)
673 (Analyze_Attribute): In case of attributes 'Alignment and 'size add
674 missing check because they are not allowed in CPP tagged types.
675 Add Sure parameter to Note_Possible_Modification calls
676 Add implementation of Invalid_Value attribute
677 Implement new attribute Has_Tagged_Values
678 Implement Enum_Val attribute
679 (Analyze_Attribute, case Range): Set Name_Req True for prefix of
680 generated attributes.
681 (Analyze_Attribute, case Result): If prefix of the attribute is
682 overloaded, it always resolves to the enclosing function.
683 (Analyze_Attribute, case Result): Properly deal with analysis when
684 Postconditions are not active.
685 (Resolve_Attribute, case Result): Properly deal with appearence during
687 Add processing for attribute Result
689 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Code cleanup
691 (Analyze_Subprogram_Body): Install private_with_clauses when the body
693 (Check_Inline_Pragma): recognize an inline pragma that appears within
694 the subprogram body to which it applies.
695 (Analyze_Function_Return): Check that type of the expression of a return
696 statement in a function with a class-wide result is not declared at a
697 deeper level than the function.
698 (Process_PPCs): Deal with enabling/disabling, using PPC_Enabled flag
699 (Verify_Overriding_Indicator): Handle properly subprogram bodies for
700 user- defined operators.
701 (Install_Formals): Moved to spec to allow use from Sem_Prag for
702 analysis of precondition/postcondition pragmas.
703 (Analyze_Subprogram_Body.Last_Real_Spec_Entity): New name for
704 Last_Formal, along with lots of comments on what this is about
705 (Analyze_Subprogram_Body): Fix case where we move entities from the
706 spec to the body when there are no body entities (now possible with
707 precondition and postcondition pragmas).
708 (Process_PPCs): New procedure
709 (Analyze_Subprogram_Body): Add call to Process_PPCs
711 * sem_ch8.adb (Use_One_Type): refine warning on a redundant use_type
713 (Pop_Scope): Restore Check_Policy_List on scope exit
714 (Push_Scope): Save Check_Policy_List on scope entry
715 Change name In_Default_Expression => In_Spec_Expression
716 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
717 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
718 (Analyze_Object_Renaming): Allow 'Reference as object
719 (Analyze_Pragma, case Restriction_Warnings): Call GNAT_Pragma
720 (Process_Restrictions_Or_Restriction_Warnings): Check for bad spelling
721 of restriction identifier.
722 Add Sure parameter to Note_Possible_Modication calls
724 * sem_prag.ads, sem_prag.adb (Analyze_Pragma, case Stream_Convert):
725 Don't check for primitive operations when calling Rep_Item_Too_Late.
726 (Process_Import_Or_Interface): Do not place flag on formal
728 (Analyze_Pragma, case Export): If the entity is a deferred constant,
729 propagate information to full view, which is the one elaborated by the
731 (Make_Inline): the pragma is effective if it applies to an internally
732 generated subprogram declaration for a body that carries the pragma.
733 (Analyze_Pragma, case Optimize_Alignment): Set new flag
734 Optimize_Alignment_Local.
735 (Analyze_PPC_In_Decl_Part): New procedure
736 (Get_Pragma_Arg): Moved to outer level
737 (Check_Precondition_Postcondition): Change to allow new visibility
738 rules for package spec
739 (Analyze_Pragma, case Check_Policy): Change placement rules to be
740 same as pragma Suppress/Unsuppress.
741 Change name In_Default_Expression => In_Spec_Expression
742 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
743 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
744 (Check_Precondition_Postcondition): Do proper visibility preanalysis
745 for the case of these pragmas appearing in the spec.
746 (Check_Enabled): New function
747 (Initialize): New procedure
748 (Tree_Read): New procedure
749 (Tree_Write): New procedure
750 (Check_Precondition_Postcondition): New procedure
751 Implement pragmas Check and Check_Policy
752 Merge Assert processing with Check
754 * sem_warn.adb (Warn_On_Known_Condition): Handle pragma Check
755 New warning flag -gnatw.e
757 * sinfo.ads, sinfo.adb (Has_Relative_Deadline_Pragma): New function
758 returning whether a task (or main procedure) has a pragma
760 (Set_Has_Relative_Deadline_Pragma): Procedure to indicate that a task
761 (or main procedure) has a pragma Relative_Deadline.
762 Add Next_Pragma field to N_Pragma node
763 (PPC_Enabled): New flag
764 (Next_Pragma): Now used for Pre/Postcondition processing
766 * snames.h, snames.ads, snames.adb: New standard name
768 Add entry for 'Invalid_Value attribute
769 Add entry for new attribute Has_Tagged_Values
770 Add entry for Enum_Val attribute
771 Add new standard names Aggregate, Configuration and Library.
774 Add Pragma_Precondition
775 Add Pragma_Postcondition
777 New standard name Archive_Builder_Append_Option
778 (Preset_Names): Add _relative_deadline and relative_deadline definitions
779 There was also a missing non_preemptive_within_priorities.
780 (Get_Pragma_Id, Is_Pragma_Name): Add support for pragma
782 Add support for pragmas Check and Check_Policy
784 * tree_gen.adb: Call Sem_Aux.Tree_Write
786 * tree_in.adb: Call Sem_Aux.Tree_Read
788 * exp_ch11.adb (Expand_N_Raise_Statement): New Build_Location calling
791 * exp_intr.adb (Expand_Source_Info): New Build_Location calling
794 * exp_prag.adb (Expand_Pragma_Relative_Deadline): New procedure.
795 (Expand_N_Pragma): Call the appropriate procedure for expanding pragma
797 (Expand_Pragma_Check): New procedure
799 * sinput.ads, sinput.adb (Build_Location_String): Now appends to name
802 * sinfo.adb (PPC_Enabled): New flag
804 2008-04-08 Robert Dewar <dewar@adacore.com>
805 Gary Dismukes <dismukes@adacore.com>
806 Javier Miranda <miranda@adacore.com>
807 Ed Schonberg <schonberg@adacore.com>
809 * fe.h: Remove global Optimize_Alignment flag, no longer used
811 * layout.adb: Test Optimize_Alignment flags rather than global switch
813 * lib.ads, lib.adb: New OA_Setting field in library record
815 * lib-load.adb: New OA_Setting field in library record
817 * lib-writ.ads, lib-writ.adb (Collect_Withs, Write_With_Lines): Place
818 units mentioned in limited_with_ clauses in the ali file, with an
820 New Ox fields in U line
822 * opt.adb: New flag Optimize_Alignment_Local
823 (Check_Policy_List[_Config]): New flags
825 * opt.ads (Invalid_Value_Used): New flag
826 New switch Optimize_Alignment_Local
827 (Warn_On_Parameter_Order): New flag
828 (Check_Policy_List[_Config]): New flags
830 * ali.ads, ali.adb: Add indicator 'Y' to mark mark the presence of
831 limited_with clauses.
832 New data structures for Optimize_Alignment
834 * bcheck.adb (Check_Consistent_Restriction_No_Default_Initialization):
836 (Check_Consistent_Optimize_Alignment): Rework for new structure
837 (Check_Consistent_Restrictions): Fix incorrect error message
839 sem_ch10.adb (Decorate_Tagged_Type): Set the Parent field of a newly
840 created class-wide type (to the Parent field of the specific type).
841 (Install_Siblings): Handle properly private_with_clauses on subprogram
842 bodies and on generic units.
843 (Analyze_With_Clause, Install_Limited_Withed_Unit): Guard against an
844 illegal limited_with_clause that names a non-existent package.
845 (Check_Body_Required): Determine whether a unit named a limited_with
847 (Analyze_Context): A limited_with_clause is illegal on a unit_renaming.
848 Capture Optimize_Alignment settings to set new OA_Setting field in
850 (Build_Limited_Views): Include task and protected type declarations.
852 * sem_ch3.ads, sem_ch3.adb (Analyze_Object_Declaration): Handle the
853 case of a possible constant redeclaration where the current object is
854 an entry index constant.
855 (Analyze_Object_Declaration): Generate an error in case of CPP
856 class-wide object initialization.
857 (Analyze_Object_Declaration): Add extra information on warnings for
858 declaration of unconstrained objects.
859 (Access_Type_Declaration): Set Associated_Final_Chain to Empty, to avoid
860 conflicts with the setting of Stored_Constraint in the case where the
861 access type entity has already been created as an E_Incomplete_Type due
862 to a limited with clause.
863 Use new Is_Standard_Character_Type predicate
864 (Analyze_Object_Declaration): Apply access_constant check only after
865 expression has been resolved, given that it may be overloaded with
866 several access types.
867 (Constant_Redeclaration): Additional legality checks for deferred
868 constant declarations tha involve anonymous access types and/or null
869 exclusion indicators.
870 (Analyze_Type_Declaration): Set Optimize_Alignment flags
871 (Analyze_Subtype_Declaration): Ditto
872 (Analyze_Object_Declaration): Ditto
873 (Analyze_Object_Declaration): Don't count tasks in generics
874 Change name In_Default_Expression => In_Spec_Expression
875 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
876 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
877 (Process_Discriminants): Additional check for illegal use of default
878 expressions in access discriminant specifications in a type that is not
880 (Check_Abstract_Overriding): If an inherited function dispaches on an
881 access result, it must be overridden, even if the type is a null
883 (Derive_Subprogram): The formals of the derived subprogram have the
884 names and defaults of the parent subprogram, even if the type is
885 obtained from the actual subprogram.
886 (Derive_Subprogram): In the presence of interfaces, a formal of an
887 inherited operation has the derived type not only if it descends from
888 the type of the formal of the parent operation, but also if it
889 implements it. This is relevant for the renamings created for the
890 primitive operations of the actual for a formal derived type.
891 (Is_Progenitor): New predicate, to determine whether the type of a
892 formal in the parent operation must be replaced by the derived type.
894 * sem_util.ads, sem_util.adb (Has_Overriding_Initialize): Make
895 predicate recursive to handle components that have a user-defined
896 Initialize procedure. Handle controlled derived types whose ancestor
897 has a user-defined Initialize procedured.
898 (Note_Possible_Modification): Add Sure parameter, generate warning if
899 sure modification of constant
900 Use new Is_Standard_Character_Type predicate
901 (Find_Parameter_Type): when determining whether a protected operation
902 implements an interface operation, retrieve the type of the formal from
903 the entity when the formal is an access parameter or an
904 anonymous-access-to-subprogram.
905 Move Copy_Parameter_List to sem_util, for use when building stubbed
907 (Has_Access_Values): Tagged types now return False
908 (Within_HSS_Or_If): New procedure
909 (Set_Optimize_Alignment_Flags): New procedure
910 Change name In_Default_Expression => In_Spec_Expression
911 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
912 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
914 2008-04-08 Tristan Gingold <gingold@adacore.com>
916 * s-fileio.adb: Name_Error shouldn't be raised for a tempory file.
918 2008-04-08 Tristan Gingold <gingold@adacore.com>
922 * cuintp.c: Fix 16 bits issue for AVR.
923 On AVR, integer is 16 bits, so it can't be used to do math with
925 So use long_integer instead.
927 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
929 * a-calend-vms.ads, a-calend-vms.adb: Add with and use clause for
930 System.OS_Primitives.
931 Change type of various constants, parameters and local variables from
932 Time to representation type OS_Time.
933 (To_Ada_Time, To_Unix_Time): Correct sign of origin shift.
934 Remove the declaration of constant Mili_F from several routines. New
935 body for internal package Conversions_Operations.
936 (Time_Of): Add default parameters for several formals.
938 * a-caldel.adb: Minor reformatting
940 * a-calend.ads, a-calend.adb: New body for internal package
941 Conversions_Operations.
942 (Time_Of): Add default parameters for several formals.
944 * Makefile.rtl: Add a-ststop
945 Add Ada.Calendar.Conversions to the list of runtime files.
948 * a-calcon.adb, a-calcon.ads: New files.
950 2008-04-08 Jose Ruiz <ruiz@adacore.com>
951 Tristan Gingold <gingold@adacore.com>
953 * s-interr-dummy.adb, s-interr-vms.adb, s-interr-sigaction.adb
954 (Install_Restricted_Handlers): New procedure
955 which is a simplified version of Install_Handlers that does not store
956 previously installed.
958 * s-interr-vxworks.adb: Fix ACATS cxc3001
959 On VxWorks interrupts can't be detached.
960 (Install_Restricted_Handlers): New procedure.
962 * s-interr.ads, s-interr.adb (Install_Restricted_Handlers): New
965 2008-04-08 Olivier Hainque <hainque@adacore.com>
967 * s-intman-vxworks.ads, s-intman-vxworks.adb
968 (Map_And_Raise_Exception): Remove. Was an import of only part of the
969 required services already implemented elsewhere.
970 (Notify_Exception): Delete body, import __gnat_error_handler instead.
971 (Initialize): Add SA_SIGINFO to the sa_flags, to get the sigcontext
972 argument passed to the handler, which we need for ZCX propagation
975 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
977 * adaint.h, adaint.c (__gnat_current_time_string): New routine.
979 * g-timsta.adb, g-timsta.ads: New files.
981 2008-04-08 Robert Dewar <dewar@adacore.com>
983 * a-except-2005.ads, a-except-2005.adb, a-except.ads, a-except.adb
984 (Raise_Exception): In accordance with AI-446, raise CE for Null_Id
985 (Raise_Exception_Always): Fix documentation accordingly
987 2008-04-08 Robert Dewar <dewar@adacore.com>
989 * a-strbou.ads, a-strbou.adb (From_String): New procedure (for use by
992 * sem_ch13.ads (Rep_Item_Too_Late): Document that Stream_Convert sets
995 2008-04-08 Javier Miranda <miranda@adacore.com>
996 Robert Dewar <dewar@adacore.com>
997 Ed Schonberg <schonberg@adacore.com>
999 * a-tags.adb (Register_Interface_Offset): New subprogram.
1000 (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment).
1001 (To_Predef_Prims_Table_Ptr): Removed.
1002 (Acc_Size): Removed.
1003 (To_Acc_Size): Removed.
1004 (Parent_Size): Modified to the call the subprogram returning the size of
1005 the parent by means of the new TSD component Size_Func.
1007 * a-tags.ads (Offset_To_Top_Ptr): New access type declaration.
1008 (DT_Offset_To_Top_Offset): New constant value that is used to generate
1009 code referencing the Offset_To_Top component of the dispatch table's
1011 (Prim_Ptr): New declaration of access to procedure. Used to avoid the
1012 use of 'address to initialize dispatch table slots.
1013 (Size_Func): New component of the TSD. Used by the run-time to call the
1014 size primitive of the tagged type.
1016 * checks.adb (Apply_Access_Check): Avoid check when accessing the
1017 Offset_To_Top component of a dispatch table.
1018 (Null_Exclusion_Static_Checks): If the non-null access type appears in a
1019 deferred constant declaration. do not add a null expression, to prevent
1020 spurious errors when full declaration is analyzed.
1021 (Apply_Discriminant_Check): If both discriminant constraints share a
1022 node which is not static but has no side effects, do not generate a
1023 check for that discriminant.
1024 (Generate_Index_Checks): Set Name_Req to true in call to duplicate
1025 subexpr, since the prefix of an attribute is a name.
1027 * checks.ads: Fix nit in comment.
1029 * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec
1030 and body of predefined primitives in case of CPP tagged type
1032 (Freeze_Type): Deal properly with no storage pool case
1033 (Make_Predefined_Primitive_Specs): Generate specification of abstract
1034 primitive Deep_Adjust if a nonlimited interface is derived from a
1036 (Build_Dcheck_Functions): Create discriminant-checking functions only
1037 for variants that have some component(s).
1038 (Build_Slice_Assignment): In expanded code for slice assignment, handle
1039 properly the case where the slice bounds extend to the last value of the
1040 underlying representation.
1041 (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value
1042 (Is_Variable_Size_Record): An array component has a static size if
1043 index bounds are enumeration literals.
1045 * exp_disp.adb (Make_DT): Use the first subtype to determine whether
1046 an external tag has been specified for the type.
1047 (Building_Static_DT): Add missing support for private types.
1048 (Make_DT): Add declaration of Parent_Typ to ensure consistent access
1049 to the entity associated with the parent of Typ. This is done to
1050 avoid wrong access when the parent is a private type.
1051 (Expand_Interface_Conversion): Improve error message when the
1052 configurable runtime has no support for dynamic interface conversion.
1053 (Expand_Interface_Thunk): Add missing support to interface types in
1054 configurable runtime.
1055 (Expand_Dispatching_Call): remove obsolete code.
1056 (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and
1057 ensure that all subtypes and aggregates associated with dispatch
1058 tables have the attribute Is_Dispatch_Table_Entity set to true.
1059 (Register_Primitive): Rename one variable to improve code reading.
1060 Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o
1061 of the pointer to the 'size primitive in the TSD.
1063 * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity.
1064 (RE_Offset_To_Top_Ptr): New entity.
1065 (RE_Register_Interface_Offset): New entity.
1066 (RE_Set_Dynamic_Offset_To_Top): New entity.
1067 (RE_Set_Offset_To_Top): Removed entity.
1068 (RE_Prim_Ptr): New entity
1069 (RE_Size_Func): New entity
1070 (RE_Size_Ptr): New entity
1071 (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF.
1072 (Ada_Dispatching_Child): Define this new subrange.
1073 (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock,
1074 RE_Time_Span, and RE_Time_Span_Zero).
1075 (RE_Unit_Table): Add new required run-time calls
1077 * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching
1080 * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram.
1081 (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that
1082 initializes the Offset_To_Top component of a dispatch table.
1083 (Build_Predef_Prims): Removed.
1084 (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by
1086 (Build_Set_Size_Function): New subprogram.
1088 * exp_ch13.adb: Do not generate storage variable for storage_size zero
1089 (Expand): Handle setting/restoring flag Inside_Freezing_Actions
1091 2008-04-08 Robert Dewar <dewar@adacore.com>
1093 * a-ztdeau.adb, a-tideau.adb, a-wtdeau.adb (Puts_Dec): Fix error in
1094 computing Fore when Exp > 0
1096 2008-04-08 Robert Dewar <dewar@adacore.com>
1098 * back_end.adb: Remove Big_String_Ptr declarations (now in Types)
1100 * errout.adb: Remove Big_String_Ptr declarations (now in Types)
1101 Change name Is_Style_Msg to Is_Style_Or_Info_Msg
1103 * fmap.adb: Remove Big_String declarations (now in Types)
1104 (No_Mapping_File): New Boolean global variable
1105 (Initialize): When mapping file cannot be read, set No_Mapping_File to
1107 (Update_Mapping_File): Do nothing if No_Mapping_File is True. If the
1108 tables were empty before adding entries, open the mapping file
1109 with Truncate = True, instead of delete/re-create.
1111 * fname-sf.adb: Remove Big_String declarations (now in Types)
1113 * s-strcom.adb, g-dyntab.ads, g-table.ads, s-carsi8.adb,
1114 s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for
1117 * table.ads: Add for Table_Ptr'Storage_Size use 0
1119 * types.ads: Add Big_String declarations
1120 Add Size_Clause of zero for big pointer types
1122 2008-04-08 Vincent Celier <celier@adacore.com>
1124 * clean.adb (Parse_Cmd_Line): Recognize switch --subdirs=
1125 (Usage): Add line for switch --subdirs=
1126 Add new switch -eL, to follow symbolic links when processing project
1129 * gnatcmd.adb: Process switches -eL and --subdirs=
1130 (Non_VMS_Usage): Output "gnaampcmd" instead of "gnat", and call
1131 Program_Name to get proper tool names when AAMP_On_Target is set.
1132 (Gnatcmd): Call Add_Default_Search_Dirs and Get_Target_Parameters to get
1133 AAMP_On_Target set properly for use of GNAAMP tools (this is needed by
1134 Osint.Program_Name).
1136 * gnatname.adb: (Scan_Args): Recognize switches -eL and --subdirs=
1137 (Usage): Add lines for switches -eL and --subdirs=
1139 * makeusg.adb: Add line for switch --subdirs=
1142 (Source_Data): New Boolean component Compiled, defaulted to True
1143 (Empty_File_Name: New global variable in private part, initialized in
1144 procedure Initialize.
1145 (Subdirs_Option): New constant string
1146 (Subdirs): New String_Ptr global variable
1147 (Language_Config): New component Include_Compatible_Languages
1148 (Project_Qualifier): New type for project qualifiers
1149 (Project_Data): New component Qualifier
1150 (Project_Configuration): New component Archive_Builder_Append_Option
1152 * prj-nmsc.adb (Get_Unit_Exceptions): When a unit is already in
1153 another imported project indicate the name of this imported project.
1154 (Check_File): When a unit is in two project files, indicate the project
1155 names and the paths of the source files for each project.
1156 (Add_Source): Set Compiled to False if compiler driver is empty. Only
1157 set object, dependency and switches file names if Compiled is True.
1158 (Process_Compiler): Allow the empty string for value of attribute Driver
1159 (Get_Directories): When Subdirs is not null and Object_Dir is not
1160 specified, locate and create if necessary the actual object dir.
1161 (Locate_Directory): When Subdirs is not empty and Create is not the
1162 empty string, locate and create if necessary the actual directory
1163 as a subdirectory of directory Name.
1164 (Check_Library_Attributes.Check_Library): Allow a project where the only
1165 "sources" are header files of file based languages to be imported by
1166 library projects, in multi-language mode (gprbuild).
1167 (Check_Library_Attributes.Check_Library): In multi-language mode
1168 (gprbuild), allow a library project to import a project with no
1169 sources, even when this is not declared explicitly.
1170 (Check_If_Externally_Built): A virtual project extending an externally
1171 built project is also externally built.
1172 (Check_Library_Attributes): For a virtual project extending a library
1173 project, inherit the library directory.
1174 (Process_Project_Level_Array_Attributes): Process new attribute
1175 Inherit_Source_Path.
1176 For projects with specified qualifiers "standard", "library" or
1177 "abstract", check that the project conforms to the qualifier.
1178 (Process_Project_Level_Simple_Attributes): Process new attribute
1179 Archive_Builder_Append_Option.
1181 * switch-m.adb: (Scan_Make_Switches): Process switch --subdirs=
1182 (Normalize_Compiler_Switches): Only keep compiler switches that are
1183 passed to gnat1 by the gcc driver and that are stored in the ALI file
1185 Do not take into account switc -save-temps
1187 * makegpr.adb (Compile_Link_With_Gnatmake): Transmit switch -eL if
1188 gprmake is called with -eL.
1189 (Scan_Arg): Recognize switch -eL
1190 (Usage): Add line for switch -eL
1192 * prj.adb (Initialize): Initialize Empty_File_Name
1193 (Project_Empty): New component Qualifier
1195 * prj-attr.ads, prj-attr.adb: New project level attribute
1196 Inherit_Source_Path.
1197 New project level attribute Archive_Builder_Append_Option
1199 * prj-dect.adb: Replace System.Strings by GNAT.Strings.
1201 * prj-ext.adb (Initialize_Project_Path): In Multi_Language mode, add
1202 <prefix>/lib/gnat in the project path, after <prefix>/share/gpr, for
1203 upward compatibility.
1205 * prj-part.adb (Project_Path_Name_Of.Try_Path): In high verbosity, put
1206 each Trying ..." on different lines.
1207 (Parse_Single_Project): Recognize project qualifiers. Fail in qualifier
1208 is "configuration" when not in configuration. Fail when in configuration
1209 when a specified qualifier is other than "configuration".
1211 * prj-proc.adb (Process_Declarative_Items): Link new elements of copied
1212 full associative array together.
1213 (Recursive_Process): Put the project qualifier in the project data
1215 * prj-tree.ads, prj-tree.adb: (Project_Qualifier_Of): New function
1216 (Set_Project_Qualifier_Of): New procedure
1218 2008-04-08 Robert Dewar <dewar@adacore.com>
1220 * errout.ads: Update comments for new handling of info: messages
1222 * erroutc.adb (Matches): New procedure
1223 (Warning_Specifically_Suppressed): Modified to handle multiple * chars
1224 (Is_Style_Or_Info_Msg): New name for Is_Style_Msg, now set for
1225 info messages as well as style messages.
1227 * erroutc.ads: Remove unneeded fields from Specific_Warning_Entry
1229 * sem_elab.adb (Supply_Bodies): Create actual bodies for stubbed
1231 (Check_A_Call): Special "info: " warnings now have ? in the text
1232 (Elab_Warning): Use info message in static case
1234 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1236 * exp_aggr.adb (Static_Array_Aggregate): Use Max_Aggr_Size to determine
1237 whether an array aggregate with static bounds and scalar components
1238 should be expanded into a static constant.
1240 2008-04-08 Gary Dismukes <dismukes@adacore.com>
1241 Ed Schonberg <schonberg@adacore.com>
1242 Robert Dewar <dewar@adacore.com>
1244 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Add tests of
1245 Has_Stream_Attribute_ Definition when checking for available stream
1246 attributes on parameters of a limited type in Ada 2005. Necessary for
1247 proper recognition of visible stream attribute clauses.
1248 (Has_Stream_Attribute_Definition): If the type is derived from a
1249 private type, then use the derived type's underlying type for checking
1250 whether it has stream attributes.
1251 (Validate_Object_Declaration): The check for a user-defined Initialize
1252 procedure applies also to types with controlled components or a
1253 controlled ancestor.
1254 Reject an object declaration in a preelaborated unit if the type is a
1255 controlled type with an overriding Initialize procedure.
1256 (Validate_Remote_Access_To_Class_Wide_Type): Return without further
1257 checking when the parent of a dereference is a selected component and
1258 the name has not been analyzed.
1260 * sem_ch4.adb (Analyze_Selected_Component): Add checking for selected
1261 prefixes that are invalid explicit dereferences of remote
1262 access-to-class-wide values, first checking whether the selected
1263 component is a prefixed form of call to a tagged operation.
1264 (Analyze_Call): Remove code that issues an error for limited function
1265 calls in illegal contexts, as we now support all of the contexts that
1266 were forbidden here.
1267 Allow a function call that returns a task.and appears as the
1268 prefix of a selected component.
1269 (Analyze_Reference): Give error message if we try to make a 'Reference
1270 for an object that is atomic/aliased without its type having the
1271 corresponding attribute.
1272 (Analyze_Call): Remove condition checking for attributes to allow
1273 calls to functions with inherently limited results as prefixes of
1274 attributes. Remove related comment about Class attributes.
1275 (Analyze_Selected_Component): If the prefix is a remote type, check
1276 whether this is a prefixed call before reporting an error.
1277 (Complete_Object_Operation): If the controlling formal is an access to
1278 variable reject an actual that is a constant or an access to one.
1279 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
1280 primitive operations from base type.
1282 * exp_ch4.adb (Expand_N_Indexed_Component): Test for prefix that is a
1284 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
1285 (Expand_N_Selected_Component): Test for prefix that is a build-in-place
1286 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
1287 (Expand_N_Slice): Test for prefix that is a build-in-place function call
1288 and call Make_Build_In_Place_Call_In_Anonymous_Context.
1289 (Analyze_Call): Remove code that issues an error for limited function
1290 calls in illegal contexts, as we now support all of the contexts that
1291 were forbidden here.
1292 New calling sequence for Get_Simple_Init_Val
1293 (Expand_Boolean_Operator): Add call to Silly_Boolean_Array_Xor_Test
1294 (Expand_N_Op_Not): Add call to Silly_Boolan_Array_Not_Test
1296 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1297 Ed Schonberg <schonberg@adacore.com>
1298 Robert Dewar <dewar@adacore.com>
1300 * exp_ch2.adb: Minor reformatting.
1301 (Expand_Entry_Index_Parameter): Set the type of the identifier.
1302 (Expand_Entry_Reference): Add call to Expand_Protected_Component.
1303 (Expand_Protected_Component): New routine.
1304 (Expand_Protected_Private): Removed.
1305 Add Sure parameter to Note_Possible_Modification calls
1307 * sem_ch12.ads, sem_ch12.adb (Analyze_Subprogram_Instantiation): The
1308 generated subprogram declaration must inherit the overriding indicator
1309 from the instantiation node.
1310 (Validate_Access_Type_Instance): If the designated type of the actual is
1311 a limited view, use the available view in all cases, not only if the
1312 type is an incomplete type.
1313 (Instantiate_Object): Actual is illegal if the formal is null-excluding
1314 and the actual subtype does not exclude null.
1315 (Process_Default): Handle properly abstract formal subprograms.
1316 (Check_Formal_Package_Instance): Handle properly defaulted formal
1317 subprograms in a partially parameterized formal package.
1318 Add Sure parameter to Note_Possible_Modification calls
1319 (Validate_Derived_Type_Instance): if the formal is non-limited, the
1320 actual cannot be limited.
1321 (Collect_Previous_Instances): Generate instance bodies for subprograms
1324 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Small): Don't
1326 Add Sure parameter to Note_Possible_Modification calls
1327 (Analyze_At_Clause): Preserve Comes_From_Source on Rewrite call
1328 (Analyze_Attribute_Definition_Clause, case Attribute_Address): Check for
1329 constant overlaid by variable and issue warning.
1330 Use new Is_Standard_Character_Type predicate
1331 (Analyze_Record_Representation_Clause): Check that the specified
1332 Last_Bit is not less than First_Bit - 1.
1333 (Analyze_Attribute_Definition_Clause, case Address): Check for
1334 self-referential address clause
1336 * sem_ch5.ads, sem_ch5.adb (Diagnose_Non_Variable_Lhs): Rewrite the
1337 detection mechanism when the lhs is a prival.
1338 (Analyze_Assignment): Call Check_Unprotected_Access to detect
1339 assignment of a pointer to protected data, to an object declared
1340 outside of the protected object.
1341 (Analyze_Loop_Statement): Check for unreachable code after loop
1342 Add Sure parameter to Note_Possible_Modication calls
1343 Protect analysis from previous syntax error such as a scope mismatch
1345 (Analyze_Assignment_Statement): The assignment is illegal if the
1346 left-hand is an interface.
1348 * sem_res.ads, sem_res.adb (Resolve_Arithmetic_Op): For mod/rem check
1349 violation of restriction No_Implicit_Conditionals
1350 Add Sure parameter to Note_Possible_Modication calls
1351 Use new Is_Standard_Character_Type predicate
1352 (Make_Call_Into_Operator): Preserve Comes_From_Source when rewriting
1353 call as operator. Fixes problems (e.g. validity checking) which
1354 come from the result looking as though it does not come from source).
1355 (Resolve_Call): Check case of name in named parameter if style checks
1357 (Resolve_Call): Exclude calls to Current_Task as entry formal defaults
1358 from the checking that such calls should not occur from an entry body.
1359 (Resolve_Call): If the return type of an Inline_Always function
1360 requires the secondary stack, create a transient scope for the call
1361 if the body of the function is not available for inlining.
1362 (Resolve_Actuals): Apply Ada2005 checks to view conversions of arrays
1363 that are actuals for in-out formals.
1364 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
1365 primitive operations from base type.
1366 (Analyze_Selected_Component): If the context is a call to a protected
1367 operation the parent may be an indexed component prior to expansion.
1368 (Resolve_Actuals): If an actual is of a protected subtype, use its
1369 base type to determine whether a conversion to the corresponding record
1371 (Resolve_Short_Circuit): Handle pragma Check
1373 * sem_eval.adb: Minor code reorganization (usea Is_Constant_Object)
1374 Use new Is_Standard_Character_Type predicate
1375 (Eval_Relational_Op): Catch more cases of string comparison
1377 2008-04-08 Robert Dewar <dewar@adacore.com>
1378 Gary Dismukes <dismukes@adacore.com>
1380 * s-rident.ads: Add No_Default_Initialization restriction
1383 (Has_Non_Null_Base_Init_Proc): Handle No_Default_Initialization case
1384 (Set_TSS): Handle No_Default_Initialization case
1386 * exp_ch6.adb (Expand_N_Subprogram_Body): Handle restriction
1387 No_Default_Initialization
1388 (Expand_N_Subprogram_Body): Remove redundant initialization of out
1389 parameters when Normalize_Scalars is active.
1390 (Add_Final_List_Actual_To_Build_In_Place_Call): Add formal Sel_Comp
1391 Fix casing error in formal parameter name in call
1392 (Register_Predefined_DT_Entry): Replace occurrences of RE_Address by
1393 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
1394 dispatching call on VM targets.
1396 2008-04-08 Gary Dismukes <dismukes@adacore.com>
1397 Thomas Quinot <quinot@adacore.com>
1399 * exp_ch7.adb (Find_Final_List): Change the test for generating a
1400 selected component from an access type's Associated_Final_Chain to
1401 check for the presence of that field, rather than assuming it exists
1402 for all named access types.
1403 (Make_Clean): New formal Chained_Cleanup_Action allowing to specify a
1404 procedure to call at the end of the generated cleanup procedure.
1405 (Expand_Cleanup_Actions): When a new cleanup procedure is generated, and
1406 and an At_End_Proc already exists in the handled sequence of statements
1407 for which cleanup actions are being expanded, the original cleanup
1408 action must be preserved.
1410 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1411 Ed Schonberg <schonberg@adacore.com>
1412 Robert Dewar <dewar@adacore.com>
1413 Gary Dismukes <dismukes@adacore.com>
1415 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry,
1416 Build_Unprotected_Subprogram_Body): Generate debug info for
1417 declarations related to the handling of private data in task and
1419 (Debug_Private_Data_Declarations): New subprogram.
1420 (Install_Private_Data_Declarations): Remove all debug info flagging.
1421 This is now done by Debug_Private_Data_Declarations at the correct
1423 (Build_Simple_Entry_Call): If the task name is a function call, expand
1424 the prefix into an object declaration, and make the surrounding block a
1426 (Build_Master_Entity): An internal block is a master if it wraps a call.
1427 Code reformatting, update comments. Code clean up.
1428 (Make_Task_Create_Call): Use 'Unrestricted_Access instead of 'Address.
1429 (Replicate_Entry_Formals): If the formal is an access parameter or
1430 anonymous access to subprogram, copy the original tree to create new
1431 entities for the formals of the subprogram.
1432 (Expand_N_Task_Type_Declaration): Create a Relative_Deadline variable
1433 for tasks to store the value passed using pragma Relative_Deadline.
1434 (Make_Task_Create_Call): Add the Relative_Deadline argument to the
1435 run-time call to create a task.
1436 (Build_Wrapper_Spec): If the controlling argument of the interface
1437 operation is an access parameter with a non-null indicator, use the
1438 non-null indicator on the wrapper.
1440 * sem_ch9.adb (Analyze_Protected_Type): Only retrieve the full view when
1441 present, which it may not be in the case where the type entity is an
1442 incomplete view brought in by a limited with.
1443 (Analyze_Task_Type): Only retrieve the full view when present, which it
1444 may not be in the case where the type entity is an incomplete view brought
1445 in by a limited with.
1446 (Analyze_Protected_Definition): Set Is_Frozen on all itypes generated for
1447 private components of a protected type, to prevent the generation of freeze
1448 nodes for which there is no proper scope of elaboration.
1450 * exp_util.ads, exp_util.adb
1451 (Remove_Side_Effects): If the expression is a function call that returns a
1452 task, expand into a declaration to invoke the build_in_place machinery.
1453 (Find_Protection_Object): New routine.
1454 (Remove_Side_Effects): Also make a copy of the value
1455 for attributes whose result is of an elementary type.
1456 (Silly_Boolean_Array_Not_Test): New procedure
1457 (Silly_Boolean_Array_Xor_Test): New procedure
1458 (Is_Volatile_Reference): New function
1459 (Remove_Side_Effects): Use Is_Volatile_Reference
1460 (Possible_Bit_Aligned_Component): Handle slice case properly
1462 * exp_pakd.adb (Expand_Packed_Not): Move silly true/true or false/false
1463 case test to Exp_Util
1464 (Expand_Packed_Xor): Move silly true/true case test to Exp_Util
1466 2008-04-08 Thomas Quinot <quinot@adacore.com>
1468 * exp_dist.ads, exp_dist.adb: Fix casing error in formal parameter name
1470 (Add_RACW_Features): When processing an RACW in another unit than the
1471 main unit, set Body_Decls to No_List to indicate that the bodies of
1472 the type's TSS must not be generated.
1473 (GARLIC_Support.Add_RACW_Read_Attribute,
1474 GARLIC_Support.Add_RACW_Write_Attribute): Do not generate bodies if
1475 Body_Decls is No_List.
1476 (PolyORB_Support.Add_RACW_Read_Attribute,
1477 PolyORB_Support.Add_RACW_Write_Attribute,
1478 PolyORB_Support.Add_RACW_From_Any,
1479 PolyORB_Support.Add_RACW_To_Any,
1480 PolyORB_Support.Add_RACW_TypeCode): Same.
1481 (Transmit_As_Unconstrained): New function.
1482 (Build_Ordered_Parameters_List): Use the above to order parameters.
1483 (GARLIC_Support.Build_General_Calling_Stubs):
1484 Use the above to determine which parameters to unmarshall using 'Input
1485 at the point where their temporary is declared (as opposed to later on
1487 (PolyORB_Support.Build_General_Calling_Stubs):
1488 Use the above to determine which parameters to unmarshall using From_Any
1489 at the point where their temporary is declared (as opposed to later on
1490 with an assignment).
1492 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1494 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): If this is
1495 an Input function for an access type, do not perform default
1496 initialization on the local variable that receives the value, to
1497 prevent spurious warnings when the type is null-excluding.
1499 2008-04-08 Robert Dewar <dewar@adacore.com>
1500 Ed Schonberg <schonberg@adacore.com>
1502 * freeze.adb (Freeze_Entity): Improve warnings on access types in pure
1504 (Size_Known): Generic formal scalar types have known at compile
1505 time size, so remove check.
1506 Fix casing error in formal parameter name in call
1507 (Freeze_Subprogram): If the subprogram is a user-defined operator,
1508 recheck its overriding indication.
1510 2008-04-08 Vincent Celier <celier@adacore.com>
1512 * gnat1drv.adb: Send all messages indicating an error to standard error
1514 2008-04-08 Robert Dewar <dewar@adacore.com>
1516 * gnatbind.adb (Restriction_Could_Be_Set): New procedure
1517 (List_Applicable_Restrictions): Do not list existing restrictions
1519 2008-04-08 Thomas Quinot <quinot@adacore.com>
1521 * g-socket.ads, g-socket.adb: Improve documentation of GNAT.Sockets:
1522 add a pointer to generic sockets literature
1523 do not mention that the given example is "typical" usage.
1524 Remove obsolete comment about multicast not being supported on Windows.
1525 (Connect_Socket): Make Server mode IN rather than IN OUT
1526 since this formal is never modified.
1528 2008-04-08 Robert Dewar <dewar@adacore.com>
1530 * sprint.adb (Write_Itype): Handle Itypes whose Parent field points to
1531 the declaration for some different entity.
1532 (Sprint_Node_Actual, case N_Derived_Type_Definition): When an interface
1533 list is precent (following the parent subtype indication), display
1534 appropriate "and" keyword.
1536 * itypes.adb: Remove unnecessary calls to Init_Size_Align and Init_Esize
1537 Remove unnecessary calls to Init_Size_Align and Init_Esize.
1538 Add notes on use of Parent field of an Itype
1540 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1541 Robert Dewar <dewar@adacore.com>
1542 Gary Dismukes <dismukes@adacore.com>
1544 * lib-xref.adb (Is_On_LHS): Remove dead code
1545 (Output_Overriden_Op): If the overridden operation is itself inherited,
1546 list the ancestor operation, which is the one whose body or absstract
1547 specification is actually being overridden. For source navigation
1550 * sem_ch7.adb (Is_Primitive_Of): use base type to determine whether
1551 operation is primitive for the type.
1552 (Declare_Inherited_Private_Subprograms): If the new operation overrides
1553 an inherited private subprogram, set properly the Overridden_Operation
1554 attribute, for better cross-reference information.
1555 (Analyze_Package_Specification): Do late analysis of spec PPCs
1556 (Install_Private_Declaration, Uninstall_Declarations): Save/restore
1557 properly the full view and underlying full views of a private type in a
1558 child unit, whose full view is derived from a private type in a parent
1559 unit, and whose own full view becomes visible in the child body.
1561 * sem_disp.adb (Check_Dispatching_Operation): When a body declares a
1562 primitive operation after the type has been frozen, add an explicit
1563 reference to the type and the operation, because other primitive
1564 references have been emitted already.
1565 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
1566 dispatching call on VM targets.
1568 2008-04-08 Vincent Celier <celier@adacore.com>
1569 Thomas Quinot <quinot@adacore.com>
1571 * make.adb: (Gnatmake_Called): Remove, no longer necessary
1572 (Compile_Surces): Call Delete_Temp_Config_Files only if Gnatmake_Called
1573 is True and Debug_Flag_N is False. Debug_Flag_N means "keep temp files".
1574 (Insert_Project_Sources): Take into account index in multi-unit source
1576 After building a library project, delete all temporary files.
1577 (Initialize): Reset current output after parsing project file.
1578 (Collect_Arguments_And_Compile): Never insert in the queue the sources
1579 of library projects that are externally built.
1580 Put file name in error and inform messages if -df is used
1581 (Display): If invoked with -d7, do not display path names, but only
1584 * makeutl.ads (Path_Or_File_Name): New function
1585 (Path_Or_File_Name): New function
1587 2008-04-08 Arnaud Charlet <charlet@adacore.com>
1589 * Make-lang.in: Disable warnings during first stage of bootstrap
1591 Update dependencies.
1593 2008-04-08 Vincent Celier <celier@adacore.com>
1595 * mlib-prj.adb (Build_Library): Compare with ALI file name in canonical
1596 case to decide if ALI object file is included in library.
1597 (Build_Library): Never attempt to build a library if the project is
1600 2008-04-08 Thomas Quinot <quinot@adacore.com>
1602 * nlists.adb (Is_Non_Empty_List): Remove redundant test. First
1603 (No_List) is defined to return Empty.
1605 2008-04-08 Jose Ruiz <ruiz@adacore.com>
1607 * osint.ads, osint.adb (Get_Libraries_From_Registry): Improve
1610 (Read_Default_Search_Dirs): Do not consider spaces as path separators
1611 because spaces may be part of legal paths.
1613 2008-04-08 Robert Dewar <dewar@adacore.com>
1615 * par-ch11.adb (P_Exception_Handler): Check indentation level for
1618 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1620 * par-ch3.adb (P_Type_Declaration) Reject the keyword "synchronized"
1621 in a type declaration, if this is not an interface declaration or
1622 private type extension.
1624 2008-04-08 Vincent Celier <celier@adacore.com>
1626 * prj-util.adb (Executable_Of): New String parameter Language. When
1627 Ada_Main is False and Language is not empty, attempt to remove the body
1628 suffix or the spec suffix of the language to get the base of the
1629 executable file name.
1630 (Put): New Boolean parameter Lower_Case, defauilted to False. When
1631 Lower_Case is True, put the value in lower case in the name list.
1632 (Executable_Of): If there is no executable suffix in the configuration,
1633 then do not modify Executable_Extension_On_Target.
1635 * prj-util.ads (Executable_Of): New String parameter Language,
1636 defaulted to the empty string.
1637 (Put): New Boolean parameter Lower_Case, defauilted to False
1639 2008-04-08 Robert Dewar <dewar@adacore.com>
1641 * scng.adb (Scan_Identifier): Handle case of identifier starting with
1642 wide character using UTF-8 encoding.
1644 2008-04-08 Javier Miranda <miranda@adacore.com>
1646 * sem.adb (Analyze): Consider case in which we analyze an empty node
1647 that was generated by a call to a runtime function that is not
1648 available under the configurable runtime.
1650 * sem.ads (Inside_Freezing_Actions): New flag.
1651 (Save_Check_Policy_List): New field in scope stack entry
1653 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1654 Robert Dewar <dewar@adacore.com>
1656 * sem_aggr.adb (Analyze_N_Extension_Aggregate): Add legality checks for
1657 the ancestor part of an extension aggregate for a limited type.
1658 (Resolve_Array_Aggregate): Issue warning for sliding of aggregate with
1659 enumeration index bounds.
1660 (Resolve_Array_Aggregate): Add circuit for diagnosing missing choices
1661 when array is too short.
1662 (Check_Expr_OK_In_Limited_Aggregate): Move function
1663 Check_Non_Limited_Type from Resolve_Record_Aggregate to top level (and
1665 (Resolve_Array_Aggregate.Resolve_Aggr_Expr):
1666 Check_Expr_OK_In_Limited_Aggregates called to check for illegal limited
1667 component associations.
1668 (Check_Non_Limited_Type): Moved to outer level and renamed.
1669 (Resolve_Record_Aggregate): In an extension aggregate, an association
1670 with a box initialization can only designate a component of the
1671 extension, not a component inherited from the given ancestor
1673 * sem_case.adb: Use new Is_Standard_Character_Type predicate
1675 2008-04-08 Robert Dewar <dewar@adacore.com>
1677 * s-imgdec.adb (Set_Decimal_Digits): Fix error when input is zero with
1679 (Set_Decimal_Digits): Properly handle Aft=0 (equivalent to Aft=1)
1680 Properly handle case where Aft > Scale and input number is less than
1683 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1685 * s-stoele.ads, s-soflin.ads: Move the location of
1686 Dummy_Communication_Block from System.Storage_Elements to
1689 * s-tpobop.ads: Add comment on usage of Dummy_Communication_Block to
1690 emulate Communication_Block in certain scenarios.
1692 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1694 * s-strxdr.adb, s-stratt.ads, s-stratt.adb (Block_IO_OK): New
1696 Add new subtype S_WWC, unchecked conversion routines From_WWC and
1698 (I_WWC, O_WWC): New routines for input and output of
1699 Wide_Wide_Character.
1701 2008-04-08 Robert Dewar <dewar@adacore.com>
1703 * stringt.adb (Write_String_Table_Entry): Handle wide characters
1706 2008-04-08 Robert Dewar <dewar@adacore.com>
1708 * styleg.adb (Check_Comment): Allow special char after -- in
1709 non-end-of-line case
1711 2008-04-08 Robert Dewar <dewar@adacore.com>
1713 * stylesw.adb: Implement -gnaty + - y options
1714 (Set_GNAT_Style_Check_Options): Includ I in style check string
1716 * stylesw.ads: Add comments for new style switch options
1718 2008-04-08 Sergey Rybin <rybin@adacore.com>
1720 * tree_io.ads: Increase ASIS_Version_Number because of adding Sem_Aux
1721 to the set of the GNAT components needed by ASIS.
1723 2008-04-08 Bob Duff <duff@adacore.com>
1725 * types.h: Change CE_Null_Exception_Id to the correct value (8, was 9).
1727 2008-04-08 Tristan Gingold <gingold@adacore.com>
1729 * vxaddr2line.adb: Use Unsigned_32 instead of Integer for address type.
1730 Improve error message generation.
1732 2008-04-08 Vincent Celier <celier@adacore.com>
1734 * a-direct.adb (Start_Search): Check for Name_Error before checking for
1735 Use_Error, as specified in the RM. Check if directory is open and raise
1736 Use_Error if it is not.
1738 2008-04-08 Vincent Celier <celier@adacore.com>
1739 Robert Dewar <dewar@adacore.com>
1741 * vms_conv.adb (Output_Version): Print "GNAAMP" instead of "GNAT when
1742 AAMP_On_Target is set.
1744 * vms_data.ads: Add NOxxx to style check switch list
1745 Add entry COMPONENTS for -gnatVe
1746 Add VMS qualifiers for -eL (/FOLLOW_LINKS_FOR_FILES) and --subdirs=
1748 (GCC_Switches): Add /ALL_BACK_END_WARNINGS.
1749 Add qualifiers for gnatmetric coupling options
1750 Add note that -gnata enables all checks
1751 Add entries [NO]PARAMETER_ORDER for -gnatw.p[P]
1752 Fix inconsistency for VMS qualifier for the gnatpp '-rnb' option
1753 New warning flag -gnatw.e
1755 * usage.adb: Add entries for -gnaty+ -gnaty- -gnatyy
1756 Add entry for -gnatyN (forgotten before)
1757 Line for new warning switch -gnatw.p
1758 New warning flag -gnatw.e
1760 * gnat_ugn.texi: Add documentation fpr project file switch -aP
1761 Document -gnaty - + y
1762 Replace occurences of "package specification" with "package spec"
1763 Define preprocessing symbols in documentation of gnatprep
1764 Clarify reason for distinguishing overflow checking
1765 Add documentation for project-aware tool switches -eL and --subdirs=
1766 Complete list of configuration pragmas
1767 Specify that, even when gnatmake switch -x is used, mains on the command
1768 line need to be sources of project files.
1769 Editing of gnatcheck/gnatmetric doc.
1770 Add documentation for -gnatw.p/-gnatw.P
1771 Add missing documentation for -fno-inline-functions.
1772 Add documentation for -gnatw.e
1774 * gnat_rm.texi: Add documentation for No_Default_Initialization
1775 Replace occurences of "package specification" with "package spec"
1776 Document use of * in Warnings Off string
1777 Update documentation of alignment/component clauses.
1778 Add documentation for Invalid_Value
1779 Document new consistency rule for Optimize_Alignment
1780 Add documentation for Precondition and Postcondition pragmas
1781 Add documentation for Check and Check_Policy pragmas
1782 Document new Enum_Val attribute
1783 Remove requirement for static string in pragma Assert
1784 Add documentation on GNAT.Time_Stamp
1786 * ug_words: add entry for -gnatVe
1787 Add entries for -gnat.p[P] /WARNINGS=[NO]PARAMETER_ORDER
1788 Add entry for -gnatw.e
1790 * debug.adb: Add missing documentation for d.a flag
1791 Document new -gnatd.a switch.
1792 Add documentation for new gnatmake debug switch -df
1794 2008-04-08 Thomas Quinot <quinot@adacore.com>
1796 * gen-soccon.c: Bump year in copyright notices.
1798 * g-soccon-vxworks.ads: Add new constant IP_PKTINFO
1800 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1802 * ctrl_c.c: Improve handling of ctrl-c on LynxOS and Windows.
1805 2008-04-08 Robert Dewar <dewar@adacore.com>
1806 Bob Duff <duff@adacore.com>
1808 * impunit.adb: Add Interfaces.Java.JNI, System.Strings.Stream_Ops,
1809 Ada.Calendar.Conversions, Ada.Dispatching.EDF, GNAT.Time_Stamp
1811 * s-intman-mingw.adb: Minor comment fix -- spell 'explicitly' correctly
1813 * g-trasym.adb: Minor comment fix -- spell 'explicitly' correctly
1815 * g-trasym.ads: Minor comment improvements
1817 * s-stalib.adb: Minor comment fix -- spell 'explicitly' correctly
1819 * a-sequio.ads, a-direio.ads: improve message for tagged type
1821 * a-strunb.ads: Minor reformatting
1823 * a-tifiio.adb: Minor reformatting
1825 * atree.adb (Fix_Parents): Use clearer names for formals
1826 Cleanup and simplify code
1827 Use named notation in calls
1829 * exp_fixd.adb (Do_Multiply_Fixed_Universal): Use named notation in
1832 * uintp.adb: Used named notation for some confusing calls
1834 * bindusg.adb: Minor change in one line of output
1836 * cstand.adb: Minor reformatting of src representation of Standard
1838 * a-assert.ads: Add comment.
1840 * g-decstr.adb: Fix bad indentation
1842 * expander.ads, expander.adb: Code clean up.
1844 * sem_dist.ads: Minor comment improvement
1846 * sem_type.adb, g-dirope.ads, g-exctra.ads, s-valwch.adb,
1847 s-wchstw.adb, targparm.ads, widechar.adb: Minor reformatting
1849 * i-cstrin.adb: Fix casing error in formal parameter name in call
1851 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1853 * binde.adb (Gather_All_Links, Gather_Dependencies): units that are
1854 mentioned in limited_with_clauses to do create semantic dependencies
1855 even though they appear in the ali file.
1857 2008-04-08 Emmanuel Briot <briot@adacore.com>
1859 * g-comlin.ads, g-comlin.adb (Expansion): Remove unreachable return
1861 (Get_Configuration): New subprogram.
1863 * prj-pp.ads, prj-pp.adb (Pretty_Print): new parameters Id and Id_Tree
1864 These optional parameters help preserve the casing of the project's name
1865 when pretty-printing.
1867 2008-04-08 Jerome Lambourg <lambourg@adacore.com>
1868 Arnaud Charlet <charlet@adacore.com>
1870 * bindgen.adb (Gen_Adainit_Ada): If the main program is a CIL function,
1871 then use __gnat_set_exit_status to report the returned status code.
1873 * comperr.adb (Compiler_Abort): Convert most bug boxes into clean error
1874 messages on .NET, since some constructs of the language are not
1877 * gnatlink.adb (Gnatlink): In case the command line is too long for the
1878 .NET linker, gnatlink now concatenate all .il files and pass this to
1881 2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
1882 Xavier Grave <grave@ipno.in2p3.fr>
1884 * Makefile.in: Add make ifeq define for mips/mipsel support.
1885 * g-soccon-linux-mips.ads, system-linux-mipsel.ads,
1886 system-linux-mips.ads: New files.
1888 2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
1890 * sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to
1891 detect systems using GNU libc.
1897 2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
1899 * s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
1900 constant constant for sysconf call.
1901 (bit_field): New packed boolean type used by cpu_set_t.
1902 (cpu_set_t): New type corresponding to the C type with
1903 the same name. Note that on the Ada side we use a bit
1904 field array for the affinity mask. There is not need
1905 for the C macro for setting individual bit.
1906 (pthread_setaffinity_np): New imported routine.
1907 * Makefile.in: Use s-tasinf-linux.ads and s-tasinf-linux.adb
1910 2008-04-07 Eric Botcazou <ebotcazou@adacore.com>
1912 * utils2.c (build_binary_op): Fold ARRAY_REF and ARRAY_RANGE_REF too.
1914 2008-04-07 Eric Botcazou <ebotcazou@adacore.com>
1916 * gigi.h (create_subprog_type): Remove returns_with_dsp parameter.
1917 * decl.c (gnat_to_gnu_entity): Adjust for above new prototype.
1918 * utils.c (create_subprog_type): Remove returns_with_dsp parameter.
1919 * trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with
1920 Return by Depressed Stack Pointer.
1922 2008-04-06 Eric Botcazou <ebotcazou@adacore.com>
1924 * decl.c (is_variable_size): Do not unconditionally return false
1925 on non-strict alignment platforms.
1927 2008-04-06 Eric Botcazou <ebotcazou@adacore.com>
1929 * decl.c (rest_of_type_decl_compilation_no_defer): New local function
1930 used to process all the variants of the specified type.
1931 (gnat_to_gnu_entity): Invoke rest_of_type_decl_compilation for enumeral
1932 types too. Call rest_of_type_decl_compilation_no_defer if undeferring.
1933 (rest_of_type_decl_compilation): Likewise.
1934 * utils.c (gnat_pushdecl): Propagate the name to all variants of type.
1936 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1938 * gigi.h (insert_block): Kill.
1939 * utils.c (insert_block): Kill.
1941 2008-04-02 Eric Botcazou <ebotcazou@adacore.com>
1943 * decl.c (gnat_to_gnu_entity) <object>: For a constant object whose
1944 type has self-referential size, get the size from the initializing
1945 expression directly if it is also a constant whose nominal type
1946 has self-referential size.
1948 2008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1951 * g-soccon-darwin.ads: Define new constant IP_PKTINFO.
1954 * env.c: Always include crt_externs.h if __APPLE__ is defined.
1955 (__gnat_setenv): Use setenv instead of putenv if __APPLE__ is defined.
1957 2008-04-01 Andreas Jaeger <aj@suse.de>
1959 * g-soccon-linux-ppc.ads: Add new constants SO_REUSEPORT and
1962 2008-03-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1964 * g-table.adb, g-tasloc.adb, g-traceb.ads,
1965 g-trasym.adb, g-utf_32.adb, gen-soccon.c, gigi.h, gmem.c,
1966 gnatbind.adb, gnatchop.adb, gnatcmd.adb,
1967 gnatcmd.ads, gnatdll.adb, gnatfind.adb,
1968 gnatlink.adb, gnatmem.adb, gprep.adb,
1969 i-cstrea-vms.adb, i-cstrin.adb, i-pacdec.ads,
1970 i-vxwork.ads, impunit.adb, init.c, initialize.c, inline.adb,
1971 layout.adb, lib-writ.adb, lib-writ.ads, lib-xref.adb,
1972 lib-xref.ads, lib.adb, link.c, live.ads,
1973 make.adb, makegpr.adb, makeutl.adb, math_lib.adb,
1974 mdll-utl.adb, mdll.ads, memroot.adb, memroot.ads,
1975 misc.c, mlib-prj.adb, mlib-tgt-hpux.adb,
1976 mlib-tgt-linux.adb, mlib-tgt-tru64.adb, mlib-tgt.ads,
1977 namet.adb, namet.h, nlists.adb, nlists.ads,
1978 nlists.h, opt.ads, osint-b.ads, osint-c.adb,
1979 osint-c.ads, osint.adb, osint.ads, output.ads,
1980 par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1981 par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb,
1982 par-endh.adb, par-labl.adb, par-prag.adb,
1983 par-sync.adb, par-tchk.adb, par-util.adb,
1984 par.adb, prep.adb, prep.ads, prepcomp.adb, prj-attr.ads,
1985 prj-dect.adb, prj-env.adb, prj-ext.adb, prj-nmsc.adb,
1986 prj-nmsc.ads, prj-pp.adb, prj-proc.adb,
1987 prj-strt.ads, prj-tree.ads, prj.adb, prj.ads: Fix comment typos.
1989 2008-03-31 Eric Botcazou <ebotcazou@adacore.com>
1991 * decl.c (gnat_to_gnu_entity) <object>: Do not force a non-null
1992 size if it has overflowed.
1994 2008-03-31 Olivier Hainque <hainque@adacore.com>
1995 Eric Botcazou <ebotcazou@adacore.com>
1997 * utils2.c (find_common_type): Document assumption on t1/t2 vs
1998 lhs/rhs. Force use of lhs type if smaller, whatever the modes.
2000 2008-03-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2002 * a-textio.ads, a-witeio.ads, a-ztexio.ads, ali.ads,
2003 einfo.ads, erroutc.adb, erroutc.ads, exp_attr.adb,
2004 exp_imgv.adb, exp_intr.adb, exp_pakd.adb,
2005 exp_pakd.ads, exp_prag.adb, exp_smem.adb,
2006 exp_tss.ads, exp_util.adb, exp_util.ads,
2007 exp_vfpt.adb, freeze.adb, freeze.ads,
2008 frontend.adb, g-alleve.adb, g-altcon.adb,
2009 g-altive.ads, g-alveop.ads, g-alvevi.ads,
2010 g-arrspl.adb, g-busorg.ads, g-calend.adb,
2011 g-calend.ads, g-casuti.ads, g-cgideb.adb,
2012 g-comlin.adb, g-comlin.ads, g-curexc.ads,
2013 g-debpoo.adb, g-debpoo.ads, g-decstr.adb,
2014 g-dirope.adb, g-dirope.ads, g-dynhta.ads,
2015 g-dyntab.adb, g-encstr.ads, g-excact.ads,
2016 g-except.ads, g-expect.ads, g-heasor.adb,
2017 g-hesora.adb, g-hesorg.adb, g-htable.ads,
2018 g-locfil.ads, g-md5.adb, g-md5.ads,
2019 g-memdum.ads, g-moreex.ads, g-os_lib.adb,
2020 g-pehage.adb, g-pehage.ads, g-regexp.adb,
2021 g-regexp.ads, g-regpat.adb, g-regpat.ads,
2022 g-soccon-aix.ads, g-soccon-darwin.ads,
2023 g-soccon-freebsd.ads, g-soccon-hpux-ia64.ads,
2024 g-soccon-hpux.ads, g-soccon-irix.ads,
2025 g-soccon-linux-64.ads, g-soccon-linux-ppc.ads,
2026 g-soccon-linux-x86.ads, g-soccon-lynxos.ads,
2027 g-soccon-mingw.ads, g-soccon-solaris-64.ads,
2028 g-soccon-solaris.ads, g-soccon-tru64.ads,
2029 g-soccon-vms.ads, g-soccon-vxworks.ads,
2030 g-soccon.ads, g-socket.adb, g-socket.ads,
2031 g-socthi-mingw.adb, g-socthi-vms.adb,
2032 g-socthi-vxworks.adb, g-soliop-mingw.ads,
2033 g-soliop-solaris.ads, g-soliop.ads, g-spipat.adb,
2034 g-spipat.ads, g-string.adb, g-stsifd-sockets.adb: Fix comment
2037 2008-03-27 Eric Botcazou <ebotcazou@adacore.com>
2039 * decl.c (gnat_to_gnu_entity) <E_Procedure>: Also set the public flag
2040 if the procedure is imported.
2042 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2044 * adaint.c: Fix warnings.
2046 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2048 * g-dirope.ads, g-dirope.adb: (Dir_Type_Value): Moved to spec.
2050 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2052 * a-witeio.adb: Fix problem with Current_Output (introduce Self).
2053 Fix problem of status check for null file
2055 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2057 * s-proinf-irix-athread.ads, s-vxwork-mips.ads,
2058 s-traces.ads, s-vxwork-arm.ads, s-vxwork-ppc.ads, s-vxwork-sparcv9.ads,
2059 s-tasinf-mingw.ads, s-tasinf-linux.ads, s-tasdeb.ads, mlib-tgt.ads,
2060 i-cstrin.ads, uintp.adb, g-catiio.adb, s-vmexta.ads,
2061 s-trafor-default.ads, s-vxwork-m68k.ads: Minor reformatting. Update
2064 2008-03-26 Thomas Quinot <quinot@adacore.com>
2067 * g-socket.ads, g-socket.adb (Options, Set_Socket_Option,
2068 Get_Socket_Option): Add support for Receive_Packet_Info.
2070 * g-soccon.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
2071 g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
2072 g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-freebsd.ads,
2073 g-soccon-hpux-ia64.ads, g-soccon-solaris-64.ads, g-soccon-darwin.ads,
2074 g-soccon-lynxos.ads, g-soccon-linux-64.ads, g-soccon-linux-x86.ads: Add
2075 new constants SO_REUSEPORT and IP_PKTINFO
2077 2008-03-26 Robert Dewar <dewar@adacore.com>
2079 * a-taster.adb, s-shasto.adb, s-soflin.adb, s-taasde.adb, s-taenca.adb,
2080 a-sytaco.adb, a-sytaco.ads, a-tasatt.adb, a-taside.adb,
2081 a-intnam-lynxos.ads, a-retide.adb, a-intnam-tru64.ads, a-intnam-aix.ads,
2082 a-intnam-irix.ads, a-intnam-hpux.ads, a-intnam-linux.ads,
2083 a-intnam-solaris.ads, a-caldel-vms.adb, a-intnam-vms.ads,
2084 a-excpol-abort.adb, a-intnam-mingw.ads, s-interr.adb, s-interr.ads,
2085 s-intman.ads, s-gloloc.adb, s-osinte-lynxos-3.ads,
2086 s-interr-sigaction.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
2087 a-intnam-freebsd.ads, s-osinte-freebsd.ads, s-osinte-lynxos.ads,
2088 s-taspri-lynxos.ads, s-osinte-tru64.ads, s-osinte-tru64.ads,
2089 s-taspri-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads,
2090 s-osinte-hpux-dce.ads, s-taprop-hpux-dce.adb, s-taspri-hpux-dce.ads,
2091 s-osinte-linux.ads, s-osinte-dummy.ads, s-taprop-dummy.adb,
2092 s-taspri-dummy.ads, s-interr-dummy.adb, s-osinte-solaris.ads,
2093 s-osinte-mingw.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2094 s-inmaop-vms.adb, s-interr-vms.adb, s-intman-vms.ads, s-osinte-vms.ads,
2095 s-osinte-vms.ads, s-taprop-vms.adb, s-taspri-vms.ads,
2096 s-taspri-mingw.ads, s-interr-vxworks.adb, s-inmaop-posix.adb,
2097 s-intman-vxworks.ads, s-osinte-vxworks.ads, s-osprim-vxworks.adb,
2098 s-taspri-vxworks.ads, s-taspri-posix.ads, a-caldel.adb, a-calend.adb,
2099 a-elchha.adb, a-dynpri.adb, a-except.adb, a-except.ads, a-interr.ads,
2100 a-textio.adb, a-tigeau.ads, atree.adb, s-taprob.adb, s-taprop.ads,
2101 s-tarest.adb, s-tarest.ads, s-tasini.adb, s-taskin.adb, s-taskin.ads,
2102 s-tasque.adb, s-tasren.adb, s-tasren.ads, s-tassta.adb, s-tassta.ads,
2103 s-tasuti.adb, s-tataat.adb, s-tataat.ads, s-tpoben.adb, s-tpoben.ads,
2104 s-tpobop.adb, s-tpobop.ads, s-tposen.adb, s-tposen.ads, s-valrea.adb,
2105 s-valuti.adb, a-intnam-darwin.ads, s-osinte-darwin.ads, s-solita.adb,
2106 a-ztinau.ads, s-osinte-linux-hppa.ads, a-except-2005.adb,
2107 a-except-2005.ads, a-rttiev.adb, s-osinte-vxworks6.ads, s-regexp.adb,
2108 s-tasloc.adb: Minor reformatting.
2110 Remove "used for" sections from comments.
2112 2008-03-26 Robert Dewar <dewar@adacore.com>
2114 * s-tpopsp-posix.adb, s-tpopsp-solaris.adb, s-tpopsp-posix-foreign.adb,
2115 s-tpopsp-lynxos.adb, s-tpopde-vms.ads, s-tpopde-vms.adb,
2116 s-tpopsp-vxworks.adb, s-casi16.adb, s-caun16.adb, s-inmaop.ads,
2117 s-tadeca.adb, s-tadeca.ads, s-tadert.adb, s-tadert.ads, s-tpinop.adb,
2118 s-tpinop.ads, s-tporft.adb, a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb,
2119 a-crbtgk.ads, a-crbtgk.adb, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
2120 a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
2121 a-cgcaso.adb, a-cgaaso.adb, a-ciormu.adb, a-cihase.adb, a-swuwha.ads,
2122 a-rbtgso.ads, a-cgaaso.ads, a-cgaaso.ads, a-ciorma.adb, a-chtgke.ads,
2123 a-chtgke.adb, a-llfzti.ads, a-ztenau.adb, a-ztenau.ads, a-stzhas.ads,
2124 a-szbzha.ads, a-szbzha.adb, a-crdlli.ads, a-crdlli.ads, a-crdlli.adb,
2125 i-forbla-darwin.adb, i-forbla.ads, s-regexp.adb, a-nllrar.ads,
2126 a-nlrear.ads, a-nucoar.ads, a-nurear.ads, i-forlap.ads, s-gearop.adb,
2127 s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb, s-gecola.ads,
2128 s-gerebl.adb, s-gerela.ads, a-swuwha.adb, i-forbla-unimplemented.ads,
2129 double spaced if it fits on one line and otherwise single spaced.
2131 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2133 * s-taprop-irix.adb, s-taprop-tru64.adb, s-taprop-lynxos.adb,
2134 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-vxworks.adb,
2135 s-taprop-posix.adb (Create_Task): Do not attempt to set task priority
2136 or task info if the thread could not be created.
2138 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2140 * gnatvsn.ads (Library_Version): Bump to 4.4.
2141 (Current_Year): Bump to 2008.
2143 2008-03-26 Robert Dewar <dewar@adacore.com>
2145 * ali.ads, ali.adb (Optimize_Alignment_Setting): New field in ALI record
2147 * bcheck.adb (Check_Consistent_Optimize_Alignment): New procedure
2149 * debug.adb: Add debug flags d.r and d.v
2150 Add debug flag .T (Optimize_Alignment (Time))
2151 Add debug flag .S (Optimize_Alignment (Space))
2153 * freeze.adb (Freeze_Record_Type): Set OK_To_Reorder_Components
2154 depending on setting of relevant debug flags.
2155 Replace use of Warnings_Off by Has_Warnings_Off
2156 (Freeze_Entity): In circuit for warning on suspicious convention
2157 actuals, do not give warning if subprogram has same entity as formal
2158 type, or if subprogram does not come from source.
2159 (Freeze_Entity): Don't reset Is_Packed for fully rep speced record
2160 if Optimize_Alignment set to Space.
2162 * frontend.adb: Add call to Sem_Warn.Initialize
2163 Add call to Sem_Warn.Output_Unused_Warnings_Off_Warnings
2164 Reset Optimize_Alignment mode from debug switches .S and .T
2166 * layout.adb (Layout_Composite_Object): Rewritten for
2167 Optimize_Aligment pragma.
2169 * lib-writ.ads, lib-writ.adb: New Ox parameter for Optimize_Alignment
2172 * opt.ads, opt.adb: (Optimize_Alignment): New global switch
2174 * par-prag.adb (N_Pragma): Chars field removed, use Chars
2175 (Pragma_Identifier (.. instead, adjustments throughout to accomodate
2176 this change. Add entry for pragma Optimize_Alignment
2178 * sem_prag.adb (N_Pragma): Chars field removed, use Chars
2179 (Pragma_Identifier (..
2180 instead, adjustments throughout to accomodate this change.
2181 (Process_Compile_Time_Warning_Or_Error): Use !! for generated msg
2182 (Favor_Top_Level): Use new function Is_Access_Subprogram_Type
2183 Add implementation of pragma Optimize_Alignment
2185 2008-03-26 Vincent Celier <celier@adacore.com>
2187 * a-szuzti.adb, a-swuwti.adb, a-suteio.adb (functions Get_Line):
2188 Improve memory usage to avoid use of stack.
2190 2008-03-26 Robert Dewar <dewar@adacore.com>
2192 * a-teioed.ads: Correct value of Default_Fill
2194 * a-teioed.adb (Image): Use Fill_Character instead of '*' to fill
2196 2008-03-26 Robert Dewar <dewar@adacore.com>
2198 * a-ztexio.adb, a-ztexio.ads, a-witeio.ads, a-witeio.adb: Fix problem
2199 with Current_Output (introduce Self).
2201 2008-03-26 Robert Dewar <dewar@adacore.com>
2203 * checks.adb (Ensure_Valid): Capture valid status if possible
2206 2008-03-26 Robert Dewar <dewar@adacore.com>
2208 * stand.ads: Deal with reordering of package standard declarations
2210 * cstand.adb: Put package Standard declarations in proper order
2212 2008-03-26 Robert Dewar <dewar@adacore.com>
2214 * einfo.ads, einfo.adb (N_Pragma): Chars field removed, use Chars
2215 (Pragma_Identifier (.. instead.
2216 (OK_To_Reorder_Components): New flag
2217 (Has_Entries): Code cleanup.
2218 (Warnings_Off_Used): New flag
2219 (Warnings_Off_Used_Unmodified): New flag
2220 (Warnings_Off_Used_Unreferenced): New flag
2221 (Has_Warnings_Off): New function
2222 (Has_Unmodified): New function
2223 (Has_Unreferenced): New function
2224 (Is_Trivial_Subprogram): New flag
2225 (Is_Static_Dispatch_Table_Entity): New attribute.
2226 Change name Access_Subprogram_Type_Kind to Access_Subprogram_Kind
2227 (more consistent with other similar names)
2228 (Access_Subprogram_Type): New classification function
2230 2008-03-26 Robert Dewar <dewar@adacore.com>
2232 * errout.ads: Document new !! insertion sequence
2234 * errout.adb (N_Pragma): Chars field removed, use Chars
2235 (Pragma_Identifier (.. instead.
2236 Replace use of Warnings_Off by Has_Warnings_Off
2237 (Error_Msg_Internal): Don't delete warning ending in !!
2239 2008-03-26 Robert Dewar <dewar@adacore.com>
2241 * par.adb (Check_No_Right_Paren): Removed no longer used
2243 * par-ch10.adb (N_Pragma): Chars field removed, use Chars
2244 (Pragma_Identifier (.. instead.
2246 * par-ch10.adb (P_Subunit): Improvement in error recovery and message
2248 * par-tchk.adb, par-ch5.adb, par-ch6.adb, par-ch3.adb,
2249 par-ch4.adb: Minor improvements in error recovery and messages.
2251 * erroutc.adb (Test_Style_Warning_Serious_Msg): Treat style msgs as
2254 * par-ch9.adb: Minor improvements in error recovery and messages
2255 (P_Protected): Better error recovery for "protected type x;"
2257 * par-util.adb: Minor improvements in error recovery and messages
2258 (Check_No_Right_Paren): Removed no longer used
2260 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2262 * exp_aggr.adb (Replace_Type): When checking for self-reference, verify
2263 that the prefix of an attribute is the type of the aggregate being
2266 2008-03-26 Javier Miranda <miranda@adacore.com>
2267 Robert Dewar <dewar@adacore.com>
2269 * exp_attr.adb (N_Pragma): Chars field removed.
2270 (Expand_N_Attribute_Reference): If the designated type associated with
2271 attribute 'Unrestricted_Access is a subprogram entity then replace it
2272 by an E_Subprogram_Type itype.
2273 Implement attribute Old
2275 * sem_attr.ads (Attribute_Class_Array): Move to snames.ads
2277 * sem_attr.adb (Build_Access_Subprogram_Itype): Add documentation.
2279 New_Internal_Entity by call to Create_Itype to centralize calls
2280 building itypes, ad propagate the convention of the designated
2281 subprogram. In addition, disable the machinery cleaning constant
2282 indications from all entities in current scope when 'Unrestricted_Access
2283 corresponds with a node initializing a dispatch table slot.
2284 (Analyze_Attribute): Parameterless attributes returning a string or a
2285 type will not be called with improper arguments, so we can remove junk
2286 code that was dealing with this case.
2287 Implement attribute Old
2289 * snames.ads, snames.h, snames.adb: Add entries for attribute Old
2290 Add entry for pragma Optimize_Alignment
2291 New standard names Sync and Synchronize
2293 2008-03-26 Robert Dewar <dewar@adacore.com>
2294 Arnaud Charlet <charlet@adacore.com>
2296 * exp_ch11.adb (Expand_At_End_Handler): Set From_At_End flag on raise
2298 (No_Exception_Propagation_Active): New function.
2299 (Expand_Exception_Handlers): Use No_Exception_Propagation_Active.
2300 Update comments, and review all uses of No_Exception_Propagation, which
2301 are now correct and in sync with what gigi expects.
2303 * restrict.ads, restrict.adb (No_Exception_Propagation_Active): New
2305 (Expand_Exception_Handlers): Use No_Exception_Propagation_Active.
2306 Update comments, and review all uses of No_Exception_Propagation, which
2307 are now correct and in sync with what gigi expects.
2309 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2311 * sem_ch3.adb (Access_Definition): If the access type is the return
2312 result of a protected function, create an itype reference for it
2313 because usage will be in an inner scope from the point of declaration.
2314 (Build_Derived_Record_Type): Inherit Reverse_Bit_Order and
2315 OK_To_Reorder_Components.
2316 (Make_Index): If an overloaded range includes a universal integer
2317 interpretation, resolve to Standard.Integer.
2318 (Analyze_Subtype_Indication): Copy Convention to subtype
2319 (Check_Abstract_Interfaces): Complete semantic checks on the legality of
2320 limited an synchronized progenitors in type declaration and private
2321 extension declarations.
2323 * exp_ch13.adb (Expand_N_Freeze_Entity): If the scope of the entity is a
2324 protected subprogram body, determine proper scope from subprogram
2327 2008-03-26 Robert Dewar <dewar@adacore.com>
2329 * exp_ch4.adb (Expand_N_Op_Concat): Remove special tests for
2332 2008-03-26 Gary Dismukes <dismukes@adacore.com>
2334 * exp_ch5.adb (Expand_N_Extended_Return_Statement): Suppress generation
2335 of a heap allocator for a limited unconstrained function return when
2336 resstriction No_Allocators is active.
2337 (Analyze_Allocator): The restriction No_Allocators is now only checked
2338 on allocators that have Comes_From_Source set, as per RM-H.4(7).
2340 * sem_ch4.adb (Expand_N_Extended_Return_Statement): Suppress generation
2341 of a heap allocator for a limited unconstrained function return when
2342 resstriction No_Allocators is active.
2343 (Analyze_Allocator): The restriction No_Allocators is now only checked
2344 on allocators that have Comes_From_Source set, as per RM-H.4(7).
2345 (Has_Fixed_Op): If the name in a function call is Standard."*" and the
2346 operands are fixed-point types, the universal_fixed predefined operation
2347 is used, regardless of whether the operand type (s) have a primitive
2348 operation of the same name.
2350 2008-03-26 Javier Miranda <miranda@adacore.com>
2352 * exp_disp.adb (Make_DT, Make_Secondary_DT): Set attribute
2353 Is_Static_Dispatch_Table
2354 (Build_Dispatch_Tables): Replace calls to Exchange_Entities() by calls
2355 to Exchange_Declarations to exchange the private and full-view. Bug
2356 found working in this issue.
2357 (Expand_Dispatching_Call): Propagate the convention of the subprogram
2358 to the subprogram pointer type.
2359 (Make_Secondary_DT): Replace generation of Prim'Address by
2360 Address (Prim'Unrestricted_Access)
2361 (Make_DT): Replace generation of Prim'Address by
2362 Address (Prim'Unrestricted_Access)
2363 (Make_Disp_*_Bodies): When compiling for a restricted profile, use
2364 simple call form for single entry.
2365 (Make_DT): Handle new contents of Access_Disp_Table (access to dispatch
2366 tables of predefined primitives).
2367 (Make_Secondary_DT): Add support to handle access to dispatch tables of
2368 predefined primitives.
2369 (Make_Tags): Add entities to Access_Dispatch_Table associated with
2370 access to dispatch tables containing predefined primitives.
2372 * exp_ch6.adb (N_Pragma): Chars field removed, use Chars
2373 (Pragma_Identifier (.. instead, adjustments throughout to accomodate
2375 (Register_Predefined_DT_Entry): Updated to handle the new contents
2376 of attribute Access_Disp_Table (pointers to dispatch tables containing
2377 predefined primitives).
2379 * exp_util.ads, exp_util.adb (Corresponding_Runtime_Package): New
2381 (Find_Interface_ADT): Updated to skip the new contents of attribute
2382 Access_Dispatch_Table (pointers to dispatch tables containing predefined
2385 * sem_util.adb (Has_Abstract_Interfaces): Add missing support for
2387 (Set_Convention): Use new function Is_Access_Subprogram_Type
2388 (Collect_Interfaces_Info): Updated to skip the new contents of attribute
2389 Access_Dispatch_Table (pointers to dispatch tables containing predefined
2392 * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims): Improve
2393 expanded code avoiding calls to Build_Predef_Prims.
2394 (Build_Set_Predefined_Prim_Op_Address): Improve expanded code avoiding
2395 call to Build_Get_Predefined_Prim_Op_Address.
2397 2008-03-26 Javier Miranda <miranda@adacore.com>
2399 * exp_ch7.adb (Make_Clean): Code cleanup using the new centralized
2400 subprogram Corresponding_Runtime_Package to know the runtime package
2401 that will provide support to a given protected type.
2403 * exp_ch9.adb (Add_Private_Declarations,
2404 Build_Protected_Subprogram_Call,
2405 Build_Protected_Entry, Build_Simple_Entry_Call,
2406 Expand_N_Protected_Body, Expand_N_Protected_Type_Declaration,
2407 Expand_N_Timed_Entry_Call, Make_Initialize_Protection): Code
2408 cleanup using the new centralized subprogram Corresponding_Runtime
2409 Package to know the runtime package that provides support to
2410 a given protected type.
2412 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2414 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): If the component
2415 assignment is within the initialization procedure for a packed array,
2416 and Initialize_Scalars is enabled, compile right-hand side with checks
2417 off, because the value is purposely out of range.
2419 2008-03-26 Vincent Celier <celier@adacore.com>
2421 * gnatcmd.adb: Add processing for GNAT SYNC
2423 * vms_conv.ads: (Command_Type): Add command Sync
2425 * vms_conv.adb (Initialize): Add Command_List data for new command Sync
2427 * vms_data.ads: Add entries for -gnatw.w
2428 Add qualifier for gnatstub --header-file option
2429 Add switches for GNAT SYNC
2431 * prj-attr.ads, prj-attr.adb: Add new package Synchronize for GNAT SYNC
2432 (Add_Package_Name): New procedure
2433 (Package_Name_List): New function
2434 (Initialize): Add known package names to the list
2435 (Register_New_Package): Add the new package name to the list
2437 2008-03-26 Robert Dewar <dewar@adacore.com>
2439 * g-pehage.adb, g-regist.adb, g-spipat.ads, g-spipat.adb,
2440 s-asthan.adb, s-parint.adb, s-rpc.adb, s-stchop.adb: Replace
2441 Raise_Exception by "raise with" construct.
2443 2008-03-26 Pascal Obry <obry@adacore.com>
2445 * Makefile.in: Add proper GNAT.Serial_Communications implementation on
2446 supported platforms.
2448 * Makefile.rtl: Add g-sercom.o.
2450 * impunit.adb: Add g-sercom.adb.
2452 * s-crtl.ads (open): New routine.
2456 * s-osinte-mingw.ads (BYTE): New type.
2458 (OVERLAPPED): Likewise.
2459 (GENERIC_READ): New constant.
2460 (GENERIC_WRITE): Likewise.
2461 (OPEN_EXISTING): Likewise.
2462 (PSECURITY_ATTRIBUTES): Removed this type, use anonymous access
2464 (CreateFile): New routine.
2465 (WriteFile): Likewise.
2466 (ReadFile): Likewise.
2467 (CloseHandle): Move next to the other file oriented routines.
2469 * g-sercom.ads: New unit.
2471 * g-sercom.adb: Default implementation, calls to this unit will raise
2472 a program error exception.
2474 * g-sercom-mingw.adb, g-sercom-linux.adb: Windows and
2475 GNU/Linux implementations.
2477 2008-03-26 Robert Dewar <dewar@adacore.com>
2479 * itypes.adb (Create_Itype): Use new name Access_Subprogram_Kind
2481 * sem_ch13.adb (Validate_Unchecked_Conversion): Give warning for
2482 unchecked conversion for different conventions only for subprogram
2485 2008-03-26 Vincent Celier <celier@adacore.com>
2487 * osint-c.adb (Set_Library_Info_Name): Use canonical case file names
2488 to check if the specified object file is correct.
2490 2008-03-26 Thomas Quinot <quinot@adacore.com>
2492 * sem_cat.adb (Validate_RACW_Primitives): Do not rely on
2493 Comes_From_Source to exclude primitives from being checked. We want to
2494 exclude predefined primitives only, so use the appropriate specific
2495 predicate. Also, flag a formal parameter of an anonymous
2496 access-to-subprogram type as illegal for a primitive operation of a
2497 remote access to class-wide type.
2499 2008-03-26 Vincent Celier <celier@adacore.com>
2501 * prj-dect.adb (Parse_Package_Declaration): When a package name is not
2502 known, check if it may be a missspelling of a known package name. In
2503 not verbose, not mode, issue warnings only if the package name is a
2504 possible misspelling.
2505 In verbose mode, always issue a warning for a not known package name,
2506 plus a warning if the name is a misspelling of a known package name.
2508 * prj-part.adb (Post_Parse_Context_Clause): Modify so that only non
2509 limited withs or limited withs are parse during one call.
2510 (Parse_Single_Project): Post parse context clause in two passes: non
2511 limited withs before current project and limited withs after current
2514 * prj-proc.adb (Imported_Or_Extended_Project_From): Returns an extended
2515 project with the name With_Name, even if it is only extended indirectly.
2516 (Recursive_Process): Process projects in order: first single withs, then
2517 current project, then limited withs.
2519 * prj-tree.adb (Imported_Or_Extended_Project_Of): Returns an extended
2520 project with the name With_Name, even if it is only extended indirectly.
2522 2008-03-26 Robert Dewar <dewar@adacore.com>
2524 * scn.adb (Initialize_Scanner): Format messages belong on standard error
2526 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2528 * sem_ch10.adb (Analyze_Compilation_Unit): if a unit in the context is
2529 a generic subprogram that is imported, do not attempt to compile
2532 * sem_ch12.adb (Instantiate_Subprogram_Body): if the generic is
2533 imported, do not generate a raise_program_error for the non-existent
2535 (Pre_Analyze_Actuals): If an error is detected during pre-analysis,
2536 perform minimal name resolution on the generic to avoid spurious
2538 (Find_Actual_Type): the designated type of the actual in a child unit
2539 may be declared in a parent unit without being an actual.
2541 2008-03-26 Robert Dewar <dewar@adacore.com>
2543 * sem_ch11.adb: Fix No_Exception_Restriction violation for SJLJ
2544 * sinfo.ads, sinfo.adb (From_At_End): New flag
2546 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2548 * sem_ch6.adb (Analyze_Subprogram_Body): Remove spurious check on
2549 operations that have an interface parameter.
2550 (Analyze_Subprogram_Body): Set Is_Trivial_Subprogram flag
2551 Don't treat No_Return call as raise.
2553 * sem_disp.adb (Check_Dispatching_Operations): apply check for
2554 non-primitive interface primitives to access parameters, not to all
2555 parameters of an access type.
2557 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2559 * sem_ch7.adb (Install_Parent_Private_Declarations): If the private
2560 declarations of a parent unit are made visible when compiling a child
2561 instance, the parent is not a hidden open scope, even though it may
2562 contain other pending instance.
2564 * sem_ch8.adb (Restore_Scope_Stack): If an entry on the stack is a
2565 hidden open scope for some child instance, it does affect the
2566 visibility status of other stach entries.
2567 (Analyze_Object_Renaming): Check that a class-wide object cannot be
2568 renamed as an object of a specific type.
2570 2008-03-26 Robert Dewar <dewar@adacore.com>
2572 * sem_res.adb (Check_Infinite_Recursion): Diagnose definite infinite
2573 recursion and raise SE directly.
2574 (Resolve_Actuals): Reset Never_Set_In_Source if warnings off is
2575 set for formal type for IN mode parameter.
2577 2008-03-26 Robert Dewar <dewar@adacore.com>
2579 * sem_warn.ads, sem_warn.adb (Warnings_Off_Pragmas): New table
2580 (Initialize): New procedure
2581 (Output_Warnings_Off_Warnings): New procedure
2582 (Check_References): Suppress certain msgs if Is_Trivial_Subprogram
2583 (Output_Non_Modifed_In_Out_Warnings): Ditto
2584 (Warn_On_Unreferenced_Entity): Ditto
2586 2008-03-26 Vincent Celier <celier@adacore.com>
2588 * a-direct.adb (Start_Search): Raise Use_Error if the directory is not
2591 2008-03-26 Matthew Heaney <heaney@adacore.com>
2593 * a-ciorse.ads, a-cidlli.ads, a-cdlili.ads, a-cihase.ads, a-cohase.ads,
2594 a-ciorma.ads, a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-coorse.ads:
2595 Marked with clauses as private, and controlled operations as overriding
2597 2008-03-26 Robert Dewar <dewar@adacore.com>
2599 * g-byorma.adb (Read_BOM): Reorder tests so that UTF_32 is recognized
2601 2008-03-26 Robert Dewar <dewar@adacore.com>
2603 * back_end.adb, back_end.ads: Minor reformatting
2605 * bindgen.adb: Minor clarification of comments
2607 * fname.ads: Minor comment fixes
2609 * g-altive.ads, g-catiio.ads, g-trasym.ads, prj.ads,
2610 prj-nmsc.adb, sem_aggr.adb: Minor reformatting
2612 * xeinfo.adb, xnmake.adb, xsinfo.adb, xtreeprs.adb,
2613 xsnames.adb: Remove warnings off pragma no longer needed
2615 * a-catizo.ads, a-calari.ads, a-calfor.adb,
2616 a-calfor.ads: Fix header.
2618 2008-03-26 Tristan Gingold <gingold@adacore.com>
2620 * init.c: Do not adjust pc for HPARITH on alpha/vms.
2622 2008-03-26 Robert Dewar <dewar@adacore.com>
2624 * lib-xref.adb: (OK_To_Set_Reference): New function
2625 (Generate_Reference): Don't set referenced from occurrence in Warnings,
2626 Unmodified, or Unreferenced pragma
2628 2008-03-26 Robert Dewar <dewar@adacore.com>
2630 * alloc.ads: Add entries for Warnings_Off_Pragmas table
2632 2008-03-26 GNAT Script <nobody@adacore.com>
2634 * Make-lang.in: Makefile automatically updated
2636 2008-03-26 Robert Dewar <dewar@adacore.com>
2638 * tbuild.ads, tbuild.adb, trans.c, sprint.adb, exp_prag.adb, decl.c,
2639 par-ch2.adb, sem_elab.adb, sem_util.ads (N_Pragma): Chars field
2640 removed, use Chars (Pragma_Identifier (.. instead, adjustments
2641 throughout to accomodate this change.
2643 * s-pooglo.ads, s-pooloc.ads: Minor comment updates
2645 * exp_dbug.adb: Use Sem_Util.Set_Debug_Info_Needed (not
2646 Einfo.Set_Needs_Debug_Info)
2648 2008-03-26 Robert Dewar <dewar@adacore.com>
2650 * gnat_ugn.texi: Add documentation for -gnatw.w/-gnatw.W
2651 Add description for the new gnatstub option '--header-file'
2652 clarification of -gnatwz/-gnatwZ
2653 Add a "Irix-Specific Considerations" section to document the need to
2654 set LD_LIBRARY_PATH when using the default shared runtime library.
2655 Added documentation for both gcov and gprof.
2657 * gnat_rm.texi: Document that pragma Compile_Time_Warning generates
2658 messages that are not suppressed when clients are compiled.
2659 Add documentation of s-pooglo s-pooloc
2660 Document the new GNAT.Serial_Communications API.
2661 Add documentation for 'Old attribute
2662 Add description of pragma Optimize_Alignment
2664 * ug_words: Add entries for -gnatw.w -gnatw.W
2666 * usage.adb: Add line for -gnatw.w (warn on warnings off)
2668 2008-03-25 Eric Botcazou <ebotcazou@adacore.com>
2671 2008-03-05 Eric Botcazou <ebotcazou@adacore.com>
2673 * decl.c (maybe_pad_type): Avoid padding an integral type when
2674 bumping its alignment is sufficient.
2676 2008-03-25 Arnaud Charlet <charlet@adacore.com>
2678 * exp_ch6.adb, exp_disp.adb: Update copyright notice.
2679 Fix wrong formatting (lines too long)
2681 2008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2683 * 9drpc.adb, a-caldel-vms.adb, a-caldel.adb,
2684 a-calend-vms.adb, a-calend.adb, a-calend.ads,
2685 a-calfor.adb, a-chahan.ads, a-chtgke.adb,
2686 a-cihama.ads, a-ciorse.adb, a-clrefi.ads,
2687 a-cohama.ads, a-comlin.ads, a-coorse.adb,
2688 a-crbtgk.adb, a-direct.adb, a-except-2005.adb,
2689 a-except-2005.ads, a-except.adb, a-except.ads,
2690 a-exexda.adb, a-exexpr-gcc.adb, a-exexpr.adb,
2691 a-exextr.adb, a-filico.ads, a-finali.ads,
2692 a-intnam-aix.ads, a-intnam-solaris.ads, a-ngcefu.adb,
2693 a-ngelfu.adb, a-numaux-darwin.adb, a-numeri.ads,
2694 a-sequio.ads, a-strbou.ads, a-strfix.adb,
2695 checks.adb, exp_ch3.adb, exp_ch4.adb,
2696 exp_ch4.ads, exp_ch5.adb, exp_ch6.adb,
2697 exp_ch6.ads, exp_ch7.adb, exp_ch7.ads,
2698 exp_ch9.adb, exp_ch9.ads, exp_dbug.adb,
2699 exp_dbug.ads, exp_disp.adb, exp_dist.adb,
2700 exp_dist.ads, exp_fixd.adb, exp_fixd.ads: Fix comment typos.
2702 2008-03-24 Robert Dewar <dewar@adacore.com>
2704 * s-tpopsp-posix.adb, s-tpopsp-solaris.adb, s-tpopsp-posix-foreign.adb,
2705 s-tpopsp-lynxos.adb, s-tpopde-vms.ads, s-tpopde-vms.adb,
2706 s-tpopsp-vxworks.adb, s-casi16.adb, s-caun16.adb, s-inmaop.ads,
2707 s-tadeca.adb, s-tadeca.ads, s-tadert.adb, s-tadert.ads, s-tpinop.adb,
2708 s-tpinop.ads, s-tporft.adb, a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb,
2709 a-crbtgk.ads, a-crbtgk.adb, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
2710 a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
2711 a-cgcaso.adb, a-cgaaso.adb, a-ciormu.adb, a-cihase.adb, a-swuwha.ads,
2712 a-rbtgso.ads, a-cgaaso.ads, a-cgaaso.ads, a-ciorma.adb, a-chtgke.ads,
2713 a-chtgke.adb, a-llfzti.ads, a-ztenau.adb, a-ztenau.ads, a-stzhas.ads,
2714 a-szbzha.ads, a-szbzha.adb, a-crdlli.ads, a-crdlli.ads, a-crdlli.adb,
2715 i-forbla-darwin.adb, i-forbla.ads, s-regexp.adb, a-nllrar.ads,
2716 a-nlrear.ads, a-nucoar.ads, a-nurear.ads, i-forlap.ads, s-gearop.adb,
2717 s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb, s-gecola.ads,
2718 s-gerebl.adb, s-gerela.ads, a-swuwha.adb, i-forbla-unimplemented.ads,
2719 double spaced if it fits on one line and otherwise single spaced.
2721 2008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2723 PR documentation/15479
2724 * Make-lang.in (doc/gnat_ugn.texi) Renamed from ...
2725 (doc/gnat_ugn_unw.texi): ... this, and adjusted.
2726 (doc/gnat_ugn.info): Renamed from ...
2727 (doc/gnat_ugn_unw.info): ... this.
2728 (doc/gnat_ugn.dvi): Renamed from ...
2729 (doc/gnat_ugn_unw.dvi): ... this.
2730 (doc/gnat_ugn.pdf): Renamed from ...
2731 (doc/gnat_ugn_unw.pdf): ... this.
2732 (ADA_INFOFILES, ADA_PDFFILES, ada.install-info, ada.dvi):
2734 * gnat_ugn.texi (FILE): Hard-code gnat_ugn; set filename
2735 unconditionally to gnat_ugn.info. Fix cross references to the
2736 GNAT Reference Manual. Convert links to the GCC, GDB, Emacs,
2737 and GNU make manuals to be proper texinfo links.
2738 * gnat_rm.texi: Fix cross references to the GNAT User's Guide.
2740 2008-03-21 Olivier Hainque <hainque@adacore.com>
2742 * trans.c (Attribute_to_gnu) <'length>: Compute as (hb < lb)
2743 ? 0 : hb - lb + 1 instead of max (hb - lb + 1, 0).
2745 2008-03-21 Eric Botcazou <ebotcazou@adacore.com>
2747 * trans.c (addressable_p): Add notes on addressability issues.
2749 2008-03-21 Olivier Hainque <hainque@adacore.com>
2750 Ed Schonberg <schonberg@adacore.com>
2752 * trans.c (addressable_p): Accept COND_EXPR when both arms
2754 (gnat_gimplify_expr): Let the gimplifier handle &COND_EXPR.
2755 (call_to_gnu): Do not use name reference in the error message
2756 for a misaligned by_reference_parameter. The actual may be a
2759 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2761 * misc.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2763 2008-03-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2765 * gnat_rm.texi (Implementation Defined Characteristics)
2766 (Wide_Text_IO, Wide_Wide_Text_IO): Add @var annotations where
2768 * gnat_ugn.texi (Wide Character Encodings, Switches for gnatbind)
2769 (Switches for gnatchop, Installing a library): Likewise.
2771 2008-03-10 Eric Botcazou <ebotcazou@adacore.com>
2773 * trans.c (emit_range_check): Do not emit the check if the base type
2774 of the expression is the type against which its range must be checked.
2776 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2778 * decl.c (maybe_pad_type): Use value_factor_p.
2780 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2782 * lang.opt (nostdlib): Move around.
2783 * misc.c (gnat_handle_option): Fix formatting.
2784 (gnat_dwarf_name): Move around.
2785 * trans.c (Case_Statement_to_gnu): Fix formatting.
2786 (gnat_to_gnu): Likewise.
2787 * utils.c (aggregate_type_contains_array_p): Likewise.
2788 (create_subprog_decl): Likewise.
2790 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2792 * decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Do not
2793 bother propagating the TYPE_USER_ALIGN flag when creating a JM type.
2795 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2797 * decl.c (gnat_to_gnu_entity) <E_Record_Type>: Do not force
2798 BIGGEST_ALIGNMENT when capping the alignment of records with
2799 strict alignment and size clause.
2801 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2803 * lang-specs.h: Pass -gnatwa if -Wall is passed.
2804 * misc.c (gnat_handle_option) <OPT_Wall>: Expand into -Wunused
2805 and -Wuninitialized.
2806 (gnat_post_options): Clear warn_unused_parameter.
2808 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2810 * utils.c (finish_record_type): Clear DECL_BIT_FIELD on sufficiently
2811 aligned bit-fields, bumping the alignment of the record type if deemed
2813 (value_factor_p): Return false instead of 0.
2815 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2817 * decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Add support
2818 for scalar types with small alignment.
2820 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2822 * trans.c (Loop_Statement_to_gnu): Set the SLOC of the loop label
2823 from that of the front-end's end label.
2824 (gnat_gimplify_stmt) <LOOP_STMT>: Set the SLOC of the backward goto
2825 from that of the loop label.
2827 2008-03-07 Eric Botcazou <ebotcazou@adacore.com>
2829 * decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>: Add
2830 comment for the packed array type case.
2831 * utils.c (build_template): Use a loop to strip padding or
2832 containing records for justified modular types.
2834 2008-03-07 Eric Botcazou <ebotcazou@adacore.com>
2836 * decl.c (gnat_to_gnu_entity): Issue a warning on suspiciously
2837 large alignments specified for types.
2838 (validate_alignment): Minor cleanup.
2840 2008-03-07 Eric Botcazou <ebotcazou@adacore.com>
2842 * decl.c (MAX_FIXED_MODE_SIZE): Define if not already defined.
2843 (gnat_to_gnu_entity) <E_Record_Type>: Try to get a smaller form of
2844 the component for packing, if possible, as well as if a component
2845 size clause is specified.
2846 <E_Record_Subtype>: For an array type used to implement a packed
2847 array, get the component type from the original array type.
2848 Try to get a smaller form of the component for packing, if possible,
2849 as well as if a component size clause is specified.
2850 (round_up_to_align): New function.
2851 (make_packable_type): Add in_record parameter.
2852 For a padding record, preserve the size. If not in_record and the
2853 size is too large for an integral mode, attempt to shrink the size
2854 by lowering the alignment.
2855 Ditch the padding bits of the last component.
2856 Compute sizes and mode manually, and propagate the RM size.
2857 Return a BLKmode record type if its size has shrunk.
2858 (maybe_pad_type): Use MAX_FIXED_MODE_SIZE instead of BIGGEST_ALIGNMENT.
2859 Use Original_Array_Type to retrieve the type in case of an error.
2860 Adjust call to make_packable_type.
2861 (gnat_to_gnu_field): Likewise.
2862 (concat_id_with_name): Minor tweak.
2863 * trans.c (larger_record_type_p): New predicate.
2864 (call_to_gnu): Compute the nominal type of the object only if the
2865 parameter is by-reference. Do the conversion actual type -> nominal
2866 type if the nominal type is a larger record.
2867 (gnat_to_gnu): Do not require integral modes on the source type to
2868 avoid the conversion for types with identical names.
2869 (addressable_p): Add gnu_type parameter. If it is specified, do not
2870 return true if the expression is not addressable in gnu_type.
2871 Adjust recursive calls.
2872 * utils.c (finish_record_type): Remove dead code.
2874 2008-03-05 Eric Botcazou <ebotcazou@adacore.com>
2877 * decl.c (maybe_pad_type): Avoid padding an integral type when
2878 bumping its alignment is sufficient.
2880 2008-03-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2882 * gnatfind.adb, gnatxref.adb: Fix argument parsing typos.
2883 * s-auxdec-empty.adb, s-auxdec.adb: Fix typos in copyright
2885 * a-ngcoar.adb, a-ngrear.adb, g-awk.adb, g-debpoo.adb,
2886 gprep.adb, make.adb, makegpr.adb, par-ch6.adb, prj-nmsc.adb,
2887 sem_attr.adb, sem_ch4.adb, sem_ch8.adb: Fix typos in ada source
2888 code output strings.
2889 * sem_type.adb, system-vms-ia64.ads, system-vms.ads,
2890 system-vms_64.ads: Fix typos in ada source code comments.
2891 * sinfo-cn.adb: Remove incomplete sentence.
2893 PR documentation/15479
2894 * gnat_rm.texi, gnat_ugn.texi: Avoid standalone `non' word.
2896 2008-02-27 Samuel Tardieu <sam@rfc1149.net>
2899 * s-fileio.adb (Reset): Do not raise Use_Error if mode isn't changed.
2901 2008-02-27 Samuel Tardieu <sam@rfc1149.net>
2904 * sem_ch13.adb (Analyze_Record_Representation_Clause): Check
2905 that underlying type is present.
2907 2008-02-26 Tom Tromey <tromey@redhat.com>
2909 * misc.c (internal_error_function): Remove test of
2910 USE_MAPPED_LOCATION.
2911 * trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
2912 (Sloc_to_locus): Remove old location code.
2914 2008-02-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2916 * gnat_rm.texi, gnat_ugn.texi: Fix spacing after `e.g.' and
2917 `i.e.' by adding comma or `@:' as appropriate.
2918 * gnat_rm.texi (Pragma Wide_Character_Encoding): Instead of
2919 plain characters `C', use `@samp{C}'.
2920 * gnat_ugn.texi (File Naming Rules, About gnatkr)
2921 (Krunching Method): Likewise.
2923 * gnat_ugn.texi (Conventions): List environment variables and
2924 metasyntactic variables.
2925 (Compiling Programs): Fix notation of metasyntactic variables.
2926 Add @file where appropriate. Use @file for file extensions,
2928 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, use @samp
2929 instead of @file, @env instead of @code.
2931 2008-02-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2933 PR documentation/15479
2934 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, replace `..'
2935 and `...' with `@dots{}' or `@enddots{}'.
2937 PR documentation/15479
2938 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, add @command,
2939 use @command instead of @code, @option instead of @samp or @code,
2940 @code instead of @var, @samp instead of @file.
2942 PR documentation/15479
2943 * gnat_ugn.texi (Using gnatmake in a Makefile): Do not ignore errors
2944 in Makefile rules, by using `&&' rather than `;'.
2946 2008-02-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2948 PR documentation/15479
2949 * gnat_ugn.texi: In non-code, avoid space before colon.
2950 (Regular Expressions in gnatfind and gnatxref): Fix indentation.
2951 (Examples of gnatxref Usage): Use @command{vi} instead of
2953 (Character Set Control): Do not use @code for UTF-8.
2954 (Validity Checking): Fix typo "NaNs" instead of "NaN's". Do not
2956 * gnat_rm.texi (Aggregates with static bounds): Fix typo in code
2958 * gnat_rm.texi, gnat_ugn.texi: Fix typos. Bump copyright years.
2960 2008-02-11 Joel Sherrill <joel.sherrill@oarcorp.com>
2963 * env.c: Add __rtems__ to if defined.
2964 * s-osinte-rtems.adb: Add To_Target_Priority. Fix formatting.
2965 * s-osinte-rtems.ads: Add To_Target_Priority prototype and
2966 PTHREAD_SCOPE_PROCESS/PTHREAD_SCOPE_SYSTEM constants. Add
2967 pragma Convention as required.
2968 * gsocket.h: Make compile in and out of RTS.
2969 * Makefile.in: Add system-rtems.ads. Build DEC extensions.
2970 Use g-soccon-rtems.ads.
2971 * g-soccon-rtems.ads, system-rtems.ads: New files.
2973 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2976 * Make-lang.in (gnat1): Add $(GMPLIBS).
2978 2008-01-26 Eric Botcazou <ebotcazou@adacore.com>
2980 * decl.c (components_to_record): Improve comment.
2982 2008-01-22 Eric Botcazou <ebotcazou@adacore.com>
2984 * decl.c (components_to_record): Do not reuse the empty union type
2985 if there is a representation clause on the record.
2986 * trans.c (addressable_p): Return true for INTEGER_CST.
2988 2008-01-21 Eric Botcazou <ebotcazou@adacore.com>
2990 * trans.c (gnat_to_gnu) <N_Free_Statement>: Use POINTER_PLUS_EXPR
2991 in pointer arithmetics.
2992 * utils2.c (build_allocator): Likewise.
2994 2008-01-17 Eric Botcazou <ebotcazou@adacore.com>
2996 * utils.c (build_function_stub): Properly build the call expression.
2998 2008-01-14 Eric Botcazou <ebotcazou@adacore.com>
3000 * decl.c (gnat_to_gnu_entity) <object>: Process renamings
3001 before converting the expression to the type of the object.
3002 * trans.c (maybe_stabilize_reference) <CONSTRUCTOR>: New case.
3003 Stabilize constructors for special wrapping types.
3005 2008-01-13 Eric Botcazou <ebotcazou@adacore.com>
3007 * trans.c (call_to_gnu): Invoke the addressable_p predicate only
3008 when necessary. Merge some conditional statements. Update comments.
3009 Rename unchecked_convert_p local variable to suppress_type_conversion.
3010 Do not suppress conversions in the In case.
3011 (addressable_p) <VIEW_CONVERT_EXPR>: Do not take alignment issues
3012 into account on non strict-alignment platforms.
3014 2008-01-12 Eric Botcazou <ebotcazou@adacore.com>
3016 * utils.c (aggregate_type_contains_array_p): New predicate.
3017 (create_field_decl): In a packed record, force byte alignment
3018 for fields without specified position that contain an array.
3020 2008-01-12 Eric Botcazou <ebotcazou@adacore.com>
3022 * utils.c (unchecked_convert): Fold the VIEW_CONVERT_EXPR expression.
3024 2008-01-10 John David Anglin <dave.anglin.@nrc-cnrc.gc.ca>
3027 * s-osinte-linux-hppa.ads (SC_NPROCESSORS_ONLN): New constant for
3029 (bit_field): New packed boolean type used by cpu_set_t.
3030 (cpu_set_t): New type corresponding to the C type with
3031 the same name. Note that on the Ada side we use a bit
3032 field array for the affinity mask. There is not need
3033 for the C macro for setting individual bit.
3034 (pthread_setaffinity_np): New imported routine.
3036 2008-01-03 Tero Koskinen <tero.koskinen@iki.fi>
3039 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
3040 on OpenBSD as is done on other BSD systems.
3043 * sysdep.c (__gnat_ttyname, getc_immediate_nowait,
3044 getc_immediate_common): Treat OpenBSD as FreeBSD regarding immediate
3048 * env.c (__gnat_clearenv): Treat OpenBSD as other BSD systems missing
3052 * init.c (__gnat_error_handler, __gnat_install_handler,
3053 __gnat_init_float): Define for OpenBSD.
3055 * initialize.c (__gnat_initialize): Define for OpenBSD.
3057 2007-12-27 Samuel Tardieu <sam@rfc1149.net>
3060 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
3061 instead of mktemp() or tmpnam() on NetBSD.
3063 2007-12-23 Eric Botcazou <ebotcazou@adacore.com>
3065 * trans.c (call_to_gnu): Make the temporary for non-addressable
3066 In parameters passed by reference.
3067 (addressable_p): Return true for STRING_CST and CALL_EXPR.
3069 2007-12-19 Robert Dewar <dewar@adacore.com>
3071 * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
3072 Add pragma Warnings (Off) for unassigned IN OUT arguments
3074 * sem_warn.adb (Output_Reference): Suppress messages for internal names
3075 (Check_References): Extensive changes to tune up warnings
3076 (Output_Non_Modifed_In_Out_Warnings): Changes to tune up warnings
3077 (Has_Pragma_Unmodifed_Check_Spec): New function
3078 (Check_References): Implement pragma Unmodified
3079 (Warn_On_Unassigned_Out_Parameter): Implement pragma Unmodified
3081 * par-prag.adb: Dummy entry for pragma Unmodified
3083 * sem_prag.adb: Implement pragma Unmodified
3085 * einfo.ads, einfo.adb: (Has_Pragma_Unmodified): New flag
3086 (Proc_Next_Component_Or_Discriminant): Fix typo.
3089 * sem_util.adb (Note_Possible_Modification): Add processinng for pragma
3091 (Reset_Analyzed_Flags): Use Traverse_Proc instead of Traverse_Func,
3092 because the former already takes care of discarding the result.
3093 (Mark_Coextensions): Remove ununused initial value from Is_Dynamic.
3096 * snames.h, snames.ads, snames.adb: Add entry for pragma Unmodified
3098 2007-12-19 Eric Botcazou <ebotcazou@adacore.com>
3100 * targparm.adb, targparm.ads, system.ads, system-darwin-ppc.ads,
3101 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
3102 system-hpux-ia64.ads, system-vxworks-arm.ads, system-darwin-x86.ads,
3103 system-vms_64.ads, system-vms-ia64.ads, system-linux-ia64.ads,
3104 system-freebsd-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
3105 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
3106 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
3107 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
3108 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
3109 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads
3110 (Dynamic_Trampolines_Used): Delete.
3112 * system-lynxos-x86.ads, system-lynxos-ppc.ads: Ditto.
3113 Turn on stack probing mechanism on LynxOS.
3115 2007-12-19 Bob Duff <duff@adacore.com>
3117 * atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate
3118 the resulting tail recursion by hand. This prevents running out of
3119 memory on deeply nested concatenations, since Field2 is where the left
3120 operand of concatenations is stored.
3121 Fix bug (was returning OK_Orig in some cases). Fix return subtype to
3122 clarify that it can only return OK or Abandon.
3124 * sem_res.adb (Resolve_Op_Concat): Replace the recursion on the left
3125 operand by iteration, in order to avoid running out of memory on
3126 deeply-nested concatenations. Use the Parent pointer to get back up the
3128 (Resolve_Op_Concat_Arg, Resolve_Op_Concat_First,
3129 Resolve_Op_Concat_Rest): New procedures split out of
3130 Resolve_Op_Concat, so the iterative algorithm in Resolve_Op_Concat is
3133 * checks.adb (Remove_Checks): Use Traverse_Proc instead of
3134 Traverse_Func, because the former already takes care of discarding the
3137 * errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
3138 because the former already takes care of discarding the result.
3139 (Remove_Warning_Messages): Use appropriate subtype for Status and
3142 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3144 * exp_aggr.adb (Not_OK_For_Backend): A component of a private type with
3145 discriminants forces expansion of the aggregate into assignments.
3146 (Init_Record_Controller): If the type of the aggregate is untagged and
3147 is not inherently limited, the record controller is not limited either.
3149 2007-12-19 Robert Dewar <dewar@adacore.com>
3151 * exp_attr.adb (Expand_N_Attribute_Reference, case Size): Fix error in
3152 handling compile time known size of record or array (case of front end
3153 layout active, e.g. in GNAAMP).
3155 2007-12-19 Javier Miranda <miranda@adacore.com>
3157 * exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry
3158 that forces the construction of static dispatch tables in case of
3161 2007-12-19 Robert Dewar <dewar@adacore.com>
3163 * exp_ch9.adb (Null_Statements): Moved to library level
3164 (Trivial_Accept_OK): New function
3165 (Expand_Accept_Declaration): Use Trivial_Accept_OK
3166 (Expand_N_Accept_Statement): Use Trivial_Accept_OK
3168 2007-12-19 Robert Dewar <dewar@adacore.com>
3170 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix packed array type
3171 in complex case where array is Volatile.
3173 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3175 * freeze.adb (Freeze_Record_Type, Check_Current_Instance): Implement
3176 properly the Ada2005 rules concerning when the current instance of a
3177 record type is aliased.
3179 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3181 * par-ch3.adb (P_Record_Declaration): Guard against cascaded errors in
3183 (P_Type_Declaration): Diagnose misuse of "abstract" in untagged record
3185 (P_Variant_Part): Cleaner patch for parenthesized discriminant
3187 2007-12-19 Vincent Celier <celier@adacore.com>
3189 * prj-attr.adb (Package_Node_Id_Of): Returns Unknown_Package when
3190 package is not known
3192 * prj-attr.ads (Unknown_Package): New constant
3193 Do not crash when an unknown package is in several projects
3195 * prj-dect.adb (Parse_Package_Declaration): Mark an unknown package as
3198 * prj-nmsc.adb (Check): Remove obsolete code related to no longer
3199 existing package Language_Processing.
3201 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3202 Gary Dismukes <dismukes@adacore.com>
3203 Samuel Tardieu <sam@rfc1149.net>
3205 PR ada/15803, ada/15805
3206 * sem_ch6.adb, sem_ch3.adb (Constrain_Access): In Ada2005, diagnose
3207 illegal access subtypes when there is a constrained partial view.
3208 (Check_For_Premature_Usage): New procedure inside
3209 Access_Subprogram_Declaration for checking that an access-to-subprogram
3210 type doesn't reference its own name within any formal parameters or
3211 result type (including within nested anonymous access types).
3212 (Access_Subprogram_Declaration): Add call to Check_For_Premature_Usage.
3213 (Sem_Ch3.Analyze_Object_Declaration, Sem_ch6.Process_Formals): if the
3214 context is an access_to_variable, the expression cannot be an
3217 2007-12-19 Bob Duff <duff@adacore.com>
3219 * sem_ch4.adb (Analyze_Concatenation_Rest): New procedure.
3220 (Analyze_Concatenation): Use iteration instead of recursion in order
3221 to avoid running out of stack space for deeply nested concatenations.
3223 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3224 Gary Dismukes <dismukes@adacore.com>
3226 * sem_ch8.adb (Analyze_Subprogram_Renaming): Diagnose illegal renamings
3227 whose renamed entity is a subprogram that requires overriding.
3228 (Premature_Usage): Test for the case of N_Full_Type_Declaration when
3229 issuing an error for premature usage and issue a message that says
3230 'type' rather than 'object'.
3232 2007-12-19 Gary Dismukes <dismukes@adacore.com>
3235 * sem_disp.adb (Check_Dispatching_Call): Augment existing test for
3236 presence of a statically tagged operand (Present (Static_Tag)) with
3237 test for Indeterm_Ancestor_Call when determining whether to propagate
3238 the static tag to tag-indeterminate operands (which forces dispatching
3240 (Check_Controlling_Formals): Ada2005, access parameters can have
3242 (Add_Dispatching_Operation, Check_Operation_From_Private_View): do
3243 not insert subprogram in list of primitive operations if already there.
3245 2007-12-19 Tristan Gingold <gingold@adacore.com>
3247 * utils.c (create_var_decl_1): call rest_of_decl_compilation only for
3250 2007-12-19 Thomas Quinot <quinot@adacore.com>
3252 Part of PR ada/33688
3253 * gen-soccon.c: Add constant IP_PKTINFO to allow getting ancillary
3254 datagram info on Linux.
3256 2007-12-19 Vincent Celier <celier@adacore.com>
3258 * makegpr.adb (Check_Compilation_Needed): Normalize C_Source_Path so
3259 that the source path name is always found in the dependencies.
3261 2007-12-19 Robert Dewar <dewar@adacore.com>
3263 * gnat_rm.texi, gnat_ugn.texi: Update documentation of -gnatw.o
3264 Fix name of Wide_Wide_Latin_1/9 file names
3265 Add documentation for Ada.Exceptions.Last_Chance_Handler (a-elchha.ads)
3266 Add missing documentation for Ada.Wide_[Wide_]Characters.Unicode
3267 Add missing documentation for Ada.Command_Line.Response_File
3268 Update list of warning letters for Warnings pragma
3269 Add documentation for pragma Unmodified
3271 2007-12-19 Samuel Tardieu <sam@rfc1149.net>
3273 * Makefile.in: Add s-tasinf.ad[bs] substitutions for sh4-linux target.
3275 2007-12-17 Arnaud Charlet <charlet@adacore.com>
3277 * s-vxwork-alpha.ads: Removed, no longer used.
3279 2007-12-15 Jakub Jelinek <jakub@redhat.com>
3281 * Make-lang.in (gnat1, gnatbind): Pass ALL_CFLAGS on the link line.
3283 2007-12-13 Samuel Tardieu <sam@rfc1149.net>
3286 * Makefile.in: Change two occurrences of mlib-tgt.adb by correct name
3287 mlib-tgt-specific.adb.
3289 2007-12-13 Bob Duff <duff@adacore.com>
3291 * trans.c (Attribute_to_gnu): Check for violations of the
3292 No_Implicit_Dynamic_Code restriction. This checking used to be done in
3293 the front end, but is moved here so we can make it more accurate.
3295 2007-12-13 Pascal Obry <obry@adacore.com>
3297 * adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy
3298 version is provided for older GNU/Linux distribution not
3299 supporting thread affinity sets.
3301 * s-osinte-linux.ads (SC_NPROCESSORS_ONLN): New constant for sysconf
3303 (bit_field): New packed boolean type used by cpu_set_t.
3304 (cpu_set_t): New type corresponding to the C type with
3305 the same name. Note that on the Ada side we use a bit
3306 field array for the affinity mask. There is not need
3307 for the C macro for setting individual bit.
3308 (pthread_setaffinity_np): New imported routine.
3310 * s-taprop-linux.adb (Enter_Task): Check that the CPU affinity mask is
3312 (Create_Task): Set the processor affinity mask if information
3315 * s-tasinf-linux.ads, s-tasinf-linux.adb: New files.
3317 2007-12-13 Robert Dewar <dewar@adacore.com>
3319 * s-osinte-lynxos-3.ads, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
3320 s-osinte-freebsd.ads, s-osinte-lynxos.ads, s-osinte-tru64.ads,
3321 s-osinte-mingw.ads, s-osinte-aix.ads, s-osinte-hpux-dce.ads,
3322 s-osinte-irix.ads, s-osinte-solaris.ads, s-intman-vms.adb,
3323 s-osinte-vms.ads, s-osinte-vxworks6.ads, s-osinte-vxworks.ads,
3324 s-auxdec.ads, s-auxdec-vms_64.ads, s-osinte-darwin.ads,
3325 s-taprop-vms.adb, s-interr-sigaction.adb, s-osinte-linux-hppa.ads,
3326 i-vxwork-x86.ads, s-tpopde-vms.ads: Add missing pragma Convention C
3327 for subprogram pointers.
3329 * g-ctrl_c.adb: New file.
3331 * g-ctrl_c.ads (Install_Handler): New body.
3333 * freeze.adb (Freeze_Subprogram): Use new flag Has_Pragma_Inline_Always
3334 instead of obsolete function Is_Always_Inlined.
3335 (Freeze_Entity): check for tagged type in imported C subprogram
3336 (Freeze_Entity): check for 8-bit boolean in imported C subprogram
3337 (Freeze_Entity): check for convention Ada subprogram pointer in
3338 imported C subprogram.
3339 (Freeze_Fixed_Point_Type): In the case of a base type where the low
3340 bound would be chopped off and go from negative to zero, force
3341 Loval_Excl_EP to be the same as Loval_Incl_EP (the included lower
3342 bound) so that the size computation for the base type will take
3343 negative values into account.
3345 2007-12-13 Eric Botcazou <ebotcazou@adacore.com>
3346 Bob Duff <duff@adacore.com>
3347 Tristan Gingold <gingold@adacore.com>
3349 * system-linux-ia64.ads, system-freebsd-x86.ads, system-lynxos-ppc.ads,
3350 system-lynxos-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
3351 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
3352 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
3353 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
3354 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
3355 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads,
3356 system-vxworks-arm.ads, system-darwin-x86.ads, system.ads,
3357 system-vms_64.ads, system-darwin-ppc.ads, system-vxworks-x86.ads,
3358 system-linux-ppc.ads, system-linux-hppa.ads, system-hpux-ia64.ads,
3359 system-vms-ia64.ads (Stack_Check_Limits): New target parameter.
3360 (Always_Compatible_Rep): New flag to control trampolines globally.
3361 (Dynamic_Trampolines_Used): New flag for implementing the
3362 No_Implicit_Dynamic_Code restriction more correctly (not yet used,
3363 and not yet set correctly for some targets).
3365 * s-taprop-vxworks.adb: Use stack limit method of stack checking.
3366 Simply indirectly call s-stchop when a task is created.
3369 New flag added: Stack_Check_Switch_Set which is set when '-fstack-check'
3370 appears as an argument (entries A) in an ALI file.
3372 * fe.h (Stack_Check_Limits): Declare new target parameter.
3373 (Check_Implicit_Dynamic_Code_Allowed): New procedure.
3375 * init.c: Declare __gnat_set_stack_limit_hook for VxWorks kernel RTS.
3376 This variable is declared in C to be sure not subject to elaboration
3378 (__gnat_map_signal, VxWorks): In kernel mode, map SIGILL to
3381 * targparm.ads, targparm.adb (Stack_Check_Limits): New parameter.
3382 (Always_Compatible_Rep, Dynamic_Trampolines_Used): New parameters.
3384 * s-stchop.ads: Add comments.
3386 * s-stchop-vxworks.adb: Package almost fully rewritten to use stack
3387 limit method of stack checking.
3389 * s-stchop-limit.ads: New file.
3391 2007-12-13 Robert Dewar <dewar@adacore.com>
3393 * sem_ch5.adb, s-taskin.adb, a-ciorma.adb, a-coorma.adb, a-cohama.adb,
3394 a-cihama.adb, g-awk.adb,
3395 s-inmaop-posix.adb: Update handling of assigned value/unreferenced
3398 * exp_smem.adb: Update handling of assigned value/unreferenced warnings
3400 * sem.adb: Update handling of assigned value/unreferenced warnings
3402 * a-exexpr-gcc.adb: Add a pragma warnings off for boolean return
3404 * lib-xref.ads: Improve documentation for k xref type
3407 Update handling of assigned value/unreferenced warnings
3408 (Generate_Reference): Warning for reference to entity for which a
3409 pragma Unreferenced has been given should be unconditional.
3410 If the entity is a discriminal, mark the original
3411 discriminant as referenced.
3413 * sem_warn.ads, sem_warn.adb
3414 (Check_One_Unit): Test Renamed_In_Spec to control giving warning for
3415 no entities referenced in package
3416 (Check_One_Unit): Don't give message about no entities referenced in
3417 a package if a pragma Unreferenced has appeared.
3418 Handle new warning flag -gnatw.a/-gnatw.A
3419 Update handling of assigned value/unreferenced warnings
3421 * atree.h: Add flags up to Flag247
3422 (Flag231): New macro.
3424 2007-12-13 Jose Ruiz <ruiz@adacore.com>
3426 * adaint.h: (__gnat_plist_init): Not defined for RTX.
3428 * initialize.c (__gnat_initialize): Do not call __gnat_plist_init for
3431 * Makefile.in: Add new files s-tasinf-linux.ads and s-tasinf-linux.adb.
3432 (LIBGNAT_TARGET_PAIRS, MISCLIB, THREADSLIB,
3433 EXTRA_GNATRTL_NONTASKING_OBJS, EXTRA_GNATRTL_TASKING_OBJS,
3434 GNATLIB_SHARED for RTX run time): Use the versions required by RTX.
3437 Do not define GNAT_UNICODE_SUPPORT for RTX since it is not supported.
3439 * sysdep.c (winflush_function for RTX): Procedure that does nothing
3440 since we only have problems with Windows 95/98, which are not
3442 (__gnat_ttyname): Return the empty string on Nucleus, just as
3445 2007-12-13 Robert Dewar <dewar@adacore.com>
3447 * a-textio.adb, a-textio.ads:
3448 Extensive changes to private part for wide character encoding
3450 * a-witeio.adb, a-witeio.ads, a-ztexio.ads, a-ztexio.adb
3451 (Look_Ahead): Fix mishandling of encoded sequences
3452 Move declaration of Wch_Con to private part (should not be visible)
3454 * ali.adb (Scan_ALI): Set default encoding method to brackets instead of
3455 UTF-8. Probably this is never used, but if it is, brackets is
3458 * bindgen.adb (Get_WC_Encoding): New procedure to properly handle
3459 setting wide character encoding for no main program case and when
3460 encoding is specified using -W?
3461 Initialize stack limit of environment task if stack limit method of
3462 stack checking is enabled.
3463 (Gen_Adainit_Ada): Use Get_WC_Encoding to output encoding method
3464 (Gen_Adainit_C): Use Get_WC_Encoding to output encoding method
3465 (Get_Main_Unit_Name): New function.
3466 (Gen_Adainit_Ada): Add call to main program for .NET when needed.
3467 (Gen_Output_File): Set Bind_Main_Program to True for .NET
3469 * bindusg.adb: Add line for -Wx switch
3471 * s-wchcon.adb, s-wchcon.ads: (Is_Start_Of_Encoding): New function
3473 Add new useful constant WC_Longest_Sequences
3475 * switch-b.adb: Clean up handling of -Wx switch
3476 For -gnatWx, set Wide_Character_Encoding_Method_Specified
3478 * switch-c.adb: -gnatg activates warning on assertion errors
3479 For -gnatWx, set Wide_Character_Encoding_Method_Specified
3481 * s-wchcon.adb: (Is_Start_Of_Encoding): New function
3483 2007-12-13 Robert Dewar <dewar@adacore.com>
3484 Ed Schonberg <schonberg@adacore.com>
3486 * a-ngcoty.adb: New pragma Fast_Math
3488 * opt.adb: New pragma Fast_Math
3491 Add Implemented_By_Entry to the list of pragmas which do not require any
3493 (Favor_Top_Level): New pragma.
3494 New pragma Fast_Math
3496 * exp_attr.adb: Move Wide_[Wide_]Image routines to Exp_Imgv
3497 (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
3498 Expand_Allocator_Expression): Take into account VM_Target
3499 (Expand_Attribute, case 'Identity): Handle properly the case where
3500 the prefix is a task interface.
3501 New pragma Fast_Math
3503 * par.adb (Next_Token_Is): New function
3504 (P_Pragma): Add Skipping parameter
3505 (U_Left_Paren): New procedure
3506 (U_Right_Paren): New procedure
3507 New pragma Fast_Math
3509 * par-ch10.adb (P_Subunit): Unconditional msg for missing ) after
3511 New pragma Fast_Math
3513 * sem_prag.adb: Add significance value to table Sig_Flag for pragma
3514 Implemented_By_Entry.
3515 (Analyze_Pragma): Add case for Ada 2005 pragma Implemented_By_Entry.
3516 (Set_Inline_Flags): Do not try to link pragma Inline onto chain of rep
3517 items, since it can apply to more than one overloadable entity. Set
3518 new flag Has_Pragma_Inline_Always for Inline_Always case.
3519 (Analyze_Pragma, case Complex_Representation): Improve error message.
3520 (Analyze_Pragma, case Assert): When assertions are disabled build the
3521 rewritten code with Sloc of expression rather than pragma, so new
3522 warning about failing is not deleted.
3523 (Analyze_Pragma): Allow pragma Preelaborable_Initialization to apply to
3524 protected types and update error message to reflect that. Test whether
3525 the protected type is allowed for the pragma (an error is issued if the
3526 type has any entries, or components that do not have preelaborable
3528 New pragma Fast_Math
3529 (Analyze_Pragma, case No_Return): Handle generic instance
3531 * snames.h, snames.ads, snames.adb:
3532 Add new predefined name for interface primitive _Disp_Requeue.
3533 New pragma Fast_Math
3535 * a-tags.ads, a-tags.adb: New calling sequence for
3536 String_To_Wide_[Wide_]String
3537 (Secondary_Tag): New subprogram.
3539 * exp_imgv.ads, exp_imgv.adb: Move Wide_[Wide_]Image routines here
3541 New calling sequence for String_To_Wide_[Wide_]String
3542 (Expand_Image_Attribute): Major rewrite. New calling sequence avoids
3543 the use of the secondary stack for image routines.
3545 * a-except-2005.adb, s-wchstw.ads, s-wchstw.adb, s-wwdenu.adb: New
3546 calling sequence for String_To_Wide_[Wide_]String
3548 * par-ch3.adb (P_Declarative_Items): Recognize use of Overriding in
3550 (P_Unknown_Discriminant_Part_Opt): Handle missing parens gracefully
3551 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
3553 * par-ch6.adb (P_Subprogram): Recognize use of Overriding in Ada 95 mode
3554 (P_Formal_Part): Use Skipping parameter in P_Pragma call
3555 to improve error recovery
3557 * par-util.adb (Next_Token_Is): New function
3558 (Signal_Bad_Attribute): Use new Namet.Is_Bad_Spelling_Of function
3560 * par-ch2.adb (Skip_Pragma_Semicolon): Do not resynchronize to
3561 semicolon if missing
3562 (P_Pragma): Implement new Skipping parameter
3563 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
3564 Fix location of flag for unrecognized pragma message
3566 * par-tchk.adb (U_Left_Paren): New procedure
3567 (U_Right_Paren): New procedure
3569 2007-12-13 Geert Bosch <bosch@adacore.com>
3572 (Put_Int64): Use Put_Digit to advance Pos. This fixes a case where
3573 the second or later Scaled_Divide would omit leading zeroes,
3574 resulting in too few digits produced and a Layout_Error as result.
3575 (Put): Initialize Pos.
3577 2007-12-13 Robert Dewar <dewar@adacore.com>
3579 atree.ads, atree.adb (Flag231..Flag247): New functions
3580 (Set_Flag231..Set_Flag247): New procedures
3581 (Basic_Set_Convention): Rename Set_Convention to be
3582 Basic_Set_Convention
3583 (Nkind_In): New functions
3584 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
3586 * exp_ch6.adb (Expand_Call): Use new flag Has_Pragma_Inline_Always
3588 of obsolete function Is_Always_Inlined
3589 (Register_Predefined_DT_Entry): Initialize slots of the second
3590 secondary dispatch table.
3591 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
3592 (Expand_N_Function_Call): Remove special provision for stack checking.
3594 * exp_util.ads, exp_util.adb (Is_Predefined_Dispatching_Operation):
3595 Include _Disp_Requeue in the list of predefined operations.
3596 (Find_Interface_ADT): Modified to fulfill the new specification.
3597 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
3599 * par-ch4.adb, nlists.ads, nlists.adb:
3600 Remove Atree.Delete_Tree/Delete_Node and Nlist.Delete_List
3602 * sinfo.ads, sinfo.adb: (Nkind_In): New functions
3603 Fix location of flag for unrecognized pragma message
3605 * sem_ch7.adb: Use Nkind_In
3607 2007-12-13 Vincent Celier <celier@adacore.com>
3610 Indicate what flags are used by the Project Manager, gprbuild and
3612 (Opt.Follow_Links_For_Dirs): New flag
3613 (Warn_On_Assertion_Failure): New flag
3614 (Wide_Character_Encoding_Method_Specified): New flag
3615 (Suppress_All_Inlining): New switch set by -fno-inline
3616 (Real_VMS_Target): New flag
3617 New pragma Fast_Math
3619 2007-12-13 Robert Dewar <dewar@adacore.com>
3621 * back_end.adb: Recognize -fno-inline
3623 2007-12-13 Robert Dewar <dewar@adacore.com>
3625 * checks.adb: Fix optimization problem with short-circuited form
3627 2007-12-13 Bob Duff <duff@adacore.com>
3629 * clean.adb (Usage): Add line for -aP
3630 (Check_Version_And_Help): Change Check_Version_And_Help to be generic,
3631 with a parameter "procedure Usage", instead of passing a pointer to a
3632 procedure. This is to eliminate trampolines (since the Usage procedure
3633 is often nested in a main procedure, and it would be inconvenient to
3636 * g-comlin.adb (For_Each_Simple_Switch): Change For_Each_Simple_Switch
3637 to be generic, with a parameter "procedure Callback (...)", instead of
3638 passing a pointer to a procedure. This is to eliminate trampolines
3639 (since the Callback procedure is usually nested).
3641 * gnatfind.adb, switch.adb, switch.ads, gnatlink.adb, gnatls.adb,
3642 gnatname.adb, gnatxref.adb, gnatchop.adb, gprep.adb, gnatbind.adb
3643 (Check_Version_And_Help): Change Check_Version_And_Help to be generic.
3645 * g-pehage.adb (Compute_Edges_And_Vertices, Build_Identical_Key_Sets):
3646 Use the generic Heap_Sort_G instead of Heap_Sort_A.
3648 2007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
3650 * einfo.ads, einfo.adb: Flag 232 is now Implemented_By_Entry.
3651 (Implemented_By_Entry, Set_Implemented_By_Entry): New routines.
3652 (Write_Entry_Flags): Add an entry for Implemented_By_Entry.
3653 (Renamed_In_Spec): New flag
3654 (Has_Pragma_Inline_Always): New flag
3655 Add missing doc for pragma Obsolescent_Warning
3656 Add missing doc for 17 additional unused flags (230-247)
3657 (Is_Derived_Type): Remove condition "not Is_Generic_Type".
3658 Alphabetize with clauses.
3659 Separate Is_Thunk and Has_Thunks flags
3660 (Write_Entity_Flags): Add forgotten entry for Has_Thunks
3661 (Related_Interface): Renamed to Related_Type.
3662 (Has_Thunks/Set_Has_Thunks): Subprograms of new attribute.
3663 (Set_Is_Flag): Restrict the assertion.
3665 2007-12-13 Vincent Celier <celier@adacore.com>
3667 * errout.adb (Output_Source_Line): Do not keep a trailing space after
3668 the source line number if the source line is empty.
3670 2007-12-13 Geert Bosch <bosch@adacore.com>
3672 * eval_fat.adb (Decompose_Int): Handle argument of zero.
3673 (Compose): Remove special casing of zero.
3674 (Exponent): Likewise.
3675 (Fraction): Likewise.
3676 (Machine): Likewise.
3677 (Decompose): Update comment.
3679 2007-12-13 Ed Schonberg <schonberg@adacore.com>
3681 * exp_aggr.adb (Build_Record_Aggr_Code): If there is an aggregate for a
3682 limited ancestor part, initialize controllers of enclosing record
3683 before expanding ancestor aggregate.
3684 (Gen_Assign): If a component of the aggregate is box-initialized, add
3685 code to call Initialize if the component is controlled, and explicit
3686 assignment of null if the component is an access type.
3688 Handle properly aggregates for limited types that appear in object
3689 declarations when the aggregate contains controlled values such as
3691 When expanding limited aggregates into individual components, do not
3692 call Adjust on controlled components that are limited.
3694 2007-12-13 Ed Schonberg <schonberg@adacore.com>
3696 * expander.adb: Take into account N_Subprogram_Renaming_Declaration
3698 2007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
3700 * exp_ch3.adb (Predefined_Primitive_Bodies): Generate the body of
3701 predefined primitive _Disp_Requeue.
3702 (Make_Predefined_Primitive_Specs): Create the spec for predefined
3703 primitive _Disp_Requeue.
3704 (Make_Predefined_Primitive_Specs/Predefined_Primitive_Bodies): Set the
3705 type of formal Renamed_Eq to Entity_Id (instead of Node_Id).
3706 (Make_Predefined_Primitive_Specs): Spec of "=" needed if the parent is
3707 an interface type. In case of limited interfaces we now declare all the
3708 predefined primitives associated with synchronized interfaces as
3710 (Predef_Spec_Or_Body): For interface types generate abstract subprogram
3712 (Predefined_Primitive_Bodies): Add body of "=" if the parent of the
3713 tagged type is an interface type and there is no user-defined equality
3715 Add also bodies of predefined primitives associated with synchronized
3717 (Freeze_Record_Type): Do not build bodies of predefined primitives of
3718 interface types because they are now defined abstract.
3719 Add missing documentation.
3720 (Expand_Record_Controller): Update occurrence of Related_Interface
3722 (Build_Offset_To_Top_Functions): Do nothing in case of VM.
3723 (Expand_N_Object_Declaration): Take into account VM_Target when handling
3724 class wide interface object declaration.
3725 (Expand_Previous_Access_Type): Do not create a duplicate master entity
3726 if the access type already has one.
3727 (Expand_N_Object_Declaration): Defend against attempt to validity check
3728 generic types. Noticed for -gnatVcf specified with previous errors.
3730 2007-12-13 Arnaud Charlet <charlet@adacore.com>
3732 * exp_ch4.adb (Expand_N_Attribute_Reference, Displace_Allocator_Pointer,
3733 Expand_Allocator_Expression): Take into account VM_Target
3735 * exp_ch5.adb (Expand_N_Extended_Return_Statement): Do not use
3736 secondary stack when VM_Target /= No_VM
3738 2007-12-13 Javier Miranda <miranda@adacore.com>
3739 Ed Schonberg <schonberg@adacore.com>
3741 * exp_ch7.adb (Expand_N_Package_Body): Replace occurrence of attribute
3742 Is_Complation_Unit by Is_Library_Level_Entity in the code
3743 that decides if the static dispatch tables need to be built.
3744 (Wrap_Transient_Declaration): Do not generate a finalization call if
3745 this is a renaming declaration and the renamed object is a component
3746 of a controlled type.
3748 2007-12-13 Gary Dismukes <dismukes@adacore.com>
3750 * exp_ch8.ads, exp_ch8.adb (Expand_N_Subprogram_Renaming_Declaration):
3751 In the case where the renamed subprogram is a dereference, call
3752 Force_Evaluation on the prefix.
3754 2007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
3755 Ed Schonberg <schonberg@adacore.com>
3757 * exp_ch9.adb (Expand_N_Asynchronous_Select,
3758 Expand_N_Conditional_Entry_Call, Expand_N_Timed_Entry_Call): Code and
3759 comment reformatting.
3760 (Set_Privals): Inherit aliased flag from formal. From code reading.
3761 (Build_Simple_Entry_Call): Out parameters of an access type are passed
3762 by copy and initialized from the actual. This includes entry parameters.
3763 (Expand_N_Requeue_Statement): Reimplement in order to handle both Ada 95
3764 and Ada 2005 models of requeue.
3765 (Null_Statements): Still connsider do-end block null if it contains
3766 Unreferenced and Warnings pragmas.
3767 (Expand_N_Accept_Statement): Do not optimize away null do end if
3768 dispatching policy is other than defaulted.
3769 (Expand_N_Timed_Entry_Call): When the triggering statement is a
3770 dispatching call, manually analyze the delay statement.
3771 (Find_Parameter_Type): Move subprogram to Sem_Util.
3773 2007-12-13 Hristian Kirtchev <kirtchev@adacore.com>
3774 Javier Miranda <miranda@adacore.com>
3776 * exp_disp.ads, exp_disp.adb (Default_Prim_Op_Position): Primitive
3777 _Disp_Requeue occupies dispatch table slot number 15. Move
3778 _Disp_Timed_Select to slot 16.
3779 (Make_Disp_Requeue_Body, Make_Disp_Requeue_Spec): New routines which
3780 generate the spec and body of _Disp_Reqeueue.
3781 (Make_DT): Build and initialize the second dispatch table.
3782 Handle initialization of RC_Offset when the parent
3783 is a private type with variable size components.
3784 (Make_Secondary_DT): Complete documentation. Add support to
3785 initialize the second dispatch table.
3786 (Make_Tags): Generate the tag of the second dispatch table.
3787 (Register_Primitive): Add support to register primitives in the
3788 second dispatch table.
3790 2007-12-13 Pascal Obry <obry@adacore.com>
3792 * expect.c (__gnat_kill) [WIN32]: Implement the SIGINT signal on
3793 Windows. This signal is used by gnatmake to kill child processes for
3796 2007-12-13 Javier Miranda <miranda@adacore.com>
3798 * exp_intr.adb (Expand_Dispatching_Constructor_Call): Add missing
3799 support for generic dispatching constructor calls in which we need to
3800 locate the tag of a secondary dispatch table associated with an
3801 interface type to properly dispatch the call.
3802 (Expand_N_Attribute_Reference [case Address],
3803 Expand_Dispatching_Constructor_Call, Expand_Unc_Deallocation): Fix
3804 handling of VM targets.
3806 2007-12-13 Robert Dewar <dewar@adacore.com>
3807 Ed Schonberg <schonberg@adacore.com>
3809 * exp_prag.adb (Expand_Pragma_Assert): Recognize new warning flag for
3812 * ug_words: Add entries for -gnatw.a -gnatw.A
3814 * sem_res.adb (Set_String_Literal_Subtype): If the context of the
3815 literal is a subtype with non-static constraints, use the base type of
3816 the context as the base of the string subtype, to prevent type
3818 (Resolve_Actuals): If the actual is an entity name, generate a
3819 reference before the actual is resolved and expanded, to prevent
3820 spurious warnings on formals of enclosing protected operations.
3821 (Analyze_Overloaded_Selected_Component): If type of prefix if
3822 class-wide, use visible components of base type.
3823 (Resolve_Selected_Component): Ditto.
3824 (Resolve_Short_Circuit): Detect case of pragma Assert argument
3825 evaluating to False, and issue warning message.
3827 * usage.adb: Add lines for -gnatw.a and -gnatw.A
3829 2007-12-13 Emmanuel Briot <briot@adacore.com>
3831 * g-calend.ads (No_Time): New constant, to represent an uninitialized
3834 * g-catiio.ads, g-catiio.adb (Value): Added support for more date
3836 (Month_Name_To_Number): New subprogram
3838 * g-dirope.adb (Get_Current_Dir): On wi