1 2008-04-28 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3 * Make-lang.in (ada.tags, check-acats, ada/treeprs.ads)
4 (ada/einfo.h, ada/sinfo.h, ada/nmake.adb, ada/nmake.ads):
5 Use '&&' instead of ';'.
7 2008-04-24 Olivier Hainque <hainque@adacore.com>
9 * trans.c (Attribute_to_gnu) <case Attr_Length>: Length computation
10 doesn't require signed arithmetic anymore.
12 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14 * trans.c (Attribute_to_gnu): Don't set TREE_INVARIANT.
15 (call_to_gnu): Don't set TREE_INVARIANT.
16 * utils2.c (gnat_build_constructor): Don't set TREE_INVARIANT.
18 2008-04-22 Joel Sherrill <joel.sherrill@oarcorp.com>
20 * s-osinte-rtems.adb: Add sigalstack function.
21 * s-osinte-rtems.ads: Add SO_ONSTACK and sigalstack
22 function. Add Alternate_Stack and Alternate_Stack_Size.
23 Add missing process_shared field to pthread_condattr_t
24 and change ss_low_priority to int from timespec.
26 2008-04-22 Samuel Tardieu <sam@rfc1149.net>
28 * i-forbla.adb: Link against -llapack and -lblas by default
29 instead of the private -lgnalasup.
31 2008-04-21 Olivier Hainque <hainque@adacore.com>
33 Access to most C builtins from Ada
34 * utils.c: #include "langhooks.h" and define GCC_DIAG_STYLE.
35 (handle_pure_attribute, handle_novops_attribute,
36 handle_nonnull_attribute, handle_sentinel_attribute,
37 handle_noreturn_attribute, handle_malloc_attribute,
38 handle_type_generic_attribute): New attribute handlers, from C fe.
39 (gnat_internal_attribute_table): Map the new handlers.
40 (gnat_init_decl_processing): Move call to gnat_install_builtins to ...
41 (init_gigi_decls): ... here.
42 (handle_const_attribute, handle_nothrow_attribute, builtin_decl_for):
43 Move to a section dedicated to builtins processing.
44 (build_void_list_node, builtin_type_for_size): New functions.
45 (def_fn_type, get_nonnull_operand): Likewise.
46 (install_builtin_elementary_type, install_builtin_function_types,
47 install_builtin_attributes): Likewise.
48 (fake_attribute_handler): Fake handler for attributes we don't
50 (def_builtin_1): New function, worker for DEF_BUILTIN.
51 (install_builtin_functions): New function.
52 (gnat_install_builtins): Move to the builtins processing section.
53 Now calling the newly introduced installers.
55 2008-04-20 Eric Botcazou <ebotcazou@adacore.com>
57 * decl.c (gnat_to_gnu_entity) <object>: Also promote the alignment of
58 constant objects, but not exceptions.
59 * trans.c (add_decl_expr): Use gnat_types_compatible_p for type
61 * utils.c (create_var_decl_1): Likewise.
62 * utils2.c (build_binary_op) <MODIFY_EXPR>: Also use the padded view of
63 the type when copying to padded object and the source is a constructor.
65 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
67 * decl.c (gnat_to_gnu_entity) <object>: When trying to promote the
68 alignment, reset it to zero if it would end up not being greater
69 than that of the type.
71 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
73 * decl.c (maybe_pad_type): Only generate the XVS parallel type if
74 the padded type has a variable size.
76 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
78 * decl.c (gnat_to_gnu_entity) <E_Subprogram_Type>: Use the return by
79 target pointer mechanism as soon as the size is not constant.
81 2008-04-18 Eric Botcazou <ebotcazou@adacore.com>
83 * gigi.h (create_var_decl_1): Declare.
84 (create_var_decl): Turn into a macro invoking create_var_decl_1.
85 (create_true_var_decl): Likewise.
86 * utils.c (create_var_decl_1): Make global and reorder parameters.
87 (create_var_decl): Delete.
88 (create_true_var_decl): Likewise.
90 2008-04-17 Eric Botcazou <ebotcazou@adacore.com>
92 * decl.c (gnat_to_gnu_entity) <object>: Promote the alignment of
94 * fe.h (Debug_Flag_Dot_A): Delete.
95 * debug.adb (-gnatd.a): Update documentation.
97 2008-04-17 Samuel Tardieu <sam@rfc1149.net>
99 * g-socket.ads, g-socket.adb (Get_Address): Make Stream a
100 "not null" parameter.
102 2008-04-17 Samuel Tardieu <sam@rfc1149.net>
104 * g-socket.adb: Add a message "IPv6 not supported" to the
105 Socket_Error exception.
107 2008-04-16 Samuel Tardieu <sam@rfc1149.net>
110 * sem_ch12.adb (Instantiate_Type): Check whether the full view of
111 the type is known instead of the underlying type.
113 2008-04-15 Ed Schonberg <schonberg@adacore.com>
116 * exp_ch5.adb (Expand_Assign_Record): Within an initialization
117 procedure for a derived type retrieve the discriminant values from
118 the parent using the corresponding discriminant.
120 2008-04-15 Samuel Tardieu <sam@rfc1149.net>
121 Gary Dismukes <dismukes@adacore.com>
124 * sem_ch8.adb (Analyze_Use_Package): Do not allow "use" of something
125 which is not an entity (and hence not a package).
126 (End_Use_Package): Ditto.
128 2008-04-15 Ed Schonberg <schonberg@adacore.com>
131 * sem_ch12.adb (Analyze_Formal_Subprogram): The default can be any
132 protected operation that matches the signature, not only an entry, a
133 regular subprogram or a literal.
135 2008-04-15 Eric Botcazou <ebotcazou@adacore.com>
137 * ada-tree.h (DECL_BY_COMPONENT_PTR_P): Use DECL_LANG_FLAG_3.
138 * decl.c (gnat_to_gnu_entity) <object>: Call maybe_pad_type only
139 if a size or alignment is specified. Do not take into account
140 alignment promotions for the computation of the object's size.
141 <type>: Call maybe_pad_type only if a size or alignment is specified.
142 (maybe_pad_type): Really reuse the RM_Size of the original type if
144 * trans.c (Attribute_to_gnu): Fix a couple of nits.
145 * utils2.c (build_binary_op) <MODIFY_EXPR>: Merge related conditional
146 statements. Use the padded view of the type when copying between
147 padded objects of the same underlying type.
149 2008-04-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
151 * vms_data.ads: Fix typo in constant.
152 * gen-soccon.c: Fix typo in error string.
153 * gnat_rm.texi (Pragma Optimize_Alignment, Pragma Postcondition):
155 * a-calcon.ads, a-calend-vms.adb, a-calend.adb, a-crdlli.ads,
156 bcheck.adb, checks.adb, einfo.ads, errout.adb, erroutc.adb,
157 erroutc.ads, exp_attr.adb, exp_ch11.adb, exp_ch2.adb,
158 exp_ch5.adb, exp_ch9.adb, exp_ch9.ads, exp_pakd.adb,
159 exp_util.adb, fmap.adb, g-soccon-linux-mips.ads,
160 g-soccon-rtems.ads, g-timsta.adb, g-timsta.ads, lib-writ.ads,
161 mlib-tgt-specific-linux.adb, mlib-tgt-specific-tru64.adb,
162 s-interr-vxworks.adb, s-interr.adb, s-osinte-lynxos.ads,
163 s-rident.ads, s-taprop-solaris.adb, s-tassta.adb, s-win32.ads,
164 sem_aggr.adb, sem_attr.ads, sem_ch10.adb, sem_ch13.ads,
165 sem_ch3.adb, sem_ch6.adb, sem_ch7.adb, sem_ch8.adb, sem_ch9.adb,
166 sem_prag.ads, sem_res.adb, sem_util.adb, sem_util.ads,
167 sinfo.ads: Fix typos in comments.
169 2008-04-14 Robert Dewar <dewar@adacore.com>
171 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Extend error
172 to every non-object and change error message.
174 2008-04-14 Robert Dewar <dewar@adacore.com>
176 * sem_util.ads, sem_util.adb (In_Subprogram): Remove.
177 * sem_attr.adb (Anayze_Attribute): Check for Current_Subprogram
180 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
183 * sem_prag.adb (Analyze_Pragma, Linker_Section case): Refuse to
184 apply pragma Linker_Section on type.
186 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
189 * sem_prag.adb (Error_Pragma_Ref): New.
190 (Process_Convention): Specialized message for non-local
191 subprogram renaming. Detect the problem in homonyms as well.
193 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
196 * sem_util.ads, sem_util.adb (Denotes_Variable): New function.
197 * sem_ch12.adb (Instantiate_Object): Use it.
198 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): Ensure that
199 storage pool denotes a variable as per RM 13.11(15).
201 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
203 * sem_util.ads, sem_util.adb (In_Subprogram): New function.
204 * sem_attr.adb (Analyze_Attribute, Attribute_Old case): Use it.
206 2008-04-14 Rolf Ebert <rolf.ebert.gcc@gmx.de>
209 * xgnatugn.adb (Put_Line): New procedure, ensuring Unix
210 line endings even on non-Unix platforms.
212 2008-04-14 Samuel Tardieu <sam@rfc1149.net>
215 * xref_lib.adb (Parse_Identifier_Info): Correctly parse and ignore the
216 renaming information.
218 2008-04-13 Samuel Tardieu <sam@rfc1149.net>
221 * sem_aggr.adb (Valid_Ancestor_Type): A type is not an ancestor of
224 2008-04-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
226 * sfn_scan.adb, sfn_scan.ads, sinfo.ads,
227 sinput-d.ads, sinput-l.adb, sinput-l.ads, sinput.ads,
228 snames.ads, sprint.adb, stand.ads, stringt.ads,
229 styleg.adb, styleg.ads, stylesw.adb, stylesw.ads,
230 switch.ads, sysdep.c, table.adb, table.ads,
231 targparm.ads, tb-gcc.c, tbuild.ads, tracebak.c,
232 trans.c, tree_io.adb, treepr.adb, types.adb, types.ads,
233 uintp.adb, uintp.ads, utils.c, utils2.c, validsw.ads,
234 vms_conv.adb, vms_conv.ads, vms_data.ads, widechar.adb,
235 widechar.ads, xeinfo.adb, xgnatugn.adb, xr_tabls.adb,
236 xr_tabls.ads, xref_lib.adb, xref_lib.ads, xsinfo.adb:
239 * sem_ch10.adb, sem_ch10.ads,
240 sem_ch12.adb, sem_ch12.ads, sem_ch13.adb, sem_ch13.ads,
241 sem_ch3.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb,
242 sem_ch6.ads, sem_ch8.adb, sem_ch8.ads, sem_ch9.adb,
243 sem_elab.adb, sem_elab.ads, sem_elim.ads, sem_eval.adb,
244 sem_eval.ads, sem_intr.adb, sem_mech.adb, sem_mech.ads,
245 sem_prag.adb, sem_prag.ads, sem_res.adb, sem_res.ads,
246 sem_type.adb, sem_util.adb, sem_util.ads, sem_warn.adb,
247 sem_warn.ads: Fix comment typos.
249 * s-secsta.adb, s-sequio.ads, s-shasto.ads,
250 s-soflin.ads, s-stalib.ads, s-stausa.adb,
251 s-stausa.ads, s-strxdr.adb, s-taenca.adb, s-taenca.ads,
252 s-taprob.adb, s-taprop-hpux-dce.adb, s-taprop-irix.adb,
253 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-posix.adb,
254 s-taprop-solaris.adb, s-taprop-tru64.adb, s-taprop-vms.adb,
255 s-taprop-vxworks.adb, s-taprop.ads, s-tarest.adb,
256 s-tarest.ads, s-tasini.adb, s-tasini.ads, s-taskin.ads,
257 s-tasque.ads, s-tassta.adb, s-tassta.ads, s-tasuti.ads,
258 s-tpoben.adb, s-tpoben.ads, s-tpobop.adb,
259 s-tpopsp-posix.adb, s-tpopsp-rtems.adb, s-tposen.adb,
260 s-tposen.ads, s-traceb-hpux.adb, s-traces.ads,
261 s-trafor-default.ads, s-unstyp.ads, s-utf_32.ads,
262 s-vaflop.adb, s-vaflop.ads, s-valrea.adb, s-valuti.adb,
263 s-wchstw.ads, s-wchwts.adb, s-wchwts.ads, scans.ads,
264 scn.adb, scng.adb, seh_init.c, sem.ads, sem_aggr.adb,
265 sem_attr.adb, sem_attr.ads, sem_case.adb, sem_case.ads,
266 sem_cat.adb, sem_cat.ads: Fix comment typos.
268 2008-04-12 Joel Sherrill <joel@oarcorp.com>
271 * g-soccon-rtems.ads: Add IP_PKTINFO as unsupported.
273 2008-04-12 Arnaud Charlet <charlet@adacore.com>
275 * s-linux-hppa.ads: Fix syntax errors.
277 2008-04-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
279 * gnat_ugn.texi: Fix typos.
280 * raise-gcc.c, repinfo.adb, repinfo.ads, restrict.adb,
281 restrict.ads, rtsfind.adb, rtsfind.ads, s-arit64.ads,
282 s-asthan-vms-alpha.adb, s-auxdec.ads, s-casuti.ads,
283 s-fatflt.ads, s-fatgen.adb, s-fatlfl.ads,
284 s-fatllf.ads, s-fatsfl.ads, s-filofl.ads,
285 s-finimp.adb, s-finroo.ads, s-fishfl.ads,
286 s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
287 s-hibaen.ads, s-htable.ads, s-imgcha.adb,
288 s-imgenu.ads, s-imgint.adb, s-imgrea.adb,
289 s-inmaop-dummy.adb, s-inmaop.ads, s-interr-vms.adb,
290 s-interr-vxworks.adb, s-interr.adb, s-interr.ads,
291 s-intman-vxworks.ads, s-intman.ads, s-mastop-irix.adb,
292 s-os_lib.adb, s-os_lib.ads, s-osinte-aix.ads,
293 s-osinte-darwin.ads, s-osinte-freebsd.ads,
294 s-osinte-hpux.ads, s-osinte-lynxos-3.adb,
295 s-osinte-lynxos-3.ads, s-osinte-lynxos.ads,
296 s-osinte-rtems.ads, s-osinte-solaris-posix.ads,
297 s-osprim-mingw.adb, s-osprim-vms.adb, s-parame-ae653.ads,
298 s-parame-hpux.ads, s-parame-vms-alpha.ads,
299 s-parame-vms-ia64.ads, s-parame-vms-restrict.ads,
300 s-parame-vxworks.ads, s-parame.ads, s-parint.adb,
301 s-parint.ads, s-poosiz.adb, s-proinf-irix-athread.ads,
302 s-proinf.ads, s-regexp.adb, s-regpat.adb, s-regpat.ads,
303 s-rident.ads: Fix comment typos.
305 2008-04-09 Samuel Tardieu <sam@rfc1149.net>
308 * sem_ch6.adb (Build_Body_To_Inline): Do not save and restore
309 environment if generic instance is a top-level one.
311 2008-04-09 Doug Rupp <rupp@adacore.com>
313 * decl.c (validate_size): Set minimum size for fat pointers same as
314 access types. Code clean ups.
316 * gmem.c (xstrdup32): New macro for 32bit dup on VMS, noop otherwise
317 (__gnat_gmem_a2l_initialize): Dup exename into 32 bit memory on VMS
319 * s-auxdec-vms_64.ads, s-auxdec.ads (Short_Address_Size): New constant
321 * s-crtl.ads (malloc32) New function, alias for malloc
322 (realloc32) New function, alias for realloc
324 * socket.c (__gnat_new_socket_set): Malloc fd_set in 32 bits on VMS
326 * utils2.c (build_call_alloc_dealloc): Return call to short malloc if
327 allocator size is 32 and default pointer size is 64.
328 (find_common_type): Document assumption on t1/t2 vs lhs/rhs. Force use of
329 lhs type if smaller, whatever the modes.
331 * gigi.h (malloc32_decl): New macro definition
333 * utils.c (init_gigi_decls): New malloc32_decl
334 Various code clean ups.
336 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
337 Task_Address vice System.Address.
339 * s-taspri-vms.ads: Import System.Aux_DEC
340 (Task_Address): New subtype of System.Aux_DEC.Short_Address
341 (Task_Address_Size): New constant size of System.Aux_DEC.Short_Address
343 * s-asthan-vms-alpha.adb (Process_AST.To_Address): Unchecked convert to
344 Task_Address vice System.Address.
346 * s-inmaop-vms.adb: Import System.Task_Primitives
347 (To_Address): Unchecked convert to Task_Address vice System.Address
349 * s-taprop-vms.adb (Timed_Delay): Always set the timer even if delay
351 (To_Task_ID) Unchecked convert from Task_Adddress vice System.Address
352 (To_Address) Unchecked convert to Task_Address vice System.Address
354 * s-tpopde-vms.adb: Remove unnecessary warning pragmas
356 * g-socthi-vms.ads: Add 32bit size clauses on socket access types.
358 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
360 * gigi.h (standard_datatypes): Add ADT_fdesc_type and ADT_null_fdesc.
361 (fdesc_type_node): Define.
362 (null_fdesc_node): Likewise.
363 * decl.c (gnat_to_gnu_entity) <E_Access_Subprogram_Type>: If the target
364 uses descriptors for vtables and the type comes from a dispatch table,
365 return the descriptor type.
366 * trans.c (Attribute_to_gnu) <Attr_Unrestricted_Access>: If the target
367 uses descriptors for vtables and the type comes from a dispatch table,
368 build a descriptor in the static case and copy the existing one in the
370 (gnat_to_gnu) <N_Null>: If the target uses descriptors for vtables and
371 the type is a pointer-to-subprogram coming from a dispatch table,
372 return the null descriptor.
373 <N_Unchecked_Type_Conversion>: If the target uses descriptors for
374 vtables, the source type is the descriptor type and the target type
375 is a pointer type, first build the pointer.
376 * utils.c (init_gigi_decls): If the target uses descriptors for vtables
377 build the descriptor type and the null descriptor.
379 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
381 * decl.c (prepend_attributes): Fix typo.
382 * trans.c (Pragma_to_gnu): Likewise.
383 * utils.c (gnat_genericize): Likewise.
385 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
386 Richard Kenner <kenner@adacore.com>
388 * ada-tree.h (TYPE_PACKED_ARRAY_TYPE_P): Only set it when bit-packed.
389 * decl.c (gnat_to_gnu_entity): Adjust for above change.
390 <E_Record_Type>: Try to get a better form of the component for
391 packing, even if it has an integral mode.
392 <E_Record_Subtype>: Likewise.
393 * trans.c (gnat_to_gnu): Do not require BLKmode for the special
394 exception suppressing the final conversion between record types.
396 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
398 * decl.c (gnat_to_gnu_entity) <object>: If -gnatd.a and not optimizing
399 alignment for space, promote the alignment of non-scalar variables with
400 no size and alignment.
401 * gigi.h (gnat_types_compatible_p): Declare.
402 * misc.c (LANG_HOOKS_TYPES_COMPATIBLE_P): Set to above predicate.
403 * trans.c (gnat_to_gnu): Revert revision 129339 change. Minor cleanup.
404 * utils.c (gnat_types_compatible_p) : New predicate.
405 (convert): Use it throughout to test for cases where a mere view
406 conversion is sufficient.
407 * utils2.c (build_binary_op): Minor tweaks.
408 (build_unary_op): Likewise.
410 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
412 * decl.c (adjust_packed): Expand comment.
414 2008-04-08 Arnaud Charlet <charlet@adacore.com>
416 * s-tasuti.ads: Use Task_Address instead of System.Address.
418 * makeutl.adb (Path_Or_File_Name): New function
420 * nlists.ads, itypes.ads: Update comments.
422 * s-crtl.ads (malloc32, realloc32): New functions.
424 * s-auxdec.ads (Short_Address_Size): New constant.
426 * a-taside.adb, s-tasdeb.adb: Use Task_Address.
428 * s-ststop.ads, s-ststop.adb: New file.
430 * exp_tss.ads, s-taprop-lynxos.adb: Update comments.
433 2008-04-08 Pascal Obry <obry@adacore.com>
435 * g-sercom.ads, g-sercom.adb (Data_Rate): Add B115200.
436 (Stop_Bits_Number): New type.
437 (Parity_Check): Likewise.
438 (Set): Add parameter to set the number of stop bits and
439 the parity. Parameter timeout is now a duration instead
442 * g-sercom-linux.adb:
443 Implement the stop bits and parity support for GNU/Linux.
444 Fix handling of timeout, it must be given in tenth of seconds.
446 * g-sercom-mingw.adb:
447 Implement the stop bits and parity support for Windows.
448 Use new s-win32.ads unit instead of declaring Win32 services
449 directly into this body.
450 Update handling of timeout as now a duration.
452 * s-win32.ads, s-winext.ads: New files.
454 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
455 Arnaud Charlet <charlet@adacore.com>
457 * s-osinte-linux-alpha.ads, s-osinte-linux-hppa.ads: Removed.
459 s-taspri-posix-noaltstack.ads, s-linux.ads, s-linux-alpha.ads,
460 s-linux-hppa.ads: New files. Disable alternate stack on ia64-hpux.
462 * s-osinte-lynxos-3.ads,
463 (Alternate_Stack): Remove when not needed. Simplify declaration
465 (Alternate_Stack_Size): New constant.
467 s-osinte-mingw.ads, s-taprop-mingw.adb: Code clean up: avoid use of
468 'Unrestricted_Access.
470 * s-osinte-hpux.ads, s-osinte-solaris-posix.ads, s-osinte-aix.ads,
471 s-osinte-lynxos.ads, s-osinte-freebsd.ads s-osinte-darwin.ads,
472 s-osinte-tru64.ads, s-osinte-irix.ads, s-osinte-linux.ads,
473 s-osinte-solaris.ads, s-osinte-vms.ads
474 (SA_ONSTACK): New constant.
475 (stack_t): New record type.
476 (sigaltstack): New imported function.
477 (Alternate_Stack): New imported variable.
478 (Alternate_Stack_Size): New constant.
480 * system-linux-x86_64.ads: (Stack_Check_Probes): Set to True.
482 * s-taspri-lynxos.ads, s-taspri-solaris.ads, s-taspri-tru64.ads,
483 s-taspri-hpux-dce.ads, s-taspri-dummy.ads, s-taspri-posix.ads,
484 s-taspri-vms.ads (Task_Address): New subtype of System.Address
485 (Task_Address_Size): New constant size of System.Address
486 (Alternate_Stack_Size): New constant.
488 * s-taprop-posix.adb, s-taprop-linux.adb (Get_Stack_Attributes): Delete.
489 (Enter_Task): Do not notify stack to System.Stack_Checking.Operations.
490 Establish the alternate stack if the platform makes use of n alternate
491 signal stack for stack overflows.
492 (Create_Task): Take into account the alternate stack in the stack size.
493 (Initialize): Save the address of the alternate stack into the ATCB for
494 the environment task.
495 (Create_Task): Fix assertions for NPTL library (vs old LinuxThreads).
497 * s-parame.adb (Minimum_Stack_Size): Increase value to 16K
499 * system-linux-x86.ads: (Stack_Check_Probes): Set to True.
501 * s-intman-posix.adb:
502 (Initialize): Set SA_ONSTACK for SIGSEGV if the platform makes use of an
503 alternate signal stack for stack overflows.
505 * init.c (__gnat_adjust_context_for_raise, Linux version): On i386 and
506 x86-64, adjust the saved value of the stack pointer if the signal was
507 raised by a stack checking probe.
508 (HP-UX section): Use global __gnat_alternate_stack as signal handler
509 stack and only for SIGSEGV.
510 (Linux section): Likewise on x86 and x86-64.
512 (__gnat_map_signal): Now static.
513 (__gnat_error_handler): Not static any more.
514 (__gnat_adjust_context_for_raise): New function. Signal context
515 adjustment for PPC && !VTHREADS && !RTP, as required by the zcx
516 propagation circuitry.
517 (__gnat_error_handler): Second argument of a sigaction handler is a
518 pointer, not an int, and is unused.
519 Adjust signal context before mapping to exception.
520 Install signal handlers for LynxOS case.
522 * s-taskin.ads (Common_ATCB): New field Task_Alternate_Stack.
523 (Task_Id): Set size to Task_Address_Size
524 (To_Task_id): Unchecked convert from Task_Address vice System.Address
525 (To_Address): Unchecked convert to Task_Address vice System.Address
527 * s-tassta.adb (Task_Wrapper): Define the alternate stack and save its
528 address into the ATCB if the platform makes use of an alternate signal
529 stack for stack overflows.
530 (Free_Task): Add call to Finalize_Attributes_Link.
531 Add argument Relative_Deadline to pass the value specified for
532 the task. This is not yet used for any target.
534 * s-tassta.ads (Create_Task): Add argument Relative_Deadline to pass
535 the value specified for the task.
537 2008-04-08 Arnaud Charlet <charlet@adacore.com>
539 (s-osinte-vxworks6.ads): Removed, merged with s-osinte-vxworks.ads/.adb
540 (s-vxwext.ads, s-vxwext-kernel.ads, s-vxwext-rtp.ads,
541 s-vxwext-rtp.adb): New files.
543 * s-taprop-vxworks.adb, s-osinte-vxworks.ads, s-osinte-vxworks.adb:
544 Minor updates to accomodate changes above.
546 2008-04-08 Pascal Obry <obry@adacore.com>
548 * a-exetim-mingw.adb, s-gloloc-mingw.adb, s-taprop-mingw.adb,
549 s-tasinf-mingw.ad{s,b}, s-taspri-mingw.ads:
550 Use new s-win32.ads unit instead of declaration
551 from s-osinte-mingw.ads.
553 * s-osinte-mingw.ads:
554 Move all non tasking based interface to s-win32.ads.
556 * s-osprim-mingw.adb:
557 Remove duplicated declarations and use s-win32.ads
560 2008-04-08 Vincent Celier <celier@adacore.com>
561 Arnaud Charlet <charlet@adacore.com>
563 * mlib-tgt-aix.adb, mlib-tgt-darwin.adb, mlib-tgt-hpux.adb,
564 mlib-tgt-irix.adb, mlib-tgt-linux.adb, mlib-tgt-lynxos.adb,
565 mlib-tgt-solaris.adb, mlib-tgt-tru64.adb, mlib-tgt-vms.adb,
566 mlib-tgt-vms.ads, mlib-tgt-vms-alpha.adb, mlib-tgt-vms-ia64.adb,
567 mlib-tgt-vxworks.adb, mlib-tgt-mingw.adb: Renamed into...
569 * mlib-tgt-specific-aix.adb, mlib-tgt-specific-darwin.adb,
570 mlib-tgt-specific-hpux.adb, mlib-tgt-specific-irix.adb,
571 mlib-tgt-specific-linux.adb, mlib-tgt-specific-lynxos.adb,
572 mlib-tgt-specific-solaris.adb, mlib-tgt-specific-tru64.adb,
573 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads,
574 mlib-tgt-specific-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
575 mlib-tgt-specific-vxworks.adb, mlib-tgt-specific-xi.adb,
576 mlib-tgt-specific-mingw.adb: New names.
579 On VxWorks platforms use s-stchop-limit.ads for s-stchop.ads
581 (EXTRA_GNATRTL_NONTASKING_OBJS): Add s-win32.o
582 Files mlib-tgt-*.adb have been renamed mlib-tgt-specific-*.adb
583 Minor updates for VMS
587 2008-04-08 Thomas Quinot <quinot@adacore.com>
589 * g-expect-vms.adb, a-textio.adb, a-witeio.adb, exp_dbug.adb,
590 g-expect.adb, g-locfil.adb, gnatchop.adb, gnatdll.adb, gnatlbr.adb,
591 gnatmem.adb, g-regist.adb, i-vxwork.ads, mlib-utl.adb, i-vxwork-x86.ads,
592 a-ztexio.adb, g-enblsp-vms-alpha.adb, g-enblsp-vms-ia64.adb,
593 s-os_lib.adb, s-regpat.adb, s-regpat.ads: Fix incorrect casing of
594 ASCII.NUL throughout.
596 2008-04-08 Arnaud Charlet <charlet@adacore.com>
597 Matthew Heaney <heaney@adacore.com>
599 * a-cgcaso.adb, a-convec.adb: (Swap, Sift): Avoid use of complex
602 * a-cgaaso.ads, a-secain.ads, a-slcain.ads, a-shcain.ads,
603 a-crdlli.ads, a-coormu.ads, a-ciormu.ads: modified header to conform
604 to convention for non-RM specs.
605 Add descriptive header, and documented each operation
606 document each operation
608 2008-04-08 Robert Dewar <dewar@adacore.com>
609 Bob Duff <duff@adacore.com>
610 Gary Dismukes <dismukes@adacore.com>
611 Ed Schonberg <schonberg@adacore.com>
613 * alloc.ads: Add entries for Obsolescent_Warnings table
615 * einfo.ads, einfo.adb: Minor reformatting.
616 (Is_Discriminal): New subprogram.
617 (Is_Prival): New subprogram.
618 (Is_Protected_Component): New subprogram.
619 (Is_Protected_Private): Removed.
620 (Object_Ref, Set_Object_Ref): Removed.
621 (Prival, Set_Prival): Change assertion.
622 (Privals_Chain, Set_Privals_Chain): Removed.
623 (Prival_Link, Set_Prival_Link): New subprogram.
624 (Protected_Operation, Set_Protected_Operation): Removed.
625 (Protection_Object, Set_Protection_Object): New subprogram.
626 (Write_Field17_Name): Remove case for Object_Ref.
627 (Write_Field20_Name): Add case for Prival_Link.
628 (Write_Field22_Name): Remove case for Protected_Operation,
630 Add case for Protection_Object.
631 (Can_Use_Internal_Rep): Make this into a [base type only] attribute,
633 (Overlays_Constant): New flag
634 (Is_Constant_Object): New predicate
635 (Is_Standard_Character_Type): New predicate
636 (Optimize_Alignment_Space): New flag
637 (Optimize_Alignment_Time): New flag
638 (Has_Postconditions): New flag
639 (Obsolescent_Warrning): Field removed
640 (Spec_PPC_List): New field
641 (Relative_Deadline_Variable, Set_Relative_Deadline_Variable): Add
642 subprograms to get and set the relative deadline associated to a task.
644 * exp_attr.adb (May_Be_External_Call): Account for the case where the
645 Access attribute is part of a named parameter association.
646 (Expand_Access_To_Protected_Op): Test for the attribute occurring
647 within an init proc and use that directly as the scope rather than
648 traversing up to the protected operation's enclosing scope. Only apply
649 assertion on Is_Open_Scopes in the case the scope traversal is done.
650 For the init proc case use the address of the first formal (_init) as
651 the protected object reference.
652 Implement Invalid_Value attribute
653 (Expand_N_Attribute_Reference): Case Attribute_Unrestricted_Access.
654 contents of the dispatch table there is no need to duplicate the
655 itypes associated with record types (i.e. the implicit full view
657 Implement Enum_Val attribute
658 (Expand_N_Attribute_Reference, case Old): Properly handle appearence
659 within _Postconditions procedure
660 (Expand_N_Attribute_Reference, case Result): Implement new attribute
662 * exp_ch5.adb (Expand_N_Simple_Return_Statement): Handle case in which
663 a return statement calls a function that is not available in
664 configurable runtime.
665 (Analyze_If_Statement): don't optimize simple True/False cases in -O0
666 (Expand_Non_Function_Return): Generate call to _Postconditions proc
667 (Expand_Simple_Function_Return): Ditto
669 * frontend.adb: Add call to Sem_Aux.Initialize
671 * sem_aux.ads, sem_aux.adb: New file.
673 * par-prag.adb: Add entries for pragmas Precondition/Postcondition
674 Add new Pragma_Relative_Deadline.
675 Add support for pragmas Check and Check_Policy
677 * sem_attr.ads, sem_attr.adb (Check_Not_CPP_Type): New subprogram.
678 (Check_Stream_Attribute): Add missing check (not allowed in CPP types)
679 (Analyze_Attribute): In case of attributes 'Alignment and 'size add
680 missing check because they are not allowed in CPP tagged types.
681 Add Sure parameter to Note_Possible_Modification calls
682 Add implementation of Invalid_Value attribute
683 Implement new attribute Has_Tagged_Values
684 Implement Enum_Val attribute
685 (Analyze_Attribute, case Range): Set Name_Req True for prefix of
686 generated attributes.
687 (Analyze_Attribute, case Result): If prefix of the attribute is
688 overloaded, it always resolves to the enclosing function.
689 (Analyze_Attribute, case Result): Properly deal with analysis when
690 Postconditions are not active.
691 (Resolve_Attribute, case Result): Properly deal with appearence during
693 Add processing for attribute Result
695 * sem_ch6.ads, sem_ch6.adb (Check_Overriding_Indicator): Code cleanup
697 (Analyze_Subprogram_Body): Install private_with_clauses when the body
699 (Check_Inline_Pragma): recognize an inline pragma that appears within
700 the subprogram body to which it applies.
701 (Analyze_Function_Return): Check that type of the expression of a return
702 statement in a function with a class-wide result is not declared at a
703 deeper level than the function.
704 (Process_PPCs): Deal with enabling/disabling, using PPC_Enabled flag
705 (Verify_Overriding_Indicator): Handle properly subprogram bodies for
706 user- defined operators.
707 (Install_Formals): Moved to spec to allow use from Sem_Prag for
708 analysis of precondition/postcondition pragmas.
709 (Analyze_Subprogram_Body.Last_Real_Spec_Entity): New name for
710 Last_Formal, along with lots of comments on what this is about
711 (Analyze_Subprogram_Body): Fix case where we move entities from the
712 spec to the body when there are no body entities (now possible with
713 precondition and postcondition pragmas).
714 (Process_PPCs): New procedure
715 (Analyze_Subprogram_Body): Add call to Process_PPCs
717 * sem_ch8.adb (Use_One_Type): refine warning on a redundant use_type
719 (Pop_Scope): Restore Check_Policy_List on scope exit
720 (Push_Scope): Save Check_Policy_List on scope entry
721 Change name In_Default_Expression => In_Spec_Expression
722 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
723 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
724 (Analyze_Object_Renaming): Allow 'Reference as object
725 (Analyze_Pragma, case Restriction_Warnings): Call GNAT_Pragma
726 (Process_Restrictions_Or_Restriction_Warnings): Check for bad spelling
727 of restriction identifier.
728 Add Sure parameter to Note_Possible_Modication calls
730 * sem_prag.ads, sem_prag.adb (Analyze_Pragma, case Stream_Convert):
731 Don't check for primitive operations when calling Rep_Item_Too_Late.
732 (Process_Import_Or_Interface): Do not place flag on formal
734 (Analyze_Pragma, case Export): If the entity is a deferred constant,
735 propagate information to full view, which is the one elaborated by the
737 (Make_Inline): the pragma is effective if it applies to an internally
738 generated subprogram declaration for a body that carries the pragma.
739 (Analyze_Pragma, case Optimize_Alignment): Set new flag
740 Optimize_Alignment_Local.
741 (Analyze_PPC_In_Decl_Part): New procedure
742 (Get_Pragma_Arg): Moved to outer level
743 (Check_Precondition_Postcondition): Change to allow new visibility
744 rules for package spec
745 (Analyze_Pragma, case Check_Policy): Change placement rules to be
746 same as pragma Suppress/Unsuppress.
747 Change name In_Default_Expression => In_Spec_Expression
748 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
749 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
750 (Check_Precondition_Postcondition): Do proper visibility preanalysis
751 for the case of these pragmas appearing in the spec.
752 (Check_Enabled): New function
753 (Initialize): New procedure
754 (Tree_Read): New procedure
755 (Tree_Write): New procedure
756 (Check_Precondition_Postcondition): New procedure
757 Implement pragmas Check and Check_Policy
758 Merge Assert processing with Check
760 * sem_warn.adb (Warn_On_Known_Condition): Handle pragma Check
761 New warning flag -gnatw.e
763 * sinfo.ads, sinfo.adb (Has_Relative_Deadline_Pragma): New function
764 returning whether a task (or main procedure) has a pragma
766 (Set_Has_Relative_Deadline_Pragma): Procedure to indicate that a task
767 (or main procedure) has a pragma Relative_Deadline.
768 Add Next_Pragma field to N_Pragma node
769 (PPC_Enabled): New flag
770 (Next_Pragma): Now used for Pre/Postcondition processing
772 * snames.h, snames.ads, snames.adb: New standard name
774 Add entry for 'Invalid_Value attribute
775 Add entry for new attribute Has_Tagged_Values
776 Add entry for Enum_Val attribute
777 Add new standard names Aggregate, Configuration and Library.
780 Add Pragma_Precondition
781 Add Pragma_Postcondition
783 New standard name Archive_Builder_Append_Option
784 (Preset_Names): Add _relative_deadline and relative_deadline definitions
785 There was also a missing non_preemptive_within_priorities.
786 (Get_Pragma_Id, Is_Pragma_Name): Add support for pragma
788 Add support for pragmas Check and Check_Policy
790 * tree_gen.adb: Call Sem_Aux.Tree_Write
792 * tree_in.adb: Call Sem_Aux.Tree_Read
794 * exp_ch11.adb (Expand_N_Raise_Statement): New Build_Location calling
797 * exp_intr.adb (Expand_Source_Info): New Build_Location calling
800 * exp_prag.adb (Expand_Pragma_Relative_Deadline): New procedure.
801 (Expand_N_Pragma): Call the appropriate procedure for expanding pragma
803 (Expand_Pragma_Check): New procedure
805 * sinput.ads, sinput.adb (Build_Location_String): Now appends to name
808 * sinfo.adb (PPC_Enabled): New flag
810 2008-04-08 Robert Dewar <dewar@adacore.com>
811 Gary Dismukes <dismukes@adacore.com>
812 Javier Miranda <miranda@adacore.com>
813 Ed Schonberg <schonberg@adacore.com>
815 * fe.h: Remove global Optimize_Alignment flag, no longer used
817 * layout.adb: Test Optimize_Alignment flags rather than global switch
819 * lib.ads, lib.adb: New OA_Setting field in library record
821 * lib-load.adb: New OA_Setting field in library record
823 * lib-writ.ads, lib-writ.adb (Collect_Withs, Write_With_Lines): Place
824 units mentioned in limited_with_ clauses in the ali file, with an
826 New Ox fields in U line
828 * opt.adb: New flag Optimize_Alignment_Local
829 (Check_Policy_List[_Config]): New flags
831 * opt.ads (Invalid_Value_Used): New flag
832 New switch Optimize_Alignment_Local
833 (Warn_On_Parameter_Order): New flag
834 (Check_Policy_List[_Config]): New flags
836 * ali.ads, ali.adb: Add indicator 'Y' to mark mark the presence of
837 limited_with clauses.
838 New data structures for Optimize_Alignment
840 * bcheck.adb (Check_Consistent_Restriction_No_Default_Initialization):
842 (Check_Consistent_Optimize_Alignment): Rework for new structure
843 (Check_Consistent_Restrictions): Fix incorrect error message
845 sem_ch10.adb (Decorate_Tagged_Type): Set the Parent field of a newly
846 created class-wide type (to the Parent field of the specific type).
847 (Install_Siblings): Handle properly private_with_clauses on subprogram
848 bodies and on generic units.
849 (Analyze_With_Clause, Install_Limited_Withed_Unit): Guard against an
850 illegal limited_with_clause that names a non-existent package.
851 (Check_Body_Required): Determine whether a unit named a limited_with
853 (Analyze_Context): A limited_with_clause is illegal on a unit_renaming.
854 Capture Optimize_Alignment settings to set new OA_Setting field in
856 (Build_Limited_Views): Include task and protected type declarations.
858 * sem_ch3.ads, sem_ch3.adb (Analyze_Object_Declaration): Handle the
859 case of a possible constant redeclaration where the current object is
860 an entry index constant.
861 (Analyze_Object_Declaration): Generate an error in case of CPP
862 class-wide object initialization.
863 (Analyze_Object_Declaration): Add extra information on warnings for
864 declaration of unconstrained objects.
865 (Access_Type_Declaration): Set Associated_Final_Chain to Empty, to avoid
866 conflicts with the setting of Stored_Constraint in the case where the
867 access type entity has already been created as an E_Incomplete_Type due
868 to a limited with clause.
869 Use new Is_Standard_Character_Type predicate
870 (Analyze_Object_Declaration): Apply access_constant check only after
871 expression has been resolved, given that it may be overloaded with
872 several access types.
873 (Constant_Redeclaration): Additional legality checks for deferred
874 constant declarations tha involve anonymous access types and/or null
875 exclusion indicators.
876 (Analyze_Type_Declaration): Set Optimize_Alignment flags
877 (Analyze_Subtype_Declaration): Ditto
878 (Analyze_Object_Declaration): Ditto
879 (Analyze_Object_Declaration): Don't count tasks in generics
880 Change name In_Default_Expression => In_Spec_Expression
881 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
882 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
883 (Process_Discriminants): Additional check for illegal use of default
884 expressions in access discriminant specifications in a type that is not
886 (Check_Abstract_Overriding): If an inherited function dispaches on an
887 access result, it must be overridden, even if the type is a null
889 (Derive_Subprogram): The formals of the derived subprogram have the
890 names and defaults of the parent subprogram, even if the type is
891 obtained from the actual subprogram.
892 (Derive_Subprogram): In the presence of interfaces, a formal of an
893 inherited operation has the derived type not only if it descends from
894 the type of the formal of the parent operation, but also if it
895 implements it. This is relevant for the renamings created for the
896 primitive operations of the actual for a formal derived type.
897 (Is_Progenitor): New predicate, to determine whether the type of a
898 formal in the parent operation must be replaced by the derived type.
900 * sem_util.ads, sem_util.adb (Has_Overriding_Initialize): Make
901 predicate recursive to handle components that have a user-defined
902 Initialize procedure. Handle controlled derived types whose ancestor
903 has a user-defined Initialize procedured.
904 (Note_Possible_Modification): Add Sure parameter, generate warning if
905 sure modification of constant
906 Use new Is_Standard_Character_Type predicate
907 (Find_Parameter_Type): when determining whether a protected operation
908 implements an interface operation, retrieve the type of the formal from
909 the entity when the formal is an access parameter or an
910 anonymous-access-to-subprogram.
911 Move Copy_Parameter_List to sem_util, for use when building stubbed
913 (Has_Access_Values): Tagged types now return False
914 (Within_HSS_Or_If): New procedure
915 (Set_Optimize_Alignment_Flags): New procedure
916 Change name In_Default_Expression => In_Spec_Expression
917 Change name Analyze_Per_Use_Expression => Preanalyze_Spec_Expression
918 Change name Pre_Analyze_And_Resolve => Preanalyze_And_Resolve
920 2008-04-08 Tristan Gingold <gingold@adacore.com>
922 * s-fileio.adb: Name_Error shouldn't be raised for a tempory file.
924 2008-04-08 Tristan Gingold <gingold@adacore.com>
928 * cuintp.c: Fix 16 bits issue for AVR.
929 On AVR, integer is 16 bits, so it can't be used to do math with
931 So use long_integer instead.
933 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
935 * a-calend-vms.ads, a-calend-vms.adb: Add with and use clause for
936 System.OS_Primitives.
937 Change type of various constants, parameters and local variables from
938 Time to representation type OS_Time.
939 (To_Ada_Time, To_Unix_Time): Correct sign of origin shift.
940 Remove the declaration of constant Mili_F from several routines. New
941 body for internal package Conversions_Operations.
942 (Time_Of): Add default parameters for several formals.
944 * a-caldel.adb: Minor reformatting
946 * a-calend.ads, a-calend.adb: New body for internal package
947 Conversions_Operations.
948 (Time_Of): Add default parameters for several formals.
950 * Makefile.rtl: Add a-ststop
951 Add Ada.Calendar.Conversions to the list of runtime files.
954 * a-calcon.adb, a-calcon.ads: New files.
956 2008-04-08 Jose Ruiz <ruiz@adacore.com>
957 Tristan Gingold <gingold@adacore.com>
959 * s-interr-dummy.adb, s-interr-vms.adb, s-interr-sigaction.adb
960 (Install_Restricted_Handlers): New procedure
961 which is a simplified version of Install_Handlers that does not store
962 previously installed.
964 * s-interr-vxworks.adb: Fix ACATS cxc3001
965 On VxWorks interrupts can't be detached.
966 (Install_Restricted_Handlers): New procedure.
968 * s-interr.ads, s-interr.adb (Install_Restricted_Handlers): New
971 2008-04-08 Olivier Hainque <hainque@adacore.com>
973 * s-intman-vxworks.ads, s-intman-vxworks.adb
974 (Map_And_Raise_Exception): Remove. Was an import of only part of the
975 required services already implemented elsewhere.
976 (Notify_Exception): Delete body, import __gnat_error_handler instead.
977 (Initialize): Add SA_SIGINFO to the sa_flags, to get the sigcontext
978 argument passed to the handler, which we need for ZCX propagation
981 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
983 * adaint.h, adaint.c (__gnat_current_time_string): New routine.
985 * g-timsta.adb, g-timsta.ads: New files.
987 2008-04-08 Robert Dewar <dewar@adacore.com>
989 * a-except-2005.ads, a-except-2005.adb, a-except.ads, a-except.adb
990 (Raise_Exception): In accordance with AI-446, raise CE for Null_Id
991 (Raise_Exception_Always): Fix documentation accordingly
993 2008-04-08 Robert Dewar <dewar@adacore.com>
995 * a-strbou.ads, a-strbou.adb (From_String): New procedure (for use by
998 * sem_ch13.ads (Rep_Item_Too_Late): Document that Stream_Convert sets
1001 2008-04-08 Javier Miranda <miranda@adacore.com>
1002 Robert Dewar <dewar@adacore.com>
1003 Ed Schonberg <schonberg@adacore.com>
1005 * a-tags.adb (Register_Interface_Offset): New subprogram.
1006 (Set_Dynamic_Offset_To_Top): New subprogram (see previous comment).
1007 (To_Predef_Prims_Table_Ptr): Removed.
1008 (Acc_Size): Removed.
1009 (To_Acc_Size): Removed.
1010 (Parent_Size): Modified to the call the subprogram returning the size of
1011 the parent by means of the new TSD component Size_Func.
1013 * a-tags.ads (Offset_To_Top_Ptr): New access type declaration.
1014 (DT_Offset_To_Top_Offset): New constant value that is used to generate
1015 code referencing the Offset_To_Top component of the dispatch table's
1017 (Prim_Ptr): New declaration of access to procedure. Used to avoid the
1018 use of 'address to initialize dispatch table slots.
1019 (Size_Func): New component of the TSD. Used by the run-time to call the
1020 size primitive of the tagged type.
1022 * checks.adb (Apply_Access_Check): Avoid check when accessing the
1023 Offset_To_Top component of a dispatch table.
1024 (Null_Exclusion_Static_Checks): If the non-null access type appears in a
1025 deferred constant declaration. do not add a null expression, to prevent
1026 spurious errors when full declaration is analyzed.
1027 (Apply_Discriminant_Check): If both discriminant constraints share a
1028 node which is not static but has no side effects, do not generate a
1029 check for that discriminant.
1030 (Generate_Index_Checks): Set Name_Req to true in call to duplicate
1031 subexpr, since the prefix of an attribute is a name.
1033 * checks.ads: Fix nit in comment.
1035 * exp_ch3.ads, exp_ch3.adb (Freeze_Record_Type): Do not add the spec
1036 and body of predefined primitives in case of CPP tagged type
1038 (Freeze_Type): Deal properly with no storage pool case
1039 (Make_Predefined_Primitive_Specs): Generate specification of abstract
1040 primitive Deep_Adjust if a nonlimited interface is derived from a
1042 (Build_Dcheck_Functions): Create discriminant-checking functions only
1043 for variants that have some component(s).
1044 (Build_Slice_Assignment): In expanded code for slice assignment, handle
1045 properly the case where the slice bounds extend to the last value of the
1046 underlying representation.
1047 (Get_Simple_Init_Val): New calling sequence, accomodate Invalid_Value
1048 (Is_Variable_Size_Record): An array component has a static size if
1049 index bounds are enumeration literals.
1051 * exp_disp.adb (Make_DT): Use the first subtype to determine whether
1052 an external tag has been specified for the type.
1053 (Building_Static_DT): Add missing support for private types.
1054 (Make_DT): Add declaration of Parent_Typ to ensure consistent access
1055 to the entity associated with the parent of Typ. This is done to
1056 avoid wrong access when the parent is a private type.
1057 (Expand_Interface_Conversion): Improve error message when the
1058 configurable runtime has no support for dynamic interface conversion.
1059 (Expand_Interface_Thunk): Add missing support to interface types in
1060 configurable runtime.
1061 (Expand_Dispatching_Call): remove obsolete code.
1062 (Make_DT): Replace occurrences of RE_Address by RE_Prim_Ptr, and
1063 ensure that all subtypes and aggregates associated with dispatch
1064 tables have the attribute Is_Dispatch_Table_Entity set to true.
1065 (Register_Primitive): Rename one variable to improve code reading.
1066 Replace occurrences of RE_Addres by RE_Prim_Ptr. Register copy o
1067 of the pointer to the 'size primitive in the TSD.
1069 * rtsfind.ads (RE_DT_Offset_To_Top_Offset): New entity.
1070 (RE_Offset_To_Top_Ptr): New entity.
1071 (RE_Register_Interface_Offset): New entity.
1072 (RE_Set_Dynamic_Offset_To_Top): New entity.
1073 (RE_Set_Offset_To_Top): Removed entity.
1074 (RE_Prim_Ptr): New entity
1075 (RE_Size_Func): New entity
1076 (RE_Size_Ptr): New entity
1077 (RTU_Id): Add Ada_Dispatching and Ada_Dispatching_EDF.
1078 (Ada_Dispatching_Child): Define this new subrange.
1079 (RE_Id): Add new required run-time calls (RE_Set_Deadline, RE_Clock,
1080 RE_Time_Span, and RE_Time_Span_Zero).
1081 (RE_Unit_Table): Add new required run-time calls
1083 * rtsfind.adb (Get_Unit_Name): Add processing for Ada.Dispatching
1086 * exp_atag.ads, exp_atag.adb (Build_Offset_To_Top): New subprogram.
1087 (Build_Set_Static_Offset_To_Top): New subprogram. Generates code that
1088 initializes the Offset_To_Top component of a dispatch table.
1089 (Build_Predef_Prims): Removed.
1090 (Build_Get_Predefined_Prim_Op_Address): Replace call to Predef_Prims by
1092 (Build_Set_Size_Function): New subprogram.
1094 * exp_ch13.adb: Do not generate storage variable for storage_size zero
1095 (Expand): Handle setting/restoring flag Inside_Freezing_Actions
1097 2008-04-08 Robert Dewar <dewar@adacore.com>
1099 * a-ztdeau.adb, a-tideau.adb, a-wtdeau.adb (Puts_Dec): Fix error in
1100 computing Fore when Exp > 0
1102 2008-04-08 Robert Dewar <dewar@adacore.com>
1104 * back_end.adb: Remove Big_String_Ptr declarations (now in Types)
1106 * errout.adb: Remove Big_String_Ptr declarations (now in Types)
1107 Change name Is_Style_Msg to Is_Style_Or_Info_Msg
1109 * fmap.adb: Remove Big_String declarations (now in Types)
1110 (No_Mapping_File): New Boolean global variable
1111 (Initialize): When mapping file cannot be read, set No_Mapping_File to
1113 (Update_Mapping_File): Do nothing if No_Mapping_File is True. If the
1114 tables were empty before adding entries, open the mapping file
1115 with Truncate = True, instead of delete/re-create.
1117 * fname-sf.adb: Remove Big_String declarations (now in Types)
1119 * s-strcom.adb, g-dyntab.ads, g-table.ads, s-carsi8.adb,
1120 s-stalib.ads, s-carun8.adb: Add zero size Storage_Size clauses for
1123 * table.ads: Add for Table_Ptr'Storage_Size use 0
1125 * types.ads: Add Big_String declarations
1126 Add Size_Clause of zero for big pointer types
1128 2008-04-08 Vincent Celier <celier@adacore.com>
1130 * clean.adb (Parse_Cmd_Line): Recognize switch --subdirs=
1131 (Usage): Add line for switch --subdirs=
1132 Add new switch -eL, to follow symbolic links when processing project
1135 * gnatcmd.adb: Process switches -eL and --subdirs=
1136 (Non_VMS_Usage): Output "gnaampcmd" instead of "gnat", and call
1137 Program_Name to get proper tool names when AAMP_On_Target is set.
1138 (Gnatcmd): Call Add_Default_Search_Dirs and Get_Target_Parameters to get
1139 AAMP_On_Target set properly for use of GNAAMP tools (this is needed by
1140 Osint.Program_Name).
1142 * gnatname.adb: (Scan_Args): Recognize switches -eL and --subdirs=
1143 (Usage): Add lines for switches -eL and --subdirs=
1145 * makeusg.adb: Add line for switch --subdirs=
1148 (Source_Data): New Boolean component Compiled, defaulted to True
1149 (Empty_File_Name: New global variable in private part, initialized in
1150 procedure Initialize.
1151 (Subdirs_Option): New constant string
1152 (Subdirs): New String_Ptr global variable
1153 (Language_Config): New component Include_Compatible_Languages
1154 (Project_Qualifier): New type for project qualifiers
1155 (Project_Data): New component Qualifier
1156 (Project_Configuration): New component Archive_Builder_Append_Option
1158 * prj-nmsc.adb (Get_Unit_Exceptions): When a unit is already in
1159 another imported project indicate the name of this imported project.
1160 (Check_File): When a unit is in two project files, indicate the project
1161 names and the paths of the source files for each project.
1162 (Add_Source): Set Compiled to False if compiler driver is empty. Only
1163 set object, dependency and switches file names if Compiled is True.
1164 (Process_Compiler): Allow the empty string for value of attribute Driver
1165 (Get_Directories): When Subdirs is not null and Object_Dir is not
1166 specified, locate and create if necessary the actual object dir.
1167 (Locate_Directory): When Subdirs is not empty and Create is not the
1168 empty string, locate and create if necessary the actual directory
1169 as a subdirectory of directory Name.
1170 (Check_Library_Attributes.Check_Library): Allow a project where the only
1171 "sources" are header files of file based languages to be imported by
1172 library projects, in multi-language mode (gprbuild).
1173 (Check_Library_Attributes.Check_Library): In multi-language mode
1174 (gprbuild), allow a library project to import a project with no
1175 sources, even when this is not declared explicitly.
1176 (Check_If_Externally_Built): A virtual project extending an externally
1177 built project is also externally built.
1178 (Check_Library_Attributes): For a virtual project extending a library
1179 project, inherit the library directory.
1180 (Process_Project_Level_Array_Attributes): Process new attribute
1181 Inherit_Source_Path.
1182 For projects with specified qualifiers "standard", "library" or
1183 "abstract", check that the project conforms to the qualifier.
1184 (Process_Project_Level_Simple_Attributes): Process new attribute
1185 Archive_Builder_Append_Option.
1187 * switch-m.adb: (Scan_Make_Switches): Process switch --subdirs=
1188 (Normalize_Compiler_Switches): Only keep compiler switches that are
1189 passed to gnat1 by the gcc driver and that are stored in the ALI file
1191 Do not take into account switc -save-temps
1193 * makegpr.adb (Compile_Link_With_Gnatmake): Transmit switch -eL if
1194 gprmake is called with -eL.
1195 (Scan_Arg): Recognize switch -eL
1196 (Usage): Add line for switch -eL
1198 * prj.adb (Initialize): Initialize Empty_File_Name
1199 (Project_Empty): New component Qualifier
1201 * prj-attr.ads, prj-attr.adb: New project level attribute
1202 Inherit_Source_Path.
1203 New project level attribute Archive_Builder_Append_Option
1205 * prj-dect.adb: Replace System.Strings by GNAT.Strings.
1207 * prj-ext.adb (Initialize_Project_Path): In Multi_Language mode, add
1208 <prefix>/lib/gnat in the project path, after <prefix>/share/gpr, for
1209 upward compatibility.
1211 * prj-part.adb (Project_Path_Name_Of.Try_Path): In high verbosity, put
1212 each Trying ..." on different lines.
1213 (Parse_Single_Project): Recognize project qualifiers. Fail in qualifier
1214 is "configuration" when not in configuration. Fail when in configuration
1215 when a specified qualifier is other than "configuration".
1217 * prj-proc.adb (Process_Declarative_Items): Link new elements of copied
1218 full associative array together.
1219 (Recursive_Process): Put the project qualifier in the project data
1221 * prj-tree.ads, prj-tree.adb: (Project_Qualifier_Of): New function
1222 (Set_Project_Qualifier_Of): New procedure
1224 2008-04-08 Robert Dewar <dewar@adacore.com>
1226 * errout.ads: Update comments for new handling of info: messages
1228 * erroutc.adb (Matches): New procedure
1229 (Warning_Specifically_Suppressed): Modified to handle multiple * chars
1230 (Is_Style_Or_Info_Msg): New name for Is_Style_Msg, now set for
1231 info messages as well as style messages.
1233 * erroutc.ads: Remove unneeded fields from Specific_Warning_Entry
1235 * sem_elab.adb (Supply_Bodies): Create actual bodies for stubbed
1237 (Check_A_Call): Special "info: " warnings now have ? in the text
1238 (Elab_Warning): Use info message in static case
1240 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1242 * exp_aggr.adb (Static_Array_Aggregate): Use Max_Aggr_Size to determine
1243 whether an array aggregate with static bounds and scalar components
1244 should be expanded into a static constant.
1246 2008-04-08 Gary Dismukes <dismukes@adacore.com>
1247 Ed Schonberg <schonberg@adacore.com>
1248 Robert Dewar <dewar@adacore.com>
1250 * sem_cat.adb (Validate_RCI_Subprogram_Declaration): Add tests of
1251 Has_Stream_Attribute_ Definition when checking for available stream
1252 attributes on parameters of a limited type in Ada 2005. Necessary for
1253 proper recognition of visible stream attribute clauses.
1254 (Has_Stream_Attribute_Definition): If the type is derived from a
1255 private type, then use the derived type's underlying type for checking
1256 whether it has stream attributes.
1257 (Validate_Object_Declaration): The check for a user-defined Initialize
1258 procedure applies also to types with controlled components or a
1259 controlled ancestor.
1260 Reject an object declaration in a preelaborated unit if the type is a
1261 controlled type with an overriding Initialize procedure.
1262 (Validate_Remote_Access_To_Class_Wide_Type): Return without further
1263 checking when the parent of a dereference is a selected component and
1264 the name has not been analyzed.
1266 * sem_ch4.adb (Analyze_Selected_Component): Add checking for selected
1267 prefixes that are invalid explicit dereferences of remote
1268 access-to-class-wide values, first checking whether the selected
1269 component is a prefixed form of call to a tagged operation.
1270 (Analyze_Call): Remove code that issues an error for limited function
1271 calls in illegal contexts, as we now support all of the contexts that
1272 were forbidden here.
1273 Allow a function call that returns a task.and appears as the
1274 prefix of a selected component.
1275 (Analyze_Reference): Give error message if we try to make a 'Reference
1276 for an object that is atomic/aliased without its type having the
1277 corresponding attribute.
1278 (Analyze_Call): Remove condition checking for attributes to allow
1279 calls to functions with inherently limited results as prefixes of
1280 attributes. Remove related comment about Class attributes.
1281 (Analyze_Selected_Component): If the prefix is a remote type, check
1282 whether this is a prefixed call before reporting an error.
1283 (Complete_Object_Operation): If the controlling formal is an access to
1284 variable reject an actual that is a constant or an access to one.
1285 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
1286 primitive operations from base type.
1288 * exp_ch4.adb (Expand_N_Indexed_Component): Test for prefix that is a
1290 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
1291 (Expand_N_Selected_Component): Test for prefix that is a build-in-place
1292 function call and call Make_Build_In_Place_Call_In_Anonymous_Context.
1293 (Expand_N_Slice): Test for prefix that is a build-in-place function call
1294 and call Make_Build_In_Place_Call_In_Anonymous_Context.
1295 (Analyze_Call): Remove code that issues an error for limited function
1296 calls in illegal contexts, as we now support all of the contexts that
1297 were forbidden here.
1298 New calling sequence for Get_Simple_Init_Val
1299 (Expand_Boolean_Operator): Add call to Silly_Boolean_Array_Xor_Test
1300 (Expand_N_Op_Not): Add call to Silly_Boolan_Array_Not_Test
1302 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1303 Ed Schonberg <schonberg@adacore.com>
1304 Robert Dewar <dewar@adacore.com>
1306 * exp_ch2.adb: Minor reformatting.
1307 (Expand_Entry_Index_Parameter): Set the type of the identifier.
1308 (Expand_Entry_Reference): Add call to Expand_Protected_Component.
1309 (Expand_Protected_Component): New routine.
1310 (Expand_Protected_Private): Removed.
1311 Add Sure parameter to Note_Possible_Modification calls
1313 * sem_ch12.ads, sem_ch12.adb (Analyze_Subprogram_Instantiation): The
1314 generated subprogram declaration must inherit the overriding indicator
1315 from the instantiation node.
1316 (Validate_Access_Type_Instance): If the designated type of the actual is
1317 a limited view, use the available view in all cases, not only if the
1318 type is an incomplete type.
1319 (Instantiate_Object): Actual is illegal if the formal is null-excluding
1320 and the actual subtype does not exclude null.
1321 (Process_Default): Handle properly abstract formal subprograms.
1322 (Check_Formal_Package_Instance): Handle properly defaulted formal
1323 subprograms in a partially parameterized formal package.
1324 Add Sure parameter to Note_Possible_Modification calls
1325 (Validate_Derived_Type_Instance): if the formal is non-limited, the
1326 actual cannot be limited.
1327 (Collect_Previous_Instances): Generate instance bodies for subprograms
1330 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case Small): Don't
1332 Add Sure parameter to Note_Possible_Modification calls
1333 (Analyze_At_Clause): Preserve Comes_From_Source on Rewrite call
1334 (Analyze_Attribute_Definition_Clause, case Attribute_Address): Check for
1335 constant overlaid by variable and issue warning.
1336 Use new Is_Standard_Character_Type predicate
1337 (Analyze_Record_Representation_Clause): Check that the specified
1338 Last_Bit is not less than First_Bit - 1.
1339 (Analyze_Attribute_Definition_Clause, case Address): Check for
1340 self-referential address clause
1342 * sem_ch5.ads, sem_ch5.adb (Diagnose_Non_Variable_Lhs): Rewrite the
1343 detection mechanism when the lhs is a prival.
1344 (Analyze_Assignment): Call Check_Unprotected_Access to detect
1345 assignment of a pointer to protected data, to an object declared
1346 outside of the protected object.
1347 (Analyze_Loop_Statement): Check for unreachable code after loop
1348 Add Sure parameter to Note_Possible_Modication calls
1349 Protect analysis from previous syntax error such as a scope mismatch
1351 (Analyze_Assignment_Statement): The assignment is illegal if the
1352 left-hand is an interface.
1354 * sem_res.ads, sem_res.adb (Resolve_Arithmetic_Op): For mod/rem check
1355 violation of restriction No_Implicit_Conditionals
1356 Add Sure parameter to Note_Possible_Modication calls
1357 Use new Is_Standard_Character_Type predicate
1358 (Make_Call_Into_Operator): Preserve Comes_From_Source when rewriting
1359 call as operator. Fixes problems (e.g. validity checking) which
1360 come from the result looking as though it does not come from source).
1361 (Resolve_Call): Check case of name in named parameter if style checks
1363 (Resolve_Call): Exclude calls to Current_Task as entry formal defaults
1364 from the checking that such calls should not occur from an entry body.
1365 (Resolve_Call): If the return type of an Inline_Always function
1366 requires the secondary stack, create a transient scope for the call
1367 if the body of the function is not available for inlining.
1368 (Resolve_Actuals): Apply Ada2005 checks to view conversions of arrays
1369 that are actuals for in-out formals.
1370 (Try_Object_Operation): If prefix is a tagged protected object,retrieve
1371 primitive operations from base type.
1372 (Analyze_Selected_Component): If the context is a call to a protected
1373 operation the parent may be an indexed component prior to expansion.
1374 (Resolve_Actuals): If an actual is of a protected subtype, use its
1375 base type to determine whether a conversion to the corresponding record
1377 (Resolve_Short_Circuit): Handle pragma Check
1379 * sem_eval.adb: Minor code reorganization (usea Is_Constant_Object)
1380 Use new Is_Standard_Character_Type predicate
1381 (Eval_Relational_Op): Catch more cases of string comparison
1383 2008-04-08 Robert Dewar <dewar@adacore.com>
1384 Gary Dismukes <dismukes@adacore.com>
1386 * s-rident.ads: Add No_Default_Initialization restriction
1389 (Has_Non_Null_Base_Init_Proc): Handle No_Default_Initialization case
1390 (Set_TSS): Handle No_Default_Initialization case
1392 * exp_ch6.adb (Expand_N_Subprogram_Body): Handle restriction
1393 No_Default_Initialization
1394 (Expand_N_Subprogram_Body): Remove redundant initialization of out
1395 parameters when Normalize_Scalars is active.
1396 (Add_Final_List_Actual_To_Build_In_Place_Call): Add formal Sel_Comp
1397 Fix casing error in formal parameter name in call
1398 (Register_Predefined_DT_Entry): Replace occurrences of RE_Address by
1399 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
1400 dispatching call on VM targets.
1402 2008-04-08 Gary Dismukes <dismukes@adacore.com>
1403 Thomas Quinot <quinot@adacore.com>
1405 * exp_ch7.adb (Find_Final_List): Change the test for generating a
1406 selected component from an access type's Associated_Final_Chain to
1407 check for the presence of that field, rather than assuming it exists
1408 for all named access types.
1409 (Make_Clean): New formal Chained_Cleanup_Action allowing to specify a
1410 procedure to call at the end of the generated cleanup procedure.
1411 (Expand_Cleanup_Actions): When a new cleanup procedure is generated, and
1412 and an At_End_Proc already exists in the handled sequence of statements
1413 for which cleanup actions are being expanded, the original cleanup
1414 action must be preserved.
1416 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1417 Ed Schonberg <schonberg@adacore.com>
1418 Robert Dewar <dewar@adacore.com>
1419 Gary Dismukes <dismukes@adacore.com>
1421 * exp_ch9.ads, exp_ch9.adb (Build_Protected_Entry,
1422 Build_Unprotected_Subprogram_Body): Generate debug info for
1423 declarations related to the handling of private data in task and
1425 (Debug_Private_Data_Declarations): New subprogram.
1426 (Install_Private_Data_Declarations): Remove all debug info flagging.
1427 This is now done by Debug_Private_Data_Declarations at the correct
1429 (Build_Simple_Entry_Call): If the task name is a function call, expand
1430 the prefix into an object declaration, and make the surrounding block a
1432 (Build_Master_Entity): An internal block is a master if it wraps a call.
1433 Code reformatting, update comments. Code clean up.
1434 (Make_Task_Create_Call): Use 'Unrestricted_Access instead of 'Address.
1435 (Replicate_Entry_Formals): If the formal is an access parameter or
1436 anonymous access to subprogram, copy the original tree to create new
1437 entities for the formals of the subprogram.
1438 (Expand_N_Task_Type_Declaration): Create a Relative_Deadline variable
1439 for tasks to store the value passed using pragma Relative_Deadline.
1440 (Make_Task_Create_Call): Add the Relative_Deadline argument to the
1441 run-time call to create a task.
1442 (Build_Wrapper_Spec): If the controlling argument of the interface
1443 operation is an access parameter with a non-null indicator, use the
1444 non-null indicator on the wrapper.
1446 * sem_ch9.adb (Analyze_Protected_Type): Only retrieve the full view when
1447 present, which it may not be in the case where the type entity is an
1448 incomplete view brought in by a limited with.
1449 (Analyze_Task_Type): Only retrieve the full view when present, which it
1450 may not be in the case where the type entity is an incomplete view brought
1451 in by a limited with.
1452 (Analyze_Protected_Definition): Set Is_Frozen on all itypes generated for
1453 private components of a protected type, to prevent the generation of freeze
1454 nodes for which there is no proper scope of elaboration.
1456 * exp_util.ads, exp_util.adb
1457 (Remove_Side_Effects): If the expression is a function call that returns a
1458 task, expand into a declaration to invoke the build_in_place machinery.
1459 (Find_Protection_Object): New routine.
1460 (Remove_Side_Effects): Also make a copy of the value
1461 for attributes whose result is of an elementary type.
1462 (Silly_Boolean_Array_Not_Test): New procedure
1463 (Silly_Boolean_Array_Xor_Test): New procedure
1464 (Is_Volatile_Reference): New function
1465 (Remove_Side_Effects): Use Is_Volatile_Reference
1466 (Possible_Bit_Aligned_Component): Handle slice case properly
1468 * exp_pakd.adb (Expand_Packed_Not): Move silly true/true or false/false
1469 case test to Exp_Util
1470 (Expand_Packed_Xor): Move silly true/true case test to Exp_Util
1472 2008-04-08 Thomas Quinot <quinot@adacore.com>
1474 * exp_dist.ads, exp_dist.adb: Fix casing error in formal parameter name
1476 (Add_RACW_Features): When processing an RACW in another unit than the
1477 main unit, set Body_Decls to No_List to indicate that the bodies of
1478 the type's TSS must not be generated.
1479 (GARLIC_Support.Add_RACW_Read_Attribute,
1480 GARLIC_Support.Add_RACW_Write_Attribute): Do not generate bodies if
1481 Body_Decls is No_List.
1482 (PolyORB_Support.Add_RACW_Read_Attribute,
1483 PolyORB_Support.Add_RACW_Write_Attribute,
1484 PolyORB_Support.Add_RACW_From_Any,
1485 PolyORB_Support.Add_RACW_To_Any,
1486 PolyORB_Support.Add_RACW_TypeCode): Same.
1487 (Transmit_As_Unconstrained): New function.
1488 (Build_Ordered_Parameters_List): Use the above to order parameters.
1489 (GARLIC_Support.Build_General_Calling_Stubs):
1490 Use the above to determine which parameters to unmarshall using 'Input
1491 at the point where their temporary is declared (as opposed to later on
1493 (PolyORB_Support.Build_General_Calling_Stubs):
1494 Use the above to determine which parameters to unmarshall using From_Any
1495 at the point where their temporary is declared (as opposed to later on
1496 with an assignment).
1498 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1500 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function): If this is
1501 an Input function for an access type, do not perform default
1502 initialization on the local variable that receives the value, to
1503 prevent spurious warnings when the type is null-excluding.
1505 2008-04-08 Robert Dewar <dewar@adacore.com>
1506 Ed Schonberg <schonberg@adacore.com>
1508 * freeze.adb (Freeze_Entity): Improve warnings on access types in pure
1510 (Size_Known): Generic formal scalar types have known at compile
1511 time size, so remove check.
1512 Fix casing error in formal parameter name in call
1513 (Freeze_Subprogram): If the subprogram is a user-defined operator,
1514 recheck its overriding indication.
1516 2008-04-08 Vincent Celier <celier@adacore.com>
1518 * gnat1drv.adb: Send all messages indicating an error to standard error
1520 2008-04-08 Robert Dewar <dewar@adacore.com>
1522 * gnatbind.adb (Restriction_Could_Be_Set): New procedure
1523 (List_Applicable_Restrictions): Do not list existing restrictions
1525 2008-04-08 Thomas Quinot <quinot@adacore.com>
1527 * g-socket.ads, g-socket.adb: Improve documentation of GNAT.Sockets:
1528 add a pointer to generic sockets literature
1529 do not mention that the given example is "typical" usage.
1530 Remove obsolete comment about multicast not being supported on Windows.
1531 (Connect_Socket): Make Server mode IN rather than IN OUT
1532 since this formal is never modified.
1534 2008-04-08 Robert Dewar <dewar@adacore.com>
1536 * sprint.adb (Write_Itype): Handle Itypes whose Parent field points to
1537 the declaration for some different entity.
1538 (Sprint_Node_Actual, case N_Derived_Type_Definition): When an interface
1539 list is precent (following the parent subtype indication), display
1540 appropriate "and" keyword.
1542 * itypes.adb: Remove unnecessary calls to Init_Size_Align and Init_Esize
1543 Remove unnecessary calls to Init_Size_Align and Init_Esize.
1544 Add notes on use of Parent field of an Itype
1546 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1547 Robert Dewar <dewar@adacore.com>
1548 Gary Dismukes <dismukes@adacore.com>
1550 * lib-xref.adb (Is_On_LHS): Remove dead code
1551 (Output_Overriden_Op): If the overridden operation is itself inherited,
1552 list the ancestor operation, which is the one whose body or absstract
1553 specification is actually being overridden. For source navigation
1556 * sem_ch7.adb (Is_Primitive_Of): use base type to determine whether
1557 operation is primitive for the type.
1558 (Declare_Inherited_Private_Subprograms): If the new operation overrides
1559 an inherited private subprogram, set properly the Overridden_Operation
1560 attribute, for better cross-reference information.
1561 (Analyze_Package_Specification): Do late analysis of spec PPCs
1562 (Install_Private_Declaration, Uninstall_Declarations): Save/restore
1563 properly the full view and underlying full views of a private type in a
1564 child unit, whose full view is derived from a private type in a parent
1565 unit, and whose own full view becomes visible in the child body.
1567 * sem_disp.adb (Check_Dispatching_Operation): When a body declares a
1568 primitive operation after the type has been frozen, add an explicit
1569 reference to the type and the operation, because other primitive
1570 references have been emitted already.
1571 (Expand_Call, Propagate_Tag): Call Kill_Current_Values when processing a
1572 dispatching call on VM targets.
1574 2008-04-08 Vincent Celier <celier@adacore.com>
1575 Thomas Quinot <quinot@adacore.com>
1577 * make.adb: (Gnatmake_Called): Remove, no longer necessary
1578 (Compile_Surces): Call Delete_Temp_Config_Files only if Gnatmake_Called
1579 is True and Debug_Flag_N is False. Debug_Flag_N means "keep temp files".
1580 (Insert_Project_Sources): Take into account index in multi-unit source
1582 After building a library project, delete all temporary files.
1583 (Initialize): Reset current output after parsing project file.
1584 (Collect_Arguments_And_Compile): Never insert in the queue the sources
1585 of library projects that are externally built.
1586 Put file name in error and inform messages if -df is used
1587 (Display): If invoked with -d7, do not display path names, but only
1590 * makeutl.ads (Path_Or_File_Name): New function
1591 (Path_Or_File_Name): New function
1593 2008-04-08 Arnaud Charlet <charlet@adacore.com>
1595 * Make-lang.in: Disable warnings during first stage of bootstrap
1597 Update dependencies.
1599 2008-04-08 Vincent Celier <celier@adacore.com>
1601 * mlib-prj.adb (Build_Library): Compare with ALI file name in canonical
1602 case to decide if ALI object file is included in library.
1603 (Build_Library): Never attempt to build a library if the project is
1606 2008-04-08 Thomas Quinot <quinot@adacore.com>
1608 * nlists.adb (Is_Non_Empty_List): Remove redundant test. First
1609 (No_List) is defined to return Empty.
1611 2008-04-08 Jose Ruiz <ruiz@adacore.com>
1613 * osint.ads, osint.adb (Get_Libraries_From_Registry): Improve
1616 (Read_Default_Search_Dirs): Do not consider spaces as path separators
1617 because spaces may be part of legal paths.
1619 2008-04-08 Robert Dewar <dewar@adacore.com>
1621 * par-ch11.adb (P_Exception_Handler): Check indentation level for
1624 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1626 * par-ch3.adb (P_Type_Declaration) Reject the keyword "synchronized"
1627 in a type declaration, if this is not an interface declaration or
1628 private type extension.
1630 2008-04-08 Vincent Celier <celier@adacore.com>
1632 * prj-util.adb (Executable_Of): New String parameter Language. When
1633 Ada_Main is False and Language is not empty, attempt to remove the body
1634 suffix or the spec suffix of the language to get the base of the
1635 executable file name.
1636 (Put): New Boolean parameter Lower_Case, defauilted to False. When
1637 Lower_Case is True, put the value in lower case in the name list.
1638 (Executable_Of): If there is no executable suffix in the configuration,
1639 then do not modify Executable_Extension_On_Target.
1641 * prj-util.ads (Executable_Of): New String parameter Language,
1642 defaulted to the empty string.
1643 (Put): New Boolean parameter Lower_Case, defauilted to False
1645 2008-04-08 Robert Dewar <dewar@adacore.com>
1647 * scng.adb (Scan_Identifier): Handle case of identifier starting with
1648 wide character using UTF-8 encoding.
1650 2008-04-08 Javier Miranda <miranda@adacore.com>
1652 * sem.adb (Analyze): Consider case in which we analyze an empty node
1653 that was generated by a call to a runtime function that is not
1654 available under the configurable runtime.
1656 * sem.ads (Inside_Freezing_Actions): New flag.
1657 (Save_Check_Policy_List): New field in scope stack entry
1659 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1660 Robert Dewar <dewar@adacore.com>
1662 * sem_aggr.adb (Analyze_N_Extension_Aggregate): Add legality checks for
1663 the ancestor part of an extension aggregate for a limited type.
1664 (Resolve_Array_Aggregate): Issue warning for sliding of aggregate with
1665 enumeration index bounds.
1666 (Resolve_Array_Aggregate): Add circuit for diagnosing missing choices
1667 when array is too short.
1668 (Check_Expr_OK_In_Limited_Aggregate): Move function
1669 Check_Non_Limited_Type from Resolve_Record_Aggregate to top level (and
1671 (Resolve_Array_Aggregate.Resolve_Aggr_Expr):
1672 Check_Expr_OK_In_Limited_Aggregates called to check for illegal limited
1673 component associations.
1674 (Check_Non_Limited_Type): Moved to outer level and renamed.
1675 (Resolve_Record_Aggregate): In an extension aggregate, an association
1676 with a box initialization can only designate a component of the
1677 extension, not a component inherited from the given ancestor
1679 * sem_case.adb: Use new Is_Standard_Character_Type predicate
1681 2008-04-08 Robert Dewar <dewar@adacore.com>
1683 * s-imgdec.adb (Set_Decimal_Digits): Fix error when input is zero with
1685 (Set_Decimal_Digits): Properly handle Aft=0 (equivalent to Aft=1)
1686 Properly handle case where Aft > Scale and input number is less than
1689 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1691 * s-stoele.ads, s-soflin.ads: Move the location of
1692 Dummy_Communication_Block from System.Storage_Elements to
1695 * s-tpobop.ads: Add comment on usage of Dummy_Communication_Block to
1696 emulate Communication_Block in certain scenarios.
1698 2008-04-08 Hristian Kirtchev <kirtchev@adacore.com>
1700 * s-strxdr.adb, s-stratt.ads, s-stratt.adb (Block_IO_OK): New
1702 Add new subtype S_WWC, unchecked conversion routines From_WWC and
1704 (I_WWC, O_WWC): New routines for input and output of
1705 Wide_Wide_Character.
1707 2008-04-08 Robert Dewar <dewar@adacore.com>
1709 * stringt.adb (Write_String_Table_Entry): Handle wide characters
1712 2008-04-08 Robert Dewar <dewar@adacore.com>
1714 * styleg.adb (Check_Comment): Allow special char after -- in
1715 non-end-of-line case
1717 2008-04-08 Robert Dewar <dewar@adacore.com>
1719 * stylesw.adb: Implement -gnaty + - y options
1720 (Set_GNAT_Style_Check_Options): Includ I in style check string
1722 * stylesw.ads: Add comments for new style switch options
1724 2008-04-08 Sergey Rybin <rybin@adacore.com>
1726 * tree_io.ads: Increase ASIS_Version_Number because of adding Sem_Aux
1727 to the set of the GNAT components needed by ASIS.
1729 2008-04-08 Bob Duff <duff@adacore.com>
1731 * types.h: Change CE_Null_Exception_Id to the correct value (8, was 9).
1733 2008-04-08 Tristan Gingold <gingold@adacore.com>
1735 * vxaddr2line.adb: Use Unsigned_32 instead of Integer for address type.
1736 Improve error message generation.
1738 2008-04-08 Vincent Celier <celier@adacore.com>
1740 * a-direct.adb (Start_Search): Check for Name_Error before checking for
1741 Use_Error, as specified in the RM. Check if directory is open and raise
1742 Use_Error if it is not.
1744 2008-04-08 Vincent Celier <celier@adacore.com>
1745 Robert Dewar <dewar@adacore.com>
1747 * vms_conv.adb (Output_Version): Print "GNAAMP" instead of "GNAT when
1748 AAMP_On_Target is set.
1750 * vms_data.ads: Add NOxxx to style check switch list
1751 Add entry COMPONENTS for -gnatVe
1752 Add VMS qualifiers for -eL (/FOLLOW_LINKS_FOR_FILES) and --subdirs=
1754 (GCC_Switches): Add /ALL_BACK_END_WARNINGS.
1755 Add qualifiers for gnatmetric coupling options
1756 Add note that -gnata enables all checks
1757 Add entries [NO]PARAMETER_ORDER for -gnatw.p[P]
1758 Fix inconsistency for VMS qualifier for the gnatpp '-rnb' option
1759 New warning flag -gnatw.e
1761 * usage.adb: Add entries for -gnaty+ -gnaty- -gnatyy
1762 Add entry for -gnatyN (forgotten before)
1763 Line for new warning switch -gnatw.p
1764 New warning flag -gnatw.e
1766 * gnat_ugn.texi: Add documentation fpr project file switch -aP
1767 Document -gnaty - + y
1768 Replace occurences of "package specification" with "package spec"
1769 Define preprocessing symbols in documentation of gnatprep
1770 Clarify reason for distinguishing overflow checking
1771 Add documentation for project-aware tool switches -eL and --subdirs=
1772 Complete list of configuration pragmas
1773 Specify that, even when gnatmake switch -x is used, mains on the command
1774 line need to be sources of project files.
1775 Editing of gnatcheck/gnatmetric doc.
1776 Add documentation for -gnatw.p/-gnatw.P
1777 Add missing documentation for -fno-inline-functions.
1778 Add documentation for -gnatw.e
1780 * gnat_rm.texi: Add documentation for No_Default_Initialization
1781 Replace occurences of "package specification" with "package spec"
1782 Document use of * in Warnings Off string
1783 Update documentation of alignment/component clauses.
1784 Add documentation for Invalid_Value
1785 Document new consistency rule for Optimize_Alignment
1786 Add documentation for Precondition and Postcondition pragmas
1787 Add documentation for Check and Check_Policy pragmas
1788 Document new Enum_Val attribute
1789 Remove requirement for static string in pragma Assert
1790 Add documentation on GNAT.Time_Stamp
1792 * ug_words: add entry for -gnatVe
1793 Add entries for -gnat.p[P] /WARNINGS=[NO]PARAMETER_ORDER
1794 Add entry for -gnatw.e
1796 * debug.adb: Add missing documentation for d.a flag
1797 Document new -gnatd.a switch.
1798 Add documentation for new gnatmake debug switch -df
1800 2008-04-08 Thomas Quinot <quinot@adacore.com>
1802 * gen-soccon.c: Bump year in copyright notices.
1804 * g-soccon-vxworks.ads: Add new constant IP_PKTINFO
1806 2008-04-08 Eric Botcazou <ebotcazou@adacore.com>
1808 * ctrl_c.c: Improve handling of ctrl-c on LynxOS and Windows.
1811 2008-04-08 Robert Dewar <dewar@adacore.com>
1812 Bob Duff <duff@adacore.com>
1814 * impunit.adb: Add Interfaces.Java.JNI, System.Strings.Stream_Ops,
1815 Ada.Calendar.Conversions, Ada.Dispatching.EDF, GNAT.Time_Stamp
1817 * s-intman-mingw.adb: Minor comment fix -- spell 'explicitly' correctly
1819 * g-trasym.adb: Minor comment fix -- spell 'explicitly' correctly
1821 * g-trasym.ads: Minor comment improvements
1823 * s-stalib.adb: Minor comment fix -- spell 'explicitly' correctly
1825 * a-sequio.ads, a-direio.ads: improve message for tagged type
1827 * a-strunb.ads: Minor reformatting
1829 * a-tifiio.adb: Minor reformatting
1831 * atree.adb (Fix_Parents): Use clearer names for formals
1832 Cleanup and simplify code
1833 Use named notation in calls
1835 * exp_fixd.adb (Do_Multiply_Fixed_Universal): Use named notation in
1838 * uintp.adb: Used named notation for some confusing calls
1840 * bindusg.adb: Minor change in one line of output
1842 * cstand.adb: Minor reformatting of src representation of Standard
1844 * a-assert.ads: Add comment.
1846 * g-decstr.adb: Fix bad indentation
1848 * expander.ads, expander.adb: Code clean up.
1850 * sem_dist.ads: Minor comment improvement
1852 * sem_type.adb, g-dirope.ads, g-exctra.ads, s-valwch.adb,
1853 s-wchstw.adb, targparm.ads, widechar.adb: Minor reformatting
1855 * i-cstrin.adb: Fix casing error in formal parameter name in call
1857 2008-04-08 Ed Schonberg <schonberg@adacore.com>
1859 * binde.adb (Gather_All_Links, Gather_Dependencies): units that are
1860 mentioned in limited_with_clauses to do create semantic dependencies
1861 even though they appear in the ali file.
1863 2008-04-08 Emmanuel Briot <briot@adacore.com>
1865 * g-comlin.ads, g-comlin.adb (Expansion): Remove unreachable return
1867 (Get_Configuration): New subprogram.
1869 * prj-pp.ads, prj-pp.adb (Pretty_Print): new parameters Id and Id_Tree
1870 These optional parameters help preserve the casing of the project's name
1871 when pretty-printing.
1873 2008-04-08 Jerome Lambourg <lambourg@adacore.com>
1874 Arnaud Charlet <charlet@adacore.com>
1876 * bindgen.adb (Gen_Adainit_Ada): If the main program is a CIL function,
1877 then use __gnat_set_exit_status to report the returned status code.
1879 * comperr.adb (Compiler_Abort): Convert most bug boxes into clean error
1880 messages on .NET, since some constructs of the language are not
1883 * gnatlink.adb (Gnatlink): In case the command line is too long for the
1884 .NET linker, gnatlink now concatenate all .il files and pass this to
1887 2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
1888 Xavier Grave <grave@ipno.in2p3.fr>
1890 * Makefile.in: Add make ifeq define for mips/mipsel support.
1891 * g-soccon-linux-mips.ads, system-linux-mipsel.ads,
1892 system-linux-mips.ads: New files.
1894 2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
1896 * sysdep.c: add __GLIBC__ to the #ifdef preprocessor macros to
1897 detect systems using GNU libc.
1903 2008-04-07 Aurelien Jarno <aurelien@aurel32.net>
1905 * s-osinte-linux-kfreebsd.ads (SC_NPROCESSORS_ONLN): New
1906 constant constant for sysconf call.
1907 (bit_field): New packed boolean type used by cpu_set_t.
1908 (cpu_set_t): New type corresponding to the C type with
1909 the same name. Note that on the Ada side we use a bit
1910 field array for the affinity mask. There is not need
1911 for the C macro for setting individual bit.
1912 (pthread_setaffinity_np): New imported routine.
1913 * Makefile.in: Use s-tasinf-linux.ads and s-tasinf-linux.adb
1916 2008-04-07 Eric Botcazou <ebotcazou@adacore.com>
1918 * utils2.c (build_binary_op): Fold ARRAY_REF and ARRAY_RANGE_REF too.
1920 2008-04-07 Eric Botcazou <ebotcazou@adacore.com>
1922 * gigi.h (create_subprog_type): Remove returns_with_dsp parameter.
1923 * decl.c (gnat_to_gnu_entity): Adjust for above new prototype.
1924 * utils.c (create_subprog_type): Remove returns_with_dsp parameter.
1925 * trans.c (gnat_to_gnu) <N_Return_Statement>: Remove code dealing with
1926 Return by Depressed Stack Pointer.
1928 2008-04-06 Eric Botcazou <ebotcazou@adacore.com>
1930 * decl.c (is_variable_size): Do not unconditionally return false
1931 on non-strict alignment platforms.
1933 2008-04-06 Eric Botcazou <ebotcazou@adacore.com>
1935 * decl.c (rest_of_type_decl_compilation_no_defer): New local function
1936 used to process all the variants of the specified type.
1937 (gnat_to_gnu_entity): Invoke rest_of_type_decl_compilation for enumeral
1938 types too. Call rest_of_type_decl_compilation_no_defer if undeferring.
1939 (rest_of_type_decl_compilation): Likewise.
1940 * utils.c (gnat_pushdecl): Propagate the name to all variants of type.
1942 2008-04-03 Paolo Bonzini <bonzini@gnu.org>
1944 * gigi.h (insert_block): Kill.
1945 * utils.c (insert_block): Kill.
1947 2008-04-02 Eric Botcazou <ebotcazou@adacore.com>
1949 * decl.c (gnat_to_gnu_entity) <object>: For a constant object whose
1950 type has self-referential size, get the size from the initializing
1951 expression directly if it is also a constant whose nominal type
1952 has self-referential size.
1954 2008-04-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
1957 * g-soccon-darwin.ads: Define new constant IP_PKTINFO.
1960 * env.c: Always include crt_externs.h if __APPLE__ is defined.
1961 (__gnat_setenv): Use setenv instead of putenv if __APPLE__ is defined.
1963 2008-04-01 Andreas Jaeger <aj@suse.de>
1965 * g-soccon-linux-ppc.ads: Add new constants SO_REUSEPORT and
1968 2008-03-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
1970 * g-table.adb, g-tasloc.adb, g-traceb.ads,
1971 g-trasym.adb, g-utf_32.adb, gen-soccon.c, gigi.h, gmem.c,
1972 gnatbind.adb, gnatchop.adb, gnatcmd.adb,
1973 gnatcmd.ads, gnatdll.adb, gnatfind.adb,
1974 gnatlink.adb, gnatmem.adb, gprep.adb,
1975 i-cstrea-vms.adb, i-cstrin.adb, i-pacdec.ads,
1976 i-vxwork.ads, impunit.adb, init.c, initialize.c, inline.adb,
1977 layout.adb, lib-writ.adb, lib-writ.ads, lib-xref.adb,
1978 lib-xref.ads, lib.adb, link.c, live.ads,
1979 make.adb, makegpr.adb, makeutl.adb, math_lib.adb,
1980 mdll-utl.adb, mdll.ads, memroot.adb, memroot.ads,
1981 misc.c, mlib-prj.adb, mlib-tgt-hpux.adb,
1982 mlib-tgt-linux.adb, mlib-tgt-tru64.adb, mlib-tgt.ads,
1983 namet.adb, namet.h, nlists.adb, nlists.ads,
1984 nlists.h, opt.ads, osint-b.ads, osint-c.adb,
1985 osint-c.ads, osint.adb, osint.ads, output.ads,
1986 par-ch10.adb, par-ch12.adb, par-ch2.adb, par-ch3.adb,
1987 par-ch4.adb, par-ch5.adb, par-ch6.adb, par-ch9.adb,
1988 par-endh.adb, par-labl.adb, par-prag.adb,
1989 par-sync.adb, par-tchk.adb, par-util.adb,
1990 par.adb, prep.adb, prep.ads, prepcomp.adb, prj-attr.ads,
1991 prj-dect.adb, prj-env.adb, prj-ext.adb, prj-nmsc.adb,
1992 prj-nmsc.ads, prj-pp.adb, prj-proc.adb,
1993 prj-strt.ads, prj-tree.ads, prj.adb, prj.ads: Fix comment typos.
1995 2008-03-31 Eric Botcazou <ebotcazou@adacore.com>
1997 * decl.c (gnat_to_gnu_entity) <object>: Do not force a non-null
1998 size if it has overflowed.
2000 2008-03-31 Olivier Hainque <hainque@adacore.com>
2001 Eric Botcazou <ebotcazou@adacore.com>
2003 * utils2.c (find_common_type): Document assumption on t1/t2 vs
2004 lhs/rhs. Force use of lhs type if smaller, whatever the modes.
2006 2008-03-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2008 * a-textio.ads, a-witeio.ads, a-ztexio.ads, ali.ads,
2009 einfo.ads, erroutc.adb, erroutc.ads, exp_attr.adb,
2010 exp_imgv.adb, exp_intr.adb, exp_pakd.adb,
2011 exp_pakd.ads, exp_prag.adb, exp_smem.adb,
2012 exp_tss.ads, exp_util.adb, exp_util.ads,
2013 exp_vfpt.adb, freeze.adb, freeze.ads,
2014 frontend.adb, g-alleve.adb, g-altcon.adb,
2015 g-altive.ads, g-alveop.ads, g-alvevi.ads,
2016 g-arrspl.adb, g-busorg.ads, g-calend.adb,
2017 g-calend.ads, g-casuti.ads, g-cgideb.adb,
2018 g-comlin.adb, g-comlin.ads, g-curexc.ads,
2019 g-debpoo.adb, g-debpoo.ads, g-decstr.adb,
2020 g-dirope.adb, g-dirope.ads, g-dynhta.ads,
2021 g-dyntab.adb, g-encstr.ads, g-excact.ads,
2022 g-except.ads, g-expect.ads, g-heasor.adb,
2023 g-hesora.adb, g-hesorg.adb, g-htable.ads,
2024 g-locfil.ads, g-md5.adb, g-md5.ads,
2025 g-memdum.ads, g-moreex.ads, g-os_lib.adb,
2026 g-pehage.adb, g-pehage.ads, g-regexp.adb,
2027 g-regexp.ads, g-regpat.adb, g-regpat.ads,
2028 g-soccon-aix.ads, g-soccon-darwin.ads,
2029 g-soccon-freebsd.ads, g-soccon-hpux-ia64.ads,
2030 g-soccon-hpux.ads, g-soccon-irix.ads,
2031 g-soccon-linux-64.ads, g-soccon-linux-ppc.ads,
2032 g-soccon-linux-x86.ads, g-soccon-lynxos.ads,
2033 g-soccon-mingw.ads, g-soccon-solaris-64.ads,
2034 g-soccon-solaris.ads, g-soccon-tru64.ads,
2035 g-soccon-vms.ads, g-soccon-vxworks.ads,
2036 g-soccon.ads, g-socket.adb, g-socket.ads,
2037 g-socthi-mingw.adb, g-socthi-vms.adb,
2038 g-socthi-vxworks.adb, g-soliop-mingw.ads,
2039 g-soliop-solaris.ads, g-soliop.ads, g-spipat.adb,
2040 g-spipat.ads, g-string.adb, g-stsifd-sockets.adb: Fix comment
2043 2008-03-27 Eric Botcazou <ebotcazou@adacore.com>
2045 * decl.c (gnat_to_gnu_entity) <E_Procedure>: Also set the public flag
2046 if the procedure is imported.
2048 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2050 * adaint.c: Fix warnings.
2052 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2054 * g-dirope.ads, g-dirope.adb: (Dir_Type_Value): Moved to spec.
2056 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2058 * a-witeio.adb: Fix problem with Current_Output (introduce Self).
2059 Fix problem of status check for null file
2061 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2063 * s-proinf-irix-athread.ads, s-vxwork-mips.ads,
2064 s-traces.ads, s-vxwork-arm.ads, s-vxwork-ppc.ads, s-vxwork-sparcv9.ads,
2065 s-tasinf-mingw.ads, s-tasinf-linux.ads, s-tasdeb.ads, mlib-tgt.ads,
2066 i-cstrin.ads, uintp.adb, g-catiio.adb, s-vmexta.ads,
2067 s-trafor-default.ads, s-vxwork-m68k.ads: Minor reformatting. Update
2070 2008-03-26 Thomas Quinot <quinot@adacore.com>
2073 * g-socket.ads, g-socket.adb (Options, Set_Socket_Option,
2074 Get_Socket_Option): Add support for Receive_Packet_Info.
2076 * g-soccon.ads, g-soccon-tru64.ads, g-soccon-aix.ads,
2077 g-soccon-irix.ads, g-soccon-hpux.ads, g-soccon-solaris.ads,
2078 g-soccon-vms.ads, g-soccon-mingw.ads, g-soccon-freebsd.ads,
2079 g-soccon-hpux-ia64.ads, g-soccon-solaris-64.ads, g-soccon-darwin.ads,
2080 g-soccon-lynxos.ads, g-soccon-linux-64.ads, g-soccon-linux-x86.ads: Add
2081 new constants SO_REUSEPORT and IP_PKTINFO
2083 2008-03-26 Robert Dewar <dewar@adacore.com>
2085 * a-taster.adb, s-shasto.adb, s-soflin.adb, s-taasde.adb, s-taenca.adb,
2086 a-sytaco.adb, a-sytaco.ads, a-tasatt.adb, a-taside.adb,
2087 a-intnam-lynxos.ads, a-retide.adb, a-intnam-tru64.ads, a-intnam-aix.ads,
2088 a-intnam-irix.ads, a-intnam-hpux.ads, a-intnam-linux.ads,
2089 a-intnam-solaris.ads, a-caldel-vms.adb, a-intnam-vms.ads,
2090 a-excpol-abort.adb, a-intnam-mingw.ads, s-interr.adb, s-interr.ads,
2091 s-intman.ads, s-gloloc.adb, s-osinte-lynxos-3.ads,
2092 s-interr-sigaction.adb, s-osinte-hpux.ads, s-osinte-solaris-posix.ads,
2093 a-intnam-freebsd.ads, s-osinte-freebsd.ads, s-osinte-lynxos.ads,
2094 s-taspri-lynxos.ads, s-osinte-tru64.ads, s-osinte-tru64.ads,
2095 s-taspri-tru64.ads, s-osinte-aix.ads, s-osinte-irix.ads,
2096 s-osinte-hpux-dce.ads, s-taprop-hpux-dce.adb, s-taspri-hpux-dce.ads,
2097 s-osinte-linux.ads, s-osinte-dummy.ads, s-taprop-dummy.adb,
2098 s-taspri-dummy.ads, s-interr-dummy.adb, s-osinte-solaris.ads,
2099 s-osinte-mingw.ads, s-taprop-solaris.adb, s-taspri-solaris.ads,
2100 s-inmaop-vms.adb, s-interr-vms.adb, s-intman-vms.ads, s-osinte-vms.ads,
2101 s-osinte-vms.ads, s-taprop-vms.adb, s-taspri-vms.ads,
2102 s-taspri-mingw.ads, s-interr-vxworks.adb, s-inmaop-posix.adb,
2103 s-intman-vxworks.ads, s-osinte-vxworks.ads, s-osprim-vxworks.adb,
2104 s-taspri-vxworks.ads, s-taspri-posix.ads, a-caldel.adb, a-calend.adb,
2105 a-elchha.adb, a-dynpri.adb, a-except.adb, a-except.ads, a-interr.ads,
2106 a-textio.adb, a-tigeau.ads, atree.adb, s-taprob.adb, s-taprop.ads,
2107 s-tarest.adb, s-tarest.ads, s-tasini.adb, s-taskin.adb, s-taskin.ads,
2108 s-tasque.adb, s-tasren.adb, s-tasren.ads, s-tassta.adb, s-tassta.ads,
2109 s-tasuti.adb, s-tataat.adb, s-tataat.ads, s-tpoben.adb, s-tpoben.ads,
2110 s-tpobop.adb, s-tpobop.ads, s-tposen.adb, s-tposen.ads, s-valrea.adb,
2111 s-valuti.adb, a-intnam-darwin.ads, s-osinte-darwin.ads, s-solita.adb,
2112 a-ztinau.ads, s-osinte-linux-hppa.ads, a-except-2005.adb,
2113 a-except-2005.ads, a-rttiev.adb, s-osinte-vxworks6.ads, s-regexp.adb,
2114 s-tasloc.adb: Minor reformatting.
2116 Remove "used for" sections from comments.
2118 2008-03-26 Robert Dewar <dewar@adacore.com>
2120 * s-tpopsp-posix.adb, s-tpopsp-solaris.adb, s-tpopsp-posix-foreign.adb,
2121 s-tpopsp-lynxos.adb, s-tpopde-vms.ads, s-tpopde-vms.adb,
2122 s-tpopsp-vxworks.adb, s-casi16.adb, s-caun16.adb, s-inmaop.ads,
2123 s-tadeca.adb, s-tadeca.ads, s-tadert.adb, s-tadert.ads, s-tpinop.adb,
2124 s-tpinop.ads, s-tporft.adb, a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb,
2125 a-crbtgk.ads, a-crbtgk.adb, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
2126 a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
2127 a-cgcaso.adb, a-cgaaso.adb, a-ciormu.adb, a-cihase.adb, a-swuwha.ads,
2128 a-rbtgso.ads, a-cgaaso.ads, a-cgaaso.ads, a-ciorma.adb, a-chtgke.ads,
2129 a-chtgke.adb, a-llfzti.ads, a-ztenau.adb, a-ztenau.ads, a-stzhas.ads,
2130 a-szbzha.ads, a-szbzha.adb, a-crdlli.ads, a-crdlli.ads, a-crdlli.adb,
2131 i-forbla-darwin.adb, i-forbla.ads, s-regexp.adb, a-nllrar.ads,
2132 a-nlrear.ads, a-nucoar.ads, a-nurear.ads, i-forlap.ads, s-gearop.adb,
2133 s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb, s-gecola.ads,
2134 s-gerebl.adb, s-gerela.ads, a-swuwha.adb, i-forbla-unimplemented.ads,
2135 double spaced if it fits on one line and otherwise single spaced.
2137 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2139 * s-taprop-irix.adb, s-taprop-tru64.adb, s-taprop-lynxos.adb,
2140 s-taprop-linux.adb, s-taprop-mingw.adb, s-taprop-vxworks.adb,
2141 s-taprop-posix.adb (Create_Task): Do not attempt to set task priority
2142 or task info if the thread could not be created.
2144 2008-03-26 Arnaud Charlet <charlet@adacore.com>
2146 * gnatvsn.ads (Library_Version): Bump to 4.4.
2147 (Current_Year): Bump to 2008.
2149 2008-03-26 Robert Dewar <dewar@adacore.com>
2151 * ali.ads, ali.adb (Optimize_Alignment_Setting): New field in ALI record
2153 * bcheck.adb (Check_Consistent_Optimize_Alignment): New procedure
2155 * debug.adb: Add debug flags d.r and d.v
2156 Add debug flag .T (Optimize_Alignment (Time))
2157 Add debug flag .S (Optimize_Alignment (Space))
2159 * freeze.adb (Freeze_Record_Type): Set OK_To_Reorder_Components
2160 depending on setting of relevant debug flags.
2161 Replace use of Warnings_Off by Has_Warnings_Off
2162 (Freeze_Entity): In circuit for warning on suspicious convention
2163 actuals, do not give warning if subprogram has same entity as formal
2164 type, or if subprogram does not come from source.
2165 (Freeze_Entity): Don't reset Is_Packed for fully rep speced record
2166 if Optimize_Alignment set to Space.
2168 * frontend.adb: Add call to Sem_Warn.Initialize
2169 Add call to Sem_Warn.Output_Unused_Warnings_Off_Warnings
2170 Reset Optimize_Alignment mode from debug switches .S and .T
2172 * layout.adb (Layout_Composite_Object): Rewritten for
2173 Optimize_Aligment pragma.
2175 * lib-writ.ads, lib-writ.adb: New Ox parameter for Optimize_Alignment
2178 * opt.ads, opt.adb: (Optimize_Alignment): New global switch
2180 * par-prag.adb (N_Pragma): Chars field removed, use Chars
2181 (Pragma_Identifier (.. instead, adjustments throughout to accomodate
2182 this change. Add entry for pragma Optimize_Alignment
2184 * sem_prag.adb (N_Pragma): Chars field removed, use Chars
2185 (Pragma_Identifier (..
2186 instead, adjustments throughout to accomodate this change.
2187 (Process_Compile_Time_Warning_Or_Error): Use !! for generated msg
2188 (Favor_Top_Level): Use new function Is_Access_Subprogram_Type
2189 Add implementation of pragma Optimize_Alignment
2191 2008-03-26 Vincent Celier <celier@adacore.com>
2193 * a-szuzti.adb, a-swuwti.adb, a-suteio.adb (functions Get_Line):
2194 Improve memory usage to avoid use of stack.
2196 2008-03-26 Robert Dewar <dewar@adacore.com>
2198 * a-teioed.ads: Correct value of Default_Fill
2200 * a-teioed.adb (Image): Use Fill_Character instead of '*' to fill
2202 2008-03-26 Robert Dewar <dewar@adacore.com>
2204 * a-ztexio.adb, a-ztexio.ads, a-witeio.ads, a-witeio.adb: Fix problem
2205 with Current_Output (introduce Self).
2207 2008-03-26 Robert Dewar <dewar@adacore.com>
2209 * checks.adb (Ensure_Valid): Capture valid status if possible
2212 2008-03-26 Robert Dewar <dewar@adacore.com>
2214 * stand.ads: Deal with reordering of package standard declarations
2216 * cstand.adb: Put package Standard declarations in proper order
2218 2008-03-26 Robert Dewar <dewar@adacore.com>
2220 * einfo.ads, einfo.adb (N_Pragma): Chars field removed, use Chars
2221 (Pragma_Identifier (.. instead.
2222 (OK_To_Reorder_Components): New flag
2223 (Has_Entries): Code cleanup.
2224 (Warnings_Off_Used): New flag
2225 (Warnings_Off_Used_Unmodified): New flag
2226 (Warnings_Off_Used_Unreferenced): New flag
2227 (Has_Warnings_Off): New function
2228 (Has_Unmodified): New function
2229 (Has_Unreferenced): New function
2230 (Is_Trivial_Subprogram): New flag
2231 (Is_Static_Dispatch_Table_Entity): New attribute.
2232 Change name Access_Subprogram_Type_Kind to Access_Subprogram_Kind
2233 (more consistent with other similar names)
2234 (Access_Subprogram_Type): New classification function
2236 2008-03-26 Robert Dewar <dewar@adacore.com>
2238 * errout.ads: Document new !! insertion sequence
2240 * errout.adb (N_Pragma): Chars field removed, use Chars
2241 (Pragma_Identifier (.. instead.
2242 Replace use of Warnings_Off by Has_Warnings_Off
2243 (Error_Msg_Internal): Don't delete warning ending in !!
2245 2008-03-26 Robert Dewar <dewar@adacore.com>
2247 * par.adb (Check_No_Right_Paren): Removed no longer used
2249 * par-ch10.adb (N_Pragma): Chars field removed, use Chars
2250 (Pragma_Identifier (.. instead.
2252 * par-ch10.adb (P_Subunit): Improvement in error recovery and message
2254 * par-tchk.adb, par-ch5.adb, par-ch6.adb, par-ch3.adb,
2255 par-ch4.adb: Minor improvements in error recovery and messages.
2257 * erroutc.adb (Test_Style_Warning_Serious_Msg): Treat style msgs as
2260 * par-ch9.adb: Minor improvements in error recovery and messages
2261 (P_Protected): Better error recovery for "protected type x;"
2263 * par-util.adb: Minor improvements in error recovery and messages
2264 (Check_No_Right_Paren): Removed no longer used
2266 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2268 * exp_aggr.adb (Replace_Type): When checking for self-reference, verify
2269 that the prefix of an attribute is the type of the aggregate being
2272 2008-03-26 Javier Miranda <miranda@adacore.com>
2273 Robert Dewar <dewar@adacore.com>
2275 * exp_attr.adb (N_Pragma): Chars field removed.
2276 (Expand_N_Attribute_Reference): If the designated type associated with
2277 attribute 'Unrestricted_Access is a subprogram entity then replace it
2278 by an E_Subprogram_Type itype.
2279 Implement attribute Old
2281 * sem_attr.ads (Attribute_Class_Array): Move to snames.ads
2283 * sem_attr.adb (Build_Access_Subprogram_Itype): Add documentation.
2285 New_Internal_Entity by call to Create_Itype to centralize calls
2286 building itypes, ad propagate the convention of the designated
2287 subprogram. In addition, disable the machinery cleaning constant
2288 indications from all entities in current scope when 'Unrestricted_Access
2289 corresponds with a node initializing a dispatch table slot.
2290 (Analyze_Attribute): Parameterless attributes returning a string or a
2291 type will not be called with improper arguments, so we can remove junk
2292 code that was dealing with this case.
2293 Implement attribute Old
2295 * snames.ads, snames.h, snames.adb: Add entries for attribute Old
2296 Add entry for pragma Optimize_Alignment
2297 New standard names Sync and Synchronize
2299 2008-03-26 Robert Dewar <dewar@adacore.com>
2300 Arnaud Charlet <charlet@adacore.com>
2302 * exp_ch11.adb (Expand_At_End_Handler): Set From_At_End flag on raise
2304 (No_Exception_Propagation_Active): New function.
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 * restrict.ads, restrict.adb (No_Exception_Propagation_Active): New
2311 (Expand_Exception_Handlers): Use No_Exception_Propagation_Active.
2312 Update comments, and review all uses of No_Exception_Propagation, which
2313 are now correct and in sync with what gigi expects.
2315 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2317 * sem_ch3.adb (Access_Definition): If the access type is the return
2318 result of a protected function, create an itype reference for it
2319 because usage will be in an inner scope from the point of declaration.
2320 (Build_Derived_Record_Type): Inherit Reverse_Bit_Order and
2321 OK_To_Reorder_Components.
2322 (Make_Index): If an overloaded range includes a universal integer
2323 interpretation, resolve to Standard.Integer.
2324 (Analyze_Subtype_Indication): Copy Convention to subtype
2325 (Check_Abstract_Interfaces): Complete semantic checks on the legality of
2326 limited an synchronized progenitors in type declaration and private
2327 extension declarations.
2329 * exp_ch13.adb (Expand_N_Freeze_Entity): If the scope of the entity is a
2330 protected subprogram body, determine proper scope from subprogram
2333 2008-03-26 Robert Dewar <dewar@adacore.com>
2335 * exp_ch4.adb (Expand_N_Op_Concat): Remove special tests for
2338 2008-03-26 Gary Dismukes <dismukes@adacore.com>
2340 * exp_ch5.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).
2346 * sem_ch4.adb (Expand_N_Extended_Return_Statement): Suppress generation
2347 of a heap allocator for a limited unconstrained function return when
2348 resstriction No_Allocators is active.
2349 (Analyze_Allocator): The restriction No_Allocators is now only checked
2350 on allocators that have Comes_From_Source set, as per RM-H.4(7).
2351 (Has_Fixed_Op): If the name in a function call is Standard."*" and the
2352 operands are fixed-point types, the universal_fixed predefined operation
2353 is used, regardless of whether the operand type (s) have a primitive
2354 operation of the same name.
2356 2008-03-26 Javier Miranda <miranda@adacore.com>
2358 * exp_disp.adb (Make_DT, Make_Secondary_DT): Set attribute
2359 Is_Static_Dispatch_Table
2360 (Build_Dispatch_Tables): Replace calls to Exchange_Entities() by calls
2361 to Exchange_Declarations to exchange the private and full-view. Bug
2362 found working in this issue.
2363 (Expand_Dispatching_Call): Propagate the convention of the subprogram
2364 to the subprogram pointer type.
2365 (Make_Secondary_DT): Replace generation of Prim'Address by
2366 Address (Prim'Unrestricted_Access)
2367 (Make_DT): Replace generation of Prim'Address by
2368 Address (Prim'Unrestricted_Access)
2369 (Make_Disp_*_Bodies): When compiling for a restricted profile, use
2370 simple call form for single entry.
2371 (Make_DT): Handle new contents of Access_Disp_Table (access to dispatch
2372 tables of predefined primitives).
2373 (Make_Secondary_DT): Add support to handle access to dispatch tables of
2374 predefined primitives.
2375 (Make_Tags): Add entities to Access_Dispatch_Table associated with
2376 access to dispatch tables containing predefined primitives.
2378 * exp_ch6.adb (N_Pragma): Chars field removed, use Chars
2379 (Pragma_Identifier (.. instead, adjustments throughout to accomodate
2381 (Register_Predefined_DT_Entry): Updated to handle the new contents
2382 of attribute Access_Disp_Table (pointers to dispatch tables containing
2383 predefined primitives).
2385 * exp_util.ads, exp_util.adb (Corresponding_Runtime_Package): New
2387 (Find_Interface_ADT): Updated to skip the new contents of attribute
2388 Access_Dispatch_Table (pointers to dispatch tables containing predefined
2391 * sem_util.adb (Has_Abstract_Interfaces): Add missing support for
2393 (Set_Convention): Use new function Is_Access_Subprogram_Type
2394 (Collect_Interfaces_Info): Updated to skip the new contents of attribute
2395 Access_Dispatch_Table (pointers to dispatch tables containing predefined
2398 * exp_atag.ads, exp_atag.adb (Build_Inherit_Predefined_Prims): Improve
2399 expanded code avoiding calls to Build_Predef_Prims.
2400 (Build_Set_Predefined_Prim_Op_Address): Improve expanded code avoiding
2401 call to Build_Get_Predefined_Prim_Op_Address.
2403 2008-03-26 Javier Miranda <miranda@adacore.com>
2405 * exp_ch7.adb (Make_Clean): Code cleanup using the new centralized
2406 subprogram Corresponding_Runtime_Package to know the runtime package
2407 that will provide support to a given protected type.
2409 * exp_ch9.adb (Add_Private_Declarations,
2410 Build_Protected_Subprogram_Call,
2411 Build_Protected_Entry, Build_Simple_Entry_Call,
2412 Expand_N_Protected_Body, Expand_N_Protected_Type_Declaration,
2413 Expand_N_Timed_Entry_Call, Make_Initialize_Protection): Code
2414 cleanup using the new centralized subprogram Corresponding_Runtime
2415 Package to know the runtime package that provides support to
2416 a given protected type.
2418 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2420 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): If the component
2421 assignment is within the initialization procedure for a packed array,
2422 and Initialize_Scalars is enabled, compile right-hand side with checks
2423 off, because the value is purposely out of range.
2425 2008-03-26 Vincent Celier <celier@adacore.com>
2427 * gnatcmd.adb: Add processing for GNAT SYNC
2429 * vms_conv.ads: (Command_Type): Add command Sync
2431 * vms_conv.adb (Initialize): Add Command_List data for new command Sync
2433 * vms_data.ads: Add entries for -gnatw.w
2434 Add qualifier for gnatstub --header-file option
2435 Add switches for GNAT SYNC
2437 * prj-attr.ads, prj-attr.adb: Add new package Synchronize for GNAT SYNC
2438 (Add_Package_Name): New procedure
2439 (Package_Name_List): New function
2440 (Initialize): Add known package names to the list
2441 (Register_New_Package): Add the new package name to the list
2443 2008-03-26 Robert Dewar <dewar@adacore.com>
2445 * g-pehage.adb, g-regist.adb, g-spipat.ads, g-spipat.adb,
2446 s-asthan.adb, s-parint.adb, s-rpc.adb, s-stchop.adb: Replace
2447 Raise_Exception by "raise with" construct.
2449 2008-03-26 Pascal Obry <obry@adacore.com>
2451 * Makefile.in: Add proper GNAT.Serial_Communications implementation on
2452 supported platforms.
2454 * Makefile.rtl: Add g-sercom.o.
2456 * impunit.adb: Add g-sercom.adb.
2458 * s-crtl.ads (open): New routine.
2462 * s-osinte-mingw.ads (BYTE): New type.
2464 (OVERLAPPED): Likewise.
2465 (GENERIC_READ): New constant.
2466 (GENERIC_WRITE): Likewise.
2467 (OPEN_EXISTING): Likewise.
2468 (PSECURITY_ATTRIBUTES): Removed this type, use anonymous access
2470 (CreateFile): New routine.
2471 (WriteFile): Likewise.
2472 (ReadFile): Likewise.
2473 (CloseHandle): Move next to the other file oriented routines.
2475 * g-sercom.ads: New unit.
2477 * g-sercom.adb: Default implementation, calls to this unit will raise
2478 a program error exception.
2480 * g-sercom-mingw.adb, g-sercom-linux.adb: Windows and
2481 GNU/Linux implementations.
2483 2008-03-26 Robert Dewar <dewar@adacore.com>
2485 * itypes.adb (Create_Itype): Use new name Access_Subprogram_Kind
2487 * sem_ch13.adb (Validate_Unchecked_Conversion): Give warning for
2488 unchecked conversion for different conventions only for subprogram
2491 2008-03-26 Vincent Celier <celier@adacore.com>
2493 * osint-c.adb (Set_Library_Info_Name): Use canonical case file names
2494 to check if the specified object file is correct.
2496 2008-03-26 Thomas Quinot <quinot@adacore.com>
2498 * sem_cat.adb (Validate_RACW_Primitives): Do not rely on
2499 Comes_From_Source to exclude primitives from being checked. We want to
2500 exclude predefined primitives only, so use the appropriate specific
2501 predicate. Also, flag a formal parameter of an anonymous
2502 access-to-subprogram type as illegal for a primitive operation of a
2503 remote access to class-wide type.
2505 2008-03-26 Vincent Celier <celier@adacore.com>
2507 * prj-dect.adb (Parse_Package_Declaration): When a package name is not
2508 known, check if it may be a missspelling of a known package name. In
2509 not verbose, not mode, issue warnings only if the package name is a
2510 possible misspelling.
2511 In verbose mode, always issue a warning for a not known package name,
2512 plus a warning if the name is a misspelling of a known package name.
2514 * prj-part.adb (Post_Parse_Context_Clause): Modify so that only non
2515 limited withs or limited withs are parse during one call.
2516 (Parse_Single_Project): Post parse context clause in two passes: non
2517 limited withs before current project and limited withs after current
2520 * prj-proc.adb (Imported_Or_Extended_Project_From): Returns an extended
2521 project with the name With_Name, even if it is only extended indirectly.
2522 (Recursive_Process): Process projects in order: first single withs, then
2523 current project, then limited withs.
2525 * prj-tree.adb (Imported_Or_Extended_Project_Of): Returns an extended
2526 project with the name With_Name, even if it is only extended indirectly.
2528 2008-03-26 Robert Dewar <dewar@adacore.com>
2530 * scn.adb (Initialize_Scanner): Format messages belong on standard error
2532 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2534 * sem_ch10.adb (Analyze_Compilation_Unit): if a unit in the context is
2535 a generic subprogram that is imported, do not attempt to compile
2538 * sem_ch12.adb (Instantiate_Subprogram_Body): if the generic is
2539 imported, do not generate a raise_program_error for the non-existent
2541 (Pre_Analyze_Actuals): If an error is detected during pre-analysis,
2542 perform minimal name resolution on the generic to avoid spurious
2544 (Find_Actual_Type): the designated type of the actual in a child unit
2545 may be declared in a parent unit without being an actual.
2547 2008-03-26 Robert Dewar <dewar@adacore.com>
2549 * sem_ch11.adb: Fix No_Exception_Restriction violation for SJLJ
2550 * sinfo.ads, sinfo.adb (From_At_End): New flag
2552 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2554 * sem_ch6.adb (Analyze_Subprogram_Body): Remove spurious check on
2555 operations that have an interface parameter.
2556 (Analyze_Subprogram_Body): Set Is_Trivial_Subprogram flag
2557 Don't treat No_Return call as raise.
2559 * sem_disp.adb (Check_Dispatching_Operations): apply check for
2560 non-primitive interface primitives to access parameters, not to all
2561 parameters of an access type.
2563 2008-03-26 Ed Schonberg <schonberg@adacore.com>
2565 * sem_ch7.adb (Install_Parent_Private_Declarations): If the private
2566 declarations of a parent unit are made visible when compiling a child
2567 instance, the parent is not a hidden open scope, even though it may
2568 contain other pending instance.
2570 * sem_ch8.adb (Restore_Scope_Stack): If an entry on the stack is a
2571 hidden open scope for some child instance, it does affect the
2572 visibility status of other stach entries.
2573 (Analyze_Object_Renaming): Check that a class-wide object cannot be
2574 renamed as an object of a specific type.
2576 2008-03-26 Robert Dewar <dewar@adacore.com>
2578 * sem_res.adb (Check_Infinite_Recursion): Diagnose definite infinite
2579 recursion and raise SE directly.
2580 (Resolve_Actuals): Reset Never_Set_In_Source if warnings off is
2581 set for formal type for IN mode parameter.
2583 2008-03-26 Robert Dewar <dewar@adacore.com>
2585 * sem_warn.ads, sem_warn.adb (Warnings_Off_Pragmas): New table
2586 (Initialize): New procedure
2587 (Output_Warnings_Off_Warnings): New procedure
2588 (Check_References): Suppress certain msgs if Is_Trivial_Subprogram
2589 (Output_Non_Modifed_In_Out_Warnings): Ditto
2590 (Warn_On_Unreferenced_Entity): Ditto
2592 2008-03-26 Vincent Celier <celier@adacore.com>
2594 * a-direct.adb (Start_Search): Raise Use_Error if the directory is not
2597 2008-03-26 Matthew Heaney <heaney@adacore.com>
2599 * a-ciorse.ads, a-cidlli.ads, a-cdlili.ads, a-cihase.ads, a-cohase.ads,
2600 a-ciorma.ads, a-coorma.ads, a-ciormu.ads, a-coormu.ads, a-coorse.ads:
2601 Marked with clauses as private, and controlled operations as overriding
2603 2008-03-26 Robert Dewar <dewar@adacore.com>
2605 * g-byorma.adb (Read_BOM): Reorder tests so that UTF_32 is recognized
2607 2008-03-26 Robert Dewar <dewar@adacore.com>
2609 * back_end.adb, back_end.ads: Minor reformatting
2611 * bindgen.adb: Minor clarification of comments
2613 * fname.ads: Minor comment fixes
2615 * g-altive.ads, g-catiio.ads, g-trasym.ads, prj.ads,
2616 prj-nmsc.adb, sem_aggr.adb: Minor reformatting
2618 * xeinfo.adb, xnmake.adb, xsinfo.adb, xtreeprs.adb,
2619 xsnames.adb: Remove warnings off pragma no longer needed
2621 * a-catizo.ads, a-calari.ads, a-calfor.adb,
2622 a-calfor.ads: Fix header.
2624 2008-03-26 Tristan Gingold <gingold@adacore.com>
2626 * init.c: Do not adjust pc for HPARITH on alpha/vms.
2628 2008-03-26 Robert Dewar <dewar@adacore.com>
2630 * lib-xref.adb: (OK_To_Set_Reference): New function
2631 (Generate_Reference): Don't set referenced from occurrence in Warnings,
2632 Unmodified, or Unreferenced pragma
2634 2008-03-26 Robert Dewar <dewar@adacore.com>
2636 * alloc.ads: Add entries for Warnings_Off_Pragmas table
2638 2008-03-26 GNAT Script <nobody@adacore.com>
2640 * Make-lang.in: Makefile automatically updated
2642 2008-03-26 Robert Dewar <dewar@adacore.com>
2644 * tbuild.ads, tbuild.adb, trans.c, sprint.adb, exp_prag.adb, decl.c,
2645 par-ch2.adb, sem_elab.adb, sem_util.ads (N_Pragma): Chars field
2646 removed, use Chars (Pragma_Identifier (.. instead, adjustments
2647 throughout to accomodate this change.
2649 * s-pooglo.ads, s-pooloc.ads: Minor comment updates
2651 * exp_dbug.adb: Use Sem_Util.Set_Debug_Info_Needed (not
2652 Einfo.Set_Needs_Debug_Info)
2654 2008-03-26 Robert Dewar <dewar@adacore.com>
2656 * gnat_ugn.texi: Add documentation for -gnatw.w/-gnatw.W
2657 Add description for the new gnatstub option '--header-file'
2658 clarification of -gnatwz/-gnatwZ
2659 Add a "Irix-Specific Considerations" section to document the need to
2660 set LD_LIBRARY_PATH when using the default shared runtime library.
2661 Added documentation for both gcov and gprof.
2663 * gnat_rm.texi: Document that pragma Compile_Time_Warning generates
2664 messages that are not suppressed when clients are compiled.
2665 Add documentation of s-pooglo s-pooloc
2666 Document the new GNAT.Serial_Communications API.
2667 Add documentation for 'Old attribute
2668 Add description of pragma Optimize_Alignment
2670 * ug_words: Add entries for -gnatw.w -gnatw.W
2672 * usage.adb: Add line for -gnatw.w (warn on warnings off)
2674 2008-03-25 Eric Botcazou <ebotcazou@adacore.com>
2677 2008-03-05 Eric Botcazou <ebotcazou@adacore.com>
2679 * decl.c (maybe_pad_type): Avoid padding an integral type when
2680 bumping its alignment is sufficient.
2682 2008-03-25 Arnaud Charlet <charlet@adacore.com>
2684 * exp_ch6.adb, exp_disp.adb: Update copyright notice.
2685 Fix wrong formatting (lines too long)
2687 2008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2689 * 9drpc.adb, a-caldel-vms.adb, a-caldel.adb,
2690 a-calend-vms.adb, a-calend.adb, a-calend.ads,
2691 a-calfor.adb, a-chahan.ads, a-chtgke.adb,
2692 a-cihama.ads, a-ciorse.adb, a-clrefi.ads,
2693 a-cohama.ads, a-comlin.ads, a-coorse.adb,
2694 a-crbtgk.adb, a-direct.adb, a-except-2005.adb,
2695 a-except-2005.ads, a-except.adb, a-except.ads,
2696 a-exexda.adb, a-exexpr-gcc.adb, a-exexpr.adb,
2697 a-exextr.adb, a-filico.ads, a-finali.ads,
2698 a-intnam-aix.ads, a-intnam-solaris.ads, a-ngcefu.adb,
2699 a-ngelfu.adb, a-numaux-darwin.adb, a-numeri.ads,
2700 a-sequio.ads, a-strbou.ads, a-strfix.adb,
2701 checks.adb, exp_ch3.adb, exp_ch4.adb,
2702 exp_ch4.ads, exp_ch5.adb, exp_ch6.adb,
2703 exp_ch6.ads, exp_ch7.adb, exp_ch7.ads,
2704 exp_ch9.adb, exp_ch9.ads, exp_dbug.adb,
2705 exp_dbug.ads, exp_disp.adb, exp_dist.adb,
2706 exp_dist.ads, exp_fixd.adb, exp_fixd.ads: Fix comment typos.
2708 2008-03-24 Robert Dewar <dewar@adacore.com>
2710 * s-tpopsp-posix.adb, s-tpopsp-solaris.adb, s-tpopsp-posix-foreign.adb,
2711 s-tpopsp-lynxos.adb, s-tpopde-vms.ads, s-tpopde-vms.adb,
2712 s-tpopsp-vxworks.adb, s-casi16.adb, s-caun16.adb, s-inmaop.ads,
2713 s-tadeca.adb, s-tadeca.ads, s-tadert.adb, s-tadert.ads, s-tpinop.adb,
2714 s-tpinop.ads, s-tporft.adb, a-rbtgso.adb, a-crbtgo.ads, a-crbtgo.adb,
2715 a-crbtgk.ads, a-crbtgk.adb, a-ciorse.adb, a-cihama.ads, a-cihama.adb,
2716 a-cidlli.ads, a-cidlli.adb, a-chtgop.ads, a-chtgop.adb, a-cgcaso.ads,
2717 a-cgcaso.adb, a-cgaaso.adb, a-ciormu.adb, a-cihase.adb, a-swuwha.ads,
2718 a-rbtgso.ads, a-cgaaso.ads, a-cgaaso.ads, a-ciorma.adb, a-chtgke.ads,
2719 a-chtgke.adb, a-llfzti.ads, a-ztenau.adb, a-ztenau.ads, a-stzhas.ads,
2720 a-szbzha.ads, a-szbzha.adb, a-crdlli.ads, a-crdlli.ads, a-crdlli.adb,
2721 i-forbla-darwin.adb, i-forbla.ads, s-regexp.adb, a-nllrar.ads,
2722 a-nlrear.ads, a-nucoar.ads, a-nurear.ads, i-forlap.ads, s-gearop.adb,
2723 s-gearop.ads, s-gecobl.adb, s-gecobl.ads, s-gecola.adb, s-gecola.ads,
2724 s-gerebl.adb, s-gerela.ads, a-swuwha.adb, i-forbla-unimplemented.ads,
2725 double spaced if it fits on one line and otherwise single spaced.
2727 2008-03-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2729 PR documentation/15479
2730 * Make-lang.in (doc/gnat_ugn.texi) Renamed from ...
2731 (doc/gnat_ugn_unw.texi): ... this, and adjusted.
2732 (doc/gnat_ugn.info): Renamed from ...
2733 (doc/gnat_ugn_unw.info): ... this.
2734 (doc/gnat_ugn.dvi): Renamed from ...
2735 (doc/gnat_ugn_unw.dvi): ... this.
2736 (doc/gnat_ugn.pdf): Renamed from ...
2737 (doc/gnat_ugn_unw.pdf): ... this.
2738 (ADA_INFOFILES, ADA_PDFFILES, ada.install-info, ada.dvi):
2740 * gnat_ugn.texi (FILE): Hard-code gnat_ugn; set filename
2741 unconditionally to gnat_ugn.info. Fix cross references to the
2742 GNAT Reference Manual. Convert links to the GCC, GDB, Emacs,
2743 and GNU make manuals to be proper texinfo links.
2744 * gnat_rm.texi: Fix cross references to the GNAT User's Guide.
2746 2008-03-21 Olivier Hainque <hainque@adacore.com>
2748 * trans.c (Attribute_to_gnu) <'length>: Compute as (hb < lb)
2749 ? 0 : hb - lb + 1 instead of max (hb - lb + 1, 0).
2751 2008-03-21 Eric Botcazou <ebotcazou@adacore.com>
2753 * trans.c (addressable_p): Add notes on addressability issues.
2755 2008-03-21 Olivier Hainque <hainque@adacore.com>
2756 Ed Schonberg <schonberg@adacore.com>
2758 * trans.c (addressable_p): Accept COND_EXPR when both arms
2760 (gnat_gimplify_expr): Let the gimplifier handle &COND_EXPR.
2761 (call_to_gnu): Do not use name reference in the error message
2762 for a misaligned by_reference_parameter. The actual may be a
2765 2008-03-18 Paolo Bonzini <bonzini@gnu.org>
2767 * misc.c (LANG_HOOKS_REDUCE_BIT_FIELD_OPERATIONS): Delete.
2769 2008-03-15 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2771 * gnat_rm.texi (Implementation Defined Characteristics)
2772 (Wide_Text_IO, Wide_Wide_Text_IO): Add @var annotations where
2774 * gnat_ugn.texi (Wide Character Encodings, Switches for gnatbind)
2775 (Switches for gnatchop, Installing a library): Likewise.
2777 2008-03-10 Eric Botcazou <ebotcazou@adacore.com>
2779 * trans.c (emit_range_check): Do not emit the check if the base type
2780 of the expression is the type against which its range must be checked.
2782 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2784 * decl.c (maybe_pad_type): Use value_factor_p.
2786 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2788 * lang.opt (nostdlib): Move around.
2789 * misc.c (gnat_handle_option): Fix formatting.
2790 (gnat_dwarf_name): Move around.
2791 * trans.c (Case_Statement_to_gnu): Fix formatting.
2792 (gnat_to_gnu): Likewise.
2793 * utils.c (aggregate_type_contains_array_p): Likewise.
2794 (create_subprog_decl): Likewise.
2796 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2798 * decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Do not
2799 bother propagating the TYPE_USER_ALIGN flag when creating a JM type.
2801 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2803 * decl.c (gnat_to_gnu_entity) <E_Record_Type>: Do not force
2804 BIGGEST_ALIGNMENT when capping the alignment of records with
2805 strict alignment and size clause.
2807 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2809 * lang-specs.h: Pass -gnatwa if -Wall is passed.
2810 * misc.c (gnat_handle_option) <OPT_Wall>: Expand into -Wunused
2811 and -Wuninitialized.
2812 (gnat_post_options): Clear warn_unused_parameter.
2814 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2816 * utils.c (finish_record_type): Clear DECL_BIT_FIELD on sufficiently
2817 aligned bit-fields, bumping the alignment of the record type if deemed
2819 (value_factor_p): Return false instead of 0.
2821 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2823 * decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>: Add support
2824 for scalar types with small alignment.
2826 2008-03-08 Eric Botcazou <ebotcazou@adacore.com>
2828 * trans.c (Loop_Statement_to_gnu): Set the SLOC of the loop label
2829 from that of the front-end's end label.
2830 (gnat_gimplify_stmt) <LOOP_STMT>: Set the SLOC of the backward goto
2831 from that of the loop label.
2833 2008-03-07 Eric Botcazou <ebotcazou@adacore.com>
2835 * decl.c (gnat_to_gnu_entity) <E_Modular_Integer_Subtype>: Add
2836 comment for the packed array type case.
2837 * utils.c (build_template): Use a loop to strip padding or
2838 containing records for justified modular types.
2840 2008-03-07 Eric Botcazou <ebotcazou@adacore.com>
2842 * decl.c (gnat_to_gnu_entity): Issue a warning on suspiciously
2843 large alignments specified for types.
2844 (validate_alignment): Minor cleanup.
2846 2008-03-07 Eric Botcazou <ebotcazou@adacore.com>
2848 * decl.c (MAX_FIXED_MODE_SIZE): Define if not already defined.
2849 (gnat_to_gnu_entity) <E_Record_Type>: Try to get a smaller form of
2850 the component for packing, if possible, as well as if a component
2851 size clause is specified.
2852 <E_Record_Subtype>: For an array type used to implement a packed
2853 array, get the component type from the original array type.
2854 Try to get a smaller form of the component for packing, if possible,
2855 as well as if a component size clause is specified.
2856 (round_up_to_align): New function.
2857 (make_packable_type): Add in_record parameter.
2858 For a padding record, preserve the size. If not in_record and the
2859 size is too large for an integral mode, attempt to shrink the size
2860 by lowering the alignment.
2861 Ditch the padding bits of the last component.
2862 Compute sizes and mode manually, and propagate the RM size.
2863 Return a BLKmode record type if its size has shrunk.
2864 (maybe_pad_type): Use MAX_FIXED_MODE_SIZE instead of BIGGEST_ALIGNMENT.
2865 Use Original_Array_Type to retrieve the type in case of an error.
2866 Adjust call to make_packable_type.
2867 (gnat_to_gnu_field): Likewise.
2868 (concat_id_with_name): Minor tweak.
2869 * trans.c (larger_record_type_p): New predicate.
2870 (call_to_gnu): Compute the nominal type of the object only if the
2871 parameter is by-reference. Do the conversion actual type -> nominal
2872 type if the nominal type is a larger record.
2873 (gnat_to_gnu): Do not require integral modes on the source type to
2874 avoid the conversion for types with identical names.
2875 (addressable_p): Add gnu_type parameter. If it is specified, do not
2876 return true if the expression is not addressable in gnu_type.
2877 Adjust recursive calls.
2878 * utils.c (finish_record_type): Remove dead code.
2880 2008-03-05 Eric Botcazou <ebotcazou@adacore.com>
2883 * decl.c (maybe_pad_type): Avoid padding an integral type when
2884 bumping its alignment is sufficient.
2886 2008-03-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2888 * gnatfind.adb, gnatxref.adb: Fix argument parsing typos.
2889 * s-auxdec-empty.adb, s-auxdec.adb: Fix typos in copyright
2891 * a-ngcoar.adb, a-ngrear.adb, g-awk.adb, g-debpoo.adb,
2892 gprep.adb, make.adb, makegpr.adb, par-ch6.adb, prj-nmsc.adb,
2893 sem_attr.adb, sem_ch4.adb, sem_ch8.adb: Fix typos in ada source
2894 code output strings.
2895 * sem_type.adb, system-vms-ia64.ads, system-vms.ads,
2896 system-vms_64.ads: Fix typos in ada source code comments.
2897 * sinfo-cn.adb: Remove incomplete sentence.
2899 PR documentation/15479
2900 * gnat_rm.texi, gnat_ugn.texi: Avoid standalone `non' word.
2902 2008-02-27 Samuel Tardieu <sam@rfc1149.net>
2905 * s-fileio.adb (Reset): Do not raise Use_Error if mode isn't changed.
2907 2008-02-27 Samuel Tardieu <sam@rfc1149.net>
2910 * sem_ch13.adb (Analyze_Record_Representation_Clause): Check
2911 that underlying type is present.
2913 2008-02-26 Tom Tromey <tromey@redhat.com>
2915 * misc.c (internal_error_function): Remove test of
2916 USE_MAPPED_LOCATION.
2917 * trans.c (gigi): Remove test of USE_MAPPED_LOCATION.
2918 (Sloc_to_locus): Remove old location code.
2920 2008-02-25 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2922 * gnat_rm.texi, gnat_ugn.texi: Fix spacing after `e.g.' and
2923 `i.e.' by adding comma or `@:' as appropriate.
2924 * gnat_rm.texi (Pragma Wide_Character_Encoding): Instead of
2925 plain characters `C', use `@samp{C}'.
2926 * gnat_ugn.texi (File Naming Rules, About gnatkr)
2927 (Krunching Method): Likewise.
2929 * gnat_ugn.texi (Conventions): List environment variables and
2930 metasyntactic variables.
2931 (Compiling Programs): Fix notation of metasyntactic variables.
2932 Add @file where appropriate. Use @file for file extensions,
2934 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, use @samp
2935 instead of @file, @env instead of @code.
2937 2008-02-24 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2939 PR documentation/15479
2940 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, replace `..'
2941 and `...' with `@dots{}' or `@enddots{}'.
2943 PR documentation/15479
2944 * gnat_rm.texi, gnat_ugn.texi: Where appropriate, add @command,
2945 use @command instead of @code, @option instead of @samp or @code,
2946 @code instead of @var, @samp instead of @file.
2948 PR documentation/15479
2949 * gnat_ugn.texi (Using gnatmake in a Makefile): Do not ignore errors
2950 in Makefile rules, by using `&&' rather than `;'.
2952 2008-02-17 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
2954 PR documentation/15479
2955 * gnat_ugn.texi: In non-code, avoid space before colon.
2956 (Regular Expressions in gnatfind and gnatxref): Fix indentation.
2957 (Examples of gnatxref Usage): Use @command{vi} instead of
2959 (Character Set Control): Do not use @code for UTF-8.
2960 (Validity Checking): Fix typo "NaNs" instead of "NaN's". Do not
2962 * gnat_rm.texi (Aggregates with static bounds): Fix typo in code
2964 * gnat_rm.texi, gnat_ugn.texi: Fix typos. Bump copyright years.
2966 2008-02-11 Joel Sherrill <joel.sherrill@oarcorp.com>
2969 * env.c: Add __rtems__ to if defined.
2970 * s-osinte-rtems.adb: Add To_Target_Priority. Fix formatting.
2971 * s-osinte-rtems.ads: Add To_Target_Priority prototype and
2972 PTHREAD_SCOPE_PROCESS/PTHREAD_SCOPE_SYSTEM constants. Add
2973 pragma Convention as required.
2974 * gsocket.h: Make compile in and out of RTS.
2975 * Makefile.in: Add system-rtems.ads. Build DEC extensions.
2976 Use g-soccon-rtems.ads.
2977 * g-soccon-rtems.ads, system-rtems.ads: New files.
2979 2008-02-06 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2982 * Make-lang.in (gnat1): Add $(GMPLIBS).
2984 2008-01-26 Eric Botcazou <ebotcazou@adacore.com>
2986 * decl.c (components_to_record): Improve comment.
2988 2008-01-22 Eric Botcazou <ebotcazou@adacore.com>
2990 * decl.c (components_to_record): Do not reuse the empty union type
2991 if there is a representation clause on the record.
2992 * trans.c (addressable_p): Return true for INTEGER_CST.
2994 2008-01-21 Eric Botcazou <ebotcazou@adacore.com>
2996 * trans.c (gnat_to_gnu) <N_Free_Statement>: Use POINTER_PLUS_EXPR
2997 in pointer arithmetics.
2998 * utils2.c (build_allocator): Likewise.
3000 2008-01-17 Eric Botcazou <ebotcazou@adacore.com>
3002 * utils.c (build_function_stub): Properly build the call expression.
3004 2008-01-14 Eric Botcazou <ebotcazou@adacore.com>
3006 * decl.c (gnat_to_gnu_entity) <object>: Process renamings
3007 before converting the expression to the type of the object.
3008 * trans.c (maybe_stabilize_reference) <CONSTRUCTOR>: New case.
3009 Stabilize constructors for special wrapping types.
3011 2008-01-13 Eric Botcazou <ebotcazou@adacore.com>
3013 * trans.c (call_to_gnu): Invoke the addressable_p predicate only
3014 when necessary. Merge some conditional statements. Update comments.
3015 Rename unchecked_convert_p local variable to suppress_type_conversion.
3016 Do not suppress conversions in the In case.
3017 (addressable_p) <VIEW_CONVERT_EXPR>: Do not take alignment issues
3018 into account on non strict-alignment platforms.
3020 2008-01-12 Eric Botcazou <ebotcazou@adacore.com>
3022 * utils.c (aggregate_type_contains_array_p): New predicate.
3023 (create_field_decl): In a packed record, force byte alignment
3024 for fields without specified position that contain an array.
3026 2008-01-12 Eric Botcazou <ebotcazou@adacore.com>
3028 * utils.c (unchecked_convert): Fold the VIEW_CONVERT_EXPR expression.
3030 2008-01-10 John David Anglin <dave.anglin.@nrc-cnrc.gc.ca>
3033 * s-osinte-linux-hppa.ads (SC_NPROCESSORS_ONLN): New constant for
3035 (bit_field): New packed boolean type used by cpu_set_t.
3036 (cpu_set_t): New type corresponding to the C type with
3037 the same name. Note that on the Ada side we use a bit
3038 field array for the affinity mask. There is not need
3039 for the C macro for setting individual bit.
3040 (pthread_setaffinity_np): New imported routine.
3042 2008-01-03 Tero Koskinen <tero.koskinen@iki.fi>
3045 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
3046 on OpenBSD as is done on other BSD systems.
3049 * sysdep.c (__gnat_ttyname, getc_immediate_nowait,
3050 getc_immediate_common): Treat OpenBSD as FreeBSD regarding immediate
3054 * env.c (__gnat_clearenv): Treat OpenBSD as other BSD systems missing
3058 * init.c (__gnat_error_handler, __gnat_install_handler,
3059 __gnat_init_float): Define for OpenBSD.
3061 * initialize.c (__gnat_initialize): Define for OpenBSD.
3063 2007-12-27 Samuel Tardieu <sam@rfc1149.net>
3066 * adaint.c (__gnat_open_new_temp, __gnat_tmp_name): Use mkstemp()
3067 instead of mktemp() or tmpnam() on NetBSD.
3069 2007-12-23 Eric Botcazou <ebotcazou@adacore.com>
3071 * trans.c (call_to_gnu): Make the temporary for non-addressable
3072 In parameters passed by reference.
3073 (addressable_p): Return true for STRING_CST and CALL_EXPR.
3075 2007-12-19 Robert Dewar <dewar@adacore.com>
3077 * g-expect-vms.adb, g-expect.adb, s-poosiz.adb:
3078 Add pragma Warnings (Off) for unassigned IN OUT arguments
3080 * sem_warn.adb (Output_Reference): Suppress messages for internal names
3081 (Check_References): Extensive changes to tune up warnings
3082 (Output_Non_Modifed_In_Out_Warnings): Changes to tune up warnings
3083 (Has_Pragma_Unmodifed_Check_Spec): New function
3084 (Check_References): Implement pragma Unmodified
3085 (Warn_On_Unassigned_Out_Parameter): Implement pragma Unmodified
3087 * par-prag.adb: Dummy entry for pragma Unmodified
3089 * sem_prag.adb: Implement pragma Unmodified
3091 * einfo.ads, einfo.adb: (Has_Pragma_Unmodified): New flag
3092 (Proc_Next_Component_Or_Discriminant): Fix typo.
3095 * sem_util.adb (Note_Possible_Modification): Add processinng for pragma
3097 (Reset_Analyzed_Flags): Use Traverse_Proc instead of Traverse_Func,
3098 because the former already takes care of discarding the result.
3099 (Mark_Coextensions): Remove ununused initial value from Is_Dynamic.
3102 * snames.h, snames.ads, snames.adb: Add entry for pragma Unmodified
3104 2007-12-19 Eric Botcazou <ebotcazou@adacore.com>
3106 * targparm.adb, targparm.ads, system.ads, system-darwin-ppc.ads,
3107 system-vxworks-x86.ads, system-linux-ppc.ads, system-linux-hppa.ads,
3108 system-hpux-ia64.ads, system-vxworks-arm.ads, system-darwin-x86.ads,
3109 system-vms_64.ads, system-vms-ia64.ads, system-linux-ia64.ads,
3110 system-freebsd-x86.ads, system-linux-x86_64.ads, system-tru64.ads,
3111 system-aix.ads, system-vxworks-sparcv9.ads, system-solaris-x86.ads,
3112 system-irix-o32.ads, system-irix-n32.ads, system-hpux.ads,
3113 system-vxworks-m68k.ads, system-linux-x86.ads, system-vxworks-mips.ads,
3114 system-solaris-sparc.ads, system-solaris-sparcv9.ads, system-vms.ads,
3115 system-mingw.ads, system-vms-zcx.ads, system-vxworks-ppc.ads
3116 (Dynamic_Trampolines_Used): Delete.
3118 * system-lynxos-x86.ads, system-lynxos-ppc.ads: Ditto.
3119 Turn on stack probing mechanism on LynxOS.
3121 2007-12-19 Bob Duff <duff@adacore.com>
3123 * atree.ads, atree.adb (Traverse_Func): Walk Field2 last, and eliminate
3124 the resulting tail recursion by hand. This prevents running out of
3125 memory on deeply nested concatenations, since Field2 is where the left
3126 operand of concatenations is stored.
3127 Fix bug (was returning OK_Orig in some cases). Fix return subtype to
3128 clarify that it can only return OK or Abandon.
3130 * sem_res.adb (Resolve_Op_Concat): Replace the recursion on the left
3131 operand by iteration, in order to avoid running out of memory on
3132 deeply-nested concatenations. Use the Parent pointer to get back up the
3134 (Resolve_Op_Concat_Arg, Resolve_Op_Concat_First,
3135 Resolve_Op_Concat_Rest): New procedures split out of
3136 Resolve_Op_Concat, so the iterative algorithm in Resolve_Op_Concat is
3139 * checks.adb (Remove_Checks): Use Traverse_Proc instead of
3140 Traverse_Func, because the former already takes care of discarding the
3143 * errout.adb (First_Node): Use Traverse_Proc instead of Traverse_Func,
3144 because the former already takes care of discarding the result.
3145 (Remove_Warning_Messages): Use appropriate subtype for Status and
3148 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3150 * exp_aggr.adb (Not_OK_For_Backend): A component of a private type with
3151 discriminants forces expansion of the aggregate into assignments.
3152 (Init_Record_Controller): If the type of the aggregate is untagged and
3153 is not inherently limited, the record controller is not limited either.
3155 2007-12-19 Robert Dewar <dewar@adacore.com>
3157 * exp_attr.adb (Expand_N_Attribute_Reference, case Size): Fix error in
3158 handling compile time known size of record or array (case of front end
3159 layout active, e.g. in GNAAMP).
3161 2007-12-19 Javier Miranda <miranda@adacore.com>
3163 * exp_ch3.adb (Expand_N_Object_Declaration): Complete the circuitry
3164 that forces the construction of static dispatch tables in case of
3167 2007-12-19 Robert Dewar <dewar@adacore.com>
3169 * exp_ch9.adb (Null_Statements): Moved to library level
3170 (Trivial_Accept_OK): New function
3171 (Expand_Accept_Declaration): Use Trivial_Accept_OK
3172 (Expand_N_Accept_Statement): Use Trivial_Accept_OK
3174 2007-12-19 Robert Dewar <dewar@adacore.com>
3176 * exp_pakd.adb (Expand_Bit_Packed_Element_Set): Fix packed array type
3177 in complex case where array is Volatile.
3179 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3181 * freeze.adb (Freeze_Record_Type, Check_Current_Instance): Implement
3182 properly the Ada2005 rules concerning when the current instance of a
3183 record type is aliased.
3185 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3187 * par-ch3.adb (P_Record_Declaration): Guard against cascaded errors in
3189 (P_Type_Declaration): Diagnose misuse of "abstract" in untagged record
3191 (P_Variant_Part): Cleaner patch for parenthesized discriminant
3193 2007-12-19 Vincent Celier <celier@adacore.com>
3195 * prj-attr.adb (Package_Node_Id_Of): Returns Unknown_Package when
3196 package is not known
3198 * prj-attr.ads (Unknown_Package): New constant
3199 Do not crash when an unknown package is in several projects
3201 * prj-dect.adb (Parse_Package_Declaration): Mark an unknown package as
3204 * prj-nmsc.adb (Check): Remove obsolete code related to no longer
3205 existing package Language_Processing.
3207 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3208 Gary Dismukes <dismukes@adacore.com>
3209 Samuel Tardieu <sam@rfc1149.net>
3211 PR ada/15803, ada/15805
3212 * sem_ch6.adb, sem_ch3.adb (Constrain_Access): In Ada2005, diagnose
3213 illegal access subtypes when there is a constrained partial view.
3214 (Check_For_Premature_Usage): New procedure inside
3215 Access_Subprogram_Declaration for checking that an access-to-subprogram
3216 type doesn't reference its own name within any formal parameters or
3217 result type (including within nested anonymous access types).
3218 (Access_Subprogram_Declaration): Add call to Check_For_Premature_Usage.
3219 (Sem_Ch3.Analyze_Object_Declaration, Sem_ch6.Process_Formals): if the
3220 context is an access_to_variable, the expression cannot be an
3223 2007-12-19 Bob Duff <duff@adacore.com>
3225 * sem_ch4.adb (Analyze_Concatenation_Rest): New procedure.
3226 (Analyze_Concatenation): Use iteration instead of recursion in order
3227 to avoid running out of stack space for deeply nested concatenations.
3229 2007-12-19 Ed Schonberg <schonberg@adacore.com>
3230 Gary Dismukes <dismukes@adacore.com>
3232 * sem_ch8.adb (Analyze_Subprogram_Renaming): Diagnose illegal renamings
3233 whose renamed entity is a subprogram that requires overriding.
3234 (Premature_Usage): Test for the case of N_Full_Type_Declaration when
3235 issuing an error for premature usage and issue a message that says
3236 'type' rather than 'object'.
3238 2007-12-19 Gary Dismukes <dismukes@adacore.com>
3241 * sem_disp.adb (Check_Dispatching_Call): Augment existing test for
3242 presence of a statically tagged operand (Present (Static_Tag)) with
3243 test for Indeterm_Ancestor_Call when determining whether to propagate
3244 the static tag to tag-indeterminate operands (which forces dispatching
3246 (Check_Controlling_Formals): Ada2005, access parameters can have
3248 (Add_Dispatching_Operation, Check_Operation_From_Private_View): do
3249 not insert subprogram in list of primitive operations if already there.
3251 2007-12-19 Tristan Gingold <gingold@adacore.com>
3253 * utils.c (create_var_decl_1): call rest_of_decl_compilation only for
3256 2007-12-19 Thomas Quinot <quinot@adacore.com>
3258 Part of PR ada/33688
3259 * gen-soccon.c: Add constant IP_PKTINFO to allow getting ancillary
3260 datagram info on Linux.
3262 2007-12-19 Vincent Celier <celier@adacore.com>
3264 * makegpr.adb (Check_Compilation_Needed): Normalize C_Source_Path so
3265 that the source path name is always found in the dependencies.
3267 2007-12-19 Robert Dewar <dewar@adacore.com>
3269 * gnat_rm.texi, gnat_ugn.texi: Update documentation of -gnatw.o
3270 Fix name of Wide_Wide_Latin_1/9 file names
3271 Add documentation for Ada.Exceptions.Last_Chance_Handler (a-elchha.ads)
3272 Add missing documentation for Ada.Wide_[Wide_]Characters.Unicode
3273 Add missing documentation for Ada.Command_Line.Response_File
3274 Update list of warning letters for Warnings pragma
3275 Add documentation for pragma Unmodified
3277 2007-12-19 Samuel Tardieu <sam@rfc1149.net>
3279 * Makefile.in: Add s-tasinf.ad[bs] substitutions for sh4-linux target.
3281 2007-12-17 Arnaud Charlet <charlet@adacore.com>
3283 * s-vxwork-alpha.ads: Removed, no longer used.
3285 2007-12-15 Jakub Jelinek <jakub@redhat.com>
3287 * Make-lang.in (gnat1, gnatbind): Pass ALL_CFLAGS on the link line.
3289 2007-12-13 Samuel Tardieu <sam@rfc1149.net>
3292 * Makefile.in: Change two occurrences of mlib-tgt.adb by correct name
3293 mlib-tgt-specific.adb.
3295 2007-12-13 Bob Duff <duff@adacore.com>
3297 * trans.c (Attribute_to_gnu): Check for violations of the
3298 No_Implicit_Dynamic_Code restriction. This checking used to be done in
3299 the front end, but is moved here so we can make it more accurate.
3301 2007-12-13 Pascal Obry <obry@adacore.com>
3303 * adaint.c (__gnat_pthread_setaffinity_np): New routine. A dummy