1 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3 * restrict.adb (Update_Restrictions): For restrictions with a
4 maximum parameter (e.g. number of protected entries in Ravenscar)
5 do not compute the maximum of the violation over several objects,
6 because the restriction is per-object.
7 (Check_Restriction): After possible message, reset the value
8 of of a checked max_parameter restriction to zero, to prevent
10 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
11 (sub)type to determine whether derived type should be on the
12 list of private dependents of a type whose full view may become
15 2014-08-01 Olivier Hainque <hainque@adacore.com>
17 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
18 $(CXX) instead of ../../xg++ to feed CXX.
19 (CXX_LFLAGS): Remove. Now unused as the proper flags
20 are expected to be included in the CXX variable.
22 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
24 * gcc-interface/decl.c (elaborate_expression_1): Return the new
25 variable when debug info is needed and the expression is not
26 constant. Tag as external only new variables that are global.
27 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
28 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
29 attributes for IN array parameters when their actual subtype
31 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
32 * gcc-interface/gigi.h (process_deferred_decl_context): New.
33 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
34 emit debug info for ignored global declarations.
35 (struct deferred_decl_context_node,
36 add_deferred_decl_context, add_deferred_type_context,
37 compute_deferred_decl_context, defer_or_set_type_context,
38 deferred_decl_context_queue, get_debug_scope,
39 get_global_context, process_deferred_decl_context): New.
40 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
41 computation machinery to rely on the GNAT Scope attribute.
43 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
45 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
47 2014-08-01 Robert Dewar <dewar@adacore.com>
49 * sem_ch8.adb, opt.ads Minor comment updates.
51 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
53 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
54 from the side effects removal machinery.
55 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
56 Renaming_Req. Update the nested call to Remove_Side_Effects.
57 (Duplicate_Subexpr_No_Checks): Add formal parameter
58 Renaming_Req. Update the nested call to Remove_Side_Effects.
59 (Duplicate_Subexpr_Move_Checks): Add formal parameter
60 Renaming_Req. Update the nested call to Remove_Side_Effects.
61 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
62 an object renaming declaration when the caller requests it.
63 * exp_util.ads (Duplicate_Subexpr): Add formal
64 parameter Renaming_Req. Update comment on usage.
65 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
66 (Duplicate_Subexpr_Move_Checks): Add formal parameter
69 2014-08-01 Bob Duff <duff@adacore.com>
71 * gnat_ugn.texi: Minor updates.
73 2014-08-01 Robert Dewar <dewar@adacore.com>
75 * atree.adb: Minor reformatting.
77 2014-08-01 Ed Schonberg <schonberg@adacore.com>
79 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
80 private extension, get stored constraint, if any, from full view.
82 2014-08-01 Robert Dewar <dewar@adacore.com>
84 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
85 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
86 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
87 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
88 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
89 Remove code for checking with's, now in sem_ch10.adb, set
90 Opt.No_Elab_Code_All_Pragma.
92 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
94 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
95 access types as well and adjust the subtype mark if there are
98 2014-08-01 Robert Dewar <dewar@adacore.com>
100 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
102 2014-08-01 Robert Dewar <dewar@adacore.com>
104 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
106 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
108 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
109 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
110 of the actuals in the case of untagged record types too.
111 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
112 full derivation of a derived private type, extracted from...
113 (Copy_And_Build): In the case of record types and most
114 enumeration types, copy the original declaration. Build the
115 full derivation according to the approach extracted from...
116 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
117 to create the full derivation in all existing cases and also
118 create it in the no-discriminants/discriminants case instead of
119 deriving directly from the full view.
120 (Is_Visible_Component): Remove obsolete code.
121 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
123 2014-08-01 Arnaud Charlet <charlet@adacore.com>
125 * fe.h (GNAT_Mode): New.
126 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
127 reverse SSO in GNAT mode.
129 2014-08-01 Thomas Quinot <quinot@adacore.com>
131 * freeze.adb: Minor reformatting.
133 2014-08-01 Thomas Quinot <quinot@adacore.com>
135 * exp_ch3.adb (Default_Initialize_Object): Do not generate
136 default initialization for an imported object.
138 2014-08-01 Olivier Hainque <hainque@adacore.com>
140 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
141 to the expected FARPROC type instead of void *.
142 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
143 other datastructures.
144 (__gnat_file_time_name_attr): Adjust accordingly.
145 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
147 (__gnat_check_OWNER_ACL): Declare AccessMode
148 parameter as ACCESS_MODE instead of DWORD, in line with callers
150 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
151 unused on win32. Correct cast of "args" on call to spawnvp.
152 (add_handle): Cast realloc calls into their destination types.
153 (win32_wait): Remove declaration and initialization of unused variable.
154 (__gnat_locate_exec_on_path): Cast alloca calls
155 into their destination types.
156 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
157 their destination types.
159 2014-08-01 Gary Dismukes <dismukes@adacore.com>
161 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
162 range checks for conversions between floating-point subtypes
163 when the target and source types are the same.
165 2014-08-01 Robert Dewar <dewar@adacore.com>
167 * exp_aggr.adb: Minor reformatting.
169 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
171 * sem_ch13.adb (Check_Indexing_Functions): Initialize
174 2014-08-01 Arnaud Charlet <charlet@adacore.com>
176 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
177 ALI file before we call the backend (so that gnat2why can append
180 2014-08-01 Thomas Quinot <quinot@adacore.com>
182 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
183 Expand_Packed_Element_Reference): Pass additional Rev_SSO
184 parameter indicating whether the packed array type has reverse
185 scalar storage order to the s-pack* Set/Get routines.
186 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
187 indicating reverse scalar storage order.
189 2014-08-01 Robert Dewar <dewar@adacore.com>
191 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
192 for initial component value in -gnatc or GNATprove mode.
193 (Process_Discriminants): Same fix for default discriminant values.
194 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
197 2014-08-01 Robert Dewar <dewar@adacore.com>
199 * sinfo.ads: Minor comment clarification.
201 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
203 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
204 reformatting. Store the generated pragma Import in the related
205 subprogram as routine Wrap_Imported_Subprogram will need it later.
206 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
207 a private type with discriminants is considered to fall in the
208 category of unconstrained or tagged items.
210 2014-08-01 Arnaud charlet <charlet@adacore.com>
212 * s-os_lib.adb (Open_Append): New functions to open a file for
213 appending. This binds to the already existing (but not used)
215 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
216 to open a file for appending.
217 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
218 to open the ALI file for appending.
220 2014-08-01 Robert Dewar <dewar@adacore.com>
222 * sem_ch8.adb: Minor reformatting.
224 2014-08-01 Yannick Moy <moy@adacore.com>
226 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
227 pragmas from aspects, which need to be inserted in proper order.
229 2014-08-01 Ed Schonberg <schonberg@adacore.com>
231 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
232 Handle properly a type extension that constrains a discriminated
233 derived type that renames other discriminants of an ancestor.
235 2014-08-01 Thomas Quinot <quinot@adacore.com>
237 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
238 s-pack25.adb: Fix minor inconsistencies and typos.
240 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
242 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
243 globals and move certain variables to the "local
244 variable" section. Call Build_Class_Wide_Wrapper when
245 renaming a default actual subprogram with a class-wide actual.
246 (Build_Class_Wide_Wrapper): New routine.
247 (Check_Class_Wide_Actual): Removed.
248 (Find_Renamed_Entity): Code reformatting.
249 (Has_Class_Wide_Actual): Alphabetize. Change the
250 logic of the predicate as the renamed name may not necessarely
251 denote the correct subprogram.
253 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
255 * sem_ch7.adb: Fix minor oversight in condition.
257 2014-08-01 Bob Duff <duff@adacore.com>
259 * projects.texi: Minor documentation improvements.
261 2014-08-01 Robert Dewar <dewar@adacore.com>
263 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
264 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
265 * lib-load.adb: Initialize No_Elab_Code_All field.
266 * lib-writ.adb: Initialize No_Elab_Code_All.
267 * lib.ads, lib.adb: New field No_Elab_Code_All.
268 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
269 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
271 * sem_ch10.adb (Analyze_Context): Processing for
272 No_Elaboration_Code_All removed.
273 (Generate_Parent_References): Moved to Sem_Util.
274 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
275 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
277 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
278 * targparm.adb: Minor comment updates Add comments on ignoring
279 pragma No_Elaboration_Code_All.
281 2014-08-01 Nicolas Roche <roche@adacore.com>
283 * adaint.c (__gnat_set_close_on_exec): Ensure that
284 we can unset "close_on_exec" flag.
286 2014-08-01 Ed Schonberg <schonberg@adacore.com>
288 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
289 the parameter specs of the wrapper program for a primitive operation
290 of a synchronized type that implements an interface, copy the
291 null_exclusion indicator as well.
293 2014-08-01 Robert Dewar <dewar@adacore.com>
295 * sem_eval.ads: Minor reformatting.
297 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
299 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
300 to go down the chain of private derivations.
301 * freeze.adb (Freeze_Entity): Fix typo in comment.
303 2014-08-01 Ed Schonberg <schonberg@adacore.com>
305 * sem_ch3.adb (Access_Type_Declaration): If designated type is
306 a limited view, create a master entity (as is already done for
307 class-wide types) in case the full view designates a type that
309 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
310 and the designated type is a limited view, use the non-limited
313 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
315 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
316 (DECL_FUNCTION_STUB): Likewise.
317 (SET_DECL_FUNCTION_STUB): Likewise.
318 (DECL_PARM_ALT_TYPE): Likewise.
319 (SET_DECL_PARM_ALT_TYPE): Likewise.
320 (TYPE_VAX_FLOATING_POINT_P): Delete.
321 (TYPE_DIGITS_VALUE): Likewise.
322 (SET_TYPE_DIGITS_VALUE): Likewise.
323 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
324 (malloc32_decl): Delete.
325 (build_vms_descriptor): Likewise.
326 (build_vms_descriptor32): Likewise.
327 (fill_vms_descriptor): Likewise.
328 (convert_vms_descriptor): Likewise.
329 (TARGET_ABI_OPEN_VMS): Likewise.
330 (TARGET_MALLOC64): Likewise.
331 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
332 (gnat_to_gnu_entity): Call it to add the original type as a parallel
333 type to the implementation type of a packed array type.
334 <E_Procedure>: Remove now obsolete kludge.
335 <E_Exception>: Delete obsolete comment.
336 <object>: Small tweak.
337 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
338 for the descriptor passing mechanism.
339 (gnat_to_gnu_param): Likewise.
340 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
341 (gnat_print_type): Adjust.
342 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
343 (vms_builtin_establish_handler_decl): Delete.
344 (gnat_vms_condition_handler_decl): Likewise.
345 (establish_gnat_vms_condition_handler): Likewise.
346 (build_function_stub): Likewise.
347 (Subprogram_Body_to_gnu): Do not call above functions.
348 (Call_to_gnu): Remove support for the descriptor passing mechanism.
349 * gcc-interface/utils.c (make_descriptor_field): Delete.
350 (build_vms_descriptor32): Likewise.
351 (build_vms_descriptor): Likewise.
352 (fill_vms_descriptor): Likewise.
353 (convert_vms_descriptor64): Likewise.
354 (convert_vms_descriptor32): Likewise.
355 (convert_vms_descriptor): Likewise.
356 * gcc-interface/utils.c (unchecked_convert): Likewise.
357 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
359 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
361 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
362 type and get_unpadded_type for the longest FP type.
363 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
364 (convert_with_check): Adjust formatting and remove FIXME.
366 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
368 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
369 Do not convert the RM bounds to the base type.
370 (E_Floating_Point_Subtype): Likewise.
371 (E_Array_Subtype): Convert the bounds to the base type.
372 * gcc-interface/trans.c (get_type_length): New function.
373 (Attribute_to_gnu) <Range_Length>: Call it.
375 (Loop_Statement_to_gnu): Convert the bounds to the base type.
376 (gnat_to_gnu) <N_In>: Likewise.
377 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
378 bounds to the base type.
379 (create_range_type): Likewise.
380 (convert): Convert the bounds to the base type for biased types.
381 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
384 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
386 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
387 incorrect implicit type derivation.
388 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
391 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
393 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
394 prefix of attribute Loop_Entry.
395 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
396 Loop_Variant with respect to an enclosing loop (if any).
397 (Contains_Loop_Entry): Update the parameter profile and all
398 calls to this routine.
399 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
400 for the corresponding body before determining the nature of the
401 ultimate alias's declarative node.
403 2014-08-01 Robert Dewar <dewar@adacore.com>
405 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
407 2014-08-01 Robert Dewar <dewar@adacore.com>
409 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
410 constraint error node since it is a list member.
412 2014-08-01 Robert Dewar <dewar@adacore.com>
414 * sem_warn.adb: Minor reformatting.
416 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
418 * einfo.adb (Underlying_Type): Return the underlying full view
419 of a private type if present.
420 * freeze.adb (Freeze_Entity):
421 Build a single freeze node for partial, full and underlying full
423 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
424 missing guard before the access to the Underlying_Full_View.
425 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
426 full view if present.
427 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
429 2014-08-01 Ed Schonberg <schonberg@adacore.com>
431 * sem_res.adb (Resolve_Entry_Call): When an entry has
432 preconditions, the entry call is wrapped in a procedure call
433 that incorporates the precondition checks. To prevent a double
434 expansion, with possible duplication of extra formals, that
435 procedure call must only be pre-analyzed and resolved. Expansion
436 takes place upon return to the caller Resolve_Call.
438 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
440 * sem_res.adb (Resolve_Call): Do not perform
441 GNATprove-specific inlining while within a generic.
443 2014-08-01 Ed Schonberg <schonberg@adacore.com>
445 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
446 case expression with incompatible alternatives, when the first
447 alternative is overloaded.
449 2014-08-01 Ed Schonberg <schonberg@adacore.com>
451 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
452 to create the name of the parameterless call, rather than
453 New_Copy, to preserve the tree structure when the name is a
454 complex expression, e.g. a selected component that denotes a
455 protected operation, whose prefix is itself a selected component.
457 2014-08-01 Ed Schonberg <schonberg@adacore.com>
459 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
460 Unit_Declaration_Node to retrieve body when inlining, to handle
461 properly subprogram child units.
463 2014-08-01 Robert Dewar <dewar@adacore.com>
465 * sem_attr.adb: Minor reformatting.
467 2014-08-01 Vincent Celier <celier@adacore.com>
469 * debug.adb: Minor documentation addition for -dn switch.
471 2014-08-01 Robert Dewar <dewar@adacore.com>
473 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
474 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
475 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
476 In several places, use the Is_OK version as suggested by the spec.
478 2014-08-01 Vincent Celier <celier@adacore.com>
480 * gnatcmd.adb: Revert last change which was not correct.
482 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
484 * freeze.adb (Find_Constant): Ensure that the constant being
485 inspected is still an object declaration (i.e. not a renaming).
487 2014-08-01 Ed Schonberg <schonberg@adacore.com>
489 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
490 An attribute_reference to Loop_Entry denotes an iterator
491 specification: its prefix is an object, as is the case for 'Old.
492 b) If the domain of iteration is an expression whose type has
493 the Iterable aspect defined, this is an iterator specification.
495 2014-08-01 Robert Dewar <dewar@adacore.com>
497 * gnatcmd.adb: Minor reformatting.
499 2014-08-01 Robert Dewar <dewar@adacore.com>
501 * atree.ads (Info_Messages): New counter.
502 * err_vars.ads: Minor comment update.
503 * errout.adb (Delete_Warning_And_Continuations): Deal
504 with new Info_Messages counter.
505 (Error_Msg_Internal): ditto.
506 (Delete_Warning): ditto.
508 (Write_Error_Summary): ditto.
509 (Output_Messages): ditto.
510 (To_Be_Removed): ditto.
511 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
512 (Compilation_Errors): ditto.
513 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
516 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
517 * gnat_ugn.texi: Document that -gnatwe does not affect info
520 2014-08-01 Robert Dewar <dewar@adacore.com>
522 * debug.adb: Document debug switch -gnatd.Z.
523 * sem.adb (Semantics): Force expansion on in no or configurable
526 2014-08-01 Ed Schonberg <schonberg@adacore.com>
528 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
529 unchecked conversion denotes an iterator specification. Such a
530 conversion will be inserted in the context of an inlined call
531 when needed, and its argument is always an object.
533 2014-08-01 Robert Dewar <dewar@adacore.com>
535 * make.adb, makeutl.ads: Minor reformatting.
536 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
539 2014-08-01 Tristan Gingold <gingold@adacore.com>
541 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
543 2014-08-01 Javier Miranda <miranda@adacore.com>
545 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
547 * debug.adb: Updating documentation.
548 * exp_ch6.adb (Expand_Call): Remove assertion.
550 2014-08-01 Robert Dewar <dewar@adacore.com>
552 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
553 sem_res.adb: Minor reformatting.
555 2014-08-01 Vincent Celier <celier@adacore.com>
557 * make.adb (Initialize): Set Keep_Temporary_Files to True when
559 * makeusg.adb: Add line for new switch --keep-temp-files.
560 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
561 * opt.ads (Keep_Temporary_Files): Document that it is also used
562 by gnatmake and gprbuild.
563 * switch-m.adb: Recognize new switch --keep-temp-files.
565 2014-08-01 Tristan Gingold <gingold@adacore.com>
567 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
568 * exp_ch9.adb (Make_Task_Create_Call): ... here.
570 2014-08-01 Vincent Celier <celier@adacore.com>
572 * gnat1drv.adb: Do not try to get the target parameters when
575 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
577 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
578 declaration subject to No_Initialization.
580 2014-08-01 Ed Schonberg <schonberg@adacore.com>
582 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
583 is a subtype with dynamic predicates, or a non-static subtype
585 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
586 expression if subtype has a dynamic predicate.
587 (Constrain_Index): Reject subtype indication if subtype mark
589 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
590 (Make_Index): If index is a subtype indication, itype inhereits
591 predicate flags for subsequent testing.
592 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
593 procedure Check_Predicate_Use, to reject illegal uses of domains
594 of iteration that have dynamic predicates.
595 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
596 indication to which a predicate applies.
597 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
598 prevent cascaded errors when subtype is invalid.
600 2014-08-01 Robert Dewar <dewar@adacore.com>
602 * sem_ch10.adb: Minor reformatting.
604 2014-08-01 Ed Schonberg <schonberg@adacore.com>
606 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
607 because either type may be a subtype of the other.
609 2014-08-01 Vincent Celier <celier@adacore.com>
611 * makeusg.adb: Add documentation for debug switch -dn.
613 2014-08-01 Ed Schonberg <schonberg@adacore.com>
615 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
616 expression with standard operator and type, for pretty-printing
617 use, when in ASIS_Mode. When generating code dimensional analysis
618 is not involved and dimension expressions are handled statically,
619 and other operators are resolved in the usual way.
621 2014-08-01 Ed Schonberg <schonberg@adacore.com>
623 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
624 Parent_Subtype in ASIS mode, leads to several failures.
625 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
626 if the prefix is a type extension, check whether component is
627 declared in the parent type, possibly in a parent unit. Needed
628 in ASIS mode when Parent_Subtype is not set.
630 2014-08-01 Robert Dewar <dewar@adacore.com>
632 * sem_prag.adb: Minor reformatting.
633 * s-regpat.adb: Minor reformatting.
634 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
635 Treat_As_Volatile on constants.
637 2014-08-01 Tristan Gingold <gingold@adacore.com>
639 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
641 2014-08-01 Ed Schonberg <schonberg@adacore.com>
643 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
644 warning on a with_clause created for the renaming of a parent
645 unit in an explicit with_clause.
647 2014-08-01 Ed Schonberg <schonberg@adacore.com>
649 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
650 Set Is_Imported flag at once, to simplify subsequent legality
651 checks. Reject the aspect on an object whose declaration has an
652 explicit initial value.
653 * sem_prag.adb (Process_Import_Or_Interface): Use original node
654 to check legality of an initial value for an imported entity.
655 Set Is_Imported flag in case of error to prevent cascaded errors.
656 Do not set the Is_Imported flag if the pragma comes from an
657 aspect, because it is already done when analyzing the aspect.
659 2014-08-01 Emmanuel Briot <briot@adacore.com>
661 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
663 2014-08-01 Robert Dewar <dewar@adacore.com>
665 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
668 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
670 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
671 checks when the related variable comes from source.
672 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
673 when the related actual parameter comes from source. Update comment.
674 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
675 type of an array of pointers when the designated type is
676 class-wide and its root type is the record being currently frozen.
678 2014-08-01 Ed Schonberg <schonberg@adacore.com>
680 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
681 of renaming declaration created for domain of iteration.
682 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
683 for error messages on aggregates whose index subtypes have
684 predicates. The new placement avoids posting messages on previous
685 subtype declarations rather than on the aggregate itself.
686 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
687 Add_Dispatching_Operation, to handle properly the overriding of
688 the predefined operations on controlled types, when the partial
689 view of a type is not visibly controlled.
691 2014-08-01 Ben Brosgol <brosgol@adacore.com>
693 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
696 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
698 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
699 assertion check as the attribute is defined for all entities.
700 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
701 check as the attribute is defined for all entities.
702 * einfo.ads Update the documentation of attribute
703 Is_Hidden_Non_Overridden_Subprogram.
704 * sem_ch7.adb (Install_Package_Entity): No need to check the
705 entity kind of the Id.
706 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
707 usage. Ensure that the homographs are of the same entity kind
708 and not fully conformant.
709 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
711 2014-08-01 Robert Dewar <dewar@adacore.com>
713 * inline.adb: Minor code reorganization.
714 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
716 2014-08-01 Robert Dewar <dewar@adacore.com>
718 * inline.adb, s-os_lib.ads: Minor reformatting.
720 2014-08-01 Arnaud Charlet <charlet@adacore.com>
722 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
723 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
726 2014-08-01 Yannick Moy <moy@adacore.com>
728 * inline.adb (Cannot_Inline): Issue info message instead of
729 warning for subprograms not inlined in GNATprove mode.
730 * sem_res.adb (Resolve_Call): Take body into account for deciding
731 whether subprogram can be inlined in GNATprove mode or not.
733 2014-08-01 Claire Dross <dross@adacore.com>
735 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
736 of Get_First_Parent_With_External_Axiomatization_For_Entity for
738 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
739 for parameters of packages with external axiomatization.
741 2014-08-01 Robert Dewar <dewar@adacore.com>
743 * sem_res.adb: Minor comment addition.
745 2014-08-01 Arnaud Charlet <charlet@adacore.com>
747 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
748 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
750 * s-os_lib.ads: Minor reformatting.
752 2014-08-01 Arnaud Charlet <charlet@adacore.com>
754 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
755 completely previous code since only GCC back-ends are prepared
756 to handle e.g. 'Machine attribute.
757 * targparm.adb, targparm.ads: Remove remaining refs and
758 handling of OpenVMS_On_Target, VAX_Float_On_Target and
759 RTX_RTSS_Kernel_Module_On_Target.
760 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
763 2014-08-01 Robert Dewar <dewar@adacore.com>
765 * exp_dist.adb, exp_attr.adb: Minor reformatting.
766 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
767 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
768 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
769 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
770 improper use of shall.
772 2014-08-01 Robert Dewar <dewar@adacore.com>
774 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
775 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
776 exp_ch3.adb: Minor reformatting & code reorganization.
778 2014-08-01 Robert Dewar <dewar@adacore.com>
780 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
781 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
782 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
783 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
784 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
786 * gcc-interface/decl.c, gcc-interface/Makefile.in,
787 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
789 2014-08-01 Pascal Obry <obry@adacore.com>
791 * s-os_lib.ads: Rename File_Size to Large_File_Size.
793 2014-08-01 Robert Dewar <dewar@adacore.com>
795 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
796 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
797 a-numaux-libc-x86.ads: Fix bad package header comments.
798 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
799 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
800 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
801 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
802 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
803 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
804 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
805 s-os_lib.adb: Remove VMS-specific code.
807 2014-08-01 Arnaud Charlet <charlet@adacore.com>
809 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
810 previous state in CodePeer_Mode.
812 2014-08-01 Robert Dewar <dewar@adacore.com>
814 * hostparm.ads: Put back definition of OpenVMS as False to aid
815 the transition process.
816 * sem_ch7.adb: Minor reformatting.
817 * prj-env.adb: Minor code fix.
818 * gnat_rm.texi: Complete previous change.
819 * sem_ch3.adb: Minor reformatting.
820 * sem_ch6.adb: Minor reformatting.
821 * sem_elab.adb: Minor reformatting.
822 * exp_strm.adb: Complete previous change.
824 2014-08-01 Vincent Celier <celier@adacore.com>
826 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
827 warning when a constant is unreferenced and its type has pragma
828 Unreferenced_Objects.
830 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
832 * einfo.adb: Flag2 is now known as
833 Is_Hidden_Non_Overridden_Subprogram.
834 (Is_Hidden_Non_Overridden_Subprogram): New routine.
835 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
836 (Write_Entity_Fields): Output Flag2.
837 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
838 along with occurrences in entities.
839 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
840 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
842 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
843 declared non-overriden homographs into visibility.
844 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
845 implicitly declared non-overriden homographs.
846 (Hide_Non_Overridden_Subprograms): New routine.
848 2014-08-01 Robert Dewar <dewar@adacore.com>
850 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
852 * prj-conf.adb: Minor reformatting.
853 * xr_tabls.adb (Read_File): Restore code which was enabled on
854 non VMS platforms before.
855 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
856 * sem_ch5.adb: Minor reformatting.
857 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
858 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
859 Remove VMS-specific code.
861 2014-08-01 Vincent Celier <celier@adacore.com>
863 * make.adb (Await_Compile): Remove loop that was only needed
866 2014-08-01 Robert Dewar <dewar@adacore.com>
868 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
869 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
870 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
871 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
872 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
873 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
874 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
875 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
876 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
877 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
878 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
879 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
880 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
881 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
882 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
883 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
884 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
885 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
886 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
887 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
888 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
889 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
890 specific code and comments.
892 2014-08-01 Ed Schonberg <schonberg@adacore.com>
894 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
895 Check_Reverse_Iteration, to verify the legality of the Reverse
896 indicator on various container types, and to detect illegal
897 reverse iterations on containers that only supoort forward
900 2014-08-01 Vincent Celier <celier@adacore.com>
902 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
903 procedure GNATCmd the relevant declarations from packages VMS_Cmds
905 * gnatcmd.ads: Update comments to remove any trace of VMS
907 2014-08-01 Ed Schonberg <schonberg@adacore.com>
909 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
910 defaulted actual that is an operator, before building wrapper
911 for it in GNATprove mode. Restrict construction of wrapper to
912 actuals that are operators.
914 2014-08-01 Vincent Celier <celier@adacore.com>
916 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
917 specific packages no longer needed.
919 2014-08-01 Pascal Obry <obry@adacore.com>
921 * s-os_lib.ads (System.CRTL): Move with clause to body.
922 (File_Size): New type.
923 (File_Length64): Use it.
924 (File_Length): Restore previous spec returning a Long_Integer.
925 * s-os_lib.adb (System.CRTL): Move with clause here.
927 2014-08-01 Vincent Celier <celier@adacore.com>
929 * mlib-prj.adb: Update comments to remove any mention of VMS.
931 2014-08-01 Arnaud Charlet <charlet@adacore.com>
933 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
934 xgnatugn.adb and ug_words.
936 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
938 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
939 expansion can be avoid for Machine, Model and Rounding.
940 (Is_Inline_Floating_Point_Attribute): Return true for Machine
941 & Model, as well as Rounding if wrapped in a conversion to an
943 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
944 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
945 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
946 * gcc-interface/misc.c (enumerate_modes): Compute it.
947 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
948 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
950 (Attribute_to_gnu) <Attr_Model>: New case.
951 <Attr_Machine>): Likewise.
952 (convert_with_check): Test
953 fp_arith_may_widen variable.
955 2014-08-01 Pascal Obry <obry@adacore.com>
957 * adaint.h (GNAT_FOPEN): New definition for Windows.
958 (GNAT_OPEN): Likewise.
959 (GNAT_STAT): Likewise.
960 (GNAT_FSTAT): Likewise.
961 (GNAT_LSTAT): Likewise.
962 (GNAT_STRUCT_STAT): Likewise.
963 * adaint.c (__gnat_stat): Fix computation of file size for
966 2014-08-01 Vincent Celier <celier@adacore.com>
968 * Makefile.rtl: Minor comment update.
970 2014-08-01 Vincent Celier <celier@adacore.com>
972 * Make-generated.in: Remove dependencies for vms-help.
974 2014-08-01 Gary Dismukes <dismukes@adacore.com>
976 * makeutl.ads, opt.ads: Minor grammar fixes.
977 * makeutl.adb: Minor code reorganization.
979 2014-08-01 Arnaud Charlet <charlet@adacore.com>
981 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
982 gnatsym.adb: Remove gnatsym (VMS only tool).
984 2014-08-01 Ben Brosgol <brosgol@adacore.com>
986 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
987 conditionalization from gnat_ugn.texi and projects.texi, and updated
988 (considerably simplified) xgnatugn.adb, to be removed soon.
990 2014-08-01 Vincent Celier <celier@adacore.com>
992 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
993 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
994 instead of Debug.Debug_Flag_S.
995 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
996 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
998 * makeutl.ads (No_Exit_Message_Option): New constant string
999 for switch --no-exit-message.
1000 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
1001 * switch-m.adb (Scan_Make_Switches): Recognize new switch
1004 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1006 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
1007 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
1009 2014-08-01 Javier Miranda <miranda@adacore.com>
1011 * inline.ads (Inlined_Calls, Backend_Calls,
1012 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
1013 moved to inline.adb (Cannot_Inline): Update documentation.
1014 (Check_And_Build_Body_To_Inline): Renamed.
1015 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1016 * inline.adb (Check_Inlining_Restrictions): New local variable.
1017 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
1018 Backend_Not_Inlined_Subps): Declarations moved here
1019 from inline.ads (Number_Of_Statements): Removed.
1020 (Remove_Pragmas): Avoid duplicated version of this subprogram.
1021 (Build_Body_To_Inline): Code cleanup.
1022 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
1023 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
1024 (Check_Body_To_Inline): Removed.
1025 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
1026 (Has_Excluded_Declaration): No action if not
1027 Check_Inlining_Restrictions.
1028 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
1029 (Initialize): Initialize the lists of inlined calls and subprograms.
1030 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1031 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
1032 to Check_And_Build_Body_To_Inline since it has been renamed as
1033 Check_And_Split_Unconstrained_Function
1034 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
1036 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
1038 2014-08-01 Vincent Celier <celier@adacore.com>
1040 * debug.adb: Add documentation for new debug switch -ds.
1041 * make.adb (List_Bad_Compilations): Do not issue any message
1042 when switch -ds is specified.
1043 * makeutl.adb (Fail_Program): Do not issue any message when
1045 (Finish_Program): Ditto.
1047 2014-08-01 Robert Dewar <dewar@adacore.com>
1049 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
1050 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
1051 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
1052 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
1053 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
1054 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
1055 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
1056 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
1057 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
1058 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
1059 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
1060 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
1061 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
1062 s-tratas.ads: Minor fix to copyright notices.
1064 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1066 * sinfo.ads: Remove long obsolete comment.
1067 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1069 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
1070 * sem_ch3.adb: Minor reformatting.
1072 2014-08-01 Pascal Obry <obry@adacore.com>
1074 * cstreams.c: Only enable large file support on know supported
1075 platforms. Add missing defines/includes.
1077 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1079 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
1080 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
1081 on generic units that contain constructs that forbid subtypes
1083 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
1084 Inherit flags indicating the presence of predicates in subtype
1085 declarations with and without constraints.
1086 (Inherit_Predicate_Flags): Utility for the above.
1087 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
1088 indicate that the actual cannot have predicates, and preserve
1089 warning. In an instance, report error if actual has predicates
1090 and the construct appears in a package declaration.
1091 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
1092 for an actual with predicates, if the corresponding formal
1093 carries No_Predicate_On_Actual or (in the case of a loop)
1094 No_Dynamic_Predicate_On_Actual.
1095 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
1096 Static_Predicate function if the type is non-static (in the
1097 presence of previous errors),
1098 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
1099 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
1100 generic contract on actuals that cannot have predicates.
1102 2014-08-01 Pascal Obry <obry@adacore.com>
1104 * a-direct.adb (C_Size): Returns an int64.
1105 * osint.adb (System.CRTL): New with clause.
1106 (File_Length.Internal): Returns an int64.
1107 * s-os_lib.ads (File_Length): Returns an int64.
1109 2014-08-01 Robert Dewar <dewar@adacore.com>
1111 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
1112 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
1113 osint.adb, krunch.adb: Minor reformatting.
1115 2014-08-01 Robert Dewar <dewar@adacore.com>
1117 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
1118 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
1119 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
1120 Remove VMS-specific code.
1121 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
1123 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1125 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
1126 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
1127 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
1128 mlib.ads, tempdir.adb: Remove VMS handling.
1130 2014-08-01 Pascal Obry <obry@adacore.com>
1132 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
1133 (__gnat_named_file_length): Likewise.
1134 (__gnat_file_length_attr): Likewise.
1135 * a-direct.adb (C_Size): Use size_t as returned type.
1136 * osint.adb (File_Length): Adjust spec for Internal routine
1138 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
1139 (System.CRTL): With claused moved to spec.
1140 * s-os_lib.ads (System.CRTL): With clause moved to here.
1142 2014-08-01 Pascal Obry <obry@adacore.com>
1144 * adaint.h, adaint.c (__gnat_open): Added.
1145 * s-crtl.ads (open): Import __gnat_open for large file support.
1147 2014-08-01 Robert Dewar <dewar@adacore.com>
1149 * sem_case.adb (Dup_Choice): Improve message for integer constants.
1151 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1153 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
1155 2014-08-01 Pascal Obry <obry@adacore.com>
1157 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
1158 * adaint.c (GNAT_OPEN): Uses new macro where needed.
1160 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1162 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
1164 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
1165 * gcc-interface/gigi.h: Update comment.
1167 2014-07-31 Javier Miranda <miranda@adacore.com>
1169 * debug.adb Remove documentation of -gnatd.k (no longer needed).
1170 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
1171 * inline.ads (Backend_Inlined_Subps): New
1172 Elist. (Backend_Not_Inlined_Subps): New Elist.
1173 (Has_Excluded_Declaration): Declaration previously located in
1174 * inline.adb (Has_Excluded_Statement): Declaration previously
1175 located in inline.adb
1176 * inline.adb (Has_Single_Return): Moved out of
1177 Build_Body_To_Inline to avoid having duplicated code.
1178 (Number_Of_Statements): New subprogram.
1179 (Register_Backend_Inlined_Subprogram): New subprogram.
1180 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
1181 (Add_Inlined_Subprogram): Register backend inlined subprograms and
1182 also register subprograms that cannot be inlined by the backend.
1183 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
1184 to avoid having duplicated code. Replace occurrences of
1185 Debug_Flag_Dot_K by Back_End_Inlining.
1186 * sem_res.adb (Resolve_Call): Code cleanup.
1187 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
1188 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
1189 (List_Inlining_Info): Add listing of subprograms passed to the
1190 backend and listing of subprograms that cannot be inlined by
1192 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
1193 Debug_Flag_Dot_K by Back_End_Inlining.
1195 2014-07-31 Robert Dewar <dewar@adacore.com>
1197 * nlists.ads: Minor code fix (remove unwise Inline for
1200 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1202 * einfo.adb: Remove VMS specific code.
1203 * exp_attr.adb: Remove VAX specific code.
1204 * set_targ.adb: Remove handling of VAX_Float.
1205 * sem_vfpt.adb: Remove references to Vax_Native.
1206 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
1208 2014-07-31 Robert Dewar <dewar@adacore.com>
1210 * sem_ch4.adb: Minor reformatting.
1212 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1214 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
1215 to VMS. Misc clean ups.
1216 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
1218 2014-07-31 Robert Dewar <dewar@adacore.com>
1220 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
1221 exp_prag.adb, frontend.adb, interfac.ads,
1222 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
1223 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
1224 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
1225 snames.ads-tmpl: Remove obsolete VMS-specific code.
1227 2014-07-31 Robert Dewar <dewar@adacore.com>
1229 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
1231 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1233 * a-intnam-linux.ads: Minor: update obsolete comments.
1234 * s-taasde.adb: Minor: fix comment header.
1236 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1238 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
1239 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
1240 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
1241 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
1242 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
1243 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
1244 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
1245 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
1246 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
1247 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
1248 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
1249 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
1250 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
1251 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
1252 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
1253 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
1254 * namet.h (Is_Non_Ada_Error): Remove.
1256 2014-07-31 Robert Dewar <dewar@adacore.com>
1258 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
1261 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1263 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
1264 which demonstrates the expansion of while loops subject to
1265 attribute 'Loop_Entry. The condition of a while loop along with
1266 related condition actions is now wrapped in a function. Instead
1267 of repeating the condition, the expansion now calls the function.
1269 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1271 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
1272 error when reporting of missing values in a case statement for
1273 a type with a static predicate.
1274 (Check_Choices): Reject a choice given by a subtype to which a
1275 Dynamic_Predicate applies.
1276 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
1277 Has_Dynamic_Predicate_Aspect flag from parent.
1279 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1281 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
1282 cannot apply to a subtype of an incomplete type.
1283 (Is_Static_Choice): Treat an Others_Clause as static. The
1284 staticness of the expression and of the range are checked
1287 2014-07-31 Pascal Obry <obry@adacore.com>
1289 * adaint.h (__gnat_ftell64): Added.
1290 (__gnat_fseek64): Added.
1292 * cstreams.c (__int64): Removed.
1294 2014-07-31 Pascal Obry <obry@adacore.com>
1296 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
1297 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
1298 (ftell64): Always returns a 64bit value.
1299 * cstreams.c (int64): New definition.
1300 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
1301 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
1302 uses ftello() on UNIX.
1303 (__gnat_fseek64): Offset is always a 64bit value. The
1304 implementation now uses fseeko() on UNIX.
1305 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
1306 always use fseek64 to set the offset.
1307 (Size): Simplify code, always use fseek64/ftell64.
1308 * s-direio.ads (Count): Now an int64.
1309 * g-socket.ads (Vector_Element): Adjust definition for Length
1310 to be a size_t. This matches the C definition and avoid using
1311 a 64bit integer on 32bit platforms now that Count is always 64bit.
1312 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
1313 (C_Recvmsg): Change some conversion to account for change in
1315 (C_Sendmsg): Likewise.
1317 2014-07-31 Robert Dewar <dewar@adacore.com>
1319 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
1320 * debug.adb: Remove documentation of -gnatdm flag.
1321 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
1324 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1326 * lib-writ.adb (Write_Unit_Information): Fix case where U =
1329 2014-07-31 Claire Dross <dross@adacore.com>
1331 * exp_util.adb, exp_util.ads
1332 (Get_First_Parent_With_External_Axiomatization_For_Entity):
1333 New routine to find the first parent of an entity with
1334 a pragma Annotate (GNATprove, External_Axiomatization).
1335 (Has_Annotate_Pragma_For_External_Axiomatization): New function
1336 to check if a package has a pragma Annotate (GNATprove,
1337 External_Axiomatization).
1338 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
1339 flag on the entity for the declaration created for a formal
1340 subprogram in an instance. This is a renaming declaration,
1341 or in GNATprove_Mode the declaration of an expression function
1342 that captures the axiomatization of the actual.
1343 * sem_ch6.adb (Analyze_Expression_Function): For a
1344 Generic_Actual_Subprogram, place body immediately after the
1345 declaration because it may be used in a subsequent declaration
1347 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
1348 the actual is a function, not an operator. Handle functions with
1349 one and two parameters and binary and unary operators.
1351 2014-07-31 Pascal Obry <obry@adacore.com>
1353 * cstreams.c (__gnat_is_regular_file_fd): Removed.
1354 * adaint.c (__gnat_is_regular_file_fd): Added.
1356 2014-07-31 Robert Dewar <dewar@adacore.com>
1358 * exp_strm.adb: Minor reformatting.
1360 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1362 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
1363 Analyze_Associations, to create a wrapper around operators that
1364 are actuals to formal subprograms. This is done in GNATProve
1365 mode in order to propagate the contracts of the operators to
1366 the body of the instance.
1368 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1370 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
1371 legal if within an aspect specification for a generic subprogram.
1373 2014-07-31 Javier Miranda <miranda@adacore.com>
1375 * gnat1drv.adb (Back_End_Inlining): Set to false if
1376 Suppress_All_Inlining is set.
1377 * debug.adb: Adding documentation for -gnatd.z.
1378 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
1379 processing to -gnatn1 for calls to Inline_Always routines.
1380 (Add_Inlined_Subprogram): Remove previous patch.
1382 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1384 * sem_ch13.adb (Check_One_Function): Apply properly the static
1385 semantic rules for indexing aspects and the functions they denote.
1387 2014-07-31 Javier Miranda <miranda@adacore.com>
1389 * debug.adb: Complete documentation of -gnatd.z.
1391 2014-07-31 Bob Duff <duff@adacore.com>
1393 * gnat_ugn.texi: Minor doc fixes.
1395 2014-07-31 Robert Dewar <dewar@adacore.com>
1397 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
1400 2014-07-31 Tristan Gingold <gingold@adacore.com>
1402 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
1403 (Packed_Bytes1): Make component aliased.
1405 2014-07-31 Robert Dewar <dewar@adacore.com>
1407 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
1409 2014-07-31 Robert Dewar <dewar@adacore.com>
1411 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
1414 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1416 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
1417 on array references here, now done more selectively in trans.c.
1419 2014-07-31 Doug Rupp <rupp@adacore.com>
1421 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
1423 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1425 * sem_util.adb (Is_Effectively_Volatile): New routine.
1427 2014-07-31 Fedor Rybin <frybin@adacore.com>
1429 * gnat_ugn.texi: Document --test-duration option for gnattest.
1431 2014-07-31 Javier Miranda <miranda@adacore.com>
1432 Eric Botcazou <ebotcazou@adacore.com>
1434 * opt.ads (Back_End_Inlining): New variable which controls
1435 activation of inlining by back-end expansion.
1436 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
1437 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
1438 the body to be inlined by the frontend if Back_End_Inlining
1440 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
1441 (Expand_Call): If backend inlining is enabled let the backend to
1442 handle inlined subprograms.
1443 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
1444 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
1445 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
1446 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
1448 * debug.adb Document -gnatd.z
1449 * fe.h Import Back_End_Inlining variable.
1450 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
1451 enabled then declare attribute "always inline"
1452 * gcc-interface/decl.c, gcc-interface/trans.c,
1453 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
1455 2014-07-31 Robert Dewar <dewar@adacore.com>
1457 * a-ngelfu.ads: Minor comment fix.
1459 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1461 * freeze.adb (Freeze_Record_Type): Replace all calls to
1462 Is_SPARK_Volatile with Is_Effectively_Volatile and update
1464 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
1465 Replace all calls to Is_SPARK_Volatile with
1466 Is_Effectively_Volatile and update related comments.
1467 * sem_ch5.adb (Analyze_Iterator_Specification,
1468 Analyze_Loop_Parameter_Specification): Replace all calls to
1469 Is_SPARK_Volatile with Is_Effectively_Volatile and update
1471 * sem_ch6.adb (Process_Formals): Replace all calls to
1472 Is_SPARK_Volatile with Is_Effectively_Volatile and update
1474 * sem_ch12.adb (Instantiate_Object): Replace the call to
1475 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
1476 and update related comment.
1477 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
1478 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
1479 with Is_Effectively_Volatile and update related comments.
1480 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
1481 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
1482 update related comments.
1483 * sem_util.adb (Has_Enabled_Property,
1484 Variable_Has_Enabled_Property): Replace all calls
1485 to Is_SPARK_Volatile with Is_Effectively_Volatile and
1486 update related comments.
1487 (Is_Effectively_Volatile): New routine.
1488 (Is_Effectively_Volatile_Object): New routine.
1489 (Is_SPARK_Volatile): Removed.
1490 (Is_SPARK_Volatile_Object): Removed.
1491 * sem_util.ads (Is_Effectively_Volatile): New routine.
1492 (Is_Effectively_Volatile_Object): New routine.
1493 (Is_SPARK_Volatile): Removed.
1494 (Is_SPARK_Volatile_Object): Removed.
1496 2014-07-31 Pascal Obry <obry@adacore.com>
1498 * s-fileio.adb (Open): Make sure a shared file gets inserted into
1499 the global list atomically. This ensures that the file descriptor
1500 won't be freed because another tasks is closing the file.
1502 2014-07-31 Robert Dewar <dewar@adacore.com>
1504 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
1505 generation of _FIRST and _LAST variables even in GNATprove_Mode.
1506 * gnat_ugn.texi: Minor editing.
1507 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
1508 aggregate is marked Comes_From_Source if argument is CFS.
1510 2014-07-31 Pascal Obry <obry@adacore.com>
1512 * s-fileio.adb: Remove obsolete comment.
1514 2014-07-31 Vincent Celier <celier@adacore.com>
1516 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
1517 overriding keyword before function to avoid error when compiler
1518 is called with -gnatyO (check overriding indicators).
1520 2014-07-31 Tucker Taft <taft@adacore.com>
1522 * gnat_ugn.texi: Add a paragraph pointing the reader
1523 to the "plugins" example.
1525 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1527 * freeze.adb (Freeze_Expression): Document the
1528 purpose of the parent chain traversal.
1530 2014-07-31 Robert Dewar <dewar@adacore.com>
1532 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
1533 unconstrained fpt ops.
1535 2014-07-31 Pascal Obry <obry@adacore.com>
1537 * s-fileio.adb (Open): Make sure a shared file gets inserted into
1538 the global list atomically. This ensures that the file descriptor
1539 won't be freed because another tasks is closing the file.
1541 2014-07-31 Vincent Celier <celier@adacore.com>
1543 * projects.texi: Minor spelling error fix.
1545 2014-07-31 Robert Dewar <dewar@adacore.com>
1547 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
1548 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
1550 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
1551 * restrict.adb (Process_Restriction_Synonyms): Add handling
1552 of No_Elaboration_Code_All.
1553 * restrict.ads (Process_Restriction_Synonyms): Now handles
1554 No_Elaboration_Code_All.
1555 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
1556 No_Elaboration_Code_All.
1557 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1558 Handle setting of No_Elab_Code in unit information. Handle
1559 No_Elaboration_Code_All.
1560 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
1562 (Name_No_Elaboration_Code_All): New name for pragma processing.
1564 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1566 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
1567 types with a null range and use the Esize of the component
1568 instead of its RM_Size to identify appropriate values.
1570 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1572 * freeze.adb Add with and use clause for Aspects.
1573 (Freeze_Expression): Emit an error when a volatile constant lacks
1574 Boolean aspect Import.
1575 (Has_Boolean_Aspect_Import): New routine.
1577 2014-07-31 Gary Dismukes <dismukes@adacore.com>
1579 * exp_util.adb: Minor reformatting.
1581 2014-07-31 Vincent Celier <celier@adacore.com>
1583 * errutil.adb (Error_Msg): Make sure that all components of
1584 the error message object are initialized.
1586 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1588 * sem_ch4.adb (Try_Container_Indexing): If the container type is
1589 class-wide, use specific type to locate iteration primitives.
1590 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
1591 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
1592 Minor error message reformating.
1593 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
1594 aspect for a derived type.
1596 2014-07-31 Robert Dewar <dewar@adacore.com>
1598 * debug.adb: Document debug flag d.X.
1600 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1602 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
1603 * sem_util.adb (Find_Specific_Type): If type is untagged private,
1604 retrieve full view so that primitive operations can be located.
1605 * exp_disp.adb Move Find_Specific_Type to sem_util.
1606 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
1607 Find_Specific_Type to locate primitive equality.
1608 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
1609 type does not require initialization.
1610 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
1611 body all visibility is established, and the enclosing package
1612 declarations must not be installed.
1614 2014-07-31 Yannick Moy <moy@adacore.com>
1616 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
1617 Make subprogram public.
1619 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1621 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
1622 predicate Discriminated_Size, to distinguish between private
1623 components that depend on discriminants from those whose size
1624 depends on some other non-static expression.
1626 2014-07-31 Nicolas Setton <setton@adacore.com>
1628 * g-exptty.adb (Close): Fix binding to Waitpid: use the
1631 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1633 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
1634 in a discrete range, when 'range was probably intended.
1636 2014-07-31 Robert Dewar <dewar@adacore.com>
1638 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
1640 2014-07-31 Robert Dewar <dewar@adacore.com>
1642 * frontend.adb: Minor reformatting.
1643 * sem.adb: Minor reformatting.
1644 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
1645 identifiers on rewrite.
1646 * par.adb: Minor comment updates.
1647 * a-ngelfu.adb (Cos): Minor simplification.
1648 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
1649 and recovery for bad aspect.
1650 * exp_ch3.adb: Code clean up.
1651 * sem_util.ads: Minor comment correction.
1652 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
1653 * sem_ch3.adb: Code clean up.
1654 * binderr.ads: Minor comment correction.
1656 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1658 * exp_disp.adb (Expand_Interface_Conversion): A call whose
1659 prefix is a static conversion to an interface type that is not
1660 class-wide is not dispatching.
1662 2014-07-31 Robert Dewar <dewar@adacore.com>
1664 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
1665 s-traceb-mastop.adb: Minor reformatting.
1667 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1669 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
1670 expansion, to handle properly visibility of selected components
1673 2014-07-31 Robert Dewar <dewar@adacore.com>
1675 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
1676 * par-ch2.adb (P_Pragma): Set Inside_Depends.
1677 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
1678 Check_Unary_Plus_Or_Minus.
1679 * scans.ads (Inside_Depends): New flag.
1680 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
1681 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
1682 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
1683 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
1684 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
1685 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
1686 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
1688 2014-07-31 Javier Miranda <miranda@adacore.com>
1690 * s-vaflop.adb Move the body of function T_To_G before
1691 T_To_D. Required for frontend inlining.
1692 * inline.adb (Has_Excluded_Contract): New subprogram used to
1693 check if a subprogram inlined by the frontend has contracts
1694 which cannot be inlined.
1696 2014-07-31 Bob Duff <duff@adacore.com>
1698 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
1699 (Call_Chain): Add 1 to number of frames to skip, to account for
1700 the fact that there's one more frame on the stack.
1701 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
1703 2014-07-31 Robert Dewar <dewar@adacore.com>
1705 * checks.adb (Enable_Overflow_Check): More precise setting of
1706 Do_Overflow_Check flag for division.
1708 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1710 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
1711 array types with implementation type.
1713 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1715 * sem_ch10.adb (Process_State): Remove local variable Name. Add
1716 local variable Decl. Partially declare an abstract state by
1717 generating an entity and storing it in the state declaration.
1718 * sem_prag.adb (Create_Abstract_State): Fully declare a
1719 semi-declared abstract state.
1721 2014-07-31 Robert Dewar <dewar@adacore.com>
1723 * prj-nmsc.adb: Minor reformatting.
1725 2014-07-31 Bob Duff <duff@adacore.com>
1727 * s-tasdeb.adb (System.Tasking.Debug): Remove
1728 all usage of the secondary stack from this package.
1730 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1732 * freeze.adb (Freeze_Expression): Update the loop in charge
1733 of finding a proper insertion place for freeze nodes to handle
1734 N_Expression_With_Actions nodes.
1736 2014-07-31 Robert Dewar <dewar@adacore.com>
1738 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
1741 2014-07-31 Pascal Obry <obry@adacore.com>
1743 * prj-nmsc.adb: Minor reformatting.
1745 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1747 * sem_util.adb (Has_Preelaborable_Initialization): Check that
1748 type is tagged before checking whether a user-defined Initialize
1749 procedure is present.
1751 2014-07-31 Gary Dismukes <dismukes@adacore.com>
1753 * a-ngelfu.ads (Sqrt): Augment postcondition.
1755 2014-07-31 Pascal Obry <obry@adacore.com>
1757 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
1758 directory and ALI directory must be different than all object
1759 and library directories of aggregated projects.
1761 2014-07-31 Vincent Celier <celier@adacore.com>
1763 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
1764 to package body, as it is not called from outside. Remove argument
1765 Project_Tree, no longer used. When runtime cannot be found,
1766 call Raise_Invalid_Config instead of failing the program.
1768 2014-07-31 Robert Dewar <dewar@adacore.com>
1770 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
1772 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
1775 2014-07-31 Robert Dewar <dewar@adacore.com>
1777 * gnat_ugn.texi: Document new switch -gnato0.
1778 * sem_ch3.ads: Minor reformatting.
1779 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
1780 (we do not want overflow checks when incrementing elaboration
1782 * einfo.ads: Minor reformatting.
1784 2014-07-31 Robert Dewar <dewar@adacore.com>
1786 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
1787 * s-arit64.adb: Minor reformatting.
1789 2014-07-31 Robert Dewar <dewar@adacore.com>
1791 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
1792 checking is enabled except in GNAT_Mode.
1793 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
1794 (suppress overflow checks).
1796 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1798 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
1799 invariant procedure for an internally generated subtype that is
1800 created for an object of a class-wide type.
1802 2014-07-31 Vincent Celier <celier@adacore.com>
1804 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
1806 2014-07-31 Gary Dismukes <dismukes@adacore.com>
1808 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
1809 exp_disp.adb: Minor reformatting.
1811 2014-07-31 Robert Dewar <dewar@adacore.com>
1813 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
1814 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
1815 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
1818 2014-07-31 Robert Dewar <dewar@adacore.com>
1820 * sem_ch13.adb: Minor reformatting.
1822 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1824 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
1825 is an unchecked_union, warn that invariants will not be checked
1826 on components that have them.
1828 2014-07-31 Robert Dewar <dewar@adacore.com>
1830 * freeze.adb (Freeze_Entity): Check for error of
1831 Type_Invariant'Class applied to a untagged type.
1832 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
1833 as null body, so that we perform error checks even if expansion
1836 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1838 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
1839 is already present, nothing to do.
1840 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
1841 component, check whether the access type has an invariant before
1842 checking the designated type.
1843 (Build_Record_Invariant_Proc): Change suffix of generated
1844 name to prevent ambiguity when record type has invariants
1845 in addition to those of components, and two subprograms are
1846 constructed. Consistent with handling of array types.
1847 (Insert_Component_Invariant_Checks): Build invariant procedure
1848 body when one has not been created yet, in the case of composite
1849 types that are completions and whose full declarations carry
1852 2014-07-30 Thomas Quinot <quinot@adacore.com>
1854 * gnat_rm.texi: Minor doc fixes.
1856 2014-07-30 Robert Dewar <dewar@adacore.com>
1858 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
1860 2014-07-30 Vincent Celier <celier@adacore.com>
1862 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
1864 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
1865 message to report that a directory cannot be created, to avoid
1866 processing of the directory path that may contains special
1867 insertion characters.
1869 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1871 * a-crdlli.ads: Place declaration of Empty_List after full type
1872 declaration for Curosr, to prevent freezing error.
1874 2014-07-30 Robert Dewar <dewar@adacore.com>
1876 * get_targ.adb: Minor code reorganization.
1877 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
1880 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1882 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
1883 not Program_Error, when attempting to remove an element not in
1884 the set. This is the given semantics for all set containers.
1886 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1888 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
1889 element is not present in tree return rather than violating
1890 an assertion. Constraint_Error will be raised in the caller if
1891 element is not in the container.
1893 2014-07-30 Arnaud Charlet <charlet@adacore.com>
1895 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
1896 (elab body): Add provision for default target config file.
1897 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
1899 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1901 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
1902 when attempting to remove an element not in the set. This is
1903 the given semantics for all set containers.
1904 * a-cborse.adb (Delete): Attempt removal first, to check for
1905 tampering, before checking whether this is an attempt to
1906 delete a non-existing element, and in fthe latter case raise
1909 2014-07-30 Vincent Celier <celier@adacore.com>
1911 * prj-proc.adb (Recursive_Process): Do not create a new
1912 Project_Id if the project is already in the list of projects of
1915 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1917 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
1918 whose type is an incomplete formal type.
1919 (Analyze_Return_Type): Reject a return type that is an untagged
1920 imcomplete formal type.
1921 (Process_Formals): Reject a formal parameter whose type is an
1922 untagged formal incomplete type.
1923 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
1924 an untagged formal incomplete type.
1926 2014-07-30 Robert Dewar <dewar@adacore.com>
1928 * gnat_ugn.texi: Minor spelling correction.
1929 * makeutl.adb: Minor code reorganization.
1930 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
1932 2014-07-30 Robert Dewar <dewar@adacore.com>
1934 * einfo.ads (Has_Unchecked_Union): Document that this is used
1935 to check for illegal Valid_Scalars attribute references.
1936 * exp_attr.adb (Build_Record_VS_Func): New function
1937 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
1939 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
1940 Unchecked_Union Add note on 'Valid_Scalars generating a lot
1942 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
1943 error on attempt to apply Valid_Scalars to Unchecked_Union type.
1945 2014-07-30 Steve Baird <baird@adacore.com>
1947 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
1948 of A(I..J)(K) in CodePeer_Mode.
1950 2014-07-30 Ben Brosgol <brosgol@adacore.com>
1952 * gnat_ugn.texi: Fix typo.
1954 2014-07-30 Thomas Quinot <quinot@adacore.com>
1956 * lib-writ.ads: document format change.
1958 2014-07-30 Pascal Obry <obry@adacore.com>
1960 * prj-util.adb (For_Interface_Sources): Do not
1961 include sources from withed externally built projects.
1963 2014-07-30 Robert Dewar <dewar@adacore.com>
1965 * lib.adb: Minor reformatting.
1966 * prj-util.adb: Minor reformatting.
1968 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1970 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
1971 that depends on discriminants, and which is given by an others
1972 clause, create an explicit subtype with the discriminant values
1973 of the enclosing aggregate, because the backend cannot otherwise
1974 retrieve the actual bounds of the array.
1976 2014-07-30 Fedor Rybin <frybin@adacore.com>
1978 * gnat_ugn.texi: Improve gnattest documentation.
1980 2014-07-30 Pascal Obry <obry@adacore.com>
1982 * makeutl.adb (Insert_Project_Sources): Properly handle sources
1983 that are aggregated. We want to include sources not only part
1984 of libraries but also if part of an aggregated project from an
1986 * prj.adb (For_Project_And_Aggregated_Context): Properly check
1987 state of root project.
1989 2014-07-30 Thomas Quinot <quinot@adacore.com>
1991 * lib-load.ads: Minor reformatting.
1992 * sinfo.ads (Library_Unit): Update comment.
1993 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
1994 is redundant. Instead used the pragma Node_Id directly as the
1997 2014-07-30 Thomas Quinot <quinot@adacore.com>
1999 * lib.adb (Store_Note): Store only notes that do not come from
2000 an instance, and that are in the extended main source unit.
2001 * lib-writ (Write_Unit_Information): Annotations from subunits
2002 must be emitted along with those for the main unit, and they
2003 must carry a specific file name.
2004 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
2005 Unit_Id for the source file containing the pragma, as in the
2006 case of annotations from subunits we might not have a readily
2008 * ali.adb (Scan_ALI): Account for above change in data structure.
2010 2014-07-30 Vincent Celier <celier@adacore.com>
2012 * makeutl.adb (Insert_Project_Sources): When the library project
2013 is an aggregate Stand-Alone Library, insert in the queue the
2014 Ada interface units, with Closure set to True;
2016 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2018 * sem_util.adb: Fix minor typo.
2019 * makeutl.adb: Minor reformatting.
2021 2014-07-30 Robert Dewar <dewar@adacore.com>
2023 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
2025 2014-07-30 Yannick Moy <moy@adacore.com>
2027 * checks.ads: Fix typo in comment.
2029 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
2031 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
2032 entities that materialize range bounds, if any.
2034 2014-07-30 Vincent Celier <celier@adacore.com>
2036 * projects.texi: Minor spelling fix.
2038 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2040 * checks.adb (Make_Bignum_Block): Use the new secondary stack
2041 build routines to manage the mark.
2042 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
2043 Use the new secodary stack build routines to manage the mark.
2044 (Insert_Actions_In_Scope_Around): Add new formal parameter
2045 Manage_SS along with comment on its usage. Code and comment
2046 reformatting. Mark and release the secondary stack when the
2047 context warrants it.
2048 (Make_Transient_Block): Update the call
2049 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
2050 (Wrap_Transient_Declaration): Remove local variable
2051 Uses_SS. Ensure that the secondary stack is marked and released
2052 when the related object declaration appears in a library level
2053 package or package body. Code and comment reformatting.
2054 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
2055 (Build_SS_Release_Call): New routine.
2057 2014-07-30 Steve Baird <baird@adacore.com>
2059 * exp_attr.adb: Revert previous change, not needed after all.
2061 2014-07-30 Vincent Celier <celier@adacore.com>
2063 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
2064 Closure => True for interfaces of Stand-Alone Libraries.
2065 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
2066 Boolean component Closure, defaulted to False.
2068 2014-07-30 Yannick Moy <moy@adacore.com>
2070 * sem_res.adb: Fix typo in error message.
2072 2014-07-30 Robert Dewar <dewar@adacore.com>
2074 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
2075 as name suffixes rather than L/H for subtype bounds.
2076 * tbuild.ads: Minor comment improvements and fixes
2077 (Make_External_Name): Document that suffix can start with an
2080 2014-07-30 Bob Duff <duff@adacore.com>
2082 * gnat_ugn.texi: Document --rep-clauses switch.
2084 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2086 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
2087 Default_Component_Value can only be specified for scalar type or
2088 arrays of scalar types respectively. This legality check must
2089 be performed at the point the aspect is analyzed, in order to
2090 reject aspect specifications that apply to a partial view.
2092 2014-07-30 Thomas Quinot <quinot@adacore.com>
2094 * freeze.adb: Minor reformatting.
2096 2014-07-30 Robert Dewar <dewar@adacore.com>
2098 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
2101 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2103 * freeze.adb (Check_Expression_Function): At the freeze point
2104 of an expression function, verify that the expression in the
2105 function does not contain references to any deferred constants
2106 that have no completion yet.
2107 (Freeze_Expression, Freeze_Before): call
2108 Check_Expression_Function.
2109 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
2110 * a-ciorse.adb: Add Adjust and Finalize routines for
2111 Reference_Control_Type. Use it in the construction of Reference
2112 and Constant_Reference values.
2114 2014-07-30 Robert Dewar <dewar@adacore.com>
2116 * exp_aggr.adb: Update comments.
2117 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
2120 2014-07-30 Robert Dewar <dewar@adacore.com>
2122 * cstand.adb (New_Standard_Entity): New version takes name
2123 string to call Make_Name.
2124 (Create_Standard): Use this routine to set name before setting other
2127 2014-07-30 Robert Dewar <dewar@adacore.com>
2129 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
2131 (Expand_Attribute, case Last): Ditto.
2132 * exp_ch3.adb (Constrain_Index): New calling sequence for
2133 Process_Range_Expr_In_Decl.
2134 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
2136 * sem_ch3.adb (Constrain_Index): New calling sequence for
2137 Process_Range_Expr_In_Decl.
2138 (Set_Scalar_Range_For_Subtype): ditto.
2139 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
2141 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
2142 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
2143 types if we are not assuming no invalid values.
2145 2014-07-30 Robert Dewar <dewar@adacore.com>
2147 * clean.adb: Minor reformatting.
2148 * opt.ads: Minor fix to incorrect comment.
2150 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2152 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
2153 subprogram, used by bounded hashed sets, to delete a node at
2154 a given index, whose element may have been improperly updated
2155 through a Reference_Preserving key.
2156 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
2157 * a-cbhase.adb: Add Adjust and Finalize routines for
2158 Reference_Control_Type.
2159 (Delete, Insert): Raise Program_Error, not Constraint_Error,
2160 when operation is illegal.
2161 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
2162 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
2163 private with_clause for Ada.Finalization.
2164 * a-cbmutr.adb: Add Adjust and Finalize routines for
2165 Reference_Control_Type. Use it in the construction of Reference
2166 and Constant_Reference values.
2168 2014-07-30 Robert Dewar <dewar@adacore.com>
2170 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
2172 2014-07-30 Pascal Obry <obry@adacore.com>
2174 * clean.adb (Clean_Project): Properly check for directory
2175 existence before trying to enter it.
2177 2014-07-30 Robert Dewar <dewar@adacore.com>
2179 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
2181 2014-07-30 Robert Dewar <dewar@adacore.com>
2183 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
2184 missing semicolon after name.
2186 2014-07-30 Pascal Obry <obry@adacore.com>
2188 * prj.ads (Gprinstall_Flags): New constant.
2189 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
2190 missing library dir if Directories_Must_Exist_In_Projects
2193 2014-07-30 Bob Duff <duff@adacore.com>
2195 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
2196 * s-traceb.ads: Updagte comments.
2198 2014-07-30 Robert Dewar <dewar@adacore.com>
2200 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
2201 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
2202 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
2205 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2207 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
2208 subprogram, used by all versions of hashed sets, to delete a node
2209 whose element has been improperly updated through a Reference_
2211 * a-cohase.adb: Remove Delete_Node, use new common procedure
2212 Delete_Node_At_Index.
2213 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
2214 * a-cihase.adb: Add Adjust and Finalize routines for
2215 Reference_Control_Type.
2216 (Reference_Preserving_Key): Build aggregate for
2217 Reference_Control_Type
2219 2014-07-30 Yannick Moy <moy@adacore.com>
2221 * checks.adb, checks.ads (Determine_Range_R): New procedure to
2222 determine the possible range of a floating-point expression.
2224 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2226 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
2227 * a-cborse.adb: Add Adjust and Finalize routines for
2228 Reference_Control_Type.
2229 (Reference_Preserving_Key): Build aggregate for
2230 Reference_Control_Type.
2231 (Delete): Check for tampering, and raise Program_Error (not
2232 Constraint_Error) when attempting to delete an element not in
2236 2014-07-30 Bob Duff <duff@adacore.com>
2238 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
2239 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
2240 Exception_Information is used to produce useful debugging
2241 information for the programmer. However, it was also used to
2242 implement the stream attributes for type Exception_Occurrence. The
2243 latter requires a stable and portable interface, which meant
2244 that we couldn't include a symbolic traceback. A separate set of
2245 routines was used to provide symbolic tracebacks under program
2246 control (i.e. not automatically). The goal of this ticket is
2247 to provide such automatic tracebacks, so the change here is to
2248 split the two functionalities: Exception_Information gives the
2249 maximally useful information for debugging (i.e. it now includes
2250 a symbolic traceback when a decorator is set, and it can be
2251 improved freely in the future without disturbing streaming).
2252 Untailored_Exception_Information always uses hexadecimal addresses
2253 in the traceback, has a stable and portable output, and is now
2256 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2258 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
2259 on the target of the assignment to find out whether it
2260 can be directly done by the back-end.
2261 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
2263 2014-07-30 Robert Dewar <dewar@adacore.com>
2265 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
2266 a-tasatt.adb: Minor reformatting.
2268 2014-07-30 Robert Dewar <dewar@adacore.com>
2270 * exp_ch4.adb: Minor reformatting.
2272 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2274 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
2275 Reference_Control_Type to generic package, to keep additional
2276 information for Reference_Types that manipulate keys. Add Adjust and
2277 Finalize procedures for this type.
2278 (Finalize): When finalizing a reference_preserving_key, verify
2279 that the key of the new value is equivalent to the key of the
2280 original element, raise Program_Error otherwise.
2281 (Insert): Detect tampering.
2282 (Reference_Preserving_Key): Build proper Reference_Control_Type,
2283 and update Busy and Lock bits to detect tampering.
2284 * a-cohase.ads: Keep with-clause private.
2286 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2288 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
2289 of an equality are of an Unchecked_Union type and lack inferable
2292 2014-07-30 Bob Duff <duff@adacore.com>
2294 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
2295 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
2296 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
2297 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
2298 we can call them from the runtimes. Leave renamings in place under GNAT.
2300 2014-07-30 Yannick Moy <moy@adacore.com>
2302 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
2303 inlining in GNATprove mode.
2305 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2307 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
2308 Reference_Control_Type to generic package, to keep additional
2309 information for Reference_Types that manipulate keys. Add Adjust and
2310 Finalize procedures for this type.
2311 (Delete_Node): New procedure called when finalizing a
2312 Reference_Control_Type, to remove a node whose element has been
2313 improperly updated through a Reference.
2314 (Insert): Detect tampering.
2315 (Reference_Preserving_Key): Build proper Reference_Control_Type,
2316 and update Busy and Lock bits to detect tampering.
2318 2014-07-30 Bob Duff <duff@adacore.com>
2320 * exp_intr.ads: Minor comment fix.
2322 2014-07-30 Gary Dismukes <dismukes@adacore.com>
2324 * exp_prag.adb, a-tags.ads: Minor typo fixes.
2326 2014-07-30 Bob Duff <duff@adacore.com>
2328 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
2329 a-except.ads, g-traceb.adb, memtrack.adb,
2330 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2331 Cleanup: Make the three versions of System.Traceback.Call_Chain
2332 have the same interface. Use an array for the Traceback parameter
2333 instead of an Address. This will enable reduction in code
2336 2014-07-30 Pat Rogers <rogers@adacore.com>
2338 * gnat_ugn.texi: Corrected minor textual error in description
2341 2014-07-30 Bob Duff <duff@adacore.com>
2343 * Makefile.rtl: Sort file names.
2345 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2347 * a-tasatt.adb: Complete previous change: kill spurious warning
2348 on e.g. sparc, and make sure we only use the fast path when the
2349 alignment is compatible.
2351 2014-07-30 Yannick Moy <moy@adacore.com>
2353 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
2356 2014-07-30 Yannick Moy <moy@adacore.com>
2358 * inline.adb (Build_Body_To_Inline): Issue more precise messages
2359 for declarations that prevent inlining.
2360 (Cannot_Inline): Change usual start of message to refer to contextual
2361 analysis in GNATprove mode.
2362 * sem_res.adb (Resolve_Call): Change usual start of message to
2363 refer to contextual analysis in GNATprove mode, when inlining
2366 2014-07-30 Robert Dewar <dewar@adacore.com>
2368 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
2369 * inline.adb: Minor reformatting.
2371 2014-07-30 Javier Miranda <miranda@adacore.com>
2373 * a-tags.ads: Add comments.
2375 2014-07-30 Pat Rogers <rogers@adacore.com>
2377 * gnat_rm.texi: Minor word error.
2379 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2381 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
2382 created to capture the value of the prefix of 'Old at the
2383 beginning of the current declarative part, to prevent data flow
2384 anomalies in the postcondition procedure that will follow.
2386 2014-07-30 Yannick Moy <moy@adacore.com>
2388 * debug.adb: Retire debug flag -gnatdQ.
2389 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
2390 on decl, not on body. Ignore predicate functions.
2391 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
2392 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
2393 body when generating a decl for a body on which SPARK_Mode aspect
2395 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
2396 attaching pragma to entity, to account for declaration not coming
2398 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
2399 as not always inlined in GNATprove mode, when called in an
2402 2014-07-30 Vincent Celier <celier@adacore.com>
2404 * debug.adb: Minor comment update.
2406 2014-07-30 Robert Dewar <dewar@adacore.com>
2408 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
2409 * sprint.adb (Sprint_Node): Handle N_Contract case.
2410 * exp_prag.adb: Minor reformatting.
2411 * freeze.adb (Freeze_Entity): Check useless postcondition for
2412 No_Return subprogram.
2413 * sem_prag.adb: Minor reformatting.
2415 2014-07-30 Javier Miranda <miranda@adacore.com>
2417 * a-tags.ads: Complete comments about performance.
2419 2014-07-30 Fedor Rybin <frybin@adacore.com>
2421 * gnat_ugn.texi: Adding description for --exit-status option to
2422 gnattest section. Fixing index entry of --passed-tests option
2423 in gnattest section.
2425 2014-07-30 Javier Miranda <miranda@adacore.com>
2427 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
2428 rtsfind.ads: Remove references to package Interfaces.CPP since this
2429 package is no longer needed.
2431 2014-07-30 Bob Duff <duff@adacore.com>
2433 * s-taasde.adb (Timer_Queue): Don't use a
2434 build-in-place function call to initialize the Timer_Queue.
2435 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
2436 Turn off polling in these units, because otherwise we get
2437 elaboration circularities with Ada.Exceptions when the -gnatP
2439 * s-tassta.adb (Create_Task): Make sure independent tasks
2440 are created with Parent = Environment_Task. This was not true,
2441 for example, in s-interr.adb, when Interrupt_Manager does "new
2442 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
2443 which is wrong because the master is determined by the access
2444 type, which is at library level.
2445 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
2446 now set correctly by Create_Task.
2447 (Make_Passive): Remove the workaround for the race condition in
2449 * frontend.adb (Frontend): Revert to previous method of detecting
2450 temporary configuration pragma files, recognizing such files by
2451 ".tmp" in the name. This is more general than detecting pragmas
2452 Source_File_Name_Project, because it allows any tool to use
2453 this naming convention, no matter the content of the file.
2454 * gnat_ugn.texi: Document this naming convention.
2456 2014-07-30 Robert Dewar <dewar@adacore.com>
2458 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
2459 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
2460 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
2461 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
2462 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
2465 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2467 * sem_ch5.adb: Improve error recovery.
2468 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
2469 before analyzing the body, so that in GNATprove mode there is
2470 no light expansion. Whatever expansion is required by SPARK will
2471 be performed when analysing the inlined code.
2473 2014-07-30 Bob Duff <duff@adacore.com>
2475 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
2477 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2479 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
2480 verify that it is not hidden by an inner implicit declaration.
2482 2014-07-30 Thomas Quinot <quinot@adacore.com>
2484 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
2485 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
2486 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
2487 the call returns an unconstrained type: in this case there is
2488 already a transient scope, and we should not establish a new one.
2489 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
2490 True, also insert cleanup actions in the tree.
2491 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
2492 with Clean set True.
2494 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2496 * s-taskin.ads (Direct_Index, Direct_Index_Range,
2497 Direct_Attribute_Element, Direct_Attribute_Array,
2498 Direct_Index_Vector, Direct_Attributes, Is_Defined,
2499 Indirect_Attributes): Removed. (Atomic_Address,
2500 Attribute_Array, Attributes): New.
2501 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
2502 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
2503 (Finalize_Attributes): Reimplement.
2504 * s-tassta.adb (Create_Task): Remove call to
2505 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
2506 Replace Finalize_Attributes_Link by Finalize_Attributes.
2507 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
2508 Reimplement from scratch, using a simpler and more efficient
2510 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
2511 * s-parame.ads, s-parame-hpux.ads,
2512 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
2513 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
2514 Default_Attribute_Count.
2516 2014-07-30 Olivier Hainque <hainque@adacore.com>
2518 * vxworks-ppc-link.spec: New file. Extra link
2519 instructions for ppc-vxworks.
2520 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
2521 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
2522 * system-vxworks-arm.ads: Likewise.
2523 * gcc-interface/Makefile.in: Enable .spec files.
2525 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2527 * sem_aggr.adb: Minor comment reformatting.
2529 2014-07-30 Robert Dewar <dewar@adacore.com>
2531 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
2532 * sem_warn.adb (Has_Junk_Name): New function
2533 (Check_References): Use Has_Junk_Name to delete junk warnings
2534 (Check_Unset_Reference): ditto.
2535 (Warn_On_Unreferenced_Entity): ditto.
2536 (Warn_On_Useless_Assignment): ditto.
2538 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2540 * checks.adb (Insert_Valid_Check): Do not check for the packed
2541 array type of a prefix that is an access type.
2543 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2545 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
2546 Unconstrained_Array even if prefix is not frozen yet, as can
2547 occur with a private subtype used as a generic actual.
2549 2014-07-30 Gary Dismukes <dismukes@adacore.com>
2551 * sem_attr.adb: Minor reformatting.
2553 2014-07-30 Pat Rogers <rogers@adacore.com>
2555 * gnat_rm.texi: Corrected minor wording error in description
2556 of No_Exception_Registration.
2558 2014-07-30 Yannick Moy <moy@adacore.com>
2560 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
2561 mode. Realphabetize two subprograms.
2562 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
2563 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
2564 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
2566 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
2567 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
2568 Is_Inline in GNATprove mode.
2569 (Analyze_Subprogram_Specification):
2570 Set Is_Inlined_Always at subprogram entity creation.
2571 * sem_res.adb (Resolve_Call): Do not deal with inlining during
2572 pre-analysis. Issue warning on call to possibly inlined
2573 subprogram when body not seen.
2575 2014-07-30 Yannick Moy <moy@adacore.com>
2577 * lib-xref.adb (Generate_Reference): Add special
2578 case for compiler-generated formals in GNATprove mode.
2580 2014-07-30 Yannick Moy <moy@adacore.com>
2582 * sem_ch6.adb: Add comments.
2584 2014-07-30 Thomas Quinot <quinot@adacore.com>
2586 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
2588 2014-07-30 Robert Dewar <dewar@adacore.com>
2590 * sem_aggr.adb, sem_res.adb: Minor reformatting.
2592 2014-07-30 Thomas Quinot <quinot@adacore.com>
2594 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2595 Bit_Order): Set Reverse_Bit_Order on the base type of the
2596 specified first subtype.
2598 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2600 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
2601 to capture the value of actuals of a limited type rather than
2602 an object declaration, to prevent spurious errors when analyzing
2605 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2607 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
2608 as an instance, and inhibit semantic checks on already analyzed
2609 code to prevent spurious errors.
2611 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2613 * a-exctra.ads ("="): New function, to restore compatibility.
2615 2014-07-30 Pascal Obry <obry@adacore.com>
2617 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
2618 routine to use the OS dst setting.
2620 2014-07-30 Pat Rogers <rogers@adacore.com>
2622 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
2624 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2626 * sem_util.adb (Wrong_Type): Disable some checks equally within
2627 instances and within inlined bodies, to suppress spurious type
2628 errors on already analyzed code.
2629 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
2630 is legal in an inlined body, juts as it is in an instance body.
2632 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2634 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
2635 body the operand of an unchecked conversion may be a literal, in
2636 which case its type is the target type of the conversion. This
2637 is in contrast to conversions in other contexts, where the
2638 operand cannot be a literal and must be resolvable independent
2641 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
2643 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
2644 mere scalar constant instead of a reference for a renaming of
2646 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
2647 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
2649 2014-07-30 Robert Dewar <dewar@adacore.com>
2651 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
2652 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
2653 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
2654 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
2655 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
2656 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
2657 & code reorganization.
2659 2014-07-30 Bob Duff <duff@adacore.com>
2661 * s-tassta.adb, sem_util.ads: Minor reformatting.
2663 2014-07-30 Yannick Moy <moy@adacore.com>
2665 * inline.adb (Build_Body_To_Inline): Detect when
2666 subprogram has multiple returns, or not a single last return
2667 statement, in GNATprove mode.
2668 (Cannot_Inline): Simplify logic to handle case of GNATprove
2671 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2673 * sem_ch6.adb: Stubs are not subject to inlining.
2675 2014-07-30 Bob Duff <duff@adacore.com>
2677 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
2678 from a procedure to a function, so that it can more easily be
2679 called before the "begin" of a task.
2680 * s-taasde.ads (Delay_Block): Make this type immutably limited,
2681 so we can use a build-in-place function call to initialize
2682 Timer_Queue in the body.
2683 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
2684 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
2685 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
2686 Make_Independent before reaching its "begin", to avoid race
2687 conditions. This causes the activating task to wait until after
2688 Make_Independent is complete before proceeding. In addition,
2689 we initialize data structures used by independent tasks before
2690 activating those tasks, to avoid possible use of uninitialized data.
2691 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
2692 Minor comment fixes.
2694 2014-07-30 Bob Duff <duff@adacore.com>
2696 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
2697 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
2698 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
2699 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
2700 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
2702 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2704 * a-tasatt.adb: Remove old comments.
2706 2014-07-30 Yannick Moy <moy@adacore.com>
2708 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
2709 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
2710 to explain rationale for inlining or not in GNATprove mode.
2711 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
2712 to False when inlining is not possible.
2713 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
2714 flag to indicate that subprogram is fully inlined. To be reversed
2715 if inlining problem is found.
2716 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
2717 call in potentially unevaluated context.
2719 2014-07-30 Jose Ruiz <ruiz@adacore.com>
2721 * s-tarest.adb, s-tarest.ads: Fix comments.
2723 2014-07-30 Robert Dewar <dewar@adacore.com>
2725 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
2726 Change No_Scalar_Parts predicate to Scalar_Part_Present and
2727 invert sense of test. This avoids the "not No_xxx" situation
2728 which is always ugly.
2730 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2732 * inline.adb (Expand_Inlined_Call): When generating code for
2733 an internal subprogram the expansion uses the location of the
2734 call, so that gdb can skip over it. In GNATprove mode we want to
2735 preserve slocs of original subprogram when expanding an inlined
2736 call, to obtain better warnings, even though subprogram appears
2737 not to come from source if it is the inlining of a subprogram
2738 body without a previous spec.
2740 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2742 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2743 types with atomic components.
2745 2014-07-30 Thomas Quinot <quinot@adacore.com>
2747 * Make-generated.in: Remove now unnecessary targets after s-oscons
2750 2014-07-30 Yannick Moy <moy@adacore.com>
2752 * sem_res.adb (Resolve_Call): Use ultimate alias
2753 of callee when available.
2755 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2757 * sem_ch6.adb (Analyze_Expression_Function): To check whether
2758 an expression function is a completion, use the specification of
2759 the previous declaration, not its entity, which may be internally
2760 generated in an inlined context.
2762 2014-07-30 Doug Rupp <rupp@adacore.com>
2764 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
2765 temp files in /cache directory unless overridden by TMPDIR.
2767 2014-07-30 Jose Ruiz <ruiz@adacore.com>
2769 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
2770 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
2771 type CPU, so it can never be greater than CPU_Range'Last.
2773 2014-07-30 Bob Duff <duff@adacore.com>
2775 * s-taskin.ads: Minor comment fix.
2777 2014-07-30 Thomas Quinot <quinot@adacore.com>
2779 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
2782 2014-07-30 Yannick Moy <moy@adacore.com>
2784 * debug.adb: Free debug flag dQ used for frontend inlining in
2786 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
2789 2014-07-30 Thomas Quinot <quinot@adacore.com>
2791 * Make-generated.in: Remove generation of s-oscons.ads, only
2792 generate the xoscons utility, in runtime-agnostic rules.
2793 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
2794 no longer supported.
2796 2014-07-30 Bob Duff <duff@adacore.com>
2798 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
2799 parameter Chain to be used in the allocator case.
2800 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
2801 has tasks, wrap the code in a block that will activate them,
2802 including the usual finalization code to kill them off in case
2803 of exception or abort.
2805 2014-07-30 Robert Dewar <dewar@adacore.com>
2807 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
2808 Remove renamings (don't work for gdb).
2809 (par): New synonym for p (avoid gdb ambiguities).
2810 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
2812 2014-07-30 Bob Duff <duff@adacore.com>
2814 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
2816 * treepr.ads, treepr.adb (ppp): Make this debugging routine
2817 accept any type covered by Union_Id.
2819 2014-07-30 Robert Dewar <dewar@adacore.com>
2821 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
2823 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
2826 2014-07-30 Robert Dewar <dewar@adacore.com>
2828 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
2829 of predicate aspect on entity other than a type.
2831 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2833 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
2834 when a subprogram body without a previous spec cannot be inlined
2835 in GNATprove mode, because it includes aspects or pragmas that
2836 generate a SPARK contract clause.
2837 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
2838 instance cannot be inlined.
2840 2014-07-30 Robert Dewar <dewar@adacore.com>
2842 * debug.adb: Document that d7 suppresses compilation time output.
2843 * errout.adb (Write_Header): Include compilation time in
2845 * exp_intr.adb (Expand_Intrinsic_Call): Add
2846 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
2847 Compilation_Date/Compilation_Time.
2848 * g-souinf.ads (Compilation_Date): New function
2849 (Compilation_Time): New function.
2850 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
2851 * gnat_rm.texi (Compilation_Date): New function
2852 (Compilation_Time): New function.
2853 * opt.ads (Compilation_Time): New variable.
2854 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
2855 * sem_intr.adb (Compilation_Date): New function.
2856 (Compilation_Time): New function.
2857 * snames.ads-tmpl (Name_Compilation_Date): New entry.
2858 (Name_Compilation_Time): New entry.
2860 2014-07-30 Yannick Moy <moy@adacore.com>
2862 * inline.adb: Add comment.
2864 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2866 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
2867 parameterless attribute, and a postondition can mention an
2868 indexed component or a slice whose prefix is an attribute
2871 2014-07-30 Robert Dewar <dewar@adacore.com>
2873 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
2874 Avoid bomb when printing package Standard.
2876 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2878 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
2879 entity is created at this point, ensure that the name of the
2880 flag is unique, because the subprogram may be overloaded and
2881 other homonyms may also have elaboration flags created on the fly.
2883 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2885 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
2886 (Analyze_Attribute): Major cleanup of attribute
2887 'Update. The logic is now split into two distinct routines
2888 depending on the type of the prefix. The use of <> is now illegal
2889 in attribute 'Update.
2890 (Analyze_Record_Component_Update): New routine.
2891 (Check_Component_Reference): Removed.
2892 (Resolve_Attribute): Remove the return statement and ??? comment
2893 following the processing for attribute 'Update. As a result,
2894 the attribute now freezes its prefix.
2896 2014-07-30 Javier Miranda <miranda@adacore.com>
2898 * exp_ch4.adb (Apply_Accessibility_Check): Do
2899 not call Base_Address() in VM targets.
2901 2014-07-30 Yannick Moy <moy@adacore.com>
2903 * gnat1drv.adb (Adjust_Global_Switches): Set
2904 Ineffective_Inline_Warnings to True in GNATprove mode.
2905 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
2907 * opt.ads (Ineffective_Inline_Warnings): Add comment that
2908 describes use in GNATprove mode.
2909 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
2910 pragma when applied to the special body created for inlining.
2912 2014-07-30 Robert Dewar <dewar@adacore.com>
2914 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
2917 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2919 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
2920 not delayed. Update the delay status of most SPARK 2014 aspects.
2921 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
2922 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
2923 to Decorate and Insert_Pragma. Add various comments concerning
2924 the delay status of several SPARK 2014 aspects. The insertion
2925 of Refined_State now uses routine Insert_After_SPARK_Mode.
2926 (Decorate): New routine.
2927 (Decorate_Aspect_And_Pragma): Removed.
2928 (Insert_Delayed_Pragma): Removed.
2929 (Insert_Pragma): New routine.
2931 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2933 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
2934 only a warning, not an error on an attempt to inline a recursive
2937 2014-07-30 Robert Dewar <dewar@adacore.com>
2939 * g-forstr.adb: Minor code reorganization (use J rather than I
2940 as a variable name).
2941 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
2942 g-forstr.ads: Minor reformatting.
2944 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2946 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
2947 we are debugging the generated code.
2949 2014-07-30 Yannick Moy <moy@adacore.com>
2951 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
2952 returns True for source pointer for an inlined body.
2954 2014-07-30 Javier Miranda <miranda@adacore.com>
2956 * exp_ch4.adb (Apply_Accessibility_Check): Add
2957 missing calls to Base_Address().
2959 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2961 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
2962 mode, subprogram bodies without a previous declaration are also
2963 candidates for front-end inlining.
2965 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2967 * aspects.ads Aspects Async_Readers, Async_Writers,
2968 Effective_Reads and Effective_Writes do not need to be delayed.
2969 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
2970 optional Boolean expression when generating the corresponding
2971 pragma for an external property aspect.
2972 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
2973 local constant Obj. Add local constant Obj_Id. Reimplement the
2974 check which ensures that the related variable is in fact volatile.
2975 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
2976 * sem_util.adb (Is_Enabled): New routine.
2977 (Variable_Has_Enabled_Property): Reimplement the detection of
2978 an enabled external property.
2980 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
2982 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
2985 2014-07-30 Pascal Obry <obry@adacore.com>
2987 * g-forstr.adb, g-forstr.ads: New.
2988 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
2989 GNAT.Formatted_String.
2991 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2993 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
2994 (Expand_Array_Aggregate): Also enable in-place expansion for
2995 code generated by the compiler. For an object declaration,
2996 set the kind of the object in addition to its type. If an
2997 in-place assignment is to be generated and it can be directly
2998 done by the back-end, do not expand the aggregate.
2999 * fe.h (Is_Others_Aggregate): Declare.
3000 * gcc-interface/trans.c
3001 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
3002 aggregate with a single Others choice on the RHS by means of
3003 __builtin_memset. Tidy up.
3005 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3007 * gnat_rm.texi: minor reformatting.
3009 2014-07-30 Yannick Moy <moy@adacore.com>
3011 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
3014 2014-07-30 Robert Dewar <dewar@adacore.com>
3016 * gnat_rm.texi: Document additional implementation-defined use
3019 2014-07-30 Robert Dewar <dewar@adacore.com>
3021 * prj-proc.adb, prj-strt.adb: Update comments.
3023 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3025 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
3027 2014-07-30 Vincent Celier <celier@adacore.com>
3029 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
3030 parameter No_Extending, defaulted to False. When No_Extending
3031 is True, do not look for an extending project.
3032 (Expression): For a variable reference that is not for the current
3033 project, get its Id calling Imported_Or_Extended_Project_From
3034 with No_Extending set to True.
3035 * prj-strt.adb (Parse_Variable_Reference): If a referenced
3036 variable is not found in the current project, check if it is
3037 defined in one of the projects it extends.
3039 2014-07-30 Robert Dewar <dewar@adacore.com>
3041 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
3042 some additional cases of internally generated routines.
3044 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3046 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
3047 if the compilation unit is a subunit, extend optional processing
3048 to all subunits of the current one. This allows gnatstub to
3049 supress generation of spurious bodies.
3051 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3053 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
3054 track of the initial element's index within the tree.
3056 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3058 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
3059 (Insert_Child): Add local variable First. Capture the index of the
3060 first node being created to ensure correct cursor construction
3061 later on. Use the three parameter version of Allocate_Node
3062 when creating multiple children as this method allows aspect
3063 Default_Value to take effect (if applicable).
3065 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
3067 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
3068 (Expand_Array_Aggregate): For a safe slice assignment, just set
3069 the target and use the common code path.
3071 2014-07-29 Robert Dewar <dewar@adacore.com>
3073 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
3074 predicate No_Predicate_Test_On_Arguments, new name is
3075 Predicate_Tests_On_Arguments (with the opposite sense).
3077 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3079 * sem_attr.adb (Resolve_Attribute): Clean up the code for
3080 attribute 'Access. Do not generate an elaboration flag for a
3081 stand alone expression function. The expression of an expression
3082 function is now frozen when the expression function appears as
3083 the prefix of attribute 'Access.
3084 * sem_ch6.adb (Analyze_Expression_Function): Remove local
3085 variable New_Decl and update all references to it after the
3086 rewriting has taken place. Establish the linkages between the
3087 generated spec and body.
3089 2014-07-29 Robert Dewar <dewar@adacore.com>
3091 * sem_prag.adb (ip, rv): Prevent from being optimized away.
3092 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
3093 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
3096 2014-07-29 Vincent Celier <celier@adacore.com>
3098 * prj-pp.adb: Minor comment update.
3099 * frontend.adb: If a target dependency info file has been read
3100 through switch -gnateT= add it to the dependencies of the source
3103 2014-07-29 Robert Dewar <dewar@adacore.com>
3105 * sem_ch3.adb, prj.adb: Minor reformatting.
3107 2014-07-29 Vincent Celier <celier@adacore.com>
3109 * prj-pp.adb (Pretty_Print.Output_Project_File): New
3110 procedure to output project file names between quotes without
3111 concatenation, even if the line is too long.
3112 (Pretty_Print): Use Output_Project_File for project being extended and
3115 2014-07-29 Vincent Celier <celier@adacore.com>
3117 * gnat_ugn.texi: Document that configuration pragmas files are
3118 added to the dependencies, unless they contain only pragmas
3119 Source_File_Name_Project.
3121 2014-07-29 Robert Dewar <dewar@adacore.com>
3123 * frontend.adb: Minor reformatting.
3125 2014-07-29 Robert Dewar <dewar@adacore.com>
3127 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
3128 (Expand_Actuals): Make sure predicate checks are properly applied
3129 for the case of OUT or IN OUT parameters.
3130 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
3131 predicate tests on arguments for Finalize
3132 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
3133 if predicate tests on subprogram arguments should be skipped.
3134 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
3136 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3138 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
3139 clause for the object and the expression is an aggregate, defer
3140 resolution and expansion of the aggregate until the freeze point
3142 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
3143 the parent node is an N_Reference generated during expansion.
3145 2014-07-29 Vincent Celier <celier@adacore.com>
3147 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
3149 2014-07-29 Robert Dewar <dewar@adacore.com>
3151 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
3152 prepcomp.ads: Minor reformatting and code clean up.
3153 * exp_ch6.adb (Expand_Actuals): Generate predicate test
3154 unconditionally for case of OUT or IN OUT actual (before this
3155 was generated only for certain subcases, which is wrong, the
3156 test is always needed).
3158 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3160 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
3161 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
3162 until context type is available.
3163 * sem_res.adb (Resolve_Allocator): In the case of a qualified
3164 expression, complete resolution of expression.
3165 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
3166 to apply Ada2012 checks on aliased formals, as well as
3167 accesibility checks when the context of the call is an allocator
3168 or a qualified expression.
3169 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
3170 Moved here from sem_ch3.
3171 (Object_Access_Level): Handle properly aliased formals and
3173 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
3174 now properly performed in sem_res (Resolve_Actuals,
3175 Check_Aliased_Parameter).
3177 2014-07-29 Yannick Moy <moy@adacore.com>
3179 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
3180 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
3181 function to decide when a subprogram can be inlined in GNATprove mode.
3182 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
3183 condition for possible inlining.
3184 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
3185 for Inline_Always in GNATprove mode.
3186 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
3187 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
3188 * sem_prag.adb Minor change in comments.
3189 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
3190 inside subprograms marked as SPARK_Mode On.
3191 * sinfo.ads: Minor typo fix.
3193 2014-07-29 Vincent Celier <celier@adacore.com>
3195 * frontend.adb: Add dependency on gnat.adc when taken into account
3196 and on non-temporary configuration pragmas files specified in
3198 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
3199 dependencies on configuration pragmas files.
3201 2014-07-29 Pat Rogers <rogers@adacore.com>
3203 * gnat_ugn.texi: Minor clarification to the explanation for the
3206 2014-07-29 Robert Dewar <dewar@adacore.com>
3208 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
3209 documentation that explains the need for this extended range
3210 (use by C_Pass_By_Copy).
3212 2014-07-29 Robert Dewar <dewar@adacore.com>
3214 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
3216 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
3218 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
3221 2014-07-29 Thomas Quinot <quinot@adacore.com>
3224 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
3225 CRTSCTS to be visible.
3227 2014-07-29 Bob Duff <duff@adacore.com>
3229 * g-trasym.adb, g-trasym.ads: Code cleanup.
3231 2014-07-29 Doug Rupp <rupp@adacore.com>
3233 * sigtramp-vxworks.c: Minor reformatting.
3235 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3237 * gnat_rm.texi: No doc needed for Ada2012 aspect
3238 Implicit_dereference.
3240 2014-07-29 Robert Dewar <dewar@adacore.com>
3242 * sem_attr.adb (Attribute_12): New array
3243 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
3244 (Check_Ada_2012_Attribute): Removed.
3246 2014-07-29 Doug Rupp <rupp@adacore.com>
3248 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
3250 * sigtramp-vxworks.c: New file.
3251 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
3253 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3255 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
3256 derived array type, add information about component type, which
3257 was previously missing in ali file.
3258 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
3260 2014-07-29 Thomas Quinot <quinot@adacore.com>
3262 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
3263 of the subtype created for a record component, do not mark
3264 the subtype as frozen. For one thing, this is anomalous (in
3265 particular, the base type might not itself be frozen yet);
3266 furthermore, proper freezing of the subtype must happen in any
3267 case. So, we just mark the subtype as requiring delayed freezing
3268 (and we'll actually freeze it when generating the init_proc of
3269 the enclosing record).
3270 Also change the name of the constrained record subtype (append a
3271 'C' so that it is clearly different from the unconstrained record
3272 type, "related_idV") to make debugging easier.
3273 (Process_Full_View): When creating a full subtype for a pending
3274 private subtype, re-establish the scope of the private subtype
3275 so that we get proper visibility on outer discriminants.
3276 * exp_ch3.adb (Build_Init_Statements): Freeze any component
3277 subtype that is not frozen yet.
3279 2014-07-29 Vincent Celier <celier@adacore.com>
3281 * prj-proc.adb (Recursive_Process): Always initialize the
3282 environment when the project is an aggregate project, even when
3283 it is not the root tree.
3284 2014-07-29 Robert Dewar <dewar@adacore.com>
3286 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
3287 * gnat_rm.texi: Complete list of implementation aspects.
3288 * aspects.ads: Minor comment clarification.
3290 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3292 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
3293 is a null-excluding access type, do not generate a constraint
3294 check if Suppress_Assignment_Checks is set on assignment node.
3295 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
3296 parameter of a null-excluding access type, there is access check
3297 on entry, so set Suppress_Assignment_Checks on generated statement
3298 that assigns actual to parameter block.
3299 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
3301 2014-07-29 Robert Dewar <dewar@adacore.com>
3303 * gnat_rm.texi: Change theta to @ in documentation of aspect
3306 2014-07-29 Robert Dewar <dewar@adacore.com>
3308 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
3310 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
3312 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
3313 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
3315 2014-07-29 Javier Miranda <miranda@adacore.com>
3317 * types.ads Update documentation on how to add new reason codes
3319 (RT_Exception_Code): Keep values ordered by their
3320 reason code. Required by the .NET backend.
3321 (RT_CE_Exceptions): Subtype declaration removed.
3322 (RT_PE_Exceptions): Subtype declaration removed.
3323 (RT_SE_Exceptions): Subtype declaration removed.
3324 (Kind): New mapping table of RT_Exception_Codes.
3325 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
3327 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
3328 mapping table. (Make_Raise_Program_Error): Updated to use the
3330 (Make_Raise_Storage_Error): Updated to use the new mapping table.
3331 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
3334 2014-07-29 Thomas Quinot <quinot@adacore.com>
3336 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
3337 distributed stubs generation.
3338 * exp_ch3.adb: Minor reformatting.
3340 2014-07-29 Yannick Moy <moy@adacore.com>
3342 * sinfo.ads: Document constraint between frontend and GNATprove.
3344 2014-07-29 Robert Dewar <dewar@adacore.com>
3346 * a-except.adb: Minor comment clarification.
3348 2014-07-29 Robert Dewar <dewar@adacore.com>
3350 * gnat_rm.texi: Complete list of implementation attributes.
3351 * snames.ads-tmpl: Clean up list of impl-defined attributes.
3353 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3355 * freeze.adb (Freeze_Record_Type): Perform various
3356 volatility-related checks.
3358 2014-07-29 Robert Dewar <dewar@adacore.com>
3360 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
3362 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3364 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
3365 the case where the attribute reference appears in a nested scope
3366 from that of the subprogram prefix.
3367 * sem_attr.adb: Minor reformatting.
3369 2014-07-29 Robert Dewar <dewar@adacore.com>
3371 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
3372 initialization options.
3374 2014-07-29 Robert Dewar <dewar@adacore.com>
3376 * sinfo.ads: Minor comment addition.
3378 2014-07-29 Bob Duff <duff@adacore.com>
3380 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
3382 2014-07-29 Doug Rupp <rupp@adacore.com>
3384 * init.c: Complete previous change.
3386 2014-07-29 Robert Dewar <dewar@adacore.com>
3388 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
3391 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3393 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
3394 and the completion will appear in the same declarative part,
3395 create elaboration flag.
3396 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
3397 is a completion of a declaration in the same declarative part,
3398 and the subprogram has had its address taken, add elaboration
3399 check inside the subprogram body, to detect elaboration errors
3400 that may occur through indirect calls.
3402 2014-07-29 Doug Rupp <rupp@adacore.com>
3404 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
3405 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
3407 2014-07-29 Vincent Celier <celier@adacore.com>
3409 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
3410 runtime directorie specified with two switches --RTS= designate
3411 the same directory, even when there are no literarily the same.
3413 2014-07-29 Robert Dewar <dewar@adacore.com>
3415 * gnat_ugn.texi: Minor documentation clarification.
3416 * switch-c.adb: Minor reformatting.
3418 2014-07-29 Robert Dewar <dewar@adacore.com>
3420 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
3421 Fix incorrect RTE call which caused bomb if pragma was in
3422 configuration pragma file.
3424 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
3426 * expect.c (__gnat_expect_poll): Fix typo in previous change.
3427 * g-expect.adb: Update comments.
3429 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3431 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
3432 (Default_Attribute_Count): Bump to 16 on native platforms.
3434 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3436 * sem_res.adb: Add guard to front-end inlining for SPARK.
3438 2014-07-29 Robert Dewar <dewar@adacore.com>
3440 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
3443 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3445 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
3446 inline in GNATprove mode when subprogran is marked Inline_Always.
3447 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
3448 mode if body to inline is available.
3449 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
3450 effective in GNATprove mode.
3451 * sem_ch10.adb (Analyze_Compilation_Unit): Call
3452 Check_Package_Body_For_Inlining in GNATprove mode, so that body
3453 containing subprograms with Inline_Always can be available before
3456 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3458 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
3459 to Check_Package_Body_For_Inlining, to prevent confusion with other
3460 inlining subprograms.
3462 2014-07-29 Robert Dewar <dewar@adacore.com>
3464 * opt.ads: Minor comment update.
3465 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
3466 we want setting of Uneval_Old at time of encountering the aspect.
3467 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
3469 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
3470 New function (Set_Uneval_Old_Accept): New procedure.
3471 (Set_Uneval_Old_Warn): New procedure.
3472 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
3474 2014-07-29 Robert Dewar <dewar@adacore.com>
3476 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
3477 * snames.ads-tmpl: Minor reformatting.
3478 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
3479 to give <Error>. Not clear why this was there, but the compiler
3480 sources do not reference Name_Error, and this interfered with
3481 the circuits for pragma Unevaluated_Use_Of_Old.
3483 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3485 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
3486 types in SPARK 2014 (again).
3487 * sem_res.adb (Is_OK_Volatile_Context): New routine.
3488 (Resolve_Entity_Name): Ensure that a volatile object with
3489 enabled properties Async_Writers or Effectire_Reads appears in
3490 a non-interfering context.
3492 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3494 * sem_ch6.adb: Move Build_Body_To_Inline,
3495 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
3496 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
3497 * inline.ads, inline.adb: Package now contains subprograms that
3498 implement front-end inlining. No functional changes, no test
3501 2014-07-29 Robert Dewar <dewar@adacore.com>
3503 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
3505 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3507 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
3508 is a limited view when the context is a package body, because
3509 there is no subsequent place at which the non-limited view may
3511 (Process_Formals): Ditto.
3512 * sinfo.ads, par-ch3.adb: Minor reformatting.
3514 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
3516 * expect.c (__gnat_expect_poll): New parameter dead_process
3517 used to return the dead process among the array of file
3518 descriptors. The Windows, VMS and HPUX implementations now
3519 properly report the dead process via this parameter. Other unixes
3521 * g-expect.adb (Poll): Adapt to the C profile.
3522 (Expect_Internal): Use the new parameter to properly close the
3523 File Descriptor. This then can be properly reported by the
3524 function First_Dead_Process as is expected.
3526 2014-07-29 Robert Dewar <dewar@adacore.com>
3528 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
3530 2014-07-29 Robert Dewar <dewar@adacore.com>
3532 * einfo.adb (Derived_Type_Link): New function
3533 (Set_Derived_Type_Link): New procedure.
3534 (Write_Field31_Name): Output Derived_Type_Link.
3535 * einfo.ads: New field Derived_Type_Link.
3536 * exp_ch6.adb (Expand_Call): Warn if change of representation
3538 * sem_ch13.adb: Minor addition of ??? comment.
3539 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
3540 expensive implicit conversion.
3541 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
3543 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3545 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
3546 to DF_Id. Add new local variable DF_Call. Do not perform any
3547 elaboration-related checks on the call to the partial finalization
3548 routine within an init proc to avoid generating bogus elaboration
3549 warnings on expansion-related code.
3550 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
3551 the top level of the routine. Ensure that Output_Calls takes
3552 into account flags -gnatel and -gnatwl when emitting warnings
3554 (Check_Internal_Call_Continue): Update the call to Output_Calls.
3555 (Elab_Warning): Moved to the top level of routine Check_A_Call.
3556 (Emit): New routines.
3557 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
3558 comment on usage. Output all warnings or info messages only when the
3559 caller context demands it and the proper elaboration flag is set.
3561 2014-07-29 Yannick Moy <moy@adacore.com>
3563 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
3564 Check rule about Old appearing in potentially unevaluated
3565 expression everywhere, not only in Post.
3567 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3569 * sem_prag.adb: Update comment.
3570 * a-except.adb, a-except-2005.adb: Minor editing.
3572 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
3574 * exp_dbug.adb (Debug_Renaming_Declaration):
3575 Do not create renaming entities for renamings of non-packed
3576 objects and for exceptions.
3578 2014-07-29 Robert Dewar <dewar@adacore.com>
3580 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
3581 sem_ch6.adb, par-ch3.adb: Minor reformatting.
3583 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3585 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
3586 subtype indication in an extended return statement when the
3587 return value is an ancestor of the return type of the function,
3588 and that return type is a null record extension.
3590 2014-07-29 Thomas Quinot <quinot@adacore.com>
3592 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
3593 message produced for the case of a type-related representation
3594 item that is made illegal by 13.10(1).
3595 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
3598 2014-07-29 Robert Dewar <dewar@adacore.com>
3600 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
3601 * erroutc.adb (Output_Error_Msgs): Take wide characters into
3602 account in computing position of error flags.
3603 * sinput.adb (Get_Column_Number): Take wide characters into
3606 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3608 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
3609 in an access type definition can carry a null_exclusion indicator.
3610 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
3611 carries a null_exclusion indicator, verify that the subtype
3612 indication denotes an access type, and create a null-excluding
3614 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
3615 defined on N_Access_To_Object_Definition to indicate that the
3616 subtype indication carries a null_exclusion indicator.
3618 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3620 * exp_ch6.adb (Add_Extra_Actual): Do not construct
3621 the extra actual by name, generate a reference instead.
3623 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3625 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
3626 Allow_Integer_Address if already set.
3627 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
3628 Fix order, for consistency with Rmsg_xx declarations.
3630 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3632 * sem_ch4.adb (Complete_Object_Operation): If the type of the
3633 candidate subprogram is a limited view, use non-limited view
3636 2014-07-29 Robert Dewar <dewar@adacore.com>
3638 * sem_ch13.adb: Minor change in RM reference.
3639 * sem_mech.ads: Minor reformatting.
3640 * einfo.ads: Minor comment fix.
3641 * types.ads: Minor correction to range given for Mechanism_Type.
3642 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
3643 check predicate on way out for OUT or IN OUT parameters.
3644 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
3645 better (P_Range_Constraint): Corresponding fix.
3646 * checks.ads: Minor comment clarification.
3648 2014-07-29 Gary Dismukes <dismukes@adacore.com>
3650 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
3651 and Treat_As_Volatile flags based on whether the renamed object
3652 is a volatile object.
3654 2014-07-29 Olivier Hainque <hainque@adacore.com>
3657 (Default_Alignment): Rename as Storage_Alignment. This is not
3658 a "default" that can be overriden. Augment comment to clarify
3659 intent and document why we need to manage alignment padding.
3660 (Header_Offset): Set to Header'Object_Size instead of 'Size
3661 rounded up to Storage_Alignment. Storage_Alignment on the
3662 allocation header is not required by our internals so was
3663 overkill. 'Object_Size is enough to ensure proper alignment
3664 of the header address when substracted from a storage address
3665 aligned on Storage_Alignment.
3666 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
3667 this is always added on top of the incoming allocation requests.
3668 (Align): New function, to perform alignment rounding operations.
3669 (Allocate): Add comments on the Storage_Address computation
3670 scheme and adjust so that the alignment padding applies to that
3671 (Storage_Address) only.
3673 2014-07-29 Robert Dewar <dewar@adacore.com>
3675 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
3676 pragma Unreferenced.
3677 * cstand.adb (Create_Standard): Use E_Array_Type for standard
3678 string types. Make sure index of Any_String/Any_Array is in a list.
3679 * errout.adb: Minor reformatting.
3681 2014-07-29 Robert Dewar <dewar@adacore.com>
3683 * gnat_ugn.texi: Clean up and correct documentation of warnings.
3684 * usage.adb: Minor corrections to make sure warnings are properly
3686 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
3687 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
3689 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3691 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
3692 created to match internal sequence numbers between compilations
3693 with/without abort must have its type properly set.
3695 2014-07-29 Robert Dewar <dewar@adacore.com>
3697 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
3698 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
3699 SSO_Default_Specified.
3700 * ali.ads (ALIs_Record): Add field SSO_Default
3701 (SSO_Default_Specified): New global switch.
3702 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
3703 (Check_Configuration_Consistency): Call this procedure
3704 * einfo.adb (SSO_Set_High_By_Default): New
3705 function (SSO_Set_Low_By_Default): New function
3706 (Set_SSO_Set_High_By_Default): New procedure
3707 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
3709 * einfo.ads (SSO_Set_Low_By_Default): New flag
3710 (SSO_Set_High_By_Default): New flag
3711 * freeze.adb (Set_SSO_From_Default): New procedure
3712 (Freeze_Array_Type): Call Set_SSO_From_Default
3713 (Freeze_Record_Type): Call Set_SSO_From_Default
3714 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
3715 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
3716 * lib-writ.ads: Add OL/OH parameters to P line
3717 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
3718 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
3720 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
3721 set by default using pragma Default_Scalar_Storage_Order.
3722 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
3723 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
3724 Clear SSO defaults when explicit SSO is inherited.
3725 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
3726 explicit SSO is specified.
3727 (Inherit_Aspects_At_Freeze_Point):
3728 Clear SSO default when inheriting SSO.
3729 * sem_ch3.adb (Set_Default_SSO): New procedure
3730 (Analyze_Private_Extension_Declaration): Set defualt SSO
3731 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
3732 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
3733 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
3734 (Record_Type_Declaration): ditto
3735 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
3737 * sem_prag.adb (Analyze_Pragma, case
3738 Default_Scalar_Storage_Order): Set Default_SSO
3740 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3742 * sem_ch6.adb (Valid_Operator_Definition): Verify that
3743 all parameter have mode IN. This check must be done here for
3744 subprogram instantiations that have operator names, because their
3745 analysis does not follow the same path as that for subprogram
3748 2014-07-29 Robert Dewar <dewar@adacore.com>
3750 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
3751 to make sure that the Etype of a component of the corresponding
3752 record type is present before trying to freeze it.
3753 * sem_ch5.adb: Minor reformatting.
3755 2014-07-29 Robert Dewar <dewar@adacore.com>
3757 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
3758 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
3759 and then use it when a stream operation is used from a library generic
3760 when the restriction (No_Streams) is active.
3762 2014-07-29 Thomas Quinot <quinot@adacore.com>
3764 * projects.texi: Fix minor typo.
3766 2014-07-29 Yannick Moy <moy@adacore.com>
3768 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
3770 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3772 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
3775 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3777 * exp_ch7.adb (Find_Last_Init): Add local variable
3778 Deep_Init_Found. Check the statement immediately following the
3779 declaration if [Deep_]Initialization was not found.
3781 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3783 * exp_util.adb (Is_Aliased): It appears that
3784 'reference-d and renamed objects still play some role in Boolean
3785 expression with actions and cannot be finalized immediately.
3787 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3789 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
3790 Loop names are not part of the full qualification of entity names.
3792 2014-07-29 Robert Dewar <dewar@adacore.com>
3794 * einfo.adb (Has_Protected): Test base type.
3795 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
3796 that we always properly check No_Protected_Type_Allocators.
3798 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3800 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
3801 loop declarations as well.
3802 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
3803 to an iterator loop, because it may contain local renaming
3804 declarations that require debugging information.
3806 2014-07-29 Robert Dewar <dewar@adacore.com>
3808 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
3810 2014-07-29 Robert Dewar <dewar@adacore.com>
3812 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
3813 (Set_Static_Real_Or_String_Predicate): New procedure
3814 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
3815 string predicates (Is_Predicate_Static): Handle static string
3817 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
3818 New procedure (Check_Expression_Against_Static_Predicate):
3819 Deal with static string predicates, now fully implemented
3820 (Eval_Relational_Op): Allow string equality/inequality as static
3821 if not comes from source.
3823 2014-07-29 Robert Dewar <dewar@adacore.com>
3825 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
3826 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
3827 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
3828 handling. Change name of Discrete_Predicate to
3829 Discrete_Static_Predicate, and replace testing of the presence of this
3830 field by testing the flag Has_Static_Expression.
3832 2014-07-29 Robert Dewar <dewar@adacore.com>
3834 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
3835 * opt.adb: Handle Uneval_Old.
3836 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
3837 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
3838 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
3839 * sem_attr.adb (Uneval_Old_Msg): New procedure.
3840 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
3841 (Pop_Scope): Restore Uneval_Old.
3842 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
3844 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
3845 Add entries for Name_Warn, Name_Allow.
3847 2014-07-29 Robert Dewar <dewar@adacore.com>
3849 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
3850 to Is_OK_Static_Range.
3851 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
3852 static attributes (Eval_Attribute, case Size): Handle size of
3853 zero properly (Eval_Attribute, case Value_Size): Handle size of
3855 * sem_ch13.adb: Minor reformatting.
3856 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
3857 Is_Static_Range to Is_OK_Static_Range.
3858 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
3859 wrong in several ways (Is_Static_Range): Moved here from spec
3860 (Is_Static_Subtype): Moved here from spec Change some incorrect
3861 Is_Static_Subtype calls to Is_OK_Static_Subtype.
3862 * sem_eval.ads: Add comments to section on
3863 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
3864 Add clarifying comments (Is_Static_Range): Moved to body
3865 (Is_Statically_Unevaluated): New function.
3866 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
3867 Is_Static_Range to Is_OK_Static_Range.
3868 * sinfo.ads: Additional commments for Is_Static_Expression noting
3869 that clients should almost always use Is_OK_Static_Expression
3870 instead. Many other changes throughout front end units to obey
3872 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
3873 for enumeration literal.
3874 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
3875 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
3876 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
3877 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
3878 Replace all occurrences of Is_Static_Expression by
3879 Is_OK_Static_Expression.
3881 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3883 * exp_ch4.adb (Process_Transient_Object): Remove constant
3884 In_Cond_Expr, use its initialization expression in place.
3885 * exp_ch7.adb (Process_Declarations): There is no need to check
3886 that a transient object being hooked is controlled as it would
3887 not have been hooked in the first place.
3888 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
3889 objects are not considered aliased when the related context is
3890 a Boolean expression_with_actions.
3891 (Requires_Cleanup_Actions): There is no need to check that a transient
3892 object being hooked is controlled as it would not have been hooked in
3895 2014-07-29 Robert Dewar <dewar@adacore.com>
3897 * errout.adb: Minor reformatting.
3899 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3901 * exp_ch3.adb (Default_Initialize_Object): Add new variables
3902 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
3903 not allowed to ensure the symmetrical generation of symbols.
3904 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
3905 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
3906 temporary when aborts are not allowed to ensure symmertrical
3907 generation of symbols.
3908 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
3909 Dummy. Generate a dummy temporary when aborts are not allowed
3910 to ensure symmertrical generation of symbols.
3912 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3914 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
3915 renaming, indicate that the renamed entity itself needs debug
3916 information. This is necessary if that entity is a temporary,
3917 e.g. part of the expansion of an explicit dereference in an
3920 2014-07-29 Thomas Quinot <quinot@adacore.com>
3922 * errout.adb (Set_Error_Posted): When propagating flag to
3923 an enclosing named association, also propagate to the parent
3924 of that node, so that named and positional associations are
3925 treated consistently.
3927 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3929 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
3930 Do_Range_Check properly on array component expressions that
3931 have a scalar type. In GNATprove mode, only checks on scalar
3932 components must be marked by the front-end.
3934 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3936 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3937 expression is a limited view, use the non-limited view when
3940 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3942 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
3943 case statement as coming from a conditional expression.
3944 (Expand_N_If_Expression): Mark the generated if statement as
3945 coming from a conditional expression.
3946 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
3947 objects found in case statement alternatives when the case
3948 statement is actually a case expression.
3949 (Expand_N_If_Statement):
3950 Do not process controlled objects found in an if statement when
3951 the if statement is actually an if expression.
3952 * sinfo.adb (From_Conditional_Expression): New routine.
3953 (Set_From_Conditional_Expression): New routine.
3954 * sinfo.ads Add new semantic flag From_Conditional_Expression and
3955 update related nodes.
3956 (From_Conditional_Expression): New routine along with pragma Inline.
3957 (Set_From_Conditional_Expression): New routine along with pragma Inline.
3959 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3961 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
3962 formal parameter Obj_Id and update the comment on usage. Renamed
3963 Obj_Typ to Func_Typ and update all occurrences.
3964 (Find_Last_Init): Remove formal parameter Decl and update the comment
3966 Remove local constants Obj_Id and Obj_Typ. Remove local variables
3967 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
3968 (Find_Last_Init_In_Block): Remove formal parameter
3969 Init_Typ and update the comment on usage.
3970 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
3971 on usage. Check whether the procedure call is an initialization
3972 procedure of either the object type or the initialization type.
3973 (Is_Init_Proc_Of): New routine.
3974 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
3975 routine. Add new variable Init_Typ. Add circuitry to extract the object
3976 type as well as the initialization type.
3978 2014-07-29 Robert Dewar <dewar@adacore.com>
3980 * sem_case.adb: Minor reformatting.
3981 * sem_aux.ads: Minor reformatting.
3983 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3985 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
3986 pointer on these fields, even though they are semantic, because
3987 subsequent analysis and expansion of action nades may require
3988 exploring the tree, for example to locate a node to be wrapped
3989 when a function with controlled result is called.
3991 2014-07-29 Claire Dross <dross@adacore.com>
3993 * sem_aux.adb (Get_Binary_Nkind): Use case on
3994 Name_Id instead of an intermediate string.
3995 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
3998 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
4000 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
4001 about processing sources with preprocessor directives.
4003 2014-07-24 Martin Liska <mliska@suse.cz>
4005 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
4006 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
4007 (gnat_write_global_declarations): Likewise.
4009 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
4011 * gnat_rm.texi: Clean up for makeinfo 5.2.
4013 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
4015 * gnat_rm.texi (Machine Code Insertions): Clean up.
4017 2014-07-18 Robert Dewar <dewar@adacore.com>
4019 * exp_ch7.adb: Minor reformatting.
4021 2014-07-18 Claire Dross <dross@adacore.com>
4023 * sem_aux.ads (Get_Binary_Nkind): New function that returns
4024 the Node_Kind value of an entity defining a binary operator.
4025 (Get_Unary_Nkind): New function that returns the Node_Kind value
4026 of an entity defining a unary operator.
4028 2014-07-18 Pascal Obry <obry@adacore.com>
4030 * sysdep.c: comment update.
4031 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
4032 platforms where it is known to be supported.
4034 2014-07-18 Thomas Quinot <quinot@adacore.com>
4036 * sem_dist.adb (Process_Remote_AST_Declaration): Need
4037 to set Fat_Type's Ekind in order to be able to use its
4038 Corresponding_Remote_Type attribute.
4040 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4042 * einfo.adb Last_Aggregate_Assignment is now Node 30.
4043 (Last_Aggregate_Assignment): Include
4044 constants in the assertion. Update the underlying node.
4045 (Set_Last_Aggregate_Assignment): Include constants in the
4046 assertion. Update the underlying node. (Write_Field11_Name):
4047 Remove the entry for Last_Aggregate_Assignment.
4048 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
4049 * einfo.ads Update the node designation and usage of attribute
4050 Last_Aggregate_Assignment.
4051 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
4052 assignment statement used to initialize a controlled object.
4053 (Late_Expansion): Store the last assignment statement used to
4054 initialize a controlled record or an array of controlled objects.
4055 * exp_ch3.adb (Expand_N_Object_Declaration): Default
4056 initialization of objects is now performed in a separate routine.
4057 (Default_Initialize_Object): New routine.
4058 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
4059 Obj_Id. Update the comment on usage.
4060 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
4061 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
4062 (Is_Init_Call): Add formal parameter Init_Typ. Update the
4063 comment on usage. Account for the type init proc when trying
4064 to determine whether a statement is an initialization call.
4065 (Make_Adjust_Call): Rename formal parameter For_Parent to
4066 Skip_Self. Update all occurrences of For_Parent. Account for
4067 non-tagged types. Update the call to Make_Call.
4068 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
4069 comment on usage. Update all occurrences of For_Parent.
4070 (Make_Final_Call): Rename formal parameter For_Parent to
4071 Skip_Self. Update all occurrences of For_Parent. Account
4072 for non-tagged types. Update the call to Make_Call.
4073 (Process_Object_Declaration): Most variables and constants are
4074 now local to the routine.
4075 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
4076 For_Parent to Skip_Self. Update the comment on usage.
4077 (Make_Final_Call): Rename formal parameter For_Parent to
4078 Skip_Self. Update the comment on usage.
4080 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4082 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
4083 can be a procedure that is implemented by entry, and have a
4084 formal that is a synchronized interface. It does not have to
4085 be declared as a protected operation.
4087 2014-07-18 Robert Dewar <dewar@adacore.com>
4089 * gnat_rm.texi: Remove mention of obsolete attributes
4090 Max[_Interrupt]_Priority, which have never been implemented
4091 (or at the very least were removed long ago if they ever were
4092 implemented. Add documentation of Max[_Interrupt]_Priority
4093 constants in package System.
4094 * ttypes.ads: Document actual handling of package System,
4095 rather than a historical fantasy version. Remove mention of
4096 non-existent attributes Max[_Interrupt]_Priority.
4098 2014-07-18 Pascal Obry <obry@adacore.com>
4100 * a-witeio.adb (Put): No 16-bit character output when text
4101 translation is disabled.
4102 * i-cstrea.ads: Code clean up.
4104 2014-07-18 Robert Dewar <dewar@adacore.com>
4106 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
4109 2014-07-18 Arnaud Charlet <charlet@adacore.com>
4111 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
4113 2014-07-18 Pascal Obry <obry@adacore.com>
4115 * adaint.c: Do not include wchar.h on VxWorks.
4116 * mingw32.h: Remove obsolete definition.
4118 2014-07-18 Pascal Obry <obry@adacore.com>
4120 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
4121 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
4122 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
4123 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
4125 2014-07-18 Pascal Obry <obry@adacore.com>
4127 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
4128 * a-ztexio.adb: Likewise.
4129 * a-witeio.adb: Likewise.
4130 (Open): Pass file's translation mode to set_text_mode.
4131 * s-ficobl.ads (Content_Encoding): New type.
4132 (Text_Content_Encoding): New subtype.
4133 (AFCB): Rename Is_Text_File to Text_Encoding.
4134 * s-fileio.adb (Open): Handles new text_translation
4135 values. Remove Is_Text_File which is equivalent to Text_Encoding
4136 in Text_Content_Encoding.
4137 * adaint.h (__gnat_set_mode): New routine.
4138 * sysdep.c (__gnat_set_wide_text_mode): Removed.
4139 (__gnat_set_mode): New routine.
4141 2014-07-18 Arnaud Charlet <charlet@adacore.com>
4143 * gcc-interface/decl.c, gcc-interface/trans.c,
4144 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
4145 Is_Packed_Array_Impl_Type.
4147 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4149 * sem_util.adb: Minor typo correction.
4151 2014-07-18 Ben Brosgol <brosgol@adacore.com>
4153 * gnat_rm.texi: Complete previous change.
4155 2014-07-18 Pascal Obry <obry@adacore.com>
4157 * s-fileio.adb: Minor style fix.
4159 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4161 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
4162 specification of stream attributes for subtypes that are not
4163 first subtypes, to prevent malformed rep_item chains in the case
4164 of such illegal specifications for discriminated private subtypes.
4165 (Check_Overloaded_Name): Verify that the name is an entity name
4166 before other checks.
4168 2014-07-18 Pascal Obry <obry@adacore.com>
4170 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
4172 2014-07-18 Robert Dewar <dewar@adacore.com>
4174 * sem_prag.adb, sem_attr.adb,
4175 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
4177 2014-07-18 Pascal Obry <obry@adacore.com>
4179 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
4180 * initialize.c (__gnat_wide_text_translation_required): Defined here.
4182 2014-07-18 Pascal Obry <obry@adacore.com>
4184 * adaint.c (__gnat_fputwc): New routine.
4185 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
4187 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4189 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
4190 (Set_Stores_Attribute_Old_Prefix): New routine.
4191 (Stores_Attribute_Old_Prefix): New routine.
4192 (Write_Entity_Flags):
4193 Output flag Stores_Attribute_Old_Prefix.
4194 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
4196 (Set_Stores_Attribute_Old_Prefix): New routine
4197 along with pragma Inline.
4198 (Stores_Attribute_Old_Prefix): New
4199 routine along with pragma Inline.
4200 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
4201 constant which captures the result of attribute 'Old's prefix.
4202 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
4203 relocated expression which acted as a prefix of attribute 'Old.
4205 2014-07-18 Bob Duff <duff@adacore.com>
4207 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
4208 null before dispatching to Deallocate_Subpool.
4209 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
4210 parameter of Default_Subpool_For_Pool to 'in out'.
4211 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
4212 a message to the raise.
4213 * sem_util.adb: Minor reformatting.
4215 2014-07-18 Robert Dewar <dewar@adacore.com>
4217 * sem_util.adb (Check_Expression_Against_Static_Predicate):
4218 Mark expression as non-static if it fails static predicate check,
4219 and issue additional warning.
4221 2014-07-18 Pascal Obry <obry@adacore.com>
4223 * a-witeio.adb (Put): Control translation based on
4224 wide_text_translation_required.
4225 * adaint.c (CurrentCCSEncoding): New variable.
4226 * initialize.c (__gnat_initialize): On Windows initialize
4227 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
4228 environment variable.
4229 * mingw32.h (CurrentCCSEncoding): New external.
4230 (__gnat_wide_text_translation_required): Likewise.
4231 * sysdep.c (wide_text_translation_required): New variable.
4232 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
4234 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4236 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
4237 variable Refined_States. Add global variable Matched_Items.
4238 (Check_Dependency_Clause): Account for dependency
4239 clauses utilizing states with visible null refinements.
4240 (Is_Null_Refined_State): New routine.
4241 (Match_Items): Record each successfully matched item of pragma Depends.
4242 (Record_Item): New routine.
4244 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4246 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
4247 Do_Range_Check flag on a dynamic index expression used in a
4248 component association in the argument of Update.
4250 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4252 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
4254 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4256 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
4257 of enclosing blocks, loops and the enclosing function using a
4258 parent-based traversal.
4259 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
4260 stack reclamation if the iterator loop contains a return statement
4261 that uses the stack.
4262 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
4263 patch up the scope stack as the secondary stack management now
4264 takes into account the enclosing function of the iterator loop.
4266 2014-07-18 Robert Dewar <dewar@adacore.com>
4268 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
4270 2014-07-18 Robert Dewar <dewar@adacore.com>
4272 * einfo.adb (Has_Static_Predicate): New function.
4273 (Set_Has_Static_Predicate): New procedure.
4274 * einfo.ads (Has_Static_Predicate): New flag.
4275 * sem_ch13.adb (Is_Predicate_Static): New function
4276 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
4277 (Add_Call): Minor change in Sloc of generated expression
4278 (Add_Predicates): Remove setting of Static_Pred, no longer used.
4279 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
4280 replace by use of the entity flag Has_Static_Predicate_Aspect.
4281 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
4282 and issue warning that predicate is not checked for now.
4283 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
4285 * sem_util.adb (Check_Expression_Against_Static_Predicate):
4286 Carry out check for any case where there is a static predicate,
4287 and output appropriate message.
4288 * sinfo.ads: Minor comment corrections.
4290 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4292 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
4293 from an untagged private type whose full view is tagged, the type
4294 is marked tagged for layout reasons, but it has no dispatch table,
4295 so Set_All_DT_Position must not be called.
4296 * exp_ch13.adb: If the freeze node is for a type internal to a
4297 record declaration, as is the case for a class-wide subtype
4298 of a parent component, the relevant scope is the scope of the
4301 2014-07-18 Thomas Quinot <quinot@adacore.com>
4303 * g-memdum.adb, g-memdum.ads: Code clean ups.
4305 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4307 * sem_prag.adb (Check_Dependency_Clause):
4308 Update the comment on usage. Reimplement the mechanism which
4309 attempts to match a single clause of Depends against one or
4310 more clauses of Refined_Depends.
4311 (Input_Match): Removed.
4312 (Inputs_Match): Removed.
4313 (Is_Self_Referential): Removed.
4314 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
4315 (Normalize_Outputs): Rename variable Split to New_Claue and update
4316 all its occurrences.
4317 (Report_Extra_Clauses): Update the comment on usage.
4318 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
4320 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4322 * i-cstrea.ads: Minor reformatting.
4324 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4326 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
4327 secondary stack-related flags to the generated block.
4328 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
4329 once the loop is relocated in a block.
4331 2014-07-18 Robert Dewar <dewar@adacore.com>
4333 * repinfo.ads: Add documentation on handling of back annotation
4336 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4338 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
4339 of full type declaration, denotes previous declaration for
4340 incomplete view of the type.
4341 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
4342 of declaration if one is present.
4343 (Replace_Type): When constructing the signature of an inherited
4344 operation, handle properly the case where the operation has a
4345 formal whose type is an incomplete view.
4346 * sem_util.adb (Collect_Primitive_Operations): Handle properly
4347 the case of an operation declared after an incomplete declaration
4348 for a type T and before the full declaration of T.
4350 2014-07-18 Pascal Obry <obry@adacore.com>
4352 * i-cstrea.ads: Add documentation for set_wide_text_mode.
4354 2014-07-18 Robert Dewar <dewar@adacore.com>
4356 * a-witeio.adb: Minor code reorganization.
4357 * i-cstrea.ads: Add comment.
4359 2014-07-18 Thomas Quinot <quinot@adacore.com>
4361 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
4364 2014-07-18 Robert Dewar <dewar@adacore.com>
4366 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
4368 2014-07-18 Pascal Obry <obry@adacore.com>
4370 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
4371 * a-witeio.adb (Put): On platforms where there is translation
4372 done by the OS output the raw text.
4373 (New_Line): Use Put above to properly handle the LM wide characters.
4375 2014-07-18 Thomas Quinot <quinot@adacore.com>
4377 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
4378 to Absolute_Address.
4380 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
4382 * opt.ads (Suppress_Back_Annotation): Remove as unused.
4383 * fe.h (Back_Annotate_Rep_Info): Likewise.
4384 (Global_Discard_Names): Likewise.
4386 2014-07-18 Robert Dewar <dewar@adacore.com>
4388 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
4391 2014-07-18 Vincent Celier <celier@adacore.com>
4393 * s-osinte-vms.ads: Fix style errors.
4395 2014-07-18 Thomas Quinot <quinot@adacore.com>
4397 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
4398 NAME_MAX and PATH_MAX.
4400 2014-07-18 Bob Duff <duff@adacore.com>
4402 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
4403 Build_Record_Or_Elementary_Output_Procedure): For Input and
4404 Output attributes, do not read/write the discriminants if they
4405 have default values; that will be done by Read/Write.
4407 2014-07-18 Robert Dewar <dewar@adacore.com>
4409 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
4410 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
4411 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
4412 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
4413 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
4415 2014-07-18 Robert Dewar <dewar@adacore.com>
4417 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
4419 2014-07-18 Vincent Celier <celier@adacore.com>
4421 * lib-writ.ads: Update documentation about the D lines.
4423 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4425 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
4426 as a parameter, rather than its Chars field, in order to locate
4427 freeze node of type. If the predicate or invariant has references
4428 to types other than the one to which the contract applies, these
4429 types must be frozen, and the corresponding predicate functions
4430 created, before that freeze node.
4432 2014-07-18 Robert Dewar <dewar@adacore.com>
4434 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
4435 * par_sco.adb: Minor reformatting.
4437 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4439 * exp_ch4.adb (Real_Range_Check): Turn off
4440 the Do_Range_Check flag on the conversion's current Expression
4441 argument rather than on the originally captured Operand node,
4442 as Expression may reflect a rewriting (as in conversions to a
4445 2014-07-18 Vincent Celier <celier@adacore.com>
4447 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
4449 * ali.ads (Sdep_Record): New component Unit_Name.
4450 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
4451 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
4452 dependent unit is in a project and the source file name is not
4455 2014-07-18 Bob Duff <duff@adacore.com>
4457 * s-addima.ads: Minor: add comment.
4459 2014-07-18 Thomas Quinot <quinot@adacore.com>
4461 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
4462 of nesting rules for composites with different SSOs.
4464 2014-07-18 Thomas Quinot <quinot@adacore.com>
4466 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
4467 a proper logical operator.
4468 (Has_Decision): An If_Expression indicates the presence of a decision
4469 although it is not a logical operator.
4471 2014-07-18 Robert Dewar <dewar@adacore.com>
4473 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
4474 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
4476 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
4478 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
4479 on the null statement.
4481 2014-07-18 Thomas Quinot <quinot@adacore.com>
4483 * adaint.c: Minor comment rewording.
4484 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
4485 use of errno in this file is thread safe.
4487 2014-07-18 Arnaud Charlet <charlet@adacore.com>
4489 * gnat_ugn.texi: Doc clarification.
4490 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
4491 * sem_ch13.ads: Minor comment update.
4493 2014-07-18 Robert Dewar <dewar@adacore.com>
4495 * repinfo.ads: Minor comment fix.
4497 2014-07-18 Robert Dewar <dewar@adacore.com>
4499 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
4500 * sem_prag.adb: Add dummy implementation of
4501 Default_Scalar_Storage_Order.
4502 * snames.ads-tmpl: Add dummy entry for
4503 Default_Scalar_Storage_Order pragma.
4505 2014-07-18 Robert Dewar <dewar@adacore.com>
4507 * opt.adb (Tree_Read): Read Address_Is_Private,
4508 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
4509 (Tree_Write): Corresponding writes
4510 * opt.ads: Minor comment reformatting and fixes.
4511 * tree_io.ads: Increment ASIS_Version_Number.
4513 2014-07-18 Robert Dewar <dewar@adacore.com>
4515 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
4516 * types.h: Fix typo.
4518 2014-07-18 Robert Dewar <dewar@adacore.com>
4520 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
4522 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
4524 * sem_ch13.adb (Kill_Rep_Clause): New procedure
4525 (Analyze_Attribute_Definition_Clause): Use
4526 Kill_Rep_Clause. This is just a cleanup, no functional effect.
4527 (Analyze_Enumeration_Representation_Clause):
4528 Use Kill_Rep_Clause. This means that enum rep
4529 clauses are now properly removed from -gnatct trees.
4530 (Analyze_Record_Representation_Clause): Same change.
4531 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
4533 2014-07-18 Pascal Obry <obry@adacore.com>
4535 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
4536 OS_Time from time parts.
4537 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
4539 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4541 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
4542 indexing over containers that are derived types: check whether
4543 signature of found operation has the correct first parameter
4544 before retrieving directly a primitive operation.
4546 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4548 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
4549 Do_Range_Check flag on dynamic bounds of a range used in a
4550 component association in the argument of Update.
4552 2014-07-18 Thomas Quinot <quinot@adacore.com>
4554 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
4555 accesses to errno(3) to be thread safe.
4557 2014-07-18 Vincent Celier <celier@adacore.com>
4559 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
4560 limited imported project that is an extending project, return
4561 a project being extended if it has the expected name.
4563 2014-07-18 Pascal Obry <obry@adacore.com>
4565 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
4566 routine to set the last modification time stamp for the given file.
4567 * gnatchop.adb (File_Time_Stamp): Removed.
4569 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
4571 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4573 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
4574 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
4575 Moved here, so it can be shared with the resolution of 'Update,
4576 whose argument shares some features with aggregates.
4577 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
4578 Aggregate_Constraint_Checks with the expression of each
4579 association, so that the Do_Range_Check flag is set when needed.
4581 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4583 * sem_ch4.adb (Try_Container_Indexing): If the container
4584 type is a derived type, the value of the inherited aspect is
4585 the Reference operation declared for the parent type. However,
4586 Reference is also a primitive operation of the new type, and
4587 the inherited operation has a different signature. We retrieve
4588 the right one from the list of primitive operations of the
4591 2014-07-18 Vincent Celier <celier@adacore.com>
4593 * debug.adb: Update comment.
4595 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4597 * exp_util.adb (Needs_Finalization): There is no reason why a
4598 C type should not benefit from finalization actions.
4600 2014-07-18 Thomas Quinot <quinot@adacore.com>
4602 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
4603 (FILENAME_MAX): Remove unneeded definition.
4605 2014-07-18 Robert Dewar <dewar@adacore.com>
4607 * exp_attr.adb, debug.adb: Update comments.
4609 2014-07-18 Vincent Celier <celier@adacore.com>
4611 * par-ch4.adb (Simple_Expression): Add missing style check
4612 for binary adding operators.
4613 (Term): Add missing style check for multiplying operators.
4615 2014-07-18 Robert Dewar <dewar@adacore.com>
4617 * impunit.adb: Minor comment correction.
4618 * widechar.adb, s-wchcon.ads: Minor comment corrections.
4620 2014-07-18 Robert Dewar <dewar@adacore.com>
4622 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
4623 for Build_Static_Predicate (Build_Predicate_Functions):
4624 Don't try to build discrete predicate for real type.
4625 (Build_Predicate_Functions): Report attempt to use
4626 Static_Predicate function on real type as unimplemented.
4627 * sem_util.adb (Check_Expression_Against_Static_Predicate):
4628 Add guard to prevent blow up on predicate for real type.
4630 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4632 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
4633 properly static predicate on enumeration types and modular types
4636 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
4638 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
4639 the corresponding source file index.
4640 * get_scos.ads (Get_SCOs): Add a default value for it.
4641 * par_sco.adb (SCO_Record): Fill the corresponding value.
4644 2014-07-18 Vincent Celier <celier@adacore.com>
4646 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
4647 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
4649 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
4651 2014-07-18 Thomas Quinot <quinot@adacore.com>
4653 * g-sercom.ads (Set): document possible data loss.
4655 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4657 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
4658 Output, Read, Write): If the restriction No_Streams is active,
4659 replace each occurrence of a stream attribute by an explicit
4662 2014-07-18 Robert Dewar <dewar@adacore.com>
4664 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
4667 2014-07-18 Robert Dewar <dewar@adacore.com>
4669 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
4671 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
4672 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
4673 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
4674 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
4676 2014-07-18 Robert Dewar <dewar@adacore.com>
4678 * bcheck.adb (Check_Consistent_Restrictions):
4679 Remove obsolete code checking for violation of
4680 No_Standard_Allocators_After_Elaboration (main program)
4681 * bindgen.adb (Gen_Adainit): Handle
4682 No_Standard_Allocators_After_Elaboration
4683 (Gen_Output_File_Ada): ditto.
4684 * exp_ch4.adb (Expand_N_Allocator): Handle
4685 No_Standard_Allocators_After_Elaboration.
4686 * Makefile.rtl: Add entry for s-elaall
4687 * rtsfind.ads: Add entry for Check_Standard_Allocator.
4688 * s-elaall.ads, s-elaall.adb: New files.
4689 * sem_ch4.adb (Analyze_Allocator): Handle
4690 No_Standard_Allocators_After_Elaboration.
4692 2014-07-18 Robert Dewar <dewar@adacore.com>
4694 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
4695 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
4696 Remove AB parameter from ali files and all uses.
4697 Remove Allocator_In_Body and all uses.
4699 2014-07-18 Robert Dewar <dewar@adacore.com>
4701 * g-expect-vms.adb: Add comment.
4703 2014-07-18 Thomas Quinot <quinot@adacore.com>
4705 * par_sco.adb (Is_Logical_Operation): return True for
4708 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4710 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
4711 analysis and resolution of each choice in the associations within
4712 the argument of Update, because they may be variable names.
4714 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4716 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
4717 actions before the generated if statement.
4719 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4721 * gnat_ugn.texi Enhance the documentation of
4722 switches -gnateA and -gnateV.
4724 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4726 * sem_util.adb (Build_Default_Subtype): Add missing condition
4727 so that code matches description: use the full view of the base
4728 only if the base is private and the subtype is not.
4730 2014-07-17 Gary Dismukes <dismukes@adacore.com>
4732 * exp_disp.adb: Minor reformatting.
4733 * exp_disp.adb: Minor code reorganization.
4735 2014-07-17 Thomas Quinot <quinot@adacore.com>
4737 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
4738 require an explicit SSO attribute definition clause on a composite type
4739 just because one of its components has one.
4741 2014-07-17 Robert Dewar <dewar@adacore.com>
4743 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
4744 attribute out of existence if the enclosing pragma is ignored.
4745 * sem_util.adb: Minor reformatting.
4747 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4749 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
4750 array aggregate expanded into assignments when it appears as a
4751 local declaration in an inlined body.
4753 2014-07-17 Doug Rupp <rupp@adacore.com>
4755 * init.c [__ANDROID__]: Modify for ZCX.
4756 * exp_aggr.adb: Minor reformatting
4757 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
4759 2014-07-17 Robert Dewar <dewar@adacore.com>
4761 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
4762 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
4763 scng.adb: Remove incorrect usage "allow to" and "allows to".
4765 2014-07-17 Robert Dewar <dewar@adacore.com>
4767 * exp_dist.adb: Minor reformatting.
4769 2014-07-17 Bob Duff <duff@adacore.com>
4771 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
4773 2014-07-17 Robert Dewar <dewar@adacore.com>
4775 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
4776 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
4778 2014-07-17 Thomas Quinot <quinot@adacore.com>
4780 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
4781 non-bit-packed array, propagate Reverse_Storage_Order to the
4784 2014-07-17 Javier Miranda <miranda@adacore.com>
4786 * exp_disp.adb: Fix comment.
4787 * exp_pakd.adb: Minor reformatting.
4789 2014-07-17 Robert Dewar <dewar@adacore.com>
4791 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
4792 entity if none exists (Gen_Elab_Calls): Complain if clash with
4793 No_Multiple_Elaboration.
4794 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
4795 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
4797 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
4798 * sem_ch4.adb: Minor comment updates.
4800 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4802 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
4803 of function call for later use when shared passive objects
4806 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4808 * par-ch13.adb (Get_Aspect_Specifications):
4809 Catch a case where the argument of SPARK aspect Refined_State
4810 is not properly parenthesized.
4812 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4814 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
4815 the lifetime of a reference to an Ada 2012 container element.
4816 (Is_Element_Reference): New routine.
4818 2014-07-17 Robert Dewar <dewar@adacore.com>
4820 * ali.ads: Minor comment fix.
4821 * lib-writ.adb: Minor reformatting.
4823 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4825 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
4826 in ASIS mode, load another subunit only if it a subunit of the
4827 current one, not a sibling that has been reached through the
4828 analysis of an ancestor. This allows the construction of the
4829 ASIS tree for the subunit even when sibling subunits have errors.
4831 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4833 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
4834 prevents the analysis of various contracts when the associated
4835 construct is erroneous.
4836 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
4837 SPARK_Pragma of an illegal or a partially decorated construct.
4839 2014-07-17 Robert Dewar <dewar@adacore.com>
4841 * s-imguns.ads: Minor reformatting.
4843 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4845 * exp_ch7.adb (Build_Finalization_Master): Move all local
4846 variables to the proper code section. When looking for an existing
4847 finalization master, inspect the ultimate ancestor type of the
4849 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
4851 2014-07-17 Robert Dewar <dewar@adacore.com>
4853 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
4854 * gnat_rm.texi: Document Entity argument for pragma Annotate and
4856 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
4857 for Annotate aspect.
4858 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
4859 Entity argument at end.
4860 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
4862 2014-07-17 Tristan Gingold <gingold@adacore.com>
4864 * s-imguns.ads: Fix minor typo.
4866 2014-07-17 Thomas Quinot <quinot@adacore.com>
4868 * sprint.adb: Minor reformatting.
4870 2014-07-17 Robert Dewar <dewar@adacore.com>
4872 * sprint.adb (Write_Itype): Print proper header for string
4875 2014-07-17 Steve Baird <baird@adacore.com>
4877 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
4879 2014-07-17 Vincent Celier <celier@adacore.com>
4881 * gnatbind.adb: Change in message "try ... for more information".
4883 2014-07-17 Robert Dewar <dewar@adacore.com>
4885 * sprint.adb: Code clean up.
4887 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4889 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
4890 the relevant code section. Add new local constant Obj_Id. When
4891 a limited controlled object is initialized by a function call,
4892 the build-in-place object access function call acts as the last
4893 initialization statement.
4894 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
4895 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
4896 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
4898 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4900 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
4901 propagate intrinsic flag to renamed entity, to allow e.g. renaming
4902 of Unchecked_Conversion.
4903 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
4904 if the declaration has errors.
4906 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4908 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
4909 container is busy before checking whether capacity allows for
4910 a further insertion. Insertion in a busy container that is full
4911 raises Program_Error rather than Capacity_Error. Previous to that
4912 patch which exception was raised varied among container types.
4914 2014-07-17 Robert Dewar <dewar@adacore.com>
4916 * g-comlin.ads, g-comlin.adb: Minor clean up.
4918 2014-07-17 Bob Duff <duff@adacore.com>
4920 * gnat_ugn.texi: Update gnatpp doc.
4922 2014-07-17 Robert Dewar <dewar@adacore.com>
4924 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
4925 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
4926 could do this by actually expanding a real generic.
4927 * a-tags.ads: Add comments about performance.
4928 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
4929 Print Etype of defining identifier, rather than the object
4930 definition. More information.
4932 2014-07-17 Thomas Quinot <quinot@adacore.com>
4934 * exp_dist.adb: Minor documentation clarification.
4936 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4938 * exp_util.adb (Is_Aliased): Revert previous change.
4940 2014-07-17 Vincent Celier <celier@adacore.com>
4942 * g-comlin.adb (Try_Help): New procedure.
4943 (Getopt): Use new procedure Try_Help.
4944 * g-comlin.ads (Try_Help): New procedure.
4946 2014-07-17 Bob Duff <duff@adacore.com>
4948 * gnat_ugn.texi: Minor update.
4950 2014-07-17 Robert Dewar <dewar@adacore.com>
4952 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
4953 * sinfo.ads: Document restriction on aggregates (must expand to
4954 assignments if one or more assignments needs expansion, e.g. for
4956 * sem_ch13.adb: All warning messages regarding bit order should
4958 * gnat_ugn.texi: Minor correction of missing @ on @code
4960 2014-07-17 Robert Dewar <dewar@adacore.com>
4962 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
4963 * s-rident.ads (Partition_Boolean_Restrictions): Add
4964 No_Long_Long_Integer.
4965 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
4966 Long_Integer'Size if restriction No_Long_Long_Integer is active.
4967 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
4968 as the implicit base type for a signed integer type declaration
4969 if restriction No_Long_Long_Integer is active.
4970 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
4971 No_Long_Long_Integer.
4973 2014-07-17 Robert Dewar <dewar@adacore.com>
4975 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
4976 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
4977 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
4978 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
4979 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
4981 2014-07-17 Robert Dewar <dewar@adacore.com>
4983 * debug.adb: Remove -gnatdQ.
4984 * exp_disp.adb: Remove -gnatdQ.
4985 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
4986 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
4987 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
4988 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
4989 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
4990 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
4992 2014-07-17 Robert Dewar <dewar@adacore.com>
4994 * back_end.adb: Minor reformatting and comment additions.
4995 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
4997 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
4998 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
4999 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
5000 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
5001 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
5002 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
5004 2014-07-17 Robert Dewar <dewar@adacore.com>
5006 * gnat_rm.texi: Minor comment updates.
5008 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5010 * sem_util.adb (Make_Explicit_Dereference): If the expression
5011 being dereferenced is a generalized indexing, reset the overloaded
5012 flag on the generalized indexing call, consistent with the
5013 resetting of the flag on the original indexed component.
5015 2014-07-17 Robert Dewar <dewar@adacore.com>
5017 * gnat_ugn.texi: Document advise not to mix -gnatV? and
5020 2014-07-17 Robert Dewar <dewar@adacore.com>
5022 * checks.adb (Insert_Valid_Check): Don't insist on a name
5023 for the prefix when we make calls to Force_Evaluation and
5024 Duplicate_Subexpr_No_Checks.
5025 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
5026 (Remove_Side_Effects): Handle all volatile references right
5027 (Side_Effect_Free): Volatile reference is never side effect free
5028 * sinfo.ads (N_Attribute_Reference): Add comments explaining
5029 that in the tree, the prefix can be a general expression.
5031 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5033 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
5034 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
5035 * sem_ch7.adb (Analyze_Package_Body_Contract,
5036 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
5038 2014-07-17 Robert Dewar <dewar@adacore.com>
5040 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
5041 Store_After_Actions_In_Scope.
5043 2014-07-17 Robert Dewar <dewar@adacore.com>
5045 * sem_aux.ads: Minor comment addition.
5047 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5049 * sem_res.adb (Make_Call_Into_Operator): If the call is already
5050 a rewriting of an operator node, there are no actuals to be
5051 propagated from original node to rewritten node when in ASIS mode.
5053 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5055 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
5056 Analyze_Subprogram_Contract): Add new local variable Mode. Save
5057 and restore the SPARK mode of the related construct in a
5059 * sem_ch7.adb (Analyze_Package_Body_Contract,
5060 Analyze_Package_Contract): Add new local variable Mode. Save and
5061 restore the SPARK mode of the related construct in a stack-like fashion.
5062 * sem_util.adb Remove with and use clause for Opt.
5063 (Restore_SPARK_Mode): New routine.
5064 (Save_SPARK_Mode_And_Set): New routine.
5065 * sem_util.ads Add with and use clause for Opt.
5066 (Restore_SPARK_Mode): New routine.
5067 (Save_SPARK_Mode_And_Set): New routine.
5069 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5071 * exp_util.adb (Is_Aliased): Transient objects
5072 within an expression with actions cannot be considered aliased.
5074 2014-07-17 Thomas Quinot <quinot@adacore.com>
5076 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
5077 introduce a new list (cleanup actions) for each (transient) scope.
5078 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
5080 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
5081 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
5082 processing for Store_xxx_Actions_In_Scope.
5083 (Build_Cleanup_Statements): Allow for a list of additional
5084 cleanup statements to be passed by the caller.
5085 (Expand_Cleanup_Actions): Take custom cleanup actions associated
5086 with an N_Block_Statement into account.
5087 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
5088 reorganization (refactoring only, no behaviour change).
5089 (Make_Transient_Block): Add assertion to ensure that the current
5090 scope is indeed a block (namely, the entity for the transient
5091 block being constructed syntactically, which has already been
5092 established as a scope). If cleanup actions are present in the
5093 transient scope, transfer them now to the transient block.
5094 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
5095 called function while it is still present as the name in a call
5096 in the tree. This may not be the case later on if the call is
5097 rewritten into a transient block.
5098 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
5099 inserted after calling a protected operation on a shared passive
5100 protected must be performed in a block finalizer, not just
5101 inserted in the tree, so that they are executed even in case of
5102 a normal (RETURN) or abnormal (exception) transfer of control
5103 outside of the current scope.
5104 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
5105 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
5106 Scope_Stack_Entry reorganization.
5108 2014-07-17 Thomas Quinot <quinot@adacore.com>
5110 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
5111 call for types that do not have an explicit attribute definition
5112 clause for External_Tag, as their default tag may clash with an
5113 explicit tag defined for some other type.
5115 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5117 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
5118 controlled function call with multiple actual parameters that
5119 appears in Object.Operation form.
5121 2014-07-17 Thomas Quinot <quinot@adacore.com>
5123 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
5125 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5126 External_Tag): No need to set entity flag.
5127 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
5128 Reimplement correctly in terms of Has_Rep_Item.
5130 2014-07-17 Thomas Quinot <quinot@adacore.com>
5132 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
5133 Start examining the tree at the node passed to
5134 Establish_Transient_Scope (not its parent).
5135 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5136 The access type for the variable storing the reference to
5137 the call must be declared and frozen prior to establishing a
5139 * exp_ch9.adb: Minor reformatting.
5141 2014-07-17 Pascal Obry <obry@adacore.com>
5143 * s-os_lib.ads: Minor comment update.
5145 2014-07-17 Tristan Gingold <gingold@adacore.com>
5147 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
5149 * socket.c: Remove #warning to avoid warning.
5150 * expect.c: Indent some preprocessor directives to clarify
5151 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
5153 * env.c: Fix indentation. Port to PikeOS.
5154 * gsocket.h: Port to PikeOS. Remove #warning.
5155 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
5156 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
5157 of stubbed __gnat_setup_parent_communication.
5158 * adaint.c: Port to PikeOS. Reindent some preprocessor
5159 directives to clarify nested if. Fix indentation. Add missing
5162 2014-07-17 Robert Dewar <dewar@adacore.com>
5164 * sem_attr.adb: Minor reformatting.
5166 2014-07-17 Robert Dewar <dewar@adacore.com>
5168 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
5170 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5172 * sem_case.adb (Check_Choice_Set): If the case expression is the
5173 expression in a predicate, do not recheck coverage against itself,
5174 to prevent spurious errors.
5175 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
5176 expression comes from an aspect specification, to prevent spurious
5177 errors when expression is a case expression in a predicate.
5179 2014-07-17 Pascal Obry <obry@adacore.com>
5181 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
5182 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
5184 2014-07-17 Vincent Celier <celier@adacore.com>
5186 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
5187 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
5188 the usage for an erroneous invocation of a gnat tool.
5190 2014-07-16 Vincent Celier <celier@adacore.com>
5192 * gnatls.adb: Get the target parameters only if -nostdinc was
5195 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5197 * checks.adb (Insert_Valid_Check): If the expression is a packed
5198 component of a modular type of the right size the data is always
5199 valid. This os particularly useful if the component is part of
5200 a volatile variable.
5202 2014-07-16 Robert Dewar <dewar@adacore.com>
5204 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
5206 2014-07-16 Thomas Quinot <quinot@adacore.com>
5208 * exp_ch7.ads: Minor documentation fix.
5210 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5212 * sem_ch3.adb (Find_Type_Name): Diagnose properly
5213 a private extension completion that is an interface definition
5214 with an interface list.
5216 2014-07-16 Arnaud Charlet <charlet@adacore.com>
5218 * gnatls.adb (Gnatls): Code clean ups.
5220 2014-07-16 Thomas Quinot <quinot@adacore.com>
5222 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
5223 * sem.adb (Analyze): Handle N_Compound_Statement.
5224 * sprint.adb (Sprint_Node_Actual): Ditto.
5225 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
5226 procedure to handle N_Compound_Statement.
5227 * exp_aggr.adb (Collect_Initialization_Statements):
5228 Use a proper compound statement node, instead of a bogus
5229 expression-with-actions with a NULL statement as its expression,
5230 to wrap collected initialization statements.
5231 * freeze.ads, freeze.adb
5232 (Explode_Initialization_Compound_Statement): New public procedure,
5233 lifted from Freeze_Entity.
5234 (Freeze_Entity): When freezing
5235 an object with captured initialization statements and without
5236 delayed freezing, explode compount statement.
5237 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
5238 case that used to handle bogus EWAs with NULL statement as
5240 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
5241 delayed freezing and captured initialization statements, explode
5244 2014-07-16 Gary Dismukes <dismukes@adacore.com>
5246 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
5248 2014-07-16 Doug Rupp <rupp@adacore.com>
5250 * s-interr-hwint.adb: Casing error on parameter.
5252 2014-07-16 Pascal Obry <obry@adacore.com>
5254 * Makefile.rtl: Add g-rewdat.o dependencies in
5255 GNATRTL_NONTASKING_OBJS.
5257 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5259 * sem_case.adb: Code clean up.
5261 2014-07-16 Vincent Celier <celier@adacore.com>
5263 * make.adb: Do not read gnat.adc when gnatmake is invoked
5266 2014-07-16 Pascal Obry <obry@adacore.com>
5268 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
5269 implementation of GNAT.Rewrite_Data.
5271 2014-07-16 Vincent Celier <celier@adacore.com>
5273 * gnatls.adb (Normalize): New function.
5274 (Gnatls): Get the target parameters. On targets other than VMS,
5275 normalize the path names in the source search path, the object search
5276 path and the project search path.
5278 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5280 * sem_case.adb: Avoid self-checking of case expressions in
5283 2014-07-16 Robert Dewar <dewar@adacore.com>
5285 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
5288 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
5290 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
5292 2014-07-16 Ben Brosgol <brosgol@adacore.com>
5294 * gnat_ugn.texi: Fix typo.
5296 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5298 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
5299 expression if it is the specification of a subtype predicate:
5300 it will be expanded when the return statement is analyzed, or
5301 when a static predicate is transformed into a static expression
5302 for evaluation by the front-end.
5303 * sem_ch13.adb (Get_RList): If the expression for a static
5304 predicate is a case expression, extract the alternatives of the
5305 branches with a True value to create the required statically
5306 evaluable expression.
5308 2014-07-16 Thomas Quinot <quinot@adacore.com>
5310 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
5311 expression, not the location of the aspect, for all generated
5312 code, so that in particular the call to raise_assert_failure
5313 gets the sloc of the associated condition.
5315 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
5316 Set an explicit End_Label on the handled sequence of statements
5317 for the _Postconditions procedure so that the implicit return
5318 statement does not erroneously get associated with code generated
5319 for the last condition in postconditions.
5321 2014-07-16 Thomas Quinot <quinot@adacore.com>
5323 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
5324 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
5325 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
5328 2014-07-16 Robert Dewar <dewar@adacore.com>
5330 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
5331 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
5332 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
5334 * par-ch4.adb (At_Start_Of_Attribute): New function
5335 (P_Simple_Expression): Better msg for bad attribute prefix.
5336 * scans.ads: Minor reformatting.
5338 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5340 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
5341 static constant, check that in belongs to the corresponding index
5342 subtype, to produce the proer warning when expansion is disabled.
5344 2014-07-16 Robert Dewar <dewar@adacore.com>
5346 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
5347 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
5348 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
5349 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
5350 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
5352 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
5353 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
5356 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5358 * exp_ch7.adb (Process_Declarations): Reinstate the check on
5359 a hook object to ensure that the related transient declaration
5361 * exp_util.adb (Is_Aliased): Do not consider expresison with
5362 actions as a special context.
5363 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
5364 ensure that the related transient declaration is finalizable.
5366 2014-07-16 Robert Dewar <dewar@adacore.com>
5368 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
5369 * snames.ads-tmpl: Add Allocation_Check to list of check names.
5370 * types.ads: Add Allocation_Check to list of check names.
5372 2014-07-16 Thomas Quinot <quinot@adacore.com>
5374 * sem_util.adb (Enter_Name): replace bogus test for presence of
5375 Corresponding_Remote_Type with correct test on Ekind.
5376 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
5377 of calls to Corresponding_ Remote_Type (documentation fix).
5379 2014-07-16 Robert Dewar <dewar@adacore.com>
5381 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
5382 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
5384 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
5385 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
5387 2014-07-16 Robert Dewar <dewar@adacore.com>
5389 * gnat_ugn.texi: Document binder switch -Ra.
5390 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
5392 * opt.ads (List_Closure_All): New switch.
5393 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
5396 2014-07-16 Ben Brosgol <brosgol@adacore.com>
5398 * gnat_rm.texi: Minor edits, to make case consistent in names
5399 of types and fields.
5401 2014-07-16 Robert Dewar <dewar@adacore.com>
5403 * gnat_rm.texi: Document erroneous mixing of thin pointers and
5405 * gnat_ugn.texi: Add note on size of access types about thin
5406 pointers and the use of attribute Unrestricted_Access.
5408 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5410 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
5411 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
5412 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
5413 machinery to detect tampering on bounded vectors.
5415 2014-07-16 Robert Dewar <dewar@adacore.com>
5417 * gnat_rm.texi: Document that leading/trailing asterisks are
5418 now implied for the pattern match string for pragma Warnings
5419 and Warning_As_Error.
5420 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
5421 (Analyze_Pragma, case Warning_As_Error): Call
5422 Acquire_Warning_Match_String.
5423 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
5425 2014-07-16 Bob Duff <duff@adacore.com>
5427 * gnat_ugn.texi: Document need for project file
5428 for --incremental switch for gnat2xml.
5430 2014-07-16 Robert Dewar <dewar@adacore.com>
5432 * gnat_rm.texi: Fix example of non-packable components in packed
5435 2014-07-16 Robert Dewar <dewar@adacore.com>
5437 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
5438 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
5439 upper case in exception messages.
5441 2014-07-16 Robert Dewar <dewar@adacore.com>
5443 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
5444 is renamed Has_Same_Storage.
5445 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
5446 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
5449 2014-07-16 Robert Dewar <dewar@adacore.com>
5451 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
5452 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
5454 2014-07-16 Robert Dewar <dewar@adacore.com>
5456 * gnat_ugn.texi: Add note that integrated
5457 preprocessing cannot be applied to configuration pragma files.
5459 2014-07-16 Yannick Moy <moy@adacore.com>
5461 * sem_attr.adb (Analyze_Attribute/cases Pred
5462 and Succ): Always enable range check on fixed-point types if
5463 not suppressed for the type.
5465 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5467 * sem_util.adb (State_Has_Enabled_Property):
5468 Account for an external property denoted by an others choice.
5470 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5472 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
5473 * exp_ch7.adb (Process_Declarations): There is no need to check
5474 that a transient object being hooked is controlled as it would
5475 not have been hooked in the first place.
5476 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
5477 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
5478 (Is_Aliased): A renaming of a transient controlled object is
5479 not considered aliasing when it occurs within an expression
5481 (Requires_Cleanup_Actions): There is no need to
5482 check that a transient object being hooked is controlled as it
5483 would not have been hooked in the first place.
5484 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
5486 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5488 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
5489 the outer level of routine Analyze_Aspect_Specifications. Ensure
5490 that the corresponding pragmas of aspects Initial_Condition and
5491 Initializes are inserted after pragma SPARK_Mode.
5493 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5495 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
5496 properly a choice list with more than one choice, where each
5497 is an aggregate denoting a sequence of array indices for a
5498 multidimentional array. For SPARK use.
5500 2014-07-16 Vadim Godunko <godunko@adacore.com>
5502 * a-coinho-shared.adb (Adjust): Create
5503 copy of internal shared object and element when source container
5506 (Query_Element): Likewise.
5507 (Update_Element): Likewise.
5508 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
5509 to get reference for empty holder.
5510 (Reference): Likewise.
5512 2014-07-16 Thomas Quinot <quinot@adacore.com>
5514 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
5515 from Process_Transient_Oject.
5516 * exp_ch4.ads: Ditto.
5517 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
5518 declaration as an action on the topmost enclosing expression,
5519 not on a possibly conditional subexpreession.
5521 2014-07-16 Vadim Godunko <godunko@adacore.com>
5523 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
5524 Fix parameter mode of Update_Element.
5526 2014-07-16 Robert Dewar <dewar@adacore.com>
5528 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
5531 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5533 * a-cohase.ads: Type Iterator must be controlled, so that the
5534 tampering bit is properly set through an iteration.
5535 * a-cohase.adb: Add Finalize operation for type Iterator.
5537 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5539 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
5542 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5544 * a-coinho-shared.adb: Fix spurious accessibility check.
5546 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5548 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
5550 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5553 * gnat_rm.texi: Fix errors with makeinfo 5.1.
5555 2014-06-14 Arnaud Charlet <charlet@adacore.com>
5558 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
5560 2014-06-13 Yannick Moy <moy@adacore.com>
5562 * exp_attr.adb: Fix typo in comment.
5563 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
5564 checking in GNATprove_Mode.
5566 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5568 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
5570 2014-06-13 Robert Dewar <dewar@adacore.com>
5572 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
5575 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5577 * sem_prag.adb (Analyze_Pragma): Add local
5578 variable Missing_Parentheses. Emit an error when a state
5579 declaration with options appears without parentheses. Add a
5580 guard to prevent a bogus error when a state declaration may be
5581 interpreted as an option if a previous declaration with options
5582 was not parenthesized.
5584 2014-06-13 Robert Dewar <dewar@adacore.com>
5586 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
5587 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
5588 * checks.ads (Alignment_Warnings_Record): New type.
5589 (Alignment_Warnings): New table
5590 (Validate_Alignment_Check_Warnings): New procedure.
5591 * errout.adb (Delete_Warning_And_Continuations): New procedure
5592 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
5593 Warnings_Treated_As_Errors (Finalize): Minor reformatting
5594 * errout.ads (Warning_Msg): New variable
5595 (Delete_Warning_And_Continuations): New procedure
5596 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
5597 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
5599 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5601 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
5603 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5605 * errout.adb (SPARK_Msg_N): New routine.
5606 (SPARK_Msg_NE): New routine.
5607 * errout.ads Add a section on SPARK-related error routines.
5608 (SPARK_Msg_N): New routine.
5609 (SPARK_Msg_NE): New routine.
5610 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
5611 pragma Abstract_State is always inserted after SPARK_Mode.
5612 (Insert_After_SPARK_Mode): New routine.
5613 * sem_prag.adb (Analyze_Abstract_State,
5614 Analyze_Constituent, Analyze_External_Property,
5615 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
5616 Analyze_Global_List, Analyze_Initialization_Item,
5617 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
5618 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
5619 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
5620 Analyze_Refined_Global_In_Decl_Part,
5621 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
5622 Check_Aspect_Specification_Order, Check_Constituent_Usage,
5623 Check_Declaration_Order, Check_Dependency_Clause,
5624 Check_Duplicate_Mode, Check_Duplicate_Option,
5625 Check_Duplicate_Property, Check_External_Properties,
5626 Check_External_Property, Check_Function_Return,
5627 Check_Matching_Constituent, Check_Matching_State,
5628 Check_Mode_Restriction_In_Enclosing_Context,
5629 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
5630 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
5631 Has_Extra_Parentheses, Inconsistent_Mode_Error,
5632 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
5633 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
5634 Report_Unrefined_States, Report_Unused_Constituents,
5635 Report_Unused_States, Role_Error, Usage_Error):
5636 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
5637 to report semantic errors only when SPARK_Mode is on.
5638 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
5639 pragma Depends explicitly, this is now done by the analysis.
5640 (Analyze_Global_In_Decl_List): Do not check the syntax of
5641 pragma Global explicitly, this is now done by the analysis.
5642 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
5643 pragma Initializes explicitly, this is now done by the analysis.
5644 (Analyze_Part_Of): Do not check the syntax of the encapsulating
5645 state, this is now done by the analysis.
5646 (Analyze_Pragma): Do
5647 not check the syntax of a state declaration, this is now done
5649 (Analyze_Refined_Depends_In_Decl_Part): Do not
5650 check the syntax of pragma Refined_Depends explicitly, this is now
5651 done by the analysis.
5652 (Analyze_Refined_Global_In_Decl_Part): Do
5653 not check the syntax of pragma Refined_Global explicitly, this is
5654 now done by the analysis.
5655 (Analyze_Refined_State_In_Decl_Part):
5656 Do not check the syntax of pragma Refined_State explicitly, this
5657 is now done by the analysis.
5658 (Check_Dependence_List_Syntax): Removed.
5659 (Check_Global_List_Syntax): Removed.
5660 (Check_Initialization_List_Syntax): Removed.
5661 (Check_Item_Syntax): Removed.
5662 (Check_Missing_Part_Of): Do not consider items from an instance.
5663 (Check_Refinement_List_Syntax): Removed.
5664 (Check_State_Declaration_Syntax): Removed.
5665 (Collect_Global_List): Do not raise Program_Error when the input is
5667 (Process_Global_List): Do not raise Program_Error when the input
5669 * sem_ch13.adb: Minor reformatting.
5671 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5673 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
5674 that is an interface definition with an interface list.
5675 (Process_Full_View): Move error message on missmatched interfaces
5676 between views to the declaration of full view, for clarity.
5677 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
5680 2014-06-13 Robert Dewar <dewar@adacore.com>
5682 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
5685 2014-06-13 Robert Dewar <dewar@adacore.com>
5687 * makeutl.adb: Minor reformatting.
5689 2014-06-13 Gail Schenker <schenker@adacore.com>
5691 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
5692 associated flag (d.z), no longer needed.
5694 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5696 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
5697 Export aspects, do not check whether a corresponding Convention
5698 aspect has been specified. Convention is optional in Ada2012,
5699 and defaults to Convention_Ada.
5701 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
5703 * checks.adb (Apply_Address_Clause_Check): Only issue the new
5704 warning if the propagation warning is issued.
5706 2014-06-13 Thomas Quinot <quinot@adacore.com>
5708 * exp_ch4.adb: Minor reformatting.
5710 2014-06-13 Robert Dewar <dewar@adacore.com>
5712 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
5713 Handle float range check case (Expand_N_Attribute_Reference,
5714 case Succ): Handle float range check case.
5715 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
5718 2014-06-13 Vincent Celier <celier@adacore.com>
5720 * makeutl.ads (Compute_Builder_Switches): Change name of
5721 parameter Root_Environment to Env.
5722 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
5723 Env parameter of procedure Get_Or_Create_Configuration_File.
5724 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
5725 of new parameter Env.
5726 * prj-conf.ads (Locate_Runtime): New parameter Env of type
5727 Prj.Tree.Environment.
5729 2014-06-13 Robert Dewar <dewar@adacore.com>
5731 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
5733 2014-06-13 Robert Dewar <dewar@adacore.com>
5735 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
5737 * sem_attr.adb: Minor code reformatting and simplification.
5738 * checks.adb: Fix minor typo.
5740 2014-06-13 Emmanuel Briot <briot@adacore.com>
5742 * g-comlin.adb (Get_Argument): fix expansion
5743 of command line arguments (e.g. "*.adb") when using a custom
5744 parser. The parser was not passed to the recursive call, and
5745 thus we were trying to do the expansion on the default command
5748 2014-06-13 Thomas Quinot <quinot@adacore.com>
5750 * exp_ch9.adb: Minor reformatting.
5752 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5754 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
5755 To determine whether the attribute should be expanded, examine
5756 whether the enclosing postcondition pragma is to be checked,
5757 rather than using the internal flag Assertions_Enabled.
5759 2014-06-13 Ben Brosgol <brosgol@adacore.com>
5761 * gnat_rm.texi: Minor fixes.
5762 * gnat_ugn.texi: Added a missing "@itemize".
5764 2014-06-13 Robert Dewar <dewar@adacore.com>
5766 * debug.adb: Remove -gnatd.1 flag documentation.
5767 * layout.adb (Layout_Type): Remove special handling of size
5768 for anonymous access type.
5769 * sem_ch3.adb (Replace_Type): Remove special handling of size
5770 for anonymous access type.
5772 2014-06-13 Robert Dewar <dewar@adacore.com>
5774 * debug.adb: Document debug flag -gnatd.1.
5775 * layout.adb (Layout_Type): Size change for anonymous access
5776 types under -gnatd.1.
5777 * sem_ch3.adb (Replace_Type): Size change for anonymous access
5778 types under -gnatd.1.
5780 2014-06-13 Robert Dewar <dewar@adacore.com>
5782 * layout.adb (Layout_Type): Anonymous access types designating
5783 unconstrained arrays are always thin pointers.
5784 * sem_ch3.adb (Replace_Type): Anonymous access types designating
5785 unconstrained arrays are always thin pointers.
5787 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5789 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
5790 to resolve the prefix of an attribute that is an entity name
5791 and may be a parameterless call. Minor code reorganization.
5793 2014-06-13 Robert Dewar <dewar@adacore.com>
5795 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
5797 * opt.ads (Compiler_Unit): New flag.
5798 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
5799 for null statement sequence (not allowed in compiler unit).
5800 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
5802 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
5804 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
5805 Check_Compiler_Unit.
5806 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
5807 Check_Compiler_Unit (this construct is not allowed in compiler
5809 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
5810 Set Opt.Compiler_Unit.
5812 2014-06-13 Geert Bosch <bosch@adacore.com>
5814 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
5815 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
5816 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
5818 2014-06-13 Robert Dewar <dewar@adacore.com>
5820 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
5822 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5824 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
5825 types in SPARK as it is poorly placed and poorly formulated. The
5826 check was flagging ALL volatile entities as illegal in SPARK.
5827 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
5828 types as illegal in SPARK.
5830 2014-06-13 Robert Dewar <dewar@adacore.com>
5832 * sem_cat.adb: Minor reformatting.
5834 2014-06-13 Yannick Moy <moy@adacore.com>
5836 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
5838 2014-06-13 Arnaud Charlet <charlet@adacore.com>
5840 * gnat_rm.texi: Add detail on SPARK_05 restriction.
5842 2014-06-13 Bob Duff <duff@adacore.com>
5844 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
5845 Add assertions requiring the secondary stack to be initialized.
5846 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
5847 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
5848 secondary stack is initialized before calling Init_Tasking_Soft_Links,
5849 by adding pragmas Elaborate_Body.
5851 2014-06-13 Thomas Quinot <quinot@adacore.com>
5853 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
5854 kludge disabling new legality check.
5856 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5858 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
5860 (Freeze_Type): Volatile types are now illegal in SPARK.
5862 2014-06-13 Robert Dewar <dewar@adacore.com>
5864 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
5865 * gnat_rm.texi: Document aspect Thread_Local_Storage.
5867 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5869 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
5870 value is a temporary that renames an aggregate is legal in a
5871 preelaborated unit. Illegalities, if any will be detected in
5872 the aggregate components.
5874 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5876 * einfo.ads: Minor reformatting an comment expansion.
5878 2014-06-13 Robert Dewar <dewar@adacore.com>
5880 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
5882 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
5884 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
5885 * sem_warn.adb: Minor reformatting.
5887 2014-06-13 Doug Rupp <rupp@adacore.com>
5889 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
5892 2014-06-13 Yannick Moy <moy@adacore.com>
5894 * sem_warn.adb (Check_Unset_References): Take
5895 case of Refined_Post into account in Within_Postcondition check.
5897 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5899 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
5902 2014-06-13 Yannick Moy <moy@adacore.com>
5904 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
5905 Aspect_Export): Consider that variables may be set outside the program.
5907 2014-06-13 Robert Dewar <dewar@adacore.com>
5909 * back_end.adb (Make_Id): New function.
5910 (Make_SC): New function.
5911 (Set_RND): New procedure.
5912 * back_end.ads (Make_Id): New function.
5913 (Make_SC): New function.
5914 (Set_RND): New procedure.
5915 * einfo.ads: Minor comment updates.
5916 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
5917 * gnat1drv.adb (Gnat1drv): New calling sequence for
5918 Get_Target_Parameters.
5919 (Gnat1drv): Move Atree.Initialize here from Frontend.
5920 * targparm.adb (Get_Target_Parameters): New calling
5921 sequence (Get_Target_Parameters): Handle pragma Restriction
5923 * targparm.ads (Get_Target_Parameters): New calling sequence.
5925 2014-06-13 Gary Dismukes <dismukes@adacore.com>
5927 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
5928 loop if the pragma does not come from source, so that an implicit
5929 pragma Import only applies to the first declaration, avoiding
5930 possible conflicts with earlier explicit and implicit declarations
5931 due to multiple Provide_Shift_Operators pragmas.
5932 (Set_Imported): Remove previous fix that bypassed pragma duplication
5934 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
5935 of Provide_Shift_Operators.
5937 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
5939 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
5940 string pointer directly to set_decl_section_name.
5942 2014-06-11 Robert Dewar <dewar@adacore.com>
5944 * sem_ch13.adb: Minor reformatting.
5946 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5948 * sem_prag.adb (Check_Clause_Syntax): Add new
5949 local variable Outputs. Account for the case where multiple
5950 output items appear as an aggregate.
5952 2014-06-11 Robert Dewar <dewar@adacore.com>
5954 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
5957 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5959 * einfo.ads: Minor reformatting.
5961 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5963 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
5964 new variable First_Node. Update the position after all insertions have
5965 taken place to First_Node.
5967 2014-06-11 Robert Dewar <dewar@adacore.com>
5969 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
5970 * layout.adb (Layout_Type): Remove test of -gnatd.1.
5972 2014-06-11 Robert Dewar <dewar@adacore.com>
5974 * sem_ch13.adb: Minor reformatting.
5976 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5978 * sem_prag.adb (Check_Clause_Syntax): Add new
5979 local variable Outputs. Account for the case where multiple
5980 output items appear as an aggregate.
5982 2014-06-11 Robert Dewar <dewar@adacore.com>
5984 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
5987 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5989 * einfo.ads: Minor reformatting.
5991 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5993 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
5994 new variable First_Node. Update the position after all insertions have
5995 taken place to First_Node.
5997 2014-06-11 Robert Dewar <dewar@adacore.com>
5999 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6000 * layout.adb (Layout_Type): Remove test of -gnatd.1.
6002 2014-06-11 Thomas Quinot <quinot@adacore.com>
6004 * freeze.ads: Minor reformatting.
6005 * checks.adb (Determine_Range): Do not attempt to determine
6006 the range of a deferred constant whose full view has not been
6008 * sem_res.adb (Resolve): Remove undesirable guard against
6009 resolving expressions from expression functions.
6011 2014-06-11 Robert Dewar <dewar@adacore.com>
6013 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
6015 * layout.adb (Layout_Type): Make anonymous access types for
6016 subprogram formal types and return types always thin. For now
6017 only enabled if -gnatd.1 set.
6019 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6021 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6022 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
6023 subprogram must be a null procedure.
6025 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6027 * sem_prag.adb (Analyze_Input_Item): Allow formal
6028 parameters to appear as input_items in an initialization_list
6029 of pragma Initializes. Encapsulation now applies to states and
6030 variables only (as it should). Add RM references to key errors.
6031 * sem_prag.adb (Set_Imported): Suppress errors
6032 about preceding Imports when the pragma does not come from source,
6033 which can happen through use of pragma Provide_Shift_Operators.
6035 2014-06-11 Thomas Quinot <quinot@adacore.com>
6037 * sem_ch3.adb: Minor reformatting.
6038 * einfo.ads (Full_View): Minor comment update.
6040 2014-06-11 Robert Dewar <dewar@adacore.com>
6042 * einfo.adb (Is_Independent): New flag.
6043 * einfo.ads (Is_Independent): New flag.
6044 (Has_Independent_Components): Clean up and fix comments.
6045 * sem_prag.adb (Fix_Error): Deal with changing argument
6046 [of] to entity [for].
6047 (Analyze_Pragma, case Independent): Set Is_Independent flag
6048 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
6049 in all components of specified record.
6051 2014-06-11 Thomas Quinot <quinot@adacore.com>
6053 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
6054 Set proper Etype on bounds of dummy type created for analysis
6057 2014-06-11 Robert Dewar <dewar@adacore.com>
6059 * debug.adb: Minor comment fix (add missing section of dot
6062 2014-06-11 Robert Dewar <dewar@adacore.com>
6064 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
6065 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
6066 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
6067 * errout.adb (Output_Messages): Avoid duplicate output for
6068 library level instance.
6069 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
6070 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
6071 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
6072 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
6073 accomodate largest modulus value.
6074 * gnat_ugn.texi: Minor updates.
6076 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6078 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
6079 load body of generic package or its parent, if body is optional
6080 and the unit does not require a body.
6082 2014-06-11 Robert Dewar <dewar@adacore.com>
6084 * gnat_rm.texi: Document System.Unsigned_Types.
6085 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
6086 * s-unstyp.ads: Update comments (this is now user available unit).
6088 2014-06-11 Robert Dewar <dewar@adacore.com>
6090 * make.adb, sem_res.adb: Minor reformatting.
6092 2014-06-11 Thomas Quinot <quinot@adacore.com>
6094 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
6095 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
6096 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
6097 Preelaborate_05 to just Preelaborate in runtime units, and similarly
6098 change Pure_05 to just Pure.
6100 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6102 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
6103 analysis if error has been posted on subprogram body.
6105 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6107 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6108 rule given in RM 13.1 (8/1) for operational attributes to stream
6109 attributes: the attribute must apply to a first subtype. Fixes
6110 missing errors in ACATS test bdd2004.
6112 2014-06-11 Robert Dewar <dewar@adacore.com>
6114 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
6115 record type if restriction No_Implicit_Conditionals is active.
6116 (Expand_N_Object_Declaration): Don't allow default initialization
6117 for variant record type if restriction No_Implicit_Condition is active.
6118 (Build_Variant_Record_Equality): Don't build for variant
6119 record type if restriction No_Implicit_Conditionals is active.
6120 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
6121 No_Implicit_Conditionals.
6122 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
6124 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
6126 * i-cstrin.ads: Update comments.
6128 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6130 * sem_res.adb (Resolve_Selected_Component): Handle properly a
6131 selected component whose prefix is overloaded, when none of the
6132 interpretations matches the expected type.
6134 2014-06-11 Bob Duff <duff@adacore.com>
6136 * make.adb (Wait_For_Available_Slot): Give a more
6137 informative error message; if the ALI file is not found, print
6138 the full path of what it's looking for.
6140 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
6142 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
6143 option to specify the result file encoding.
6145 2014-06-11 Robert Dewar <dewar@adacore.com>
6147 * errout.ads, sem_ch12.adb: Minor reformatting.
6148 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
6149 * lib-xref.adb: Minor reformatting.
6150 * restrict.adb: Minor code reorganization (put routines in
6153 2014-06-11 Yannick Moy <moy@adacore.com>
6155 * einfo.ads: Minor typo in comment
6157 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6159 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
6160 formal private types and private type extensions, to indicate
6161 variable in a generic unit whose uninitialized use suggest that
6162 actual type should be fully initialized.
6163 Needs_Initialized_Actual: removed, functionaity replaced by
6165 * lib-xref.adb (Generate_Reference): Generate a reference for
6166 variables of a formal type when the unit is not the main unit,
6167 to enable appropriate warnings in an instance.
6168 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
6169 of variable in a generic unit that suggests that actual type
6170 should be full initialized.
6171 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
6172 and do not emot warning, which now only appears in an instance.
6174 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
6176 * gnat_ugn.texi: Fix minor typo.
6178 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6180 * sem_ch3.adb Add with and use clause for Sem_Ch10.
6181 (Analyze_Declarations): Code reformatting. Analyze the contract
6182 of a subprogram body stub at the end of the declarative region.
6183 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
6184 now a variable. Do not process the body if its contract is not
6185 available. Account for subprogram body stubs when extracting
6186 the corresponding spec.
6187 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
6189 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
6191 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
6192 Account for subprogram body stubs when extracting the
6194 (Analyze_Global_In_Decl_List):
6195 Account for subprogram body stubs when extracting the
6197 (Analyze_Refined_Depends_In_Decl_Part):
6198 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
6199 of the related body. Spec_Is now a variable. Account for
6200 subprogram body stubs when extracting the corresponding spec.
6201 (Analyze_Refined_Global_In_Decl_Part): Use
6202 Find_Related_Subprogram_Or_Body to retrieve the declaration
6203 of the related body. Spec_Is now a variable. Account for
6204 subprogram body stubs when extracting the corresponding spec.
6205 (Collect_Subprogram_Inputs_Output): Account for subprogram body
6206 stubs when extracting the corresponding spec.
6208 2014-06-11 Vincent Celier <celier@adacore.com>
6210 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
6213 2014-06-11 Robert Dewar <dewar@adacore.com>
6215 * debug.adb: Add debug flag -gnatd.q.
6216 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
6218 * styleg.adb (Check_Xtra_Parens): Message should be a style
6220 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
6221 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
6222 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
6223 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
6225 2014-06-11 Ben Brosgol <brosgol@adacore.com>
6227 * gnat_rm.texi: Revised chapter on Implementation Defined
6230 2014-06-11 Geert Bosch <bosch@adacore.com>
6232 * s-exctab.adb: avoid race conditions in exception registration.
6234 2014-06-11 Robert Dewar <dewar@adacore.com>
6236 * errout.adb (Warn_Insertion): New function.
6237 (Error_Msg): Use Warn_Insertion and Prescan_Message.
6238 (Error_Msg_Internal): Set Info field of error object.
6239 (Error_Msg_NEL): Use Prescan_Message.
6240 (Set_Msg_Text): Don't store info: at start of message.
6241 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
6242 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
6243 * errout.ads: Document new ?$? and >$> insertion sequences
6244 Document use of "(style)" and "info: "
6245 * erroutc.adb (dmsg): Print several missing fields
6246 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
6247 Deal with new tagging of info messages
6248 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
6249 Add field Info (Prescan_Message): New procedure, this procedure
6250 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
6251 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
6252 sem_elab.adb: Follow new rules for info message (info belongs
6253 only at the start of a message, and only in the first message,
6254 not in any of the continuations).
6255 * gnat_ugn.texi: Document full set of warning tags.
6257 2014-06-11 Gary Dismukes <dismukes@adacore.com>
6259 * sem_util.adb: Minor typo fix.
6261 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6263 * sem_warn.adb (Check_References): Do not emit spurious warnings
6264 on uninitialzed variable of a formal private type if variable
6267 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
6269 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
6270 set_decl_section_name accessor.
6272 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6274 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6275 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6276 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6278 2014-05-21 Robert Dewar <dewar@adacore.com>
6280 * layout.adb: Minor reformatting.
6281 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
6284 2014-05-21 Robert Dewar <dewar@adacore.com>
6286 * restrict.ads (Implementation_Restriction): Add entry for
6288 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
6289 Ada.[Wide_[Wide_]Text_IO.
6290 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
6291 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
6292 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
6293 Wide_Wide_Value if restriction No_Fixed_IO is set.
6294 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
6296 2014-05-21 Robert Dewar <dewar@adacore.com>
6298 * gnatcmd.adb: Minor error msg changes (no upper case letter
6300 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
6303 2014-05-21 Robert Dewar <dewar@adacore.com>
6305 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
6306 via generic formals.
6307 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
6310 2014-05-21 Thomas Quinot <quinot@adacore.com>
6312 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
6313 more accurately describe that this subprogram needs to come into
6314 play also in cases where no byte swapping is involved, because
6315 it also takes care of some required shifts (left-justification
6318 2014-05-21 Thomas Quinot <quinot@adacore.com>
6320 * freeze.adb (Check_Component_Storage_Order): Indicate whether
6321 a Scalar_Storage_Order attribute definition is present for the
6323 (Freeze_Record_Type): Suppress junk warnings
6324 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
6327 2014-05-21 Robert Dewar <dewar@adacore.com>
6329 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
6330 to Kill_Elaboration_Checks.
6332 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6334 * layout.adb (Assoc_Add): Suppress the optimization of the (E
6335 - C1) + C2 case, when the expression type is unsigned and C1 <
6336 C2, to avoid creating a negative literal when folding.
6338 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6340 * freeze.adb (Freeze_Record_Type): Update the use of
6342 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
6344 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
6345 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
6346 of Is_SPARK_Volatile.
6347 (Analyze_Loop_Parameter_Specification):
6348 Update the use of Is_SPARK_Volatile.
6349 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
6350 formal parameter when its type is volatile.
6351 * sem_prag.adb (Analyze_Global_Item): Update the use of
6353 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
6354 determines whether an entity is a volatile source SPARK object.
6355 * sem_util.adb (Has_Enabled_Property): Accout for external
6356 properties being set on objects other than abstract states
6357 and variables. An example would be a formal parameter.
6358 (Is_SPARK_Volatile): New routine.
6359 (Is_SPARK_Volatile_Object):
6360 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
6361 when checking entities and/or types.
6362 * sem_util.ads (Is_SPARK_Volatile): New routine.
6364 2014-05-21 Robert Dewar <dewar@adacore.com>
6366 * sem_warn.adb: Minor fix to warning messages (use ?? instead
6369 2014-05-21 Vincent Celier <celier@adacore.com>
6371 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
6372 switch --version and --help.
6374 2014-05-21 Robert Dewar <dewar@adacore.com>
6376 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
6378 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6380 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
6381 iterator variable when the domain of iteration is a formal
6382 container and this is an element iterator.
6384 2014-05-21 Bob Duff <duff@adacore.com>
6386 * sem_ch12.adb: Minor reformatting.
6388 2014-05-21 Robert Dewar <dewar@adacore.com>
6390 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
6392 2014-05-21 Robert Dewar <dewar@adacore.com>
6394 * sem_elab.adb: Minor reformatting.
6395 * s-taprop.ads: Minor comment fix.
6396 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
6397 Kill_Elaboration_Checks.
6398 * errout.adb, erroutc.adb: Minor reformatting.
6400 2014-05-21 Thomas Quinot <quinot@adacore.com>
6402 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
6403 component. No byte swapping occurs, but this procedure also takes
6404 care of appropriately justifying the argument.
6406 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6408 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
6410 (Analyze_Subprogram_Body_Helper): Move the
6411 analysis of aspect specifications and the processing of the
6412 subprogram body contract after inlining has taken place.
6413 (Diagnose_Misplaced_Aspect_Specifications): Removed.
6415 2014-05-21 Javier Miranda <miranda@adacore.com>
6417 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
6419 2014-05-21 Robert Dewar <dewar@adacore.com>
6421 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
6422 continuations any more.
6424 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6426 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
6427 present in formal_Private_Definitions and on private extension
6428 declarations of a formal derived type. Set when the use of the
6429 formal type in a generic suggests that the actual should be a
6430 fully initialized type.
6431 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
6432 to indicate that an entity of a generic type has default
6433 initialization, and that the corresponing actual type in any
6434 subsequent instantiation should be fully initialized.
6435 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
6436 to emit a warning if the actual for a generic type on which
6437 Needs_Initialized_Actual is set is not a fully initialized type.
6439 2014-05-21 Robert Dewar <dewar@adacore.com>
6441 * sem_elab.adb, prj-dect.adb: Minor reformatting.
6443 2014-05-21 Robert Dewar <dewar@adacore.com>
6445 * erroutc.ads: Minor comment addition.
6447 2014-05-21 Robert Dewar <dewar@adacore.com>
6449 * errout.ads: Add documentation for use of >*> tag.
6450 * restrict.adb: Make sure we use >*> tag for restriction warnings.
6452 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6454 * debug.adb: Add case of illegal overriding_indicator for a
6455 protected subprogram body to description of -gnatd.E switch.
6456 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
6457 for cases of giving overriding_indicators on protected subprogram
6458 bodies, but change this to a warning if -gnatd.E is enabled. No
6459 longer give a style warning about missing indicators on protected
6462 2014-05-21 Robert Dewar <dewar@adacore.com>
6464 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
6465 sem_elab.ads: Minor reformatting.
6466 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
6469 2014-05-21 Pascal Obry <obry@adacore.com>
6471 * prj-dect.adb: Allow package Install in aggregate project.
6473 2014-05-21 Robert Dewar <dewar@adacore.com>
6475 * sem_ch13.adb (Analyze_Aspect_Specifications):
6476 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
6477 * sem_prag.adb: Minor comment improvements.
6479 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6481 * sem_ch12.adb (Install_Body): When checking whether freezing of
6482 instantiation must be delayed, verify that the common enclosing
6483 subprogram to generic and instance is in fact an overloadable
6486 2014-05-21 Vincent Celier <celier@adacore.com>
6488 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
6489 mains with the same name and fail if there is more than one.
6490 * prj.ads, prj.adb (Find_All_Sources): New function
6492 2014-05-21 Robert Dewar <dewar@adacore.com>
6494 * sem_ch13.adb: Minor reformatting.
6495 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
6496 * sem_prag.adb: Minor error message improvement.
6498 2014-05-21 Yannick Moy <moy@adacore.com>
6500 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
6501 (Enclosing_Subprogram_Or_Package): Only return a library-level
6504 2014-05-21 Javier Miranda <miranda@adacore.com>
6506 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
6507 to the full view of the parent type when processing a derived type
6508 which is the full view of a private type not defined in a generic
6509 unit which is derived from a private type with discriminants
6510 whose full view is a non-tagged record type.
6512 2014-05-21 Javier Miranda <miranda@adacore.com>
6514 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
6515 Complete previous patch.
6517 2014-05-21 Thomas Quinot <quinot@adacore.com>
6520 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
6521 Provide a behaviour more consistent with underlying datagram
6522 socket: do not attempt to loop over Send_Socket/Receive_Socket
6523 iterating along the buffer.
6525 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6527 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
6528 or a tagged type is not labelled as volatile. Ensure that a
6529 non-volatile type has no volatile components.
6530 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
6531 Obj_Typ. Code reformatting. Ensure that a discriminated or
6532 tagged object is not labelled as volatile.
6533 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
6534 pragma Volatile applies to a full type declaration or an object
6535 declaration when SPARK mode is on.
6537 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
6539 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
6540 providing options needed for compiling the argument source for
6541 the situation when a project file can be used as a tool parameter.
6543 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6545 * gnat_rm.texi: Minor typo fix.
6547 2014-05-21 Robert Dewar <dewar@adacore.com>
6549 * stand.adb (Tree_Read): Read missing entities.
6550 (Tree_Write): Write missing entities.
6552 2014-05-21 Ben Brosgol <brosgol@adacore.com>
6554 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
6555 section in gnatmetric chapter.
6557 2014-05-21 Robert Dewar <dewar@adacore.com>
6559 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
6560 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
6561 post-call copy write back (see detailed comment in code).
6562 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
6564 * tbuild.ads: Minor reformatting.
6566 2014-05-21 Robert Dewar <dewar@adacore.com>
6568 * stand.ads: Add warning about adding new entities and
6569 Tree_Read/Tree_Write.
6571 2014-05-21 Robert Dewar <dewar@adacore.com>
6573 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
6574 references to restricted entities within the units in which they
6577 2014-05-21 Robert Dewar <dewar@adacore.com>
6579 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
6580 simplify the needed test, and also deal with failure to catch
6581 situations with non-standard names.
6582 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
6583 (Source_File_Is_Subunit): Removed, no longer used.
6585 2014-05-21 Javier Miranda <miranda@adacore.com>
6588 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
6589 renaming of an access to interface object there is no need to
6590 generate extra code to reference the tag.
6592 2014-05-21 Robert Dewar <dewar@adacore.com>
6594 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
6595 Warnings (Off, string).
6597 2014-05-21 Robert Dewar <dewar@adacore.com>
6599 * osint.adb: Fix three error messages to say invalid instead
6601 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
6602 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
6603 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
6605 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6607 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
6608 sem_ch9.ads: Move discriminant manipulation routines for analysis of
6609 aspect specifications from sem_ch9 to sem_ch13, where they belong.
6611 2014-05-21 Robert Dewar <dewar@adacore.com>
6613 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
6614 Clearly document -gnatyg (GNAT style switches).
6615 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
6616 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
6617 available for VMS after all.
6618 * warnsw.adb: Reorganize to eliminate duplicated code
6619 (Restore_Warnings): Add a couple of missing entries
6620 (Save_Warnings): Add a couple of missing entries.
6621 * warnsw.ads: Add missing entries to Warning_Record (not clear
6622 what the impact is).
6624 2014-05-21 Robert Dewar <dewar@adacore.com>
6626 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
6628 * errout.ads: Document ?*? (restriction warning) insertion.
6629 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
6631 * erroutc.ads: Document use of * for restriction warning tag.
6632 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
6634 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6636 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
6637 make discriminants immediately visible when analyzing an aspect
6638 of a subtype declaration.
6639 (Uninstall_Discriminants): Do not apply to the entity in a
6640 subtype declaration.
6642 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6644 * sem_util.adb: Code clean up.
6646 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
6648 * gnat_ugn.texi: Document -Werror.
6650 2014-05-21 Bob Duff <duff@adacore.com>
6652 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
6653 This was returning False if the Object is a constant view. Fix
6654 it to return True in that case, because it might be a view of
6656 (Has_Discriminant_Dependent_Constraint): Fix latent
6657 bug; this function was crashing when passed a discriminant.
6659 2014-05-21 Robert Dewar <dewar@adacore.com>
6661 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
6662 * s-arit64.adb: Minor code reorganization.
6663 * sem_prag.adb: Minor comment fix (remove erroneous use of the
6666 2014-05-21 Robert Dewar <dewar@adacore.com>
6668 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
6669 computing new table size.
6671 2014-05-21 Robert Dewar <dewar@adacore.com>
6673 * einfo.ads: Minor reformatting.
6674 * ceinfo.adb: Deal with slight format change of einfo.ads.
6676 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6678 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
6679 implementation of the SPARK 2014 rule concerning private child
6682 2014-05-21 Vincent Celier <celier@adacore.com>
6684 * makeusg.adb: Add switch -d to usage.
6686 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6688 * sem_util.adb (Find_Actual): If an actual that is the prefix
6689 of an enclosing prefixed call has been rewritten, use Nkind
6690 and Sloc to identify the corresponding formal, when handling
6691 deferred references.
6693 2014-05-21 Robert Dewar <dewar@adacore.com>
6695 * debug.adb: Document -gnatd.z switch.
6696 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
6698 2014-05-21 Robert Dewar <dewar@adacore.com>
6700 * einfo.ads (Can_Never_Be_Null): Minor comment update.
6701 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
6702 error message change.
6703 * s-arit64.adb ("abs"): New function. Use expression functions
6704 for the simple conversions and arithmetic.
6706 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6708 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
6709 set function_start_locus.
6711 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6713 * utils.c (gnat_write_global_declarations): Adjust the flags put on
6716 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6718 * gcc-interface/decl.c (change_qualified_type): New static function.
6719 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
6720 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
6721 <E_Array_Subtype>: Likewise.
6722 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
6723 (gnat_to_gnu_component_type): Likewise.
6724 (gnat_to_gnu_param): Likewise.
6726 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6728 * fe.h (Set_Present_Expr): Move around.
6729 (End_Location): New macro.
6730 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
6732 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6734 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
6735 lieu of more verbose construct.
6736 * gcc-interface/trans.c (Call_to_gnu): Likewise.
6737 (gnat_to_gnu): Likewise. Remove obsolete code.
6739 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6741 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
6742 consider that regular packed arrays can never be superflat.
6744 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6746 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
6748 * gcc-interface/decl.c (annotate_value): Adjust.
6749 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
6750 (push_range_check_info): Likewise.
6751 (Loop_Statement_to_gnu): Likewise.
6752 (Subprogram_Body_to_gnu): Likewise.
6753 (Compilation_Unit_to_gnu): Likewise.
6754 (start_stmt_group): Likewise.
6755 * gcc-interface/utils.c (init_gnat_utils): Likewise.
6756 (gnat_pushlevel): Likewise.
6757 (maybe_pad_type): Likewise.
6759 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
6761 * seh_init.c: Fix copyright year.
6763 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6765 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
6766 are defined. Move include windows.h before system.h.
6767 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
6768 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
6770 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
6772 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
6773 to the appropriate type.
6774 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
6775 (pos_to_constructor): Likewise.
6777 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
6779 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
6781 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6782 Mike Stump <mikestump@comcast.net>
6783 Richard Sandiford <rdsandiford@googlemail.com>
6785 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
6786 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
6787 (annotate_value): Use wide-int interfaces.
6788 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
6790 2014-04-28 Richard Henderson <rth@redhat.com>
6792 * gcc-interface/Makefile.in: Support aarch64-linux.
6794 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
6796 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
6797 add 'Suffix' parameter and adjust comment.
6798 (Get_External_Name_With_Suffix): Delete.
6799 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
6800 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
6802 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
6803 Call Get_External_Name instead of Get_External_Name_With_Suffix.
6804 (Get_Secondary_DT_External_Name): Likewise.
6805 * exp_cg.adb (Write_Call_Info): Likewise.
6806 * exp_disp.adb (Export_DT): Likewise.
6807 (Import_DT): Likewise.
6808 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
6809 parameter with False default.
6810 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
6811 * types.h (Fat_Pointer): Rename into...
6812 (String_Pointer): ...this. Add comment on interfacing rules.
6813 * fe.h (Compiler_Abort): Adjust for above renaming.
6814 (Error_Msg_N): Likewise.
6815 (Error_Msg_NE): Likewise.
6816 (Get_External_Name): Likewise. Add third parameter.
6817 (Get_External_Name_With_Suffix): Delete.
6818 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
6819 (create_concat_name): Adjust call to Get_External_Name, remove call to
6820 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
6821 * gcc-interface/trans.c (post_error): Likewise.
6822 (post_error_ne): Likewise.
6823 * gcc-interface/misc.c (internal_error_function): Likewise.
6825 2014-04-28 Richard Biener <rguenther@suse.de>
6828 * gcc-interface/utils.c: Define flag_isoc11.
6830 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
6832 * gnatvsn.ads (Library_Version): Bump to 4.10.
6834 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
6837 2014-04-22 Richard Henderson <rth@redhat.com>
6839 * gcc-interface/Makefile.in: Support aarch64-linux.
6841 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
6843 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
6844 (Error_Msg_N): Likewise.
6845 (Error_Msg_NE): Likewise.
6846 (Get_External_Name_With_Suffix): Likewise.
6847 * types.h (Fat_Pointer): Delete.
6848 (String_Pointer): New type.
6849 (DECLARE_STRING_POINTER): New macro.
6850 * gcc-interface/decl.c (create_concat_name): Adjust.
6851 * gcc-interface/trans.c (post_error): Likewise.
6852 (post_error_ne): Likewise.
6853 * gcc-interface/misc.c (internal_error_function): Likewise.
6855 2014-04-22 Richard Henderson <rth@redhat.com>
6857 * gcc-interface/Makefile.in: Support aarch64-linux.
6859 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
6860 (__gnat_alternate_stack): Enable for all linux except ia64.
6862 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
6864 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
6865 (Error_Msg_N): Likewise.
6866 (Error_Msg_NE): Likewise.
6867 (Get_External_Name_With_Suffix): Likewise.
6868 * types.h (Fat_Pointer): Delete.
6869 (String_Pointer): New type.
6870 (DECLARE_STRING_POINTER): New macro.
6871 * gcc-interface/decl.c (create_concat_name): Adjust.
6872 * gcc-interface/trans.c (post_error): Likewise.
6873 (post_error_ne): Likewise.
6874 * gcc-interface/misc.c (internal_error_function): Likewise.
6876 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6877 Pierre-Marie de Rodat <derodat@adacore.com>
6879 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
6880 scalar constant instead of a reference for renaming of scalar literal.
6881 Do not create a new object for constant renaming except for a function
6882 call. Make sure a VAR_DECL is created for the renaming pointer.
6883 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
6884 (fold_constant_decl_in_expr): New function.
6885 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
6886 For a constant renaming, try to fold a constant DECL in the result.
6887 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
6888 (Identifier_to_gnu): Reference the renamed object of constant renaming
6890 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
6891 invalidate constant renaming pointers.
6893 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6895 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
6896 (build_vector_type_for_size): New function.
6897 (build_vector_type_for_array): Likewise.
6898 (unchecked_convert): Build an intermediate vector type to convert
6899 from a generic array type to a vector type.
6900 (handle_vector_size_attribute): Reimplement.
6901 (handle_vector_type_attribute): Likewise.
6903 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6905 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
6906 Is_OK_Static_Expression in lieu of Is_Static_Expression to
6907 detect valid arguments.
6909 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6911 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
6913 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
6915 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
6916 (components_to_record): Likewise.
6917 * gcc-interface/utils.c (make_aligning_type): Likewise.
6918 (maybe_pad_type): Likewise.
6919 (finish_record_type): Likewise.
6920 (rest_of_record_type_compilation): Likewise.
6922 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
6924 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
6925 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
6927 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
6928 hint for Loop_Optimize.
6929 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
6930 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
6931 with new Ivdep hint.
6932 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
6933 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
6934 with new Ivdep hint.
6935 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
6937 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
6938 Robert Dewar <dewar@adacore.com>
6940 * opt.ads (Suppress_Back_Annotation): Remove as unused.
6941 * fe.h (Back_Annotate_Rep_Info): Likewise.
6942 (Global_Discard_Names): Likewise.
6943 (List_Representation_Info): Declare.
6944 * types.h (Uint_Minus_1): Likewise.
6945 * repinfo.ads: Document back-annotation change.
6946 * gcc-interface/gigi.h (init_gnat_decl): Declare.
6947 (destroy_gnat_decl): Likewise.
6948 * gcc-interface/decl.c (annotate_value): Do not create the cache of
6949 annotated values here but...
6950 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
6952 (init_gnat_decl): ...here instead. New function.
6953 (destroy_gnat_decl): Likewise.
6954 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
6955 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
6957 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
6959 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
6960 offset for the field, if any.
6962 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
6963 Svante Signell <svante.signell@gmail.com>
6967 * s-osinte-x32.adb: New file.
6968 * s-linux.ads (Time): New section.
6969 * s-linux-alpha.ads (Time): Likewise.
6970 * s-linux-android.ads (Time: Likewise.
6971 * s-linux-hppa.ads (Time): Likewise.
6972 * s-linux-mipsel.ads (Time): Likewise.
6973 * s-linux-sparc.ads (Time): Likewise.
6974 * s-linux-x32.ads (Time): Likewise.
6975 * s-osprim-x32.ads (timespec): Adjust.
6977 (To_Timespec): Likewise.
6978 * s-osinte-linux.ads (Time): Define local subtypes for those defined
6980 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
6981 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
6982 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
6983 * s-osinte-solaris-posix.ads (timespec): Likewise.
6984 * s-osinte-posix.adb (To_Timespec): Likewise.
6985 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
6987 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
6990 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
6991 * s-linux-android.ads: New file.
6992 * s-intman-android.adb: Likewise.
6993 * s-osinte-android.ads: Adjust.
6994 * sigtramp-armdroid.c: Likewise.
6995 * sigtramp.h: Add Android support.
6997 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
6999 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
7001 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
7004 * system-linux-alpha.ads: Adjust for Ada 2005.
7005 * system-linux-mips.ads: Likewise.
7006 * system-linux-mips64el.ads: Likewise.
7007 * system-linux-mipsel.ads: Likewise.
7008 * system-linux-s390.ads: Likewise.
7009 * system-linux-s390x.ads: Likewise.
7010 * system-linux-sparc.ads: Likewise.
7011 * system-linux-sparcv9.ads: Likewise.
7012 * system-rtems.ads: Likewise.
7013 * system-vxworks-arm.ads: Likewise.
7015 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
7018 * gcc-interface/Makefile.in (target_cpu_default): Revert
7021 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
7024 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
7025 it to set the RM size. Use directly 'size' for the Esize.
7026 (Create_Back_End_Float_Types): Adjust call to above.
7027 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
7028 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
7029 (Write_Target_Dependent_Values): Adjust comment.
7030 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
7032 (Write_Target_Dependent_Values): Write the precision in lieu of size.
7033 (Initialization): Read the precision in lieu of size and compute the
7034 size from the precision and the alignment.
7035 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
7036 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
7037 types for vector modes, pass the size in addition to the precision.
7039 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
7041 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
7043 2014-03-07 Doug Rupp <rupp@adacore.com>
7046 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
7047 (Support_64_Bit_Divides): Removed, no longer used.
7048 (ZCX_By_Default): Enabled.
7050 2014-02-25 Doug Rupp <rupp@adacore.com>
7052 * gcc-interface/Makefile.in (arm-linux):
7053 (EH_MECHANISM): Use ARM unwinder (-arm)
7054 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
7056 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
7057 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
7058 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
7059 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
7060 Add dependencies for sigtramp-armvxw.o.
7062 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7064 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
7066 2014-02-25 Robert Dewar <dewar@adacore.com>
7068 * rtsfind.adb (Is_RTE): Protect against entity with no scope
7069 field (previously this call blew up on the Standard entity).
7070 * sem_attr.adb (Analyze_Attribute, case Access): Remove
7071 test for No_Abort_Statements, this is now handled in
7072 Set_Entity_With_Checks.
7073 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
7074 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
7075 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
7076 Set_Entity_With_Checks.
7077 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
7078 Add checks for No_Abort_Statements.
7080 2014-02-25 Robert Dewar <dewar@adacore.com>
7082 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
7083 Check_Restriction is OK.
7085 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7087 * sem_ch3.adb (Process_Full_View): Better error message when
7088 the full view of a private type without discriminants is an
7090 * sem_ch7.adb (Uninstall_Declarations): Ditto.
7092 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7094 * sigtramp-armvxw.c: Also restore r0.
7096 2014-02-25 Robert Dewar <dewar@adacore.com>
7098 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
7099 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
7100 set unconditionally.
7101 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
7102 any more (Output_Msg_Text): Rewritten with new convention on
7103 output of warnings that are treated as errors.
7104 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
7106 * gnat_rm.texi: Updates to documentation on pragma
7108 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
7109 set Warning_Doc_Switch.
7110 * lib-writ.ads: Add documentation note on ALI file generation
7112 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
7114 * sem_attr.adb (Resolve_Attribute, case Access):
7115 Abort_Task'Access violates the No_Abort_Statements restriction.
7116 * sem_res.adb (Resolve_Call): Check restriction
7117 No_Abort_Statements for call to Abort_Task or a renaming of it.
7119 2014-02-25 Robert Dewar <dewar@adacore.com>
7121 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
7123 * lib.ads: Minor reformatting.
7124 * einfo.ads: Minor reformatting.
7126 2014-02-25 Doug Rupp <rupp@adacore.com>
7128 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
7129 use Short_Descriptor(S) as the argument passing mechanism.
7131 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7133 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
7135 2014-02-25 Robert Dewar <dewar@adacore.com>
7137 * atree.ads (Warnings_Treated_As_Errors): New variable.
7138 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
7139 error object (Initialize): Initialize Warnings_As_Errors_Count
7140 (Write_Error_Summary): Include count of warnings treated as errors.
7141 * erroutc.adb (Warning_Treated_As_Error): New function.
7142 (Matches): Function moved to outer level of package.
7143 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
7144 (Warning_Treated_As_Error): New function.
7145 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
7146 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
7147 * opt.ads (Config_Switches_Type): Add entry for
7148 Warnings_As_Errors_Count.
7149 (Warnings_As_Errors_Count): New variable.
7150 (Warnings_As_Errors): New array.
7151 * par-prag.adb: Add dummy entry for Warning_As_Error.
7152 * sem_prag.adb (Analyze_Pragma): Implement new pragma
7154 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
7156 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7158 * sigtramp.h: Fix minor inaccuracy.
7160 2014-02-25 Ben Brosgol <brosgol@adacore.com>
7162 * gnat_ugn.texi: Added description of kill command.
7164 2014-02-25 Robert Dewar <dewar@adacore.com>
7166 * gnat_rm.texi (Address_Clauses): Add a section discussing the
7167 problem of address clauses causing unexpected initialization,
7168 including the effect of Initialize_Scalars.
7170 2014-02-25 Robert Dewar <dewar@adacore.com>
7172 * errout.adb: Various changes for better msgs for anonmous access
7174 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
7176 (Buffer_Remove): Version with character argument.
7177 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
7178 of mismatching conventions for access-to-subprogram case.
7179 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
7180 access types in record.
7181 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
7182 types, including in records.
7184 2014-02-25 Doug Rupp <rupp@adacore.com>
7186 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
7187 enhancements and corrections.
7189 2014-02-25 Robert Dewar <dewar@adacore.com>
7191 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
7193 2014-02-25 Robert Dewar <dewar@adacore.com>
7195 * gnat_rm.texi: First set of documentation additions for
7196 predefined RM units.
7197 * checks.adb: Minor reformatting.
7198 * sem_elab.adb (Check_Task_Activation): Minor fix to error
7200 * sem_util.adb: Minor reformatting.
7202 2014-02-25 Arnaud Charlet <charlet@adacore.com>
7204 * usage.adb (Usage): Add help on -gnateC.
7205 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
7206 * opt.ads (Generate_CodePeer_Messages): New flag.
7207 * gnat_ugn.texi: Document new switch -gnateC.
7209 2014-02-25 Ben Brosgol <brosgol@adacore.com>
7211 * gnat_rm.texi: Corrected minor typos in Implementation Defined
7213 * opt.ads: Minor reformatting.
7215 2014-02-25 Robert Dewar <dewar@adacore.com>
7217 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
7218 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
7220 * opt.ads (Warn_Info_Messages): New flag.
7221 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
7223 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
7225 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
7226 * usage.adb: Add documentation of -gnatel/-gnateL Update
7227 documentation of -gnatwl/-gnatwL.
7228 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
7229 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
7231 2014-02-25 Robert Dewar <dewar@adacore.com>
7233 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
7234 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
7235 * interfac.ads: Minor code reorganization (add pragma
7236 Compiler_Unit_Warning).
7237 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
7238 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
7239 Has_Shift_Operator flag.
7240 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
7241 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
7242 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
7243 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
7244 Add entry for Name_Amount.
7245 * checks.adb (Selected_Range_Checks): When checking for a null
7246 range, make sure we use the base type, and not the subtype for
7247 deciding a range is null.
7248 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
7249 for suspicious loop bound which is outside the range of the
7251 * gnat_ugn.texi: Add documentation section "Determining the
7252 Chosen Elaboration Order"
7253 * sem_ch13.adb (UC_Entry): Add field Act_Unit
7254 (Validate_Unchecked_Conversion): Store Act_Unit
7255 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
7256 * treepr.adb: Minor reformatting.
7258 2014-02-25 Arnaud Charlet <charlet@adacore.com>
7260 * usage.adb: Minor: fix typo.
7262 2014-02-25 Robert Dewar <dewar@adacore.com>
7264 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
7265 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
7266 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
7267 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
7268 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
7269 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
7270 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
7271 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
7272 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
7273 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
7274 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
7275 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
7276 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
7277 Compiler_Unit_Warning, change Compiler_Unit everywhere to
7278 Compiler_Unit_Warning.
7280 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
7282 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
7283 in ASIS mode aggregates that are used as aspect definitions.
7285 2014-02-25 Robert Dewar <dewar@adacore.com>
7287 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
7290 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7292 * freeze.adb (Freeze_Entity): If the return type of a function
7293 is a limited view, and the non-limited view has not been seen yet,
7294 defer freezing to some later point.
7296 2014-02-25 Robert Dewar <dewar@adacore.com>
7298 * sem_ch3.adb: Minor reformatting.
7300 2014-02-25 Robert Dewar <dewar@adacore.com>
7302 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
7303 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
7304 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
7305 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
7306 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
7307 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
7308 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
7309 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
7310 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
7311 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
7312 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
7313 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
7314 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
7315 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
7316 snames.ads-tmpl: Change Compiler_Unit everywhere to
7317 Compiler_Unit_Warning.
7319 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7321 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
7322 (Collect_Body_Postconditions_In_Decls): New routine.
7323 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
7324 postcondition aspects or pragmas that appear on a subprogram
7326 (Collect_Spec_Preconditions): Factor out code. Handle
7327 precondition aspects or pragmas that appear on a subprogram
7329 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
7330 aspects that apply to a subprogram body stub is no longer delayed,
7331 the aspects are analyzed on the spot.
7332 (SPARK_Aspect_Error):
7333 Aspects that apply to a subprogram declaration cannot appear in
7335 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
7336 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
7337 is now a local variable. Code cleanup. Analysis related to
7338 the aspects of a subprogram body stub is now carried out by
7339 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
7340 and/or pragmas of a subprogram body stub to the proper body
7341 as this is no longer needed. Do not analyze the aspects of a
7342 subprogram stub when the corresponding source unit is missing.
7343 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
7345 (Analyze_Task_Body_Stub): Flag the illegal use of
7347 (Optional_Subunit): Add local variable Unum.
7348 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
7349 pragma when it applies to a subprogram body stub.
7350 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
7351 Depends and Global can now apply to a subprogram body stub as
7352 long as it acts as its own spec.
7353 (Analyze_Refined_Pragma):
7354 Code reformatting. Refinement pragmas cannot apply to a subunit.
7356 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7358 * einfo.ads Update the usage of flag
7359 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
7360 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
7361 now starts with the letter 'C'. This makes reading expanded
7363 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
7364 Iter_Loop. Signal that an Ada 2012 iterator loop requires
7365 secondary stack management when creating a transient scope for
7366 an element reference.
7367 * exp_util.adb (Process_Statements_For_Controlled_Objects):
7368 When wrapping the statements of a loop, pass the E_Loop entity
7369 to the wrapping machinery.
7370 (Wrap_Statements_In_Block): Add
7371 formal parameter Scop along with comment on usage. Add local
7372 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
7373 block as requiring secondary stack management when the block is
7374 created inside an Ada 2012 iterator loop. This ensures that any
7375 reference objects are reclaimed on each iteration of the loop.
7376 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
7377 tasked with the handling of container iterators as requiring
7378 secondary stack management. This ensures that iterators are
7379 reclaimed when the loop terminates or is exited in any fashion.
7380 * sem_util.adb (Add_Block_Identifier): New routine.
7381 (Find_Enclosing_Iterator_Loop): New routine.
7382 * sem_util.ads (Add_Block_Identifier): New routine.
7383 (Find_Enclosing_Iterator_Loop): New routine.
7385 2014-02-25 Robert Dewar <dewar@adacore.com>
7387 * sinfo.ads: Minor reformatting.
7389 2014-02-25 Tristan Gingold <gingold@adacore.com>
7391 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
7393 2014-02-25 Pascal Obry <obry@adacore.com>
7395 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
7397 2014-02-25 Tristan Gingold <gingold@adacore.com>
7399 * sem_ch10.adb: Minor comment fix.
7401 2014-02-25 Bob Duff <duff@adacore.com>
7403 * s-tasdeb.adb: Misc cleanup of this package,
7404 including printing addresses in hexadecimal.
7405 (Write): Fix minor bug when taking 'Address of an empty string.
7407 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7409 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
7410 public child unit when it does not refer to the abstract state
7411 of a public ancestor.
7413 2014-02-25 Yannick Moy <moy@adacore.com>
7415 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
7416 Validity_Checks in GNATprove and CodePeer modes.
7418 2014-02-25 Pascal Obry <obry@adacore.com>
7420 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
7421 Artifacts attribute.
7423 2014-02-25 Yannick Moy <moy@adacore.com>
7425 * sem_prag.adb: Minor reformatting to get consistent messages.
7427 2014-02-25 Robert Dewar <dewar@adacore.com>
7429 * checks.adb: Minor reformatting.
7430 * sinfo.ads (Do_Range_Check): Document that this flag is never
7431 passed to the back end.
7433 2014-02-25 Yannick Moy <moy@adacore.com>
7435 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
7436 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
7438 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7440 * sem_res.adb (Appears_In_Check): New routine.
7441 (Resolve_Entity_Name): Remove local variables Prev and
7442 Usage_OK. Par is now a constant. Remove the parent chain traversal
7443 as the placement of a volatile object with enabled property
7444 Async_Writers and/or Effective_Reads must appear immediately
7445 within a legal construct.
7447 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7449 * checks.adb (Apply_Selected_Range_Checks):
7450 Alphabetize local constants and variables. Add comments.
7451 Always insert a range check that requires runtime evaluation into
7454 2014-02-25 Robert Dewar <dewar@adacore.com>
7456 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
7458 2014-02-25 Bob Duff <duff@adacore.com>
7460 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
7461 iterations while waiting for independent tasks to terminate;
7462 if an independent task does not terminate, we do not want to
7463 hang here. In that case, the thread will be terminated when the
7465 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
7467 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7469 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
7470 used to perform pre-analysis of the expression for SPARK
7471 aspects that have a non-standard syntax, such as GLobal and
7472 Initializes. The procedure applies to the original expression
7473 in an aspect specification, prior to the analysis of the
7474 corresponding pragma, in order to provide semantic information
7475 for ASIS navigation purposes.
7476 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
7477 Call new subprogram.
7479 2014-02-25 Yannick Moy <moy@adacore.com>
7481 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
7483 2014-02-25 Doug Rupp <rupp@adacore.com>
7485 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
7486 (__gnat_adjust_context_for_raise): Bump the PC by 2.
7488 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7490 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
7491 misplaced IS, add a statement sequence to improper body only if
7492 one has not been parsed already.
7494 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7496 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
7497 mismatch when multidimensional array is updated with a single
7500 2014-02-25 Yannick Moy <moy@adacore.com>
7502 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
7503 sem_ch6.adb: Mark most references to SPARK RM in error messages
7506 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7508 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
7509 appears in a list of basic declarations, complete the tree with
7510 an empty statement list, to prevent cascaded errors and crashes
7511 if semantic analysis is attempted.
7513 2014-02-24 Thomas Quinot <quinot@adacore.com>
7515 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
7517 * erroutc.adb: Minor reformatting.
7519 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7521 * sem_prag.adb (Check_Clause_Syntax): Account
7522 for a solitary input item in a dependency list.
7524 2014-02-24 Yannick Moy <moy@adacore.com>
7526 * gnat1drv.adb (Adjust_Global_Switches): Do not
7527 use validity checks at all in GNATprove_Mode.
7529 2014-02-24 Robert Dewar <dewar@adacore.com>
7531 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
7532 atree.adb, atree.ads: Minor reformatting.
7534 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7536 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
7537 global and dependence refinement when SPARK_Mode is off.
7538 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
7539 state refinement when SPARK_Mode is off.
7540 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
7541 variable Decl. Insert the generated pragma for Refined_State
7542 after a potential pragma SPARK_Mode.
7543 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
7544 constant Deps. Remove local variable Expr. Check the syntax
7545 of pragma Depends when SPARK_Mode is off. Factor out the
7546 processing for extra parenthesis around individual clauses.
7547 (Analyze_Global_In_Decl_List): Items is now a constant. Check
7548 the syntax of pragma Global when SPARK_Mode is off.
7549 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
7550 Initializes when SPARK_Mode is off.
7551 (Analyze_Part_Of): Check
7552 the syntax of the encapsulating state when SPARK_Mode is off.
7553 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
7554 SPARK_Mode is off. Move the declaration order check with respect
7555 to pragma Initializes to the end of the processing. Do not verify
7556 the declaration order for pragma Initial_Condition when SPARK_Mode
7557 is off. Do not complain about a useless package refinement when
7559 (Analyze_Refined_Depends_In_Decl_Part): Refs
7560 is now a constant. Check the syntax of pragma Refined_Depends
7561 when SPARK_Mode is off.
7562 (Analyze_Refined_Global_In_Decl_Part):
7563 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
7564 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
7565 Refined_State when SPARK_Mode is off.
7566 (Check_Dependence_List_Syntax): New routine.
7567 (Check_Global_List_Syntax): New routine.
7568 (Check_Initialization_List_Syntax): New routine.
7569 (Check_Item_Syntax): New routine.
7570 (Check_State_Declaration_Syntax): New routine.
7571 (Check_Refinement_List_Syntax): New routine.
7572 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
7574 2014-02-24 Robert Dewar <dewar@adacore.com>
7576 * a-tags.adb, s-os_lib.adb: Minor reformatting.
7578 2014-02-24 Thomas Quinot <quinot@adacore.com>
7580 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
7581 strerror message, not just numeric errno value.
7583 2014-02-24 Doug Rupp <rupp@adacore.com>
7585 * raise-gcc.c (exception_class_eq): Make endian neutral.
7587 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7589 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
7590 flag, and reset Etype and Analyzed attributes unconditionally
7591 when copying a tree that may be partly analyzed.
7592 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
7593 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
7594 within a subprogram body and applies to it, remove it from the
7595 body before making a copy of it, to prevent spurious errors when
7596 analyzing the copied body.
7598 2014-02-24 Thomas Quinot <quinot@adacore.com>
7600 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
7601 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
7602 vxWorks.h has been included. Also ensure that file attributes
7603 related definitions are output even in cases where socket support
7605 * a-tags.adb: Code clean up.
7606 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
7607 instead of -I to add the main ada source directory to the header
7608 search path, in order to avoid conflict between our own "types.h"
7609 and VxWork's <types.h>.
7611 2014-02-24 Robert Dewar <dewar@adacore.com>
7613 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
7614 * debug.adb: Remove documentation of -gnatd.X, no longer used.
7615 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
7617 2014-02-24 Bob Duff <duff@adacore.com>
7619 * gnat_ugn.texi: Improve documentation of gnatpp.
7621 2014-02-24 Thomas Quinot <quinot@adacore.com>
7623 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
7624 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
7625 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
7626 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
7627 a chars_ptr, because on Windows this is a renaming of
7628 Socket_Error_Message.
7630 2014-02-24 Robert Dewar <dewar@adacore.com>
7632 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
7633 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
7634 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
7637 2014-02-24 Thomas Quinot <quinot@adacore.com>
7639 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
7640 that the source directory containing s-oscons-tmplt.c is on the
7641 include path, so that all internal header files are available.
7643 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7645 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
7646 domain of iteration is an attribute reference 'Old, this is an
7647 Ada 2012 iterator and the loop must be rewritten as such.
7649 2014-02-24 Thomas Quinot <quinot@adacore.com>
7651 * s-fileio.adb (Errno_Message): Remove, use shared version from
7653 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
7654 * g-stseme (Socket_Error_Message): Reimplement in terms of new
7656 * g-socthi.ads, g-socthi.adb: Change profile of
7657 Socket_Error_Message to return String to allow the above.
7658 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
7659 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
7660 * g-socthi-vxworks.ads: Update to account for the above profile
7662 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
7663 * s-crtl.ads (strncpy): New procedure.
7664 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
7665 Use import from s-crtl.
7666 * a-envvar.adb, osint.adb: Use imports of C runtime functions
7667 from s-crtl instead of re-importing locally.
7669 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7671 * sem_prag.adb (Analyze_Global_Item): Emit the
7672 variable related checks concerning volatile objects only when
7675 2014-02-24 Robert Dewar <dewar@adacore.com>
7677 * sem_ch5.adb (Analyze_Iterator_Specification): use
7678 Error_Msg_Ada_2012_Feature.
7680 2014-02-24 Jose Ruiz <ruiz@adacore.com>
7682 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
7683 No_Local_Timing_Events and No_Specific_Termination_Handlers
7684 must be set, according to the Ravenscar profile definition
7687 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7689 * sem_ch6.adb (Analyze_Expression_Function): If this is a
7690 completion, freeze return type and its designated type if needed.
7692 2014-02-24 Thomas Quinot <quinot@adacore.com>
7694 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7695 'Address): When moving initialization statements to a freeze
7696 entity, keep them under a single node (i.e. do not unwrap
7697 expressions with actions), and set the Initialization_Statements
7698 attribute again so that processing of a later pragma Import can
7701 2014-02-24 Claire Dross <dross@adacore.com>
7703 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
7704 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
7705 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
7706 Left/Right to First_To_Previous/Current_To_Last.
7708 2014-02-24 Thomas Quinot <quinot@adacore.com>
7710 * adaint.h (struct file_attributes): New component "error"
7711 (__gnat_error_attributes): Accessor for the above.
7712 * adaint.c (__gnat_error_attributes): New subprogram
7713 (__gnat_stat): Fix returned value (expect errno value)
7714 (__gnat_stat_to_attr): Add management of error component (set to
7715 stat errno value, except for missing files where it is set to 0,
7716 and exists is set to 0).
7717 * osint.ads (File_Attributes_Size): Update per change above,
7718 also clarify documentation.
7719 * s-filatt.ads: New file, binding to file attributes related
7721 * Makefile.rtl (s-filatt): New runtime unit.
7722 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
7723 to library function if not available on target).
7724 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
7725 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
7726 SIZEOF_struct_dirent_alloc): New constants.
7727 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
7728 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
7729 Perform appropriate error checking if stat fails (do not just
7730 ignore existing files if stat fails)
7731 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
7734 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7736 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
7737 the use of volatile objects as global items in a function to
7738 the variable related checks section.
7739 * sem_util.adb (Async_Readers_Enabled): Directly call
7740 Has_Enabled_Property.
7741 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
7742 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
7743 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
7744 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
7745 Update the comment on usage. State_Has_Enabled_Property how handles
7746 the original logic of the routine. Add processing for variables.
7747 (State_Has_Enabled_Property): New routine.
7748 (Variable_Has_Enabled_Property): New routine.
7750 2014-02-24 Robert Dewar <dewar@adacore.com>
7752 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
7754 * atree.ads, atree.adb (Node35): New function.
7755 (Set_Node35): New procedure.
7756 * debug.adb: Define new debug flag -gnatd.X.
7757 * einfo.ads, einfo.adb (Import_Pragma): New field.
7758 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
7759 really active yet, has to be activated with -gnatd.X.
7760 * sem_prag.adb (Set_Imported): Set new Import_Pragma
7761 field (Set_Imported): Don't set Is_Public (see
7762 Freeze.Wrap_Imported_Subprogram)
7763 * par-ch3.adb (P_Component_List): Handle unexpected null component.
7765 2014-02-24 Yannick Moy <moy@adacore.com>
7767 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
7768 * gnat_rm.texi: Correct documentation of attribute Update.
7770 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7772 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
7773 iterator in older versions of Ada.
7775 2014-02-24 Gary Dismukes <dismukes@adacore.com>
7777 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
7778 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
7780 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7782 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
7783 indexed_components that are instances of Ada 2012 container
7784 indexing operations. Analysis and resolution of such nodes
7785 is performed on the attribute, and the original source is
7786 preserved for ASIS operations. If expansion is enabled, the
7787 indexed component is replaced by the value of this attribute,
7788 which is in a call to an Indexing aspect, in most case wrapped
7789 in a dereference operation.
7790 * sem_ch4.adb (Analyze_Indexed_Component): Create
7791 Generalized_Indexing attribute when appropriate.
7792 (Analyze_Call): If prefix is not overloadable and has an indexing
7793 aspect, transform into an indexed component so it can be analyzed
7794 as a potential container indexing.
7795 (Analyze_Expression): If node is an indexed component with a
7796 Generalized_ Indexing, do not re-analyze.
7797 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
7798 of an indexed_component that has been transformed into a container
7800 (Resolve_Indexed_Component): Call the above when required.
7801 (Resolve): Do not insert an explicit dereference operation on
7802 an indexed_component whose type has an implicit dereference:
7803 the operation is inserted when resolving the related
7804 Generalized_Indexing.
7806 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
7808 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
7811 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7813 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
7815 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
7816 Merge the expected and available mode errors.
7817 (Report_Unused_Constituents): Remove leading spaces in error messages.
7818 (Report_Unused_States): Remove leading spaces in error messages.
7820 2014-02-24 Thomas Quinot <quinot@adacore.com>
7822 * par_sco.adb (Traverse_One): Refine categorization of statement
7825 2014-02-24 Robert Dewar <dewar@adacore.com>
7827 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
7828 Pure_05, Pure_12 and Preelaborate_05.
7829 * gnat_rm.texi: Update accordingly.
7830 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
7831 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
7832 Recognize one argument form of these pragmas only in GNAT mode
7835 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7837 * s-dimmks.ads: Replace symbol for temperature, previously the
7838 Greek letter Theta, by the ASCII @ sign.
7839 * s-diflio.ads: ditto.
7841 2014-02-24 Robert Dewar <dewar@adacore.com>
7843 * exp_ch4.adb: Minor code reorganization (use OR for boolean
7845 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
7847 2014-02-24 Ben Brosgol <brosgol@adacore.com>
7849 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
7850 so that references to gnatmem and ASIS tools do not appear in the FSF
7851 edition of the GNAT User's Guide.
7853 2014-02-24 Yannick Moy <moy@adacore.com>
7855 * freeze.adb (Freeze_Entity): Do not issue warning
7856 for pre/post being ignored on imported subprogram in GNATprove
7859 2014-02-24 Robert Dewar <dewar@adacore.com>
7861 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
7862 stand.ads, sem_eval.adb: Minor reformatting.
7864 2014-02-24 Yannick Moy <moy@adacore.com>
7866 * sem_prag.adb: Minor rewording in error message.
7868 2014-02-24 Johannes Kanig <kanig@adacore.com>
7870 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
7871 GNATprove_mode, gnat2why doesn't need nor use these types.
7873 2014-02-24 Gary Dismukes <dismukes@adacore.com>
7875 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
7876 target, in the case of signed integer exponentiation that uses a
7877 run-time routine, always select the Exp_* versions, since overflow
7878 checking is automatically done by AAMP arithmetic instructions.
7880 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7882 * sem_ch13.adb (Analyze_Aspect_Specifications):
7883 When the related context is a package instace, insert pragma
7884 Abstract_State after all internally-generated renamings related
7885 to the instance "header".
7887 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7889 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
7891 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
7892 call to an abstract subprogram is legal if it appears in a
7893 pre/postcondition of another abstract operation.
7895 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
7897 * gnat_ugn.texi: Misc updates.
7899 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7901 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
7903 2014-02-24 Gary Dismukes <dismukes@adacore.com>
7905 * layout.adb (Layout_Variant_Record): Instantiate
7906 Generic_Check_Choices and call Check_Choices before calling
7907 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
7908 set to prevent generating incorrect discriminant-checking
7909 functions for 'others' variants (functions that unconditionally
7910 return True rather than accounting for the values covered by the
7912 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
7913 Formal_Derived_Matching.
7914 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
7915 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
7916 Formal_Derived_Matching formal to Subtypes_Statically_Match.
7917 (Subtypes_Statically_Match): Suppress the Object_Size matching
7918 test in the case where Formal_Derived_Matching is True.
7919 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
7920 True for Formal_Derived_Matching_Formal on the call to
7921 Subtypes_Statically_Compatible.
7923 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
7925 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
7927 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
7929 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
7930 Look through a conversion between original and packable version to get
7932 (build_component_ref): Rework comment and fix formatting.
7934 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
7936 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
7937 project-specific options.
7939 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7941 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
7942 not Constraint_Error.
7943 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
7944 * sem_ch5.adb: Code clean up.
7946 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
7948 * sem_prag.adb (Usage_Error): Remove local
7949 constant Typ. Remove the specialized diagnostics for unconstrained
7950 or tagged items as those are not part of the explicit input set
7951 of the related subprogram and should not be flagged.
7953 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7955 * sem_attr.adb: Add guard to preserve all errors.
7957 2014-02-20 Vincent Celier <celier@adacore.com>
7959 * switch-m.adb (Normalize_Compiler_Switches): Take into account
7960 switches that are recorded in ALI files: -gnateA, -gnateE,
7961 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
7963 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7965 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
7966 of an element iterator form over a formal container with an
7968 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
7969 to create declaration and loop statements for both forms of
7970 container iterators.
7971 (Expand_Formal_Container_Element_Iterator): New procedure
7972 to handle loops of the form "for E of C" when C is a formal
7974 (Expand_Formal_Container_Iterator): Code cleanup.
7976 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
7978 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
7979 (Analyze_Contract_Case): Remove the use of
7980 "may". Replace "aspect Contract_Cases" to avoid categorization
7981 of aspect vs pragma.
7982 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
7983 (Analyze_Global_Item): Remove
7984 the use of "formal", specify the subprogram. Split the
7985 error message about a state with visible refinement into
7986 two. Remove the use of "global" from "volatile global item".
7987 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
7989 (Analyze_Input_Output): Update the call to
7990 Check_Mode. Specify the duplicated item. Reword the error
7991 message concerning an input of a null output list. Use "\"
7992 for error message continuation.
7993 (Analyze_Part_Of): Remove
7994 the use of "may". Use "\" for error message continuation.
7995 (Analyze_Refined_Depends_In_Decl_Part): Update the error
7996 message concerning a useless refinement to match the format
7998 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
7999 concerning a useless refinement.
8000 (Analyze_Refinement_Clause): Use "\" for error message continuation.
8001 (Check_Constituent_Usage): Use "\" for error message continuation.
8002 (Check_Dependency_Clause): Use "\" for error message continuation.
8003 (Check_Matching_Constituent): Use "\" for error message continuation.
8004 (Check_Missing_Part_Of): Use "\" for error message continuation.
8005 (Check_Mode): Renamed to
8006 Check_Role. Update the comment on usage. Redo the error reporting
8008 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
8009 message continuation.
8010 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
8011 with comment on usage. Update all occurrences of Is_Input and Is_Output.
8012 (Inconsistent_Mode_Error): Use "\" for error message continuation.
8013 (Input_Match): Use "\" for error message continuation.
8014 (Role_Error): New routine.
8015 (Set_Convention_From_Pragma): Use "\" for error message continuation.
8016 (Usage_Error): Add local variable Error_Msg. Build specialized error
8017 message showcasing the offending item kind. Redo the diagnostics for
8018 unconstrained types.
8020 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8022 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
8023 to determine whether a type is a container type, rather than
8024 examining only its type declaration, so that subtypes and derived
8025 types are handled properly.
8027 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
8029 * gnat_ugn.texi: gnatmetric: add description of project-specific
8032 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8034 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
8035 all choices in an association for a record type have the same
8036 type, as is done for record aggregates.
8038 2014-02-20 Robert Dewar <dewar@adacore.com>
8040 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
8041 Unmodified rather than Warnings (Off). Make comments
8042 uniform in the four affected units.
8044 2014-02-20 Robert Dewar <dewar@adacore.com>
8046 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8047 Object_Size): For non-scalar types allow any value that is a
8049 * gnat_rm.texi: Document Object_Size for composites more clearly.
8051 2014-02-20 Yannick Moy <moy@adacore.com>
8053 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
8055 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8057 * stand.ads: Raise_Type: new predefined entity, used as the type
8058 of a Raise_Expression prior to resolution.
8059 * cstand.adb: Build entity for Raise_Type.
8060 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
8061 initial type of the node.
8062 * sem_type.adb (Covers): Raise_Type is compatible with all
8064 * sem_res.adb (Resolve): Remove special handling of Any_Type on
8065 Raise_Expression nodes.
8066 (Resolve_Raise_Expression): Signal ambiguity if the type of the
8067 context is still Raise_Type.
8069 2014-02-20 Robert Dewar <dewar@adacore.com>
8071 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
8072 mismatching predicates.
8073 * sem_ch6.adb (Check_Conformance): Give better messages on
8075 * sem_eval.adb (Predicates_Match): Move to spec.
8076 * sem_eval.ads (Predicates_Match): Moved here from body.
8078 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8080 * a-cbmutr.adb: Use default value in Insert_Child.
8082 2014-02-20 Vincent Celier <celier@adacore.com>
8084 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
8085 Stringt.Initialize in all project aware tools.
8087 2014-02-20 Doug Rupp <rupp@adacore.com>
8089 * gnat_ugn.texi: Document gnatbind -X option.
8090 * vms_data.ads: Minor warnings documentation reformatting.
8092 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8094 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
8095 procedure for a base type.
8097 2014-02-20 Robert Dewar <dewar@adacore.com>
8099 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
8100 expression with type info.
8101 * sem_ch13.adb: Minor reformatting.
8102 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
8103 False if predicates do not match on the two types.
8105 2014-02-20 Arnaud Charlet <charlet@adacore.com>
8107 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
8108 In Relaxed_RM_Semantics mode, allow any static integer value,
8109 for compatibility with other compilers.
8111 2014-02-20 Vincent Celier <celier@adacore.com>
8113 * errutil.adb (Initialize): Properly initialize entry in table
8114 Warnings when warnings are suppressed.
8116 2014-02-20 Robert Dewar <dewar@adacore.com>
8118 * s-os_lib.ads: Add warning about non-portability of Rename_File.
8119 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
8120 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
8121 * gnat_ugn.texi: Document no warnings on junk variable names.
8122 * layout.adb: Minor code reorganization (use Ekind_In).
8123 * stringt.adb: Move initialization of Null_String_Id to Initialize
8126 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8128 * sem_ch13.adb: Initialize optional Element_Id.
8130 2014-02-20 Robert Dewar <dewar@adacore.com>
8132 * s-os_lib.ads (Rename_File): Minor commment addition.
8134 2014-02-20 Thomas Quinot <quinot@adacore.com>
8136 * einfo.ads: Minor reformatting.
8138 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
8140 * aspects.adb (Exchange_Aspects): New routine.
8141 * aspects.ads (Exchange_Aspects): New routine.
8142 * atree.adb (Rewrite): Do not check whether the save node has
8143 aspects as it never will, instead check the node about to be clobbered.
8144 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
8145 entities of generic packages.
8146 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
8147 pointer of an aspect specification list after rewriting takes place.
8148 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
8149 specifications of the generic template and the copy used for analysis.
8150 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
8151 the aspect specifications of the generic template and the
8152 copy used for analysis.
8153 (Analyze_Package_Instantiation): Propagate the aspect specifications
8154 from the generic template to the instantiation.
8155 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
8156 specifications from the generic template to the instantiation.
8157 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
8158 Abstract_State, Initializes and Initial_Condition when they
8159 apply to a package instantiation.
8161 2014-02-20 Robert Dewar <dewar@adacore.com>
8163 * stringt.adb: Add call to Initialize in package initialization.
8165 2014-02-20 Robert Dewar <dewar@adacore.com>
8167 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
8168 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
8169 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
8170 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
8173 2014-02-20 Bob Duff <duff@adacore.com>
8175 * s-os_lib.ads: Minor: Remove incorrect comment.
8177 2014-02-20 Robert Dewar <dewar@adacore.com>
8179 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
8181 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8183 * a-cborma.adb (Assign): When creating a node without a specified
8184 element, insert an uninitialized element in the map, because
8185 the instance may provide an element type with a default
8186 initialization, e.g a scalar with a Default_Value aspect.
8187 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
8188 (Insert): In the version without explicit element, provide an
8189 uninitialized element, as above.
8190 * a-cbdlli.adb (Append): In the version without explicit element,
8191 provide an uninitalized element, as above.
8192 (Allocate): Remove unused version.
8194 2014-02-20 Robert Dewar <dewar@adacore.com>
8196 * sem_elab.adb: Minor code reorganization (use Nkind_In).
8197 * stringt.adb: Remove temporary pragma Warnings (Off).
8198 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
8201 2014-02-20 Matthew Heaney <heaney@adacore.com>
8203 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
8206 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8208 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
8209 properly the cursor type for subsequent volatile testing in SPARK
8210 mode, when domain is a formal container with an Iterabe aspect.
8212 2014-02-20 Robert Dewar <dewar@adacore.com>
8214 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
8215 (Set_Specific_Warning_Off): Add Reason argument.
8216 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
8217 (Set_Specific_Warning_Off): Add Reason argument.
8218 * erroutc.adb (Warnings_Entry): Add Reason field
8219 (Specific_Warning_Entry): Add Reason field.
8220 (Warnings_Suppressed): return String_Id for Reason.
8221 (Warning_Specifically_Suppressed): return String_Id for Reason.
8222 * erroutc.ads (Warnings_Entry): Add Reason field.
8223 (Specific_Warning_Entry): Add Reason field.
8224 (Set_Specific_Warning_Off): Add Reason argument.
8225 (Set_Warnings_Mode_Off): Add Reason argument.
8226 (Warnings_Suppressed): return String_Id for Reason.
8227 (Warning_Specifically_Suppressed): return String_Id for Reason.
8228 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
8229 (Warning_Specifically_Suppressed): returns String_Id for Reason
8230 * gnat_rm.texi: Document that Warning parameter is string literal
8231 or a concatenation of string literals.
8232 * par-prag.adb: New handling for Reason argument.
8233 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
8234 for Reason argument.
8235 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
8236 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
8237 * stringt.adb: Set Null_String_Id.
8238 * stringt.ads (Null_String_Id): New constant.
8240 2014-02-20 Robert Dewar <dewar@adacore.com>
8242 * einfo.ads: Minor comment addition: Etype of package is
8244 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
8245 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
8246 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
8247 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
8248 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
8249 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8250 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
8251 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
8252 Replace all calls with calls to New_Occurrence_Of.
8254 2014-02-20 Robert Dewar <dewar@adacore.com>
8256 * par-util.adb (Ignore, case of right paren): Make this a
8259 2014-02-19 Robert Dewar <dewar@adacore.com>
8261 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
8262 * debug.adb: Remove -gnatd.X switch, no longer used.
8263 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
8266 2014-02-19 Bob Duff <duff@adacore.com>
8268 * g-socket.ads: Minor: Correct some comments.
8270 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8272 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
8274 2014-02-19 Arnaud Charlet <charlet@adacore.com>
8276 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
8277 an error on out of range priorities if Relaxed_RM_Semantics.
8278 * sem_prag.adb (Analyze_Pragma): Ditto.
8280 2014-02-19 Bob Duff <duff@adacore.com>
8282 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
8283 where F denotes the renaming of an enumeration literal, and
8284 issue a specialized error message.
8286 2014-02-19 Matthew Heaney <heaney@adacore.com>
8288 * a-chtgop.ads (Checked_Index): New operation.
8289 (Next): Changed mode of hash table.
8290 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
8291 (Generic_Read, Reserve_Capacity): Ditto.
8292 (Generic_Equal): Detect tampering.
8293 (Next): Changed mode of hash table, detect tampering.
8294 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
8296 (Find): Changed mode of hash table.
8297 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
8298 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
8300 (Find): Changed mode of hash table, check for tampering.
8301 (Generic_Replace_Element): Check for tampering.
8302 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
8303 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
8304 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
8306 (Find, Generic_Replace_Element): Check for tampering.
8307 * a-chtgbo.ads (Checked_Index): New operation.
8308 * a-chtgbo.adb (Checked_Index): New operation
8309 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
8310 (Generic_Read, Next): Ditto.
8311 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
8312 table (Difference, Intersection): Use variable view of
8313 source, detect tampering (Find, Is_Subset, Overlap): Use
8314 variable view of container (Symmetric_Difference, Union):
8315 Detect tampering (Vet): Use Checked_Index to detect tampering
8316 (Constant_Reference, Element, Find): Use variable view of
8318 (Update_Element_Preserving_Key): Detect tampering.
8319 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
8322 (Equivalent_Sets, Overlap): Use Node's Next component.
8323 (Vet): Use Checked_Index to detect tampering.
8324 (Constant_Reference, Element, Find): Use variable view of container.
8325 (Update_Element_Preserving_Key): Detect tampering.
8326 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
8327 Element, Find): Use variable view of container.
8328 (Reference): Rename hash table component.
8329 (Vet): Use Checked_Index to detect tampering.
8331 2014-02-19 Arnaud Charlet <charlet@adacore.com>
8333 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
8336 2014-02-19 Thomas Quinot <quinot@adacore.com>
8338 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
8339 against calls without Def_Id.
8341 2014-02-19 Claire Dross <dross@adacore.com>
8343 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8344 a-cofove.ads: Add global annotations to subprograms.
8346 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8348 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
8349 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
8350 Initial_Condition no longer requires the presence of pragma
8351 Initialized. Do not try to diagnose whether all variables mentioned in
8352 pragma Initializes also appear in Initial_Condition.
8353 (Collect_Variables): Removed.
8354 (Match_Variable): Removed.
8355 (Match_Variables): Removed.
8356 (Report_Unused_Variables): Removed.
8358 2014-02-19 Thomas Quinot <quinot@adacore.com>
8360 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
8362 2014-02-19 Robert Dewar <dewar@adacore.com>
8364 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
8367 2014-02-19 Vincent Celier <celier@adacore.com>
8369 * prj-part.adb (Parse_Single_Project): Use the fully resolved
8370 project path, with all symbolic links resolved, to check if the
8371 same project is imported with a different unresolved path.
8372 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
8373 changed to Resolved_Path to reflect that all symbolic links
8376 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8378 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
8379 from sem_ch13, for use elsewhere.
8380 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
8381 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
8382 cursor type on the loop variable when the iteration is over o
8385 2014-02-19 Vincent Celier <celier@adacore.com>
8387 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
8388 for an empty Target (Check_Target): Never fail when an empty
8389 target is declared in the configuration project.
8391 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8393 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
8394 the pragma comes fron a predicate aspect and the context is a
8395 record declaration within the scope that declares the type.
8397 2014-02-19 Robert Dewar <dewar@adacore.com>
8399 * gnat_rm.texi: Minor clarifications.
8400 * expander.adb, sem_aggr.adb: Add comments.
8402 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8404 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
8405 applies to a subprogram body, the name is the current scope,
8406 rather than being declared in the current scope.
8407 (Analyze_Pragma, case No_Return): Handle properly a No_Return
8408 aspect applied to a subprogram body.
8410 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8412 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
8413 of overloaded subprograms, and fix bug in handling of primitive
8416 2014-02-19 Pascal Obry <obry@adacore.com>
8418 * s-os_lib.adb: Minor reformatting.
8420 2014-02-19 Yannick Moy <moy@adacore.com>
8422 * expander.adb (Expand): Do nothing inside generics.
8423 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
8426 2014-02-19 Yannick Moy <moy@adacore.com>
8428 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
8430 2014-02-19 Robert Dewar <dewar@adacore.com>
8432 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
8433 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
8436 2014-02-19 Claire Dross <dross@adacore.com>
8438 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8439 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
8441 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8443 * sem_ch3.adb (Analyze_Declarations): Analyze
8444 a package contract at the end of the private declarations (if
8445 applicable), otherwise analyze it and the end of the visible
8448 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8450 * style.adb (Missing_Overriding): If subprogram is an
8451 instantiation, place warning on the instance node itself,
8452 without mention of the original generic. Do not emit message
8453 if explicit Ada version is older than the introduction of the
8454 overriding indicator.
8456 2014-02-19 Yannick Moy <moy@adacore.com>
8458 * gnat_rm.texi: Doc clarifications.
8460 2014-02-19 Yannick Moy <moy@adacore.com>
8462 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
8465 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8467 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
8468 specified First primitive, rather than by name.
8469 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
8470 and extend error checking for missing primitives and incorrect
8473 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8475 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
8476 errors when a Synchronization aspect on an overriding protected
8477 operation does not match the given aspect on the overridden
8478 operation of an ancestor interface.
8480 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8482 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
8483 (Check_Loop_Pragma_Placement): Update
8484 comment on usage. Remove local variables Orig_Stmt and
8485 Within_Same_Sequence. Check that the current Loop_Invariant or
8486 Loop_Variant pragma is grouped together with other such pragmas.
8487 (Is_Loop_Pragma): New routine.
8488 (Prev_In_Loop): Removed.
8490 2014-02-19 Robert Dewar <dewar@adacore.com>
8492 * par-ch6.adb (P_Return): For extended return, end column lines
8494 * par.adb: Minor documentation clarification.
8496 2014-02-19 Yannick Moy <moy@adacore.com>
8498 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
8499 that Loop_Invariant and Loop_Variant appear consecutively.
8500 * gnat_rm.texi Update documentation of Loop_Invariant and
8501 Loop_Variant pragmas.
8503 2014-02-19 Robert Dewar <dewar@adacore.com>
8505 * debug.adb: Document -gnatd.X.
8506 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
8508 (Check_Then_Column): Ditto.
8509 * styleg.adb (Check_Then): Allow THEN on line after IF.
8510 (Check_Then): Check THEN placement under control of -gnatd.X
8511 * styleg.ads (Check_Then): Now called even if THEN is not first
8513 * stylesw.ads (Style_Check_If_Then_Layout): Document new
8515 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
8517 2014-02-19 Robert Dewar <dewar@adacore.com>
8519 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
8520 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
8521 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
8522 vms_conv.adb: Fix bad layout of IF statements
8524 2014-02-19 Robert Dewar <dewar@adacore.com>
8526 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
8528 2014-02-19 Robert Dewar <dewar@adacore.com>
8530 * exp_util.adb: Update comments.
8532 2014-02-19 Doug Rupp <rupp@adacore.com>
8534 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
8535 * init.c (__gl_float_format): [VMS] New global.
8536 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
8537 representation in effect.
8539 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8541 * exp_ch6.adb Add with and use clause for Exp_Prag.
8542 (Expand_Contract_Cases): Relocated to Exp_Prag.
8543 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
8544 * exp_prag.adb Add with and use clauses for Checks and Validsw.
8545 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
8546 structure of the expanded code to showcase the evaluation of
8547 attribute 'Old prefixes. Add local variable Old_Evals. Expand
8548 any attribute 'Old references found within a consequence. Add
8549 circuitry to evaluate the prefixes of attribute 'Old that
8550 belong to a selected consequence.
8551 (Expand_Old_In_Consequence): New routine.
8552 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
8553 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
8554 potentially unevaluated prefix is always evaluated.
8556 2014-02-19 Robert Dewar <dewar@adacore.com>
8558 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
8559 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
8560 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
8561 handling for the case of Modify_Tree_For_C, this approach did
8563 * exp_util.adb (Matching_Standard_Type): New function
8564 (Side_Effect_Free): New top level functions (from
8565 Remove_Side_Effects).
8566 * exp_util.ads (Side_Effect_Free): New top level functions
8568 * sinfo.ads: Minor comment updates.
8570 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8572 * exp_ch6.adb (Expand_Simple_Function_Return): If return
8573 type is unconstrained and uses the secondary stack, mark the
8574 enclosing function accordingly, to ensure that the value is not
8575 prematurely removed.
8577 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8579 * par.adb Alphabetize the routines in Par.Sync.
8580 (Resync_Past_Malformed_Aspect): New routine.
8581 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
8582 variables. Code and comment reformatting. Detect missing
8583 parentheses on aspects [Refined_]Global and [Refined_]Depends
8584 with a non-null definition.
8585 * par-sync.adb: Alphabetize all routines in this separate unit.
8586 (Resync_Past_Malformed_Aspect): New routine.
8588 2014-02-19 Robert Dewar <dewar@adacore.com>
8590 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
8591 if Esize values do not match.
8593 2014-02-19 Yannick Moy <moy@adacore.com>
8595 * sinfo.ads: Minor comment update.
8597 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8599 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
8601 2014-02-19 Thomas Quinot <quinot@adacore.com>
8603 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
8604 that has the No_Ctrl_Actions flag is a suitable node to be
8605 wrapped if the assigned expression has no finalization actions.
8606 * sem_eval.adb (Eval_Entity_Name): For a compile time known
8607 boolean value, mark the corresponding condition SCO as constant.
8609 2014-02-19 Robert Dewar <dewar@adacore.com>
8611 * exp_util.adb: Minor reformatting.
8612 * exp_util.ads (Matching_Standard_Type): New function.
8613 * exp_ch7.adb: Minor reformatting.
8615 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8617 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
8618 to find declaration for Cursor, to handle properly the case of
8619 a discriminated iterable type.
8621 2014-02-19 Vincent Celier <celier@adacore.com>
8623 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
8624 imported library projects with the library ALI dirs, when setting
8626 * prj-env.ads (Ada_Objects_Path): Correct comments about
8627 argument Including_Libraries.
8629 2014-02-19 Gary Dismukes <dismukes@adacore.com>
8631 * gnat_rm.texi: Minor spelling fixes.
8633 2014-02-19 Doug Rupp <rupp@adacore.com>
8635 * init.c: Remove unneeded code.
8636 * fe.h (Float_Format): New macro
8637 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
8639 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8641 * sem_prag.adb (Check_Refined_Global_Item):
8642 A state or variable acts as a constituent only it is part of an
8643 encapsulating state and the state has visible refinement.
8645 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8647 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
8648 postcondition for a function when the expression does not mention
8649 'Result but the function has in-out parameters.
8651 2014-02-19 Robert Dewar <dewar@adacore.com>
8653 * gnat_rm.texi: Add documentation on Value_Size forcing biased
8656 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8658 * lib-xref.ads Remove the small table of letter and symbol usage as we
8661 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8663 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
8664 messages depending on the offending misplaced aspect specifications.
8665 (Diagnose_Misplaced_Aspect_Specifications): New routine.
8667 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8669 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
8670 for iterable aspect primitives.
8671 (Resolve_Iterable_Operation): Use expected signature of iterable
8672 aspect to resolve primitive when overloading is present.
8673 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
8674 (Check_Signature): Removed.
8676 2014-02-19 Yannick Moy <moy@adacore.com>
8678 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
8679 subunit in GNATprove_Mode.
8680 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
8682 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8684 * lib-xref.ads Alphabetize the contents of table
8685 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
8686 for E_Abstract_State. List all letters and symbols in use.
8687 * sem_prag.adb (Analyze_Abstract_State): Update all calls
8688 to Create_Abstract_State to reflect the new signature.
8689 (Create_Abstract_State): Change subprogram profile and update
8690 the comment on usage. Use the proper location of the state
8691 declaration when creating a new abstract state entity. Do not
8692 generate an external name, but simply reuse the name coming from
8693 the state declaration.
8695 2014-02-19 Robert Dewar <dewar@adacore.com>
8697 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
8698 declarations get properly inserted in Modify_Tree_For_C mode.
8699 * sinfo.ads: Minor comment addition.
8701 2014-02-19 Robert Dewar <dewar@adacore.com>
8703 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
8704 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
8706 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8708 * style.adb (Missing_Overriding): Warning does not apply in
8709 language versions prior to Ada 2005.
8710 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
8711 * sem_attr.adb: Add Attribute_Iterable where needed.
8712 * exp_attr.adb: ditto.
8713 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
8714 handle loops and quantified expressions over types that have an
8715 iterable aspect. Called from Expand_Iterator_Loop.
8716 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
8717 with Iterable aspect.
8718 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
8719 subprograms specified in the Iterable aspect have the proper
8720 signature involving container and cursor.
8721 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
8722 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
8723 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
8724 New procedure to retrieve one of the primitives First, Last,
8725 or Has_Element, from the value of the iterable aspect of a
8727 (Is_Container_Element): Predicate to recognize expressions
8728 that denote an element of one of the predefined containers,
8729 for possible optimization. This subprogram is not currently
8730 used, pending ARG discussions on the legality of the proposed
8731 optimization. Worth preserving for eventual use.
8732 (Is_Iterator): Recognize formal container types.
8733 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
8735 2014-02-19 Robert Dewar <dewar@adacore.com>
8737 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
8738 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
8739 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
8740 declarations from list of actions.
8741 * output.ads, output.adb (Delete_Last_Char): New procedure.
8742 * sinfo.ads: Document handling of Mod and expression with actions
8743 in Modify_Tree_For_C mode.
8745 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8747 * par-ch9.adb (P_Task): Add a null statement to produce a
8748 well-formed task body when due to a previous syntax error the
8749 statement list is empty.
8751 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8753 * sem_prag.adb (Check_Dependency_Clause): Account
8754 for the case where a state with a non-null refinement matches a
8755 null output list. Comment reformatting.
8756 (Inputs_Match): Copy a solitary input to avoid an assertion failure
8757 when trying to match the same input in multiple clauses.
8759 2014-02-19 Gary Dismukes <dismukes@adacore.com>
8761 * sem_attr.adb: Minor typo fix.
8763 2014-02-18 Robert Dewar <dewar@adacore.com>
8765 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
8766 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
8767 (Create_Standard): Create new unsigned types.
8768 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
8769 mode (Expand_N_Reference): Removed, problematic and not needed
8771 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
8773 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
8774 * expander.adb: Remove call to Expand_N_Reference (problematic,
8775 and not needed now).
8776 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
8777 * stand.adb: Read and write unsigned type entities.
8778 * stand.ads: Add new unsigned types.
8780 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
8782 * sem_ch4.adb (Analyze_Call): Do not mark a function call
8783 as being inside an assertion expression as the flag is now removed.
8784 (Check_Ghost_Subprogram_Call): Do not query the
8785 In_Assertion_Expression flag as it is now removed, instead use
8786 a predicate function.
8787 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
8788 In_Assertion_Expression flag as it is now removed, instead use
8789 a predicate function.
8790 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
8791 * sem_util.adb Add with and use clause for Sem_Prag.
8792 (In_Assertion_Expression_Pragma): New routine.
8793 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
8794 * sinfo.adb (In_Assertion_Expression): Removed.
8795 (Set_In_Assertion_Expression): Removed.
8796 * sinfo.ads Remove flag In_Assertion_Expression along with its
8798 (In_Assertion_Expression): Removed along with
8799 pragma Inline. (Set_In_Assertion_Expression): Removed along
8802 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
8804 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
8805 used together with '-r', '-rf' or '-rnb' options.
8807 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
8809 * sem_attr.adb (Analyze_Attribute): Comment
8810 and code reformatting. Use separate routines to check the
8811 legality of attribute 'Old in certain pragmas. Verify
8812 the use of 'Old, 'Result and locally declared entities
8813 within the prefix of 'Old.
8814 (Check_References_In_Prefix): New routine.
8815 (Check_Use_In_Contract_Cases): New routine.
8816 (Check_Use_In_Test_Case): New routine.
8818 2014-02-18 Vincent Celier <celier@adacore.com>
8820 * sem_aux.adb (Is_By_Reference_Type): For each components of
8821 a record type, check also if the component is volatile as it
8822 may have an aspect that makes it volatile. If it is, then the
8823 record type is a by reference type.
8825 2014-02-18 Robert Dewar <dewar@adacore.com>
8827 * exp_attr.adb: Minor reformatting.
8828 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
8829 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
8830 as another case where we don't generate N_Reference nodes for
8832 * expander.adb (Expand): Add call to Expand_N_Reference.
8834 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8836 * sem_prag.adb (Analyze_Refined_Pragma): Remove
8837 local variable Pack_Spec. Refinement pragmas may now apply to
8838 bodies of both visible and private subprograms.
8840 2014-02-06 Robert Dewar <dewar@adacore.com>
8842 * exp_attr.adb (Expand_Loop_Entry_Attribute):
8843 Minor change (Attr => N) (Expand_Pred_Succ): New name
8844 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
8845 Max): Expand into if expression if Modify_Tree_For_C mode.
8846 (Expand_N_Attribute_Reference, case Min): ditto
8847 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
8850 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8852 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
8853 predicate check if this is an internal declaration with
8854 No_Initialization set, as for an expanded aggregate component.
8856 2014-02-06 Doug Rupp <rupp@adacore.com>
8858 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
8859 conditions with severity of "SUCCESS" or "INFORMATIONAL".
8861 2014-02-06 Yannick Moy <moy@adacore.com>
8863 * sem_prag.adb (Analyze_Pragma): Analyze pragma
8864 Debug rewritten node before rewriting it as a null statement in
8867 2014-02-06 Robert Dewar <dewar@adacore.com>
8869 * sem_attr.adb (Min_Max): New procedure.
8870 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
8873 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
8875 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
8878 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8880 * sem_prag.adb (Analyze_Abstract_State): Update
8881 all calls to Create_Abstract_State to pass the proper state
8883 (Create_Abstract_State): Add new formal parameter
8884 State_Decl along with comment on usage. Establish a link between
8885 the abstract state entity and the state declaration.
8887 2014-02-06 Robert Dewar <dewar@adacore.com>
8889 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
8890 comparison of unordered enumeration type.
8891 (Analyze_Attribute, case Max): Check for improper comparison of
8892 unordered enumeration type.
8893 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
8895 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
8896 Moved here from Sem_Res.
8898 2014-02-06 Robert Dewar <dewar@adacore.com>
8900 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
8903 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8905 * sem_ch6.adb (Process_Formals): Error message reformatting.
8907 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8909 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
8910 variable Spec. Do not inherit the null indicator from the
8911 subprogram body when generating the spec.
8913 2014-02-06 Robert Dewar <dewar@adacore.com>
8915 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
8918 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8920 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
8921 when the function has a foreign convention, but not if only the
8922 limited return type has such a convention.
8924 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8926 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
8927 variable Spec. Comment reformatting. Use Copy_Separate_Tree
8928 rather than New_Copy_Tree when building the corresponding
8929 subprogram declaration.
8931 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8933 * sem_prag.adb (Analyze_Global_Item): Remove
8934 the mode-related checks on abstract states with enabled external
8936 (Property_Error): Removed.
8938 2014-02-06 Javier Miranda <miranda@adacore.com>
8940 * lib-xref.adb (Generate_Reference): When
8941 generating the reference to the first private entity take care
8942 of handling swapped entities.
8944 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
8946 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
8949 2014-02-06 Robert Dewar <dewar@adacore.com>
8951 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
8952 than the word size when operating in Modify_Tree_For_C mode.
8953 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
8955 2014-02-06 Robert Dewar <dewar@adacore.com>
8957 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
8958 compare is case insensitive.
8959 * gnat_rm.texi: Document that string compare for Warnings Off
8960 is now case insensitive.
8962 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
8964 * gnat_rm.texi: Small wording tweak.
8966 2014-02-06 Pascal Obry <obry@adacore.com>
8968 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
8969 and Included_Artifact_Patterns attribute definitions.
8971 2014-02-06 Yannick Moy <moy@adacore.com>
8973 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
8974 SPARK_Mode pragma component for all subprograms, including stubs.
8976 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8978 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
8979 the configuration options of the enclosing context in a
8981 (Analyze_Subprogram_Body_Stub): Maintain the
8982 configuration options of the enclosing context in a stack-like
8985 2014-02-06 Robert Dewar <dewar@adacore.com>
8987 * debug.adb: -gnatd.u sets Modify_Tree_For C
8988 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
8989 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
8990 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
8991 * exp_intr.adb (Expand_Shift): Call expander so we do
8992 Modify_Tree_For_C expansions.
8993 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
8996 2014-02-06 Fedor Rybin <frybin@adacore.com>
8998 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
8999 after the phase 1 of the processing of each aggregated project
9000 to get access to project trees of aggregated projects.
9001 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
9002 If specified, On_New_Tree_Loaded is called after each aggregated
9003 project has been processed succesfully.
9004 (Process): new parameter On_New_Tree_Loaded.
9005 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
9006 callback added after processing of each aggregated project.
9007 (Recursive_Process): new parameter On_New_Tree_Loaded.
9008 (Process): new parameter On_New_Tree_Loaded.
9009 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
9010 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
9012 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
9015 2014-02-06 Bob Duff <duff@adacore.com>
9017 * gnat_ugn.texi: Implement --insert-blank-lines and
9018 --preserve-blank-lines switches.
9020 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
9022 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9025 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
9027 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
9028 of the pragma on individual objects.
9030 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9032 * einfo.adb Node29 is now used as BIP_Initialization_Call.
9033 (BIP_Initialization_Call): New routine.
9034 (Set_BIP_Initialization_Call): New routine.
9035 (Write_Field29_Name): Add an entry for constants and variables.
9036 * einfo.ads Add new attribute BIP_Initialization_Call and update
9038 (BIP_Initialization_Call): New routine along with pragma Inline.
9039 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
9040 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9041 Add local declaration Res_Decl. Capture the build-in-place
9042 initialization call when the related object declaration has
9043 created a transient block.
9044 * exp_ch7.adb (Process_Transient_Objects): Add local variable
9045 Fin_Insrt. Recognize a scenario where an object declaration acts
9046 as a transient context and is initialized by a build-in-place
9049 2014-02-06 Pascal Obry <obry@adacore.com>
9051 * prj-util.adb (For_Interface_Sources): Fix handling of required
9052 bodies for aggregate libs.
9054 2014-02-06 Robert Dewar <dewar@adacore.com>
9056 * nlists.ads: Minor comment clarifications.
9058 2014-02-06 Robert Dewar <dewar@adacore.com>
9060 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
9062 * opt.ads (Modify_Tree_For_C): New flag.
9063 * output.ads, output.adb (Last_Char): New function.
9065 2014-02-06 Pascal Obry <obry@adacore.com>
9067 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
9068 share/gpr for cross-builds.
9070 2014-02-06 Robert Dewar <dewar@adacore.com>
9072 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
9073 Minor reformatting and code clean ups.
9075 2014-02-06 Pascal Obry <obry@adacore.com>
9077 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
9078 * prj.ads: Minor typo fix in comment.
9080 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9082 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
9083 local variable Expr. Flag clauses with extra parenthesis as this
9084 is not allowed by the syntax of the pragma. Code reformatting.
9086 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9088 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
9089 variables. Rename variabme Tnn to Temp. Do not create a temporary
9090 if assertions are disabled. Find enclosing routine _Postconditions
9091 and insert the temporary that captures the value of the prefix
9093 * exp_ch6.adb (Build_Postconditions_Procedure):
9094 Insert the generated _Postconditions routine
9095 before the first source declaration of the related
9097 (Insert_After_Last_Declaration): Removed.
9098 (Insert_Before_First_Source_Declaration): New routine.
9100 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9102 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
9103 Utility to determine whether current expansion is for the body
9104 of a predefined primitive operation.
9105 (Make_Predicate_Check): Use Within_Internal_Subpgram
9106 * checks.adb (Apply_Predicate_Check): Use
9107 Within_Internal_Subprogram
9108 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
9110 2014-02-06 Pascal Obry <obry@adacore.com>
9112 * prj.ads, prj-util.adb: Minor reformatting.
9114 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9116 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
9117 Take into account the Split_PPC flag to ensure that conjuncts
9118 in a composite postcondition aspect are tested in source order.
9120 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9122 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
9124 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
9125 illegal use of SPARK_Mode.
9126 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
9127 * sem_prag.adb (Analyze_Pragma): Code reformatting.
9128 * sem_util.adb Add with and use clause for Aspects.
9129 (Check_SPARK_Mode_In_Generic): New routine.
9130 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
9132 2014-02-06 Thomas Quinot <quinot@adacore.com>
9134 * a-calend.adb (Formatting_Operations.Split): Ensure that
9135 Time_Error is raised for invalid time values.
9137 2014-02-06 Arnaud Charlet <charlet@adacore.com>
9139 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
9142 2014-02-06 Robert Dewar <dewar@adacore.com>
9144 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
9145 * exp_ch3.adb (Build_Dcheck_Function): Set
9146 Is_Discriminant_Check_Function.
9148 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9150 * exp_ch7.adb (Is_Subprogram_Call): Inspect
9151 the original tree in certain cases where a construct has been
9152 factored out and replaced by a reference to a temporary.
9154 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9156 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
9157 parameters when propagating predicate function to full view.
9158 (Find_Type_Of_Object): Freeze base type of object type to catch
9159 premature use of discriminated private type without a full view.
9161 2014-02-06 Robert Dewar <dewar@adacore.com>
9163 * sprint.adb: Minor reformatting.
9165 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9167 * exp_ch4.adb (Process_Transient_Object): Add local variable
9168 Temp_Ins. When the transient object is initialized by an
9169 aggregate, the hook must capture the object after the last
9170 component assignment takes place.
9171 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
9172 routine Is_Subprogram_Call.
9173 (Is_Subprogram_Call): Inspect an
9174 aggregate that has been heavily expanded for subprogram calls.
9175 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
9176 and Temp_Ins. Remove the nested declare block and adjust the
9177 indentation. When the transient object is initialized by an
9178 aggregate, the hook must capture the object after the last
9179 component assignment takes place.
9181 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9183 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
9184 external states with enabled properties that do not match the
9186 (Property_Error): New routine.
9187 * sem_res.adb (Property_Error): New routine.
9188 (Resolve_Actuals): Detect illegal uses of external variables with
9189 enabled properties in procedure calls that do not match the mode of
9190 the corresponding formal parameter.
9192 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9194 * sem_util.adb (Has_Enabled_Property): Rename
9195 formal parameter Prop_Nam to Property. Update the comment on usage
9196 and all occurrences in the body. Add local variable Prop_Nam. When
9197 inspecting a property with an expression, the property name
9198 appears as the first choice of the component association.
9200 2014-02-04 Robert Dewar <dewar@adacore.com>
9202 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
9204 2014-02-04 Gary Dismukes <dismukes@adacore.com>
9206 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
9207 for consistency with other messages.
9209 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9211 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
9212 iterator, indicate that the element is a constant if the container
9213 type does not have a variable indexing aspect.
9214 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
9215 marked as constant, do not reset its Ekind, to ensure that
9216 container elements in an element loop are not modified if the
9217 container (e.g. a hashed set) only has a constant indexing aspect.
9219 2014-02-04 Arnaud Charlet <charlet@adacore.com>
9221 * g-souinf.ads: Subprograms in this unit are actually not pure.
9222 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
9223 * einfo.ads (Is_Pure): Update doc to match implementation.
9225 2014-02-04 Gary Dismukes <dismukes@adacore.com>
9227 * exp_ch13.adb: Minor spelling fix.
9229 2014-02-04 Robert Dewar <dewar@adacore.com>
9231 * opt.ads: Minor comment update.
9233 2014-02-04 Robert Dewar <dewar@adacore.com>
9235 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
9238 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9240 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
9241 on null expressions if component type is non-null, when the
9242 corresponding association covers an empty range of index values.
9244 2014-02-04 Robert Dewar <dewar@adacore.com>
9246 * sinfo.ads: Further comments on N_Expression_With_Actions node.
9248 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
9250 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
9251 variables Out_Items and Ref_Global. Remove local constant
9252 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
9253 and D8. Remove the useless collection of global items as this
9254 was a leftover from an earlier version of the routine. Move
9255 several routines out to avoid deep nesting and indentation.
9256 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
9257 parameter Do_Checks to Post_Errors. Update the comment on usage.
9258 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
9259 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
9260 to Post_Errors. Update the comment on usage. Account for the
9261 case where a self referential state may have a null input_list.
9262 (Is_Self_Referential): New routine.
9264 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9266 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
9267 entity renames an expression, as in the case of an object of
9268 an unconstrained type initialized by a function call, defer the
9269 rewriting of the expression to the expander.
9270 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
9271 'Alignment): If the entity renames an expression, introduce
9272 temporary to capture value, and rewrite original declaration to
9275 2014-02-04 Gary Dismukes <dismukes@adacore.com>
9277 * g-comlin.adb: Minor typo fix.
9279 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9281 * freeze.adb (Freeze_All): Types derived from a formal
9282 access_to_classwide type do not have a finalization master.
9284 2014-02-04 Robert Dewar <dewar@adacore.com>
9286 * sprint.adb: Minor reformatting.
9288 2014-02-04 Robert Dewar <dewar@adacore.com>
9290 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
9291 cases where Actions is a null list.
9292 * sinfo.ads (N_Expression_With_Actions): Actions can be
9293 temporarily empty during semantic analysis, but must be non-empty
9294 in the final expanded tree.
9296 2014-01-31 Robert Dewar <dewar@adacore.com>
9298 * exp_ch9.adb: Minor reformatting.
9300 2014-01-31 Emmanuel Briot <briot@adacore.com>
9302 * g-comlin.adb (Set_Command_Line): Take the switches
9303 configuration from the Command_Line_Config.
9305 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9307 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
9310 2014-01-31 Vincent Celier <celier@adacore.com>
9312 * projects.texi: Add more documentation about others used as an
9313 index in indexed attributes.
9315 2014-01-31 Robert Dewar <dewar@adacore.com>
9317 * gnat_ugn.texi: Minor update.
9318 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
9319 * exp_util.adb: Minor reformatting.
9321 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9323 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
9324 depends on data that is not private to the protected object,
9325 and potentially modifiable in unsynchronized fashion.
9327 2014-01-31 Yannick Moy <moy@adacore.com>
9329 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
9332 2014-01-31 Robert Dewar <dewar@adacore.com>
9334 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
9335 for Unknown_Package.
9336 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
9338 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9340 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
9341 the logic that generates a runtime check to determine the
9342 controlled status of the object about to be allocated or
9343 deallocated. Class-wide types now always use a runtime check
9344 even if they appear as generic actuals.
9345 (Find_Object): Detect
9346 a special case that involves interface class-wide types because
9347 the object appears as a complex expression.
9349 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9351 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
9352 subprogram with an incomplete untagged formals on the list of
9353 private dependents, to verify that the type is properly completed
9354 in the private part.
9355 * sem_attr.adb: Code clean up.
9357 2014-01-31 Robert Dewar <dewar@adacore.com>
9359 * exp_ch6.adb: Minor reformatting.
9361 2014-01-31 Vincent Celier <celier@adacore.com>
9363 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
9364 when Pkg is unknown.
9366 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9368 * sem_res.adb (Resolve_Entity_Name): Comment
9369 reformatting. Allow volatile objects in various generated checks.
9371 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9373 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
9374 component association, set the etype of the identifier, for
9377 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9379 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
9380 declared in a package, not checks can apply to the subprogram.
9382 2014-01-31 Robert Dewar <dewar@adacore.com>
9384 * erroutc.adb (Validate_Specific_Warnings): Warnings are
9385 controlled -gnatw.W.
9386 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
9387 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
9389 2014-01-31 Arnaud Charlet <charlet@adacore.com>
9391 * exp_disp.adb: Update comments.
9393 2014-01-31 Yannick Moy <moy@adacore.com>
9395 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9396 Save_Global_References): Guard access to expression in aspect.
9398 2014-01-31 Yannick Moy <moy@adacore.com>
9400 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
9401 Issue an error when the pragma is applied to a generic unit,
9402 a generic declaration, or inside a generic.
9404 2014-01-31 Yannick Moy <moy@adacore.com>
9406 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
9409 2014-01-31 Robert Dewar <dewar@adacore.com>
9411 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
9414 2014-01-31 Tristan Gingold <gingold@adacore.com>
9416 * exp_disp.adb: Add a historic note.
9418 2014-01-31 Robert Dewar <dewar@adacore.com>
9420 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
9421 Process_Deferred_References.
9423 2014-01-31 Yannick Moy <moy@adacore.com>
9425 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
9426 ineffective pragma Warnings(Off) in GNATprove_Mode.
9428 2014-01-31 Bob Duff <duff@adacore.com>
9430 * s-taskin.ads: Minor comment fix.
9431 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
9432 just direct dependents. If this is actually an abort, each task
9433 will take care of aborting its dependents, so all dependents will
9434 get aborted, as before. However, when this is called the second
9435 time from Vulnerable_Complete_Master "for convenience" (i.e. to
9436 kill off tasks waiting at terminate alternatives), aborting
9437 indirect dependents is wrong, because it causes some unrelated
9438 tasks to get aborted.
9440 2014-01-31 Robert Dewar <dewar@adacore.com>
9442 * sem_ch4.adb: Minor reformatting.
9444 2014-01-31 Robert Dewar <dewar@adacore.com>
9446 * exp_ch2.adb: New calling sequence for Is_LHS.
9447 * frontend.adb: Add call to Process_Deferred_References.
9448 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
9449 (Deferred_References): New table.
9450 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
9452 (Find_Expanded_Name): Ditto.
9453 * sem_res.adb: New calling sequence for Is_LHS.
9454 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
9455 * sem_warn.adb: Call Process_Deferred_References before issuing
9458 2014-01-31 Tristan Gingold <gingold@adacore.com>
9460 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
9461 use of System_Tasking_Protected_Objects_Single_Entry.
9462 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
9463 of Protected_Single_Entry_Call.
9464 (Expand_N_Timed_Entry_Call): Remove single_entry case.
9465 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
9467 (Make_Disp_Timed_Select_Body): Likewise.
9468 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
9469 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
9471 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
9472 (Wait_For_Completion_With_Timeout): Remove.
9473 (Protected_Single_Entry_Call): Remove Mode parameter
9474 (always Simple_Call).
9475 (Service_Entry): Remove Self_Id constant (not used anymore).
9476 (Timed_Protected_Single_Entry_Call): Remove.
9477 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
9478 (Protected_Single_Entry_Call): Remove Mode parameter.
9480 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9482 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
9483 * einfo.ads (Get_Pragma): Update the comment on special pragmas
9484 handled by this routine.
9485 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
9486 to the contract of the related subprogram body.
9487 * sem_util.adb (Add_Contract_Item): Handle the insertion of
9488 pragma Refined_Post into the contract of a subprogram body.
9489 * sinfo.ads Update the documentation of node N_Contract.
9490 * sem_res.adb (Resolve_Entity_Name): Add a guard
9491 to detect abstract states and variables only when checking the
9492 SPARK 2014 rules concerning volatile object placement.
9494 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9496 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
9497 null is compatible with any access type.
9499 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9501 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
9502 placement is not in a package.
9504 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9506 * sem_util.adb (Has_Enabled_Property): Compare the character field of
9509 2014-01-29 Robert Dewar <dewar@adacore.com>
9511 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
9512 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
9513 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
9515 2014-01-29 Robert Dewar <dewar@adacore.com>
9517 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
9518 * sem_warn.adb (Check_References): Suppress warnings if inside
9519 Initial_Condition pragma.
9521 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9523 * sem_prag.adb (Check_Missing_Part_Of): List all values of
9524 State_Space_Kind for readability reasons. Do not emit an error on
9525 a private item when the enclosing package lacks aspect/pragma
9526 Abstract_State. Do not emit an error on a private package
9527 instantiation when the corresponding generic template lacks
9529 (Has_Visible_State): New routine.
9530 * sem_util.adb (Find_Placement_In_State_Space): The visible
9531 declarations of any kind of child units in general act as proper
9534 2014-01-29 Robert Dewar <dewar@adacore.com>
9536 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
9537 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
9538 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
9539 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
9540 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
9541 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
9542 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
9543 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
9544 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
9545 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
9546 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
9547 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
9548 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
9549 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
9550 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
9551 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
9552 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
9553 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
9554 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
9555 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
9556 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
9557 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
9558 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
9559 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
9560 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
9561 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
9562 s-regpat.adb, s-secsta.adb, s-stalib.ads,
9563 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
9564 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
9565 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
9566 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
9567 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
9569 2014-01-29 Robert Dewar <dewar@adacore.com>
9571 * expander.adb: Minor reformatting.
9573 2014-01-29 Javier Miranda <miranda@adacore.com>
9575 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
9578 2014-01-29 Javier Miranda <miranda@adacore.com>
9580 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
9581 that checks if an interface types defines the predefined "="
9582 function because the compiler was erroneously not generating the
9583 predefined "=" primitive as soon as the name of some interface
9584 primitive is "=" (formals were not checked).
9586 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9588 * expander.adb (Expander): In GNATprove mode, do not process
9589 transient scopes: they are in general not created in this mode,
9590 and an attempt to examine them will lead to constraint errors when
9591 processing configuration pragmas that have analyzable expressions.
9593 2014-01-29 Vincent Celier <celier@adacore.com>
9595 * clean.adb (Gnatclean): Fail if main project is an aggregate
9596 project or if there is an aggregate library project in the
9598 * gnatcmd.adb: Fail if the main project is an aggregate project
9599 or if there is an aggegate library project in the project tree.
9600 * make.adb (Initialize): : Fail if main project is an aggregate
9601 project or if there is an aggregate library project in the
9603 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
9604 * prj-makr.adb (Initialize): Fail if the main project is an
9605 aggregate project or an aggregate library project.
9607 2014-01-29 Vincent Celier <celier@adacore.com>
9609 * prj-part.adb (Check_Import_Aggregate): New procedure
9610 to check if an imported project is an aggregate project.
9611 (Parse_Single_Project): Call Check_Import_Aggregate
9612 * projects.texi: Document that aggregate projects cannot be
9613 extended or imported.
9615 2014-01-29 Robert Dewar <dewar@adacore.com>
9617 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
9618 reformatting and code clean up.
9619 * gnat_ugn.texi: Add documentation section on Atomic Variables
9622 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9624 * einfo.adb Flag264 is now unused.
9625 (Has_Body_References): Removed.
9626 (Set_Has_Body_References): Removed.
9627 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
9628 * einfo.ads Update the comment on usage of attribute
9629 Body_References. Remove attribute Has_Body_References and its
9631 (Has_Body_References): Removed along with pragma Inline.
9632 (Set_Has_Body_References): Removed along with pragma Inline.
9633 * sem_prag.adb (Analyze_Global_Item): Move the call to
9634 Record_Possible_Body_Reference in the state related checks
9635 section. Add a comment intended function.
9636 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
9637 in the state related checks section. Add a comment intended function.
9638 (Analyze_Refinement_Clause): Cleanup the illegal body reference
9639 reporting. Add a comment on timing of error reporting.
9640 (Record_Possible_Body_Reference): Reimplement the routine.
9642 2014-01-29 Vincent Celier <celier@adacore.com>
9644 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
9645 unit-based languages.
9646 (Mains.Complete_Mains.Do_Complete): Use the source file project
9647 tree when calling Find_File_Add_Extension. Use the correct
9648 project name when reporting an error.
9650 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9652 * aspects.adb Add an entry for aspect Part_Of in table
9654 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
9655 Aspect_Argument, Aspect_Names and Aspect_Delay.
9656 * atree.h Define Elist9.
9657 * atree.adb (Elist9): New routine.
9658 (Set_Elist9): New routine.
9659 * atree.ads (Elist9): New routine.
9660 (Set_Elist9): New routine.
9661 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
9662 the list of node usage. Remove Refined_State from the list of
9664 (Encapsulating_State): New routine.
9666 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
9667 (Refined_State): Removed.
9668 (Set_Encapsulating_State): New routine.
9669 (Set_Part_Of_Constituents): New routine.
9670 (Set_Refined_State): Removed.
9671 (Write_Field9_Name): Add an entry
9672 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
9673 Encapsulating_State. Remove the entry for Refined_State.
9674 * einfo.ads Add new attributes Encapsulating_State
9675 and Part_Of_Constituents alond with their usage in
9676 entities. Remove attribute Refined_State along with its
9678 (Encapsulating_State): New routine and
9679 pragma Inline. (Get_Pragma): Update the comment on usage.
9680 (Part_Of_Constituents): New routine and pragma Inline.
9681 (Refined_State): Removed along with pragma Inline.
9682 (Set_Encapsulating_State): New routine and pragma Inline.
9683 (Set_Part_Of_Constituents): New routine and pragma Inline.
9684 (Set_Refined_State): Removed along with pragma Inline.
9685 * par-prag.adb Pragma Part_Of does not need any special processing
9687 * sem_ch3.adb (Analyze_Declarations): Remove local variables
9688 Body_Id and Prag. Call separate routines to analyze the
9689 contract of a package [body].
9690 (Analyze_Object_Contract):
9691 Update the comment on usage. Remove local variables
9692 Items and Nam. Use Get_Pragma rather than traversing the
9693 classification list. Verify whether the lack of indicator
9694 Part_Of agrees with the placement of the variable in state space.
9695 (Analyze_Object_Declaration): Initialize the encapsulating state
9696 of a variable. (Requires_State_Refinement): Moved to sem_util.
9697 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
9698 (Analyze_Package_Contract): New routine.
9699 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
9700 (Analyze_Package_Contract): New routine.
9701 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
9702 state and Part_Of constituents.
9703 * sem_ch13.adb (Analyze_Aspect_Specifications):
9704 Add processing for aspect Part_Of. Update all
9705 calls to Decorate_Delayed_Aspect_And_Pragma.
9706 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
9707 not need any special processing at freeze time.
9708 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
9709 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
9710 update the associated comment.
9711 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
9712 (Analyze_Abstract_State): Add new global variable State_Id. Remove
9713 local constants Errors and Loc. Remove local variables Is_Null
9714 and State_Nam. Create the entity of the abstract state on the
9715 spot, before all remaining checks are performed. Verify that a
9716 missing Part_Of option agrees with the placement of the abstract
9717 state within the state space.
9718 (Analyze_Depends_In_Decl_Part):
9719 Add new global variables Constits_Seen and States_Seen. Check
9720 that a state and a corresponding constituent do not appear
9721 in pragma [Refined_]Depends.
9722 (Analyze_Global_In_Decl_Part):
9723 Add new global variables Constits_Seen and States_Seen. Check
9724 that a state and a corresponding constituent do not appear
9725 in pragma [Refined_]Global.
9726 (Analyze_Global_Item):
9727 Remove the now obsolete code that deals with Part_Of.
9728 Add the entity of the global item to the list of processed
9729 items. (Analyze_Initializes_In_Decl_Part): Add new global
9730 variables Constits_Seen and States_Seen. Check that a state
9731 and a corresponding constituent do not appear in pragma
9733 (Analyze_Initialization_Item): Add the entity
9734 of the initialization item to the list of processed items.
9735 (Analyze_Input_Item): Add the entity of the initialization
9736 item to the list of processed items.
9737 (Analyze_Input_Output):
9738 Remove the now obsolete code that deals with Part_Of. Add the
9739 entity of the input/output to the list of processed items.
9740 (Analyze_Part_Of): New routine.
9741 (Analyze_Part_Of_Option): Remove
9742 local constant Par_State. Add local constant Encaps and local
9743 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
9744 the option. Turn the related state into a Part_Of constituent
9745 if the option is legal.
9746 (Analyze_Pragma): Add processing
9748 (Analyze_Refined_State_In_Decl_Part):
9749 Remove global constants Pack_Body and Spec_Id. Remove
9750 global variables Abstr_States and Hidden_States. Add new
9751 global variables Available_States, Body_Id, Body_States and
9752 Spec_Id. Add new local constant Body_Decl. Reimplement the
9753 logic that extracts the states available for refinement from
9754 the related package and the body hidden states of the said
9756 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
9757 (Check_Applicable_Policy): Alphabetize body.
9758 (Check_Dependency_Clause): Replace Refined_State
9759 with Encapsulating_State.
9760 (Check_Matching_Constituent):
9761 Reimplement the logic that determines whether an item is a valid
9762 / invalid constituent of the current refined state. Return when
9763 a construct does not denote a valid abstract state. Extract the
9764 list of Part_Of constituents for further analysis. Check that all
9765 Part_Of constituents of a state have been used in its refinement.
9766 (Check_Matching_State): Update the comment on usage. Operate
9767 on the list of available states.
9768 (Check_Missing_Part_Of): New routine.
9769 (Check_Refined_Global_Item): Replace Refined_State
9770 with Encapsulating_State.
9771 (Check_State_And_Constituent_Use): New routine.
9772 (Create_Abstract_State): New routine.
9773 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
9774 (Is_Part_Of): Removed.
9775 (Collect_Body_States): New routine.
9776 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
9777 (Collect_Hidden_States): Removed.
9778 (Report_Unrefined_States): Change the profile of the procedure along
9779 with the comment on usage.
9780 (Report_Unused_Constituents): New routine.
9781 (Report_Unused_Hidden_States): Removed.
9782 (Report_Unused_States): New routine.
9783 * sem_prag.ads (Check_Missing_Part_Of): New routine.
9784 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
9785 appear in the classification pragmas of a package instantiation
9787 (Find_Placement_In_State_Space): New routine.
9788 (Is_Child): Removed.
9789 (Is_Child_Or_Sibling): Remove formal
9790 parameter Private_Child. Remove the private child checks.
9791 (Requires_State_Refinement): Moved from sem_ch3.
9792 * sem_util.ads Add new type State_Space_Kind along with
9793 comment on its usage and values.
9794 (Add_Contract_Item): Update the comment on usage.
9795 (Find_Body_Discriminal): Alphabetize spec.
9796 (Find_Placement_In_State_Space): New routine.
9797 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
9798 and update the comment on usage.
9799 (Requires_State_Refinement): Moved from sem_ch3.
9800 * sinfo.ads: Update the documentation of N_Contract.
9801 * snames.ads-tmpl The predefined name for Part_Of is now used
9802 to denote a pragma. Add Pragma_Id for Part_Of.
9804 2014-01-29 Emmanuel Briot <briot@adacore.com>
9806 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
9808 (Dump): New subprogram.
9810 2014-01-29 Tristan Gingold <gingold@adacore.com>
9812 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
9813 Expand_Entry_Declaration to factorize code.
9815 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9817 * checks.adb: minor clarification.
9818 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
9819 search for primitive operations to the entities that immediately
9820 follow the type declaration.
9822 2014-01-29 Tristan Gingold <gingold@adacore.com>
9824 * exp_ch9.adb (Build_Protected_Entry): Do not call
9825 Complete_Entry_Body anymore.
9826 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
9827 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
9829 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
9831 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
9832 string when the Name input bigger than allowed. Adapt the function
9835 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9837 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
9838 if expression is within a case_expression of if_expression.
9840 2014-01-29 Robert Dewar <dewar@adacore.com>
9842 * exp_ch9.adb, inline.ads: Minor reformatting.
9844 2014-01-29 Tristan Gingold <gingold@adacore.com>
9846 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
9848 2014-01-29 Yannick Moy <moy@adacore.com>
9850 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
9851 SPARK_Mode_Pragma components to be able to analyze generic
9853 * sem_ch12.adb (Analyze_Package_Instantiation,
9854 Inline_Instance_Body, Need_Subprogram_Instance_Body,
9855 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
9856 for future analysis of the instance.
9857 (Instantiate_Package_Body,
9858 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
9859 from instantiation to analyze the instance.
9861 2014-01-29 Robert Dewar <dewar@adacore.com>
9863 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
9866 2014-01-29 Yannick Moy <moy@adacore.com>
9868 * gnat_rm.texi: Update description of SPARK_Mode pragma.
9870 2014-01-29 Tristan Gingold <gingold@adacore.com>
9872 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
9874 2014-01-29 Thomas Quinot <quinot@adacore.com>
9876 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
9878 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9880 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
9881 resulting string is an internal entity. and thus requires no
9882 initialization. This is relevant when Initialize_ Scalars is
9883 enabled, because the resultant spurious initialization may lead to
9884 secondary stack anomalies that produce a mangled name for a task.
9886 2014-01-29 Yannick Moy <moy@adacore.com>
9888 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
9889 not inherited from spec anymore. Check consistency
9890 rules after processing of declarations.
9891 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
9892 from spec anymore. Check consistency rules after processing of
9894 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
9896 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
9899 2014-01-27 Robert Dewar <dewar@adacore.com>
9901 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
9903 (Resolve_Range): Add type name/location to unordered msg.
9905 2014-01-27 Claire Dross <dross@adacore.com>
9907 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
9908 Capacity) is only called with Capacity >= Length (Source) and
9909 Capacity in Capacity_Range.
9910 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
9911 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
9912 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
9913 in the code is this is not the case.
9915 2014-01-27 Thomas Quinot <quinot@adacore.com>
9917 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
9918 selected component in an instance where the component of the
9919 actual is not visibile at instantiation.
9921 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9923 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
9924 has a dynamic predicate, generate freeze node for Actual_Subtype
9925 at once, because the declaration of the corresponding predicate
9926 function will make reference to it.
9928 2014-01-27 Tristan Gingold <gingold@adacore.com>
9930 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
9932 2014-01-27 Robert Dewar <dewar@adacore.com>
9934 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
9935 for 2**X optimization.
9937 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9939 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
9940 explicitly whether value is in range of Character, because the
9941 library is typically compiled with range checks disabled, and
9942 we cannot rely on the implicit check on the argument of 'Val.
9944 2014-01-27 Vincent Celier <celier@adacore.com>
9946 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
9947 not the Target to itself.
9949 2014-01-27 Robert Dewar <dewar@adacore.com>
9951 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
9952 changes to avoid incorrect use of unordered enum types.
9954 2014-01-27 Thomas Quinot <quinot@adacore.com>
9956 * sem_ch4.adb: Minor reformatting.
9958 2014-01-27 Robert Dewar <dewar@adacore.com>
9960 * scn.adb (Check_End_Of_Line): Removed.
9961 (Error_Long_Line): Removed.
9962 (Determine_License): Use versions of above routines from Scanner.
9963 * scng.adb (Check_End_Of_Line): Moved to spec.
9964 (Error_Long_Line): Removed, no longer used.
9965 * scng.ads (Check_End_Of_Line): Moved here from body.
9967 2014-01-27 Tristan Gingold <gingold@adacore.com>
9969 * exp_ch7.adb (Build_Cleanup_Statements): Call
9970 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
9972 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
9973 Remove Service_Name variable.
9974 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
9975 factorize code from the above subprograms.
9976 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
9978 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
9980 * einfo.adb (Has_Option): Reimplemented.
9981 * sem_prag.adb (Analyze_Refinement_Clause): Add global
9982 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
9983 External_Constit_Seen and State. Add local variables Body_Ref,
9984 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
9985 avoid a cumbersome while pool. Verify the legality of an external
9986 state and relevant properties.
9987 (Check_External_Property): New routine.
9988 (Check_Matching_State): Remove parameter profile
9989 and update comment on usage.
9990 (Collect_Constituent): Store the
9991 relevant external property of a constituent.
9992 * sem_util.adb (Async_Readers_Enabled): Update the call to
9993 Has_Enabled_Property.
9994 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
9995 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
9996 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
9997 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
9998 Update comment on usage. Reimplement the logic to recognize the various
9999 formats of properties.
10001 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10003 * par-ch5.adb: Minor reformatting.
10005 2014-01-27 Tristan Gingold <gingold@adacore.com>
10007 * s-tposen.ads: Harmonize style and comments.
10009 2014-01-27 Vincent Celier <celier@adacore.com>
10011 * projects.texi: Document that shared library projects, by
10012 default, cannot import projects that are not shared library
10015 2014-01-27 Robert Dewar <dewar@adacore.com>
10017 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
10020 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10022 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
10023 any other exception is raised.
10024 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
10025 still necessary to perform a conversion in order to remove overlong
10028 2014-01-27 Robert Dewar <dewar@adacore.com>
10030 * exp_smem.adb: Minor reformatting.
10032 2014-01-27 Thomas Quinot <quinot@adacore.com>
10034 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
10036 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10038 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
10039 nodes for operands to the original node for the call, to preserve
10040 Original_Node pointers within the resolved operands, given that
10041 they may have been rewritten as well. Previous approach copied
10042 the operands into a new tree and lost those pointers.
10044 2014-01-27 Claire Dross <dross@adacore.com>
10047 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
10049 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10051 * sem_util.adb (Check_Internal_Protected_Use): A call through
10052 an anonymous access parameter of the current protected function
10053 is not a potential modification of the current object.
10055 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10057 * a-cobove.adb (Reserve_Capacity): Procedure raises
10058 Capacity_Error, not Constraint_Error, when request cannot be
10061 2014-01-27 Vincent Celier <celier@adacore.com>
10063 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
10064 not the Target to itself.
10066 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10068 * exp_ch4.adb (Expand_Concatenate): If the target of the
10069 concatenation is a library-level entity, always use the off-line
10070 version of concatenation, regardless of optimization level. This
10071 is space-efficient, and prevents linking problems when some
10072 units are compiled with different optimization levels.
10074 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10076 * sem_ch5.adb: Code clean up.
10078 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10080 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
10081 when an array or container iterator includes a subtype indication,
10082 which is only legal in an element iterator.
10084 2014-01-27 Thomas Quinot <quinot@adacore.com>
10086 * exp_ch7.adb: Minor reformatting.
10088 2014-01-27 Robert Dewar <dewar@adacore.com>
10090 * opt.adb (SPARK_Mode): Default for library units is None rather
10092 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
10094 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
10096 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
10098 2014-01-27 Robert Dewar <dewar@adacore.com>
10100 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
10101 Suspicious_Labels table if we have identifier; followed by loop
10103 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
10104 * par.adb (Suspicious_Labels): New table.
10106 2014-01-27 Robert Dewar <dewar@adacore.com>
10108 * exp_aggr.adb (Check_Bounds): Reason is range check, not
10111 2014-01-27 Yannick Moy <moy@adacore.com>
10113 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
10115 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
10117 (Add_SPARK_Xrefs): Include references to constants.
10118 * spark_xrefs.ads Document new character 'c' for references to
10121 2014-01-27 Thomas Quinot <quinot@adacore.com>
10123 * exp_smem.adb (Add_Write_After): For a function call, insert write as
10124 an after action in a transient scope.
10126 2014-01-27 Thomas Quinot <quinot@adacore.com>
10128 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
10129 to a shared variable as an OUT formal in a call to an init proc,
10130 the 'Read call must be emitted after, not before, the call.
10132 2014-01-27 Robert Dewar <dewar@adacore.com>
10134 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
10136 2014-01-27 Robert Dewar <dewar@adacore.com>
10138 * a-wichha.adb (Character_Set_Version): Change to output proper
10141 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
10143 * einfo.adb (Is_Input_Only_State): Removed.
10144 (Is_Non_Volatile_State): Removed.
10145 (Is_Output_State): Removed.
10146 * einfo.ads (Is_Input_Only_State): Remove attribute and
10147 subprogram. Update related entity.
10148 (Is_Non_Volatile_State):
10149 Remove attribute and subprogram. Update related entity.
10150 (Is_Output_State): Removed attribute and subprogram. Update
10152 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
10154 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
10155 an object, not just variables.
10156 (Analyze_Object_Contract): New routine.
10157 (Analyze_Variable_Contract): Removed.
10158 (Process_Discriminants): Detect an illegal use of volatile
10159 discriminant in SPARK mode.
10160 * sem_ch5.adb (Analyze_Iterator_Specification):
10161 Detect an illegal use of volatile loop variable.
10162 (Analyze_Loop_Parameter_Specification): Detect an illegal use
10163 of volatile loop variable.
10164 * sem_ch6.adb (Process_Formals): Update the volatile object
10165 detection. Detect an illegal formal of mode IN OUT or OUT in
10166 SPARK mode. Enhance the error messages with references.
10167 * sem_ch12.adb (Instantiate_Object): Update the volatile object
10168 detection. Enhance the error messages with references.
10169 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
10170 messages with references.
10171 (Analyze_Contract_Case): Enhance the error messages with references.
10172 (Analyze_External_Property): Call Check_Duplicate_Property to process
10173 an external property.
10174 (Analyze_External_Property_In_Decl_Part): New routine.
10175 (Analyze_External_State_In_Decl_Part): Removed.
10176 (Analyze_Global_Item): Detect an illegal
10177 use of a volatile constant. Detect an illegal use
10178 of a variable with enabled Effective_Reads. Enhance
10179 the error messages with references. Remove obsolete
10180 checks concerning Input_Only and Output_Only states.
10181 (Analyze_Initialization_Item): Enhance the error messages
10183 (Analyze_Initializes_In_Decl_Part): Do not
10184 collect the states and variables when the initialization list
10186 (Analyze_Input_Item): Enhance the error messages with references.
10187 (Analyze_Input_Output): Enhance the error messages with references.
10188 (Analyze_Pragma): Enhance the error messages with references.
10189 (Analyze_Refinement_Clause): Code reformatting.
10190 (Analyze_Refined_Depends_In_Decl_Part):
10191 Rename global variable Global to Reg_Global and update all
10192 occurrences. Add local variables D7 and D8. Update the error
10193 messages with references. Update the call to Collect_Global_Items.
10194 (Analyze_Refined_Global_In_Decl_Part): Add local variables
10195 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
10196 the call to Collect_Global_Items. Account for a Proof_In state
10197 in null / useless refinement checks. Verify the coverage of
10199 (Check_Dependency_Clause): Remove local variable
10200 Out_Constits. Remove the retrieval and removal of constituents
10201 for an Output_Only state. Remove the reporting of unused
10202 Output_Only state constituents.
10203 (Check_Duplicate_Mode): Enhance
10204 the error message with a reference.
10205 (Check_Duplicate_Property): New routine.
10206 (Check_Duplicate_Option): Enhance the error message with a reference.
10207 (Check_External_Properties): Enhance the error message with a reference.
10208 (Check_Function_Return): Enhance the error message with a reference.
10209 (Check_In_Out_States): Update
10210 comment on usage. Add a specialized error message for Proof_In
10211 constituents. Enhance the error message with a reference.
10212 (Check_Input_States): Update comment on usage. Account for
10213 possible Proof_In constituents. Enhance the error message
10215 (Check_Matching_Constituent): Enhance the error message with a
10217 (Check_Matching_State): Enchance the error message with a reference.
10218 (Check_Mode): Add local variable From_Global. Update the call to
10219 Find_Mode. Emit more precise error messages concerning extra items
10220 (Check_Mode_Restriction_In_Enclosing_Context): Consider
10221 pragma Refined_Global. Enhance the error message with a
10223 (Check_Mode_Restriction_In_Function): Enhance the error message with
10225 (Check_Output_States): Update comment on usage. Add local variable
10226 Posted. Account for possible Proof_In constituents. Produce a detailed
10227 list of missing constituents.
10228 (Check_Proof_In_States): New routine.
10229 (Check_Refined_Global_Item): Handle Proof_In
10230 constituents. Enchance the error message with a reference.
10231 (Collect_Global_Items): Add formal parameters Proof_In_Items
10232 and Has_Proof_In_State. Update the comment on usage. Account
10233 for Proof_In items.
10234 (Create_Or_Modify_Clause): Enchance
10235 the error message with a reference.
10237 formal parameter From_Global. Update the comment on usage.
10238 Detect when the mode is governed by pragma [Refined_]Global.
10239 (Output_Constituents): Removed.
10240 (Report_Extra_Constituents):
10241 Report extra Proof_In constituents.
10242 (Report_Unused_Constituents): Removed.
10243 (Usage_Error): Code reformatting. Enhance the error
10244 messages with reference.
10245 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
10246 (Analyze_External_State_In_Decl_Part): Removed.
10247 * sem_res.adb (Resolve_Actuals): Update the volatile object
10248 detection. Enhance the error message with a reference.
10249 (Resolve_Entity_Name): Update the volatile object
10250 detection. Enhance the error message with a reference.
10251 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
10252 (Is_SPARK_Volatile_Object): New routine.
10253 (Has_Volatile_Component): New routine.
10254 * sem_util.ads (Is_Delegate): Alphabetized.
10255 (Is_SPARK_Volatile_Object): New routine.
10256 (Has_Volatile_Component): New routine.
10257 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
10259 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10261 * sem_attr.adb: Resolve fully prefix of 'Update.
10263 2014-01-27 Ben Brosgol <brosgol@adacore.com>
10265 * gnat_rm.texi: Minor clarifications.
10267 2014-01-27 Robert Dewar <dewar@adacore.com>
10269 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
10270 about call that is generated as part of an Initial_Condition
10272 * sem_prag.adb: Minor spelling correction.
10274 2014-01-27 Robert Dewar <dewar@adacore.com>
10276 * sem_prag.adb (Set_Convention_From_Pragma): Check that
10277 convention Ghost can only apply to functions.
10278 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
10280 2014-01-27 Robert Dewar <dewar@adacore.com>
10282 * gnat_ugn.texi: Add Short_Enums to documentation of
10285 2014-01-27 Robert Dewar <dewar@adacore.com>
10287 * sem_prag.adb (Analyze_Input_Item): Correct check for input
10288 item in same package.
10289 * sem_util.ads, sem_util.adb (Within_Scope): New function.
10291 2014-01-26 Arnaud Charlet <charlet@adacore.com>
10293 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
10294 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
10295 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
10296 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
10299 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
10301 * gcc-interface/Makefile.in: Fix oversight.
10303 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
10305 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
10306 conversion from a thin pointer with a shifted value.
10307 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
10308 read-only flag from the values onto the result.
10309 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
10311 2014-01-25 Tristan Gingold <gingold@adacore.com>
10313 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
10314 for E_Variable with a pragma Linker_Section.
10316 2014-01-25 Robert Dewar <dewar@adacore.com>
10318 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
10319 with Default_Value aspect is passed in by copy.
10321 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10323 * set_targ.adb: Set Short_Enums.
10324 * gcc-interface/lang.opt (fshort-enums): New option.
10325 * gcc-interface/misc.c (gnat_handle_option): Handle it.
10326 (gnat_post_options): Do not modify the global settings.
10328 2014-01-24 Robert Dewar <dewar@adacore.com>
10330 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
10332 (Random_Decimal_Fixed): New generic function.
10333 * s-rannum.ads: Minor comment clarifications.
10335 2014-01-24 Robert Dewar <dewar@adacore.com>
10337 * back_end.adb: Remove Short_Enums handling (handled in
10338 Ttypes/Get_Targ now) Minor added comments.
10339 * freeze.adb: Change name Short_Enums_On_Target to
10340 Target_Short_Enums.
10341 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
10342 * opt.ads: Minor comment updates.
10343 * sem_ch13.adb: Change name Short_Enums_On_Target to
10344 Target_Short_Enums.
10345 * set_targ.adb: Set Short_Enums from gcc back end.
10346 * set_targ.ads (Short_Enums): New variable.
10347 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
10348 Ttypes/Get_Targ now).
10349 * ttypes.ads (Target_Short_Enums): New constant boolean switch
10351 2014-01-24 Pascal Obry <obry@adacore.com>
10353 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
10355 2014-01-24 Gary Dismukes <dismukes@adacore.com>
10357 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
10358 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
10361 2014-01-24 Robert Dewar <dewar@adacore.com>
10363 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
10365 2014-01-24 Vincent Celier <celier@adacore.com>
10367 * prj.adb (Add_Aggregated_Project): Do not add a project in
10368 the list if it is already there.
10370 2014-01-24 Yannick Moy <moy@adacore.com>
10372 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
10373 Correct the search for a subrogram declaration to which a pragma is
10376 2014-01-24 Bob Duff <duff@adacore.com>
10378 * gnat_ugn.texi: Document --decimal-grouping and
10379 --based-grouping switches in gnatpp.
10381 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10383 * sinfo.ads: Documentation update.
10385 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10387 * sem_ch3.adb (Constant_Redeclaration): New declaration is
10388 illegal if previous one has an initial expression that is an
10389 aggregate expanded into assignments.
10391 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10393 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
10394 code reorganization to remove spurious warning on a loop with
10395 an array element iterator that has a null range.
10397 2014-01-24 Vincent Celier <celier@adacore.com>
10399 * make.adb (Binding_Phase): When setting the Ada paths, use
10400 the library ALI dir, not the object dir in libraries.
10402 2014-01-24 Yannick Moy <moy@adacore.com>
10404 * sinfo.ads: Add documentation of check flag fields.
10406 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10408 * sem_res.adb (Resolve_Actuals): If an actual is a view
10409 conversion of a discriminated object, and the formal type is
10410 discriminated and constrained, apply a discriminant check to
10413 2014-01-24 Robert Dewar <dewar@adacore.com>
10415 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
10417 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10419 * sem_ch3.adb (Analyze_Declarations): At the end of an
10420 appropriate declarative part, call Freeze_All from the first
10421 declaration in the scope, not from the first unfrozen one. This
10422 is necessary to apply visibility checks to entities with delayed
10423 aspects. Otherwise, in the presence of instantiations and cleanups
10424 that they may generate, the delayed aspects may be analyzed too
10425 late and produce spurious visibility errors.
10426 * sem_attr.adb: Place etype on range.
10427 * sem_ch6.adb: Documentation expression functions.
10429 2014-01-24 Robert Dewar <dewar@adacore.com>
10431 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
10432 terminology in compiler).
10434 2014-01-24 Robert Dewar <dewar@adacore.com>
10436 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
10437 categories, now that Ada 95 supports raise expressions.
10439 2014-01-24 Robert Dewar <dewar@adacore.com>
10441 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
10442 Short_Enums_On_Target.
10443 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
10445 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
10447 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10449 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
10450 indication is given explicity, check that it matches the array
10451 component type or the container element type of the domain
10454 2014-01-24 Tristan Gingold <gingold@adacore.com>
10456 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
10457 * gcc-interface/misc.c (flag_short_enums): Declare.
10458 (gnat_post_options): Set it.
10460 2014-01-24 Vincent Celier <celier@adacore.com>
10462 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
10463 to cache the result when Including_Libraries is False.
10464 * prj-env.ads (Ada_Objects_Path): Update documentation
10465 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
10466 (Get_Object_Directory): Return the Library_Ali_Dir only when
10467 when Including_Libraries is True.
10468 * prj.ads (Get_Object_Directory): Fix and complete documentation
10469 (Project_Data): New component Ada_Objects_Path_No_Libs
10471 2014-01-24 Robert Dewar <dewar@adacore.com>
10473 * checks.adb (Expr_Known_Valid): Result of fpt operator never
10476 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10478 * back_end.adb: Minor fix in comment.
10480 2014-01-24 Javier Miranda <miranda@adacore.com>
10482 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
10483 required to report the error in case of task types.
10485 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10487 * sem_attr.adb: Additional index checking.
10489 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10491 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
10492 expressions in each component association, and for records note
10493 the entity in each association choice, for subsequent resolution.
10494 (Resolve_Attribute, case 'Update): Complete resolution of
10495 expressions in each component association.
10497 2014-01-24 Robert Dewar <dewar@adacore.com>
10499 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
10500 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
10501 leading to wrong handling of SPARK_Mode for library units).
10503 2014-01-24 Robert Dewar <dewar@adacore.com>
10505 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
10506 on generic instances (do not consider them to be internally
10509 2014-01-24 Doug Rupp <rupp@adacore.com>
10511 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
10512 vice pthread_sigmask.
10514 2014-01-24 Vincent Celier <celier@adacore.com>
10516 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
10519 2014-01-24 Vincent Celier <celier@adacore.com>
10521 * prj-ext.adb (Add): Do not output anything when Silent is True,
10522 whatever the verbosity. When Source is From_External_Attribute,
10523 set the corresponding environment variable if it is not already set.
10524 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
10526 * prj-proc.adb (Process_Expression_For_Associative_Array):
10527 For attribute External, call Prj.Ext.Add with Silent set to
10528 True for the child environment, to avoid useless output in non
10531 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10533 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
10534 range given by a subtype indication, and force evaluation of
10535 the bounds, as for a simple range.
10536 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
10537 of bounds of slice for various kinds of discrete ranges.
10538 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
10539 Evaluate_Slice_Bounds.
10541 2014-01-24 Bob Duff <duff@adacore.com>
10543 * s-taskin.ads (Activator): Make this Atomic, because
10544 Activation_Is_Complete reads it, and that can be called
10545 from any task. Previously, this component was only
10546 modified by the activator before activation, and by
10547 Self after activation.
10548 * a-taside.ads, a-taside.adb (Environment_Task,
10549 Activation_Is_Complete): Implement these missing functions.
10551 2014-01-24 Doug Rupp <rupp@adacore.com>
10553 * init.c: Add a handler section for Android.
10555 2014-01-24 Arnaud Charlet <charlet@adacore.com>
10557 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
10559 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10561 * sem_ch4.adb (Operator_Check): If one operand is a
10562 Raise_Expression, set its type to that of the other operand.
10563 * sem_res.adb (Resolve_Raise_Expression): new procedure.
10564 (Resolve_Actuals): For an actual that is a Raise_Expression,
10565 set the type to that of the formal.
10566 * sem_type.adb (Find_Unique_Type): If one of the operands is a
10567 Raise_Expression, return type of the other operand.
10569 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10571 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
10572 component of the record has a type with a default aspect, and
10573 the corresponding aggregate component is initiaized with a box,
10574 use the default value in the rewritten aggregate.
10576 2014-01-24 Tristan Gingold <gingold@adacore.com>
10578 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
10579 s-interr-sigaction.adb,
10580 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
10581 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
10582 to the call to Install_Restricted_Handlers.
10584 2014-01-24 Emmanuel Briot <briot@adacore.com>
10586 * prj-nmsc.adb (Check_File): Add protection when the source is
10587 not fully initialized.
10589 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10591 * sem_util.adb (Is_Post_State): In a postcondition, a selected
10592 component that denotes an implicit dereference is a reference
10593 to the post state of the subprogram.
10595 2014-01-24 Robert Dewar <dewar@adacore.com>
10597 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
10598 for generated subprograms.
10599 (Analyze_Subprogram_Specification): Ditto.
10601 2014-01-24 Vincent Celier <celier@adacore.com>
10603 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
10604 attributes in package Builder of aggregate and aggregate library
10606 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
10607 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
10608 Remove parameters. Change error message from "... externally
10609 build library ..." to "... externally built project ...".
10610 (Process_Naming_Scheme.Check): Do not do any check in aggregate
10611 project, as attribute Library_Dir and Library_Name have already
10612 been detected as forbidden.
10614 2014-01-24 Vincent Celier <celier@adacore.com>
10616 * prj-env.adb (Find_Project): If cached project path is not in
10617 project directory, look in current directory first and use cached
10618 project path only if project is not found in project directory.
10620 2014-01-24 Robert Dewar <dewar@adacore.com>
10622 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
10624 2014-01-24 Vincent Celier <celier@adacore.com>
10626 * projects.texi: Document that aggregate projects are only
10627 supported by gprbuild, but not by gnatmake. Document that the
10628 only attribute Switches in package Binder of aggregate projects
10629 will be ignored if its index is not others. Document that
10630 attribute Global_Config_File is allowed in package Binder of
10631 aggregate projects.
10633 2014-01-24 Robert Dewar <dewar@adacore.com>
10635 * sem_prag.adb: Minor code reorganization.
10636 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
10638 2014-01-24 Pascal Obry <obry@adacore.com>
10640 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
10641 attribute definition.
10643 2014-01-24 Vincent Celier <celier@adacore.com>
10645 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
10646 in the Queue the same source (same path, same multi-source index)
10647 from the same project file, to avoid compiling several times
10650 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10652 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
10653 (Has_Gigi_Rep_Item): Likewise.
10654 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
10655 Has_Gigi_Rep_Item for objects.
10656 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
10657 (prepend_one_attribute): ...this.
10658 (prepend_one_attribute_pragma): New function extracted from...
10659 (prepend_attributes): ...here. Swap the parameters for consistency.
10660 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
10661 prepend_attributes.
10662 <object>: Deal with a pragma Linker_Section on a constant
10663 or variable. <E_Function>: Deal with a pragma Linker_Section
10665 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
10667 2014-01-24 Vincent Celier <celier@adacore.com>
10669 * opt.ads: Minor comment update.
10671 2014-01-24 Robert Dewar <dewar@adacore.com>
10673 * sem_prag.adb (Analyze_Input_Output): Add missing error check
10675 * sem_util.adb (Is_Refined_State): Add defense against junk
10678 2014-01-24 Pascal Obry <obry@adacore.com>
10680 * projects.texi: Removes Build_Slaves attribute documentation.
10682 2014-01-23 Robert Dewar <dewar@adacore.com>
10684 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
10687 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10689 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
10690 applies to expressions that come from source.
10691 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
10693 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
10694 rule regarding potentially unevaluated expressions, to prefix
10697 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10699 * exp_util.adb (Make_Invqriant_Call): If type of expression is
10700 a private extension, get invariant from base type.
10702 2014-01-23 Robert Dewar <dewar@adacore.com>
10704 * sem_util.adb, sem_attr.adb: Minor reformatting.
10706 2014-01-23 Robert Dewar <dewar@adacore.com>
10708 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
10709 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
10710 * sem.adb (Semantics): Remove save/restore of
10711 SPARK_Mode[_Pragma]. Not needed since already done in
10712 Save/Restore_Opt_Config_Switches.
10714 2014-01-23 Robert Dewar <dewar@adacore.com>
10716 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
10717 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
10718 Linker_Section enhancements.
10720 2014-01-23 Tristan Gingold <gingold@adacore.com>
10722 * gnat_rm.texi: Minor editing.
10724 2014-01-23 Robert Dewar <dewar@adacore.com>
10726 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
10727 with'ed internal units.
10728 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
10730 2014-01-23 Javier Miranda <miranda@adacore.com>
10732 * lib-xref.adb (Generate_Reference): As part of processing the
10733 "end-of-spec" reference generate an extra reference to the first
10734 private entity of the package.
10735 * xr_tabls.adb (Add_Reference): No action needed for the extra
10736 'E' reference associated; similar to the processing of the
10739 2014-01-23 Bob Duff <duff@adacore.com>
10741 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
10743 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10745 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
10746 predicate to implement rule given in 6.1.1 (20/3).
10747 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
10748 'Old in a postcondition, if it is potentially unevaluated and
10749 it is not an entity name.
10751 2014-01-23 Bob Duff <duff@adacore.com>
10753 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
10755 2014-01-23 Robert Dewar <dewar@adacore.com>
10757 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
10760 2014-01-23 Bob Duff <duff@adacore.com>
10762 * g-dynhta.ads: Minor comment fix.
10764 2014-01-23 Yannick Moy <moy@adacore.com>
10766 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
10767 from spec on body only when not already inherited on spec. Set
10768 SPARK_Mode from context on body without previous spec. *
10769 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
10770 library-level entities. Correct retrieval of entity from
10771 declaration, for cases where the declaration is not a unit.
10772 * sem_ch12.adb (Instantiate_Object): Avoid
10773 calling Is_Volatile_Object on an empty node.
10775 2014-01-23 Robert Dewar <dewar@adacore.com>
10777 * gnatlink.adb (Gnatlink): Check for suspicious executable file
10780 2014-01-23 Robert Dewar <dewar@adacore.com>
10782 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
10783 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
10784 style errors in instances.
10785 * g-dynhta.ads (Static_HTable): Comment updates.
10787 2014-01-23 Vincent Celier <celier@adacore.com>
10789 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
10790 to find a configuration project file when Config_File_Name is
10791 No_Configuration_File.
10792 * prj-conf.ads (No_Configuration_File): New constant String.
10793 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
10794 with Config_File_Name set to No_Configuration_File, so that
10795 no existing configuration project file will be used, and the
10796 configuration project will be only created in memory when
10797 Add_Default_GNAT_Naming_Scheme is called.
10798 * projects.texi: Minor reformatting.
10800 2014-01-23 Vincent Celier <celier@adacore.com>
10802 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
10803 a config project file if On_Load_Config is not null.
10804 * prj-pars.adb: Minor comment changes.
10806 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10808 * lib-xref.adb (Output_References): Output progenitors of
10809 synchronized tagged types, for source navigation.
10811 2014-01-23 Robert Dewar <dewar@adacore.com>
10813 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
10814 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
10815 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
10817 2014-01-23 Emmanuel Briot <briot@adacore.com>
10819 * prj-conf.adb (Get_Or_Create_Configuration_File): call
10820 On_Load_Config later.
10822 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10824 * sem_ch3.adb (Analyze_Declarations): Do not
10825 generate the spec of the late primitive in ASIS mode. Add two
10826 comments to explain the special cases when the expansion is
10829 2014-01-23 Robert Dewar <dewar@adacore.com>
10831 * sem_util.adb (Note_Possible_Modification): Fix error of
10832 misbehaving for implicit dereference cases in -gnatc mode.
10834 2014-01-23 Emmanuel Briot <briot@adacore.com>
10836 * prj-pars.adb: Minor reformatting.
10838 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10840 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
10841 body generated for an expression function within a protected body
10842 needs a set of renaming declarations if the expression function
10845 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10847 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
10848 list interface progenitor of a tagged concurrent type, for better
10851 2014-01-22 Robert Dewar <dewar@adacore.com>
10853 * lib.adb (In_Extended_Main_Code_Unit): Return False for
10855 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
10856 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
10857 treatment of Slocs No_Location and Standard_Location.
10858 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
10859 check for entity with Standard_Location Sloc, rather than relying
10860 on Lib routines to do that.
10861 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
10862 that a call cannot occur before a later occuring body within
10865 2014-01-22 Thomas Quinot <quinot@adacore.com>
10867 * rtsfind.adb: Update comment.
10869 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
10871 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
10872 * sem_ch3.adb (Analyze_Declarations): Add local variable
10873 Body_Seen. Generate the spec of a late controlled
10874 primitive body that is about to freeze its related type.
10875 (Handle_Late_Controlled_Primitive): New routine.
10877 2014-01-22 Robert Dewar <dewar@adacore.com>
10879 * a-stream.adb: Minor reformatting.
10881 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10883 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
10884 sub-procedure Declared_In_Actual to handle properly the visibility
10885 of actuals in actual packages, that are themselves actuals to a
10886 actual package of the current instance. This mimics properly the
10887 visibility of formals of formal packages declared with a box,
10888 within the corresponding generic unit.
10890 2014-01-22 Robert Dewar <dewar@adacore.com>
10892 * checks.adb: Do not assume that a volatile variable is valid.
10894 2014-01-22 Thomas Quinot <quinot@adacore.com>
10896 * g-catiio.ads (Image, Value): Clarify that these functions
10897 operate in the local time zone. Minor documentation update.
10899 2014-01-22 Thomas Quinot <quinot@adacore.com>
10901 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
10903 2014-01-22 Robert Dewar <dewar@adacore.com>
10905 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
10906 Moved to sem_aux.adb.
10908 2014-01-22 Robert Dewar <dewar@adacore.com>
10910 * vms_data.ads: Minor reformatting.
10912 2014-01-22 Robert Dewar <dewar@adacore.com>
10914 * debug.adb: Document messages affected by -gnatd.E including
10915 the new ones that relate to late definition of equality.
10916 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
10917 debug flag -gnatd.E is set, then generate warnings rather than
10919 (Check_Untagged_Equality): In earlier versions of Ada,
10920 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
10922 2014-01-22 Robert Dewar <dewar@adacore.com>
10924 * sem_prag.adb (Usage_Error): Output additional messages for
10925 unconstrained OUT parameters lacking an input dependency.
10927 2014-01-22 Robert Dewar <dewar@adacore.com>
10929 * sem_ch4.adb: Minor reformatting.
10931 2014-01-22 Robert Dewar <dewar@adacore.com>
10933 * restrict.ads: Minor reformatting.
10934 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
10935 forbids a call from within a subprogram to the same subprogram.
10937 2014-01-22 Thomas Quinot <quinot@adacore.com>
10939 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
10940 stream attributes for Stream_Element_Array.
10941 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
10942 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
10943 defined in the current scope.
10945 2014-01-22 Robert Dewar <dewar@adacore.com>
10947 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
10949 2014-01-22 Thomas Quinot <quinot@adacore.com>
10951 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
10953 2014-01-22 Thomas Quinot <quinot@adacore.com>
10955 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
10956 declaration initialized with a function call, whose type
10957 has variable size, need to remove side effects so that the
10958 initialization expression becomes a dereference of a temporary
10959 reference to the function result.
10961 2014-01-22 Yannick Moy <moy@adacore.com>
10963 * errout.adb (Initialize): Remove trick to add dummy entry
10965 * erroutc.adb (Set_Warnings_Mode_Off,
10966 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
10967 command line switch.
10968 * opt.ads (Warning_Mode): Document behavior
10969 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
10971 2014-01-22 Robert Dewar <dewar@adacore.com>
10973 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
10975 2014-01-22 Robert Dewar <dewar@adacore.com>
10977 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
10978 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
10979 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
10980 case Storage_Size): call Check_Pool_Size_Clash.
10982 2014-01-22 Robert Dewar <dewar@adacore.com>
10984 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
10985 sem_eval.ads: Minor reformatting.
10987 2014-01-22 Thomas Quinot <quinot@adacore.com>
10989 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
10990 Any_Composite to prevent cascaded errors.
10992 2014-01-22 Yannick Moy <moy@adacore.com>
10994 * errout.adb (Initialize): Do not insert special entry in Warnings
10995 table in GNATprove_Mode.
10996 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
10998 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
11001 2014-01-22 Robert Dewar <dewar@adacore.com>
11003 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
11006 2014-01-22 Robert Dewar <dewar@adacore.com>
11008 * snames.ads-tmpl: Update header.
11010 2014-01-22 Thomas Quinot <quinot@adacore.com>
11012 * exp_util.adb (Insert_Actions): When inserting actions on a
11013 short circuit operator that has already been analyzed, do not park
11014 actions in node; instead introduce an N_Expression_With_Actions
11015 and insert actions immediately.
11016 Add guard for unexpected case of climbing up through statement
11017 in Actions list of an N_Expression_With_Actions.
11018 * sem_elab.adb (Insert_Elab_Check): Remove complex
11019 specialized circuitry for the case where the context is already
11020 analyzed, as it is not needed and introduces irregularities in
11021 finalization. Instead rely on the above change to Insert_Actions
11022 to ensure that late insertion on short circuit operators works
11025 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11027 * sem_ch4.adb (Operator_Check): Improve error message when an
11028 operand of concatenation is an access type.
11030 2014-01-22 Thomas Quinot <quinot@adacore.com>
11032 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
11035 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11037 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
11038 of an expanded name in a proper body, whose prefix is a package
11039 in the context of the proper body, when there is a homonym of
11040 the package declared in the parent unit.
11042 2014-01-22 Robert Dewar <dewar@adacore.com>
11044 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
11045 msg if errors found.
11046 (Check_One_Unit): Same change.
11048 2014-01-22 Robert Dewar <dewar@adacore.com>
11050 * ug_words: Add missing/wrong entries for VMS warning switches.
11051 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
11053 2014-01-22 Jerome Guitton <guitton@adacore.com>
11055 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
11058 2014-01-22 Robert Dewar <dewar@adacore.com>
11060 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
11062 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
11064 * gcc-interface/Makefile.in: Minor fixes.
11066 2014-01-21 Robert Dewar <dewar@adacore.com>
11068 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
11069 * par-ch5.adb (P_Condition): New version with expression prescanned.
11070 * par.adb (P_Condition): New version with expression prescanned.
11072 2014-01-21 Robert Dewar <dewar@adacore.com>
11074 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
11075 if Address is not a private type.
11076 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11077 Ignore pragma if System.Address is not a private type.
11079 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11081 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
11082 uninitialized value.
11084 2014-01-21 Thomas Quinot <quinot@adacore.com>
11086 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
11088 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11090 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
11091 the value of Assertions_Enabled flag when compiling an instance of
11092 an internal unit. This facilitates the use of pre/postconditions
11093 in generic internal units, such as the new elementary function
11096 2014-01-21 Robert Dewar <dewar@adacore.com>
11098 * exp_aggr.adb: Minor reformatting.
11099 * sem_attr.adb: Minor reformatting.
11100 * sem_res.adb: Minor comment addition.
11101 * einfo.adb: Minor comment updates.
11102 * freeze.adb: Minor reformatting and code reorganization.
11104 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11106 * par-ch4.adb (P_If_Expression): Handle more gracefully an
11107 elsif clause that does not have an else part.
11109 2014-01-21 Robert Dewar <dewar@adacore.com>
11111 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
11112 * gcc-interface/Makefile.in: clean up target pairs.
11114 2014-01-21 Pascal Obry <obry@adacore.com>
11116 * projects.texi: Minor typo fix.
11118 2014-01-21 Thomas Quinot <quinot@adacore.com>
11120 * freeze.adb (Check_Component_Storage_Order): If a record type
11121 has an explicit Scalar_Storage_Order attribute definition clause,
11122 reject any component that itself is of a composite type and does
11125 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11127 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
11128 can be used to generate proper cross-reference information for
11129 the parent units of proper bodies.
11131 2014-01-21 Thomas Quinot <quinot@adacore.com>
11133 * exp_pakd.adb (Expand_Packed_Element_Set,
11134 Expand_Packed_Element_Reference): No byte swapping required in
11135 the front-end for the case of a reverse storage order array,
11136 as this is now handled uniformly in the back-end. However we
11137 still need to swap back an extracted element if it is itself a
11138 nested composite with reverse storage order.
11140 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
11142 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
11143 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
11146 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11148 * gnat_ugn.texi: Minor updates.
11150 2014-01-21 Thomas Quinot <quinot@adacore.com>
11152 * exp_pakd.adb: Update comment, minor reformatting.
11154 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
11156 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
11157 object check when SPARK_Mode is on.
11158 * sem_ch6.adb (Process_Formals): Trigger the volatile object
11159 check when SPARK_Mode is on.
11160 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
11161 check when SPARK_Mode is on.
11162 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
11163 corresponding pragma of aspect SPARK_Mode in the visible
11164 declarations of a package declaration.
11165 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
11166 check when SPARK_Mode is on.
11167 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
11168 check when SPARK_Mode is on.
11169 (Resolve_Entity_Name): Trigger
11170 the volatile object check when SPARK_Mode is on.
11172 2014-01-21 Robert Dewar <dewar@adacore.com>
11174 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
11175 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
11177 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11179 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
11180 object is declared, it is rewritten as a renaming of an dynamic
11181 expression that wraps the initial value. The renaming declaration
11182 is first given an internal name, to prevent collisions with the
11183 entity already declared, and then the name is modified to reflect
11184 the original one. the modification of the name must preserve
11185 the source location of the original, to prevent spurious errors
11186 when compiling with style checks if the declaration involves
11187 more than one entity.
11189 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
11191 * aspects.adb Add entries for Async_Readers, Async_Writers,
11192 Effective_Reads and Effective_Writes in table Canonical_Aspect.
11193 * aspects.ads Add entries for Async_Readers, Async_Writers,
11194 Effective_Reads and Effective_Writes in tables Aspect_Id,
11195 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
11196 * atree.adb (Ekind_In): New version with 8 parameters.
11197 (Node34): New routine.
11198 (Set_Node34): New routine.
11199 * atree.ads (Ekind_In): New version with 8 parameters.
11200 (Node34): New routine.
11201 (Set_Node34): New routine.
11202 * einfo.adb Contract is now Node34.
11203 (Contract): Update the assertion and node usage.
11204 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
11205 Effective_Reads and Effective_Writes.
11206 (Set_Contract): Update the assertion and node usage.
11207 (Write_Field24_Name): Remove the output for a contract.
11208 (Write_Field34_Name): Add output for a contract.
11209 * einfo.ads Contract is now Node34. Update the comment on
11210 attribute usage and related node structures.
11211 (Get_Pragma): Update the comment on usage.
11212 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
11213 Effective_Reads and Effective_Writes do not require special
11214 processing by the parser.
11215 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
11216 (Analyze_Declarations): Analyze the contract of a variable at
11217 the end of the declarative region.
11218 (Analyze_Object_Declaration): Create a contract for a variable.
11219 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
11220 of classification pragmas.
11221 (Process_Formals): Detect an illegal
11222 use of a volatile object as a formal in a function.
11223 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
11224 a volatile object as an actual in generic instantiation.
11225 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
11226 Effective_Reads and Effective_Writes in table Sig_Flags.
11227 (Analyze_External_State_In_Decl_Part): New routine.
11228 (Analyze_Global_Item): Detect an illegal use of a volatile object
11229 as a global item of a function.
11230 (Analyze_Pragma): Reimplement
11231 pragma Abstract_State. Add support for pragmas Async_Readers,
11232 Async_Writers, Effective_Reads and Effective_Writes.
11233 (Check_External_Properties): New routine.
11234 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
11235 (Check_External_Properties): New routine.
11236 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
11237 volatile object as an actual in a call.
11238 (Resolve_Entity_Name):
11239 Add local variables Par, Prev and Usage_OK. Detect illegal
11240 contexts of volatile objects.
11241 * sem_util.adb (Add_Contract_Item): Add support for
11242 pragmas associated with the contract of a variable.
11243 (Async_Readers_Enabled): New routine.
11244 (Async_Writers_Enabled): New routine.
11245 (Effective_Reads_Enabled): New routine.
11246 (Effective_Writes_Enabled): New routine.
11247 (Has_Enabled_Property):
11249 (Is_Unchecked_Conversion_Instance): New routine.
11250 (Is_Volatile_Object): Add support for entities that may denote
11252 * sem_util.ads (Add_Contract_Item): Update the
11254 (Async_Readers_Enabled): New routine.
11255 (Async_Writers_Enabled): New routine.
11256 (Effective_Reads_Enabled): New routine.
11257 (Effective_Writes_Enabled): New routine.
11258 (Is_Unchecked_Conversion_Instance): New routine.
11259 * sinfo.ads Update the comment on the structure of N_Contract.
11260 * snames.ads-tmpl Add predefined names for Async_Readers,
11261 Async_Writers, Effective_Reads and Effective_Writes. Add
11262 pragma ids for Async_Readers, Async_Writers, Effective_Reads
11263 and Effective_Writes.
11265 2014-01-21 Robert Dewar <dewar@adacore.com>
11267 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
11268 * sem_eval.adb (Compile_Time_Known_Value): Remove special
11269 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
11270 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
11271 (Test_Foldable): Add CRT_Safe parameter
11272 * sem_eval.ads (Compile_Time_Known_Value): Remove special
11273 handling of CRT mode.
11274 (CRT_Safe_Compile_Time_Known_Value): New function.
11276 2014-01-21 Robert Dewar <dewar@adacore.com>
11278 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
11279 with pragma or aspect that applies to package spec or subprogram
11282 2014-01-21 Robert Dewar <dewar@adacore.com>
11284 * exp_aggr.adb: Minor reformatting.
11286 2014-01-21 Johannes Kanig <kanig@adacore.com>
11288 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
11290 2014-01-21 Bob Duff <duff@adacore.com>
11292 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
11294 2014-01-21 Steve Baird <baird@adacore.com>
11296 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
11298 2014-01-21 Vincent Celier <celier@adacore.com>
11300 * prj-part.adb (Parse_Single_Project): Accept to extend a project
11301 if it has only be imported by an project being extended. When a
11302 project that has only been imported by a project being extended
11303 is imported by another project that is not being extended,
11304 reset the previous indication, so that it will be an error if
11305 this project is extended later.
11306 * prj-tree.adb (Create_Project): Include component From_Extended
11307 in table Projects_HT
11308 * prj-tree.ads (Project_Name_And_Node): New Boolean component
11311 2014-01-21 Robert Dewar <dewar@adacore.com>
11313 * atree.ads, atree.adb: Add Node33 and Set_Node33.
11314 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
11315 New field (SPARK_Pragma_Inherited): New flag
11316 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
11318 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
11319 * opt.ads (SPARK_Mode_Pragma): New global variable.
11320 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
11321 * sem_ch3.adb: Use new SPARK_Mode data structures.
11322 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
11323 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
11324 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
11325 (Pop_Scope): Restore SPARK_Mode_Pragma.
11326 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
11327 new data structures.
11329 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11331 * back_end.adb: Undo previous change, not needed. Minor reformatting.
11333 2014-01-21 Thomas Quinot <quinot@adacore.com>
11335 * exp_ch5.adb: Fix comment.
11336 * switch-c.adb: Minor comment update.
11337 * exp_ch3.adb: Minor reformatting.
11339 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11341 * back_end.adb (Scan_Compiler_Arguments): Do not store object
11342 filename in gnatprove mode.
11344 2014-01-21 Thomas Quinot <quinot@adacore.com>
11346 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
11347 suppresses usage of primitive _assign for tagged types).
11348 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
11349 No_Ctrl_Actions for a tagged type that does not require
11350 finalization, as we want to disable usage of _assign (which
11351 may cause undesirable discriminant checks on an uninitialized,
11354 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11356 * sem_prag.adb: Reject invariant'class on completion.
11358 2014-01-21 Javier Miranda <miranda@adacore.com>
11360 * exp_ch3.adb (Build_Init_Procedure): For
11361 derivations of interfaces, do not move the the initialization
11362 of the _parent field since such assignment is not generated.
11364 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11366 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
11367 with the operator it renames if we are within an expression of
11368 a pre/postcondition, because the expression will be reanalyzed
11369 at a later point, and the analysis of the renaming may affect
11370 the visibility of the operator when in an instance.
11372 2014-01-21 Robert Dewar <dewar@adacore.com>
11374 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
11375 Add this flag to type conversion nodes and assignment nodes.
11376 * treepr.adb: Deal properly with Flag 1,2,3.
11377 * treeprs.adt: Minor comment update.
11379 2014-01-21 Robert Dewar <dewar@adacore.com>
11381 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
11383 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
11384 parameter, completely rewrite spec.
11386 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11388 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
11389 instance that is inlined, it may have been rewritten as a wrapper
11390 package. In that case the unit that must be made visible is the
11391 related instance of the package.
11393 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11395 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
11396 previous change in codepeer mode.
11398 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11400 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
11401 call to Abort_Undefer, as expected by the runtime.
11402 * s-tasren.adb (Local_Complete_Rendezvous): Replace
11403 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
11404 deferred at this point. Update comments.
11406 2014-01-21 Thomas Quinot <quinot@adacore.com>
11408 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
11410 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11412 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
11415 2014-01-21 Robert Dewar <dewar@adacore.com>
11417 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
11419 2014-01-21 Thomas Quinot <quinot@adacore.com>
11421 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
11422 this is value is used in Node_Id arithmetic operations.
11423 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
11424 instead of hard-coded unrolled code.
11426 2014-01-21 Yannick Moy <moy@adacore.com>
11428 * gnat1drv.adb: Minor code cleanup, removing useless code.
11430 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11432 * opt.ads (SPARK_Switches_File_Name): New.
11433 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
11434 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
11435 * gnat_ugn.texi: Document -gnates.
11437 2014-01-21 Yannick Moy <moy@adacore.com>
11439 * errout.adb (Special_Msg_Delete): Update comment. Remove
11440 special case for GNATprove which should not ignore mismatch
11441 in sizes for representation clauses.
11442 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
11443 which should not ignore pragma Pack.
11445 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11447 * sem_ch4.adb: Code clean up.
11449 2014-01-21 Steve Baird <baird@adacore.com>
11451 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
11453 2014-01-21 Robert Dewar <dewar@adacore.com>
11455 * gcc-interface/gigi.h: Get Flags array address.
11456 * gcc-interface/trans.c: Acquire Flags array address.
11457 * atree.adb: Add support for Flags array and Flag0,1,2,3.
11458 * atree.ads: Add support for Flags array and Flag0,1,2,3.
11459 * atree.h: Add support for Flags array and Flag0,1,2,3.
11460 * back_end.adb: Pass Flags array address to gigi.
11462 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11464 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
11465 reference to generated body so that legality checks on stream
11466 attributes are properly applied. If type is tagged and already
11467 frozen, insert generated body at the point of the renaming
11470 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11472 * sem_ch12.adb: Code clean up.
11473 * sem_ch8.adb: Minor reformatting
11475 2014-01-20 Robert Dewar <dewar@adacore.com>
11477 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
11478 converting warnings on inevitable exceptions to errors.
11479 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
11480 converting warnings on inevitable exceptions to errors.
11481 * opt.adb (SPARK_Mode_Config): Handled like other config flags
11482 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
11483 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
11484 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
11485 New flag (Config_Switches_Type): Add SPARK_Mode field
11486 * sem.adb: Minor code reorganization (remove unnecessary with)
11487 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
11488 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
11489 converting warnings on inevitable exceptions to errors.
11490 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
11491 converting warnings on inevitable exceptions to errors.
11492 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
11493 converting warnings on inevitable exceptions to errors.
11494 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
11495 converting warnings on inevitable exceptions to errors.
11496 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
11497 from spec if needed
11498 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
11499 from spec if needed
11500 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
11502 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
11503 converting warnings on inevitable exceptions to errors.
11504 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
11505 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
11506 of Get_SPARK_Mode_Id
11507 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
11508 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
11509 converting warnings on inevitable exceptions to errors.
11510 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
11511 converting warnings on inevitable exceptions to errors.
11512 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
11515 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11517 * sem_ch13.adb: Add semantic information to rewritten type
11520 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11522 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
11523 are of a type with unknown discriminants, convert both to the
11524 underlying view of the type, so that the proper constraint check
11525 can be applied to the right-hand side.
11527 2014-01-20 Robert Dewar <dewar@adacore.com>
11529 * atree.adb (Copy_Node): Fix failure to copy last component
11530 (Exchange_Entities): Fix failure to exchange last entity
11532 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11534 * sem_ch12.adb: Code clean up.
11536 2014-01-20 Robert Dewar <dewar@adacore.com>
11538 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
11540 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11542 * sem_ch4.adb (Analyze_Quantified_Expression): If after
11543 pre-analysis the loop parameter specification has been
11544 rewritten as a iterator specification, propagate the change to
11545 the quantified expression, for ASIS navigtion needs.
11547 2014-01-20 Vincent Celier <celier@adacore.com>
11549 * par-ch10.adb: Minor error message change: escape [ and ].
11551 2014-01-20 Robert Dewar <dewar@adacore.com>
11553 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
11554 * errout.adb: Implement [ and ] insertion characters.
11555 * errout.ads: Document new [ and ] insertion characters.
11556 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
11557 addition of ??? comment.
11558 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
11559 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
11560 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
11561 Make warnings on exceptions into errors in GNATprove mode.
11562 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
11565 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11567 * sem_ch13.adb: Code clean up.
11569 2014-01-20 Robert Dewar <dewar@adacore.com>
11571 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
11573 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
11574 error in GNATprove mode.
11576 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11578 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
11579 reference 'Old takes no parameters, and thus can appear as a
11582 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11584 * exp_aggr.adb: Fix minor typos.
11586 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11588 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
11589 instance the attribute is legal, and its value is determined
11590 statically if the type has no discriminants. This choice is
11591 more useful than rechecking the legality rule in the instance,
11592 is consistent with older usage, and is also consistent with all
11595 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11597 * sem_cat.adb (Validate_Static_Object_Name): Change error into
11598 warning in Relaxed_Semantic_Mode.
11600 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11602 * sem_attr.adb: Code and comments cleanup.
11604 2014-01-20 Yannick Moy <moy@adacore.com>
11606 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
11607 * errout.adb (Compilation_Errors): Remove special handling in
11609 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
11610 removed debug flags.
11611 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
11612 Global, Initial_Condition, Initializes and Refined_State pragmas and
11614 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
11615 SPARK_Strict_Mode): Remove global flags.
11616 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
11617 always performed now, on packages declaring a null state.
11618 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
11619 at providing pedantic mode for bounds of integer types.
11620 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
11621 "some" quantified expression now issued under control of -gnatw.t,
11622 like the other warning on unused bound variable.
11623 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
11625 (Analyze_Pragma): Remove tests for SPARK 2014
11626 pragmas, not officially allowed by GNAT.
11628 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11630 * sem_prag.adb (Analyze_Pragma): Ensure that
11631 the sole argument of pragmas Abstract_State, Contract_Cases,
11632 Depends, Global and Initializes in in aggregate form.
11633 (Analyze_Refined_Pragma): Ensure that the sole argument of
11634 pragmas Refined_Depends, Refined_Global and Refined_State is in
11636 (Ensure_Aggregate_Form): New routine.
11638 2014-01-20 Doug Rupp <rupp@adacore.com>
11640 * sem_attr.adb (Analyze_Attribute): case
11641 Attribute_Constrained => treat all prefixes as legal for Declib
11644 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11646 * sem_prag.adb (Check_Mode): Reimplement the routine.
11647 (Find_Mode): New routine.
11649 2014-01-20 Robert Dewar <dewar@adacore.com>
11651 * sem_ch4.adb (Operator_Check): Handle additional
11652 Allow_Integer_Address cases.
11654 2014-01-20 Robert Dewar <dewar@adacore.com>
11656 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
11657 allowed if address is non-private, no longer true.
11658 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11659 Remove check for address being private, causes difficulty when
11660 pragma used in gnat.adc file and is not needed, since we guard
11661 this in Address_Integer_Convert_OK.
11662 * exp_ch7.adb: Minor reformatting.
11663 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
11665 2014-01-20 Robert Dewar <dewar@adacore.com>
11667 * checks.adb (Apply_Range_Check): Remove gnatprove special
11668 casing of exponentiation.
11669 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
11670 operand for integer case to check range against Natural.
11672 2014-01-20 Robert Dewar <dewar@adacore.com>
11674 * s-tataat.adb: Minor reformatting.
11676 2014-01-20 Robert Dewar <dewar@adacore.com>
11678 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
11679 entities, and also fix documentation to remove mention of visible
11680 integer type, since this is not what the implementation does.
11681 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
11682 entities, and also fix documentation to remove mention of visible
11683 integer type, since this is not what the implementation does.
11684 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
11686 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
11687 case for parameter type check.
11688 * sem_res.adb (Resolve): Use new function
11689 Address_Integer_Convert_OK.
11690 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
11691 reformatting throughout.
11692 * sem_util.adb (Address_Integer_Convert_OK): New function.
11693 * sem_util.ads: Minor reformatting (put specs in alpha order)
11694 (Address_Integer_Convert_OK): New function.
11696 2014-01-20 Thomas Quinot <quinot@adacore.com>
11698 * exp_ch7.adb (Wrap_Transient_Expression):
11699 Insertion extra conditional expression only if
11700 Opt.Suppress_Control_Flow_Optimizations is set.
11702 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11704 * s-tataat.adb (Initialize_Attributes): Abort might already be
11705 deferred in Create_Task.
11707 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11709 * checks.adb (Apply_Scalar_Range_Check): Flag
11710 the exponent as requiring a range check when the expression is
11713 2014-01-20 Fedor Rybin <frybin@adacore.com>
11715 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
11717 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11719 * sem_util.adb (Default_Initialization): New routine.
11720 * sem_util.ads: Add new type Default_Initialization_Kind.
11721 (Default_Initialization): New routine.
11723 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11725 * sem_prag.adb (Check_Mode): Correct all error
11726 message logic dealing with in/in out parameters that may appear
11727 as inputs or have a self reference.
11729 2014-01-20 Robert Dewar <dewar@adacore.com>
11731 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
11732 * sem_res.adb (Resolve): Fix error causing infinite loop for
11733 integer used as address. Allow addresses as integers.
11735 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11737 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
11739 2014-01-20 Bob Duff <duff@adacore.com>
11741 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
11742 error when "use all" is not followed by "type".
11744 2014-01-20 Bob Duff <duff@adacore.com>
11746 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
11749 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11751 * checks.adb (Apply_Address_Clause_Check): If there is an
11752 alignment check on the expression in an address clause, and there
11753 is no local exception propagation, add an additional explanatory
11754 message to clarify the cause of previous warning.
11756 2014-01-20 Robert Dewar <dewar@adacore.com>
11758 * exp_ch7.adb: Minor reformatting.
11759 * opt.ads: Minor comment updates.
11760 * sem.adb: Minor name change Is_Main_Unit =>
11761 Is_Main_Unit_Or_Main_Unit_Spec.
11762 * sem_ch6.adb: Minor reformatting and code reorganization.
11764 2014-01-20 Bob Duff <duff@adacore.com>
11766 * gnat_ugn.texi: Update gnatpp switches.
11768 2014-01-20 Thomas Quinot <quinot@adacore.com>
11770 * exp_ch9.adb: Minor comment edit.
11772 2014-01-20 Robert Dewar <dewar@adacore.com>
11774 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
11775 only if System.Address is a private type.
11776 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
11777 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11778 Allowed only if type System.Address is private, since otherwise
11780 * sem_res.adb: Fix failure to properly Analyze unchecked
11781 conversions that were introduced by Allow_Integer_Address.
11782 * switch-c.adb: Remove -gnates switch.
11783 * usage.adb: Remove -gnates switch.
11784 * gnat_ugn.texi: Remove documentation of -gnates flag.
11786 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11788 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
11789 resolve expression to perform proper name capture.
11791 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11793 * sem.adb (Semantics): When saving/restoring configuration
11794 switches, the spec of a pre- defined unit that is the main unit
11795 must be treated as a predefined unit as well.
11797 2014-01-20 Thomas Quinot <quinot@adacore.com>
11799 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
11800 expression, insert an extra conditional expression when saving
11801 the value of the expression, for the benefit of control flow
11802 graph based coverage analysis.
11803 * exp_ch3.adb: Minor reformatting.
11805 2014-01-20 Robert Dewar <dewar@adacore.com>
11807 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
11808 * gnat_rm.texi: Document pragma Allow_Integer_Address.
11809 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
11810 * opt.ads: New flag Allow_Integer_Address.
11811 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
11812 * sem_ch5.adb: Minor reformatting.
11813 * sem_prag.adb: Implement pragma Allow_Integer_Address.
11814 * sem_res.adb (Resolve): Allow integer address value if
11816 * sem_util.adb: Minor reformatting.
11817 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
11818 * switch-c.adb: Recognize flag -gnates.
11819 * usage.adb: Document flag -gnates.
11821 2014-01-20 Thomas Quinot <quinot@adacore.com>
11823 * s-tadeca.adb: Fix minor typos in comment.
11825 2014-01-20 Pascal Obry <obry@adacore.com>
11827 * s-win32.ads (FreeLibrary): New import.
11829 2014-01-20 Robert Dewar <dewar@adacore.com>
11831 * sem_res.adb, sem_cat.adb: Minor reformatting.
11832 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
11833 assigning to OUT parameters for the current subprogram scope.
11834 * exp_ch4.adb: Minor reformatting.
11836 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11838 * exp_ch4.adb (Process_Transient_Object,
11839 Find_Enclosing_Contexts): If the top-level if-expression that
11840 generated the transient object is an actual in a call, the proper
11841 Hook_Context is a construct enclosing the call.
11842 * einfo.ads: Indicate that Related_Expression is used to link a
11843 loop variable to the container expression over which the loop
11845 (Analyze_Iterator_Specification): Set the Related_Expression of
11846 the loop variable in a container element iterator.
11847 (Note_Possible_Modification): If the variable is the loop
11848 variable in a container element iterator, indicate that the
11849 enclosing container is also modified.
11851 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11853 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
11855 2014-01-20 Robert Dewar <dewar@adacore.com>
11857 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
11858 Minor reformatting and code clean up.
11860 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11862 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
11863 of objects of private type if Relaxed_RM_Semantics.
11865 2014-01-20 Claire Dross <dross@adacore.com>
11867 * a-cofove.ads (Vector): Capacity discriminant
11868 should be in range of the index.
11870 2014-01-20 Thomas Quinot <quinot@adacore.com>
11872 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
11873 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
11874 possible difference between epoch of Ada.Calendar clock and Ada
11875 real-time/tasking clock.
11876 * s-taprop-posix.adb: Minor comment fix.
11878 2014-01-20 Doug Rupp <rupp@adacore.com>
11880 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
11882 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11884 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
11885 checks on the prefix of attribute 'Old.
11886 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
11887 generation of validity checks on a range that belongs to the
11888 iteration scheme of a quantified expression.
11889 * sem_ch5.adb (One_Bound): Suppress the generation of validity
11890 checks on a bound that belongs to the iteration scheme of a
11891 quantified expression, generate the check in all other cases.
11893 2014-01-20 Bob Duff <duff@adacore.com>
11895 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
11897 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11899 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
11900 interpretations that do not come from other predefined units,
11901 to prevent spurious ambiguities in the presence of user-defined
11902 operators in the context of (an instance of) a predefined unit.
11904 2014-01-20 Robert Dewar <dewar@adacore.com>
11906 * gnat_rm.texi: Document that Loop_Variant is included in
11907 Statement_Assertions.
11908 * sem_prag.adb (Check_Kind): Add Loop_Variant to
11909 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
11910 to Statement_Assertions.
11912 2014-01-20 Doug Rupp <rupp@adacore.com>
11914 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
11915 for errno ENOENT from RTP on NFS mounted file system.
11917 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11919 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
11920 examine code that does not come from source. The check does not
11921 apply to code generated for constraint checks, and such code may
11922 generate spurious error messages when compiled with expansion
11923 disabled (as in a generic unit) because side effects may not
11925 2) Make error messages more explicit: indicate the component
11926 of the construct whose value is indeterminate because of a
11927 call to a function with in-out parameter in another component,
11928 when there is no mandated order of execution between the two
11929 components (actuals, aggregate components, alternatives).
11931 2014-01-20 Robert Dewar <dewar@adacore.com>
11933 * gnat_rm.texi: Minor cleanup.
11935 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11937 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
11938 can now apply to a refined postcondition.
11939 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
11940 variable Result_Seen. Add variables Case_Prag, Post_Prag,
11941 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
11942 whether postconditions and/or constract-cases mention attribute
11943 'Result and introduce a post-state when applied to functions.
11944 (Check_Result_And_Post_State): Removed.
11945 * sem_prag.adb (Analyze_Pragma): Add local variable
11946 Result_Seen. Verify that the expression of pragma Refined_Post
11947 mentions attribute 'Result and introduces a post-state.
11948 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
11950 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11952 * exp_ch7.adb (Is_Subprogram_Call): New routine.
11953 (Process_Transient_Objects): Make variable Must_Hook global with
11954 respect to all locally declared subprograms. Search the context
11955 for at least one subprogram call.
11956 (Requires_Hooking): Removed.
11958 2014-01-20 Claire Dross <dross@adacore.com>
11960 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
11961 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
11962 External_Axiomatization);
11964 2014-01-20 Robert Dewar <dewar@adacore.com>
11966 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
11967 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
11968 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
11969 Allow Loop_Entry to be used in these pragmas if they appear in
11970 an appropriate context.
11971 (Placement_Error): Specialize error
11972 message for pragma Assert[_And_Cut] or pragma Assume containing
11973 Loop_Entry attribute.
11974 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
11975 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
11976 and code clean ups.
11978 2014-01-20 Robert Dewar <dewar@adacore.com>
11980 * gnat1drv.adb: Minor comment update.
11982 2014-01-20 Tristan Gingold <gingold@adacore.com>
11984 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
11985 variables, comment out unused code.
11986 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
11987 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
11988 * s-excmac-arm.ads: New file.
11990 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11992 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
11993 Drange and Index_Typ. Remove the circuitry which creates a
11994 range check to compare the index type of the array against the
11996 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
11997 the circuitry which creates a range check to handle a
11998 discrete_range denoted by a subtype indication.
12000 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
12002 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
12003 nodes to get the original sloc range.
12005 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12007 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
12008 entity of a [library level] package.
12010 2014-01-20 Tristan Gingold <gingold@adacore.com>
12012 * raise-gcc.c (exception_class_eq): New function.
12013 (is_handled_by): Use it to compare exception classes.
12014 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
12015 be called to return URC_CONTINUE_UNWIND.
12016 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
12017 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
12019 2014-01-20 Robert Dewar <dewar@adacore.com>
12021 * opt.ads: Minor comment update.
12023 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12025 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
12026 constants to the "Local variables" area. Add new constant D. Add
12027 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
12028 to Pref_Typ and update all occurrences. Add circuitry to extract
12029 the discrete_range and the index type and build a range check.
12031 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12033 * gnat1drv.adb (Adjust_Global_Switches): Enable
12034 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
12037 2014-01-20 Thomas Quinot <quinot@adacore.com>
12039 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
12041 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12043 * sem_ch13.adb (Analyze_Aspect_Specifications):
12044 When aspect SPARK_Mode appears on a package body, insert the
12045 generated pragma at the top of the body declarations.
12047 2014-01-20 Robert Dewar <dewar@adacore.com>
12049 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
12050 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
12051 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
12052 sem_ch8.adb, exp_dist.adb: Minor reformatting.
12054 2014-01-20 Yannick Moy <moy@adacore.com>
12056 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
12059 2014-01-20 Pascal Obry <obry@adacore.com>
12061 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
12063 * g-arrspl.adb: Adapt all routine to this new implementation.
12064 (Set): Copy the Slice_Set definition before reusing it.
12066 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12068 * sem_prag.adb (Process_Import_Or_Interface): In
12069 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
12070 (Analyze_Pragma): Ditto for pragma Export.
12071 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
12074 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12076 * einfo.ads: E_Abstract_State is now part of the entities that
12077 can be overloaded. Update type Overloadable_Kind to reflect the
12078 inclusion of abstract states.
12079 * sem_ch6.adb (New_Overloaded_Entity): A function can now
12080 overload an abstract state.
12081 * sem_prag.adb (Analyze_Constituent): Handle the overloading
12082 of states by functions. Use Entity_Of to obtain the entity of
12083 a constituent. (Analyze_Global_Item): Handle the overloading of
12084 states by functions.
12085 (Analyze_Initialization_Item): Handle the
12086 overloading of states by functions. Use Entity_Of to obtain the
12088 (Analyze_Input_Item): Handle the overloading
12089 of states by functions. Use Entity_Of to obtain the entity of an item.
12090 (Analyze_Input_Output): Handle the overloading of states by functions.
12091 (Analyze_Refinement_Clause): Handle the overloading
12092 of states by functions. Use Entity_Of to obtain the entity of an item.
12093 (Appears_In): Use Entity_Of to obtain the entity of an element.
12094 (Check_Usage): Use Entity_Of to obtain the entity of
12095 an item. Add a guard to prevent a crash due to a previous error.
12096 (Resolve_State): New routine.
12098 2014-01-20 Yannick Moy <moy@adacore.com>
12100 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
12101 opt.ads: Minor comments updates.
12103 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12105 * einfo.adb (Non_Limited_View): Applies to abstract states.
12106 (Set_From_Limited_With): Applies to abstract states.
12107 (Set_Non_Limited_View): Applies to abstract states.
12108 (Write_Field17): Output the non-limited view of an abstract state.
12109 * einfo.ads: Update the comment on usage and occurrences in
12110 nodes for attributes From_Limited_With and Non_Limited_View.
12111 * sem_aux.adb (Available_View): This routine can now handle
12113 * sem_aux.ads (Available_View): This routine can now handle
12114 abstract states. Update the comment on usage.
12115 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
12116 of states and variables.
12117 (In_Pragmas_Depends_Or_Global): New routine.
12118 * sem_ch10.adb (Build_Limited_Views): Implement
12119 abstract (limited) views of variables and states.
12120 (Build_Shadow_Entity): This routine is now a procedure. Add
12121 formal parameter Shadow. Update the comment on usage. Add
12122 context-specific decoration for states and variables.
12123 (Decorate_State): New routine. (Decorate_Variable): New routine.
12124 (Find_And_Process_States): New routine.
12125 (Process_Declarations): Renamed to Process_Declarations_And_States.
12126 (Process_Declarations_And_States): Add formal parameters
12127 Pack and Create_Abstract_Views. Update the comment on usage.
12128 (Process_States): New routine.
12129 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
12130 views of states and variables. Match the abstract view of a state
12131 against its corresponding non-abstract view.
12132 (Is_Matching_Input):
12133 Handle abstract views of states and variables. Match the abstract
12134 view of a state against its corresponding non-abstract view.
12135 (Process_Global_Item): Handle abstract views of states and
12138 2014-01-20 Bob Duff <duff@adacore.com>
12140 * sem_ch10.adb (Expand_With_Clause): Don't
12141 recurse on the prefix if the current with-ed name refers to a
12142 package that renames its own parent, eg "package P.Q renames P;".
12144 2014-01-20 Yannick Moy <moy@adacore.com>
12146 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
12147 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
12148 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
12149 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
12150 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
12153 2014-01-20 Yannick Moy <moy@adacore.com>
12155 * sinfo.ads Update documentation of GNATprove mode.
12157 2014-01-20 Yannick Moy <moy@adacore.com>
12159 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
12160 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
12161 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
12162 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
12164 * sem_ch13.adb: Remove blank.
12165 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
12166 subprograms by alias for renamings, not for inherited primitive
12168 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
12170 (Remove_Side_Effects): Apply the removal in
12171 GNATprove mode, for the full analysis of expressions.
12172 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
12174 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
12175 save/restore actions for Expander_Active flag in GNATprove mode,
12176 similar to what is done in ASIS mode.
12177 * frontend.adb (Frontend): Generic bodies are instantiated in
12179 * gnat1drv.adb (Adjust_Global_Switches): Set operating
12180 mode to Check_Semantics in GNATprove mode, although a light
12181 expansion is still performed.
12182 (Gnat1drv): Set Back_End_Mode to
12183 Declarations_Only in GNATprove mode, and later on special case
12184 the GNATprove mode to continue analysis anyway.
12185 * lib-writ.adb (Write_ALI): Always generate ALI files in
12187 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
12189 (SPARK_Mode): Renamed as GNATprove_Mode.
12190 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
12191 tree in GNATprove_Mode.
12192 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
12193 body in GNATprove mode.
12194 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
12196 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
12197 Make sure side effects are removed in GNATprove mode.
12199 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12201 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
12202 for aliased objects with an unconstrained nominal subtype.
12203 * gcc-interface/trans.c (Call_to_gnu): Likewise.
12204 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
12205 <case N_Op_Minus>: Remove useless code.
12206 (Exception_Handler_to_gnu_zcx): Minor tweaks.
12208 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12210 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
12211 Tidy up. For a subtype with discriminants and variant part, if a
12212 variant is statically selected and the fields all have a constant
12213 position, put them in order of increasing position. Likewise if
12214 no variant part but representation clause is present.
12215 * gcc-interface/utils.c (make_packable_type): Robustify.
12216 (maybe_pad_type): Use local variable and tidy up condition. If no
12217 alignment is specified, use the original one.
12218 (create_type_stub_decl): Minor tweak.
12219 (convert) <case VECTOR_CST>: Fix typo.
12220 <case CONSTRUCTOR>: Deal with padding types around the same type.
12221 Do not punt on missing fields.
12222 (unchecked_convert): Call finish_record_type to lay out the special
12223 record types made for conversions from/to problematic integer types.
12224 Bump the alignment of CONSTRUCTORs before converting them to a more
12227 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12229 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
12230 obsolete code for type_annotate_only mode, simplify code and slightly
12231 improve wording of comments.
12233 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
12236 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
12237 as intermediate type.
12238 (UI_To_gnu): Likewise.
12240 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
12242 * gnatvsn.ads (Current_Year): Bump to 2014.
12244 2014-01-02 Tobias Burnus <burnus@net-b.de>
12246 * gnat_ugn.texi: Bump @copying's copyright year.
12248 Copyright (C) 2014 Free Software Foundation, Inc.
12250 Copying and distribution of this file, with or without modification,
12251 are permitted in any medium without royalty provided the copyright
12252 notice and this notice are preserved.