1 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
4 to go down the chain of private derivations.
5 * freeze.adb (Freeze_Entity): Fix typo in comment.
7 2014-08-01 Ed Schonberg <schonberg@adacore.com>
9 * sem_ch3.adb (Access_Type_Declaration): If designated type is
10 a limited view, create a master entity (as is already done for
11 class-wide types) in case the full view designates a type that
13 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
14 and the designated type is a limited view, use the non-limited
17 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
19 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
20 (DECL_FUNCTION_STUB): Likewise.
21 (SET_DECL_FUNCTION_STUB): Likewise.
22 (DECL_PARM_ALT_TYPE): Likewise.
23 (SET_DECL_PARM_ALT_TYPE): Likewise.
24 (TYPE_VAX_FLOATING_POINT_P): Delete.
25 (TYPE_DIGITS_VALUE): Likewise.
26 (SET_TYPE_DIGITS_VALUE): Likewise.
27 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
28 (malloc32_decl): Delete.
29 (build_vms_descriptor): Likewise.
30 (build_vms_descriptor32): Likewise.
31 (fill_vms_descriptor): Likewise.
32 (convert_vms_descriptor): Likewise.
33 (TARGET_ABI_OPEN_VMS): Likewise.
34 (TARGET_MALLOC64): Likewise.
35 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
36 (gnat_to_gnu_entity): Call it to add the original type as a parallel
37 type to the implementation type of a packed array type.
38 <E_Procedure>: Remove now obsolete kludge.
39 <E_Exception>: Delete obsolete comment.
40 <object>: Small tweak.
41 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
42 for the descriptor passing mechanism.
43 (gnat_to_gnu_param): Likewise.
44 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
45 (gnat_print_type): Adjust.
46 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
47 (vms_builtin_establish_handler_decl): Delete.
48 (gnat_vms_condition_handler_decl): Likewise.
49 (establish_gnat_vms_condition_handler): Likewise.
50 (build_function_stub): Likewise.
51 (Subprogram_Body_to_gnu): Do not call above functions.
52 (Call_to_gnu): Remove support for the descriptor passing mechanism.
53 * gcc-interface/utils.c (make_descriptor_field): Delete.
54 (build_vms_descriptor32): Likewise.
55 (build_vms_descriptor): Likewise.
56 (fill_vms_descriptor): Likewise.
57 (convert_vms_descriptor64): Likewise.
58 (convert_vms_descriptor32): Likewise.
59 (convert_vms_descriptor): Likewise.
60 * gcc-interface/utils.c (unchecked_convert): Likewise.
61 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
63 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
65 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
66 type and get_unpadded_type for the longest FP type.
67 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
68 (convert_with_check): Adjust formatting and remove FIXME.
70 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
72 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
73 Do not convert the RM bounds to the base type.
74 (E_Floating_Point_Subtype): Likewise.
75 (E_Array_Subtype): Convert the bounds to the base type.
76 * gcc-interface/trans.c (get_type_length): New function.
77 (Attribute_to_gnu) <Range_Length>: Call it.
79 (Loop_Statement_to_gnu): Convert the bounds to the base type.
80 (gnat_to_gnu) <N_In>: Likewise.
81 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
82 bounds to the base type.
83 (create_range_type): Likewise.
84 (convert): Convert the bounds to the base type for biased types.
85 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
88 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
90 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
91 incorrect implicit type derivation.
92 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
95 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
97 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
98 prefix of attribute Loop_Entry.
99 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
100 Loop_Variant with respect to an enclosing loop (if any).
101 (Contains_Loop_Entry): Update the parameter profile and all
102 calls to this routine.
103 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
104 for the corresponding body before determining the nature of the
105 ultimate alias's declarative node.
107 2014-08-01 Robert Dewar <dewar@adacore.com>
109 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
111 2014-08-01 Robert Dewar <dewar@adacore.com>
113 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
114 constraint error node since it is a list member.
116 2014-08-01 Robert Dewar <dewar@adacore.com>
118 * sem_warn.adb: Minor reformatting.
120 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
122 * einfo.adb (Underlying_Type): Return the underlying full view
123 of a private type if present.
124 * freeze.adb (Freeze_Entity):
125 Build a single freeze node for partial, full and underlying full
127 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
128 missing guard before the access to the Underlying_Full_View.
129 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
130 full view if present.
131 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
133 2014-08-01 Ed Schonberg <schonberg@adacore.com>
135 * sem_res.adb (Resolve_Entry_Call): When an entry has
136 preconditions, the entry call is wrapped in a procedure call
137 that incorporates the precondition checks. To prevent a double
138 expansion, with possible duplication of extra formals, that
139 procedure call must only be pre-analyzed and resolved. Expansion
140 takes place upon return to the caller Resolve_Call.
142 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
144 * sem_res.adb (Resolve_Call): Do not perform
145 GNATprove-specific inlining while within a generic.
147 2014-08-01 Ed Schonberg <schonberg@adacore.com>
149 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
150 case expression with incompatible alternatives, when the first
151 alternative is overloaded.
153 2014-08-01 Ed Schonberg <schonberg@adacore.com>
155 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
156 to create the name of the parameterless call, rather than
157 New_Copy, to preserve the tree structure when the name is a
158 complex expression, e.g. a selected component that denotes a
159 protected operation, whose prefix is itself a selected component.
161 2014-08-01 Ed Schonberg <schonberg@adacore.com>
163 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
164 Unit_Declaration_Node to retrieve body when inlining, to handle
165 properly subprogram child units.
167 2014-08-01 Robert Dewar <dewar@adacore.com>
169 * sem_attr.adb: Minor reformatting.
171 2014-08-01 Vincent Celier <celier@adacore.com>
173 * debug.adb: Minor documentation addition for -dn switch.
175 2014-08-01 Robert Dewar <dewar@adacore.com>
177 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
178 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
179 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
180 In several places, use the Is_OK version as suggested by the spec.
182 2014-08-01 Vincent Celier <celier@adacore.com>
184 * gnatcmd.adb: Revert last change which was not correct.
186 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
188 * freeze.adb (Find_Constant): Ensure that the constant being
189 inspected is still an object declaration (i.e. not a renaming).
191 2014-08-01 Ed Schonberg <schonberg@adacore.com>
193 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
194 An attribute_reference to Loop_Entry denotes an iterator
195 specification: its prefix is an object, as is the case for 'Old.
196 b) If the domain of iteration is an expression whose type has
197 the Iterable aspect defined, this is an iterator specification.
199 2014-08-01 Robert Dewar <dewar@adacore.com>
201 * gnatcmd.adb: Minor reformatting.
203 2014-08-01 Robert Dewar <dewar@adacore.com>
205 * atree.ads (Info_Messages): New counter.
206 * err_vars.ads: Minor comment update.
207 * errout.adb (Delete_Warning_And_Continuations): Deal
208 with new Info_Messages counter.
209 (Error_Msg_Internal): ditto.
210 (Delete_Warning): ditto.
212 (Write_Error_Summary): ditto.
213 (Output_Messages): ditto.
214 (To_Be_Removed): ditto.
215 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
216 (Compilation_Errors): ditto.
217 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
220 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
221 * gnat_ugn.texi: Document that -gnatwe does not affect info
224 2014-08-01 Robert Dewar <dewar@adacore.com>
226 * debug.adb: Document debug switch -gnatd.Z.
227 * sem.adb (Semantics): Force expansion on in no or configurable
230 2014-08-01 Ed Schonberg <schonberg@adacore.com>
232 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
233 unchecked conversion denotes an iterator specification. Such a
234 conversion will be inserted in the context of an inlined call
235 when needed, and its argument is always an object.
237 2014-08-01 Robert Dewar <dewar@adacore.com>
239 * make.adb, makeutl.ads: Minor reformatting.
240 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
243 2014-08-01 Tristan Gingold <gingold@adacore.com>
245 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
247 2014-08-01 Javier Miranda <miranda@adacore.com>
249 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
251 * debug.adb: Updating documentation.
252 * exp_ch6.adb (Expand_Call): Remove assertion.
254 2014-08-01 Robert Dewar <dewar@adacore.com>
256 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
257 sem_res.adb: Minor reformatting.
259 2014-08-01 Vincent Celier <celier@adacore.com>
261 * make.adb (Initialize): Set Keep_Temporary_Files to True when
263 * makeusg.adb: Add line for new switch --keep-temp-files.
264 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
265 * opt.ads (Keep_Temporary_Files): Document that it is also used
266 by gnatmake and gprbuild.
267 * switch-m.adb: Recognize new switch --keep-temp-files.
269 2014-08-01 Tristan Gingold <gingold@adacore.com>
271 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
272 * exp_ch9.adb (Make_Task_Create_Call): ... here.
274 2014-08-01 Vincent Celier <celier@adacore.com>
276 * gnat1drv.adb: Do not try to get the target parameters when
279 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
281 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
282 declaration subject to No_Initialization.
284 2014-08-01 Ed Schonberg <schonberg@adacore.com>
286 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
287 is a subtype with dynamic predicates, or a non-static subtype
289 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
290 expression if subtype has a dynamic predicate.
291 (Constrain_Index): Reject subtype indication if subtype mark
293 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
294 (Make_Index): If index is a subtype indication, itype inhereits
295 predicate flags for subsequent testing.
296 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
297 procedure Check_Predicate_Use, to reject illegal uses of domains
298 of iteration that have dynamic predicates.
299 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
300 indication to which a predicate applies.
301 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
302 prevent cascaded errors when subtype is invalid.
304 2014-08-01 Robert Dewar <dewar@adacore.com>
306 * sem_ch10.adb: Minor reformatting.
308 2014-08-01 Ed Schonberg <schonberg@adacore.com>
310 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
311 because either type may be a subtype of the other.
313 2014-08-01 Vincent Celier <celier@adacore.com>
315 * makeusg.adb: Add documentation for debug switch -dn.
317 2014-08-01 Ed Schonberg <schonberg@adacore.com>
319 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
320 expression with standard operator and type, for pretty-printing
321 use, when in ASIS_Mode. When generating code dimensional analysis
322 is not involved and dimension expressions are handled statically,
323 and other operators are resolved in the usual way.
325 2014-08-01 Ed Schonberg <schonberg@adacore.com>
327 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
328 Parent_Subtype in ASIS mode, leads to several failures.
329 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
330 if the prefix is a type extension, check whether component is
331 declared in the parent type, possibly in a parent unit. Needed
332 in ASIS mode when Parent_Subtype is not set.
334 2014-08-01 Robert Dewar <dewar@adacore.com>
336 * sem_prag.adb: Minor reformatting.
337 * s-regpat.adb: Minor reformatting.
338 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
339 Treat_As_Volatile on constants.
341 2014-08-01 Tristan Gingold <gingold@adacore.com>
343 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
345 2014-08-01 Ed Schonberg <schonberg@adacore.com>
347 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
348 warning on a with_clause created for the renaming of a parent
349 unit in an explicit with_clause.
351 2014-08-01 Ed Schonberg <schonberg@adacore.com>
353 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
354 Set Is_Imported flag at once, to simplify subsequent legality
355 checks. Reject the aspect on an object whose declaration has an
356 explicit initial value.
357 * sem_prag.adb (Process_Import_Or_Interface): Use original node
358 to check legality of an initial value for an imported entity.
359 Set Is_Imported flag in case of error to prevent cascaded errors.
360 Do not set the Is_Imported flag if the pragma comes from an
361 aspect, because it is already done when analyzing the aspect.
363 2014-08-01 Emmanuel Briot <briot@adacore.com>
365 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
367 2014-08-01 Robert Dewar <dewar@adacore.com>
369 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
372 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
374 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
375 checks when the related variable comes from source.
376 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
377 when the related actual parameter comes from source. Update comment.
378 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
379 type of an array of pointers when the designated type is
380 class-wide and its root type is the record being currently frozen.
382 2014-08-01 Ed Schonberg <schonberg@adacore.com>
384 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
385 of renaming declaration created for domain of iteration.
386 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
387 for error messages on aggregates whose index subtypes have
388 predicates. The new placement avoids posting messages on previous
389 subtype declarations rather than on the aggregate itself.
390 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
391 Add_Dispatching_Operation, to handle properly the overriding of
392 the predefined operations on controlled types, when the partial
393 view of a type is not visibly controlled.
395 2014-08-01 Ben Brosgol <brosgol@adacore.com>
397 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
400 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
402 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
403 assertion check as the attribute is defined for all entities.
404 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
405 check as the attribute is defined for all entities.
406 * einfo.ads Update the documentation of attribute
407 Is_Hidden_Non_Overridden_Subprogram.
408 * sem_ch7.adb (Install_Package_Entity): No need to check the
409 entity kind of the Id.
410 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
411 usage. Ensure that the homographs are of the same entity kind
412 and not fully conformant.
413 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
415 2014-08-01 Robert Dewar <dewar@adacore.com>
417 * inline.adb: Minor code reorganization.
418 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
420 2014-08-01 Robert Dewar <dewar@adacore.com>
422 * inline.adb, s-os_lib.ads: Minor reformatting.
424 2014-08-01 Arnaud Charlet <charlet@adacore.com>
426 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
427 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
430 2014-08-01 Yannick Moy <moy@adacore.com>
432 * inline.adb (Cannot_Inline): Issue info message instead of
433 warning for subprograms not inlined in GNATprove mode.
434 * sem_res.adb (Resolve_Call): Take body into account for deciding
435 whether subprogram can be inlined in GNATprove mode or not.
437 2014-08-01 Claire Dross <dross@adacore.com>
439 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
440 of Get_First_Parent_With_External_Axiomatization_For_Entity for
442 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
443 for parameters of packages with external axiomatization.
445 2014-08-01 Robert Dewar <dewar@adacore.com>
447 * sem_res.adb: Minor comment addition.
449 2014-08-01 Arnaud Charlet <charlet@adacore.com>
451 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
452 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
454 * s-os_lib.ads: Minor reformatting.
456 2014-08-01 Arnaud Charlet <charlet@adacore.com>
458 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
459 completely previous code since only GCC back-ends are prepared
460 to handle e.g. 'Machine attribute.
461 * targparm.adb, targparm.ads: Remove remaining refs and
462 handling of OpenVMS_On_Target, VAX_Float_On_Target and
463 RTX_RTSS_Kernel_Module_On_Target.
464 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
467 2014-08-01 Robert Dewar <dewar@adacore.com>
469 * exp_dist.adb, exp_attr.adb: Minor reformatting.
470 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
471 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
472 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
473 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
474 improper use of shall.
476 2014-08-01 Robert Dewar <dewar@adacore.com>
478 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
479 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
480 exp_ch3.adb: Minor reformatting & code reorganization.
482 2014-08-01 Robert Dewar <dewar@adacore.com>
484 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
485 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
486 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
487 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
488 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
490 * gcc-interface/decl.c, gcc-interface/Makefile.in,
491 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
493 2014-08-01 Pascal Obry <obry@adacore.com>
495 * s-os_lib.ads: Rename File_Size to Large_File_Size.
497 2014-08-01 Robert Dewar <dewar@adacore.com>
499 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
500 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
501 a-numaux-libc-x86.ads: Fix bad package header comments.
502 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
503 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
504 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
505 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
506 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
507 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
508 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
509 s-os_lib.adb: Remove VMS-specific code.
511 2014-08-01 Arnaud Charlet <charlet@adacore.com>
513 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
514 previous state in CodePeer_Mode.
516 2014-08-01 Robert Dewar <dewar@adacore.com>
518 * hostparm.ads: Put back definition of OpenVMS as False to aid
519 the transition process.
520 * sem_ch7.adb: Minor reformatting.
521 * prj-env.adb: Minor code fix.
522 * gnat_rm.texi: Complete previous change.
523 * sem_ch3.adb: Minor reformatting.
524 * sem_ch6.adb: Minor reformatting.
525 * sem_elab.adb: Minor reformatting.
526 * exp_strm.adb: Complete previous change.
528 2014-08-01 Vincent Celier <celier@adacore.com>
530 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
531 warning when a constant is unreferenced and its type has pragma
532 Unreferenced_Objects.
534 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
536 * einfo.adb: Flag2 is now known as
537 Is_Hidden_Non_Overridden_Subprogram.
538 (Is_Hidden_Non_Overridden_Subprogram): New routine.
539 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
540 (Write_Entity_Fields): Output Flag2.
541 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
542 along with occurrences in entities.
543 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
544 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
546 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
547 declared non-overriden homographs into visibility.
548 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
549 implicitly declared non-overriden homographs.
550 (Hide_Non_Overridden_Subprograms): New routine.
552 2014-08-01 Robert Dewar <dewar@adacore.com>
554 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
556 * prj-conf.adb: Minor reformatting.
557 * xr_tabls.adb (Read_File): Restore code which was enabled on
558 non VMS platforms before.
559 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
560 * sem_ch5.adb: Minor reformatting.
561 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
562 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
563 Remove VMS-specific code.
565 2014-08-01 Vincent Celier <celier@adacore.com>
567 * make.adb (Await_Compile): Remove loop that was only needed
570 2014-08-01 Robert Dewar <dewar@adacore.com>
572 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
573 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
574 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
575 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
576 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
577 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
578 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
579 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
580 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
581 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
582 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
583 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
584 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
585 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
586 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
587 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
588 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
589 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
590 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
591 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
592 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
593 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
594 specific code and comments.
596 2014-08-01 Ed Schonberg <schonberg@adacore.com>
598 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
599 Check_Reverse_Iteration, to verify the legality of the Reverse
600 indicator on various container types, and to detect illegal
601 reverse iterations on containers that only supoort forward
604 2014-08-01 Vincent Celier <celier@adacore.com>
606 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
607 procedure GNATCmd the relevant declarations from packages VMS_Cmds
609 * gnatcmd.ads: Update comments to remove any trace of VMS
611 2014-08-01 Ed Schonberg <schonberg@adacore.com>
613 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
614 defaulted actual that is an operator, before building wrapper
615 for it in GNATprove mode. Restrict construction of wrapper to
616 actuals that are operators.
618 2014-08-01 Vincent Celier <celier@adacore.com>
620 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
621 specific packages no longer needed.
623 2014-08-01 Pascal Obry <obry@adacore.com>
625 * s-os_lib.ads (System.CRTL): Move with clause to body.
626 (File_Size): New type.
627 (File_Length64): Use it.
628 (File_Length): Restore previous spec returning a Long_Integer.
629 * s-os_lib.adb (System.CRTL): Move with clause here.
631 2014-08-01 Vincent Celier <celier@adacore.com>
633 * mlib-prj.adb: Update comments to remove any mention of VMS.
635 2014-08-01 Arnaud Charlet <charlet@adacore.com>
637 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
638 xgnatugn.adb and ug_words.
640 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
642 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
643 expansion can be avoid for Machine, Model and Rounding.
644 (Is_Inline_Floating_Point_Attribute): Return true for Machine
645 & Model, as well as Rounding if wrapped in a conversion to an
647 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
648 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
649 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
650 * gcc-interface/misc.c (enumerate_modes): Compute it.
651 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
652 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
654 (Attribute_to_gnu) <Attr_Model>: New case.
655 <Attr_Machine>): Likewise.
656 (convert_with_check): Test
657 fp_arith_may_widen variable.
659 2014-08-01 Pascal Obry <obry@adacore.com>
661 * adaint.h (GNAT_FOPEN): New definition for Windows.
662 (GNAT_OPEN): Likewise.
663 (GNAT_STAT): Likewise.
664 (GNAT_FSTAT): Likewise.
665 (GNAT_LSTAT): Likewise.
666 (GNAT_STRUCT_STAT): Likewise.
667 * adaint.c (__gnat_stat): Fix computation of file size for
670 2014-08-01 Vincent Celier <celier@adacore.com>
672 * Makefile.rtl: Minor comment update.
674 2014-08-01 Vincent Celier <celier@adacore.com>
676 * Make-generated.in: Remove dependencies for vms-help.
678 2014-08-01 Gary Dismukes <dismukes@adacore.com>
680 * makeutl.ads, opt.ads: Minor grammar fixes.
681 * makeutl.adb: Minor code reorganization.
683 2014-08-01 Arnaud Charlet <charlet@adacore.com>
685 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
686 gnatsym.adb: Remove gnatsym (VMS only tool).
688 2014-08-01 Ben Brosgol <brosgol@adacore.com>
690 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
691 conditionalization from gnat_ugn.texi and projects.texi, and updated
692 (considerably simplified) xgnatugn.adb, to be removed soon.
694 2014-08-01 Vincent Celier <celier@adacore.com>
696 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
697 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
698 instead of Debug.Debug_Flag_S.
699 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
700 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
702 * makeutl.ads (No_Exit_Message_Option): New constant string
703 for switch --no-exit-message.
704 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
705 * switch-m.adb (Scan_Make_Switches): Recognize new switch
708 2014-08-01 Arnaud Charlet <charlet@adacore.com>
710 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
711 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
713 2014-08-01 Javier Miranda <miranda@adacore.com>
715 * inline.ads (Inlined_Calls, Backend_Calls,
716 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
717 moved to inline.adb (Cannot_Inline): Update documentation.
718 (Check_And_Build_Body_To_Inline): Renamed.
719 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
720 * inline.adb (Check_Inlining_Restrictions): New local variable.
721 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
722 Backend_Not_Inlined_Subps): Declarations moved here
723 from inline.ads (Number_Of_Statements): Removed.
724 (Remove_Pragmas): Avoid duplicated version of this subprogram.
725 (Build_Body_To_Inline): Code cleanup.
726 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
727 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
728 (Check_Body_To_Inline): Removed.
729 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
730 (Has_Excluded_Declaration): No action if not
731 Check_Inlining_Restrictions.
732 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
733 (Initialize): Initialize the lists of inlined calls and subprograms.
734 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
735 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
736 to Check_And_Build_Body_To_Inline since it has been renamed as
737 Check_And_Split_Unconstrained_Function
738 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
740 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
742 2014-08-01 Vincent Celier <celier@adacore.com>
744 * debug.adb: Add documentation for new debug switch -ds.
745 * make.adb (List_Bad_Compilations): Do not issue any message
746 when switch -ds is specified.
747 * makeutl.adb (Fail_Program): Do not issue any message when
749 (Finish_Program): Ditto.
751 2014-08-01 Robert Dewar <dewar@adacore.com>
753 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
754 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
755 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
756 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
757 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
758 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
759 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
760 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
761 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
762 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
763 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
764 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
765 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
766 s-tratas.ads: Minor fix to copyright notices.
768 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
770 * sinfo.ads: Remove long obsolete comment.
771 2014-08-01 Ed Schonberg <schonberg@adacore.com>
773 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
774 * sem_ch3.adb: Minor reformatting.
776 2014-08-01 Pascal Obry <obry@adacore.com>
778 * cstreams.c: Only enable large file support on know supported
779 platforms. Add missing defines/includes.
781 2014-08-01 Ed Schonberg <schonberg@adacore.com>
783 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
784 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
785 on generic units that contain constructs that forbid subtypes
787 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
788 Inherit flags indicating the presence of predicates in subtype
789 declarations with and without constraints.
790 (Inherit_Predicate_Flags): Utility for the above.
791 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
792 indicate that the actual cannot have predicates, and preserve
793 warning. In an instance, report error if actual has predicates
794 and the construct appears in a package declaration.
795 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
796 for an actual with predicates, if the corresponding formal
797 carries No_Predicate_On_Actual or (in the case of a loop)
798 No_Dynamic_Predicate_On_Actual.
799 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
800 Static_Predicate function if the type is non-static (in the
801 presence of previous errors),
802 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
803 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
804 generic contract on actuals that cannot have predicates.
806 2014-08-01 Pascal Obry <obry@adacore.com>
808 * a-direct.adb (C_Size): Returns an int64.
809 * osint.adb (System.CRTL): New with clause.
810 (File_Length.Internal): Returns an int64.
811 * s-os_lib.ads (File_Length): Returns an int64.
813 2014-08-01 Robert Dewar <dewar@adacore.com>
815 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
816 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
817 osint.adb, krunch.adb: Minor reformatting.
819 2014-08-01 Robert Dewar <dewar@adacore.com>
821 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
822 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
823 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
824 Remove VMS-specific code.
825 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
827 2014-08-01 Arnaud Charlet <charlet@adacore.com>
829 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
830 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
831 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
832 mlib.ads, tempdir.adb: Remove VMS handling.
834 2014-08-01 Pascal Obry <obry@adacore.com>
836 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
837 (__gnat_named_file_length): Likewise.
838 (__gnat_file_length_attr): Likewise.
839 * a-direct.adb (C_Size): Use size_t as returned type.
840 * osint.adb (File_Length): Adjust spec for Internal routine
842 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
843 (System.CRTL): With claused moved to spec.
844 * s-os_lib.ads (System.CRTL): With clause moved to here.
846 2014-08-01 Pascal Obry <obry@adacore.com>
848 * adaint.h, adaint.c (__gnat_open): Added.
849 * s-crtl.ads (open): Import __gnat_open for large file support.
851 2014-08-01 Robert Dewar <dewar@adacore.com>
853 * sem_case.adb (Dup_Choice): Improve message for integer constants.
855 2014-08-01 Arnaud Charlet <charlet@adacore.com>
857 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
859 2014-08-01 Pascal Obry <obry@adacore.com>
861 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
862 * adaint.c (GNAT_OPEN): Uses new macro where needed.
864 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
866 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
868 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
869 * gcc-interface/gigi.h: Update comment.
871 2014-07-31 Javier Miranda <miranda@adacore.com>
873 * debug.adb Remove documentation of -gnatd.k (no longer needed).
874 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
875 * inline.ads (Backend_Inlined_Subps): New
876 Elist. (Backend_Not_Inlined_Subps): New Elist.
877 (Has_Excluded_Declaration): Declaration previously located in
878 * inline.adb (Has_Excluded_Statement): Declaration previously
879 located in inline.adb
880 * inline.adb (Has_Single_Return): Moved out of
881 Build_Body_To_Inline to avoid having duplicated code.
882 (Number_Of_Statements): New subprogram.
883 (Register_Backend_Inlined_Subprogram): New subprogram.
884 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
885 (Add_Inlined_Subprogram): Register backend inlined subprograms and
886 also register subprograms that cannot be inlined by the backend.
887 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
888 to avoid having duplicated code. Replace occurrences of
889 Debug_Flag_Dot_K by Back_End_Inlining.
890 * sem_res.adb (Resolve_Call): Code cleanup.
891 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
892 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
893 (List_Inlining_Info): Add listing of subprograms passed to the
894 backend and listing of subprograms that cannot be inlined by
896 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
897 Debug_Flag_Dot_K by Back_End_Inlining.
899 2014-07-31 Robert Dewar <dewar@adacore.com>
901 * nlists.ads: Minor code fix (remove unwise Inline for
904 2014-07-31 Arnaud Charlet <charlet@adacore.com>
906 * einfo.adb: Remove VMS specific code.
907 * exp_attr.adb: Remove VAX specific code.
908 * set_targ.adb: Remove handling of VAX_Float.
909 * sem_vfpt.adb: Remove references to Vax_Native.
910 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
912 2014-07-31 Robert Dewar <dewar@adacore.com>
914 * sem_ch4.adb: Minor reformatting.
916 2014-07-31 Arnaud Charlet <charlet@adacore.com>
918 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
919 to VMS. Misc clean ups.
920 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
922 2014-07-31 Robert Dewar <dewar@adacore.com>
924 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
925 exp_prag.adb, frontend.adb, interfac.ads,
926 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
927 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
928 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
929 snames.ads-tmpl: Remove obsolete VMS-specific code.
931 2014-07-31 Robert Dewar <dewar@adacore.com>
933 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
935 2014-07-31 Arnaud Charlet <charlet@adacore.com>
937 * a-intnam-linux.ads: Minor: update obsolete comments.
938 * s-taasde.adb: Minor: fix comment header.
940 2014-07-31 Arnaud Charlet <charlet@adacore.com>
942 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
943 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
944 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
945 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
946 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
947 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
948 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
949 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
950 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
951 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
952 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
953 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
954 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
955 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
956 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
957 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
958 * namet.h (Is_Non_Ada_Error): Remove.
960 2014-07-31 Robert Dewar <dewar@adacore.com>
962 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
965 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
967 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
968 which demonstrates the expansion of while loops subject to
969 attribute 'Loop_Entry. The condition of a while loop along with
970 related condition actions is now wrapped in a function. Instead
971 of repeating the condition, the expansion now calls the function.
973 2014-07-31 Ed Schonberg <schonberg@adacore.com>
975 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
976 error when reporting of missing values in a case statement for
977 a type with a static predicate.
978 (Check_Choices): Reject a choice given by a subtype to which a
979 Dynamic_Predicate applies.
980 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
981 Has_Dynamic_Predicate_Aspect flag from parent.
983 2014-07-31 Ed Schonberg <schonberg@adacore.com>
985 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
986 cannot apply to a subtype of an incomplete type.
987 (Is_Static_Choice): Treat an Others_Clause as static. The
988 staticness of the expression and of the range are checked
991 2014-07-31 Pascal Obry <obry@adacore.com>
993 * adaint.h (__gnat_ftell64): Added.
994 (__gnat_fseek64): Added.
996 * cstreams.c (__int64): Removed.
998 2014-07-31 Pascal Obry <obry@adacore.com>
1000 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
1001 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
1002 (ftell64): Always returns a 64bit value.
1003 * cstreams.c (int64): New definition.
1004 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
1005 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
1006 uses ftello() on UNIX.
1007 (__gnat_fseek64): Offset is always a 64bit value. The
1008 implementation now uses fseeko() on UNIX.
1009 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
1010 always use fseek64 to set the offset.
1011 (Size): Simplify code, always use fseek64/ftell64.
1012 * s-direio.ads (Count): Now an int64.
1013 * g-socket.ads (Vector_Element): Adjust definition for Length
1014 to be a size_t. This matches the C definition and avoid using
1015 a 64bit integer on 32bit platforms now that Count is always 64bit.
1016 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
1017 (C_Recvmsg): Change some conversion to account for change in
1019 (C_Sendmsg): Likewise.
1021 2014-07-31 Robert Dewar <dewar@adacore.com>
1023 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
1024 * debug.adb: Remove documentation of -gnatdm flag.
1025 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
1028 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1030 * lib-writ.adb (Write_Unit_Information): Fix case where U =
1033 2014-07-31 Claire Dross <dross@adacore.com>
1035 * exp_util.adb, exp_util.ads
1036 (Get_First_Parent_With_External_Axiomatization_For_Entity):
1037 New routine to find the first parent of an entity with
1038 a pragma Annotate (GNATprove, External_Axiomatization).
1039 (Has_Annotate_Pragma_For_External_Axiomatization): New function
1040 to check if a package has a pragma Annotate (GNATprove,
1041 External_Axiomatization).
1042 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
1043 flag on the entity for the declaration created for a formal
1044 subprogram in an instance. This is a renaming declaration,
1045 or in GNATprove_Mode the declaration of an expression function
1046 that captures the axiomatization of the actual.
1047 * sem_ch6.adb (Analyze_Expression_Function): For a
1048 Generic_Actual_Subprogram, place body immediately after the
1049 declaration because it may be used in a subsequent declaration
1051 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
1052 the actual is a function, not an operator. Handle functions with
1053 one and two parameters and binary and unary operators.
1055 2014-07-31 Pascal Obry <obry@adacore.com>
1057 * cstreams.c (__gnat_is_regular_file_fd): Removed.
1058 * adaint.c (__gnat_is_regular_file_fd): Added.
1060 2014-07-31 Robert Dewar <dewar@adacore.com>
1062 * exp_strm.adb: Minor reformatting.
1064 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1066 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
1067 Analyze_Associations, to create a wrapper around operators that
1068 are actuals to formal subprograms. This is done in GNATProve
1069 mode in order to propagate the contracts of the operators to
1070 the body of the instance.
1072 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1074 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
1075 legal if within an aspect specification for a generic subprogram.
1077 2014-07-31 Javier Miranda <miranda@adacore.com>
1079 * gnat1drv.adb (Back_End_Inlining): Set to false if
1080 Suppress_All_Inlining is set.
1081 * debug.adb: Adding documentation for -gnatd.z.
1082 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
1083 processing to -gnatn1 for calls to Inline_Always routines.
1084 (Add_Inlined_Subprogram): Remove previous patch.
1086 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1088 * sem_ch13.adb (Check_One_Function): Apply properly the static
1089 semantic rules for indexing aspects and the functions they denote.
1091 2014-07-31 Javier Miranda <miranda@adacore.com>
1093 * debug.adb: Complete documentation of -gnatd.z.
1095 2014-07-31 Bob Duff <duff@adacore.com>
1097 * gnat_ugn.texi: Minor doc fixes.
1099 2014-07-31 Robert Dewar <dewar@adacore.com>
1101 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
1104 2014-07-31 Tristan Gingold <gingold@adacore.com>
1106 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
1107 (Packed_Bytes1): Make component aliased.
1109 2014-07-31 Robert Dewar <dewar@adacore.com>
1111 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
1113 2014-07-31 Robert Dewar <dewar@adacore.com>
1115 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
1118 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1120 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
1121 on array references here, now done more selectively in trans.c.
1123 2014-07-31 Doug Rupp <rupp@adacore.com>
1125 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
1127 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1129 * sem_util.adb (Is_Effectively_Volatile): New routine.
1131 2014-07-31 Fedor Rybin <frybin@adacore.com>
1133 * gnat_ugn.texi: Document --test-duration option for gnattest.
1135 2014-07-31 Javier Miranda <miranda@adacore.com>
1136 Eric Botcazou <ebotcazou@adacore.com>
1138 * opt.ads (Back_End_Inlining): New variable which controls
1139 activation of inlining by back-end expansion.
1140 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
1141 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
1142 the body to be inlined by the frontend if Back_End_Inlining
1144 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
1145 (Expand_Call): If backend inlining is enabled let the backend to
1146 handle inlined subprograms.
1147 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
1148 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
1149 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
1150 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
1152 * debug.adb Document -gnatd.z
1153 * fe.h Import Back_End_Inlining variable.
1154 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
1155 enabled then declare attribute "always inline"
1156 * gcc-interface/decl.c, gcc-interface/trans.c,
1157 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
1159 2014-07-31 Robert Dewar <dewar@adacore.com>
1161 * a-ngelfu.ads: Minor comment fix.
1163 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1165 * freeze.adb (Freeze_Record_Type): Replace all calls to
1166 Is_SPARK_Volatile with Is_Effectively_Volatile and update
1168 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
1169 Replace all calls to Is_SPARK_Volatile with
1170 Is_Effectively_Volatile and update related comments.
1171 * sem_ch5.adb (Analyze_Iterator_Specification,
1172 Analyze_Loop_Parameter_Specification): Replace all calls to
1173 Is_SPARK_Volatile with Is_Effectively_Volatile and update
1175 * sem_ch6.adb (Process_Formals): Replace all calls to
1176 Is_SPARK_Volatile with Is_Effectively_Volatile and update
1178 * sem_ch12.adb (Instantiate_Object): Replace the call to
1179 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
1180 and update related comment.
1181 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
1182 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
1183 with Is_Effectively_Volatile and update related comments.
1184 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
1185 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
1186 update related comments.
1187 * sem_util.adb (Has_Enabled_Property,
1188 Variable_Has_Enabled_Property): Replace all calls
1189 to Is_SPARK_Volatile with Is_Effectively_Volatile and
1190 update related comments.
1191 (Is_Effectively_Volatile): New routine.
1192 (Is_Effectively_Volatile_Object): New routine.
1193 (Is_SPARK_Volatile): Removed.
1194 (Is_SPARK_Volatile_Object): Removed.
1195 * sem_util.ads (Is_Effectively_Volatile): New routine.
1196 (Is_Effectively_Volatile_Object): New routine.
1197 (Is_SPARK_Volatile): Removed.
1198 (Is_SPARK_Volatile_Object): Removed.
1200 2014-07-31 Pascal Obry <obry@adacore.com>
1202 * s-fileio.adb (Open): Make sure a shared file gets inserted into
1203 the global list atomically. This ensures that the file descriptor
1204 won't be freed because another tasks is closing the file.
1206 2014-07-31 Robert Dewar <dewar@adacore.com>
1208 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
1209 generation of _FIRST and _LAST variables even in GNATprove_Mode.
1210 * gnat_ugn.texi: Minor editing.
1211 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
1212 aggregate is marked Comes_From_Source if argument is CFS.
1214 2014-07-31 Pascal Obry <obry@adacore.com>
1216 * s-fileio.adb: Remove obsolete comment.
1218 2014-07-31 Vincent Celier <celier@adacore.com>
1220 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
1221 overriding keyword before function to avoid error when compiler
1222 is called with -gnatyO (check overriding indicators).
1224 2014-07-31 Tucker Taft <taft@adacore.com>
1226 * gnat_ugn.texi: Add a paragraph pointing the reader
1227 to the "plugins" example.
1229 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1231 * freeze.adb (Freeze_Expression): Document the
1232 purpose of the parent chain traversal.
1234 2014-07-31 Robert Dewar <dewar@adacore.com>
1236 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
1237 unconstrained fpt ops.
1239 2014-07-31 Pascal Obry <obry@adacore.com>
1241 * s-fileio.adb (Open): Make sure a shared file gets inserted into
1242 the global list atomically. This ensures that the file descriptor
1243 won't be freed because another tasks is closing the file.
1245 2014-07-31 Vincent Celier <celier@adacore.com>
1247 * projects.texi: Minor spelling error fix.
1249 2014-07-31 Robert Dewar <dewar@adacore.com>
1251 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
1252 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
1254 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
1255 * restrict.adb (Process_Restriction_Synonyms): Add handling
1256 of No_Elaboration_Code_All.
1257 * restrict.ads (Process_Restriction_Synonyms): Now handles
1258 No_Elaboration_Code_All.
1259 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
1260 No_Elaboration_Code_All.
1261 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
1262 Handle setting of No_Elab_Code in unit information. Handle
1263 No_Elaboration_Code_All.
1264 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
1266 (Name_No_Elaboration_Code_All): New name for pragma processing.
1268 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1270 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
1271 types with a null range and use the Esize of the component
1272 instead of its RM_Size to identify appropriate values.
1274 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1276 * freeze.adb Add with and use clause for Aspects.
1277 (Freeze_Expression): Emit an error when a volatile constant lacks
1278 Boolean aspect Import.
1279 (Has_Boolean_Aspect_Import): New routine.
1281 2014-07-31 Gary Dismukes <dismukes@adacore.com>
1283 * exp_util.adb: Minor reformatting.
1285 2014-07-31 Vincent Celier <celier@adacore.com>
1287 * errutil.adb (Error_Msg): Make sure that all components of
1288 the error message object are initialized.
1290 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1292 * sem_ch4.adb (Try_Container_Indexing): If the container type is
1293 class-wide, use specific type to locate iteration primitives.
1294 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
1295 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
1296 Minor error message reformating.
1297 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
1298 aspect for a derived type.
1300 2014-07-31 Robert Dewar <dewar@adacore.com>
1302 * debug.adb: Document debug flag d.X.
1304 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1306 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
1307 * sem_util.adb (Find_Specific_Type): If type is untagged private,
1308 retrieve full view so that primitive operations can be located.
1309 * exp_disp.adb Move Find_Specific_Type to sem_util.
1310 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
1311 Find_Specific_Type to locate primitive equality.
1312 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
1313 type does not require initialization.
1314 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
1315 body all visibility is established, and the enclosing package
1316 declarations must not be installed.
1318 2014-07-31 Yannick Moy <moy@adacore.com>
1320 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
1321 Make subprogram public.
1323 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1325 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
1326 predicate Discriminated_Size, to distinguish between private
1327 components that depend on discriminants from those whose size
1328 depends on some other non-static expression.
1330 2014-07-31 Nicolas Setton <setton@adacore.com>
1332 * g-exptty.adb (Close): Fix binding to Waitpid: use the
1335 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1337 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
1338 in a discrete range, when 'range was probably intended.
1340 2014-07-31 Robert Dewar <dewar@adacore.com>
1342 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
1344 2014-07-31 Robert Dewar <dewar@adacore.com>
1346 * frontend.adb: Minor reformatting.
1347 * sem.adb: Minor reformatting.
1348 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
1349 identifiers on rewrite.
1350 * par.adb: Minor comment updates.
1351 * a-ngelfu.adb (Cos): Minor simplification.
1352 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
1353 and recovery for bad aspect.
1354 * exp_ch3.adb: Code clean up.
1355 * sem_util.ads: Minor comment correction.
1356 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
1357 * sem_ch3.adb: Code clean up.
1358 * binderr.ads: Minor comment correction.
1360 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1362 * exp_disp.adb (Expand_Interface_Conversion): A call whose
1363 prefix is a static conversion to an interface type that is not
1364 class-wide is not dispatching.
1366 2014-07-31 Robert Dewar <dewar@adacore.com>
1368 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
1369 s-traceb-mastop.adb: Minor reformatting.
1371 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1373 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
1374 expansion, to handle properly visibility of selected components
1377 2014-07-31 Robert Dewar <dewar@adacore.com>
1379 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
1380 * par-ch2.adb (P_Pragma): Set Inside_Depends.
1381 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
1382 Check_Unary_Plus_Or_Minus.
1383 * scans.ads (Inside_Depends): New flag.
1384 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
1385 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
1386 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
1387 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
1388 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
1389 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
1390 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
1392 2014-07-31 Javier Miranda <miranda@adacore.com>
1394 * s-vaflop.adb Move the body of function T_To_G before
1395 T_To_D. Required for frontend inlining.
1396 * inline.adb (Has_Excluded_Contract): New subprogram used to
1397 check if a subprogram inlined by the frontend has contracts
1398 which cannot be inlined.
1400 2014-07-31 Bob Duff <duff@adacore.com>
1402 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
1403 (Call_Chain): Add 1 to number of frames to skip, to account for
1404 the fact that there's one more frame on the stack.
1405 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
1407 2014-07-31 Robert Dewar <dewar@adacore.com>
1409 * checks.adb (Enable_Overflow_Check): More precise setting of
1410 Do_Overflow_Check flag for division.
1412 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1414 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
1415 array types with implementation type.
1417 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1419 * sem_ch10.adb (Process_State): Remove local variable Name. Add
1420 local variable Decl. Partially declare an abstract state by
1421 generating an entity and storing it in the state declaration.
1422 * sem_prag.adb (Create_Abstract_State): Fully declare a
1423 semi-declared abstract state.
1425 2014-07-31 Robert Dewar <dewar@adacore.com>
1427 * prj-nmsc.adb: Minor reformatting.
1429 2014-07-31 Bob Duff <duff@adacore.com>
1431 * s-tasdeb.adb (System.Tasking.Debug): Remove
1432 all usage of the secondary stack from this package.
1434 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1436 * freeze.adb (Freeze_Expression): Update the loop in charge
1437 of finding a proper insertion place for freeze nodes to handle
1438 N_Expression_With_Actions nodes.
1440 2014-07-31 Robert Dewar <dewar@adacore.com>
1442 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
1445 2014-07-31 Pascal Obry <obry@adacore.com>
1447 * prj-nmsc.adb: Minor reformatting.
1449 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1451 * sem_util.adb (Has_Preelaborable_Initialization): Check that
1452 type is tagged before checking whether a user-defined Initialize
1453 procedure is present.
1455 2014-07-31 Gary Dismukes <dismukes@adacore.com>
1457 * a-ngelfu.ads (Sqrt): Augment postcondition.
1459 2014-07-31 Pascal Obry <obry@adacore.com>
1461 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
1462 directory and ALI directory must be different than all object
1463 and library directories of aggregated projects.
1465 2014-07-31 Vincent Celier <celier@adacore.com>
1467 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
1468 to package body, as it is not called from outside. Remove argument
1469 Project_Tree, no longer used. When runtime cannot be found,
1470 call Raise_Invalid_Config instead of failing the program.
1472 2014-07-31 Robert Dewar <dewar@adacore.com>
1474 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
1476 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
1479 2014-07-31 Robert Dewar <dewar@adacore.com>
1481 * gnat_ugn.texi: Document new switch -gnato0.
1482 * sem_ch3.ads: Minor reformatting.
1483 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
1484 (we do not want overflow checks when incrementing elaboration
1486 * einfo.ads: Minor reformatting.
1488 2014-07-31 Robert Dewar <dewar@adacore.com>
1490 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
1491 * s-arit64.adb: Minor reformatting.
1493 2014-07-31 Robert Dewar <dewar@adacore.com>
1495 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
1496 checking is enabled except in GNAT_Mode.
1497 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
1498 (suppress overflow checks).
1500 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1502 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
1503 invariant procedure for an internally generated subtype that is
1504 created for an object of a class-wide type.
1506 2014-07-31 Vincent Celier <celier@adacore.com>
1508 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
1510 2014-07-31 Gary Dismukes <dismukes@adacore.com>
1512 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
1513 exp_disp.adb: Minor reformatting.
1515 2014-07-31 Robert Dewar <dewar@adacore.com>
1517 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
1518 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
1519 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
1522 2014-07-31 Robert Dewar <dewar@adacore.com>
1524 * sem_ch13.adb: Minor reformatting.
1526 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1528 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
1529 is an unchecked_union, warn that invariants will not be checked
1530 on components that have them.
1532 2014-07-31 Robert Dewar <dewar@adacore.com>
1534 * freeze.adb (Freeze_Entity): Check for error of
1535 Type_Invariant'Class applied to a untagged type.
1536 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
1537 as null body, so that we perform error checks even if expansion
1540 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1542 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
1543 is already present, nothing to do.
1544 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
1545 component, check whether the access type has an invariant before
1546 checking the designated type.
1547 (Build_Record_Invariant_Proc): Change suffix of generated
1548 name to prevent ambiguity when record type has invariants
1549 in addition to those of components, and two subprograms are
1550 constructed. Consistent with handling of array types.
1551 (Insert_Component_Invariant_Checks): Build invariant procedure
1552 body when one has not been created yet, in the case of composite
1553 types that are completions and whose full declarations carry
1556 2014-07-30 Thomas Quinot <quinot@adacore.com>
1558 * gnat_rm.texi: Minor doc fixes.
1560 2014-07-30 Robert Dewar <dewar@adacore.com>
1562 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
1564 2014-07-30 Vincent Celier <celier@adacore.com>
1566 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
1568 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
1569 message to report that a directory cannot be created, to avoid
1570 processing of the directory path that may contains special
1571 insertion characters.
1573 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1575 * a-crdlli.ads: Place declaration of Empty_List after full type
1576 declaration for Curosr, to prevent freezing error.
1578 2014-07-30 Robert Dewar <dewar@adacore.com>
1580 * get_targ.adb: Minor code reorganization.
1581 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
1584 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1586 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
1587 not Program_Error, when attempting to remove an element not in
1588 the set. This is the given semantics for all set containers.
1590 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1592 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
1593 element is not present in tree return rather than violating
1594 an assertion. Constraint_Error will be raised in the caller if
1595 element is not in the container.
1597 2014-07-30 Arnaud Charlet <charlet@adacore.com>
1599 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
1600 (elab body): Add provision for default target config file.
1601 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
1603 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1605 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
1606 when attempting to remove an element not in the set. This is
1607 the given semantics for all set containers.
1608 * a-cborse.adb (Delete): Attempt removal first, to check for
1609 tampering, before checking whether this is an attempt to
1610 delete a non-existing element, and in fthe latter case raise
1613 2014-07-30 Vincent Celier <celier@adacore.com>
1615 * prj-proc.adb (Recursive_Process): Do not create a new
1616 Project_Id if the project is already in the list of projects of
1619 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1621 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
1622 whose type is an incomplete formal type.
1623 (Analyze_Return_Type): Reject a return type that is an untagged
1624 imcomplete formal type.
1625 (Process_Formals): Reject a formal parameter whose type is an
1626 untagged formal incomplete type.
1627 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
1628 an untagged formal incomplete type.
1630 2014-07-30 Robert Dewar <dewar@adacore.com>
1632 * gnat_ugn.texi: Minor spelling correction.
1633 * makeutl.adb: Minor code reorganization.
1634 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
1636 2014-07-30 Robert Dewar <dewar@adacore.com>
1638 * einfo.ads (Has_Unchecked_Union): Document that this is used
1639 to check for illegal Valid_Scalars attribute references.
1640 * exp_attr.adb (Build_Record_VS_Func): New function
1641 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
1643 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
1644 Unchecked_Union Add note on 'Valid_Scalars generating a lot
1646 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
1647 error on attempt to apply Valid_Scalars to Unchecked_Union type.
1649 2014-07-30 Steve Baird <baird@adacore.com>
1651 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
1652 of A(I..J)(K) in CodePeer_Mode.
1654 2014-07-30 Ben Brosgol <brosgol@adacore.com>
1656 * gnat_ugn.texi: Fix typo.
1658 2014-07-30 Thomas Quinot <quinot@adacore.com>
1660 * lib-writ.ads: document format change.
1662 2014-07-30 Pascal Obry <obry@adacore.com>
1664 * prj-util.adb (For_Interface_Sources): Do not
1665 include sources from withed externally built projects.
1667 2014-07-30 Robert Dewar <dewar@adacore.com>
1669 * lib.adb: Minor reformatting.
1670 * prj-util.adb: Minor reformatting.
1672 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1674 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
1675 that depends on discriminants, and which is given by an others
1676 clause, create an explicit subtype with the discriminant values
1677 of the enclosing aggregate, because the backend cannot otherwise
1678 retrieve the actual bounds of the array.
1680 2014-07-30 Fedor Rybin <frybin@adacore.com>
1682 * gnat_ugn.texi: Improve gnattest documentation.
1684 2014-07-30 Pascal Obry <obry@adacore.com>
1686 * makeutl.adb (Insert_Project_Sources): Properly handle sources
1687 that are aggregated. We want to include sources not only part
1688 of libraries but also if part of an aggregated project from an
1690 * prj.adb (For_Project_And_Aggregated_Context): Properly check
1691 state of root project.
1693 2014-07-30 Thomas Quinot <quinot@adacore.com>
1695 * lib-load.ads: Minor reformatting.
1696 * sinfo.ads (Library_Unit): Update comment.
1697 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
1698 is redundant. Instead used the pragma Node_Id directly as the
1701 2014-07-30 Thomas Quinot <quinot@adacore.com>
1703 * lib.adb (Store_Note): Store only notes that do not come from
1704 an instance, and that are in the extended main source unit.
1705 * lib-writ (Write_Unit_Information): Annotations from subunits
1706 must be emitted along with those for the main unit, and they
1707 must carry a specific file name.
1708 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
1709 Unit_Id for the source file containing the pragma, as in the
1710 case of annotations from subunits we might not have a readily
1712 * ali.adb (Scan_ALI): Account for above change in data structure.
1714 2014-07-30 Vincent Celier <celier@adacore.com>
1716 * makeutl.adb (Insert_Project_Sources): When the library project
1717 is an aggregate Stand-Alone Library, insert in the queue the
1718 Ada interface units, with Closure set to True;
1720 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1722 * sem_util.adb: Fix minor typo.
1723 * makeutl.adb: Minor reformatting.
1725 2014-07-30 Robert Dewar <dewar@adacore.com>
1727 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
1729 2014-07-30 Yannick Moy <moy@adacore.com>
1731 * checks.ads: Fix typo in comment.
1733 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
1735 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
1736 entities that materialize range bounds, if any.
1738 2014-07-30 Vincent Celier <celier@adacore.com>
1740 * projects.texi: Minor spelling fix.
1742 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1744 * checks.adb (Make_Bignum_Block): Use the new secondary stack
1745 build routines to manage the mark.
1746 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
1747 Use the new secodary stack build routines to manage the mark.
1748 (Insert_Actions_In_Scope_Around): Add new formal parameter
1749 Manage_SS along with comment on its usage. Code and comment
1750 reformatting. Mark and release the secondary stack when the
1751 context warrants it.
1752 (Make_Transient_Block): Update the call
1753 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
1754 (Wrap_Transient_Declaration): Remove local variable
1755 Uses_SS. Ensure that the secondary stack is marked and released
1756 when the related object declaration appears in a library level
1757 package or package body. Code and comment reformatting.
1758 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
1759 (Build_SS_Release_Call): New routine.
1761 2014-07-30 Steve Baird <baird@adacore.com>
1763 * exp_attr.adb: Revert previous change, not needed after all.
1765 2014-07-30 Vincent Celier <celier@adacore.com>
1767 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
1768 Closure => True for interfaces of Stand-Alone Libraries.
1769 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
1770 Boolean component Closure, defaulted to False.
1772 2014-07-30 Yannick Moy <moy@adacore.com>
1774 * sem_res.adb: Fix typo in error message.
1776 2014-07-30 Robert Dewar <dewar@adacore.com>
1778 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
1779 as name suffixes rather than L/H for subtype bounds.
1780 * tbuild.ads: Minor comment improvements and fixes
1781 (Make_External_Name): Document that suffix can start with an
1784 2014-07-30 Bob Duff <duff@adacore.com>
1786 * gnat_ugn.texi: Document --rep-clauses switch.
1788 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1790 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
1791 Default_Component_Value can only be specified for scalar type or
1792 arrays of scalar types respectively. This legality check must
1793 be performed at the point the aspect is analyzed, in order to
1794 reject aspect specifications that apply to a partial view.
1796 2014-07-30 Thomas Quinot <quinot@adacore.com>
1798 * freeze.adb: Minor reformatting.
1800 2014-07-30 Robert Dewar <dewar@adacore.com>
1802 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
1805 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1807 * freeze.adb (Check_Expression_Function): At the freeze point
1808 of an expression function, verify that the expression in the
1809 function does not contain references to any deferred constants
1810 that have no completion yet.
1811 (Freeze_Expression, Freeze_Before): call
1812 Check_Expression_Function.
1813 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
1814 * a-ciorse.adb: Add Adjust and Finalize routines for
1815 Reference_Control_Type. Use it in the construction of Reference
1816 and Constant_Reference values.
1818 2014-07-30 Robert Dewar <dewar@adacore.com>
1820 * exp_aggr.adb: Update comments.
1821 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
1824 2014-07-30 Robert Dewar <dewar@adacore.com>
1826 * cstand.adb (New_Standard_Entity): New version takes name
1827 string to call Make_Name.
1828 (Create_Standard): Use this routine to set name before setting other
1831 2014-07-30 Robert Dewar <dewar@adacore.com>
1833 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
1835 (Expand_Attribute, case Last): Ditto.
1836 * exp_ch3.adb (Constrain_Index): New calling sequence for
1837 Process_Range_Expr_In_Decl.
1838 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
1840 * sem_ch3.adb (Constrain_Index): New calling sequence for
1841 Process_Range_Expr_In_Decl.
1842 (Set_Scalar_Range_For_Subtype): ditto.
1843 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
1845 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
1846 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
1847 types if we are not assuming no invalid values.
1849 2014-07-30 Robert Dewar <dewar@adacore.com>
1851 * clean.adb: Minor reformatting.
1852 * opt.ads: Minor fix to incorrect comment.
1854 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1856 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
1857 subprogram, used by bounded hashed sets, to delete a node at
1858 a given index, whose element may have been improperly updated
1859 through a Reference_Preserving key.
1860 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
1861 * a-cbhase.adb: Add Adjust and Finalize routines for
1862 Reference_Control_Type.
1863 (Delete, Insert): Raise Program_Error, not Constraint_Error,
1864 when operation is illegal.
1865 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
1866 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
1867 private with_clause for Ada.Finalization.
1868 * a-cbmutr.adb: Add Adjust and Finalize routines for
1869 Reference_Control_Type. Use it in the construction of Reference
1870 and Constant_Reference values.
1872 2014-07-30 Robert Dewar <dewar@adacore.com>
1874 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
1876 2014-07-30 Pascal Obry <obry@adacore.com>
1878 * clean.adb (Clean_Project): Properly check for directory
1879 existence before trying to enter it.
1881 2014-07-30 Robert Dewar <dewar@adacore.com>
1883 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
1885 2014-07-30 Robert Dewar <dewar@adacore.com>
1887 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
1888 missing semicolon after name.
1890 2014-07-30 Pascal Obry <obry@adacore.com>
1892 * prj.ads (Gprinstall_Flags): New constant.
1893 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
1894 missing library dir if Directories_Must_Exist_In_Projects
1897 2014-07-30 Bob Duff <duff@adacore.com>
1899 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
1900 * s-traceb.ads: Updagte comments.
1902 2014-07-30 Robert Dewar <dewar@adacore.com>
1904 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
1905 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
1906 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
1909 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1911 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
1912 subprogram, used by all versions of hashed sets, to delete a node
1913 whose element has been improperly updated through a Reference_
1915 * a-cohase.adb: Remove Delete_Node, use new common procedure
1916 Delete_Node_At_Index.
1917 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
1918 * a-cihase.adb: Add Adjust and Finalize routines for
1919 Reference_Control_Type.
1920 (Reference_Preserving_Key): Build aggregate for
1921 Reference_Control_Type
1923 2014-07-30 Yannick Moy <moy@adacore.com>
1925 * checks.adb, checks.ads (Determine_Range_R): New procedure to
1926 determine the possible range of a floating-point expression.
1928 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1930 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
1931 * a-cborse.adb: Add Adjust and Finalize routines for
1932 Reference_Control_Type.
1933 (Reference_Preserving_Key): Build aggregate for
1934 Reference_Control_Type.
1935 (Delete): Check for tampering, and raise Program_Error (not
1936 Constraint_Error) when attempting to delete an element not in
1940 2014-07-30 Bob Duff <duff@adacore.com>
1942 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
1943 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
1944 Exception_Information is used to produce useful debugging
1945 information for the programmer. However, it was also used to
1946 implement the stream attributes for type Exception_Occurrence. The
1947 latter requires a stable and portable interface, which meant
1948 that we couldn't include a symbolic traceback. A separate set of
1949 routines was used to provide symbolic tracebacks under program
1950 control (i.e. not automatically). The goal of this ticket is
1951 to provide such automatic tracebacks, so the change here is to
1952 split the two functionalities: Exception_Information gives the
1953 maximally useful information for debugging (i.e. it now includes
1954 a symbolic traceback when a decorator is set, and it can be
1955 improved freely in the future without disturbing streaming).
1956 Untailored_Exception_Information always uses hexadecimal addresses
1957 in the traceback, has a stable and portable output, and is now
1960 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1962 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
1963 on the target of the assignment to find out whether it
1964 can be directly done by the back-end.
1965 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
1967 2014-07-30 Robert Dewar <dewar@adacore.com>
1969 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
1970 a-tasatt.adb: Minor reformatting.
1972 2014-07-30 Robert Dewar <dewar@adacore.com>
1974 * exp_ch4.adb: Minor reformatting.
1976 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1978 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
1979 Reference_Control_Type to generic package, to keep additional
1980 information for Reference_Types that manipulate keys. Add Adjust and
1981 Finalize procedures for this type.
1982 (Finalize): When finalizing a reference_preserving_key, verify
1983 that the key of the new value is equivalent to the key of the
1984 original element, raise Program_Error otherwise.
1985 (Insert): Detect tampering.
1986 (Reference_Preserving_Key): Build proper Reference_Control_Type,
1987 and update Busy and Lock bits to detect tampering.
1988 * a-cohase.ads: Keep with-clause private.
1990 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1992 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
1993 of an equality are of an Unchecked_Union type and lack inferable
1996 2014-07-30 Bob Duff <duff@adacore.com>
1998 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
1999 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
2000 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
2001 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
2002 we can call them from the runtimes. Leave renamings in place under GNAT.
2004 2014-07-30 Yannick Moy <moy@adacore.com>
2006 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
2007 inlining in GNATprove mode.
2009 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2011 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
2012 Reference_Control_Type to generic package, to keep additional
2013 information for Reference_Types that manipulate keys. Add Adjust and
2014 Finalize procedures for this type.
2015 (Delete_Node): New procedure called when finalizing a
2016 Reference_Control_Type, to remove a node whose element has been
2017 improperly updated through a Reference.
2018 (Insert): Detect tampering.
2019 (Reference_Preserving_Key): Build proper Reference_Control_Type,
2020 and update Busy and Lock bits to detect tampering.
2022 2014-07-30 Bob Duff <duff@adacore.com>
2024 * exp_intr.ads: Minor comment fix.
2026 2014-07-30 Gary Dismukes <dismukes@adacore.com>
2028 * exp_prag.adb, a-tags.ads: Minor typo fixes.
2030 2014-07-30 Bob Duff <duff@adacore.com>
2032 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
2033 a-except.ads, g-traceb.adb, memtrack.adb,
2034 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2035 Cleanup: Make the three versions of System.Traceback.Call_Chain
2036 have the same interface. Use an array for the Traceback parameter
2037 instead of an Address. This will enable reduction in code
2040 2014-07-30 Pat Rogers <rogers@adacore.com>
2042 * gnat_ugn.texi: Corrected minor textual error in description
2045 2014-07-30 Bob Duff <duff@adacore.com>
2047 * Makefile.rtl: Sort file names.
2049 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2051 * a-tasatt.adb: Complete previous change: kill spurious warning
2052 on e.g. sparc, and make sure we only use the fast path when the
2053 alignment is compatible.
2055 2014-07-30 Yannick Moy <moy@adacore.com>
2057 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
2060 2014-07-30 Yannick Moy <moy@adacore.com>
2062 * inline.adb (Build_Body_To_Inline): Issue more precise messages
2063 for declarations that prevent inlining.
2064 (Cannot_Inline): Change usual start of message to refer to contextual
2065 analysis in GNATprove mode.
2066 * sem_res.adb (Resolve_Call): Change usual start of message to
2067 refer to contextual analysis in GNATprove mode, when inlining
2070 2014-07-30 Robert Dewar <dewar@adacore.com>
2072 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
2073 * inline.adb: Minor reformatting.
2075 2014-07-30 Javier Miranda <miranda@adacore.com>
2077 * a-tags.ads: Add comments.
2079 2014-07-30 Pat Rogers <rogers@adacore.com>
2081 * gnat_rm.texi: Minor word error.
2083 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2085 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
2086 created to capture the value of the prefix of 'Old at the
2087 beginning of the current declarative part, to prevent data flow
2088 anomalies in the postcondition procedure that will follow.
2090 2014-07-30 Yannick Moy <moy@adacore.com>
2092 * debug.adb: Retire debug flag -gnatdQ.
2093 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
2094 on decl, not on body. Ignore predicate functions.
2095 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
2096 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
2097 body when generating a decl for a body on which SPARK_Mode aspect
2099 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
2100 attaching pragma to entity, to account for declaration not coming
2102 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
2103 as not always inlined in GNATprove mode, when called in an
2106 2014-07-30 Vincent Celier <celier@adacore.com>
2108 * debug.adb: Minor comment update.
2110 2014-07-30 Robert Dewar <dewar@adacore.com>
2112 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
2113 * sprint.adb (Sprint_Node): Handle N_Contract case.
2114 * exp_prag.adb: Minor reformatting.
2115 * freeze.adb (Freeze_Entity): Check useless postcondition for
2116 No_Return subprogram.
2117 * sem_prag.adb: Minor reformatting.
2119 2014-07-30 Javier Miranda <miranda@adacore.com>
2121 * a-tags.ads: Complete comments about performance.
2123 2014-07-30 Fedor Rybin <frybin@adacore.com>
2125 * gnat_ugn.texi: Adding description for --exit-status option to
2126 gnattest section. Fixing index entry of --passed-tests option
2127 in gnattest section.
2129 2014-07-30 Javier Miranda <miranda@adacore.com>
2131 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
2132 rtsfind.ads: Remove references to package Interfaces.CPP since this
2133 package is no longer needed.
2135 2014-07-30 Bob Duff <duff@adacore.com>
2137 * s-taasde.adb (Timer_Queue): Don't use a
2138 build-in-place function call to initialize the Timer_Queue.
2139 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
2140 Turn off polling in these units, because otherwise we get
2141 elaboration circularities with Ada.Exceptions when the -gnatP
2143 * s-tassta.adb (Create_Task): Make sure independent tasks
2144 are created with Parent = Environment_Task. This was not true,
2145 for example, in s-interr.adb, when Interrupt_Manager does "new
2146 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
2147 which is wrong because the master is determined by the access
2148 type, which is at library level.
2149 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
2150 now set correctly by Create_Task.
2151 (Make_Passive): Remove the workaround for the race condition in
2153 * frontend.adb (Frontend): Revert to previous method of detecting
2154 temporary configuration pragma files, recognizing such files by
2155 ".tmp" in the name. This is more general than detecting pragmas
2156 Source_File_Name_Project, because it allows any tool to use
2157 this naming convention, no matter the content of the file.
2158 * gnat_ugn.texi: Document this naming convention.
2160 2014-07-30 Robert Dewar <dewar@adacore.com>
2162 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
2163 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
2164 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
2165 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
2166 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
2169 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2171 * sem_ch5.adb: Improve error recovery.
2172 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
2173 before analyzing the body, so that in GNATprove mode there is
2174 no light expansion. Whatever expansion is required by SPARK will
2175 be performed when analysing the inlined code.
2177 2014-07-30 Bob Duff <duff@adacore.com>
2179 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
2181 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2183 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
2184 verify that it is not hidden by an inner implicit declaration.
2186 2014-07-30 Thomas Quinot <quinot@adacore.com>
2188 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
2189 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
2190 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
2191 the call returns an unconstrained type: in this case there is
2192 already a transient scope, and we should not establish a new one.
2193 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
2194 True, also insert cleanup actions in the tree.
2195 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
2196 with Clean set True.
2198 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2200 * s-taskin.ads (Direct_Index, Direct_Index_Range,
2201 Direct_Attribute_Element, Direct_Attribute_Array,
2202 Direct_Index_Vector, Direct_Attributes, Is_Defined,
2203 Indirect_Attributes): Removed. (Atomic_Address,
2204 Attribute_Array, Attributes): New.
2205 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
2206 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
2207 (Finalize_Attributes): Reimplement.
2208 * s-tassta.adb (Create_Task): Remove call to
2209 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
2210 Replace Finalize_Attributes_Link by Finalize_Attributes.
2211 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
2212 Reimplement from scratch, using a simpler and more efficient
2214 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
2215 * s-parame.ads, s-parame-hpux.ads,
2216 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
2217 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
2218 Default_Attribute_Count.
2220 2014-07-30 Olivier Hainque <hainque@adacore.com>
2222 * vxworks-ppc-link.spec: New file. Extra link
2223 instructions for ppc-vxworks.
2224 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
2225 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
2226 * system-vxworks-arm.ads: Likewise.
2227 * gcc-interface/Makefile.in: Enable .spec files.
2229 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2231 * sem_aggr.adb: Minor comment reformatting.
2233 2014-07-30 Robert Dewar <dewar@adacore.com>
2235 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
2236 * sem_warn.adb (Has_Junk_Name): New function
2237 (Check_References): Use Has_Junk_Name to delete junk warnings
2238 (Check_Unset_Reference): ditto.
2239 (Warn_On_Unreferenced_Entity): ditto.
2240 (Warn_On_Useless_Assignment): ditto.
2242 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2244 * checks.adb (Insert_Valid_Check): Do not check for the packed
2245 array type of a prefix that is an access type.
2247 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2249 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
2250 Unconstrained_Array even if prefix is not frozen yet, as can
2251 occur with a private subtype used as a generic actual.
2253 2014-07-30 Gary Dismukes <dismukes@adacore.com>
2255 * sem_attr.adb: Minor reformatting.
2257 2014-07-30 Pat Rogers <rogers@adacore.com>
2259 * gnat_rm.texi: Corrected minor wording error in description
2260 of No_Exception_Registration.
2262 2014-07-30 Yannick Moy <moy@adacore.com>
2264 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
2265 mode. Realphabetize two subprograms.
2266 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
2267 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
2268 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
2270 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
2271 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
2272 Is_Inline in GNATprove mode.
2273 (Analyze_Subprogram_Specification):
2274 Set Is_Inlined_Always at subprogram entity creation.
2275 * sem_res.adb (Resolve_Call): Do not deal with inlining during
2276 pre-analysis. Issue warning on call to possibly inlined
2277 subprogram when body not seen.
2279 2014-07-30 Yannick Moy <moy@adacore.com>
2281 * lib-xref.adb (Generate_Reference): Add special
2282 case for compiler-generated formals in GNATprove mode.
2284 2014-07-30 Yannick Moy <moy@adacore.com>
2286 * sem_ch6.adb: Add comments.
2288 2014-07-30 Thomas Quinot <quinot@adacore.com>
2290 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
2292 2014-07-30 Robert Dewar <dewar@adacore.com>
2294 * sem_aggr.adb, sem_res.adb: Minor reformatting.
2296 2014-07-30 Thomas Quinot <quinot@adacore.com>
2298 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2299 Bit_Order): Set Reverse_Bit_Order on the base type of the
2300 specified first subtype.
2302 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2304 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
2305 to capture the value of actuals of a limited type rather than
2306 an object declaration, to prevent spurious errors when analyzing
2309 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2311 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
2312 as an instance, and inhibit semantic checks on already analyzed
2313 code to prevent spurious errors.
2315 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2317 * a-exctra.ads ("="): New function, to restore compatibility.
2319 2014-07-30 Pascal Obry <obry@adacore.com>
2321 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
2322 routine to use the OS dst setting.
2324 2014-07-30 Pat Rogers <rogers@adacore.com>
2326 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
2328 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2330 * sem_util.adb (Wrong_Type): Disable some checks equally within
2331 instances and within inlined bodies, to suppress spurious type
2332 errors on already analyzed code.
2333 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
2334 is legal in an inlined body, juts as it is in an instance body.
2336 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2338 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
2339 body the operand of an unchecked conversion may be a literal, in
2340 which case its type is the target type of the conversion. This
2341 is in contrast to conversions in other contexts, where the
2342 operand cannot be a literal and must be resolvable independent
2345 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
2347 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
2348 mere scalar constant instead of a reference for a renaming of
2350 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
2351 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
2353 2014-07-30 Robert Dewar <dewar@adacore.com>
2355 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
2356 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
2357 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
2358 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
2359 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
2360 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
2361 & code reorganization.
2363 2014-07-30 Bob Duff <duff@adacore.com>
2365 * s-tassta.adb, sem_util.ads: Minor reformatting.
2367 2014-07-30 Yannick Moy <moy@adacore.com>
2369 * inline.adb (Build_Body_To_Inline): Detect when
2370 subprogram has multiple returns, or not a single last return
2371 statement, in GNATprove mode.
2372 (Cannot_Inline): Simplify logic to handle case of GNATprove
2375 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2377 * sem_ch6.adb: Stubs are not subject to inlining.
2379 2014-07-30 Bob Duff <duff@adacore.com>
2381 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
2382 from a procedure to a function, so that it can more easily be
2383 called before the "begin" of a task.
2384 * s-taasde.ads (Delay_Block): Make this type immutably limited,
2385 so we can use a build-in-place function call to initialize
2386 Timer_Queue in the body.
2387 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
2388 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
2389 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
2390 Make_Independent before reaching its "begin", to avoid race
2391 conditions. This causes the activating task to wait until after
2392 Make_Independent is complete before proceeding. In addition,
2393 we initialize data structures used by independent tasks before
2394 activating those tasks, to avoid possible use of uninitialized data.
2395 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
2396 Minor comment fixes.
2398 2014-07-30 Bob Duff <duff@adacore.com>
2400 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
2401 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
2402 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
2403 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
2404 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
2406 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2408 * a-tasatt.adb: Remove old comments.
2410 2014-07-30 Yannick Moy <moy@adacore.com>
2412 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
2413 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
2414 to explain rationale for inlining or not in GNATprove mode.
2415 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
2416 to False when inlining is not possible.
2417 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
2418 flag to indicate that subprogram is fully inlined. To be reversed
2419 if inlining problem is found.
2420 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
2421 call in potentially unevaluated context.
2423 2014-07-30 Jose Ruiz <ruiz@adacore.com>
2425 * s-tarest.adb, s-tarest.ads: Fix comments.
2427 2014-07-30 Robert Dewar <dewar@adacore.com>
2429 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
2430 Change No_Scalar_Parts predicate to Scalar_Part_Present and
2431 invert sense of test. This avoids the "not No_xxx" situation
2432 which is always ugly.
2434 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2436 * inline.adb (Expand_Inlined_Call): When generating code for
2437 an internal subprogram the expansion uses the location of the
2438 call, so that gdb can skip over it. In GNATprove mode we want to
2439 preserve slocs of original subprogram when expanding an inlined
2440 call, to obtain better warnings, even though subprogram appears
2441 not to come from source if it is the inlining of a subprogram
2442 body without a previous spec.
2444 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2446 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2447 types with atomic components.
2449 2014-07-30 Thomas Quinot <quinot@adacore.com>
2451 * Make-generated.in: Remove now unnecessary targets after s-oscons
2454 2014-07-30 Yannick Moy <moy@adacore.com>
2456 * sem_res.adb (Resolve_Call): Use ultimate alias
2457 of callee when available.
2459 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2461 * sem_ch6.adb (Analyze_Expression_Function): To check whether
2462 an expression function is a completion, use the specification of
2463 the previous declaration, not its entity, which may be internally
2464 generated in an inlined context.
2466 2014-07-30 Doug Rupp <rupp@adacore.com>
2468 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
2469 temp files in /cache directory unless overridden by TMPDIR.
2471 2014-07-30 Jose Ruiz <ruiz@adacore.com>
2473 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
2474 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
2475 type CPU, so it can never be greater than CPU_Range'Last.
2477 2014-07-30 Bob Duff <duff@adacore.com>
2479 * s-taskin.ads: Minor comment fix.
2481 2014-07-30 Thomas Quinot <quinot@adacore.com>
2483 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
2486 2014-07-30 Yannick Moy <moy@adacore.com>
2488 * debug.adb: Free debug flag dQ used for frontend inlining in
2490 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
2493 2014-07-30 Thomas Quinot <quinot@adacore.com>
2495 * Make-generated.in: Remove generation of s-oscons.ads, only
2496 generate the xoscons utility, in runtime-agnostic rules.
2497 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
2498 no longer supported.
2500 2014-07-30 Bob Duff <duff@adacore.com>
2502 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
2503 parameter Chain to be used in the allocator case.
2504 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
2505 has tasks, wrap the code in a block that will activate them,
2506 including the usual finalization code to kill them off in case
2507 of exception or abort.
2509 2014-07-30 Robert Dewar <dewar@adacore.com>
2511 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
2512 Remove renamings (don't work for gdb).
2513 (par): New synonym for p (avoid gdb ambiguities).
2514 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
2516 2014-07-30 Bob Duff <duff@adacore.com>
2518 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
2520 * treepr.ads, treepr.adb (ppp): Make this debugging routine
2521 accept any type covered by Union_Id.
2523 2014-07-30 Robert Dewar <dewar@adacore.com>
2525 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
2527 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
2530 2014-07-30 Robert Dewar <dewar@adacore.com>
2532 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
2533 of predicate aspect on entity other than a type.
2535 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2537 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
2538 when a subprogram body without a previous spec cannot be inlined
2539 in GNATprove mode, because it includes aspects or pragmas that
2540 generate a SPARK contract clause.
2541 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
2542 instance cannot be inlined.
2544 2014-07-30 Robert Dewar <dewar@adacore.com>
2546 * debug.adb: Document that d7 suppresses compilation time output.
2547 * errout.adb (Write_Header): Include compilation time in
2549 * exp_intr.adb (Expand_Intrinsic_Call): Add
2550 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
2551 Compilation_Date/Compilation_Time.
2552 * g-souinf.ads (Compilation_Date): New function
2553 (Compilation_Time): New function.
2554 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
2555 * gnat_rm.texi (Compilation_Date): New function
2556 (Compilation_Time): New function.
2557 * opt.ads (Compilation_Time): New variable.
2558 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
2559 * sem_intr.adb (Compilation_Date): New function.
2560 (Compilation_Time): New function.
2561 * snames.ads-tmpl (Name_Compilation_Date): New entry.
2562 (Name_Compilation_Time): New entry.
2564 2014-07-30 Yannick Moy <moy@adacore.com>
2566 * inline.adb: Add comment.
2568 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2570 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
2571 parameterless attribute, and a postondition can mention an
2572 indexed component or a slice whose prefix is an attribute
2575 2014-07-30 Robert Dewar <dewar@adacore.com>
2577 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
2578 Avoid bomb when printing package Standard.
2580 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2582 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
2583 entity is created at this point, ensure that the name of the
2584 flag is unique, because the subprogram may be overloaded and
2585 other homonyms may also have elaboration flags created on the fly.
2587 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2589 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
2590 (Analyze_Attribute): Major cleanup of attribute
2591 'Update. The logic is now split into two distinct routines
2592 depending on the type of the prefix. The use of <> is now illegal
2593 in attribute 'Update.
2594 (Analyze_Record_Component_Update): New routine.
2595 (Check_Component_Reference): Removed.
2596 (Resolve_Attribute): Remove the return statement and ??? comment
2597 following the processing for attribute 'Update. As a result,
2598 the attribute now freezes its prefix.
2600 2014-07-30 Javier Miranda <miranda@adacore.com>
2602 * exp_ch4.adb (Apply_Accessibility_Check): Do
2603 not call Base_Address() in VM targets.
2605 2014-07-30 Yannick Moy <moy@adacore.com>
2607 * gnat1drv.adb (Adjust_Global_Switches): Set
2608 Ineffective_Inline_Warnings to True in GNATprove mode.
2609 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
2611 * opt.ads (Ineffective_Inline_Warnings): Add comment that
2612 describes use in GNATprove mode.
2613 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
2614 pragma when applied to the special body created for inlining.
2616 2014-07-30 Robert Dewar <dewar@adacore.com>
2618 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
2621 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2623 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
2624 not delayed. Update the delay status of most SPARK 2014 aspects.
2625 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
2626 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
2627 to Decorate and Insert_Pragma. Add various comments concerning
2628 the delay status of several SPARK 2014 aspects. The insertion
2629 of Refined_State now uses routine Insert_After_SPARK_Mode.
2630 (Decorate): New routine.
2631 (Decorate_Aspect_And_Pragma): Removed.
2632 (Insert_Delayed_Pragma): Removed.
2633 (Insert_Pragma): New routine.
2635 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2637 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
2638 only a warning, not an error on an attempt to inline a recursive
2641 2014-07-30 Robert Dewar <dewar@adacore.com>
2643 * g-forstr.adb: Minor code reorganization (use J rather than I
2644 as a variable name).
2645 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
2646 g-forstr.ads: Minor reformatting.
2648 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2650 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
2651 we are debugging the generated code.
2653 2014-07-30 Yannick Moy <moy@adacore.com>
2655 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
2656 returns True for source pointer for an inlined body.
2658 2014-07-30 Javier Miranda <miranda@adacore.com>
2660 * exp_ch4.adb (Apply_Accessibility_Check): Add
2661 missing calls to Base_Address().
2663 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2665 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
2666 mode, subprogram bodies without a previous declaration are also
2667 candidates for front-end inlining.
2669 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2671 * aspects.ads Aspects Async_Readers, Async_Writers,
2672 Effective_Reads and Effective_Writes do not need to be delayed.
2673 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
2674 optional Boolean expression when generating the corresponding
2675 pragma for an external property aspect.
2676 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
2677 local constant Obj. Add local constant Obj_Id. Reimplement the
2678 check which ensures that the related variable is in fact volatile.
2679 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
2680 * sem_util.adb (Is_Enabled): New routine.
2681 (Variable_Has_Enabled_Property): Reimplement the detection of
2682 an enabled external property.
2684 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
2686 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
2689 2014-07-30 Pascal Obry <obry@adacore.com>
2691 * g-forstr.adb, g-forstr.ads: New.
2692 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
2693 GNAT.Formatted_String.
2695 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2697 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
2698 (Expand_Array_Aggregate): Also enable in-place expansion for
2699 code generated by the compiler. For an object declaration,
2700 set the kind of the object in addition to its type. If an
2701 in-place assignment is to be generated and it can be directly
2702 done by the back-end, do not expand the aggregate.
2703 * fe.h (Is_Others_Aggregate): Declare.
2704 * gcc-interface/trans.c
2705 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
2706 aggregate with a single Others choice on the RHS by means of
2707 __builtin_memset. Tidy up.
2709 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2711 * gnat_rm.texi: minor reformatting.
2713 2014-07-30 Yannick Moy <moy@adacore.com>
2715 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
2718 2014-07-30 Robert Dewar <dewar@adacore.com>
2720 * gnat_rm.texi: Document additional implementation-defined use
2723 2014-07-30 Robert Dewar <dewar@adacore.com>
2725 * prj-proc.adb, prj-strt.adb: Update comments.
2727 2014-07-30 Gary Dismukes <dismukes@adacore.com>
2729 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
2731 2014-07-30 Vincent Celier <celier@adacore.com>
2733 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
2734 parameter No_Extending, defaulted to False. When No_Extending
2735 is True, do not look for an extending project.
2736 (Expression): For a variable reference that is not for the current
2737 project, get its Id calling Imported_Or_Extended_Project_From
2738 with No_Extending set to True.
2739 * prj-strt.adb (Parse_Variable_Reference): If a referenced
2740 variable is not found in the current project, check if it is
2741 defined in one of the projects it extends.
2743 2014-07-30 Robert Dewar <dewar@adacore.com>
2745 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
2746 some additional cases of internally generated routines.
2748 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2750 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
2751 if the compilation unit is a subunit, extend optional processing
2752 to all subunits of the current one. This allows gnatstub to
2753 supress generation of spurious bodies.
2755 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2757 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
2758 track of the initial element's index within the tree.
2760 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2762 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
2763 (Insert_Child): Add local variable First. Capture the index of the
2764 first node being created to ensure correct cursor construction
2765 later on. Use the three parameter version of Allocate_Node
2766 when creating multiple children as this method allows aspect
2767 Default_Value to take effect (if applicable).
2769 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
2771 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
2772 (Expand_Array_Aggregate): For a safe slice assignment, just set
2773 the target and use the common code path.
2775 2014-07-29 Robert Dewar <dewar@adacore.com>
2777 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
2778 predicate No_Predicate_Test_On_Arguments, new name is
2779 Predicate_Tests_On_Arguments (with the opposite sense).
2781 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2783 * sem_attr.adb (Resolve_Attribute): Clean up the code for
2784 attribute 'Access. Do not generate an elaboration flag for a
2785 stand alone expression function. The expression of an expression
2786 function is now frozen when the expression function appears as
2787 the prefix of attribute 'Access.
2788 * sem_ch6.adb (Analyze_Expression_Function): Remove local
2789 variable New_Decl and update all references to it after the
2790 rewriting has taken place. Establish the linkages between the
2791 generated spec and body.
2793 2014-07-29 Robert Dewar <dewar@adacore.com>
2795 * sem_prag.adb (ip, rv): Prevent from being optimized away.
2796 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
2797 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
2800 2014-07-29 Vincent Celier <celier@adacore.com>
2802 * prj-pp.adb: Minor comment update.
2803 * frontend.adb: If a target dependency info file has been read
2804 through switch -gnateT= add it to the dependencies of the source
2807 2014-07-29 Robert Dewar <dewar@adacore.com>
2809 * sem_ch3.adb, prj.adb: Minor reformatting.
2811 2014-07-29 Vincent Celier <celier@adacore.com>
2813 * prj-pp.adb (Pretty_Print.Output_Project_File): New
2814 procedure to output project file names between quotes without
2815 concatenation, even if the line is too long.
2816 (Pretty_Print): Use Output_Project_File for project being extended and
2819 2014-07-29 Vincent Celier <celier@adacore.com>
2821 * gnat_ugn.texi: Document that configuration pragmas files are
2822 added to the dependencies, unless they contain only pragmas
2823 Source_File_Name_Project.
2825 2014-07-29 Robert Dewar <dewar@adacore.com>
2827 * frontend.adb: Minor reformatting.
2829 2014-07-29 Robert Dewar <dewar@adacore.com>
2831 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
2832 (Expand_Actuals): Make sure predicate checks are properly applied
2833 for the case of OUT or IN OUT parameters.
2834 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
2835 predicate tests on arguments for Finalize
2836 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
2837 if predicate tests on subprogram arguments should be skipped.
2838 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
2840 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2842 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
2843 clause for the object and the expression is an aggregate, defer
2844 resolution and expansion of the aggregate until the freeze point
2846 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
2847 the parent node is an N_Reference generated during expansion.
2849 2014-07-29 Vincent Celier <celier@adacore.com>
2851 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
2853 2014-07-29 Robert Dewar <dewar@adacore.com>
2855 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
2856 prepcomp.ads: Minor reformatting and code clean up.
2857 * exp_ch6.adb (Expand_Actuals): Generate predicate test
2858 unconditionally for case of OUT or IN OUT actual (before this
2859 was generated only for certain subcases, which is wrong, the
2860 test is always needed).
2862 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2864 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
2865 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
2866 until context type is available.
2867 * sem_res.adb (Resolve_Allocator): In the case of a qualified
2868 expression, complete resolution of expression.
2869 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
2870 to apply Ada2012 checks on aliased formals, as well as
2871 accesibility checks when the context of the call is an allocator
2872 or a qualified expression.
2873 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
2874 Moved here from sem_ch3.
2875 (Object_Access_Level): Handle properly aliased formals and
2877 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
2878 now properly performed in sem_res (Resolve_Actuals,
2879 Check_Aliased_Parameter).
2881 2014-07-29 Yannick Moy <moy@adacore.com>
2883 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
2884 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
2885 function to decide when a subprogram can be inlined in GNATprove mode.
2886 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
2887 condition for possible inlining.
2888 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
2889 for Inline_Always in GNATprove mode.
2890 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
2891 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
2892 * sem_prag.adb Minor change in comments.
2893 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
2894 inside subprograms marked as SPARK_Mode On.
2895 * sinfo.ads: Minor typo fix.
2897 2014-07-29 Vincent Celier <celier@adacore.com>
2899 * frontend.adb: Add dependency on gnat.adc when taken into account
2900 and on non-temporary configuration pragmas files specified in
2902 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
2903 dependencies on configuration pragmas files.
2905 2014-07-29 Pat Rogers <rogers@adacore.com>
2907 * gnat_ugn.texi: Minor clarification to the explanation for the
2910 2014-07-29 Robert Dewar <dewar@adacore.com>
2912 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
2913 documentation that explains the need for this extended range
2914 (use by C_Pass_By_Copy).
2916 2014-07-29 Robert Dewar <dewar@adacore.com>
2918 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
2920 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
2922 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
2925 2014-07-29 Thomas Quinot <quinot@adacore.com>
2928 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
2929 CRTSCTS to be visible.
2931 2014-07-29 Bob Duff <duff@adacore.com>
2933 * g-trasym.adb, g-trasym.ads: Code cleanup.
2935 2014-07-29 Doug Rupp <rupp@adacore.com>
2937 * sigtramp-vxworks.c: Minor reformatting.
2939 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2941 * gnat_rm.texi: No doc needed for Ada2012 aspect
2942 Implicit_dereference.
2944 2014-07-29 Robert Dewar <dewar@adacore.com>
2946 * sem_attr.adb (Attribute_12): New array
2947 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
2948 (Check_Ada_2012_Attribute): Removed.
2950 2014-07-29 Doug Rupp <rupp@adacore.com>
2952 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
2954 * sigtramp-vxworks.c: New file.
2955 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
2957 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2959 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
2960 derived array type, add information about component type, which
2961 was previously missing in ali file.
2962 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
2964 2014-07-29 Thomas Quinot <quinot@adacore.com>
2966 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
2967 of the subtype created for a record component, do not mark
2968 the subtype as frozen. For one thing, this is anomalous (in
2969 particular, the base type might not itself be frozen yet);
2970 furthermore, proper freezing of the subtype must happen in any
2971 case. So, we just mark the subtype as requiring delayed freezing
2972 (and we'll actually freeze it when generating the init_proc of
2973 the enclosing record).
2974 Also change the name of the constrained record subtype (append a
2975 'C' so that it is clearly different from the unconstrained record
2976 type, "related_idV") to make debugging easier.
2977 (Process_Full_View): When creating a full subtype for a pending
2978 private subtype, re-establish the scope of the private subtype
2979 so that we get proper visibility on outer discriminants.
2980 * exp_ch3.adb (Build_Init_Statements): Freeze any component
2981 subtype that is not frozen yet.
2983 2014-07-29 Vincent Celier <celier@adacore.com>
2985 * prj-proc.adb (Recursive_Process): Always initialize the
2986 environment when the project is an aggregate project, even when
2987 it is not the root tree.
2988 2014-07-29 Robert Dewar <dewar@adacore.com>
2990 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
2991 * gnat_rm.texi: Complete list of implementation aspects.
2992 * aspects.ads: Minor comment clarification.
2994 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2996 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
2997 is a null-excluding access type, do not generate a constraint
2998 check if Suppress_Assignment_Checks is set on assignment node.
2999 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
3000 parameter of a null-excluding access type, there is access check
3001 on entry, so set Suppress_Assignment_Checks on generated statement
3002 that assigns actual to parameter block.
3003 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
3005 2014-07-29 Robert Dewar <dewar@adacore.com>
3007 * gnat_rm.texi: Change theta to @ in documentation of aspect
3010 2014-07-29 Robert Dewar <dewar@adacore.com>
3012 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
3014 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
3016 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
3017 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
3019 2014-07-29 Javier Miranda <miranda@adacore.com>
3021 * types.ads Update documentation on how to add new reason codes
3023 (RT_Exception_Code): Keep values ordered by their
3024 reason code. Required by the .NET backend.
3025 (RT_CE_Exceptions): Subtype declaration removed.
3026 (RT_PE_Exceptions): Subtype declaration removed.
3027 (RT_SE_Exceptions): Subtype declaration removed.
3028 (Kind): New mapping table of RT_Exception_Codes.
3029 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
3031 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
3032 mapping table. (Make_Raise_Program_Error): Updated to use the
3034 (Make_Raise_Storage_Error): Updated to use the new mapping table.
3035 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
3038 2014-07-29 Thomas Quinot <quinot@adacore.com>
3040 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
3041 distributed stubs generation.
3042 * exp_ch3.adb: Minor reformatting.
3044 2014-07-29 Yannick Moy <moy@adacore.com>
3046 * sinfo.ads: Document constraint between frontend and GNATprove.
3048 2014-07-29 Robert Dewar <dewar@adacore.com>
3050 * a-except.adb: Minor comment clarification.
3052 2014-07-29 Robert Dewar <dewar@adacore.com>
3054 * gnat_rm.texi: Complete list of implementation attributes.
3055 * snames.ads-tmpl: Clean up list of impl-defined attributes.
3057 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3059 * freeze.adb (Freeze_Record_Type): Perform various
3060 volatility-related checks.
3062 2014-07-29 Robert Dewar <dewar@adacore.com>
3064 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
3066 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3068 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
3069 the case where the attribute reference appears in a nested scope
3070 from that of the subprogram prefix.
3071 * sem_attr.adb: Minor reformatting.
3073 2014-07-29 Robert Dewar <dewar@adacore.com>
3075 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
3076 initialization options.
3078 2014-07-29 Robert Dewar <dewar@adacore.com>
3080 * sinfo.ads: Minor comment addition.
3082 2014-07-29 Bob Duff <duff@adacore.com>
3084 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
3086 2014-07-29 Doug Rupp <rupp@adacore.com>
3088 * init.c: Complete previous change.
3090 2014-07-29 Robert Dewar <dewar@adacore.com>
3092 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
3095 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3097 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
3098 and the completion will appear in the same declarative part,
3099 create elaboration flag.
3100 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
3101 is a completion of a declaration in the same declarative part,
3102 and the subprogram has had its address taken, add elaboration
3103 check inside the subprogram body, to detect elaboration errors
3104 that may occur through indirect calls.
3106 2014-07-29 Doug Rupp <rupp@adacore.com>
3108 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
3109 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
3111 2014-07-29 Vincent Celier <celier@adacore.com>
3113 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
3114 runtime directorie specified with two switches --RTS= designate
3115 the same directory, even when there are no literarily the same.
3117 2014-07-29 Robert Dewar <dewar@adacore.com>
3119 * gnat_ugn.texi: Minor documentation clarification.
3120 * switch-c.adb: Minor reformatting.
3122 2014-07-29 Robert Dewar <dewar@adacore.com>
3124 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
3125 Fix incorrect RTE call which caused bomb if pragma was in
3126 configuration pragma file.
3128 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
3130 * expect.c (__gnat_expect_poll): Fix typo in previous change.
3131 * g-expect.adb: Update comments.
3133 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3135 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
3136 (Default_Attribute_Count): Bump to 16 on native platforms.
3138 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3140 * sem_res.adb: Add guard to front-end inlining for SPARK.
3142 2014-07-29 Robert Dewar <dewar@adacore.com>
3144 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
3147 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3149 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
3150 inline in GNATprove mode when subprogran is marked Inline_Always.
3151 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
3152 mode if body to inline is available.
3153 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
3154 effective in GNATprove mode.
3155 * sem_ch10.adb (Analyze_Compilation_Unit): Call
3156 Check_Package_Body_For_Inlining in GNATprove mode, so that body
3157 containing subprograms with Inline_Always can be available before
3160 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3162 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
3163 to Check_Package_Body_For_Inlining, to prevent confusion with other
3164 inlining subprograms.
3166 2014-07-29 Robert Dewar <dewar@adacore.com>
3168 * opt.ads: Minor comment update.
3169 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
3170 we want setting of Uneval_Old at time of encountering the aspect.
3171 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
3173 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
3174 New function (Set_Uneval_Old_Accept): New procedure.
3175 (Set_Uneval_Old_Warn): New procedure.
3176 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
3178 2014-07-29 Robert Dewar <dewar@adacore.com>
3180 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
3181 * snames.ads-tmpl: Minor reformatting.
3182 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
3183 to give <Error>. Not clear why this was there, but the compiler
3184 sources do not reference Name_Error, and this interfered with
3185 the circuits for pragma Unevaluated_Use_Of_Old.
3187 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3189 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
3190 types in SPARK 2014 (again).
3191 * sem_res.adb (Is_OK_Volatile_Context): New routine.
3192 (Resolve_Entity_Name): Ensure that a volatile object with
3193 enabled properties Async_Writers or Effectire_Reads appears in
3194 a non-interfering context.
3196 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3198 * sem_ch6.adb: Move Build_Body_To_Inline,
3199 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
3200 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
3201 * inline.ads, inline.adb: Package now contains subprograms that
3202 implement front-end inlining. No functional changes, no test
3205 2014-07-29 Robert Dewar <dewar@adacore.com>
3207 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
3209 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3211 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
3212 is a limited view when the context is a package body, because
3213 there is no subsequent place at which the non-limited view may
3215 (Process_Formals): Ditto.
3216 * sinfo.ads, par-ch3.adb: Minor reformatting.
3218 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
3220 * expect.c (__gnat_expect_poll): New parameter dead_process
3221 used to return the dead process among the array of file
3222 descriptors. The Windows, VMS and HPUX implementations now
3223 properly report the dead process via this parameter. Other unixes
3225 * g-expect.adb (Poll): Adapt to the C profile.
3226 (Expect_Internal): Use the new parameter to properly close the
3227 File Descriptor. This then can be properly reported by the
3228 function First_Dead_Process as is expected.
3230 2014-07-29 Robert Dewar <dewar@adacore.com>
3232 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
3234 2014-07-29 Robert Dewar <dewar@adacore.com>
3236 * einfo.adb (Derived_Type_Link): New function
3237 (Set_Derived_Type_Link): New procedure.
3238 (Write_Field31_Name): Output Derived_Type_Link.
3239 * einfo.ads: New field Derived_Type_Link.
3240 * exp_ch6.adb (Expand_Call): Warn if change of representation
3242 * sem_ch13.adb: Minor addition of ??? comment.
3243 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
3244 expensive implicit conversion.
3245 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
3247 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3249 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
3250 to DF_Id. Add new local variable DF_Call. Do not perform any
3251 elaboration-related checks on the call to the partial finalization
3252 routine within an init proc to avoid generating bogus elaboration
3253 warnings on expansion-related code.
3254 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
3255 the top level of the routine. Ensure that Output_Calls takes
3256 into account flags -gnatel and -gnatwl when emitting warnings
3258 (Check_Internal_Call_Continue): Update the call to Output_Calls.
3259 (Elab_Warning): Moved to the top level of routine Check_A_Call.
3260 (Emit): New routines.
3261 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
3262 comment on usage. Output all warnings or info messages only when the
3263 caller context demands it and the proper elaboration flag is set.
3265 2014-07-29 Yannick Moy <moy@adacore.com>
3267 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
3268 Check rule about Old appearing in potentially unevaluated
3269 expression everywhere, not only in Post.
3271 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3273 * sem_prag.adb: Update comment.
3274 * a-except.adb, a-except-2005.adb: Minor editing.
3276 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
3278 * exp_dbug.adb (Debug_Renaming_Declaration):
3279 Do not create renaming entities for renamings of non-packed
3280 objects and for exceptions.
3282 2014-07-29 Robert Dewar <dewar@adacore.com>
3284 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
3285 sem_ch6.adb, par-ch3.adb: Minor reformatting.
3287 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3289 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
3290 subtype indication in an extended return statement when the
3291 return value is an ancestor of the return type of the function,
3292 and that return type is a null record extension.
3294 2014-07-29 Thomas Quinot <quinot@adacore.com>
3296 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
3297 message produced for the case of a type-related representation
3298 item that is made illegal by 13.10(1).
3299 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
3302 2014-07-29 Robert Dewar <dewar@adacore.com>
3304 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
3305 * erroutc.adb (Output_Error_Msgs): Take wide characters into
3306 account in computing position of error flags.
3307 * sinput.adb (Get_Column_Number): Take wide characters into
3310 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3312 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
3313 in an access type definition can carry a null_exclusion indicator.
3314 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
3315 carries a null_exclusion indicator, verify that the subtype
3316 indication denotes an access type, and create a null-excluding
3318 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
3319 defined on N_Access_To_Object_Definition to indicate that the
3320 subtype indication carries a null_exclusion indicator.
3322 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3324 * exp_ch6.adb (Add_Extra_Actual): Do not construct
3325 the extra actual by name, generate a reference instead.
3327 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3329 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
3330 Allow_Integer_Address if already set.
3331 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
3332 Fix order, for consistency with Rmsg_xx declarations.
3334 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3336 * sem_ch4.adb (Complete_Object_Operation): If the type of the
3337 candidate subprogram is a limited view, use non-limited view
3340 2014-07-29 Robert Dewar <dewar@adacore.com>
3342 * sem_ch13.adb: Minor change in RM reference.
3343 * sem_mech.ads: Minor reformatting.
3344 * einfo.ads: Minor comment fix.
3345 * types.ads: Minor correction to range given for Mechanism_Type.
3346 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
3347 check predicate on way out for OUT or IN OUT parameters.
3348 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
3349 better (P_Range_Constraint): Corresponding fix.
3350 * checks.ads: Minor comment clarification.
3352 2014-07-29 Gary Dismukes <dismukes@adacore.com>
3354 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
3355 and Treat_As_Volatile flags based on whether the renamed object
3356 is a volatile object.
3358 2014-07-29 Olivier Hainque <hainque@adacore.com>
3361 (Default_Alignment): Rename as Storage_Alignment. This is not
3362 a "default" that can be overriden. Augment comment to clarify
3363 intent and document why we need to manage alignment padding.
3364 (Header_Offset): Set to Header'Object_Size instead of 'Size
3365 rounded up to Storage_Alignment. Storage_Alignment on the
3366 allocation header is not required by our internals so was
3367 overkill. 'Object_Size is enough to ensure proper alignment
3368 of the header address when substracted from a storage address
3369 aligned on Storage_Alignment.
3370 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
3371 this is always added on top of the incoming allocation requests.
3372 (Align): New function, to perform alignment rounding operations.
3373 (Allocate): Add comments on the Storage_Address computation
3374 scheme and adjust so that the alignment padding applies to that
3375 (Storage_Address) only.
3377 2014-07-29 Robert Dewar <dewar@adacore.com>
3379 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
3380 pragma Unreferenced.
3381 * cstand.adb (Create_Standard): Use E_Array_Type for standard
3382 string types. Make sure index of Any_String/Any_Array is in a list.
3383 * errout.adb: Minor reformatting.
3385 2014-07-29 Robert Dewar <dewar@adacore.com>
3387 * gnat_ugn.texi: Clean up and correct documentation of warnings.
3388 * usage.adb: Minor corrections to make sure warnings are properly
3390 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
3391 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
3393 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3395 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
3396 created to match internal sequence numbers between compilations
3397 with/without abort must have its type properly set.
3399 2014-07-29 Robert Dewar <dewar@adacore.com>
3401 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
3402 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
3403 SSO_Default_Specified.
3404 * ali.ads (ALIs_Record): Add field SSO_Default
3405 (SSO_Default_Specified): New global switch.
3406 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
3407 (Check_Configuration_Consistency): Call this procedure
3408 * einfo.adb (SSO_Set_High_By_Default): New
3409 function (SSO_Set_Low_By_Default): New function
3410 (Set_SSO_Set_High_By_Default): New procedure
3411 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
3413 * einfo.ads (SSO_Set_Low_By_Default): New flag
3414 (SSO_Set_High_By_Default): New flag
3415 * freeze.adb (Set_SSO_From_Default): New procedure
3416 (Freeze_Array_Type): Call Set_SSO_From_Default
3417 (Freeze_Record_Type): Call Set_SSO_From_Default
3418 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
3419 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
3420 * lib-writ.ads: Add OL/OH parameters to P line
3421 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
3422 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
3424 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
3425 set by default using pragma Default_Scalar_Storage_Order.
3426 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
3427 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
3428 Clear SSO defaults when explicit SSO is inherited.
3429 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
3430 explicit SSO is specified.
3431 (Inherit_Aspects_At_Freeze_Point):
3432 Clear SSO default when inheriting SSO.
3433 * sem_ch3.adb (Set_Default_SSO): New procedure
3434 (Analyze_Private_Extension_Declaration): Set defualt SSO
3435 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
3436 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
3437 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
3438 (Record_Type_Declaration): ditto
3439 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
3441 * sem_prag.adb (Analyze_Pragma, case
3442 Default_Scalar_Storage_Order): Set Default_SSO
3444 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3446 * sem_ch6.adb (Valid_Operator_Definition): Verify that
3447 all parameter have mode IN. This check must be done here for
3448 subprogram instantiations that have operator names, because their
3449 analysis does not follow the same path as that for subprogram
3452 2014-07-29 Robert Dewar <dewar@adacore.com>
3454 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
3455 to make sure that the Etype of a component of the corresponding
3456 record type is present before trying to freeze it.
3457 * sem_ch5.adb: Minor reformatting.
3459 2014-07-29 Robert Dewar <dewar@adacore.com>
3461 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
3462 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
3463 and then use it when a stream operation is used from a library generic
3464 when the restriction (No_Streams) is active.
3466 2014-07-29 Thomas Quinot <quinot@adacore.com>
3468 * projects.texi: Fix minor typo.
3470 2014-07-29 Yannick Moy <moy@adacore.com>
3472 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
3474 2014-07-29 Arnaud Charlet <charlet@adacore.com>
3476 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
3479 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3481 * exp_ch7.adb (Find_Last_Init): Add local variable
3482 Deep_Init_Found. Check the statement immediately following the
3483 declaration if [Deep_]Initialization was not found.
3485 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3487 * exp_util.adb (Is_Aliased): It appears that
3488 'reference-d and renamed objects still play some role in Boolean
3489 expression with actions and cannot be finalized immediately.
3491 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3493 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
3494 Loop names are not part of the full qualification of entity names.
3496 2014-07-29 Robert Dewar <dewar@adacore.com>
3498 * einfo.adb (Has_Protected): Test base type.
3499 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
3500 that we always properly check No_Protected_Type_Allocators.
3502 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3504 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
3505 loop declarations as well.
3506 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
3507 to an iterator loop, because it may contain local renaming
3508 declarations that require debugging information.
3510 2014-07-29 Robert Dewar <dewar@adacore.com>
3512 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
3514 2014-07-29 Robert Dewar <dewar@adacore.com>
3516 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
3517 (Set_Static_Real_Or_String_Predicate): New procedure
3518 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
3519 string predicates (Is_Predicate_Static): Handle static string
3521 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
3522 New procedure (Check_Expression_Against_Static_Predicate):
3523 Deal with static string predicates, now fully implemented
3524 (Eval_Relational_Op): Allow string equality/inequality as static
3525 if not comes from source.
3527 2014-07-29 Robert Dewar <dewar@adacore.com>
3529 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
3530 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
3531 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
3532 handling. Change name of Discrete_Predicate to
3533 Discrete_Static_Predicate, and replace testing of the presence of this
3534 field by testing the flag Has_Static_Expression.
3536 2014-07-29 Robert Dewar <dewar@adacore.com>
3538 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
3539 * opt.adb: Handle Uneval_Old.
3540 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
3541 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
3542 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
3543 * sem_attr.adb (Uneval_Old_Msg): New procedure.
3544 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
3545 (Pop_Scope): Restore Uneval_Old.
3546 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
3548 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
3549 Add entries for Name_Warn, Name_Allow.
3551 2014-07-29 Robert Dewar <dewar@adacore.com>
3553 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
3554 to Is_OK_Static_Range.
3555 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
3556 static attributes (Eval_Attribute, case Size): Handle size of
3557 zero properly (Eval_Attribute, case Value_Size): Handle size of
3559 * sem_ch13.adb: Minor reformatting.
3560 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
3561 Is_Static_Range to Is_OK_Static_Range.
3562 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
3563 wrong in several ways (Is_Static_Range): Moved here from spec
3564 (Is_Static_Subtype): Moved here from spec Change some incorrect
3565 Is_Static_Subtype calls to Is_OK_Static_Subtype.
3566 * sem_eval.ads: Add comments to section on
3567 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
3568 Add clarifying comments (Is_Static_Range): Moved to body
3569 (Is_Statically_Unevaluated): New function.
3570 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
3571 Is_Static_Range to Is_OK_Static_Range.
3572 * sinfo.ads: Additional commments for Is_Static_Expression noting
3573 that clients should almost always use Is_OK_Static_Expression
3574 instead. Many other changes throughout front end units to obey
3576 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
3577 for enumeration literal.
3578 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
3579 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
3580 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
3581 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
3582 Replace all occurrences of Is_Static_Expression by
3583 Is_OK_Static_Expression.
3585 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3587 * exp_ch4.adb (Process_Transient_Object): Remove constant
3588 In_Cond_Expr, use its initialization expression in place.
3589 * exp_ch7.adb (Process_Declarations): There is no need to check
3590 that a transient object being hooked is controlled as it would
3591 not have been hooked in the first place.
3592 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
3593 objects are not considered aliased when the related context is
3594 a Boolean expression_with_actions.
3595 (Requires_Cleanup_Actions): There is no need to check that a transient
3596 object being hooked is controlled as it would not have been hooked in
3599 2014-07-29 Robert Dewar <dewar@adacore.com>
3601 * errout.adb: Minor reformatting.
3603 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3605 * exp_ch3.adb (Default_Initialize_Object): Add new variables
3606 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
3607 not allowed to ensure the symmetrical generation of symbols.
3608 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
3609 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
3610 temporary when aborts are not allowed to ensure symmertrical
3611 generation of symbols.
3612 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
3613 Dummy. Generate a dummy temporary when aborts are not allowed
3614 to ensure symmertrical generation of symbols.
3616 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3618 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
3619 renaming, indicate that the renamed entity itself needs debug
3620 information. This is necessary if that entity is a temporary,
3621 e.g. part of the expansion of an explicit dereference in an
3624 2014-07-29 Thomas Quinot <quinot@adacore.com>
3626 * errout.adb (Set_Error_Posted): When propagating flag to
3627 an enclosing named association, also propagate to the parent
3628 of that node, so that named and positional associations are
3629 treated consistently.
3631 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3633 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
3634 Do_Range_Check properly on array component expressions that
3635 have a scalar type. In GNATprove mode, only checks on scalar
3636 components must be marked by the front-end.
3638 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3640 * sem_res.adb (Resolve_Type_Conversion): If the type of the
3641 expression is a limited view, use the non-limited view when
3644 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3646 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
3647 case statement as coming from a conditional expression.
3648 (Expand_N_If_Expression): Mark the generated if statement as
3649 coming from a conditional expression.
3650 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
3651 objects found in case statement alternatives when the case
3652 statement is actually a case expression.
3653 (Expand_N_If_Statement):
3654 Do not process controlled objects found in an if statement when
3655 the if statement is actually an if expression.
3656 * sinfo.adb (From_Conditional_Expression): New routine.
3657 (Set_From_Conditional_Expression): New routine.
3658 * sinfo.ads Add new semantic flag From_Conditional_Expression and
3659 update related nodes.
3660 (From_Conditional_Expression): New routine along with pragma Inline.
3661 (Set_From_Conditional_Expression): New routine along with pragma Inline.
3663 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3665 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
3666 formal parameter Obj_Id and update the comment on usage. Renamed
3667 Obj_Typ to Func_Typ and update all occurrences.
3668 (Find_Last_Init): Remove formal parameter Decl and update the comment
3670 Remove local constants Obj_Id and Obj_Typ. Remove local variables
3671 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
3672 (Find_Last_Init_In_Block): Remove formal parameter
3673 Init_Typ and update the comment on usage.
3674 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
3675 on usage. Check whether the procedure call is an initialization
3676 procedure of either the object type or the initialization type.
3677 (Is_Init_Proc_Of): New routine.
3678 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
3679 routine. Add new variable Init_Typ. Add circuitry to extract the object
3680 type as well as the initialization type.
3682 2014-07-29 Robert Dewar <dewar@adacore.com>
3684 * sem_case.adb: Minor reformatting.
3685 * sem_aux.ads: Minor reformatting.
3687 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3689 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
3690 pointer on these fields, even though they are semantic, because
3691 subsequent analysis and expansion of action nades may require
3692 exploring the tree, for example to locate a node to be wrapped
3693 when a function with controlled result is called.
3695 2014-07-29 Claire Dross <dross@adacore.com>
3697 * sem_aux.adb (Get_Binary_Nkind): Use case on
3698 Name_Id instead of an intermediate string.
3699 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
3702 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
3704 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
3705 about processing sources with preprocessor directives.
3707 2014-07-24 Martin Liska <mliska@suse.cz>
3709 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
3710 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
3711 (gnat_write_global_declarations): Likewise.
3713 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
3715 * gnat_rm.texi: Clean up for makeinfo 5.2.
3717 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
3719 * gnat_rm.texi (Machine Code Insertions): Clean up.
3721 2014-07-18 Robert Dewar <dewar@adacore.com>
3723 * exp_ch7.adb: Minor reformatting.
3725 2014-07-18 Claire Dross <dross@adacore.com>
3727 * sem_aux.ads (Get_Binary_Nkind): New function that returns
3728 the Node_Kind value of an entity defining a binary operator.
3729 (Get_Unary_Nkind): New function that returns the Node_Kind value
3730 of an entity defining a unary operator.
3732 2014-07-18 Pascal Obry <obry@adacore.com>
3734 * sysdep.c: comment update.
3735 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
3736 platforms where it is known to be supported.
3738 2014-07-18 Thomas Quinot <quinot@adacore.com>
3740 * sem_dist.adb (Process_Remote_AST_Declaration): Need
3741 to set Fat_Type's Ekind in order to be able to use its
3742 Corresponding_Remote_Type attribute.
3744 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3746 * einfo.adb Last_Aggregate_Assignment is now Node 30.
3747 (Last_Aggregate_Assignment): Include
3748 constants in the assertion. Update the underlying node.
3749 (Set_Last_Aggregate_Assignment): Include constants in the
3750 assertion. Update the underlying node. (Write_Field11_Name):
3751 Remove the entry for Last_Aggregate_Assignment.
3752 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
3753 * einfo.ads Update the node designation and usage of attribute
3754 Last_Aggregate_Assignment.
3755 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
3756 assignment statement used to initialize a controlled object.
3757 (Late_Expansion): Store the last assignment statement used to
3758 initialize a controlled record or an array of controlled objects.
3759 * exp_ch3.adb (Expand_N_Object_Declaration): Default
3760 initialization of objects is now performed in a separate routine.
3761 (Default_Initialize_Object): New routine.
3762 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
3763 Obj_Id. Update the comment on usage.
3764 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
3765 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
3766 (Is_Init_Call): Add formal parameter Init_Typ. Update the
3767 comment on usage. Account for the type init proc when trying
3768 to determine whether a statement is an initialization call.
3769 (Make_Adjust_Call): Rename formal parameter For_Parent to
3770 Skip_Self. Update all occurrences of For_Parent. Account for
3771 non-tagged types. Update the call to Make_Call.
3772 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
3773 comment on usage. Update all occurrences of For_Parent.
3774 (Make_Final_Call): Rename formal parameter For_Parent to
3775 Skip_Self. Update all occurrences of For_Parent. Account
3776 for non-tagged types. Update the call to Make_Call.
3777 (Process_Object_Declaration): Most variables and constants are
3778 now local to the routine.
3779 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
3780 For_Parent to Skip_Self. Update the comment on usage.
3781 (Make_Final_Call): Rename formal parameter For_Parent to
3782 Skip_Self. Update the comment on usage.
3784 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3786 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
3787 can be a procedure that is implemented by entry, and have a
3788 formal that is a synchronized interface. It does not have to
3789 be declared as a protected operation.
3791 2014-07-18 Robert Dewar <dewar@adacore.com>
3793 * gnat_rm.texi: Remove mention of obsolete attributes
3794 Max[_Interrupt]_Priority, which have never been implemented
3795 (or at the very least were removed long ago if they ever were
3796 implemented. Add documentation of Max[_Interrupt]_Priority
3797 constants in package System.
3798 * ttypes.ads: Document actual handling of package System,
3799 rather than a historical fantasy version. Remove mention of
3800 non-existent attributes Max[_Interrupt]_Priority.
3802 2014-07-18 Pascal Obry <obry@adacore.com>
3804 * a-witeio.adb (Put): No 16-bit character output when text
3805 translation is disabled.
3806 * i-cstrea.ads: Code clean up.
3808 2014-07-18 Robert Dewar <dewar@adacore.com>
3810 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
3813 2014-07-18 Arnaud Charlet <charlet@adacore.com>
3815 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
3817 2014-07-18 Pascal Obry <obry@adacore.com>
3819 * adaint.c: Do not include wchar.h on VxWorks.
3820 * mingw32.h: Remove obsolete definition.
3822 2014-07-18 Pascal Obry <obry@adacore.com>
3824 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
3825 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
3826 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
3827 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
3829 2014-07-18 Pascal Obry <obry@adacore.com>
3831 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
3832 * a-ztexio.adb: Likewise.
3833 * a-witeio.adb: Likewise.
3834 (Open): Pass file's translation mode to set_text_mode.
3835 * s-ficobl.ads (Content_Encoding): New type.
3836 (Text_Content_Encoding): New subtype.
3837 (AFCB): Rename Is_Text_File to Text_Encoding.
3838 * s-fileio.adb (Open): Handles new text_translation
3839 values. Remove Is_Text_File which is equivalent to Text_Encoding
3840 in Text_Content_Encoding.
3841 * adaint.h (__gnat_set_mode): New routine.
3842 * sysdep.c (__gnat_set_wide_text_mode): Removed.
3843 (__gnat_set_mode): New routine.
3845 2014-07-18 Arnaud Charlet <charlet@adacore.com>
3847 * gcc-interface/decl.c, gcc-interface/trans.c,
3848 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
3849 Is_Packed_Array_Impl_Type.
3851 2014-07-18 Gary Dismukes <dismukes@adacore.com>
3853 * sem_util.adb: Minor typo correction.
3855 2014-07-18 Ben Brosgol <brosgol@adacore.com>
3857 * gnat_rm.texi: Complete previous change.
3859 2014-07-18 Pascal Obry <obry@adacore.com>
3861 * s-fileio.adb: Minor style fix.
3863 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3865 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
3866 specification of stream attributes for subtypes that are not
3867 first subtypes, to prevent malformed rep_item chains in the case
3868 of such illegal specifications for discriminated private subtypes.
3869 (Check_Overloaded_Name): Verify that the name is an entity name
3870 before other checks.
3872 2014-07-18 Pascal Obry <obry@adacore.com>
3874 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
3876 2014-07-18 Robert Dewar <dewar@adacore.com>
3878 * sem_prag.adb, sem_attr.adb,
3879 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
3881 2014-07-18 Pascal Obry <obry@adacore.com>
3883 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
3884 * initialize.c (__gnat_wide_text_translation_required): Defined here.
3886 2014-07-18 Pascal Obry <obry@adacore.com>
3888 * adaint.c (__gnat_fputwc): New routine.
3889 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
3891 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3893 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
3894 (Set_Stores_Attribute_Old_Prefix): New routine.
3895 (Stores_Attribute_Old_Prefix): New routine.
3896 (Write_Entity_Flags):
3897 Output flag Stores_Attribute_Old_Prefix.
3898 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
3900 (Set_Stores_Attribute_Old_Prefix): New routine
3901 along with pragma Inline.
3902 (Stores_Attribute_Old_Prefix): New
3903 routine along with pragma Inline.
3904 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
3905 constant which captures the result of attribute 'Old's prefix.
3906 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
3907 relocated expression which acted as a prefix of attribute 'Old.
3909 2014-07-18 Bob Duff <duff@adacore.com>
3911 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
3912 null before dispatching to Deallocate_Subpool.
3913 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
3914 parameter of Default_Subpool_For_Pool to 'in out'.
3915 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
3916 a message to the raise.
3917 * sem_util.adb: Minor reformatting.
3919 2014-07-18 Robert Dewar <dewar@adacore.com>
3921 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3922 Mark expression as non-static if it fails static predicate check,
3923 and issue additional warning.
3925 2014-07-18 Pascal Obry <obry@adacore.com>
3927 * a-witeio.adb (Put): Control translation based on
3928 wide_text_translation_required.
3929 * adaint.c (CurrentCCSEncoding): New variable.
3930 * initialize.c (__gnat_initialize): On Windows initialize
3931 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
3932 environment variable.
3933 * mingw32.h (CurrentCCSEncoding): New external.
3934 (__gnat_wide_text_translation_required): Likewise.
3935 * sysdep.c (wide_text_translation_required): New variable.
3936 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
3938 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3940 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
3941 variable Refined_States. Add global variable Matched_Items.
3942 (Check_Dependency_Clause): Account for dependency
3943 clauses utilizing states with visible null refinements.
3944 (Is_Null_Refined_State): New routine.
3945 (Match_Items): Record each successfully matched item of pragma Depends.
3946 (Record_Item): New routine.
3948 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3950 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
3951 Do_Range_Check flag on a dynamic index expression used in a
3952 component association in the argument of Update.
3954 2014-07-18 Gary Dismukes <dismukes@adacore.com>
3956 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
3958 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3960 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
3961 of enclosing blocks, loops and the enclosing function using a
3962 parent-based traversal.
3963 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
3964 stack reclamation if the iterator loop contains a return statement
3965 that uses the stack.
3966 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
3967 patch up the scope stack as the secondary stack management now
3968 takes into account the enclosing function of the iterator loop.
3970 2014-07-18 Robert Dewar <dewar@adacore.com>
3972 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
3974 2014-07-18 Robert Dewar <dewar@adacore.com>
3976 * einfo.adb (Has_Static_Predicate): New function.
3977 (Set_Has_Static_Predicate): New procedure.
3978 * einfo.ads (Has_Static_Predicate): New flag.
3979 * sem_ch13.adb (Is_Predicate_Static): New function
3980 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
3981 (Add_Call): Minor change in Sloc of generated expression
3982 (Add_Predicates): Remove setting of Static_Pred, no longer used.
3983 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
3984 replace by use of the entity flag Has_Static_Predicate_Aspect.
3985 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
3986 and issue warning that predicate is not checked for now.
3987 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
3989 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3990 Carry out check for any case where there is a static predicate,
3991 and output appropriate message.
3992 * sinfo.ads: Minor comment corrections.
3994 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3996 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
3997 from an untagged private type whose full view is tagged, the type
3998 is marked tagged for layout reasons, but it has no dispatch table,
3999 so Set_All_DT_Position must not be called.
4000 * exp_ch13.adb: If the freeze node is for a type internal to a
4001 record declaration, as is the case for a class-wide subtype
4002 of a parent component, the relevant scope is the scope of the
4005 2014-07-18 Thomas Quinot <quinot@adacore.com>
4007 * g-memdum.adb, g-memdum.ads: Code clean ups.
4009 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4011 * sem_prag.adb (Check_Dependency_Clause):
4012 Update the comment on usage. Reimplement the mechanism which
4013 attempts to match a single clause of Depends against one or
4014 more clauses of Refined_Depends.
4015 (Input_Match): Removed.
4016 (Inputs_Match): Removed.
4017 (Is_Self_Referential): Removed.
4018 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
4019 (Normalize_Outputs): Rename variable Split to New_Claue and update
4020 all its occurrences.
4021 (Report_Extra_Clauses): Update the comment on usage.
4022 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
4024 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4026 * i-cstrea.ads: Minor reformatting.
4028 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4030 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
4031 secondary stack-related flags to the generated block.
4032 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
4033 once the loop is relocated in a block.
4035 2014-07-18 Robert Dewar <dewar@adacore.com>
4037 * repinfo.ads: Add documentation on handling of back annotation
4040 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4042 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
4043 of full type declaration, denotes previous declaration for
4044 incomplete view of the type.
4045 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
4046 of declaration if one is present.
4047 (Replace_Type): When constructing the signature of an inherited
4048 operation, handle properly the case where the operation has a
4049 formal whose type is an incomplete view.
4050 * sem_util.adb (Collect_Primitive_Operations): Handle properly
4051 the case of an operation declared after an incomplete declaration
4052 for a type T and before the full declaration of T.
4054 2014-07-18 Pascal Obry <obry@adacore.com>
4056 * i-cstrea.ads: Add documentation for set_wide_text_mode.
4058 2014-07-18 Robert Dewar <dewar@adacore.com>
4060 * a-witeio.adb: Minor code reorganization.
4061 * i-cstrea.ads: Add comment.
4063 2014-07-18 Thomas Quinot <quinot@adacore.com>
4065 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
4068 2014-07-18 Robert Dewar <dewar@adacore.com>
4070 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
4072 2014-07-18 Pascal Obry <obry@adacore.com>
4074 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
4075 * a-witeio.adb (Put): On platforms where there is translation
4076 done by the OS output the raw text.
4077 (New_Line): Use Put above to properly handle the LM wide characters.
4079 2014-07-18 Thomas Quinot <quinot@adacore.com>
4081 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
4082 to Absolute_Address.
4084 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
4086 * opt.ads (Suppress_Back_Annotation): Remove as unused.
4087 * fe.h (Back_Annotate_Rep_Info): Likewise.
4088 (Global_Discard_Names): Likewise.
4090 2014-07-18 Robert Dewar <dewar@adacore.com>
4092 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
4095 2014-07-18 Vincent Celier <celier@adacore.com>
4097 * s-osinte-vms.ads: Fix style errors.
4099 2014-07-18 Thomas Quinot <quinot@adacore.com>
4101 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
4102 NAME_MAX and PATH_MAX.
4104 2014-07-18 Bob Duff <duff@adacore.com>
4106 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
4107 Build_Record_Or_Elementary_Output_Procedure): For Input and
4108 Output attributes, do not read/write the discriminants if they
4109 have default values; that will be done by Read/Write.
4111 2014-07-18 Robert Dewar <dewar@adacore.com>
4113 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
4114 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
4115 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
4116 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
4117 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
4119 2014-07-18 Robert Dewar <dewar@adacore.com>
4121 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
4123 2014-07-18 Vincent Celier <celier@adacore.com>
4125 * lib-writ.ads: Update documentation about the D lines.
4127 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4129 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
4130 as a parameter, rather than its Chars field, in order to locate
4131 freeze node of type. If the predicate or invariant has references
4132 to types other than the one to which the contract applies, these
4133 types must be frozen, and the corresponding predicate functions
4134 created, before that freeze node.
4136 2014-07-18 Robert Dewar <dewar@adacore.com>
4138 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
4139 * par_sco.adb: Minor reformatting.
4141 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4143 * exp_ch4.adb (Real_Range_Check): Turn off
4144 the Do_Range_Check flag on the conversion's current Expression
4145 argument rather than on the originally captured Operand node,
4146 as Expression may reflect a rewriting (as in conversions to a
4149 2014-07-18 Vincent Celier <celier@adacore.com>
4151 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
4153 * ali.ads (Sdep_Record): New component Unit_Name.
4154 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
4155 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
4156 dependent unit is in a project and the source file name is not
4159 2014-07-18 Bob Duff <duff@adacore.com>
4161 * s-addima.ads: Minor: add comment.
4163 2014-07-18 Thomas Quinot <quinot@adacore.com>
4165 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
4166 of nesting rules for composites with different SSOs.
4168 2014-07-18 Thomas Quinot <quinot@adacore.com>
4170 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
4171 a proper logical operator.
4172 (Has_Decision): An If_Expression indicates the presence of a decision
4173 although it is not a logical operator.
4175 2014-07-18 Robert Dewar <dewar@adacore.com>
4177 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
4178 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
4180 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
4182 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
4183 on the null statement.
4185 2014-07-18 Thomas Quinot <quinot@adacore.com>
4187 * adaint.c: Minor comment rewording.
4188 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
4189 use of errno in this file is thread safe.
4191 2014-07-18 Arnaud Charlet <charlet@adacore.com>
4193 * gnat_ugn.texi: Doc clarification.
4194 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
4195 * sem_ch13.ads: Minor comment update.
4197 2014-07-18 Robert Dewar <dewar@adacore.com>
4199 * repinfo.ads: Minor comment fix.
4201 2014-07-18 Robert Dewar <dewar@adacore.com>
4203 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
4204 * sem_prag.adb: Add dummy implementation of
4205 Default_Scalar_Storage_Order.
4206 * snames.ads-tmpl: Add dummy entry for
4207 Default_Scalar_Storage_Order pragma.
4209 2014-07-18 Robert Dewar <dewar@adacore.com>
4211 * opt.adb (Tree_Read): Read Address_Is_Private,
4212 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
4213 (Tree_Write): Corresponding writes
4214 * opt.ads: Minor comment reformatting and fixes.
4215 * tree_io.ads: Increment ASIS_Version_Number.
4217 2014-07-18 Robert Dewar <dewar@adacore.com>
4219 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
4220 * types.h: Fix typo.
4222 2014-07-18 Robert Dewar <dewar@adacore.com>
4224 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
4226 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
4228 * sem_ch13.adb (Kill_Rep_Clause): New procedure
4229 (Analyze_Attribute_Definition_Clause): Use
4230 Kill_Rep_Clause. This is just a cleanup, no functional effect.
4231 (Analyze_Enumeration_Representation_Clause):
4232 Use Kill_Rep_Clause. This means that enum rep
4233 clauses are now properly removed from -gnatct trees.
4234 (Analyze_Record_Representation_Clause): Same change.
4235 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
4237 2014-07-18 Pascal Obry <obry@adacore.com>
4239 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
4240 OS_Time from time parts.
4241 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
4243 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4245 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
4246 indexing over containers that are derived types: check whether
4247 signature of found operation has the correct first parameter
4248 before retrieving directly a primitive operation.
4250 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4252 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
4253 Do_Range_Check flag on dynamic bounds of a range used in a
4254 component association in the argument of Update.
4256 2014-07-18 Thomas Quinot <quinot@adacore.com>
4258 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
4259 accesses to errno(3) to be thread safe.
4261 2014-07-18 Vincent Celier <celier@adacore.com>
4263 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
4264 limited imported project that is an extending project, return
4265 a project being extended if it has the expected name.
4267 2014-07-18 Pascal Obry <obry@adacore.com>
4269 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
4270 routine to set the last modification time stamp for the given file.
4271 * gnatchop.adb (File_Time_Stamp): Removed.
4273 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
4275 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4277 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
4278 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
4279 Moved here, so it can be shared with the resolution of 'Update,
4280 whose argument shares some features with aggregates.
4281 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
4282 Aggregate_Constraint_Checks with the expression of each
4283 association, so that the Do_Range_Check flag is set when needed.
4285 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4287 * sem_ch4.adb (Try_Container_Indexing): If the container
4288 type is a derived type, the value of the inherited aspect is
4289 the Reference operation declared for the parent type. However,
4290 Reference is also a primitive operation of the new type, and
4291 the inherited operation has a different signature. We retrieve
4292 the right one from the list of primitive operations of the
4295 2014-07-18 Vincent Celier <celier@adacore.com>
4297 * debug.adb: Update comment.
4299 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4301 * exp_util.adb (Needs_Finalization): There is no reason why a
4302 C type should not benefit from finalization actions.
4304 2014-07-18 Thomas Quinot <quinot@adacore.com>
4306 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
4307 (FILENAME_MAX): Remove unneeded definition.
4309 2014-07-18 Robert Dewar <dewar@adacore.com>
4311 * exp_attr.adb, debug.adb: Update comments.
4313 2014-07-18 Vincent Celier <celier@adacore.com>
4315 * par-ch4.adb (Simple_Expression): Add missing style check
4316 for binary adding operators.
4317 (Term): Add missing style check for multiplying operators.
4319 2014-07-18 Robert Dewar <dewar@adacore.com>
4321 * impunit.adb: Minor comment correction.
4322 * widechar.adb, s-wchcon.ads: Minor comment corrections.
4324 2014-07-18 Robert Dewar <dewar@adacore.com>
4326 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
4327 for Build_Static_Predicate (Build_Predicate_Functions):
4328 Don't try to build discrete predicate for real type.
4329 (Build_Predicate_Functions): Report attempt to use
4330 Static_Predicate function on real type as unimplemented.
4331 * sem_util.adb (Check_Expression_Against_Static_Predicate):
4332 Add guard to prevent blow up on predicate for real type.
4334 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4336 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
4337 properly static predicate on enumeration types and modular types
4340 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
4342 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
4343 the corresponding source file index.
4344 * get_scos.ads (Get_SCOs): Add a default value for it.
4345 * par_sco.adb (SCO_Record): Fill the corresponding value.
4348 2014-07-18 Vincent Celier <celier@adacore.com>
4350 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
4351 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
4353 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
4355 2014-07-18 Thomas Quinot <quinot@adacore.com>
4357 * g-sercom.ads (Set): document possible data loss.
4359 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4361 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
4362 Output, Read, Write): If the restriction No_Streams is active,
4363 replace each occurrence of a stream attribute by an explicit
4366 2014-07-18 Robert Dewar <dewar@adacore.com>
4368 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
4371 2014-07-18 Robert Dewar <dewar@adacore.com>
4373 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
4375 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
4376 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
4377 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
4378 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
4380 2014-07-18 Robert Dewar <dewar@adacore.com>
4382 * bcheck.adb (Check_Consistent_Restrictions):
4383 Remove obsolete code checking for violation of
4384 No_Standard_Allocators_After_Elaboration (main program)
4385 * bindgen.adb (Gen_Adainit): Handle
4386 No_Standard_Allocators_After_Elaboration
4387 (Gen_Output_File_Ada): ditto.
4388 * exp_ch4.adb (Expand_N_Allocator): Handle
4389 No_Standard_Allocators_After_Elaboration.
4390 * Makefile.rtl: Add entry for s-elaall
4391 * rtsfind.ads: Add entry for Check_Standard_Allocator.
4392 * s-elaall.ads, s-elaall.adb: New files.
4393 * sem_ch4.adb (Analyze_Allocator): Handle
4394 No_Standard_Allocators_After_Elaboration.
4396 2014-07-18 Robert Dewar <dewar@adacore.com>
4398 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
4399 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
4400 Remove AB parameter from ali files and all uses.
4401 Remove Allocator_In_Body and all uses.
4403 2014-07-18 Robert Dewar <dewar@adacore.com>
4405 * g-expect-vms.adb: Add comment.
4407 2014-07-18 Thomas Quinot <quinot@adacore.com>
4409 * par_sco.adb (Is_Logical_Operation): return True for
4412 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4414 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
4415 analysis and resolution of each choice in the associations within
4416 the argument of Update, because they may be variable names.
4418 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4420 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
4421 actions before the generated if statement.
4423 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4425 * gnat_ugn.texi Enhance the documentation of
4426 switches -gnateA and -gnateV.
4428 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4430 * sem_util.adb (Build_Default_Subtype): Add missing condition
4431 so that code matches description: use the full view of the base
4432 only if the base is private and the subtype is not.
4434 2014-07-17 Gary Dismukes <dismukes@adacore.com>
4436 * exp_disp.adb: Minor reformatting.
4437 * exp_disp.adb: Minor code reorganization.
4439 2014-07-17 Thomas Quinot <quinot@adacore.com>
4441 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
4442 require an explicit SSO attribute definition clause on a composite type
4443 just because one of its components has one.
4445 2014-07-17 Robert Dewar <dewar@adacore.com>
4447 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
4448 attribute out of existence if the enclosing pragma is ignored.
4449 * sem_util.adb: Minor reformatting.
4451 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4453 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
4454 array aggregate expanded into assignments when it appears as a
4455 local declaration in an inlined body.
4457 2014-07-17 Doug Rupp <rupp@adacore.com>
4459 * init.c [__ANDROID__]: Modify for ZCX.
4460 * exp_aggr.adb: Minor reformatting
4461 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
4463 2014-07-17 Robert Dewar <dewar@adacore.com>
4465 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
4466 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
4467 scng.adb: Remove incorrect usage "allow to" and "allows to".
4469 2014-07-17 Robert Dewar <dewar@adacore.com>
4471 * exp_dist.adb: Minor reformatting.
4473 2014-07-17 Bob Duff <duff@adacore.com>
4475 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
4477 2014-07-17 Robert Dewar <dewar@adacore.com>
4479 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
4480 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
4482 2014-07-17 Thomas Quinot <quinot@adacore.com>
4484 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
4485 non-bit-packed array, propagate Reverse_Storage_Order to the
4488 2014-07-17 Javier Miranda <miranda@adacore.com>
4490 * exp_disp.adb: Fix comment.
4491 * exp_pakd.adb: Minor reformatting.
4493 2014-07-17 Robert Dewar <dewar@adacore.com>
4495 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
4496 entity if none exists (Gen_Elab_Calls): Complain if clash with
4497 No_Multiple_Elaboration.
4498 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
4499 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
4501 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
4502 * sem_ch4.adb: Minor comment updates.
4504 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4506 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
4507 of function call for later use when shared passive objects
4510 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4512 * par-ch13.adb (Get_Aspect_Specifications):
4513 Catch a case where the argument of SPARK aspect Refined_State
4514 is not properly parenthesized.
4516 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4518 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
4519 the lifetime of a reference to an Ada 2012 container element.
4520 (Is_Element_Reference): New routine.
4522 2014-07-17 Robert Dewar <dewar@adacore.com>
4524 * ali.ads: Minor comment fix.
4525 * lib-writ.adb: Minor reformatting.
4527 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4529 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
4530 in ASIS mode, load another subunit only if it a subunit of the
4531 current one, not a sibling that has been reached through the
4532 analysis of an ancestor. This allows the construction of the
4533 ASIS tree for the subunit even when sibling subunits have errors.
4535 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4537 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
4538 prevents the analysis of various contracts when the associated
4539 construct is erroneous.
4540 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
4541 SPARK_Pragma of an illegal or a partially decorated construct.
4543 2014-07-17 Robert Dewar <dewar@adacore.com>
4545 * s-imguns.ads: Minor reformatting.
4547 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4549 * exp_ch7.adb (Build_Finalization_Master): Move all local
4550 variables to the proper code section. When looking for an existing
4551 finalization master, inspect the ultimate ancestor type of the
4553 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
4555 2014-07-17 Robert Dewar <dewar@adacore.com>
4557 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
4558 * gnat_rm.texi: Document Entity argument for pragma Annotate and
4560 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
4561 for Annotate aspect.
4562 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
4563 Entity argument at end.
4564 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
4566 2014-07-17 Tristan Gingold <gingold@adacore.com>
4568 * s-imguns.ads: Fix minor typo.
4570 2014-07-17 Thomas Quinot <quinot@adacore.com>
4572 * sprint.adb: Minor reformatting.
4574 2014-07-17 Robert Dewar <dewar@adacore.com>
4576 * sprint.adb (Write_Itype): Print proper header for string
4579 2014-07-17 Steve Baird <baird@adacore.com>
4581 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
4583 2014-07-17 Vincent Celier <celier@adacore.com>
4585 * gnatbind.adb: Change in message "try ... for more information".
4587 2014-07-17 Robert Dewar <dewar@adacore.com>
4589 * sprint.adb: Code clean up.
4591 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4593 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
4594 the relevant code section. Add new local constant Obj_Id. When
4595 a limited controlled object is initialized by a function call,
4596 the build-in-place object access function call acts as the last
4597 initialization statement.
4598 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
4599 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
4600 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
4602 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4604 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
4605 propagate intrinsic flag to renamed entity, to allow e.g. renaming
4606 of Unchecked_Conversion.
4607 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
4608 if the declaration has errors.
4610 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4612 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
4613 container is busy before checking whether capacity allows for
4614 a further insertion. Insertion in a busy container that is full
4615 raises Program_Error rather than Capacity_Error. Previous to that
4616 patch which exception was raised varied among container types.
4618 2014-07-17 Robert Dewar <dewar@adacore.com>
4620 * g-comlin.ads, g-comlin.adb: Minor clean up.
4622 2014-07-17 Bob Duff <duff@adacore.com>
4624 * gnat_ugn.texi: Update gnatpp doc.
4626 2014-07-17 Robert Dewar <dewar@adacore.com>
4628 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
4629 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
4630 could do this by actually expanding a real generic.
4631 * a-tags.ads: Add comments about performance.
4632 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
4633 Print Etype of defining identifier, rather than the object
4634 definition. More information.
4636 2014-07-17 Thomas Quinot <quinot@adacore.com>
4638 * exp_dist.adb: Minor documentation clarification.
4640 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4642 * exp_util.adb (Is_Aliased): Revert previous change.
4644 2014-07-17 Vincent Celier <celier@adacore.com>
4646 * g-comlin.adb (Try_Help): New procedure.
4647 (Getopt): Use new procedure Try_Help.
4648 * g-comlin.ads (Try_Help): New procedure.
4650 2014-07-17 Bob Duff <duff@adacore.com>
4652 * gnat_ugn.texi: Minor update.
4654 2014-07-17 Robert Dewar <dewar@adacore.com>
4656 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
4657 * sinfo.ads: Document restriction on aggregates (must expand to
4658 assignments if one or more assignments needs expansion, e.g. for
4660 * sem_ch13.adb: All warning messages regarding bit order should
4662 * gnat_ugn.texi: Minor correction of missing @ on @code
4664 2014-07-17 Robert Dewar <dewar@adacore.com>
4666 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
4667 * s-rident.ads (Partition_Boolean_Restrictions): Add
4668 No_Long_Long_Integer.
4669 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
4670 Long_Integer'Size if restriction No_Long_Long_Integer is active.
4671 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
4672 as the implicit base type for a signed integer type declaration
4673 if restriction No_Long_Long_Integer is active.
4674 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
4675 No_Long_Long_Integer.
4677 2014-07-17 Robert Dewar <dewar@adacore.com>
4679 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
4680 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
4681 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
4682 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
4683 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
4685 2014-07-17 Robert Dewar <dewar@adacore.com>
4687 * debug.adb: Remove -gnatdQ.
4688 * exp_disp.adb: Remove -gnatdQ.
4689 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
4690 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
4691 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
4692 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
4693 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
4694 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
4696 2014-07-17 Robert Dewar <dewar@adacore.com>
4698 * back_end.adb: Minor reformatting and comment additions.
4699 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
4701 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
4702 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
4703 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
4704 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
4705 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
4706 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
4708 2014-07-17 Robert Dewar <dewar@adacore.com>
4710 * gnat_rm.texi: Minor comment updates.
4712 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4714 * sem_util.adb (Make_Explicit_Dereference): If the expression
4715 being dereferenced is a generalized indexing, reset the overloaded
4716 flag on the generalized indexing call, consistent with the
4717 resetting of the flag on the original indexed component.
4719 2014-07-17 Robert Dewar <dewar@adacore.com>
4721 * gnat_ugn.texi: Document advise not to mix -gnatV? and
4724 2014-07-17 Robert Dewar <dewar@adacore.com>
4726 * checks.adb (Insert_Valid_Check): Don't insist on a name
4727 for the prefix when we make calls to Force_Evaluation and
4728 Duplicate_Subexpr_No_Checks.
4729 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
4730 (Remove_Side_Effects): Handle all volatile references right
4731 (Side_Effect_Free): Volatile reference is never side effect free
4732 * sinfo.ads (N_Attribute_Reference): Add comments explaining
4733 that in the tree, the prefix can be a general expression.
4735 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4737 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
4738 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
4739 * sem_ch7.adb (Analyze_Package_Body_Contract,
4740 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
4742 2014-07-17 Robert Dewar <dewar@adacore.com>
4744 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
4745 Store_After_Actions_In_Scope.
4747 2014-07-17 Robert Dewar <dewar@adacore.com>
4749 * sem_aux.ads: Minor comment addition.
4751 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4753 * sem_res.adb (Make_Call_Into_Operator): If the call is already
4754 a rewriting of an operator node, there are no actuals to be
4755 propagated from original node to rewritten node when in ASIS mode.
4757 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4759 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
4760 Analyze_Subprogram_Contract): Add new local variable Mode. Save
4761 and restore the SPARK mode of the related construct in a
4763 * sem_ch7.adb (Analyze_Package_Body_Contract,
4764 Analyze_Package_Contract): Add new local variable Mode. Save and
4765 restore the SPARK mode of the related construct in a stack-like fashion.
4766 * sem_util.adb Remove with and use clause for Opt.
4767 (Restore_SPARK_Mode): New routine.
4768 (Save_SPARK_Mode_And_Set): New routine.
4769 * sem_util.ads Add with and use clause for Opt.
4770 (Restore_SPARK_Mode): New routine.
4771 (Save_SPARK_Mode_And_Set): New routine.
4773 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4775 * exp_util.adb (Is_Aliased): Transient objects
4776 within an expression with actions cannot be considered aliased.
4778 2014-07-17 Thomas Quinot <quinot@adacore.com>
4780 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
4781 introduce a new list (cleanup actions) for each (transient) scope.
4782 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
4784 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
4785 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
4786 processing for Store_xxx_Actions_In_Scope.
4787 (Build_Cleanup_Statements): Allow for a list of additional
4788 cleanup statements to be passed by the caller.
4789 (Expand_Cleanup_Actions): Take custom cleanup actions associated
4790 with an N_Block_Statement into account.
4791 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
4792 reorganization (refactoring only, no behaviour change).
4793 (Make_Transient_Block): Add assertion to ensure that the current
4794 scope is indeed a block (namely, the entity for the transient
4795 block being constructed syntactically, which has already been
4796 established as a scope). If cleanup actions are present in the
4797 transient scope, transfer them now to the transient block.
4798 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
4799 called function while it is still present as the name in a call
4800 in the tree. This may not be the case later on if the call is
4801 rewritten into a transient block.
4802 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
4803 inserted after calling a protected operation on a shared passive
4804 protected must be performed in a block finalizer, not just
4805 inserted in the tree, so that they are executed even in case of
4806 a normal (RETURN) or abnormal (exception) transfer of control
4807 outside of the current scope.
4808 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
4809 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
4810 Scope_Stack_Entry reorganization.
4812 2014-07-17 Thomas Quinot <quinot@adacore.com>
4814 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
4815 call for types that do not have an explicit attribute definition
4816 clause for External_Tag, as their default tag may clash with an
4817 explicit tag defined for some other type.
4819 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
4821 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
4822 controlled function call with multiple actual parameters that
4823 appears in Object.Operation form.
4825 2014-07-17 Thomas Quinot <quinot@adacore.com>
4827 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
4829 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4830 External_Tag): No need to set entity flag.
4831 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
4832 Reimplement correctly in terms of Has_Rep_Item.
4834 2014-07-17 Thomas Quinot <quinot@adacore.com>
4836 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
4837 Start examining the tree at the node passed to
4838 Establish_Transient_Scope (not its parent).
4839 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
4840 The access type for the variable storing the reference to
4841 the call must be declared and frozen prior to establishing a
4843 * exp_ch9.adb: Minor reformatting.
4845 2014-07-17 Pascal Obry <obry@adacore.com>
4847 * s-os_lib.ads: Minor comment update.
4849 2014-07-17 Tristan Gingold <gingold@adacore.com>
4851 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
4853 * socket.c: Remove #warning to avoid warning.
4854 * expect.c: Indent some preprocessor directives to clarify
4855 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
4857 * env.c: Fix indentation. Port to PikeOS.
4858 * gsocket.h: Port to PikeOS. Remove #warning.
4859 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
4860 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
4861 of stubbed __gnat_setup_parent_communication.
4862 * adaint.c: Port to PikeOS. Reindent some preprocessor
4863 directives to clarify nested if. Fix indentation. Add missing
4866 2014-07-17 Robert Dewar <dewar@adacore.com>
4868 * sem_attr.adb: Minor reformatting.
4870 2014-07-17 Robert Dewar <dewar@adacore.com>
4872 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
4874 2014-07-17 Ed Schonberg <schonberg@adacore.com>
4876 * sem_case.adb (Check_Choice_Set): If the case expression is the
4877 expression in a predicate, do not recheck coverage against itself,
4878 to prevent spurious errors.
4879 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
4880 expression comes from an aspect specification, to prevent spurious
4881 errors when expression is a case expression in a predicate.
4883 2014-07-17 Pascal Obry <obry@adacore.com>
4885 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
4886 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
4888 2014-07-17 Vincent Celier <celier@adacore.com>
4890 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
4891 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
4892 the usage for an erroneous invocation of a gnat tool.
4894 2014-07-16 Vincent Celier <celier@adacore.com>
4896 * gnatls.adb: Get the target parameters only if -nostdinc was
4899 2014-07-16 Ed Schonberg <schonberg@adacore.com>
4901 * checks.adb (Insert_Valid_Check): If the expression is a packed
4902 component of a modular type of the right size the data is always
4903 valid. This os particularly useful if the component is part of
4904 a volatile variable.
4906 2014-07-16 Robert Dewar <dewar@adacore.com>
4908 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
4910 2014-07-16 Thomas Quinot <quinot@adacore.com>
4912 * exp_ch7.ads: Minor documentation fix.
4914 2014-07-16 Ed Schonberg <schonberg@adacore.com>
4916 * sem_ch3.adb (Find_Type_Name): Diagnose properly
4917 a private extension completion that is an interface definition
4918 with an interface list.
4920 2014-07-16 Arnaud Charlet <charlet@adacore.com>
4922 * gnatls.adb (Gnatls): Code clean ups.
4924 2014-07-16 Thomas Quinot <quinot@adacore.com>
4926 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
4927 * sem.adb (Analyze): Handle N_Compound_Statement.
4928 * sprint.adb (Sprint_Node_Actual): Ditto.
4929 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
4930 procedure to handle N_Compound_Statement.
4931 * exp_aggr.adb (Collect_Initialization_Statements):
4932 Use a proper compound statement node, instead of a bogus
4933 expression-with-actions with a NULL statement as its expression,
4934 to wrap collected initialization statements.
4935 * freeze.ads, freeze.adb
4936 (Explode_Initialization_Compound_Statement): New public procedure,
4937 lifted from Freeze_Entity.
4938 (Freeze_Entity): When freezing
4939 an object with captured initialization statements and without
4940 delayed freezing, explode compount statement.
4941 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
4942 case that used to handle bogus EWAs with NULL statement as
4944 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
4945 delayed freezing and captured initialization statements, explode
4948 2014-07-16 Gary Dismukes <dismukes@adacore.com>
4950 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
4952 2014-07-16 Doug Rupp <rupp@adacore.com>
4954 * s-interr-hwint.adb: Casing error on parameter.
4956 2014-07-16 Pascal Obry <obry@adacore.com>
4958 * Makefile.rtl: Add g-rewdat.o dependencies in
4959 GNATRTL_NONTASKING_OBJS.
4961 2014-07-16 Ed Schonberg <schonberg@adacore.com>
4963 * sem_case.adb: Code clean up.
4965 2014-07-16 Vincent Celier <celier@adacore.com>
4967 * make.adb: Do not read gnat.adc when gnatmake is invoked
4970 2014-07-16 Pascal Obry <obry@adacore.com>
4972 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
4973 implementation of GNAT.Rewrite_Data.
4975 2014-07-16 Vincent Celier <celier@adacore.com>
4977 * gnatls.adb (Normalize): New function.
4978 (Gnatls): Get the target parameters. On targets other than VMS,
4979 normalize the path names in the source search path, the object search
4980 path and the project search path.
4982 2014-07-16 Ed Schonberg <schonberg@adacore.com>
4984 * sem_case.adb: Avoid self-checking of case expressions in
4987 2014-07-16 Robert Dewar <dewar@adacore.com>
4989 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
4992 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
4994 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
4996 2014-07-16 Ben Brosgol <brosgol@adacore.com>
4998 * gnat_ugn.texi: Fix typo.
5000 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5002 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
5003 expression if it is the specification of a subtype predicate:
5004 it will be expanded when the return statement is analyzed, or
5005 when a static predicate is transformed into a static expression
5006 for evaluation by the front-end.
5007 * sem_ch13.adb (Get_RList): If the expression for a static
5008 predicate is a case expression, extract the alternatives of the
5009 branches with a True value to create the required statically
5010 evaluable expression.
5012 2014-07-16 Thomas Quinot <quinot@adacore.com>
5014 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
5015 expression, not the location of the aspect, for all generated
5016 code, so that in particular the call to raise_assert_failure
5017 gets the sloc of the associated condition.
5019 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
5020 Set an explicit End_Label on the handled sequence of statements
5021 for the _Postconditions procedure so that the implicit return
5022 statement does not erroneously get associated with code generated
5023 for the last condition in postconditions.
5025 2014-07-16 Thomas Quinot <quinot@adacore.com>
5027 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
5028 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
5029 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
5032 2014-07-16 Robert Dewar <dewar@adacore.com>
5034 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
5035 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
5036 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
5038 * par-ch4.adb (At_Start_Of_Attribute): New function
5039 (P_Simple_Expression): Better msg for bad attribute prefix.
5040 * scans.ads: Minor reformatting.
5042 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5044 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
5045 static constant, check that in belongs to the corresponding index
5046 subtype, to produce the proer warning when expansion is disabled.
5048 2014-07-16 Robert Dewar <dewar@adacore.com>
5050 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
5051 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
5052 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
5053 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
5054 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
5056 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
5057 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
5060 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5062 * exp_ch7.adb (Process_Declarations): Reinstate the check on
5063 a hook object to ensure that the related transient declaration
5065 * exp_util.adb (Is_Aliased): Do not consider expresison with
5066 actions as a special context.
5067 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
5068 ensure that the related transient declaration is finalizable.
5070 2014-07-16 Robert Dewar <dewar@adacore.com>
5072 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
5073 * snames.ads-tmpl: Add Allocation_Check to list of check names.
5074 * types.ads: Add Allocation_Check to list of check names.
5076 2014-07-16 Thomas Quinot <quinot@adacore.com>
5078 * sem_util.adb (Enter_Name): replace bogus test for presence of
5079 Corresponding_Remote_Type with correct test on Ekind.
5080 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
5081 of calls to Corresponding_ Remote_Type (documentation fix).
5083 2014-07-16 Robert Dewar <dewar@adacore.com>
5085 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
5086 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
5088 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
5089 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
5091 2014-07-16 Robert Dewar <dewar@adacore.com>
5093 * gnat_ugn.texi: Document binder switch -Ra.
5094 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
5096 * opt.ads (List_Closure_All): New switch.
5097 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
5100 2014-07-16 Ben Brosgol <brosgol@adacore.com>
5102 * gnat_rm.texi: Minor edits, to make case consistent in names
5103 of types and fields.
5105 2014-07-16 Robert Dewar <dewar@adacore.com>
5107 * gnat_rm.texi: Document erroneous mixing of thin pointers and
5109 * gnat_ugn.texi: Add note on size of access types about thin
5110 pointers and the use of attribute Unrestricted_Access.
5112 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5114 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
5115 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
5116 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
5117 machinery to detect tampering on bounded vectors.
5119 2014-07-16 Robert Dewar <dewar@adacore.com>
5121 * gnat_rm.texi: Document that leading/trailing asterisks are
5122 now implied for the pattern match string for pragma Warnings
5123 and Warning_As_Error.
5124 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
5125 (Analyze_Pragma, case Warning_As_Error): Call
5126 Acquire_Warning_Match_String.
5127 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
5129 2014-07-16 Bob Duff <duff@adacore.com>
5131 * gnat_ugn.texi: Document need for project file
5132 for --incremental switch for gnat2xml.
5134 2014-07-16 Robert Dewar <dewar@adacore.com>
5136 * gnat_rm.texi: Fix example of non-packable components in packed
5139 2014-07-16 Robert Dewar <dewar@adacore.com>
5141 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
5142 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
5143 upper case in exception messages.
5145 2014-07-16 Robert Dewar <dewar@adacore.com>
5147 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
5148 is renamed Has_Same_Storage.
5149 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
5150 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
5153 2014-07-16 Robert Dewar <dewar@adacore.com>
5155 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
5156 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
5158 2014-07-16 Robert Dewar <dewar@adacore.com>
5160 * gnat_ugn.texi: Add note that integrated
5161 preprocessing cannot be applied to configuration pragma files.
5163 2014-07-16 Yannick Moy <moy@adacore.com>
5165 * sem_attr.adb (Analyze_Attribute/cases Pred
5166 and Succ): Always enable range check on fixed-point types if
5167 not suppressed for the type.
5169 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5171 * sem_util.adb (State_Has_Enabled_Property):
5172 Account for an external property denoted by an others choice.
5174 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5176 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
5177 * exp_ch7.adb (Process_Declarations): There is no need to check
5178 that a transient object being hooked is controlled as it would
5179 not have been hooked in the first place.
5180 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
5181 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
5182 (Is_Aliased): A renaming of a transient controlled object is
5183 not considered aliasing when it occurs within an expression
5185 (Requires_Cleanup_Actions): There is no need to
5186 check that a transient object being hooked is controlled as it
5187 would not have been hooked in the first place.
5188 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
5190 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5192 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
5193 the outer level of routine Analyze_Aspect_Specifications. Ensure
5194 that the corresponding pragmas of aspects Initial_Condition and
5195 Initializes are inserted after pragma SPARK_Mode.
5197 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5199 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
5200 properly a choice list with more than one choice, where each
5201 is an aggregate denoting a sequence of array indices for a
5202 multidimentional array. For SPARK use.
5204 2014-07-16 Vadim Godunko <godunko@adacore.com>
5206 * a-coinho-shared.adb (Adjust): Create
5207 copy of internal shared object and element when source container
5210 (Query_Element): Likewise.
5211 (Update_Element): Likewise.
5212 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
5213 to get reference for empty holder.
5214 (Reference): Likewise.
5216 2014-07-16 Thomas Quinot <quinot@adacore.com>
5218 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
5219 from Process_Transient_Oject.
5220 * exp_ch4.ads: Ditto.
5221 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
5222 declaration as an action on the topmost enclosing expression,
5223 not on a possibly conditional subexpreession.
5225 2014-07-16 Vadim Godunko <godunko@adacore.com>
5227 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
5228 Fix parameter mode of Update_Element.
5230 2014-07-16 Robert Dewar <dewar@adacore.com>
5232 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
5235 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5237 * a-cohase.ads: Type Iterator must be controlled, so that the
5238 tampering bit is properly set through an iteration.
5239 * a-cohase.adb: Add Finalize operation for type Iterator.
5241 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5243 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
5246 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5248 * a-coinho-shared.adb: Fix spurious accessibility check.
5250 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
5252 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
5254 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5257 * gnat_rm.texi: Fix errors with makeinfo 5.1.
5259 2014-06-14 Arnaud Charlet <charlet@adacore.com>
5262 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
5264 2014-06-13 Yannick Moy <moy@adacore.com>
5266 * exp_attr.adb: Fix typo in comment.
5267 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
5268 checking in GNATprove_Mode.
5270 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5272 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
5274 2014-06-13 Robert Dewar <dewar@adacore.com>
5276 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
5279 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5281 * sem_prag.adb (Analyze_Pragma): Add local
5282 variable Missing_Parentheses. Emit an error when a state
5283 declaration with options appears without parentheses. Add a
5284 guard to prevent a bogus error when a state declaration may be
5285 interpreted as an option if a previous declaration with options
5286 was not parenthesized.
5288 2014-06-13 Robert Dewar <dewar@adacore.com>
5290 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
5291 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
5292 * checks.ads (Alignment_Warnings_Record): New type.
5293 (Alignment_Warnings): New table
5294 (Validate_Alignment_Check_Warnings): New procedure.
5295 * errout.adb (Delete_Warning_And_Continuations): New procedure
5296 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
5297 Warnings_Treated_As_Errors (Finalize): Minor reformatting
5298 * errout.ads (Warning_Msg): New variable
5299 (Delete_Warning_And_Continuations): New procedure
5300 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
5301 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
5303 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5305 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
5307 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5309 * errout.adb (SPARK_Msg_N): New routine.
5310 (SPARK_Msg_NE): New routine.
5311 * errout.ads Add a section on SPARK-related error routines.
5312 (SPARK_Msg_N): New routine.
5313 (SPARK_Msg_NE): New routine.
5314 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
5315 pragma Abstract_State is always inserted after SPARK_Mode.
5316 (Insert_After_SPARK_Mode): New routine.
5317 * sem_prag.adb (Analyze_Abstract_State,
5318 Analyze_Constituent, Analyze_External_Property,
5319 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
5320 Analyze_Global_List, Analyze_Initialization_Item,
5321 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
5322 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
5323 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
5324 Analyze_Refined_Global_In_Decl_Part,
5325 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
5326 Check_Aspect_Specification_Order, Check_Constituent_Usage,
5327 Check_Declaration_Order, Check_Dependency_Clause,
5328 Check_Duplicate_Mode, Check_Duplicate_Option,
5329 Check_Duplicate_Property, Check_External_Properties,
5330 Check_External_Property, Check_Function_Return,
5331 Check_Matching_Constituent, Check_Matching_State,
5332 Check_Mode_Restriction_In_Enclosing_Context,
5333 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
5334 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
5335 Has_Extra_Parentheses, Inconsistent_Mode_Error,
5336 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
5337 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
5338 Report_Unrefined_States, Report_Unused_Constituents,
5339 Report_Unused_States, Role_Error, Usage_Error):
5340 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
5341 to report semantic errors only when SPARK_Mode is on.
5342 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
5343 pragma Depends explicitly, this is now done by the analysis.
5344 (Analyze_Global_In_Decl_List): Do not check the syntax of
5345 pragma Global explicitly, this is now done by the analysis.
5346 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
5347 pragma Initializes explicitly, this is now done by the analysis.
5348 (Analyze_Part_Of): Do not check the syntax of the encapsulating
5349 state, this is now done by the analysis.
5350 (Analyze_Pragma): Do
5351 not check the syntax of a state declaration, this is now done
5353 (Analyze_Refined_Depends_In_Decl_Part): Do not
5354 check the syntax of pragma Refined_Depends explicitly, this is now
5355 done by the analysis.
5356 (Analyze_Refined_Global_In_Decl_Part): Do
5357 not check the syntax of pragma Refined_Global explicitly, this is
5358 now done by the analysis.
5359 (Analyze_Refined_State_In_Decl_Part):
5360 Do not check the syntax of pragma Refined_State explicitly, this
5361 is now done by the analysis.
5362 (Check_Dependence_List_Syntax): Removed.
5363 (Check_Global_List_Syntax): Removed.
5364 (Check_Initialization_List_Syntax): Removed.
5365 (Check_Item_Syntax): Removed.
5366 (Check_Missing_Part_Of): Do not consider items from an instance.
5367 (Check_Refinement_List_Syntax): Removed.
5368 (Check_State_Declaration_Syntax): Removed.
5369 (Collect_Global_List): Do not raise Program_Error when the input is
5371 (Process_Global_List): Do not raise Program_Error when the input
5373 * sem_ch13.adb: Minor reformatting.
5375 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5377 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
5378 that is an interface definition with an interface list.
5379 (Process_Full_View): Move error message on missmatched interfaces
5380 between views to the declaration of full view, for clarity.
5381 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
5384 2014-06-13 Robert Dewar <dewar@adacore.com>
5386 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
5389 2014-06-13 Robert Dewar <dewar@adacore.com>
5391 * makeutl.adb: Minor reformatting.
5393 2014-06-13 Gail Schenker <schenker@adacore.com>
5395 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
5396 associated flag (d.z), no longer needed.
5398 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5400 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
5401 Export aspects, do not check whether a corresponding Convention
5402 aspect has been specified. Convention is optional in Ada2012,
5403 and defaults to Convention_Ada.
5405 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
5407 * checks.adb (Apply_Address_Clause_Check): Only issue the new
5408 warning if the propagation warning is issued.
5410 2014-06-13 Thomas Quinot <quinot@adacore.com>
5412 * exp_ch4.adb: Minor reformatting.
5414 2014-06-13 Robert Dewar <dewar@adacore.com>
5416 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
5417 Handle float range check case (Expand_N_Attribute_Reference,
5418 case Succ): Handle float range check case.
5419 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
5422 2014-06-13 Vincent Celier <celier@adacore.com>
5424 * makeutl.ads (Compute_Builder_Switches): Change name of
5425 parameter Root_Environment to Env.
5426 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
5427 Env parameter of procedure Get_Or_Create_Configuration_File.
5428 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
5429 of new parameter Env.
5430 * prj-conf.ads (Locate_Runtime): New parameter Env of type
5431 Prj.Tree.Environment.
5433 2014-06-13 Robert Dewar <dewar@adacore.com>
5435 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
5437 2014-06-13 Robert Dewar <dewar@adacore.com>
5439 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
5441 * sem_attr.adb: Minor code reformatting and simplification.
5442 * checks.adb: Fix minor typo.
5444 2014-06-13 Emmanuel Briot <briot@adacore.com>
5446 * g-comlin.adb (Get_Argument): fix expansion
5447 of command line arguments (e.g. "*.adb") when using a custom
5448 parser. The parser was not passed to the recursive call, and
5449 thus we were trying to do the expansion on the default command
5452 2014-06-13 Thomas Quinot <quinot@adacore.com>
5454 * exp_ch9.adb: Minor reformatting.
5456 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5458 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
5459 To determine whether the attribute should be expanded, examine
5460 whether the enclosing postcondition pragma is to be checked,
5461 rather than using the internal flag Assertions_Enabled.
5463 2014-06-13 Ben Brosgol <brosgol@adacore.com>
5465 * gnat_rm.texi: Minor fixes.
5466 * gnat_ugn.texi: Added a missing "@itemize".
5468 2014-06-13 Robert Dewar <dewar@adacore.com>
5470 * debug.adb: Remove -gnatd.1 flag documentation.
5471 * layout.adb (Layout_Type): Remove special handling of size
5472 for anonymous access type.
5473 * sem_ch3.adb (Replace_Type): Remove special handling of size
5474 for anonymous access type.
5476 2014-06-13 Robert Dewar <dewar@adacore.com>
5478 * debug.adb: Document debug flag -gnatd.1.
5479 * layout.adb (Layout_Type): Size change for anonymous access
5480 types under -gnatd.1.
5481 * sem_ch3.adb (Replace_Type): Size change for anonymous access
5482 types under -gnatd.1.
5484 2014-06-13 Robert Dewar <dewar@adacore.com>
5486 * layout.adb (Layout_Type): Anonymous access types designating
5487 unconstrained arrays are always thin pointers.
5488 * sem_ch3.adb (Replace_Type): Anonymous access types designating
5489 unconstrained arrays are always thin pointers.
5491 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5493 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
5494 to resolve the prefix of an attribute that is an entity name
5495 and may be a parameterless call. Minor code reorganization.
5497 2014-06-13 Robert Dewar <dewar@adacore.com>
5499 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
5501 * opt.ads (Compiler_Unit): New flag.
5502 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
5503 for null statement sequence (not allowed in compiler unit).
5504 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
5506 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
5508 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
5509 Check_Compiler_Unit.
5510 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
5511 Check_Compiler_Unit (this construct is not allowed in compiler
5513 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
5514 Set Opt.Compiler_Unit.
5516 2014-06-13 Geert Bosch <bosch@adacore.com>
5518 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
5519 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
5520 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
5522 2014-06-13 Robert Dewar <dewar@adacore.com>
5524 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
5526 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5528 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
5529 types in SPARK as it is poorly placed and poorly formulated. The
5530 check was flagging ALL volatile entities as illegal in SPARK.
5531 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
5532 types as illegal in SPARK.
5534 2014-06-13 Robert Dewar <dewar@adacore.com>
5536 * sem_cat.adb: Minor reformatting.
5538 2014-06-13 Yannick Moy <moy@adacore.com>
5540 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
5542 2014-06-13 Arnaud Charlet <charlet@adacore.com>
5544 * gnat_rm.texi: Add detail on SPARK_05 restriction.
5546 2014-06-13 Bob Duff <duff@adacore.com>
5548 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
5549 Add assertions requiring the secondary stack to be initialized.
5550 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
5551 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
5552 secondary stack is initialized before calling Init_Tasking_Soft_Links,
5553 by adding pragmas Elaborate_Body.
5555 2014-06-13 Thomas Quinot <quinot@adacore.com>
5557 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
5558 kludge disabling new legality check.
5560 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5562 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
5564 (Freeze_Type): Volatile types are now illegal in SPARK.
5566 2014-06-13 Robert Dewar <dewar@adacore.com>
5568 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
5569 * gnat_rm.texi: Document aspect Thread_Local_Storage.
5571 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5573 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
5574 value is a temporary that renames an aggregate is legal in a
5575 preelaborated unit. Illegalities, if any will be detected in
5576 the aggregate components.
5578 2014-06-13 Ed Schonberg <schonberg@adacore.com>
5580 * einfo.ads: Minor reformatting an comment expansion.
5582 2014-06-13 Robert Dewar <dewar@adacore.com>
5584 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
5586 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
5588 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
5589 * sem_warn.adb: Minor reformatting.
5591 2014-06-13 Doug Rupp <rupp@adacore.com>
5593 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
5596 2014-06-13 Yannick Moy <moy@adacore.com>
5598 * sem_warn.adb (Check_Unset_References): Take
5599 case of Refined_Post into account in Within_Postcondition check.
5601 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
5603 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
5606 2014-06-13 Yannick Moy <moy@adacore.com>
5608 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
5609 Aspect_Export): Consider that variables may be set outside the program.
5611 2014-06-13 Robert Dewar <dewar@adacore.com>
5613 * back_end.adb (Make_Id): New function.
5614 (Make_SC): New function.
5615 (Set_RND): New procedure.
5616 * back_end.ads (Make_Id): New function.
5617 (Make_SC): New function.
5618 (Set_RND): New procedure.
5619 * einfo.ads: Minor comment updates.
5620 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
5621 * gnat1drv.adb (Gnat1drv): New calling sequence for
5622 Get_Target_Parameters.
5623 (Gnat1drv): Move Atree.Initialize here from Frontend.
5624 * targparm.adb (Get_Target_Parameters): New calling
5625 sequence (Get_Target_Parameters): Handle pragma Restriction
5627 * targparm.ads (Get_Target_Parameters): New calling sequence.
5629 2014-06-13 Gary Dismukes <dismukes@adacore.com>
5631 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
5632 loop if the pragma does not come from source, so that an implicit
5633 pragma Import only applies to the first declaration, avoiding
5634 possible conflicts with earlier explicit and implicit declarations
5635 due to multiple Provide_Shift_Operators pragmas.
5636 (Set_Imported): Remove previous fix that bypassed pragma duplication
5638 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
5639 of Provide_Shift_Operators.
5641 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
5643 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
5644 string pointer directly to set_decl_section_name.
5646 2014-06-11 Robert Dewar <dewar@adacore.com>
5648 * sem_ch13.adb: Minor reformatting.
5650 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5652 * sem_prag.adb (Check_Clause_Syntax): Add new
5653 local variable Outputs. Account for the case where multiple
5654 output items appear as an aggregate.
5656 2014-06-11 Robert Dewar <dewar@adacore.com>
5658 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
5661 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5663 * einfo.ads: Minor reformatting.
5665 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5667 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
5668 new variable First_Node. Update the position after all insertions have
5669 taken place to First_Node.
5671 2014-06-11 Robert Dewar <dewar@adacore.com>
5673 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
5674 * layout.adb (Layout_Type): Remove test of -gnatd.1.
5676 2014-06-11 Robert Dewar <dewar@adacore.com>
5678 * sem_ch13.adb: Minor reformatting.
5680 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5682 * sem_prag.adb (Check_Clause_Syntax): Add new
5683 local variable Outputs. Account for the case where multiple
5684 output items appear as an aggregate.
5686 2014-06-11 Robert Dewar <dewar@adacore.com>
5688 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
5691 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5693 * einfo.ads: Minor reformatting.
5695 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5697 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
5698 new variable First_Node. Update the position after all insertions have
5699 taken place to First_Node.
5701 2014-06-11 Robert Dewar <dewar@adacore.com>
5703 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
5704 * layout.adb (Layout_Type): Remove test of -gnatd.1.
5706 2014-06-11 Thomas Quinot <quinot@adacore.com>
5708 * freeze.ads: Minor reformatting.
5709 * checks.adb (Determine_Range): Do not attempt to determine
5710 the range of a deferred constant whose full view has not been
5712 * sem_res.adb (Resolve): Remove undesirable guard against
5713 resolving expressions from expression functions.
5715 2014-06-11 Robert Dewar <dewar@adacore.com>
5717 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
5719 * layout.adb (Layout_Type): Make anonymous access types for
5720 subprogram formal types and return types always thin. For now
5721 only enabled if -gnatd.1 set.
5723 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5725 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
5726 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
5727 subprogram must be a null procedure.
5729 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5731 * sem_prag.adb (Analyze_Input_Item): Allow formal
5732 parameters to appear as input_items in an initialization_list
5733 of pragma Initializes. Encapsulation now applies to states and
5734 variables only (as it should). Add RM references to key errors.
5735 * sem_prag.adb (Set_Imported): Suppress errors
5736 about preceding Imports when the pragma does not come from source,
5737 which can happen through use of pragma Provide_Shift_Operators.
5739 2014-06-11 Thomas Quinot <quinot@adacore.com>
5741 * sem_ch3.adb: Minor reformatting.
5742 * einfo.ads (Full_View): Minor comment update.
5744 2014-06-11 Robert Dewar <dewar@adacore.com>
5746 * einfo.adb (Is_Independent): New flag.
5747 * einfo.ads (Is_Independent): New flag.
5748 (Has_Independent_Components): Clean up and fix comments.
5749 * sem_prag.adb (Fix_Error): Deal with changing argument
5750 [of] to entity [for].
5751 (Analyze_Pragma, case Independent): Set Is_Independent flag
5752 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
5753 in all components of specified record.
5755 2014-06-11 Thomas Quinot <quinot@adacore.com>
5757 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
5758 Set proper Etype on bounds of dummy type created for analysis
5761 2014-06-11 Robert Dewar <dewar@adacore.com>
5763 * debug.adb: Minor comment fix (add missing section of dot
5766 2014-06-11 Robert Dewar <dewar@adacore.com>
5768 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
5769 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
5770 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
5771 * errout.adb (Output_Messages): Avoid duplicate output for
5772 library level instance.
5773 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
5774 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
5775 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
5776 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
5777 accomodate largest modulus value.
5778 * gnat_ugn.texi: Minor updates.
5780 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5782 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
5783 load body of generic package or its parent, if body is optional
5784 and the unit does not require a body.
5786 2014-06-11 Robert Dewar <dewar@adacore.com>
5788 * gnat_rm.texi: Document System.Unsigned_Types.
5789 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
5790 * s-unstyp.ads: Update comments (this is now user available unit).
5792 2014-06-11 Robert Dewar <dewar@adacore.com>
5794 * make.adb, sem_res.adb: Minor reformatting.
5796 2014-06-11 Thomas Quinot <quinot@adacore.com>
5798 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
5799 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
5800 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
5801 Preelaborate_05 to just Preelaborate in runtime units, and similarly
5802 change Pure_05 to just Pure.
5804 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5806 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
5807 analysis if error has been posted on subprogram body.
5809 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5811 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
5812 rule given in RM 13.1 (8/1) for operational attributes to stream
5813 attributes: the attribute must apply to a first subtype. Fixes
5814 missing errors in ACATS test bdd2004.
5816 2014-06-11 Robert Dewar <dewar@adacore.com>
5818 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
5819 record type if restriction No_Implicit_Conditionals is active.
5820 (Expand_N_Object_Declaration): Don't allow default initialization
5821 for variant record type if restriction No_Implicit_Condition is active.
5822 (Build_Variant_Record_Equality): Don't build for variant
5823 record type if restriction No_Implicit_Conditionals is active.
5824 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
5825 No_Implicit_Conditionals.
5826 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
5828 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
5830 * i-cstrin.ads: Update comments.
5832 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5834 * sem_res.adb (Resolve_Selected_Component): Handle properly a
5835 selected component whose prefix is overloaded, when none of the
5836 interpretations matches the expected type.
5838 2014-06-11 Bob Duff <duff@adacore.com>
5840 * make.adb (Wait_For_Available_Slot): Give a more
5841 informative error message; if the ALI file is not found, print
5842 the full path of what it's looking for.
5844 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
5846 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
5847 option to specify the result file encoding.
5849 2014-06-11 Robert Dewar <dewar@adacore.com>
5851 * errout.ads, sem_ch12.adb: Minor reformatting.
5852 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
5853 * lib-xref.adb: Minor reformatting.
5854 * restrict.adb: Minor code reorganization (put routines in
5857 2014-06-11 Yannick Moy <moy@adacore.com>
5859 * einfo.ads: Minor typo in comment
5861 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5863 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
5864 formal private types and private type extensions, to indicate
5865 variable in a generic unit whose uninitialized use suggest that
5866 actual type should be fully initialized.
5867 Needs_Initialized_Actual: removed, functionaity replaced by
5869 * lib-xref.adb (Generate_Reference): Generate a reference for
5870 variables of a formal type when the unit is not the main unit,
5871 to enable appropriate warnings in an instance.
5872 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
5873 of variable in a generic unit that suggests that actual type
5874 should be full initialized.
5875 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
5876 and do not emot warning, which now only appears in an instance.
5878 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
5880 * gnat_ugn.texi: Fix minor typo.
5882 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
5884 * sem_ch3.adb Add with and use clause for Sem_Ch10.
5885 (Analyze_Declarations): Code reformatting. Analyze the contract
5886 of a subprogram body stub at the end of the declarative region.
5887 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
5888 now a variable. Do not process the body if its contract is not
5889 available. Account for subprogram body stubs when extracting
5890 the corresponding spec.
5891 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
5893 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
5895 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
5896 Account for subprogram body stubs when extracting the
5898 (Analyze_Global_In_Decl_List):
5899 Account for subprogram body stubs when extracting the
5901 (Analyze_Refined_Depends_In_Decl_Part):
5902 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
5903 of the related body. Spec_Is now a variable. Account for
5904 subprogram body stubs when extracting the corresponding spec.
5905 (Analyze_Refined_Global_In_Decl_Part): Use
5906 Find_Related_Subprogram_Or_Body to retrieve the declaration
5907 of the related body. Spec_Is now a variable. Account for
5908 subprogram body stubs when extracting the corresponding spec.
5909 (Collect_Subprogram_Inputs_Output): Account for subprogram body
5910 stubs when extracting the corresponding spec.
5912 2014-06-11 Vincent Celier <celier@adacore.com>
5914 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
5917 2014-06-11 Robert Dewar <dewar@adacore.com>
5919 * debug.adb: Add debug flag -gnatd.q.
5920 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
5922 * styleg.adb (Check_Xtra_Parens): Message should be a style
5924 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
5925 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
5926 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
5927 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
5929 2014-06-11 Ben Brosgol <brosgol@adacore.com>
5931 * gnat_rm.texi: Revised chapter on Implementation Defined
5934 2014-06-11 Geert Bosch <bosch@adacore.com>
5936 * s-exctab.adb: avoid race conditions in exception registration.
5938 2014-06-11 Robert Dewar <dewar@adacore.com>
5940 * errout.adb (Warn_Insertion): New function.
5941 (Error_Msg): Use Warn_Insertion and Prescan_Message.
5942 (Error_Msg_Internal): Set Info field of error object.
5943 (Error_Msg_NEL): Use Prescan_Message.
5944 (Set_Msg_Text): Don't store info: at start of message.
5945 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
5946 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
5947 * errout.ads: Document new ?$? and >$> insertion sequences
5948 Document use of "(style)" and "info: "
5949 * erroutc.adb (dmsg): Print several missing fields
5950 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
5951 Deal with new tagging of info messages
5952 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
5953 Add field Info (Prescan_Message): New procedure, this procedure
5954 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
5955 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
5956 sem_elab.adb: Follow new rules for info message (info belongs
5957 only at the start of a message, and only in the first message,
5958 not in any of the continuations).
5959 * gnat_ugn.texi: Document full set of warning tags.
5961 2014-06-11 Gary Dismukes <dismukes@adacore.com>
5963 * sem_util.adb: Minor typo fix.
5965 2014-06-11 Ed Schonberg <schonberg@adacore.com>
5967 * sem_warn.adb (Check_References): Do not emit spurious warnings
5968 on uninitialzed variable of a formal private type if variable
5971 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
5973 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
5974 set_decl_section_name accessor.
5976 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
5978 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
5979 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
5980 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
5982 2014-05-21 Robert Dewar <dewar@adacore.com>
5984 * layout.adb: Minor reformatting.
5985 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
5988 2014-05-21 Robert Dewar <dewar@adacore.com>
5990 * restrict.ads (Implementation_Restriction): Add entry for
5992 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
5993 Ada.[Wide_[Wide_]Text_IO.
5994 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
5995 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
5996 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
5997 Wide_Wide_Value if restriction No_Fixed_IO is set.
5998 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
6000 2014-05-21 Robert Dewar <dewar@adacore.com>
6002 * gnatcmd.adb: Minor error msg changes (no upper case letter
6004 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
6007 2014-05-21 Robert Dewar <dewar@adacore.com>
6009 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
6010 via generic formals.
6011 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
6014 2014-05-21 Thomas Quinot <quinot@adacore.com>
6016 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
6017 more accurately describe that this subprogram needs to come into
6018 play also in cases where no byte swapping is involved, because
6019 it also takes care of some required shifts (left-justification
6022 2014-05-21 Thomas Quinot <quinot@adacore.com>
6024 * freeze.adb (Check_Component_Storage_Order): Indicate whether
6025 a Scalar_Storage_Order attribute definition is present for the
6027 (Freeze_Record_Type): Suppress junk warnings
6028 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
6031 2014-05-21 Robert Dewar <dewar@adacore.com>
6033 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
6034 to Kill_Elaboration_Checks.
6036 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6038 * layout.adb (Assoc_Add): Suppress the optimization of the (E
6039 - C1) + C2 case, when the expression type is unsigned and C1 <
6040 C2, to avoid creating a negative literal when folding.
6042 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6044 * freeze.adb (Freeze_Record_Type): Update the use of
6046 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
6048 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
6049 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
6050 of Is_SPARK_Volatile.
6051 (Analyze_Loop_Parameter_Specification):
6052 Update the use of Is_SPARK_Volatile.
6053 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
6054 formal parameter when its type is volatile.
6055 * sem_prag.adb (Analyze_Global_Item): Update the use of
6057 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
6058 determines whether an entity is a volatile source SPARK object.
6059 * sem_util.adb (Has_Enabled_Property): Accout for external
6060 properties being set on objects other than abstract states
6061 and variables. An example would be a formal parameter.
6062 (Is_SPARK_Volatile): New routine.
6063 (Is_SPARK_Volatile_Object):
6064 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
6065 when checking entities and/or types.
6066 * sem_util.ads (Is_SPARK_Volatile): New routine.
6068 2014-05-21 Robert Dewar <dewar@adacore.com>
6070 * sem_warn.adb: Minor fix to warning messages (use ?? instead
6073 2014-05-21 Vincent Celier <celier@adacore.com>
6075 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
6076 switch --version and --help.
6078 2014-05-21 Robert Dewar <dewar@adacore.com>
6080 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
6082 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6084 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
6085 iterator variable when the domain of iteration is a formal
6086 container and this is an element iterator.
6088 2014-05-21 Bob Duff <duff@adacore.com>
6090 * sem_ch12.adb: Minor reformatting.
6092 2014-05-21 Robert Dewar <dewar@adacore.com>
6094 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
6096 2014-05-21 Robert Dewar <dewar@adacore.com>
6098 * sem_elab.adb: Minor reformatting.
6099 * s-taprop.ads: Minor comment fix.
6100 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
6101 Kill_Elaboration_Checks.
6102 * errout.adb, erroutc.adb: Minor reformatting.
6104 2014-05-21 Thomas Quinot <quinot@adacore.com>
6106 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
6107 component. No byte swapping occurs, but this procedure also takes
6108 care of appropriately justifying the argument.
6110 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6112 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
6114 (Analyze_Subprogram_Body_Helper): Move the
6115 analysis of aspect specifications and the processing of the
6116 subprogram body contract after inlining has taken place.
6117 (Diagnose_Misplaced_Aspect_Specifications): Removed.
6119 2014-05-21 Javier Miranda <miranda@adacore.com>
6121 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
6123 2014-05-21 Robert Dewar <dewar@adacore.com>
6125 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
6126 continuations any more.
6128 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6130 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
6131 present in formal_Private_Definitions and on private extension
6132 declarations of a formal derived type. Set when the use of the
6133 formal type in a generic suggests that the actual should be a
6134 fully initialized type.
6135 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
6136 to indicate that an entity of a generic type has default
6137 initialization, and that the corresponing actual type in any
6138 subsequent instantiation should be fully initialized.
6139 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
6140 to emit a warning if the actual for a generic type on which
6141 Needs_Initialized_Actual is set is not a fully initialized type.
6143 2014-05-21 Robert Dewar <dewar@adacore.com>
6145 * sem_elab.adb, prj-dect.adb: Minor reformatting.
6147 2014-05-21 Robert Dewar <dewar@adacore.com>
6149 * erroutc.ads: Minor comment addition.
6151 2014-05-21 Robert Dewar <dewar@adacore.com>
6153 * errout.ads: Add documentation for use of >*> tag.
6154 * restrict.adb: Make sure we use >*> tag for restriction warnings.
6156 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6158 * debug.adb: Add case of illegal overriding_indicator for a
6159 protected subprogram body to description of -gnatd.E switch.
6160 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
6161 for cases of giving overriding_indicators on protected subprogram
6162 bodies, but change this to a warning if -gnatd.E is enabled. No
6163 longer give a style warning about missing indicators on protected
6166 2014-05-21 Robert Dewar <dewar@adacore.com>
6168 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
6169 sem_elab.ads: Minor reformatting.
6170 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
6173 2014-05-21 Pascal Obry <obry@adacore.com>
6175 * prj-dect.adb: Allow package Install in aggregate project.
6177 2014-05-21 Robert Dewar <dewar@adacore.com>
6179 * sem_ch13.adb (Analyze_Aspect_Specifications):
6180 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
6181 * sem_prag.adb: Minor comment improvements.
6183 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6185 * sem_ch12.adb (Install_Body): When checking whether freezing of
6186 instantiation must be delayed, verify that the common enclosing
6187 subprogram to generic and instance is in fact an overloadable
6190 2014-05-21 Vincent Celier <celier@adacore.com>
6192 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
6193 mains with the same name and fail if there is more than one.
6194 * prj.ads, prj.adb (Find_All_Sources): New function
6196 2014-05-21 Robert Dewar <dewar@adacore.com>
6198 * sem_ch13.adb: Minor reformatting.
6199 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
6200 * sem_prag.adb: Minor error message improvement.
6202 2014-05-21 Yannick Moy <moy@adacore.com>
6204 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
6205 (Enclosing_Subprogram_Or_Package): Only return a library-level
6208 2014-05-21 Javier Miranda <miranda@adacore.com>
6210 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
6211 to the full view of the parent type when processing a derived type
6212 which is the full view of a private type not defined in a generic
6213 unit which is derived from a private type with discriminants
6214 whose full view is a non-tagged record type.
6216 2014-05-21 Javier Miranda <miranda@adacore.com>
6218 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
6219 Complete previous patch.
6221 2014-05-21 Thomas Quinot <quinot@adacore.com>
6224 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
6225 Provide a behaviour more consistent with underlying datagram
6226 socket: do not attempt to loop over Send_Socket/Receive_Socket
6227 iterating along the buffer.
6229 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6231 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
6232 or a tagged type is not labelled as volatile. Ensure that a
6233 non-volatile type has no volatile components.
6234 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
6235 Obj_Typ. Code reformatting. Ensure that a discriminated or
6236 tagged object is not labelled as volatile.
6237 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
6238 pragma Volatile applies to a full type declaration or an object
6239 declaration when SPARK mode is on.
6241 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
6243 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
6244 providing options needed for compiling the argument source for
6245 the situation when a project file can be used as a tool parameter.
6247 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6249 * gnat_rm.texi: Minor typo fix.
6251 2014-05-21 Robert Dewar <dewar@adacore.com>
6253 * stand.adb (Tree_Read): Read missing entities.
6254 (Tree_Write): Write missing entities.
6256 2014-05-21 Ben Brosgol <brosgol@adacore.com>
6258 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
6259 section in gnatmetric chapter.
6261 2014-05-21 Robert Dewar <dewar@adacore.com>
6263 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
6264 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
6265 post-call copy write back (see detailed comment in code).
6266 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
6268 * tbuild.ads: Minor reformatting.
6270 2014-05-21 Robert Dewar <dewar@adacore.com>
6272 * stand.ads: Add warning about adding new entities and
6273 Tree_Read/Tree_Write.
6275 2014-05-21 Robert Dewar <dewar@adacore.com>
6277 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
6278 references to restricted entities within the units in which they
6281 2014-05-21 Robert Dewar <dewar@adacore.com>
6283 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
6284 simplify the needed test, and also deal with failure to catch
6285 situations with non-standard names.
6286 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
6287 (Source_File_Is_Subunit): Removed, no longer used.
6289 2014-05-21 Javier Miranda <miranda@adacore.com>
6292 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
6293 renaming of an access to interface object there is no need to
6294 generate extra code to reference the tag.
6296 2014-05-21 Robert Dewar <dewar@adacore.com>
6298 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
6299 Warnings (Off, string).
6301 2014-05-21 Robert Dewar <dewar@adacore.com>
6303 * osint.adb: Fix three error messages to say invalid instead
6305 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
6306 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
6307 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
6309 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6311 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
6312 sem_ch9.ads: Move discriminant manipulation routines for analysis of
6313 aspect specifications from sem_ch9 to sem_ch13, where they belong.
6315 2014-05-21 Robert Dewar <dewar@adacore.com>
6317 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
6318 Clearly document -gnatyg (GNAT style switches).
6319 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
6320 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
6321 available for VMS after all.
6322 * warnsw.adb: Reorganize to eliminate duplicated code
6323 (Restore_Warnings): Add a couple of missing entries
6324 (Save_Warnings): Add a couple of missing entries.
6325 * warnsw.ads: Add missing entries to Warning_Record (not clear
6326 what the impact is).
6328 2014-05-21 Robert Dewar <dewar@adacore.com>
6330 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
6332 * errout.ads: Document ?*? (restriction warning) insertion.
6333 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
6335 * erroutc.ads: Document use of * for restriction warning tag.
6336 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
6338 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6340 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
6341 make discriminants immediately visible when analyzing an aspect
6342 of a subtype declaration.
6343 (Uninstall_Discriminants): Do not apply to the entity in a
6344 subtype declaration.
6346 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6348 * sem_util.adb: Code clean up.
6350 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
6352 * gnat_ugn.texi: Document -Werror.
6354 2014-05-21 Bob Duff <duff@adacore.com>
6356 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
6357 This was returning False if the Object is a constant view. Fix
6358 it to return True in that case, because it might be a view of
6360 (Has_Discriminant_Dependent_Constraint): Fix latent
6361 bug; this function was crashing when passed a discriminant.
6363 2014-05-21 Robert Dewar <dewar@adacore.com>
6365 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
6366 * s-arit64.adb: Minor code reorganization.
6367 * sem_prag.adb: Minor comment fix (remove erroneous use of the
6370 2014-05-21 Robert Dewar <dewar@adacore.com>
6372 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
6373 computing new table size.
6375 2014-05-21 Robert Dewar <dewar@adacore.com>
6377 * einfo.ads: Minor reformatting.
6378 * ceinfo.adb: Deal with slight format change of einfo.ads.
6380 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6382 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
6383 implementation of the SPARK 2014 rule concerning private child
6386 2014-05-21 Vincent Celier <celier@adacore.com>
6388 * makeusg.adb: Add switch -d to usage.
6390 2014-05-21 Ed Schonberg <schonberg@adacore.com>
6392 * sem_util.adb (Find_Actual): If an actual that is the prefix
6393 of an enclosing prefixed call has been rewritten, use Nkind
6394 and Sloc to identify the corresponding formal, when handling
6395 deferred references.
6397 2014-05-21 Robert Dewar <dewar@adacore.com>
6399 * debug.adb: Document -gnatd.z switch.
6400 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
6402 2014-05-21 Robert Dewar <dewar@adacore.com>
6404 * einfo.ads (Can_Never_Be_Null): Minor comment update.
6405 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
6406 error message change.
6407 * s-arit64.adb ("abs"): New function. Use expression functions
6408 for the simple conversions and arithmetic.
6410 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6412 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
6413 set function_start_locus.
6415 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6417 * utils.c (gnat_write_global_declarations): Adjust the flags put on
6420 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6422 * gcc-interface/decl.c (change_qualified_type): New static function.
6423 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
6424 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
6425 <E_Array_Subtype>: Likewise.
6426 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
6427 (gnat_to_gnu_component_type): Likewise.
6428 (gnat_to_gnu_param): Likewise.
6430 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6432 * fe.h (Set_Present_Expr): Move around.
6433 (End_Location): New macro.
6434 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
6436 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6438 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
6439 lieu of more verbose construct.
6440 * gcc-interface/trans.c (Call_to_gnu): Likewise.
6441 (gnat_to_gnu): Likewise. Remove obsolete code.
6443 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
6445 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
6446 consider that regular packed arrays can never be superflat.
6448 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
6450 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
6452 * gcc-interface/decl.c (annotate_value): Adjust.
6453 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
6454 (push_range_check_info): Likewise.
6455 (Loop_Statement_to_gnu): Likewise.
6456 (Subprogram_Body_to_gnu): Likewise.
6457 (Compilation_Unit_to_gnu): Likewise.
6458 (start_stmt_group): Likewise.
6459 * gcc-interface/utils.c (init_gnat_utils): Likewise.
6460 (gnat_pushlevel): Likewise.
6461 (maybe_pad_type): Likewise.
6463 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
6465 * seh_init.c: Fix copyright year.
6467 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6469 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
6470 are defined. Move include windows.h before system.h.
6471 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
6472 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
6474 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
6476 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
6477 to the appropriate type.
6478 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
6479 (pos_to_constructor): Likewise.
6481 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
6483 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
6485 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
6486 Mike Stump <mikestump@comcast.net>
6487 Richard Sandiford <rdsandiford@googlemail.com>
6489 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
6490 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
6491 (annotate_value): Use wide-int interfaces.
6492 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
6494 2014-04-28 Richard Henderson <rth@redhat.com>
6496 * gcc-interface/Makefile.in: Support aarch64-linux.
6498 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
6500 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
6501 add 'Suffix' parameter and adjust comment.
6502 (Get_External_Name_With_Suffix): Delete.
6503 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
6504 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
6506 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
6507 Call Get_External_Name instead of Get_External_Name_With_Suffix.
6508 (Get_Secondary_DT_External_Name): Likewise.
6509 * exp_cg.adb (Write_Call_Info): Likewise.
6510 * exp_disp.adb (Export_DT): Likewise.
6511 (Import_DT): Likewise.
6512 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
6513 parameter with False default.
6514 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
6515 * types.h (Fat_Pointer): Rename into...
6516 (String_Pointer): ...this. Add comment on interfacing rules.
6517 * fe.h (Compiler_Abort): Adjust for above renaming.
6518 (Error_Msg_N): Likewise.
6519 (Error_Msg_NE): Likewise.
6520 (Get_External_Name): Likewise. Add third parameter.
6521 (Get_External_Name_With_Suffix): Delete.
6522 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
6523 (create_concat_name): Adjust call to Get_External_Name, remove call to
6524 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
6525 * gcc-interface/trans.c (post_error): Likewise.
6526 (post_error_ne): Likewise.
6527 * gcc-interface/misc.c (internal_error_function): Likewise.
6529 2014-04-28 Richard Biener <rguenther@suse.de>
6532 * gcc-interface/utils.c: Define flag_isoc11.
6534 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
6536 * gnatvsn.ads (Library_Version): Bump to 4.10.
6538 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
6541 2014-04-22 Richard Henderson <rth@redhat.com>
6543 * gcc-interface/Makefile.in: Support aarch64-linux.
6545 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
6547 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
6548 (Error_Msg_N): Likewise.
6549 (Error_Msg_NE): Likewise.
6550 (Get_External_Name_With_Suffix): Likewise.
6551 * types.h (Fat_Pointer): Delete.
6552 (String_Pointer): New type.
6553 (DECLARE_STRING_POINTER): New macro.
6554 * gcc-interface/decl.c (create_concat_name): Adjust.
6555 * gcc-interface/trans.c (post_error): Likewise.
6556 (post_error_ne): Likewise.
6557 * gcc-interface/misc.c (internal_error_function): Likewise.
6559 2014-04-22 Richard Henderson <rth@redhat.com>
6561 * gcc-interface/Makefile.in: Support aarch64-linux.
6563 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
6564 (__gnat_alternate_stack): Enable for all linux except ia64.
6566 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
6568 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
6569 (Error_Msg_N): Likewise.
6570 (Error_Msg_NE): Likewise.
6571 (Get_External_Name_With_Suffix): Likewise.
6572 * types.h (Fat_Pointer): Delete.
6573 (String_Pointer): New type.
6574 (DECLARE_STRING_POINTER): New macro.
6575 * gcc-interface/decl.c (create_concat_name): Adjust.
6576 * gcc-interface/trans.c (post_error): Likewise.
6577 (post_error_ne): Likewise.
6578 * gcc-interface/misc.c (internal_error_function): Likewise.
6580 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6581 Pierre-Marie de Rodat <derodat@adacore.com>
6583 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
6584 scalar constant instead of a reference for renaming of scalar literal.
6585 Do not create a new object for constant renaming except for a function
6586 call. Make sure a VAR_DECL is created for the renaming pointer.
6587 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
6588 (fold_constant_decl_in_expr): New function.
6589 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
6590 For a constant renaming, try to fold a constant DECL in the result.
6591 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
6592 (Identifier_to_gnu): Reference the renamed object of constant renaming
6594 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
6595 invalidate constant renaming pointers.
6597 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6599 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
6600 (build_vector_type_for_size): New function.
6601 (build_vector_type_for_array): Likewise.
6602 (unchecked_convert): Build an intermediate vector type to convert
6603 from a generic array type to a vector type.
6604 (handle_vector_size_attribute): Reimplement.
6605 (handle_vector_type_attribute): Likewise.
6607 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6609 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
6610 Is_OK_Static_Expression in lieu of Is_Static_Expression to
6611 detect valid arguments.
6613 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
6615 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
6617 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
6619 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
6620 (components_to_record): Likewise.
6621 * gcc-interface/utils.c (make_aligning_type): Likewise.
6622 (maybe_pad_type): Likewise.
6623 (finish_record_type): Likewise.
6624 (rest_of_record_type_compilation): Likewise.
6626 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
6628 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
6629 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
6631 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
6632 hint for Loop_Optimize.
6633 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
6634 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
6635 with new Ivdep hint.
6636 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
6637 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
6638 with new Ivdep hint.
6639 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
6641 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
6642 Robert Dewar <dewar@adacore.com>
6644 * opt.ads (Suppress_Back_Annotation): Remove as unused.
6645 * fe.h (Back_Annotate_Rep_Info): Likewise.
6646 (Global_Discard_Names): Likewise.
6647 (List_Representation_Info): Declare.
6648 * types.h (Uint_Minus_1): Likewise.
6649 * repinfo.ads: Document back-annotation change.
6650 * gcc-interface/gigi.h (init_gnat_decl): Declare.
6651 (destroy_gnat_decl): Likewise.
6652 * gcc-interface/decl.c (annotate_value): Do not create the cache of
6653 annotated values here but...
6654 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
6656 (init_gnat_decl): ...here instead. New function.
6657 (destroy_gnat_decl): Likewise.
6658 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
6659 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
6661 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
6663 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
6664 offset for the field, if any.
6666 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
6667 Svante Signell <svante.signell@gmail.com>
6671 * s-osinte-x32.adb: New file.
6672 * s-linux.ads (Time): New section.
6673 * s-linux-alpha.ads (Time): Likewise.
6674 * s-linux-android.ads (Time: Likewise.
6675 * s-linux-hppa.ads (Time): Likewise.
6676 * s-linux-mipsel.ads (Time): Likewise.
6677 * s-linux-sparc.ads (Time): Likewise.
6678 * s-linux-x32.ads (Time): Likewise.
6679 * s-osprim-x32.ads (timespec): Adjust.
6681 (To_Timespec): Likewise.
6682 * s-osinte-linux.ads (Time): Define local subtypes for those defined
6684 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
6685 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
6686 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
6687 * s-osinte-solaris-posix.ads (timespec): Likewise.
6688 * s-osinte-posix.adb (To_Timespec): Likewise.
6689 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
6691 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
6694 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
6695 * s-linux-android.ads: New file.
6696 * s-intman-android.adb: Likewise.
6697 * s-osinte-android.ads: Adjust.
6698 * sigtramp-armdroid.c: Likewise.
6699 * sigtramp.h: Add Android support.
6701 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
6703 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
6705 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
6708 * system-linux-alpha.ads: Adjust for Ada 2005.
6709 * system-linux-mips.ads: Likewise.
6710 * system-linux-mips64el.ads: Likewise.
6711 * system-linux-mipsel.ads: Likewise.
6712 * system-linux-s390.ads: Likewise.
6713 * system-linux-s390x.ads: Likewise.
6714 * system-linux-sparc.ads: Likewise.
6715 * system-linux-sparcv9.ads: Likewise.
6716 * system-rtems.ads: Likewise.
6717 * system-vxworks-arm.ads: Likewise.
6719 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
6722 * gcc-interface/Makefile.in (target_cpu_default): Revert
6725 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
6728 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
6729 it to set the RM size. Use directly 'size' for the Esize.
6730 (Create_Back_End_Float_Types): Adjust call to above.
6731 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
6732 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
6733 (Write_Target_Dependent_Values): Adjust comment.
6734 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
6736 (Write_Target_Dependent_Values): Write the precision in lieu of size.
6737 (Initialization): Read the precision in lieu of size and compute the
6738 size from the precision and the alignment.
6739 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
6740 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
6741 types for vector modes, pass the size in addition to the precision.
6743 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
6745 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
6747 2014-03-07 Doug Rupp <rupp@adacore.com>
6750 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
6751 (Support_64_Bit_Divides): Removed, no longer used.
6752 (ZCX_By_Default): Enabled.
6754 2014-02-25 Doug Rupp <rupp@adacore.com>
6756 * gcc-interface/Makefile.in (arm-linux):
6757 (EH_MECHANISM): Use ARM unwinder (-arm)
6758 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
6760 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
6761 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
6762 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
6763 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
6764 Add dependencies for sigtramp-armvxw.o.
6766 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
6768 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
6770 2014-02-25 Robert Dewar <dewar@adacore.com>
6772 * rtsfind.adb (Is_RTE): Protect against entity with no scope
6773 field (previously this call blew up on the Standard entity).
6774 * sem_attr.adb (Analyze_Attribute, case Access): Remove
6775 test for No_Abort_Statements, this is now handled in
6776 Set_Entity_With_Checks.
6777 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
6778 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
6779 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
6780 Set_Entity_With_Checks.
6781 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
6782 Add checks for No_Abort_Statements.
6784 2014-02-25 Robert Dewar <dewar@adacore.com>
6786 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
6787 Check_Restriction is OK.
6789 2014-02-25 Ed Schonberg <schonberg@adacore.com>
6791 * sem_ch3.adb (Process_Full_View): Better error message when
6792 the full view of a private type without discriminants is an
6794 * sem_ch7.adb (Uninstall_Declarations): Ditto.
6796 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
6798 * sigtramp-armvxw.c: Also restore r0.
6800 2014-02-25 Robert Dewar <dewar@adacore.com>
6802 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
6803 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
6804 set unconditionally.
6805 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
6806 any more (Output_Msg_Text): Rewritten with new convention on
6807 output of warnings that are treated as errors.
6808 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
6810 * gnat_rm.texi: Updates to documentation on pragma
6812 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
6813 set Warning_Doc_Switch.
6814 * lib-writ.ads: Add documentation note on ALI file generation
6816 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
6818 * sem_attr.adb (Resolve_Attribute, case Access):
6819 Abort_Task'Access violates the No_Abort_Statements restriction.
6820 * sem_res.adb (Resolve_Call): Check restriction
6821 No_Abort_Statements for call to Abort_Task or a renaming of it.
6823 2014-02-25 Robert Dewar <dewar@adacore.com>
6825 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
6827 * lib.ads: Minor reformatting.
6828 * einfo.ads: Minor reformatting.
6830 2014-02-25 Doug Rupp <rupp@adacore.com>
6832 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
6833 use Short_Descriptor(S) as the argument passing mechanism.
6835 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
6837 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
6839 2014-02-25 Robert Dewar <dewar@adacore.com>
6841 * atree.ads (Warnings_Treated_As_Errors): New variable.
6842 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
6843 error object (Initialize): Initialize Warnings_As_Errors_Count
6844 (Write_Error_Summary): Include count of warnings treated as errors.
6845 * erroutc.adb (Warning_Treated_As_Error): New function.
6846 (Matches): Function moved to outer level of package.
6847 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
6848 (Warning_Treated_As_Error): New function.
6849 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
6850 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
6851 * opt.ads (Config_Switches_Type): Add entry for
6852 Warnings_As_Errors_Count.
6853 (Warnings_As_Errors_Count): New variable.
6854 (Warnings_As_Errors): New array.
6855 * par-prag.adb: Add dummy entry for Warning_As_Error.
6856 * sem_prag.adb (Analyze_Pragma): Implement new pragma
6858 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
6860 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
6862 * sigtramp.h: Fix minor inaccuracy.
6864 2014-02-25 Ben Brosgol <brosgol@adacore.com>
6866 * gnat_ugn.texi: Added description of kill command.
6868 2014-02-25 Robert Dewar <dewar@adacore.com>
6870 * gnat_rm.texi (Address_Clauses): Add a section discussing the
6871 problem of address clauses causing unexpected initialization,
6872 including the effect of Initialize_Scalars.
6874 2014-02-25 Robert Dewar <dewar@adacore.com>
6876 * errout.adb: Various changes for better msgs for anonmous access
6878 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
6880 (Buffer_Remove): Version with character argument.
6881 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
6882 of mismatching conventions for access-to-subprogram case.
6883 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
6884 access types in record.
6885 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
6886 types, including in records.
6888 2014-02-25 Doug Rupp <rupp@adacore.com>
6890 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
6891 enhancements and corrections.
6893 2014-02-25 Robert Dewar <dewar@adacore.com>
6895 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
6897 2014-02-25 Robert Dewar <dewar@adacore.com>
6899 * gnat_rm.texi: First set of documentation additions for
6900 predefined RM units.
6901 * checks.adb: Minor reformatting.
6902 * sem_elab.adb (Check_Task_Activation): Minor fix to error
6904 * sem_util.adb: Minor reformatting.
6906 2014-02-25 Arnaud Charlet <charlet@adacore.com>
6908 * usage.adb (Usage): Add help on -gnateC.
6909 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
6910 * opt.ads (Generate_CodePeer_Messages): New flag.
6911 * gnat_ugn.texi: Document new switch -gnateC.
6913 2014-02-25 Ben Brosgol <brosgol@adacore.com>
6915 * gnat_rm.texi: Corrected minor typos in Implementation Defined
6917 * opt.ads: Minor reformatting.
6919 2014-02-25 Robert Dewar <dewar@adacore.com>
6921 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
6922 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
6924 * opt.ads (Warn_Info_Messages): New flag.
6925 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
6927 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
6929 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
6930 * usage.adb: Add documentation of -gnatel/-gnateL Update
6931 documentation of -gnatwl/-gnatwL.
6932 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
6933 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
6935 2014-02-25 Robert Dewar <dewar@adacore.com>
6937 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
6938 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
6939 * interfac.ads: Minor code reorganization (add pragma
6940 Compiler_Unit_Warning).
6941 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
6942 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
6943 Has_Shift_Operator flag.
6944 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
6945 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
6946 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
6947 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
6948 Add entry for Name_Amount.
6949 * checks.adb (Selected_Range_Checks): When checking for a null
6950 range, make sure we use the base type, and not the subtype for
6951 deciding a range is null.
6952 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
6953 for suspicious loop bound which is outside the range of the
6955 * gnat_ugn.texi: Add documentation section "Determining the
6956 Chosen Elaboration Order"
6957 * sem_ch13.adb (UC_Entry): Add field Act_Unit
6958 (Validate_Unchecked_Conversion): Store Act_Unit
6959 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
6960 * treepr.adb: Minor reformatting.
6962 2014-02-25 Arnaud Charlet <charlet@adacore.com>
6964 * usage.adb: Minor: fix typo.
6966 2014-02-25 Robert Dewar <dewar@adacore.com>
6968 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
6969 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
6970 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
6971 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
6972 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
6973 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
6974 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
6975 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
6976 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
6977 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
6978 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
6979 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
6980 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
6981 Compiler_Unit_Warning, change Compiler_Unit everywhere to
6982 Compiler_Unit_Warning.
6984 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
6986 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
6987 in ASIS mode aggregates that are used as aspect definitions.
6989 2014-02-25 Robert Dewar <dewar@adacore.com>
6991 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
6994 2014-02-25 Ed Schonberg <schonberg@adacore.com>
6996 * freeze.adb (Freeze_Entity): If the return type of a function
6997 is a limited view, and the non-limited view has not been seen yet,
6998 defer freezing to some later point.
7000 2014-02-25 Robert Dewar <dewar@adacore.com>
7002 * sem_ch3.adb: Minor reformatting.
7004 2014-02-25 Robert Dewar <dewar@adacore.com>
7006 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
7007 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
7008 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
7009 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
7010 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
7011 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
7012 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
7013 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
7014 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
7015 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
7016 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
7017 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
7018 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
7019 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
7020 snames.ads-tmpl: Change Compiler_Unit everywhere to
7021 Compiler_Unit_Warning.
7023 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7025 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
7026 (Collect_Body_Postconditions_In_Decls): New routine.
7027 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
7028 postcondition aspects or pragmas that appear on a subprogram
7030 (Collect_Spec_Preconditions): Factor out code. Handle
7031 precondition aspects or pragmas that appear on a subprogram
7033 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
7034 aspects that apply to a subprogram body stub is no longer delayed,
7035 the aspects are analyzed on the spot.
7036 (SPARK_Aspect_Error):
7037 Aspects that apply to a subprogram declaration cannot appear in
7039 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
7040 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
7041 is now a local variable. Code cleanup. Analysis related to
7042 the aspects of a subprogram body stub is now carried out by
7043 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
7044 and/or pragmas of a subprogram body stub to the proper body
7045 as this is no longer needed. Do not analyze the aspects of a
7046 subprogram stub when the corresponding source unit is missing.
7047 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
7049 (Analyze_Task_Body_Stub): Flag the illegal use of
7051 (Optional_Subunit): Add local variable Unum.
7052 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
7053 pragma when it applies to a subprogram body stub.
7054 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
7055 Depends and Global can now apply to a subprogram body stub as
7056 long as it acts as its own spec.
7057 (Analyze_Refined_Pragma):
7058 Code reformatting. Refinement pragmas cannot apply to a subunit.
7060 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7062 * einfo.ads Update the usage of flag
7063 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
7064 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
7065 now starts with the letter 'C'. This makes reading expanded
7067 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
7068 Iter_Loop. Signal that an Ada 2012 iterator loop requires
7069 secondary stack management when creating a transient scope for
7070 an element reference.
7071 * exp_util.adb (Process_Statements_For_Controlled_Objects):
7072 When wrapping the statements of a loop, pass the E_Loop entity
7073 to the wrapping machinery.
7074 (Wrap_Statements_In_Block): Add
7075 formal parameter Scop along with comment on usage. Add local
7076 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
7077 block as requiring secondary stack management when the block is
7078 created inside an Ada 2012 iterator loop. This ensures that any
7079 reference objects are reclaimed on each iteration of the loop.
7080 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
7081 tasked with the handling of container iterators as requiring
7082 secondary stack management. This ensures that iterators are
7083 reclaimed when the loop terminates or is exited in any fashion.
7084 * sem_util.adb (Add_Block_Identifier): New routine.
7085 (Find_Enclosing_Iterator_Loop): New routine.
7086 * sem_util.ads (Add_Block_Identifier): New routine.
7087 (Find_Enclosing_Iterator_Loop): New routine.
7089 2014-02-25 Robert Dewar <dewar@adacore.com>
7091 * sinfo.ads: Minor reformatting.
7093 2014-02-25 Tristan Gingold <gingold@adacore.com>
7095 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
7097 2014-02-25 Pascal Obry <obry@adacore.com>
7099 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
7101 2014-02-25 Tristan Gingold <gingold@adacore.com>
7103 * sem_ch10.adb: Minor comment fix.
7105 2014-02-25 Bob Duff <duff@adacore.com>
7107 * s-tasdeb.adb: Misc cleanup of this package,
7108 including printing addresses in hexadecimal.
7109 (Write): Fix minor bug when taking 'Address of an empty string.
7111 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7113 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
7114 public child unit when it does not refer to the abstract state
7115 of a public ancestor.
7117 2014-02-25 Yannick Moy <moy@adacore.com>
7119 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
7120 Validity_Checks in GNATprove and CodePeer modes.
7122 2014-02-25 Pascal Obry <obry@adacore.com>
7124 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
7125 Artifacts attribute.
7127 2014-02-25 Yannick Moy <moy@adacore.com>
7129 * sem_prag.adb: Minor reformatting to get consistent messages.
7131 2014-02-25 Robert Dewar <dewar@adacore.com>
7133 * checks.adb: Minor reformatting.
7134 * sinfo.ads (Do_Range_Check): Document that this flag is never
7135 passed to the back end.
7137 2014-02-25 Yannick Moy <moy@adacore.com>
7139 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
7140 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
7142 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7144 * sem_res.adb (Appears_In_Check): New routine.
7145 (Resolve_Entity_Name): Remove local variables Prev and
7146 Usage_OK. Par is now a constant. Remove the parent chain traversal
7147 as the placement of a volatile object with enabled property
7148 Async_Writers and/or Effective_Reads must appear immediately
7149 within a legal construct.
7151 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7153 * checks.adb (Apply_Selected_Range_Checks):
7154 Alphabetize local constants and variables. Add comments.
7155 Always insert a range check that requires runtime evaluation into
7158 2014-02-25 Robert Dewar <dewar@adacore.com>
7160 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
7162 2014-02-25 Bob Duff <duff@adacore.com>
7164 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
7165 iterations while waiting for independent tasks to terminate;
7166 if an independent task does not terminate, we do not want to
7167 hang here. In that case, the thread will be terminated when the
7169 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
7171 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7173 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
7174 used to perform pre-analysis of the expression for SPARK
7175 aspects that have a non-standard syntax, such as GLobal and
7176 Initializes. The procedure applies to the original expression
7177 in an aspect specification, prior to the analysis of the
7178 corresponding pragma, in order to provide semantic information
7179 for ASIS navigation purposes.
7180 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
7181 Call new subprogram.
7183 2014-02-25 Yannick Moy <moy@adacore.com>
7185 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
7187 2014-02-25 Doug Rupp <rupp@adacore.com>
7189 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
7190 (__gnat_adjust_context_for_raise): Bump the PC by 2.
7192 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7194 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
7195 misplaced IS, add a statement sequence to improper body only if
7196 one has not been parsed already.
7198 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7200 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
7201 mismatch when multidimensional array is updated with a single
7204 2014-02-25 Yannick Moy <moy@adacore.com>
7206 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
7207 sem_ch6.adb: Mark most references to SPARK RM in error messages
7210 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7212 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
7213 appears in a list of basic declarations, complete the tree with
7214 an empty statement list, to prevent cascaded errors and crashes
7215 if semantic analysis is attempted.
7217 2014-02-24 Thomas Quinot <quinot@adacore.com>
7219 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
7221 * erroutc.adb: Minor reformatting.
7223 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7225 * sem_prag.adb (Check_Clause_Syntax): Account
7226 for a solitary input item in a dependency list.
7228 2014-02-24 Yannick Moy <moy@adacore.com>
7230 * gnat1drv.adb (Adjust_Global_Switches): Do not
7231 use validity checks at all in GNATprove_Mode.
7233 2014-02-24 Robert Dewar <dewar@adacore.com>
7235 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
7236 atree.adb, atree.ads: Minor reformatting.
7238 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7240 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
7241 global and dependence refinement when SPARK_Mode is off.
7242 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
7243 state refinement when SPARK_Mode is off.
7244 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
7245 variable Decl. Insert the generated pragma for Refined_State
7246 after a potential pragma SPARK_Mode.
7247 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
7248 constant Deps. Remove local variable Expr. Check the syntax
7249 of pragma Depends when SPARK_Mode is off. Factor out the
7250 processing for extra parenthesis around individual clauses.
7251 (Analyze_Global_In_Decl_List): Items is now a constant. Check
7252 the syntax of pragma Global when SPARK_Mode is off.
7253 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
7254 Initializes when SPARK_Mode is off.
7255 (Analyze_Part_Of): Check
7256 the syntax of the encapsulating state when SPARK_Mode is off.
7257 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
7258 SPARK_Mode is off. Move the declaration order check with respect
7259 to pragma Initializes to the end of the processing. Do not verify
7260 the declaration order for pragma Initial_Condition when SPARK_Mode
7261 is off. Do not complain about a useless package refinement when
7263 (Analyze_Refined_Depends_In_Decl_Part): Refs
7264 is now a constant. Check the syntax of pragma Refined_Depends
7265 when SPARK_Mode is off.
7266 (Analyze_Refined_Global_In_Decl_Part):
7267 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
7268 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
7269 Refined_State when SPARK_Mode is off.
7270 (Check_Dependence_List_Syntax): New routine.
7271 (Check_Global_List_Syntax): New routine.
7272 (Check_Initialization_List_Syntax): New routine.
7273 (Check_Item_Syntax): New routine.
7274 (Check_State_Declaration_Syntax): New routine.
7275 (Check_Refinement_List_Syntax): New routine.
7276 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
7278 2014-02-24 Robert Dewar <dewar@adacore.com>
7280 * a-tags.adb, s-os_lib.adb: Minor reformatting.
7282 2014-02-24 Thomas Quinot <quinot@adacore.com>
7284 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
7285 strerror message, not just numeric errno value.
7287 2014-02-24 Doug Rupp <rupp@adacore.com>
7289 * raise-gcc.c (exception_class_eq): Make endian neutral.
7291 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7293 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
7294 flag, and reset Etype and Analyzed attributes unconditionally
7295 when copying a tree that may be partly analyzed.
7296 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
7297 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
7298 within a subprogram body and applies to it, remove it from the
7299 body before making a copy of it, to prevent spurious errors when
7300 analyzing the copied body.
7302 2014-02-24 Thomas Quinot <quinot@adacore.com>
7304 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
7305 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
7306 vxWorks.h has been included. Also ensure that file attributes
7307 related definitions are output even in cases where socket support
7309 * a-tags.adb: Code clean up.
7310 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
7311 instead of -I to add the main ada source directory to the header
7312 search path, in order to avoid conflict between our own "types.h"
7313 and VxWork's <types.h>.
7315 2014-02-24 Robert Dewar <dewar@adacore.com>
7317 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
7318 * debug.adb: Remove documentation of -gnatd.X, no longer used.
7319 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
7321 2014-02-24 Bob Duff <duff@adacore.com>
7323 * gnat_ugn.texi: Improve documentation of gnatpp.
7325 2014-02-24 Thomas Quinot <quinot@adacore.com>
7327 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
7328 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
7329 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
7330 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
7331 a chars_ptr, because on Windows this is a renaming of
7332 Socket_Error_Message.
7334 2014-02-24 Robert Dewar <dewar@adacore.com>
7336 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
7337 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
7338 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
7341 2014-02-24 Thomas Quinot <quinot@adacore.com>
7343 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
7344 that the source directory containing s-oscons-tmplt.c is on the
7345 include path, so that all internal header files are available.
7347 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7349 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
7350 domain of iteration is an attribute reference 'Old, this is an
7351 Ada 2012 iterator and the loop must be rewritten as such.
7353 2014-02-24 Thomas Quinot <quinot@adacore.com>
7355 * s-fileio.adb (Errno_Message): Remove, use shared version from
7357 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
7358 * g-stseme (Socket_Error_Message): Reimplement in terms of new
7360 * g-socthi.ads, g-socthi.adb: Change profile of
7361 Socket_Error_Message to return String to allow the above.
7362 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
7363 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
7364 * g-socthi-vxworks.ads: Update to account for the above profile
7366 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
7367 * s-crtl.ads (strncpy): New procedure.
7368 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
7369 Use import from s-crtl.
7370 * a-envvar.adb, osint.adb: Use imports of C runtime functions
7371 from s-crtl instead of re-importing locally.
7373 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7375 * sem_prag.adb (Analyze_Global_Item): Emit the
7376 variable related checks concerning volatile objects only when
7379 2014-02-24 Robert Dewar <dewar@adacore.com>
7381 * sem_ch5.adb (Analyze_Iterator_Specification): use
7382 Error_Msg_Ada_2012_Feature.
7384 2014-02-24 Jose Ruiz <ruiz@adacore.com>
7386 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
7387 No_Local_Timing_Events and No_Specific_Termination_Handlers
7388 must be set, according to the Ravenscar profile definition
7391 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7393 * sem_ch6.adb (Analyze_Expression_Function): If this is a
7394 completion, freeze return type and its designated type if needed.
7396 2014-02-24 Thomas Quinot <quinot@adacore.com>
7398 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7399 'Address): When moving initialization statements to a freeze
7400 entity, keep them under a single node (i.e. do not unwrap
7401 expressions with actions), and set the Initialization_Statements
7402 attribute again so that processing of a later pragma Import can
7405 2014-02-24 Claire Dross <dross@adacore.com>
7407 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
7408 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
7409 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
7410 Left/Right to First_To_Previous/Current_To_Last.
7412 2014-02-24 Thomas Quinot <quinot@adacore.com>
7414 * adaint.h (struct file_attributes): New component "error"
7415 (__gnat_error_attributes): Accessor for the above.
7416 * adaint.c (__gnat_error_attributes): New subprogram
7417 (__gnat_stat): Fix returned value (expect errno value)
7418 (__gnat_stat_to_attr): Add management of error component (set to
7419 stat errno value, except for missing files where it is set to 0,
7420 and exists is set to 0).
7421 * osint.ads (File_Attributes_Size): Update per change above,
7422 also clarify documentation.
7423 * s-filatt.ads: New file, binding to file attributes related
7425 * Makefile.rtl (s-filatt): New runtime unit.
7426 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
7427 to library function if not available on target).
7428 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
7429 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
7430 SIZEOF_struct_dirent_alloc): New constants.
7431 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
7432 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
7433 Perform appropriate error checking if stat fails (do not just
7434 ignore existing files if stat fails)
7435 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
7438 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7440 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
7441 the use of volatile objects as global items in a function to
7442 the variable related checks section.
7443 * sem_util.adb (Async_Readers_Enabled): Directly call
7444 Has_Enabled_Property.
7445 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
7446 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
7447 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
7448 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
7449 Update the comment on usage. State_Has_Enabled_Property how handles
7450 the original logic of the routine. Add processing for variables.
7451 (State_Has_Enabled_Property): New routine.
7452 (Variable_Has_Enabled_Property): New routine.
7454 2014-02-24 Robert Dewar <dewar@adacore.com>
7456 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
7458 * atree.ads, atree.adb (Node35): New function.
7459 (Set_Node35): New procedure.
7460 * debug.adb: Define new debug flag -gnatd.X.
7461 * einfo.ads, einfo.adb (Import_Pragma): New field.
7462 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
7463 really active yet, has to be activated with -gnatd.X.
7464 * sem_prag.adb (Set_Imported): Set new Import_Pragma
7465 field (Set_Imported): Don't set Is_Public (see
7466 Freeze.Wrap_Imported_Subprogram)
7467 * par-ch3.adb (P_Component_List): Handle unexpected null component.
7469 2014-02-24 Yannick Moy <moy@adacore.com>
7471 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
7472 * gnat_rm.texi: Correct documentation of attribute Update.
7474 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7476 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
7477 iterator in older versions of Ada.
7479 2014-02-24 Gary Dismukes <dismukes@adacore.com>
7481 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
7482 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
7484 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7486 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
7487 indexed_components that are instances of Ada 2012 container
7488 indexing operations. Analysis and resolution of such nodes
7489 is performed on the attribute, and the original source is
7490 preserved for ASIS operations. If expansion is enabled, the
7491 indexed component is replaced by the value of this attribute,
7492 which is in a call to an Indexing aspect, in most case wrapped
7493 in a dereference operation.
7494 * sem_ch4.adb (Analyze_Indexed_Component): Create
7495 Generalized_Indexing attribute when appropriate.
7496 (Analyze_Call): If prefix is not overloadable and has an indexing
7497 aspect, transform into an indexed component so it can be analyzed
7498 as a potential container indexing.
7499 (Analyze_Expression): If node is an indexed component with a
7500 Generalized_ Indexing, do not re-analyze.
7501 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
7502 of an indexed_component that has been transformed into a container
7504 (Resolve_Indexed_Component): Call the above when required.
7505 (Resolve): Do not insert an explicit dereference operation on
7506 an indexed_component whose type has an implicit dereference:
7507 the operation is inserted when resolving the related
7508 Generalized_Indexing.
7510 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
7512 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
7515 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7517 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
7519 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
7520 Merge the expected and available mode errors.
7521 (Report_Unused_Constituents): Remove leading spaces in error messages.
7522 (Report_Unused_States): Remove leading spaces in error messages.
7524 2014-02-24 Thomas Quinot <quinot@adacore.com>
7526 * par_sco.adb (Traverse_One): Refine categorization of statement
7529 2014-02-24 Robert Dewar <dewar@adacore.com>
7531 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
7532 Pure_05, Pure_12 and Preelaborate_05.
7533 * gnat_rm.texi: Update accordingly.
7534 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
7535 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
7536 Recognize one argument form of these pragmas only in GNAT mode
7539 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7541 * s-dimmks.ads: Replace symbol for temperature, previously the
7542 Greek letter Theta, by the ASCII @ sign.
7543 * s-diflio.ads: ditto.
7545 2014-02-24 Robert Dewar <dewar@adacore.com>
7547 * exp_ch4.adb: Minor code reorganization (use OR for boolean
7549 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
7551 2014-02-24 Ben Brosgol <brosgol@adacore.com>
7553 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
7554 so that references to gnatmem and ASIS tools do not appear in the FSF
7555 edition of the GNAT User's Guide.
7557 2014-02-24 Yannick Moy <moy@adacore.com>
7559 * freeze.adb (Freeze_Entity): Do not issue warning
7560 for pre/post being ignored on imported subprogram in GNATprove
7563 2014-02-24 Robert Dewar <dewar@adacore.com>
7565 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
7566 stand.ads, sem_eval.adb: Minor reformatting.
7568 2014-02-24 Yannick Moy <moy@adacore.com>
7570 * sem_prag.adb: Minor rewording in error message.
7572 2014-02-24 Johannes Kanig <kanig@adacore.com>
7574 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
7575 GNATprove_mode, gnat2why doesn't need nor use these types.
7577 2014-02-24 Gary Dismukes <dismukes@adacore.com>
7579 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
7580 target, in the case of signed integer exponentiation that uses a
7581 run-time routine, always select the Exp_* versions, since overflow
7582 checking is automatically done by AAMP arithmetic instructions.
7584 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7586 * sem_ch13.adb (Analyze_Aspect_Specifications):
7587 When the related context is a package instace, insert pragma
7588 Abstract_State after all internally-generated renamings related
7589 to the instance "header".
7591 2014-02-24 Ed Schonberg <schonberg@adacore.com>
7593 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
7595 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
7596 call to an abstract subprogram is legal if it appears in a
7597 pre/postcondition of another abstract operation.
7599 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
7601 * gnat_ugn.texi: Misc updates.
7603 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
7605 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
7607 2014-02-24 Gary Dismukes <dismukes@adacore.com>
7609 * layout.adb (Layout_Variant_Record): Instantiate
7610 Generic_Check_Choices and call Check_Choices before calling
7611 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
7612 set to prevent generating incorrect discriminant-checking
7613 functions for 'others' variants (functions that unconditionally
7614 return True rather than accounting for the values covered by the
7616 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
7617 Formal_Derived_Matching.
7618 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
7619 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
7620 Formal_Derived_Matching formal to Subtypes_Statically_Match.
7621 (Subtypes_Statically_Match): Suppress the Object_Size matching
7622 test in the case where Formal_Derived_Matching is True.
7623 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
7624 True for Formal_Derived_Matching_Formal on the call to
7625 Subtypes_Statically_Compatible.
7627 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
7629 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
7631 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
7633 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
7634 Look through a conversion between original and packable version to get
7636 (build_component_ref): Rework comment and fix formatting.
7638 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
7640 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
7641 project-specific options.
7643 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7645 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
7646 not Constraint_Error.
7647 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
7648 * sem_ch5.adb: Code clean up.
7650 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
7652 * sem_prag.adb (Usage_Error): Remove local
7653 constant Typ. Remove the specialized diagnostics for unconstrained
7654 or tagged items as those are not part of the explicit input set
7655 of the related subprogram and should not be flagged.
7657 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7659 * sem_attr.adb: Add guard to preserve all errors.
7661 2014-02-20 Vincent Celier <celier@adacore.com>
7663 * switch-m.adb (Normalize_Compiler_Switches): Take into account
7664 switches that are recorded in ALI files: -gnateA, -gnateE,
7665 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
7667 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7669 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
7670 of an element iterator form over a formal container with an
7672 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
7673 to create declaration and loop statements for both forms of
7674 container iterators.
7675 (Expand_Formal_Container_Element_Iterator): New procedure
7676 to handle loops of the form "for E of C" when C is a formal
7678 (Expand_Formal_Container_Iterator): Code cleanup.
7680 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
7682 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
7683 (Analyze_Contract_Case): Remove the use of
7684 "may". Replace "aspect Contract_Cases" to avoid categorization
7685 of aspect vs pragma.
7686 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
7687 (Analyze_Global_Item): Remove
7688 the use of "formal", specify the subprogram. Split the
7689 error message about a state with visible refinement into
7690 two. Remove the use of "global" from "volatile global item".
7691 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
7693 (Analyze_Input_Output): Update the call to
7694 Check_Mode. Specify the duplicated item. Reword the error
7695 message concerning an input of a null output list. Use "\"
7696 for error message continuation.
7697 (Analyze_Part_Of): Remove
7698 the use of "may". Use "\" for error message continuation.
7699 (Analyze_Refined_Depends_In_Decl_Part): Update the error
7700 message concerning a useless refinement to match the format
7702 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
7703 concerning a useless refinement.
7704 (Analyze_Refinement_Clause): Use "\" for error message continuation.
7705 (Check_Constituent_Usage): Use "\" for error message continuation.
7706 (Check_Dependency_Clause): Use "\" for error message continuation.
7707 (Check_Matching_Constituent): Use "\" for error message continuation.
7708 (Check_Missing_Part_Of): Use "\" for error message continuation.
7709 (Check_Mode): Renamed to
7710 Check_Role. Update the comment on usage. Redo the error reporting
7712 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
7713 message continuation.
7714 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
7715 with comment on usage. Update all occurrences of Is_Input and Is_Output.
7716 (Inconsistent_Mode_Error): Use "\" for error message continuation.
7717 (Input_Match): Use "\" for error message continuation.
7718 (Role_Error): New routine.
7719 (Set_Convention_From_Pragma): Use "\" for error message continuation.
7720 (Usage_Error): Add local variable Error_Msg. Build specialized error
7721 message showcasing the offending item kind. Redo the diagnostics for
7722 unconstrained types.
7724 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7726 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
7727 to determine whether a type is a container type, rather than
7728 examining only its type declaration, so that subtypes and derived
7729 types are handled properly.
7731 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
7733 * gnat_ugn.texi: gnatmetric: add description of project-specific
7736 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7738 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
7739 all choices in an association for a record type have the same
7740 type, as is done for record aggregates.
7742 2014-02-20 Robert Dewar <dewar@adacore.com>
7744 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
7745 Unmodified rather than Warnings (Off). Make comments
7746 uniform in the four affected units.
7748 2014-02-20 Robert Dewar <dewar@adacore.com>
7750 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7751 Object_Size): For non-scalar types allow any value that is a
7753 * gnat_rm.texi: Document Object_Size for composites more clearly.
7755 2014-02-20 Yannick Moy <moy@adacore.com>
7757 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
7759 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7761 * stand.ads: Raise_Type: new predefined entity, used as the type
7762 of a Raise_Expression prior to resolution.
7763 * cstand.adb: Build entity for Raise_Type.
7764 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
7765 initial type of the node.
7766 * sem_type.adb (Covers): Raise_Type is compatible with all
7768 * sem_res.adb (Resolve): Remove special handling of Any_Type on
7769 Raise_Expression nodes.
7770 (Resolve_Raise_Expression): Signal ambiguity if the type of the
7771 context is still Raise_Type.
7773 2014-02-20 Robert Dewar <dewar@adacore.com>
7775 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
7776 mismatching predicates.
7777 * sem_ch6.adb (Check_Conformance): Give better messages on
7779 * sem_eval.adb (Predicates_Match): Move to spec.
7780 * sem_eval.ads (Predicates_Match): Moved here from body.
7782 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7784 * a-cbmutr.adb: Use default value in Insert_Child.
7786 2014-02-20 Vincent Celier <celier@adacore.com>
7788 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
7789 Stringt.Initialize in all project aware tools.
7791 2014-02-20 Doug Rupp <rupp@adacore.com>
7793 * gnat_ugn.texi: Document gnatbind -X option.
7794 * vms_data.ads: Minor warnings documentation reformatting.
7796 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7798 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
7799 procedure for a base type.
7801 2014-02-20 Robert Dewar <dewar@adacore.com>
7803 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
7804 expression with type info.
7805 * sem_ch13.adb: Minor reformatting.
7806 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
7807 False if predicates do not match on the two types.
7809 2014-02-20 Arnaud Charlet <charlet@adacore.com>
7811 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
7812 In Relaxed_RM_Semantics mode, allow any static integer value,
7813 for compatibility with other compilers.
7815 2014-02-20 Vincent Celier <celier@adacore.com>
7817 * errutil.adb (Initialize): Properly initialize entry in table
7818 Warnings when warnings are suppressed.
7820 2014-02-20 Robert Dewar <dewar@adacore.com>
7822 * s-os_lib.ads: Add warning about non-portability of Rename_File.
7823 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
7824 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
7825 * gnat_ugn.texi: Document no warnings on junk variable names.
7826 * layout.adb: Minor code reorganization (use Ekind_In).
7827 * stringt.adb: Move initialization of Null_String_Id to Initialize
7830 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7832 * sem_ch13.adb: Initialize optional Element_Id.
7834 2014-02-20 Robert Dewar <dewar@adacore.com>
7836 * s-os_lib.ads (Rename_File): Minor commment addition.
7838 2014-02-20 Thomas Quinot <quinot@adacore.com>
7840 * einfo.ads: Minor reformatting.
7842 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
7844 * aspects.adb (Exchange_Aspects): New routine.
7845 * aspects.ads (Exchange_Aspects): New routine.
7846 * atree.adb (Rewrite): Do not check whether the save node has
7847 aspects as it never will, instead check the node about to be clobbered.
7848 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
7849 entities of generic packages.
7850 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
7851 pointer of an aspect specification list after rewriting takes place.
7852 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
7853 specifications of the generic template and the copy used for analysis.
7854 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
7855 the aspect specifications of the generic template and the
7856 copy used for analysis.
7857 (Analyze_Package_Instantiation): Propagate the aspect specifications
7858 from the generic template to the instantiation.
7859 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
7860 specifications from the generic template to the instantiation.
7861 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
7862 Abstract_State, Initializes and Initial_Condition when they
7863 apply to a package instantiation.
7865 2014-02-20 Robert Dewar <dewar@adacore.com>
7867 * stringt.adb: Add call to Initialize in package initialization.
7869 2014-02-20 Robert Dewar <dewar@adacore.com>
7871 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
7872 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
7873 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
7874 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
7877 2014-02-20 Bob Duff <duff@adacore.com>
7879 * s-os_lib.ads: Minor: Remove incorrect comment.
7881 2014-02-20 Robert Dewar <dewar@adacore.com>
7883 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
7885 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7887 * a-cborma.adb (Assign): When creating a node without a specified
7888 element, insert an uninitialized element in the map, because
7889 the instance may provide an element type with a default
7890 initialization, e.g a scalar with a Default_Value aspect.
7891 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
7892 (Insert): In the version without explicit element, provide an
7893 uninitialized element, as above.
7894 * a-cbdlli.adb (Append): In the version without explicit element,
7895 provide an uninitalized element, as above.
7896 (Allocate): Remove unused version.
7898 2014-02-20 Robert Dewar <dewar@adacore.com>
7900 * sem_elab.adb: Minor code reorganization (use Nkind_In).
7901 * stringt.adb: Remove temporary pragma Warnings (Off).
7902 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
7905 2014-02-20 Matthew Heaney <heaney@adacore.com>
7907 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
7910 2014-02-20 Ed Schonberg <schonberg@adacore.com>
7912 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
7913 properly the cursor type for subsequent volatile testing in SPARK
7914 mode, when domain is a formal container with an Iterabe aspect.
7916 2014-02-20 Robert Dewar <dewar@adacore.com>
7918 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
7919 (Set_Specific_Warning_Off): Add Reason argument.
7920 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
7921 (Set_Specific_Warning_Off): Add Reason argument.
7922 * erroutc.adb (Warnings_Entry): Add Reason field
7923 (Specific_Warning_Entry): Add Reason field.
7924 (Warnings_Suppressed): return String_Id for Reason.
7925 (Warning_Specifically_Suppressed): return String_Id for Reason.
7926 * erroutc.ads (Warnings_Entry): Add Reason field.
7927 (Specific_Warning_Entry): Add Reason field.
7928 (Set_Specific_Warning_Off): Add Reason argument.
7929 (Set_Warnings_Mode_Off): Add Reason argument.
7930 (Warnings_Suppressed): return String_Id for Reason.
7931 (Warning_Specifically_Suppressed): return String_Id for Reason.
7932 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
7933 (Warning_Specifically_Suppressed): returns String_Id for Reason
7934 * gnat_rm.texi: Document that Warning parameter is string literal
7935 or a concatenation of string literals.
7936 * par-prag.adb: New handling for Reason argument.
7937 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
7938 for Reason argument.
7939 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
7940 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
7941 * stringt.adb: Set Null_String_Id.
7942 * stringt.ads (Null_String_Id): New constant.
7944 2014-02-20 Robert Dewar <dewar@adacore.com>
7946 * einfo.ads: Minor comment addition: Etype of package is
7948 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
7949 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
7950 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
7951 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
7952 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
7953 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
7954 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
7955 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
7956 Replace all calls with calls to New_Occurrence_Of.
7958 2014-02-20 Robert Dewar <dewar@adacore.com>
7960 * par-util.adb (Ignore, case of right paren): Make this a
7963 2014-02-19 Robert Dewar <dewar@adacore.com>
7965 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
7966 * debug.adb: Remove -gnatd.X switch, no longer used.
7967 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
7970 2014-02-19 Bob Duff <duff@adacore.com>
7972 * g-socket.ads: Minor: Correct some comments.
7974 2014-02-19 Ed Schonberg <schonberg@adacore.com>
7976 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
7978 2014-02-19 Arnaud Charlet <charlet@adacore.com>
7980 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
7981 an error on out of range priorities if Relaxed_RM_Semantics.
7982 * sem_prag.adb (Analyze_Pragma): Ditto.
7984 2014-02-19 Bob Duff <duff@adacore.com>
7986 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
7987 where F denotes the renaming of an enumeration literal, and
7988 issue a specialized error message.
7990 2014-02-19 Matthew Heaney <heaney@adacore.com>
7992 * a-chtgop.ads (Checked_Index): New operation.
7993 (Next): Changed mode of hash table.
7994 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
7995 (Generic_Read, Reserve_Capacity): Ditto.
7996 (Generic_Equal): Detect tampering.
7997 (Next): Changed mode of hash table, detect tampering.
7998 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
8000 (Find): Changed mode of hash table.
8001 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
8002 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
8004 (Find): Changed mode of hash table, check for tampering.
8005 (Generic_Replace_Element): Check for tampering.
8006 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
8007 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
8008 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
8010 (Find, Generic_Replace_Element): Check for tampering.
8011 * a-chtgbo.ads (Checked_Index): New operation.
8012 * a-chtgbo.adb (Checked_Index): New operation
8013 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
8014 (Generic_Read, Next): Ditto.
8015 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
8016 table (Difference, Intersection): Use variable view of
8017 source, detect tampering (Find, Is_Subset, Overlap): Use
8018 variable view of container (Symmetric_Difference, Union):
8019 Detect tampering (Vet): Use Checked_Index to detect tampering
8020 (Constant_Reference, Element, Find): Use variable view of
8022 (Update_Element_Preserving_Key): Detect tampering.
8023 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
8026 (Equivalent_Sets, Overlap): Use Node's Next component.
8027 (Vet): Use Checked_Index to detect tampering.
8028 (Constant_Reference, Element, Find): Use variable view of container.
8029 (Update_Element_Preserving_Key): Detect tampering.
8030 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
8031 Element, Find): Use variable view of container.
8032 (Reference): Rename hash table component.
8033 (Vet): Use Checked_Index to detect tampering.
8035 2014-02-19 Arnaud Charlet <charlet@adacore.com>
8037 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
8040 2014-02-19 Thomas Quinot <quinot@adacore.com>
8042 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
8043 against calls without Def_Id.
8045 2014-02-19 Claire Dross <dross@adacore.com>
8047 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8048 a-cofove.ads: Add global annotations to subprograms.
8050 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8052 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
8053 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
8054 Initial_Condition no longer requires the presence of pragma
8055 Initialized. Do not try to diagnose whether all variables mentioned in
8056 pragma Initializes also appear in Initial_Condition.
8057 (Collect_Variables): Removed.
8058 (Match_Variable): Removed.
8059 (Match_Variables): Removed.
8060 (Report_Unused_Variables): Removed.
8062 2014-02-19 Thomas Quinot <quinot@adacore.com>
8064 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
8066 2014-02-19 Robert Dewar <dewar@adacore.com>
8068 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
8071 2014-02-19 Vincent Celier <celier@adacore.com>
8073 * prj-part.adb (Parse_Single_Project): Use the fully resolved
8074 project path, with all symbolic links resolved, to check if the
8075 same project is imported with a different unresolved path.
8076 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
8077 changed to Resolved_Path to reflect that all symbolic links
8080 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8082 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
8083 from sem_ch13, for use elsewhere.
8084 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
8085 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
8086 cursor type on the loop variable when the iteration is over o
8089 2014-02-19 Vincent Celier <celier@adacore.com>
8091 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
8092 for an empty Target (Check_Target): Never fail when an empty
8093 target is declared in the configuration project.
8095 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8097 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
8098 the pragma comes fron a predicate aspect and the context is a
8099 record declaration within the scope that declares the type.
8101 2014-02-19 Robert Dewar <dewar@adacore.com>
8103 * gnat_rm.texi: Minor clarifications.
8104 * expander.adb, sem_aggr.adb: Add comments.
8106 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8108 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
8109 applies to a subprogram body, the name is the current scope,
8110 rather than being declared in the current scope.
8111 (Analyze_Pragma, case No_Return): Handle properly a No_Return
8112 aspect applied to a subprogram body.
8114 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8116 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
8117 of overloaded subprograms, and fix bug in handling of primitive
8120 2014-02-19 Pascal Obry <obry@adacore.com>
8122 * s-os_lib.adb: Minor reformatting.
8124 2014-02-19 Yannick Moy <moy@adacore.com>
8126 * expander.adb (Expand): Do nothing inside generics.
8127 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
8130 2014-02-19 Yannick Moy <moy@adacore.com>
8132 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
8134 2014-02-19 Robert Dewar <dewar@adacore.com>
8136 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
8137 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
8140 2014-02-19 Claire Dross <dross@adacore.com>
8142 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
8143 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
8145 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8147 * sem_ch3.adb (Analyze_Declarations): Analyze
8148 a package contract at the end of the private declarations (if
8149 applicable), otherwise analyze it and the end of the visible
8152 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8154 * style.adb (Missing_Overriding): If subprogram is an
8155 instantiation, place warning on the instance node itself,
8156 without mention of the original generic. Do not emit message
8157 if explicit Ada version is older than the introduction of the
8158 overriding indicator.
8160 2014-02-19 Yannick Moy <moy@adacore.com>
8162 * gnat_rm.texi: Doc clarifications.
8164 2014-02-19 Yannick Moy <moy@adacore.com>
8166 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
8169 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8171 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
8172 specified First primitive, rather than by name.
8173 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
8174 and extend error checking for missing primitives and incorrect
8177 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8179 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
8180 errors when a Synchronization aspect on an overriding protected
8181 operation does not match the given aspect on the overridden
8182 operation of an ancestor interface.
8184 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8186 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
8187 (Check_Loop_Pragma_Placement): Update
8188 comment on usage. Remove local variables Orig_Stmt and
8189 Within_Same_Sequence. Check that the current Loop_Invariant or
8190 Loop_Variant pragma is grouped together with other such pragmas.
8191 (Is_Loop_Pragma): New routine.
8192 (Prev_In_Loop): Removed.
8194 2014-02-19 Robert Dewar <dewar@adacore.com>
8196 * par-ch6.adb (P_Return): For extended return, end column lines
8198 * par.adb: Minor documentation clarification.
8200 2014-02-19 Yannick Moy <moy@adacore.com>
8202 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
8203 that Loop_Invariant and Loop_Variant appear consecutively.
8204 * gnat_rm.texi Update documentation of Loop_Invariant and
8205 Loop_Variant pragmas.
8207 2014-02-19 Robert Dewar <dewar@adacore.com>
8209 * debug.adb: Document -gnatd.X.
8210 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
8212 (Check_Then_Column): Ditto.
8213 * styleg.adb (Check_Then): Allow THEN on line after IF.
8214 (Check_Then): Check THEN placement under control of -gnatd.X
8215 * styleg.ads (Check_Then): Now called even if THEN is not first
8217 * stylesw.ads (Style_Check_If_Then_Layout): Document new
8219 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
8221 2014-02-19 Robert Dewar <dewar@adacore.com>
8223 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
8224 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
8225 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
8226 vms_conv.adb: Fix bad layout of IF statements
8228 2014-02-19 Robert Dewar <dewar@adacore.com>
8230 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
8232 2014-02-19 Robert Dewar <dewar@adacore.com>
8234 * exp_util.adb: Update comments.
8236 2014-02-19 Doug Rupp <rupp@adacore.com>
8238 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
8239 * init.c (__gl_float_format): [VMS] New global.
8240 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
8241 representation in effect.
8243 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8245 * exp_ch6.adb Add with and use clause for Exp_Prag.
8246 (Expand_Contract_Cases): Relocated to Exp_Prag.
8247 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
8248 * exp_prag.adb Add with and use clauses for Checks and Validsw.
8249 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
8250 structure of the expanded code to showcase the evaluation of
8251 attribute 'Old prefixes. Add local variable Old_Evals. Expand
8252 any attribute 'Old references found within a consequence. Add
8253 circuitry to evaluate the prefixes of attribute 'Old that
8254 belong to a selected consequence.
8255 (Expand_Old_In_Consequence): New routine.
8256 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
8257 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
8258 potentially unevaluated prefix is always evaluated.
8260 2014-02-19 Robert Dewar <dewar@adacore.com>
8262 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
8263 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
8264 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
8265 handling for the case of Modify_Tree_For_C, this approach did
8267 * exp_util.adb (Matching_Standard_Type): New function
8268 (Side_Effect_Free): New top level functions (from
8269 Remove_Side_Effects).
8270 * exp_util.ads (Side_Effect_Free): New top level functions
8272 * sinfo.ads: Minor comment updates.
8274 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8276 * exp_ch6.adb (Expand_Simple_Function_Return): If return
8277 type is unconstrained and uses the secondary stack, mark the
8278 enclosing function accordingly, to ensure that the value is not
8279 prematurely removed.
8281 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8283 * par.adb Alphabetize the routines in Par.Sync.
8284 (Resync_Past_Malformed_Aspect): New routine.
8285 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
8286 variables. Code and comment reformatting. Detect missing
8287 parentheses on aspects [Refined_]Global and [Refined_]Depends
8288 with a non-null definition.
8289 * par-sync.adb: Alphabetize all routines in this separate unit.
8290 (Resync_Past_Malformed_Aspect): New routine.
8292 2014-02-19 Robert Dewar <dewar@adacore.com>
8294 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
8295 if Esize values do not match.
8297 2014-02-19 Yannick Moy <moy@adacore.com>
8299 * sinfo.ads: Minor comment update.
8301 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8303 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
8305 2014-02-19 Thomas Quinot <quinot@adacore.com>
8307 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
8308 that has the No_Ctrl_Actions flag is a suitable node to be
8309 wrapped if the assigned expression has no finalization actions.
8310 * sem_eval.adb (Eval_Entity_Name): For a compile time known
8311 boolean value, mark the corresponding condition SCO as constant.
8313 2014-02-19 Robert Dewar <dewar@adacore.com>
8315 * exp_util.adb: Minor reformatting.
8316 * exp_util.ads (Matching_Standard_Type): New function.
8317 * exp_ch7.adb: Minor reformatting.
8319 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8321 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
8322 to find declaration for Cursor, to handle properly the case of
8323 a discriminated iterable type.
8325 2014-02-19 Vincent Celier <celier@adacore.com>
8327 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
8328 imported library projects with the library ALI dirs, when setting
8330 * prj-env.ads (Ada_Objects_Path): Correct comments about
8331 argument Including_Libraries.
8333 2014-02-19 Gary Dismukes <dismukes@adacore.com>
8335 * gnat_rm.texi: Minor spelling fixes.
8337 2014-02-19 Doug Rupp <rupp@adacore.com>
8339 * init.c: Remove unneeded code.
8340 * fe.h (Float_Format): New macro
8341 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
8343 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8345 * sem_prag.adb (Check_Refined_Global_Item):
8346 A state or variable acts as a constituent only it is part of an
8347 encapsulating state and the state has visible refinement.
8349 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8351 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
8352 postcondition for a function when the expression does not mention
8353 'Result but the function has in-out parameters.
8355 2014-02-19 Robert Dewar <dewar@adacore.com>
8357 * gnat_rm.texi: Add documentation on Value_Size forcing biased
8360 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8362 * lib-xref.ads Remove the small table of letter and symbol usage as we
8365 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8367 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
8368 messages depending on the offending misplaced aspect specifications.
8369 (Diagnose_Misplaced_Aspect_Specifications): New routine.
8371 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8373 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
8374 for iterable aspect primitives.
8375 (Resolve_Iterable_Operation): Use expected signature of iterable
8376 aspect to resolve primitive when overloading is present.
8377 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
8378 (Check_Signature): Removed.
8380 2014-02-19 Yannick Moy <moy@adacore.com>
8382 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
8383 subunit in GNATprove_Mode.
8384 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
8386 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8388 * lib-xref.ads Alphabetize the contents of table
8389 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
8390 for E_Abstract_State. List all letters and symbols in use.
8391 * sem_prag.adb (Analyze_Abstract_State): Update all calls
8392 to Create_Abstract_State to reflect the new signature.
8393 (Create_Abstract_State): Change subprogram profile and update
8394 the comment on usage. Use the proper location of the state
8395 declaration when creating a new abstract state entity. Do not
8396 generate an external name, but simply reuse the name coming from
8397 the state declaration.
8399 2014-02-19 Robert Dewar <dewar@adacore.com>
8401 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
8402 declarations get properly inserted in Modify_Tree_For_C mode.
8403 * sinfo.ads: Minor comment addition.
8405 2014-02-19 Robert Dewar <dewar@adacore.com>
8407 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
8408 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
8410 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8412 * style.adb (Missing_Overriding): Warning does not apply in
8413 language versions prior to Ada 2005.
8414 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
8415 * sem_attr.adb: Add Attribute_Iterable where needed.
8416 * exp_attr.adb: ditto.
8417 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
8418 handle loops and quantified expressions over types that have an
8419 iterable aspect. Called from Expand_Iterator_Loop.
8420 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
8421 with Iterable aspect.
8422 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
8423 subprograms specified in the Iterable aspect have the proper
8424 signature involving container and cursor.
8425 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
8426 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
8427 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
8428 New procedure to retrieve one of the primitives First, Last,
8429 or Has_Element, from the value of the iterable aspect of a
8431 (Is_Container_Element): Predicate to recognize expressions
8432 that denote an element of one of the predefined containers,
8433 for possible optimization. This subprogram is not currently
8434 used, pending ARG discussions on the legality of the proposed
8435 optimization. Worth preserving for eventual use.
8436 (Is_Iterator): Recognize formal container types.
8437 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
8439 2014-02-19 Robert Dewar <dewar@adacore.com>
8441 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
8442 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
8443 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
8444 declarations from list of actions.
8445 * output.ads, output.adb (Delete_Last_Char): New procedure.
8446 * sinfo.ads: Document handling of Mod and expression with actions
8447 in Modify_Tree_For_C mode.
8449 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8451 * par-ch9.adb (P_Task): Add a null statement to produce a
8452 well-formed task body when due to a previous syntax error the
8453 statement list is empty.
8455 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8457 * sem_prag.adb (Check_Dependency_Clause): Account
8458 for the case where a state with a non-null refinement matches a
8459 null output list. Comment reformatting.
8460 (Inputs_Match): Copy a solitary input to avoid an assertion failure
8461 when trying to match the same input in multiple clauses.
8463 2014-02-19 Gary Dismukes <dismukes@adacore.com>
8465 * sem_attr.adb: Minor typo fix.
8467 2014-02-18 Robert Dewar <dewar@adacore.com>
8469 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
8470 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
8471 (Create_Standard): Create new unsigned types.
8472 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
8473 mode (Expand_N_Reference): Removed, problematic and not needed
8475 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
8477 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
8478 * expander.adb: Remove call to Expand_N_Reference (problematic,
8479 and not needed now).
8480 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
8481 * stand.adb: Read and write unsigned type entities.
8482 * stand.ads: Add new unsigned types.
8484 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
8486 * sem_ch4.adb (Analyze_Call): Do not mark a function call
8487 as being inside an assertion expression as the flag is now removed.
8488 (Check_Ghost_Subprogram_Call): Do not query the
8489 In_Assertion_Expression flag as it is now removed, instead use
8490 a predicate function.
8491 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
8492 In_Assertion_Expression flag as it is now removed, instead use
8493 a predicate function.
8494 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
8495 * sem_util.adb Add with and use clause for Sem_Prag.
8496 (In_Assertion_Expression_Pragma): New routine.
8497 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
8498 * sinfo.adb (In_Assertion_Expression): Removed.
8499 (Set_In_Assertion_Expression): Removed.
8500 * sinfo.ads Remove flag In_Assertion_Expression along with its
8502 (In_Assertion_Expression): Removed along with
8503 pragma Inline. (Set_In_Assertion_Expression): Removed along
8506 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
8508 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
8509 used together with '-r', '-rf' or '-rnb' options.
8511 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
8513 * sem_attr.adb (Analyze_Attribute): Comment
8514 and code reformatting. Use separate routines to check the
8515 legality of attribute 'Old in certain pragmas. Verify
8516 the use of 'Old, 'Result and locally declared entities
8517 within the prefix of 'Old.
8518 (Check_References_In_Prefix): New routine.
8519 (Check_Use_In_Contract_Cases): New routine.
8520 (Check_Use_In_Test_Case): New routine.
8522 2014-02-18 Vincent Celier <celier@adacore.com>
8524 * sem_aux.adb (Is_By_Reference_Type): For each components of
8525 a record type, check also if the component is volatile as it
8526 may have an aspect that makes it volatile. If it is, then the
8527 record type is a by reference type.
8529 2014-02-18 Robert Dewar <dewar@adacore.com>
8531 * exp_attr.adb: Minor reformatting.
8532 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
8533 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
8534 as another case where we don't generate N_Reference nodes for
8536 * expander.adb (Expand): Add call to Expand_N_Reference.
8538 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8540 * sem_prag.adb (Analyze_Refined_Pragma): Remove
8541 local variable Pack_Spec. Refinement pragmas may now apply to
8542 bodies of both visible and private subprograms.
8544 2014-02-06 Robert Dewar <dewar@adacore.com>
8546 * exp_attr.adb (Expand_Loop_Entry_Attribute):
8547 Minor change (Attr => N) (Expand_Pred_Succ): New name
8548 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
8549 Max): Expand into if expression if Modify_Tree_For_C mode.
8550 (Expand_N_Attribute_Reference, case Min): ditto
8551 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
8554 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8556 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
8557 predicate check if this is an internal declaration with
8558 No_Initialization set, as for an expanded aggregate component.
8560 2014-02-06 Doug Rupp <rupp@adacore.com>
8562 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
8563 conditions with severity of "SUCCESS" or "INFORMATIONAL".
8565 2014-02-06 Yannick Moy <moy@adacore.com>
8567 * sem_prag.adb (Analyze_Pragma): Analyze pragma
8568 Debug rewritten node before rewriting it as a null statement in
8571 2014-02-06 Robert Dewar <dewar@adacore.com>
8573 * sem_attr.adb (Min_Max): New procedure.
8574 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
8577 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
8579 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
8582 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8584 * sem_prag.adb (Analyze_Abstract_State): Update
8585 all calls to Create_Abstract_State to pass the proper state
8587 (Create_Abstract_State): Add new formal parameter
8588 State_Decl along with comment on usage. Establish a link between
8589 the abstract state entity and the state declaration.
8591 2014-02-06 Robert Dewar <dewar@adacore.com>
8593 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
8594 comparison of unordered enumeration type.
8595 (Analyze_Attribute, case Max): Check for improper comparison of
8596 unordered enumeration type.
8597 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
8599 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
8600 Moved here from Sem_Res.
8602 2014-02-06 Robert Dewar <dewar@adacore.com>
8604 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
8607 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8609 * sem_ch6.adb (Process_Formals): Error message reformatting.
8611 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8613 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
8614 variable Spec. Do not inherit the null indicator from the
8615 subprogram body when generating the spec.
8617 2014-02-06 Robert Dewar <dewar@adacore.com>
8619 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
8622 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8624 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
8625 when the function has a foreign convention, but not if only the
8626 limited return type has such a convention.
8628 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8630 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
8631 variable Spec. Comment reformatting. Use Copy_Separate_Tree
8632 rather than New_Copy_Tree when building the corresponding
8633 subprogram declaration.
8635 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8637 * sem_prag.adb (Analyze_Global_Item): Remove
8638 the mode-related checks on abstract states with enabled external
8640 (Property_Error): Removed.
8642 2014-02-06 Javier Miranda <miranda@adacore.com>
8644 * lib-xref.adb (Generate_Reference): When
8645 generating the reference to the first private entity take care
8646 of handling swapped entities.
8648 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
8650 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
8653 2014-02-06 Robert Dewar <dewar@adacore.com>
8655 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
8656 than the word size when operating in Modify_Tree_For_C mode.
8657 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
8659 2014-02-06 Robert Dewar <dewar@adacore.com>
8661 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
8662 compare is case insensitive.
8663 * gnat_rm.texi: Document that string compare for Warnings Off
8664 is now case insensitive.
8666 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
8668 * gnat_rm.texi: Small wording tweak.
8670 2014-02-06 Pascal Obry <obry@adacore.com>
8672 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
8673 and Included_Artifact_Patterns attribute definitions.
8675 2014-02-06 Yannick Moy <moy@adacore.com>
8677 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
8678 SPARK_Mode pragma component for all subprograms, including stubs.
8680 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8682 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
8683 the configuration options of the enclosing context in a
8685 (Analyze_Subprogram_Body_Stub): Maintain the
8686 configuration options of the enclosing context in a stack-like
8689 2014-02-06 Robert Dewar <dewar@adacore.com>
8691 * debug.adb: -gnatd.u sets Modify_Tree_For C
8692 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
8693 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
8694 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
8695 * exp_intr.adb (Expand_Shift): Call expander so we do
8696 Modify_Tree_For_C expansions.
8697 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
8700 2014-02-06 Fedor Rybin <frybin@adacore.com>
8702 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
8703 after the phase 1 of the processing of each aggregated project
8704 to get access to project trees of aggregated projects.
8705 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
8706 If specified, On_New_Tree_Loaded is called after each aggregated
8707 project has been processed succesfully.
8708 (Process): new parameter On_New_Tree_Loaded.
8709 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
8710 callback added after processing of each aggregated project.
8711 (Recursive_Process): new parameter On_New_Tree_Loaded.
8712 (Process): new parameter On_New_Tree_Loaded.
8713 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
8714 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
8716 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
8719 2014-02-06 Bob Duff <duff@adacore.com>
8721 * gnat_ugn.texi: Implement --insert-blank-lines and
8722 --preserve-blank-lines switches.
8724 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
8726 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
8729 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
8731 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
8732 of the pragma on individual objects.
8734 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8736 * einfo.adb Node29 is now used as BIP_Initialization_Call.
8737 (BIP_Initialization_Call): New routine.
8738 (Set_BIP_Initialization_Call): New routine.
8739 (Write_Field29_Name): Add an entry for constants and variables.
8740 * einfo.ads Add new attribute BIP_Initialization_Call and update
8742 (BIP_Initialization_Call): New routine along with pragma Inline.
8743 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
8744 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
8745 Add local declaration Res_Decl. Capture the build-in-place
8746 initialization call when the related object declaration has
8747 created a transient block.
8748 * exp_ch7.adb (Process_Transient_Objects): Add local variable
8749 Fin_Insrt. Recognize a scenario where an object declaration acts
8750 as a transient context and is initialized by a build-in-place
8753 2014-02-06 Pascal Obry <obry@adacore.com>
8755 * prj-util.adb (For_Interface_Sources): Fix handling of required
8756 bodies for aggregate libs.
8758 2014-02-06 Robert Dewar <dewar@adacore.com>
8760 * nlists.ads: Minor comment clarifications.
8762 2014-02-06 Robert Dewar <dewar@adacore.com>
8764 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
8766 * opt.ads (Modify_Tree_For_C): New flag.
8767 * output.ads, output.adb (Last_Char): New function.
8769 2014-02-06 Pascal Obry <obry@adacore.com>
8771 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
8772 share/gpr for cross-builds.
8774 2014-02-06 Robert Dewar <dewar@adacore.com>
8776 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
8777 Minor reformatting and code clean ups.
8779 2014-02-06 Pascal Obry <obry@adacore.com>
8781 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
8782 * prj.ads: Minor typo fix in comment.
8784 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8786 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
8787 local variable Expr. Flag clauses with extra parenthesis as this
8788 is not allowed by the syntax of the pragma. Code reformatting.
8790 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8792 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
8793 variables. Rename variabme Tnn to Temp. Do not create a temporary
8794 if assertions are disabled. Find enclosing routine _Postconditions
8795 and insert the temporary that captures the value of the prefix
8797 * exp_ch6.adb (Build_Postconditions_Procedure):
8798 Insert the generated _Postconditions routine
8799 before the first source declaration of the related
8801 (Insert_After_Last_Declaration): Removed.
8802 (Insert_Before_First_Source_Declaration): New routine.
8804 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8806 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
8807 Utility to determine whether current expansion is for the body
8808 of a predefined primitive operation.
8809 (Make_Predicate_Check): Use Within_Internal_Subpgram
8810 * checks.adb (Apply_Predicate_Check): Use
8811 Within_Internal_Subprogram
8812 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
8814 2014-02-06 Pascal Obry <obry@adacore.com>
8816 * prj.ads, prj-util.adb: Minor reformatting.
8818 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8820 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
8821 Take into account the Split_PPC flag to ensure that conjuncts
8822 in a composite postcondition aspect are tested in source order.
8824 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8826 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
8828 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
8829 illegal use of SPARK_Mode.
8830 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
8831 * sem_prag.adb (Analyze_Pragma): Code reformatting.
8832 * sem_util.adb Add with and use clause for Aspects.
8833 (Check_SPARK_Mode_In_Generic): New routine.
8834 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
8836 2014-02-06 Thomas Quinot <quinot@adacore.com>
8838 * a-calend.adb (Formatting_Operations.Split): Ensure that
8839 Time_Error is raised for invalid time values.
8841 2014-02-06 Arnaud Charlet <charlet@adacore.com>
8843 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
8846 2014-02-06 Robert Dewar <dewar@adacore.com>
8848 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
8849 * exp_ch3.adb (Build_Dcheck_Function): Set
8850 Is_Discriminant_Check_Function.
8852 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8854 * exp_ch7.adb (Is_Subprogram_Call): Inspect
8855 the original tree in certain cases where a construct has been
8856 factored out and replaced by a reference to a temporary.
8858 2014-02-06 Ed Schonberg <schonberg@adacore.com>
8860 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
8861 parameters when propagating predicate function to full view.
8862 (Find_Type_Of_Object): Freeze base type of object type to catch
8863 premature use of discriminated private type without a full view.
8865 2014-02-06 Robert Dewar <dewar@adacore.com>
8867 * sprint.adb: Minor reformatting.
8869 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8871 * exp_ch4.adb (Process_Transient_Object): Add local variable
8872 Temp_Ins. When the transient object is initialized by an
8873 aggregate, the hook must capture the object after the last
8874 component assignment takes place.
8875 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
8876 routine Is_Subprogram_Call.
8877 (Is_Subprogram_Call): Inspect an
8878 aggregate that has been heavily expanded for subprogram calls.
8879 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
8880 and Temp_Ins. Remove the nested declare block and adjust the
8881 indentation. When the transient object is initialized by an
8882 aggregate, the hook must capture the object after the last
8883 component assignment takes place.
8885 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8887 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
8888 external states with enabled properties that do not match the
8890 (Property_Error): New routine.
8891 * sem_res.adb (Property_Error): New routine.
8892 (Resolve_Actuals): Detect illegal uses of external variables with
8893 enabled properties in procedure calls that do not match the mode of
8894 the corresponding formal parameter.
8896 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
8898 * sem_util.adb (Has_Enabled_Property): Rename
8899 formal parameter Prop_Nam to Property. Update the comment on usage
8900 and all occurrences in the body. Add local variable Prop_Nam. When
8901 inspecting a property with an expression, the property name
8902 appears as the first choice of the component association.
8904 2014-02-04 Robert Dewar <dewar@adacore.com>
8906 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
8908 2014-02-04 Gary Dismukes <dismukes@adacore.com>
8910 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
8911 for consistency with other messages.
8913 2014-02-04 Ed Schonberg <schonberg@adacore.com>
8915 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
8916 iterator, indicate that the element is a constant if the container
8917 type does not have a variable indexing aspect.
8918 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
8919 marked as constant, do not reset its Ekind, to ensure that
8920 container elements in an element loop are not modified if the
8921 container (e.g. a hashed set) only has a constant indexing aspect.
8923 2014-02-04 Arnaud Charlet <charlet@adacore.com>
8925 * g-souinf.ads: Subprograms in this unit are actually not pure.
8926 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
8927 * einfo.ads (Is_Pure): Update doc to match implementation.
8929 2014-02-04 Gary Dismukes <dismukes@adacore.com>
8931 * exp_ch13.adb: Minor spelling fix.
8933 2014-02-04 Robert Dewar <dewar@adacore.com>
8935 * opt.ads: Minor comment update.
8937 2014-02-04 Robert Dewar <dewar@adacore.com>
8939 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
8942 2014-02-04 Ed Schonberg <schonberg@adacore.com>
8944 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
8945 on null expressions if component type is non-null, when the
8946 corresponding association covers an empty range of index values.
8948 2014-02-04 Robert Dewar <dewar@adacore.com>
8950 * sinfo.ads: Further comments on N_Expression_With_Actions node.
8952 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
8954 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
8955 variables Out_Items and Ref_Global. Remove local constant
8956 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
8957 and D8. Remove the useless collection of global items as this
8958 was a leftover from an earlier version of the routine. Move
8959 several routines out to avoid deep nesting and indentation.
8960 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
8961 parameter Do_Checks to Post_Errors. Update the comment on usage.
8962 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
8963 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
8964 to Post_Errors. Update the comment on usage. Account for the
8965 case where a self referential state may have a null input_list.
8966 (Is_Self_Referential): New routine.
8968 2014-02-04 Ed Schonberg <schonberg@adacore.com>
8970 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
8971 entity renames an expression, as in the case of an object of
8972 an unconstrained type initialized by a function call, defer the
8973 rewriting of the expression to the expander.
8974 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
8975 'Alignment): If the entity renames an expression, introduce
8976 temporary to capture value, and rewrite original declaration to
8979 2014-02-04 Gary Dismukes <dismukes@adacore.com>
8981 * g-comlin.adb: Minor typo fix.
8983 2014-02-04 Ed Schonberg <schonberg@adacore.com>
8985 * freeze.adb (Freeze_All): Types derived from a formal
8986 access_to_classwide type do not have a finalization master.
8988 2014-02-04 Robert Dewar <dewar@adacore.com>
8990 * sprint.adb: Minor reformatting.
8992 2014-02-04 Robert Dewar <dewar@adacore.com>
8994 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
8995 cases where Actions is a null list.
8996 * sinfo.ads (N_Expression_With_Actions): Actions can be
8997 temporarily empty during semantic analysis, but must be non-empty
8998 in the final expanded tree.
9000 2014-01-31 Robert Dewar <dewar@adacore.com>
9002 * exp_ch9.adb: Minor reformatting.
9004 2014-01-31 Emmanuel Briot <briot@adacore.com>
9006 * g-comlin.adb (Set_Command_Line): Take the switches
9007 configuration from the Command_Line_Config.
9009 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9011 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
9014 2014-01-31 Vincent Celier <celier@adacore.com>
9016 * projects.texi: Add more documentation about others used as an
9017 index in indexed attributes.
9019 2014-01-31 Robert Dewar <dewar@adacore.com>
9021 * gnat_ugn.texi: Minor update.
9022 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
9023 * exp_util.adb: Minor reformatting.
9025 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9027 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
9028 depends on data that is not private to the protected object,
9029 and potentially modifiable in unsynchronized fashion.
9031 2014-01-31 Yannick Moy <moy@adacore.com>
9033 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
9036 2014-01-31 Robert Dewar <dewar@adacore.com>
9038 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
9039 for Unknown_Package.
9040 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
9042 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9044 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
9045 the logic that generates a runtime check to determine the
9046 controlled status of the object about to be allocated or
9047 deallocated. Class-wide types now always use a runtime check
9048 even if they appear as generic actuals.
9049 (Find_Object): Detect
9050 a special case that involves interface class-wide types because
9051 the object appears as a complex expression.
9053 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9055 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
9056 subprogram with an incomplete untagged formals on the list of
9057 private dependents, to verify that the type is properly completed
9058 in the private part.
9059 * sem_attr.adb: Code clean up.
9061 2014-01-31 Robert Dewar <dewar@adacore.com>
9063 * exp_ch6.adb: Minor reformatting.
9065 2014-01-31 Vincent Celier <celier@adacore.com>
9067 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
9068 when Pkg is unknown.
9070 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9072 * sem_res.adb (Resolve_Entity_Name): Comment
9073 reformatting. Allow volatile objects in various generated checks.
9075 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9077 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
9078 component association, set the etype of the identifier, for
9081 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9083 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
9084 declared in a package, not checks can apply to the subprogram.
9086 2014-01-31 Robert Dewar <dewar@adacore.com>
9088 * erroutc.adb (Validate_Specific_Warnings): Warnings are
9089 controlled -gnatw.W.
9090 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
9091 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
9093 2014-01-31 Arnaud Charlet <charlet@adacore.com>
9095 * exp_disp.adb: Update comments.
9097 2014-01-31 Yannick Moy <moy@adacore.com>
9099 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
9100 Save_Global_References): Guard access to expression in aspect.
9102 2014-01-31 Yannick Moy <moy@adacore.com>
9104 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
9105 Issue an error when the pragma is applied to a generic unit,
9106 a generic declaration, or inside a generic.
9108 2014-01-31 Yannick Moy <moy@adacore.com>
9110 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
9113 2014-01-31 Robert Dewar <dewar@adacore.com>
9115 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
9118 2014-01-31 Tristan Gingold <gingold@adacore.com>
9120 * exp_disp.adb: Add a historic note.
9122 2014-01-31 Robert Dewar <dewar@adacore.com>
9124 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
9125 Process_Deferred_References.
9127 2014-01-31 Yannick Moy <moy@adacore.com>
9129 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
9130 ineffective pragma Warnings(Off) in GNATprove_Mode.
9132 2014-01-31 Bob Duff <duff@adacore.com>
9134 * s-taskin.ads: Minor comment fix.
9135 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
9136 just direct dependents. If this is actually an abort, each task
9137 will take care of aborting its dependents, so all dependents will
9138 get aborted, as before. However, when this is called the second
9139 time from Vulnerable_Complete_Master "for convenience" (i.e. to
9140 kill off tasks waiting at terminate alternatives), aborting
9141 indirect dependents is wrong, because it causes some unrelated
9142 tasks to get aborted.
9144 2014-01-31 Robert Dewar <dewar@adacore.com>
9146 * sem_ch4.adb: Minor reformatting.
9148 2014-01-31 Robert Dewar <dewar@adacore.com>
9150 * exp_ch2.adb: New calling sequence for Is_LHS.
9151 * frontend.adb: Add call to Process_Deferred_References.
9152 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
9153 (Deferred_References): New table.
9154 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
9156 (Find_Expanded_Name): Ditto.
9157 * sem_res.adb: New calling sequence for Is_LHS.
9158 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
9159 * sem_warn.adb: Call Process_Deferred_References before issuing
9162 2014-01-31 Tristan Gingold <gingold@adacore.com>
9164 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
9165 use of System_Tasking_Protected_Objects_Single_Entry.
9166 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
9167 of Protected_Single_Entry_Call.
9168 (Expand_N_Timed_Entry_Call): Remove single_entry case.
9169 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
9171 (Make_Disp_Timed_Select_Body): Likewise.
9172 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
9173 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
9175 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
9176 (Wait_For_Completion_With_Timeout): Remove.
9177 (Protected_Single_Entry_Call): Remove Mode parameter
9178 (always Simple_Call).
9179 (Service_Entry): Remove Self_Id constant (not used anymore).
9180 (Timed_Protected_Single_Entry_Call): Remove.
9181 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
9182 (Protected_Single_Entry_Call): Remove Mode parameter.
9184 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9186 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
9187 * einfo.ads (Get_Pragma): Update the comment on special pragmas
9188 handled by this routine.
9189 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
9190 to the contract of the related subprogram body.
9191 * sem_util.adb (Add_Contract_Item): Handle the insertion of
9192 pragma Refined_Post into the contract of a subprogram body.
9193 * sinfo.ads Update the documentation of node N_Contract.
9194 * sem_res.adb (Resolve_Entity_Name): Add a guard
9195 to detect abstract states and variables only when checking the
9196 SPARK 2014 rules concerning volatile object placement.
9198 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9200 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
9201 null is compatible with any access type.
9203 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9205 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
9206 placement is not in a package.
9208 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9210 * sem_util.adb (Has_Enabled_Property): Compare the character field of
9213 2014-01-29 Robert Dewar <dewar@adacore.com>
9215 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
9216 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
9217 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
9219 2014-01-29 Robert Dewar <dewar@adacore.com>
9221 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
9222 * sem_warn.adb (Check_References): Suppress warnings if inside
9223 Initial_Condition pragma.
9225 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9227 * sem_prag.adb (Check_Missing_Part_Of): List all values of
9228 State_Space_Kind for readability reasons. Do not emit an error on
9229 a private item when the enclosing package lacks aspect/pragma
9230 Abstract_State. Do not emit an error on a private package
9231 instantiation when the corresponding generic template lacks
9233 (Has_Visible_State): New routine.
9234 * sem_util.adb (Find_Placement_In_State_Space): The visible
9235 declarations of any kind of child units in general act as proper
9238 2014-01-29 Robert Dewar <dewar@adacore.com>
9240 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
9241 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
9242 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
9243 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
9244 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
9245 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
9246 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
9247 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
9248 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
9249 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
9250 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
9251 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
9252 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
9253 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
9254 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
9255 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
9256 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
9257 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
9258 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
9259 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
9260 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
9261 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
9262 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
9263 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
9264 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
9265 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
9266 s-regpat.adb, s-secsta.adb, s-stalib.ads,
9267 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
9268 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
9269 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
9270 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
9271 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
9273 2014-01-29 Robert Dewar <dewar@adacore.com>
9275 * expander.adb: Minor reformatting.
9277 2014-01-29 Javier Miranda <miranda@adacore.com>
9279 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
9282 2014-01-29 Javier Miranda <miranda@adacore.com>
9284 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
9285 that checks if an interface types defines the predefined "="
9286 function because the compiler was erroneously not generating the
9287 predefined "=" primitive as soon as the name of some interface
9288 primitive is "=" (formals were not checked).
9290 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9292 * expander.adb (Expander): In GNATprove mode, do not process
9293 transient scopes: they are in general not created in this mode,
9294 and an attempt to examine them will lead to constraint errors when
9295 processing configuration pragmas that have analyzable expressions.
9297 2014-01-29 Vincent Celier <celier@adacore.com>
9299 * clean.adb (Gnatclean): Fail if main project is an aggregate
9300 project or if there is an aggregate library project in the
9302 * gnatcmd.adb: Fail if the main project is an aggregate project
9303 or if there is an aggegate library project in the project tree.
9304 * make.adb (Initialize): : Fail if main project is an aggregate
9305 project or if there is an aggregate library project in the
9307 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
9308 * prj-makr.adb (Initialize): Fail if the main project is an
9309 aggregate project or an aggregate library project.
9311 2014-01-29 Vincent Celier <celier@adacore.com>
9313 * prj-part.adb (Check_Import_Aggregate): New procedure
9314 to check if an imported project is an aggregate project.
9315 (Parse_Single_Project): Call Check_Import_Aggregate
9316 * projects.texi: Document that aggregate projects cannot be
9317 extended or imported.
9319 2014-01-29 Robert Dewar <dewar@adacore.com>
9321 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
9322 reformatting and code clean up.
9323 * gnat_ugn.texi: Add documentation section on Atomic Variables
9326 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9328 * einfo.adb Flag264 is now unused.
9329 (Has_Body_References): Removed.
9330 (Set_Has_Body_References): Removed.
9331 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
9332 * einfo.ads Update the comment on usage of attribute
9333 Body_References. Remove attribute Has_Body_References and its
9335 (Has_Body_References): Removed along with pragma Inline.
9336 (Set_Has_Body_References): Removed along with pragma Inline.
9337 * sem_prag.adb (Analyze_Global_Item): Move the call to
9338 Record_Possible_Body_Reference in the state related checks
9339 section. Add a comment intended function.
9340 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
9341 in the state related checks section. Add a comment intended function.
9342 (Analyze_Refinement_Clause): Cleanup the illegal body reference
9343 reporting. Add a comment on timing of error reporting.
9344 (Record_Possible_Body_Reference): Reimplement the routine.
9346 2014-01-29 Vincent Celier <celier@adacore.com>
9348 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
9349 unit-based languages.
9350 (Mains.Complete_Mains.Do_Complete): Use the source file project
9351 tree when calling Find_File_Add_Extension. Use the correct
9352 project name when reporting an error.
9354 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
9356 * aspects.adb Add an entry for aspect Part_Of in table
9358 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
9359 Aspect_Argument, Aspect_Names and Aspect_Delay.
9360 * atree.h Define Elist9.
9361 * atree.adb (Elist9): New routine.
9362 (Set_Elist9): New routine.
9363 * atree.ads (Elist9): New routine.
9364 (Set_Elist9): New routine.
9365 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
9366 the list of node usage. Remove Refined_State from the list of
9368 (Encapsulating_State): New routine.
9370 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
9371 (Refined_State): Removed.
9372 (Set_Encapsulating_State): New routine.
9373 (Set_Part_Of_Constituents): New routine.
9374 (Set_Refined_State): Removed.
9375 (Write_Field9_Name): Add an entry
9376 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
9377 Encapsulating_State. Remove the entry for Refined_State.
9378 * einfo.ads Add new attributes Encapsulating_State
9379 and Part_Of_Constituents alond with their usage in
9380 entities. Remove attribute Refined_State along with its
9382 (Encapsulating_State): New routine and
9383 pragma Inline. (Get_Pragma): Update the comment on usage.
9384 (Part_Of_Constituents): New routine and pragma Inline.
9385 (Refined_State): Removed along with pragma Inline.
9386 (Set_Encapsulating_State): New routine and pragma Inline.
9387 (Set_Part_Of_Constituents): New routine and pragma Inline.
9388 (Set_Refined_State): Removed along with pragma Inline.
9389 * par-prag.adb Pragma Part_Of does not need any special processing
9391 * sem_ch3.adb (Analyze_Declarations): Remove local variables
9392 Body_Id and Prag. Call separate routines to analyze the
9393 contract of a package [body].
9394 (Analyze_Object_Contract):
9395 Update the comment on usage. Remove local variables
9396 Items and Nam. Use Get_Pragma rather than traversing the
9397 classification list. Verify whether the lack of indicator
9398 Part_Of agrees with the placement of the variable in state space.
9399 (Analyze_Object_Declaration): Initialize the encapsulating state
9400 of a variable. (Requires_State_Refinement): Moved to sem_util.
9401 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
9402 (Analyze_Package_Contract): New routine.
9403 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
9404 (Analyze_Package_Contract): New routine.
9405 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
9406 state and Part_Of constituents.
9407 * sem_ch13.adb (Analyze_Aspect_Specifications):
9408 Add processing for aspect Part_Of. Update all
9409 calls to Decorate_Delayed_Aspect_And_Pragma.
9410 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
9411 not need any special processing at freeze time.
9412 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
9413 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
9414 update the associated comment.
9415 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
9416 (Analyze_Abstract_State): Add new global variable State_Id. Remove
9417 local constants Errors and Loc. Remove local variables Is_Null
9418 and State_Nam. Create the entity of the abstract state on the
9419 spot, before all remaining checks are performed. Verify that a
9420 missing Part_Of option agrees with the placement of the abstract
9421 state within the state space.
9422 (Analyze_Depends_In_Decl_Part):
9423 Add new global variables Constits_Seen and States_Seen. Check
9424 that a state and a corresponding constituent do not appear
9425 in pragma [Refined_]Depends.
9426 (Analyze_Global_In_Decl_Part):
9427 Add new global variables Constits_Seen and States_Seen. Check
9428 that a state and a corresponding constituent do not appear
9429 in pragma [Refined_]Global.
9430 (Analyze_Global_Item):
9431 Remove the now obsolete code that deals with Part_Of.
9432 Add the entity of the global item to the list of processed
9433 items. (Analyze_Initializes_In_Decl_Part): Add new global
9434 variables Constits_Seen and States_Seen. Check that a state
9435 and a corresponding constituent do not appear in pragma
9437 (Analyze_Initialization_Item): Add the entity
9438 of the initialization item to the list of processed items.
9439 (Analyze_Input_Item): Add the entity of the initialization
9440 item to the list of processed items.
9441 (Analyze_Input_Output):
9442 Remove the now obsolete code that deals with Part_Of. Add the
9443 entity of the input/output to the list of processed items.
9444 (Analyze_Part_Of): New routine.
9445 (Analyze_Part_Of_Option): Remove
9446 local constant Par_State. Add local constant Encaps and local
9447 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
9448 the option. Turn the related state into a Part_Of constituent
9449 if the option is legal.
9450 (Analyze_Pragma): Add processing
9452 (Analyze_Refined_State_In_Decl_Part):
9453 Remove global constants Pack_Body and Spec_Id. Remove
9454 global variables Abstr_States and Hidden_States. Add new
9455 global variables Available_States, Body_Id, Body_States and
9456 Spec_Id. Add new local constant Body_Decl. Reimplement the
9457 logic that extracts the states available for refinement from
9458 the related package and the body hidden states of the said
9460 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
9461 (Check_Applicable_Policy): Alphabetize body.
9462 (Check_Dependency_Clause): Replace Refined_State
9463 with Encapsulating_State.
9464 (Check_Matching_Constituent):
9465 Reimplement the logic that determines whether an item is a valid
9466 / invalid constituent of the current refined state. Return when
9467 a construct does not denote a valid abstract state. Extract the
9468 list of Part_Of constituents for further analysis. Check that all
9469 Part_Of constituents of a state have been used in its refinement.
9470 (Check_Matching_State): Update the comment on usage. Operate
9471 on the list of available states.
9472 (Check_Missing_Part_Of): New routine.
9473 (Check_Refined_Global_Item): Replace Refined_State
9474 with Encapsulating_State.
9475 (Check_State_And_Constituent_Use): New routine.
9476 (Create_Abstract_State): New routine.
9477 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
9478 (Is_Part_Of): Removed.
9479 (Collect_Body_States): New routine.
9480 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
9481 (Collect_Hidden_States): Removed.
9482 (Report_Unrefined_States): Change the profile of the procedure along
9483 with the comment on usage.
9484 (Report_Unused_Constituents): New routine.
9485 (Report_Unused_Hidden_States): Removed.
9486 (Report_Unused_States): New routine.
9487 * sem_prag.ads (Check_Missing_Part_Of): New routine.
9488 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
9489 appear in the classification pragmas of a package instantiation
9491 (Find_Placement_In_State_Space): New routine.
9492 (Is_Child): Removed.
9493 (Is_Child_Or_Sibling): Remove formal
9494 parameter Private_Child. Remove the private child checks.
9495 (Requires_State_Refinement): Moved from sem_ch3.
9496 * sem_util.ads Add new type State_Space_Kind along with
9497 comment on its usage and values.
9498 (Add_Contract_Item): Update the comment on usage.
9499 (Find_Body_Discriminal): Alphabetize spec.
9500 (Find_Placement_In_State_Space): New routine.
9501 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
9502 and update the comment on usage.
9503 (Requires_State_Refinement): Moved from sem_ch3.
9504 * sinfo.ads: Update the documentation of N_Contract.
9505 * snames.ads-tmpl The predefined name for Part_Of is now used
9506 to denote a pragma. Add Pragma_Id for Part_Of.
9508 2014-01-29 Emmanuel Briot <briot@adacore.com>
9510 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
9512 (Dump): New subprogram.
9514 2014-01-29 Tristan Gingold <gingold@adacore.com>
9516 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
9517 Expand_Entry_Declaration to factorize code.
9519 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9521 * checks.adb: minor clarification.
9522 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
9523 search for primitive operations to the entities that immediately
9524 follow the type declaration.
9526 2014-01-29 Tristan Gingold <gingold@adacore.com>
9528 * exp_ch9.adb (Build_Protected_Entry): Do not call
9529 Complete_Entry_Body anymore.
9530 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
9531 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
9533 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
9535 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
9536 string when the Name input bigger than allowed. Adapt the function
9539 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9541 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
9542 if expression is within a case_expression of if_expression.
9544 2014-01-29 Robert Dewar <dewar@adacore.com>
9546 * exp_ch9.adb, inline.ads: Minor reformatting.
9548 2014-01-29 Tristan Gingold <gingold@adacore.com>
9550 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
9552 2014-01-29 Yannick Moy <moy@adacore.com>
9554 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
9555 SPARK_Mode_Pragma components to be able to analyze generic
9557 * sem_ch12.adb (Analyze_Package_Instantiation,
9558 Inline_Instance_Body, Need_Subprogram_Instance_Body,
9559 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
9560 for future analysis of the instance.
9561 (Instantiate_Package_Body,
9562 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
9563 from instantiation to analyze the instance.
9565 2014-01-29 Robert Dewar <dewar@adacore.com>
9567 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
9570 2014-01-29 Yannick Moy <moy@adacore.com>
9572 * gnat_rm.texi: Update description of SPARK_Mode pragma.
9574 2014-01-29 Tristan Gingold <gingold@adacore.com>
9576 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
9578 2014-01-29 Thomas Quinot <quinot@adacore.com>
9580 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
9582 2014-01-29 Ed Schonberg <schonberg@adacore.com>
9584 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
9585 resulting string is an internal entity. and thus requires no
9586 initialization. This is relevant when Initialize_ Scalars is
9587 enabled, because the resultant spurious initialization may lead to
9588 secondary stack anomalies that produce a mangled name for a task.
9590 2014-01-29 Yannick Moy <moy@adacore.com>
9592 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
9593 not inherited from spec anymore. Check consistency
9594 rules after processing of declarations.
9595 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
9596 from spec anymore. Check consistency rules after processing of
9598 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
9600 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
9603 2014-01-27 Robert Dewar <dewar@adacore.com>
9605 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
9607 (Resolve_Range): Add type name/location to unordered msg.
9609 2014-01-27 Claire Dross <dross@adacore.com>
9611 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
9612 Capacity) is only called with Capacity >= Length (Source) and
9613 Capacity in Capacity_Range.
9614 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
9615 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
9616 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
9617 in the code is this is not the case.
9619 2014-01-27 Thomas Quinot <quinot@adacore.com>
9621 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
9622 selected component in an instance where the component of the
9623 actual is not visibile at instantiation.
9625 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9627 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
9628 has a dynamic predicate, generate freeze node for Actual_Subtype
9629 at once, because the declaration of the corresponding predicate
9630 function will make reference to it.
9632 2014-01-27 Tristan Gingold <gingold@adacore.com>
9634 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
9636 2014-01-27 Robert Dewar <dewar@adacore.com>
9638 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
9639 for 2**X optimization.
9641 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9643 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
9644 explicitly whether value is in range of Character, because the
9645 library is typically compiled with range checks disabled, and
9646 we cannot rely on the implicit check on the argument of 'Val.
9648 2014-01-27 Vincent Celier <celier@adacore.com>
9650 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
9651 not the Target to itself.
9653 2014-01-27 Robert Dewar <dewar@adacore.com>
9655 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
9656 changes to avoid incorrect use of unordered enum types.
9658 2014-01-27 Thomas Quinot <quinot@adacore.com>
9660 * sem_ch4.adb: Minor reformatting.
9662 2014-01-27 Robert Dewar <dewar@adacore.com>
9664 * scn.adb (Check_End_Of_Line): Removed.
9665 (Error_Long_Line): Removed.
9666 (Determine_License): Use versions of above routines from Scanner.
9667 * scng.adb (Check_End_Of_Line): Moved to spec.
9668 (Error_Long_Line): Removed, no longer used.
9669 * scng.ads (Check_End_Of_Line): Moved here from body.
9671 2014-01-27 Tristan Gingold <gingold@adacore.com>
9673 * exp_ch7.adb (Build_Cleanup_Statements): Call
9674 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
9676 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
9677 Remove Service_Name variable.
9678 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
9679 factorize code from the above subprograms.
9680 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
9682 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
9684 * einfo.adb (Has_Option): Reimplemented.
9685 * sem_prag.adb (Analyze_Refinement_Clause): Add global
9686 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
9687 External_Constit_Seen and State. Add local variables Body_Ref,
9688 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
9689 avoid a cumbersome while pool. Verify the legality of an external
9690 state and relevant properties.
9691 (Check_External_Property): New routine.
9692 (Check_Matching_State): Remove parameter profile
9693 and update comment on usage.
9694 (Collect_Constituent): Store the
9695 relevant external property of a constituent.
9696 * sem_util.adb (Async_Readers_Enabled): Update the call to
9697 Has_Enabled_Property.
9698 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
9699 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
9700 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
9701 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
9702 Update comment on usage. Reimplement the logic to recognize the various
9703 formats of properties.
9705 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9707 * par-ch5.adb: Minor reformatting.
9709 2014-01-27 Tristan Gingold <gingold@adacore.com>
9711 * s-tposen.ads: Harmonize style and comments.
9713 2014-01-27 Vincent Celier <celier@adacore.com>
9715 * projects.texi: Document that shared library projects, by
9716 default, cannot import projects that are not shared library
9719 2014-01-27 Robert Dewar <dewar@adacore.com>
9721 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
9724 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9726 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
9727 any other exception is raised.
9728 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
9729 still necessary to perform a conversion in order to remove overlong
9732 2014-01-27 Robert Dewar <dewar@adacore.com>
9734 * exp_smem.adb: Minor reformatting.
9736 2014-01-27 Thomas Quinot <quinot@adacore.com>
9738 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
9740 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9742 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
9743 nodes for operands to the original node for the call, to preserve
9744 Original_Node pointers within the resolved operands, given that
9745 they may have been rewritten as well. Previous approach copied
9746 the operands into a new tree and lost those pointers.
9748 2014-01-27 Claire Dross <dross@adacore.com>
9751 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
9753 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9755 * sem_util.adb (Check_Internal_Protected_Use): A call through
9756 an anonymous access parameter of the current protected function
9757 is not a potential modification of the current object.
9759 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9761 * a-cobove.adb (Reserve_Capacity): Procedure raises
9762 Capacity_Error, not Constraint_Error, when request cannot be
9765 2014-01-27 Vincent Celier <celier@adacore.com>
9767 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
9768 not the Target to itself.
9770 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9772 * exp_ch4.adb (Expand_Concatenate): If the target of the
9773 concatenation is a library-level entity, always use the off-line
9774 version of concatenation, regardless of optimization level. This
9775 is space-efficient, and prevents linking problems when some
9776 units are compiled with different optimization levels.
9778 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9780 * sem_ch5.adb: Code clean up.
9782 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9784 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
9785 when an array or container iterator includes a subtype indication,
9786 which is only legal in an element iterator.
9788 2014-01-27 Thomas Quinot <quinot@adacore.com>
9790 * exp_ch7.adb: Minor reformatting.
9792 2014-01-27 Robert Dewar <dewar@adacore.com>
9794 * opt.adb (SPARK_Mode): Default for library units is None rather
9796 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
9798 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
9800 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
9802 2014-01-27 Robert Dewar <dewar@adacore.com>
9804 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
9805 Suspicious_Labels table if we have identifier; followed by loop
9807 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
9808 * par.adb (Suspicious_Labels): New table.
9810 2014-01-27 Robert Dewar <dewar@adacore.com>
9812 * exp_aggr.adb (Check_Bounds): Reason is range check, not
9815 2014-01-27 Yannick Moy <moy@adacore.com>
9817 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
9819 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
9821 (Add_SPARK_Xrefs): Include references to constants.
9822 * spark_xrefs.ads Document new character 'c' for references to
9825 2014-01-27 Thomas Quinot <quinot@adacore.com>
9827 * exp_smem.adb (Add_Write_After): For a function call, insert write as
9828 an after action in a transient scope.
9830 2014-01-27 Thomas Quinot <quinot@adacore.com>
9832 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
9833 to a shared variable as an OUT formal in a call to an init proc,
9834 the 'Read call must be emitted after, not before, the call.
9836 2014-01-27 Robert Dewar <dewar@adacore.com>
9838 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
9840 2014-01-27 Robert Dewar <dewar@adacore.com>
9842 * a-wichha.adb (Character_Set_Version): Change to output proper
9845 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
9847 * einfo.adb (Is_Input_Only_State): Removed.
9848 (Is_Non_Volatile_State): Removed.
9849 (Is_Output_State): Removed.
9850 * einfo.ads (Is_Input_Only_State): Remove attribute and
9851 subprogram. Update related entity.
9852 (Is_Non_Volatile_State):
9853 Remove attribute and subprogram. Update related entity.
9854 (Is_Output_State): Removed attribute and subprogram. Update
9856 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
9858 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
9859 an object, not just variables.
9860 (Analyze_Object_Contract): New routine.
9861 (Analyze_Variable_Contract): Removed.
9862 (Process_Discriminants): Detect an illegal use of volatile
9863 discriminant in SPARK mode.
9864 * sem_ch5.adb (Analyze_Iterator_Specification):
9865 Detect an illegal use of volatile loop variable.
9866 (Analyze_Loop_Parameter_Specification): Detect an illegal use
9867 of volatile loop variable.
9868 * sem_ch6.adb (Process_Formals): Update the volatile object
9869 detection. Detect an illegal formal of mode IN OUT or OUT in
9870 SPARK mode. Enhance the error messages with references.
9871 * sem_ch12.adb (Instantiate_Object): Update the volatile object
9872 detection. Enhance the error messages with references.
9873 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
9874 messages with references.
9875 (Analyze_Contract_Case): Enhance the error messages with references.
9876 (Analyze_External_Property): Call Check_Duplicate_Property to process
9877 an external property.
9878 (Analyze_External_Property_In_Decl_Part): New routine.
9879 (Analyze_External_State_In_Decl_Part): Removed.
9880 (Analyze_Global_Item): Detect an illegal
9881 use of a volatile constant. Detect an illegal use
9882 of a variable with enabled Effective_Reads. Enhance
9883 the error messages with references. Remove obsolete
9884 checks concerning Input_Only and Output_Only states.
9885 (Analyze_Initialization_Item): Enhance the error messages
9887 (Analyze_Initializes_In_Decl_Part): Do not
9888 collect the states and variables when the initialization list
9890 (Analyze_Input_Item): Enhance the error messages with references.
9891 (Analyze_Input_Output): Enhance the error messages with references.
9892 (Analyze_Pragma): Enhance the error messages with references.
9893 (Analyze_Refinement_Clause): Code reformatting.
9894 (Analyze_Refined_Depends_In_Decl_Part):
9895 Rename global variable Global to Reg_Global and update all
9896 occurrences. Add local variables D7 and D8. Update the error
9897 messages with references. Update the call to Collect_Global_Items.
9898 (Analyze_Refined_Global_In_Decl_Part): Add local variables
9899 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
9900 the call to Collect_Global_Items. Account for a Proof_In state
9901 in null / useless refinement checks. Verify the coverage of
9903 (Check_Dependency_Clause): Remove local variable
9904 Out_Constits. Remove the retrieval and removal of constituents
9905 for an Output_Only state. Remove the reporting of unused
9906 Output_Only state constituents.
9907 (Check_Duplicate_Mode): Enhance
9908 the error message with a reference.
9909 (Check_Duplicate_Property): New routine.
9910 (Check_Duplicate_Option): Enhance the error message with a reference.
9911 (Check_External_Properties): Enhance the error message with a reference.
9912 (Check_Function_Return): Enhance the error message with a reference.
9913 (Check_In_Out_States): Update
9914 comment on usage. Add a specialized error message for Proof_In
9915 constituents. Enhance the error message with a reference.
9916 (Check_Input_States): Update comment on usage. Account for
9917 possible Proof_In constituents. Enhance the error message
9919 (Check_Matching_Constituent): Enhance the error message with a
9921 (Check_Matching_State): Enchance the error message with a reference.
9922 (Check_Mode): Add local variable From_Global. Update the call to
9923 Find_Mode. Emit more precise error messages concerning extra items
9924 (Check_Mode_Restriction_In_Enclosing_Context): Consider
9925 pragma Refined_Global. Enhance the error message with a
9927 (Check_Mode_Restriction_In_Function): Enhance the error message with
9929 (Check_Output_States): Update comment on usage. Add local variable
9930 Posted. Account for possible Proof_In constituents. Produce a detailed
9931 list of missing constituents.
9932 (Check_Proof_In_States): New routine.
9933 (Check_Refined_Global_Item): Handle Proof_In
9934 constituents. Enchance the error message with a reference.
9935 (Collect_Global_Items): Add formal parameters Proof_In_Items
9936 and Has_Proof_In_State. Update the comment on usage. Account
9938 (Create_Or_Modify_Clause): Enchance
9939 the error message with a reference.
9941 formal parameter From_Global. Update the comment on usage.
9942 Detect when the mode is governed by pragma [Refined_]Global.
9943 (Output_Constituents): Removed.
9944 (Report_Extra_Constituents):
9945 Report extra Proof_In constituents.
9946 (Report_Unused_Constituents): Removed.
9947 (Usage_Error): Code reformatting. Enhance the error
9948 messages with reference.
9949 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
9950 (Analyze_External_State_In_Decl_Part): Removed.
9951 * sem_res.adb (Resolve_Actuals): Update the volatile object
9952 detection. Enhance the error message with a reference.
9953 (Resolve_Entity_Name): Update the volatile object
9954 detection. Enhance the error message with a reference.
9955 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
9956 (Is_SPARK_Volatile_Object): New routine.
9957 (Has_Volatile_Component): New routine.
9958 * sem_util.ads (Is_Delegate): Alphabetized.
9959 (Is_SPARK_Volatile_Object): New routine.
9960 (Has_Volatile_Component): New routine.
9961 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
9963 2014-01-27 Ed Schonberg <schonberg@adacore.com>
9965 * sem_attr.adb: Resolve fully prefix of 'Update.
9967 2014-01-27 Ben Brosgol <brosgol@adacore.com>
9969 * gnat_rm.texi: Minor clarifications.
9971 2014-01-27 Robert Dewar <dewar@adacore.com>
9973 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
9974 about call that is generated as part of an Initial_Condition
9976 * sem_prag.adb: Minor spelling correction.
9978 2014-01-27 Robert Dewar <dewar@adacore.com>
9980 * sem_prag.adb (Set_Convention_From_Pragma): Check that
9981 convention Ghost can only apply to functions.
9982 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
9984 2014-01-27 Robert Dewar <dewar@adacore.com>
9986 * gnat_ugn.texi: Add Short_Enums to documentation of
9989 2014-01-27 Robert Dewar <dewar@adacore.com>
9991 * sem_prag.adb (Analyze_Input_Item): Correct check for input
9992 item in same package.
9993 * sem_util.ads, sem_util.adb (Within_Scope): New function.
9995 2014-01-26 Arnaud Charlet <charlet@adacore.com>
9997 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
9998 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
9999 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
10000 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
10003 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
10005 * gcc-interface/Makefile.in: Fix oversight.
10007 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
10009 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
10010 conversion from a thin pointer with a shifted value.
10011 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
10012 read-only flag from the values onto the result.
10013 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
10015 2014-01-25 Tristan Gingold <gingold@adacore.com>
10017 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
10018 for E_Variable with a pragma Linker_Section.
10020 2014-01-25 Robert Dewar <dewar@adacore.com>
10022 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
10023 with Default_Value aspect is passed in by copy.
10025 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10027 * set_targ.adb: Set Short_Enums.
10028 * gcc-interface/lang.opt (fshort-enums): New option.
10029 * gcc-interface/misc.c (gnat_handle_option): Handle it.
10030 (gnat_post_options): Do not modify the global settings.
10032 2014-01-24 Robert Dewar <dewar@adacore.com>
10034 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
10036 (Random_Decimal_Fixed): New generic function.
10037 * s-rannum.ads: Minor comment clarifications.
10039 2014-01-24 Robert Dewar <dewar@adacore.com>
10041 * back_end.adb: Remove Short_Enums handling (handled in
10042 Ttypes/Get_Targ now) Minor added comments.
10043 * freeze.adb: Change name Short_Enums_On_Target to
10044 Target_Short_Enums.
10045 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
10046 * opt.ads: Minor comment updates.
10047 * sem_ch13.adb: Change name Short_Enums_On_Target to
10048 Target_Short_Enums.
10049 * set_targ.adb: Set Short_Enums from gcc back end.
10050 * set_targ.ads (Short_Enums): New variable.
10051 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
10052 Ttypes/Get_Targ now).
10053 * ttypes.ads (Target_Short_Enums): New constant boolean switch
10055 2014-01-24 Pascal Obry <obry@adacore.com>
10057 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
10059 2014-01-24 Gary Dismukes <dismukes@adacore.com>
10061 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
10062 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
10065 2014-01-24 Robert Dewar <dewar@adacore.com>
10067 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
10069 2014-01-24 Vincent Celier <celier@adacore.com>
10071 * prj.adb (Add_Aggregated_Project): Do not add a project in
10072 the list if it is already there.
10074 2014-01-24 Yannick Moy <moy@adacore.com>
10076 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
10077 Correct the search for a subrogram declaration to which a pragma is
10080 2014-01-24 Bob Duff <duff@adacore.com>
10082 * gnat_ugn.texi: Document --decimal-grouping and
10083 --based-grouping switches in gnatpp.
10085 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10087 * sinfo.ads: Documentation update.
10089 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10091 * sem_ch3.adb (Constant_Redeclaration): New declaration is
10092 illegal if previous one has an initial expression that is an
10093 aggregate expanded into assignments.
10095 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10097 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
10098 code reorganization to remove spurious warning on a loop with
10099 an array element iterator that has a null range.
10101 2014-01-24 Vincent Celier <celier@adacore.com>
10103 * make.adb (Binding_Phase): When setting the Ada paths, use
10104 the library ALI dir, not the object dir in libraries.
10106 2014-01-24 Yannick Moy <moy@adacore.com>
10108 * sinfo.ads: Add documentation of check flag fields.
10110 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10112 * sem_res.adb (Resolve_Actuals): If an actual is a view
10113 conversion of a discriminated object, and the formal type is
10114 discriminated and constrained, apply a discriminant check to
10117 2014-01-24 Robert Dewar <dewar@adacore.com>
10119 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
10121 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10123 * sem_ch3.adb (Analyze_Declarations): At the end of an
10124 appropriate declarative part, call Freeze_All from the first
10125 declaration in the scope, not from the first unfrozen one. This
10126 is necessary to apply visibility checks to entities with delayed
10127 aspects. Otherwise, in the presence of instantiations and cleanups
10128 that they may generate, the delayed aspects may be analyzed too
10129 late and produce spurious visibility errors.
10130 * sem_attr.adb: Place etype on range.
10131 * sem_ch6.adb: Documentation expression functions.
10133 2014-01-24 Robert Dewar <dewar@adacore.com>
10135 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
10136 terminology in compiler).
10138 2014-01-24 Robert Dewar <dewar@adacore.com>
10140 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
10141 categories, now that Ada 95 supports raise expressions.
10143 2014-01-24 Robert Dewar <dewar@adacore.com>
10145 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
10146 Short_Enums_On_Target.
10147 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
10149 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
10151 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10153 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
10154 indication is given explicity, check that it matches the array
10155 component type or the container element type of the domain
10158 2014-01-24 Tristan Gingold <gingold@adacore.com>
10160 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
10161 * gcc-interface/misc.c (flag_short_enums): Declare.
10162 (gnat_post_options): Set it.
10164 2014-01-24 Vincent Celier <celier@adacore.com>
10166 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
10167 to cache the result when Including_Libraries is False.
10168 * prj-env.ads (Ada_Objects_Path): Update documentation
10169 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
10170 (Get_Object_Directory): Return the Library_Ali_Dir only when
10171 when Including_Libraries is True.
10172 * prj.ads (Get_Object_Directory): Fix and complete documentation
10173 (Project_Data): New component Ada_Objects_Path_No_Libs
10175 2014-01-24 Robert Dewar <dewar@adacore.com>
10177 * checks.adb (Expr_Known_Valid): Result of fpt operator never
10180 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10182 * back_end.adb: Minor fix in comment.
10184 2014-01-24 Javier Miranda <miranda@adacore.com>
10186 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
10187 required to report the error in case of task types.
10189 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10191 * sem_attr.adb: Additional index checking.
10193 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10195 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
10196 expressions in each component association, and for records note
10197 the entity in each association choice, for subsequent resolution.
10198 (Resolve_Attribute, case 'Update): Complete resolution of
10199 expressions in each component association.
10201 2014-01-24 Robert Dewar <dewar@adacore.com>
10203 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
10204 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
10205 leading to wrong handling of SPARK_Mode for library units).
10207 2014-01-24 Robert Dewar <dewar@adacore.com>
10209 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
10210 on generic instances (do not consider them to be internally
10213 2014-01-24 Doug Rupp <rupp@adacore.com>
10215 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
10216 vice pthread_sigmask.
10218 2014-01-24 Vincent Celier <celier@adacore.com>
10220 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
10223 2014-01-24 Vincent Celier <celier@adacore.com>
10225 * prj-ext.adb (Add): Do not output anything when Silent is True,
10226 whatever the verbosity. When Source is From_External_Attribute,
10227 set the corresponding environment variable if it is not already set.
10228 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
10230 * prj-proc.adb (Process_Expression_For_Associative_Array):
10231 For attribute External, call Prj.Ext.Add with Silent set to
10232 True for the child environment, to avoid useless output in non
10235 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10237 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
10238 range given by a subtype indication, and force evaluation of
10239 the bounds, as for a simple range.
10240 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
10241 of bounds of slice for various kinds of discrete ranges.
10242 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
10243 Evaluate_Slice_Bounds.
10245 2014-01-24 Bob Duff <duff@adacore.com>
10247 * s-taskin.ads (Activator): Make this Atomic, because
10248 Activation_Is_Complete reads it, and that can be called
10249 from any task. Previously, this component was only
10250 modified by the activator before activation, and by
10251 Self after activation.
10252 * a-taside.ads, a-taside.adb (Environment_Task,
10253 Activation_Is_Complete): Implement these missing functions.
10255 2014-01-24 Doug Rupp <rupp@adacore.com>
10257 * init.c: Add a handler section for Android.
10259 2014-01-24 Arnaud Charlet <charlet@adacore.com>
10261 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
10263 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10265 * sem_ch4.adb (Operator_Check): If one operand is a
10266 Raise_Expression, set its type to that of the other operand.
10267 * sem_res.adb (Resolve_Raise_Expression): new procedure.
10268 (Resolve_Actuals): For an actual that is a Raise_Expression,
10269 set the type to that of the formal.
10270 * sem_type.adb (Find_Unique_Type): If one of the operands is a
10271 Raise_Expression, return type of the other operand.
10273 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10275 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
10276 component of the record has a type with a default aspect, and
10277 the corresponding aggregate component is initiaized with a box,
10278 use the default value in the rewritten aggregate.
10280 2014-01-24 Tristan Gingold <gingold@adacore.com>
10282 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
10283 s-interr-sigaction.adb,
10284 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
10285 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
10286 to the call to Install_Restricted_Handlers.
10288 2014-01-24 Emmanuel Briot <briot@adacore.com>
10290 * prj-nmsc.adb (Check_File): Add protection when the source is
10291 not fully initialized.
10293 2014-01-24 Ed Schonberg <schonberg@adacore.com>
10295 * sem_util.adb (Is_Post_State): In a postcondition, a selected
10296 component that denotes an implicit dereference is a reference
10297 to the post state of the subprogram.
10299 2014-01-24 Robert Dewar <dewar@adacore.com>
10301 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
10302 for generated subprograms.
10303 (Analyze_Subprogram_Specification): Ditto.
10305 2014-01-24 Vincent Celier <celier@adacore.com>
10307 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
10308 attributes in package Builder of aggregate and aggregate library
10310 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
10311 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
10312 Remove parameters. Change error message from "... externally
10313 build library ..." to "... externally built project ...".
10314 (Process_Naming_Scheme.Check): Do not do any check in aggregate
10315 project, as attribute Library_Dir and Library_Name have already
10316 been detected as forbidden.
10318 2014-01-24 Vincent Celier <celier@adacore.com>
10320 * prj-env.adb (Find_Project): If cached project path is not in
10321 project directory, look in current directory first and use cached
10322 project path only if project is not found in project directory.
10324 2014-01-24 Robert Dewar <dewar@adacore.com>
10326 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
10328 2014-01-24 Vincent Celier <celier@adacore.com>
10330 * projects.texi: Document that aggregate projects are only
10331 supported by gprbuild, but not by gnatmake. Document that the
10332 only attribute Switches in package Binder of aggregate projects
10333 will be ignored if its index is not others. Document that
10334 attribute Global_Config_File is allowed in package Binder of
10335 aggregate projects.
10337 2014-01-24 Robert Dewar <dewar@adacore.com>
10339 * sem_prag.adb: Minor code reorganization.
10340 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
10342 2014-01-24 Pascal Obry <obry@adacore.com>
10344 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
10345 attribute definition.
10347 2014-01-24 Vincent Celier <celier@adacore.com>
10349 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
10350 in the Queue the same source (same path, same multi-source index)
10351 from the same project file, to avoid compiling several times
10354 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10356 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
10357 (Has_Gigi_Rep_Item): Likewise.
10358 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
10359 Has_Gigi_Rep_Item for objects.
10360 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
10361 (prepend_one_attribute): ...this.
10362 (prepend_one_attribute_pragma): New function extracted from...
10363 (prepend_attributes): ...here. Swap the parameters for consistency.
10364 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
10365 prepend_attributes.
10366 <object>: Deal with a pragma Linker_Section on a constant
10367 or variable. <E_Function>: Deal with a pragma Linker_Section
10369 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
10371 2014-01-24 Vincent Celier <celier@adacore.com>
10373 * opt.ads: Minor comment update.
10375 2014-01-24 Robert Dewar <dewar@adacore.com>
10377 * sem_prag.adb (Analyze_Input_Output): Add missing error check
10379 * sem_util.adb (Is_Refined_State): Add defense against junk
10382 2014-01-24 Pascal Obry <obry@adacore.com>
10384 * projects.texi: Removes Build_Slaves attribute documentation.
10386 2014-01-23 Robert Dewar <dewar@adacore.com>
10388 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
10391 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10393 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
10394 applies to expressions that come from source.
10395 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
10397 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
10398 rule regarding potentially unevaluated expressions, to prefix
10401 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10403 * exp_util.adb (Make_Invqriant_Call): If type of expression is
10404 a private extension, get invariant from base type.
10406 2014-01-23 Robert Dewar <dewar@adacore.com>
10408 * sem_util.adb, sem_attr.adb: Minor reformatting.
10410 2014-01-23 Robert Dewar <dewar@adacore.com>
10412 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
10413 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
10414 * sem.adb (Semantics): Remove save/restore of
10415 SPARK_Mode[_Pragma]. Not needed since already done in
10416 Save/Restore_Opt_Config_Switches.
10418 2014-01-23 Robert Dewar <dewar@adacore.com>
10420 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
10421 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
10422 Linker_Section enhancements.
10424 2014-01-23 Tristan Gingold <gingold@adacore.com>
10426 * gnat_rm.texi: Minor editing.
10428 2014-01-23 Robert Dewar <dewar@adacore.com>
10430 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
10431 with'ed internal units.
10432 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
10434 2014-01-23 Javier Miranda <miranda@adacore.com>
10436 * lib-xref.adb (Generate_Reference): As part of processing the
10437 "end-of-spec" reference generate an extra reference to the first
10438 private entity of the package.
10439 * xr_tabls.adb (Add_Reference): No action needed for the extra
10440 'E' reference associated; similar to the processing of the
10443 2014-01-23 Bob Duff <duff@adacore.com>
10445 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
10447 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10449 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
10450 predicate to implement rule given in 6.1.1 (20/3).
10451 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
10452 'Old in a postcondition, if it is potentially unevaluated and
10453 it is not an entity name.
10455 2014-01-23 Bob Duff <duff@adacore.com>
10457 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
10459 2014-01-23 Robert Dewar <dewar@adacore.com>
10461 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
10464 2014-01-23 Bob Duff <duff@adacore.com>
10466 * g-dynhta.ads: Minor comment fix.
10468 2014-01-23 Yannick Moy <moy@adacore.com>
10470 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
10471 from spec on body only when not already inherited on spec. Set
10472 SPARK_Mode from context on body without previous spec. *
10473 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
10474 library-level entities. Correct retrieval of entity from
10475 declaration, for cases where the declaration is not a unit.
10476 * sem_ch12.adb (Instantiate_Object): Avoid
10477 calling Is_Volatile_Object on an empty node.
10479 2014-01-23 Robert Dewar <dewar@adacore.com>
10481 * gnatlink.adb (Gnatlink): Check for suspicious executable file
10484 2014-01-23 Robert Dewar <dewar@adacore.com>
10486 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
10487 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
10488 style errors in instances.
10489 * g-dynhta.ads (Static_HTable): Comment updates.
10491 2014-01-23 Vincent Celier <celier@adacore.com>
10493 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
10494 to find a configuration project file when Config_File_Name is
10495 No_Configuration_File.
10496 * prj-conf.ads (No_Configuration_File): New constant String.
10497 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
10498 with Config_File_Name set to No_Configuration_File, so that
10499 no existing configuration project file will be used, and the
10500 configuration project will be only created in memory when
10501 Add_Default_GNAT_Naming_Scheme is called.
10502 * projects.texi: Minor reformatting.
10504 2014-01-23 Vincent Celier <celier@adacore.com>
10506 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
10507 a config project file if On_Load_Config is not null.
10508 * prj-pars.adb: Minor comment changes.
10510 2014-01-23 Ed Schonberg <schonberg@adacore.com>
10512 * lib-xref.adb (Output_References): Output progenitors of
10513 synchronized tagged types, for source navigation.
10515 2014-01-23 Robert Dewar <dewar@adacore.com>
10517 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
10518 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
10519 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
10521 2014-01-23 Emmanuel Briot <briot@adacore.com>
10523 * prj-conf.adb (Get_Or_Create_Configuration_File): call
10524 On_Load_Config later.
10526 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
10528 * sem_ch3.adb (Analyze_Declarations): Do not
10529 generate the spec of the late primitive in ASIS mode. Add two
10530 comments to explain the special cases when the expansion is
10533 2014-01-23 Robert Dewar <dewar@adacore.com>
10535 * sem_util.adb (Note_Possible_Modification): Fix error of
10536 misbehaving for implicit dereference cases in -gnatc mode.
10538 2014-01-23 Emmanuel Briot <briot@adacore.com>
10540 * prj-pars.adb: Minor reformatting.
10542 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10544 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
10545 body generated for an expression function within a protected body
10546 needs a set of renaming declarations if the expression function
10549 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10551 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
10552 list interface progenitor of a tagged concurrent type, for better
10555 2014-01-22 Robert Dewar <dewar@adacore.com>
10557 * lib.adb (In_Extended_Main_Code_Unit): Return False for
10559 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
10560 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
10561 treatment of Slocs No_Location and Standard_Location.
10562 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
10563 check for entity with Standard_Location Sloc, rather than relying
10564 on Lib routines to do that.
10565 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
10566 that a call cannot occur before a later occuring body within
10569 2014-01-22 Thomas Quinot <quinot@adacore.com>
10571 * rtsfind.adb: Update comment.
10573 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
10575 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
10576 * sem_ch3.adb (Analyze_Declarations): Add local variable
10577 Body_Seen. Generate the spec of a late controlled
10578 primitive body that is about to freeze its related type.
10579 (Handle_Late_Controlled_Primitive): New routine.
10581 2014-01-22 Robert Dewar <dewar@adacore.com>
10583 * a-stream.adb: Minor reformatting.
10585 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10587 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
10588 sub-procedure Declared_In_Actual to handle properly the visibility
10589 of actuals in actual packages, that are themselves actuals to a
10590 actual package of the current instance. This mimics properly the
10591 visibility of formals of formal packages declared with a box,
10592 within the corresponding generic unit.
10594 2014-01-22 Robert Dewar <dewar@adacore.com>
10596 * checks.adb: Do not assume that a volatile variable is valid.
10598 2014-01-22 Thomas Quinot <quinot@adacore.com>
10600 * g-catiio.ads (Image, Value): Clarify that these functions
10601 operate in the local time zone. Minor documentation update.
10603 2014-01-22 Thomas Quinot <quinot@adacore.com>
10605 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
10607 2014-01-22 Robert Dewar <dewar@adacore.com>
10609 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
10610 Moved to sem_aux.adb.
10612 2014-01-22 Robert Dewar <dewar@adacore.com>
10614 * vms_data.ads: Minor reformatting.
10616 2014-01-22 Robert Dewar <dewar@adacore.com>
10618 * debug.adb: Document messages affected by -gnatd.E including
10619 the new ones that relate to late definition of equality.
10620 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
10621 debug flag -gnatd.E is set, then generate warnings rather than
10623 (Check_Untagged_Equality): In earlier versions of Ada,
10624 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
10626 2014-01-22 Robert Dewar <dewar@adacore.com>
10628 * sem_prag.adb (Usage_Error): Output additional messages for
10629 unconstrained OUT parameters lacking an input dependency.
10631 2014-01-22 Robert Dewar <dewar@adacore.com>
10633 * sem_ch4.adb: Minor reformatting.
10635 2014-01-22 Robert Dewar <dewar@adacore.com>
10637 * restrict.ads: Minor reformatting.
10638 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
10639 forbids a call from within a subprogram to the same subprogram.
10641 2014-01-22 Thomas Quinot <quinot@adacore.com>
10643 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
10644 stream attributes for Stream_Element_Array.
10645 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
10646 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
10647 defined in the current scope.
10649 2014-01-22 Robert Dewar <dewar@adacore.com>
10651 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
10653 2014-01-22 Thomas Quinot <quinot@adacore.com>
10655 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
10657 2014-01-22 Thomas Quinot <quinot@adacore.com>
10659 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
10660 declaration initialized with a function call, whose type
10661 has variable size, need to remove side effects so that the
10662 initialization expression becomes a dereference of a temporary
10663 reference to the function result.
10665 2014-01-22 Yannick Moy <moy@adacore.com>
10667 * errout.adb (Initialize): Remove trick to add dummy entry
10669 * erroutc.adb (Set_Warnings_Mode_Off,
10670 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
10671 command line switch.
10672 * opt.ads (Warning_Mode): Document behavior
10673 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
10675 2014-01-22 Robert Dewar <dewar@adacore.com>
10677 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
10679 2014-01-22 Robert Dewar <dewar@adacore.com>
10681 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
10682 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
10683 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
10684 case Storage_Size): call Check_Pool_Size_Clash.
10686 2014-01-22 Robert Dewar <dewar@adacore.com>
10688 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
10689 sem_eval.ads: Minor reformatting.
10691 2014-01-22 Thomas Quinot <quinot@adacore.com>
10693 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
10694 Any_Composite to prevent cascaded errors.
10696 2014-01-22 Yannick Moy <moy@adacore.com>
10698 * errout.adb (Initialize): Do not insert special entry in Warnings
10699 table in GNATprove_Mode.
10700 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
10702 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
10705 2014-01-22 Robert Dewar <dewar@adacore.com>
10707 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
10710 2014-01-22 Robert Dewar <dewar@adacore.com>
10712 * snames.ads-tmpl: Update header.
10714 2014-01-22 Thomas Quinot <quinot@adacore.com>
10716 * exp_util.adb (Insert_Actions): When inserting actions on a
10717 short circuit operator that has already been analyzed, do not park
10718 actions in node; instead introduce an N_Expression_With_Actions
10719 and insert actions immediately.
10720 Add guard for unexpected case of climbing up through statement
10721 in Actions list of an N_Expression_With_Actions.
10722 * sem_elab.adb (Insert_Elab_Check): Remove complex
10723 specialized circuitry for the case where the context is already
10724 analyzed, as it is not needed and introduces irregularities in
10725 finalization. Instead rely on the above change to Insert_Actions
10726 to ensure that late insertion on short circuit operators works
10729 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10731 * sem_ch4.adb (Operator_Check): Improve error message when an
10732 operand of concatenation is an access type.
10734 2014-01-22 Thomas Quinot <quinot@adacore.com>
10736 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
10739 2014-01-22 Ed Schonberg <schonberg@adacore.com>
10741 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
10742 of an expanded name in a proper body, whose prefix is a package
10743 in the context of the proper body, when there is a homonym of
10744 the package declared in the parent unit.
10746 2014-01-22 Robert Dewar <dewar@adacore.com>
10748 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
10749 msg if errors found.
10750 (Check_One_Unit): Same change.
10752 2014-01-22 Robert Dewar <dewar@adacore.com>
10754 * ug_words: Add missing/wrong entries for VMS warning switches.
10755 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
10757 2014-01-22 Jerome Guitton <guitton@adacore.com>
10759 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
10762 2014-01-22 Robert Dewar <dewar@adacore.com>
10764 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
10766 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
10768 * gcc-interface/Makefile.in: Minor fixes.
10770 2014-01-21 Robert Dewar <dewar@adacore.com>
10772 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
10773 * par-ch5.adb (P_Condition): New version with expression prescanned.
10774 * par.adb (P_Condition): New version with expression prescanned.
10776 2014-01-21 Robert Dewar <dewar@adacore.com>
10778 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
10779 if Address is not a private type.
10780 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
10781 Ignore pragma if System.Address is not a private type.
10783 2014-01-21 Arnaud Charlet <charlet@adacore.com>
10785 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
10786 uninitialized value.
10788 2014-01-21 Thomas Quinot <quinot@adacore.com>
10790 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
10792 2014-01-21 Ed Schonberg <schonberg@adacore.com>
10794 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
10795 the value of Assertions_Enabled flag when compiling an instance of
10796 an internal unit. This facilitates the use of pre/postconditions
10797 in generic internal units, such as the new elementary function
10800 2014-01-21 Robert Dewar <dewar@adacore.com>
10802 * exp_aggr.adb: Minor reformatting.
10803 * sem_attr.adb: Minor reformatting.
10804 * sem_res.adb: Minor comment addition.
10805 * einfo.adb: Minor comment updates.
10806 * freeze.adb: Minor reformatting and code reorganization.
10808 2014-01-21 Ed Schonberg <schonberg@adacore.com>
10810 * par-ch4.adb (P_If_Expression): Handle more gracefully an
10811 elsif clause that does not have an else part.
10813 2014-01-21 Robert Dewar <dewar@adacore.com>
10815 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
10816 * gcc-interface/Makefile.in: clean up target pairs.
10818 2014-01-21 Pascal Obry <obry@adacore.com>
10820 * projects.texi: Minor typo fix.
10822 2014-01-21 Thomas Quinot <quinot@adacore.com>
10824 * freeze.adb (Check_Component_Storage_Order): If a record type
10825 has an explicit Scalar_Storage_Order attribute definition clause,
10826 reject any component that itself is of a composite type and does
10829 2014-01-21 Ed Schonberg <schonberg@adacore.com>
10831 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
10832 can be used to generate proper cross-reference information for
10833 the parent units of proper bodies.
10835 2014-01-21 Thomas Quinot <quinot@adacore.com>
10837 * exp_pakd.adb (Expand_Packed_Element_Set,
10838 Expand_Packed_Element_Reference): No byte swapping required in
10839 the front-end for the case of a reverse storage order array,
10840 as this is now handled uniformly in the back-end. However we
10841 still need to swap back an extracted element if it is itself a
10842 nested composite with reverse storage order.
10844 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
10846 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
10847 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
10850 2014-01-21 Arnaud Charlet <charlet@adacore.com>
10852 * gnat_ugn.texi: Minor updates.
10854 2014-01-21 Thomas Quinot <quinot@adacore.com>
10856 * exp_pakd.adb: Update comment, minor reformatting.
10858 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
10860 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
10861 object check when SPARK_Mode is on.
10862 * sem_ch6.adb (Process_Formals): Trigger the volatile object
10863 check when SPARK_Mode is on.
10864 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
10865 check when SPARK_Mode is on.
10866 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
10867 corresponding pragma of aspect SPARK_Mode in the visible
10868 declarations of a package declaration.
10869 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
10870 check when SPARK_Mode is on.
10871 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
10872 check when SPARK_Mode is on.
10873 (Resolve_Entity_Name): Trigger
10874 the volatile object check when SPARK_Mode is on.
10876 2014-01-21 Robert Dewar <dewar@adacore.com>
10878 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
10879 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
10881 2014-01-21 Ed Schonberg <schonberg@adacore.com>
10883 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
10884 object is declared, it is rewritten as a renaming of an dynamic
10885 expression that wraps the initial value. The renaming declaration
10886 is first given an internal name, to prevent collisions with the
10887 entity already declared, and then the name is modified to reflect
10888 the original one. the modification of the name must preserve
10889 the source location of the original, to prevent spurious errors
10890 when compiling with style checks if the declaration involves
10891 more than one entity.
10893 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
10895 * aspects.adb Add entries for Async_Readers, Async_Writers,
10896 Effective_Reads and Effective_Writes in table Canonical_Aspect.
10897 * aspects.ads Add entries for Async_Readers, Async_Writers,
10898 Effective_Reads and Effective_Writes in tables Aspect_Id,
10899 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
10900 * atree.adb (Ekind_In): New version with 8 parameters.
10901 (Node34): New routine.
10902 (Set_Node34): New routine.
10903 * atree.ads (Ekind_In): New version with 8 parameters.
10904 (Node34): New routine.
10905 (Set_Node34): New routine.
10906 * einfo.adb Contract is now Node34.
10907 (Contract): Update the assertion and node usage.
10908 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
10909 Effective_Reads and Effective_Writes.
10910 (Set_Contract): Update the assertion and node usage.
10911 (Write_Field24_Name): Remove the output for a contract.
10912 (Write_Field34_Name): Add output for a contract.
10913 * einfo.ads Contract is now Node34. Update the comment on
10914 attribute usage and related node structures.
10915 (Get_Pragma): Update the comment on usage.
10916 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
10917 Effective_Reads and Effective_Writes do not require special
10918 processing by the parser.
10919 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
10920 (Analyze_Declarations): Analyze the contract of a variable at
10921 the end of the declarative region.
10922 (Analyze_Object_Declaration): Create a contract for a variable.
10923 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
10924 of classification pragmas.
10925 (Process_Formals): Detect an illegal
10926 use of a volatile object as a formal in a function.
10927 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
10928 a volatile object as an actual in generic instantiation.
10929 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
10930 Effective_Reads and Effective_Writes in table Sig_Flags.
10931 (Analyze_External_State_In_Decl_Part): New routine.
10932 (Analyze_Global_Item): Detect an illegal use of a volatile object
10933 as a global item of a function.
10934 (Analyze_Pragma): Reimplement
10935 pragma Abstract_State. Add support for pragmas Async_Readers,
10936 Async_Writers, Effective_Reads and Effective_Writes.
10937 (Check_External_Properties): New routine.
10938 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
10939 (Check_External_Properties): New routine.
10940 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
10941 volatile object as an actual in a call.
10942 (Resolve_Entity_Name):
10943 Add local variables Par, Prev and Usage_OK. Detect illegal
10944 contexts of volatile objects.
10945 * sem_util.adb (Add_Contract_Item): Add support for
10946 pragmas associated with the contract of a variable.
10947 (Async_Readers_Enabled): New routine.
10948 (Async_Writers_Enabled): New routine.
10949 (Effective_Reads_Enabled): New routine.
10950 (Effective_Writes_Enabled): New routine.
10951 (Has_Enabled_Property):
10953 (Is_Unchecked_Conversion_Instance): New routine.
10954 (Is_Volatile_Object): Add support for entities that may denote
10956 * sem_util.ads (Add_Contract_Item): Update the
10958 (Async_Readers_Enabled): New routine.
10959 (Async_Writers_Enabled): New routine.
10960 (Effective_Reads_Enabled): New routine.
10961 (Effective_Writes_Enabled): New routine.
10962 (Is_Unchecked_Conversion_Instance): New routine.
10963 * sinfo.ads Update the comment on the structure of N_Contract.
10964 * snames.ads-tmpl Add predefined names for Async_Readers,
10965 Async_Writers, Effective_Reads and Effective_Writes. Add
10966 pragma ids for Async_Readers, Async_Writers, Effective_Reads
10967 and Effective_Writes.
10969 2014-01-21 Robert Dewar <dewar@adacore.com>
10971 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
10972 * sem_eval.adb (Compile_Time_Known_Value): Remove special
10973 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
10974 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
10975 (Test_Foldable): Add CRT_Safe parameter
10976 * sem_eval.ads (Compile_Time_Known_Value): Remove special
10977 handling of CRT mode.
10978 (CRT_Safe_Compile_Time_Known_Value): New function.
10980 2014-01-21 Robert Dewar <dewar@adacore.com>
10982 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
10983 with pragma or aspect that applies to package spec or subprogram
10986 2014-01-21 Robert Dewar <dewar@adacore.com>
10988 * exp_aggr.adb: Minor reformatting.
10990 2014-01-21 Johannes Kanig <kanig@adacore.com>
10992 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
10994 2014-01-21 Bob Duff <duff@adacore.com>
10996 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
10998 2014-01-21 Steve Baird <baird@adacore.com>
11000 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
11002 2014-01-21 Vincent Celier <celier@adacore.com>
11004 * prj-part.adb (Parse_Single_Project): Accept to extend a project
11005 if it has only be imported by an project being extended. When a
11006 project that has only been imported by a project being extended
11007 is imported by another project that is not being extended,
11008 reset the previous indication, so that it will be an error if
11009 this project is extended later.
11010 * prj-tree.adb (Create_Project): Include component From_Extended
11011 in table Projects_HT
11012 * prj-tree.ads (Project_Name_And_Node): New Boolean component
11015 2014-01-21 Robert Dewar <dewar@adacore.com>
11017 * atree.ads, atree.adb: Add Node33 and Set_Node33.
11018 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
11019 New field (SPARK_Pragma_Inherited): New flag
11020 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
11022 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
11023 * opt.ads (SPARK_Mode_Pragma): New global variable.
11024 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
11025 * sem_ch3.adb: Use new SPARK_Mode data structures.
11026 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
11027 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
11028 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
11029 (Pop_Scope): Restore SPARK_Mode_Pragma.
11030 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
11031 new data structures.
11033 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11035 * back_end.adb: Undo previous change, not needed. Minor reformatting.
11037 2014-01-21 Thomas Quinot <quinot@adacore.com>
11039 * exp_ch5.adb: Fix comment.
11040 * switch-c.adb: Minor comment update.
11041 * exp_ch3.adb: Minor reformatting.
11043 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11045 * back_end.adb (Scan_Compiler_Arguments): Do not store object
11046 filename in gnatprove mode.
11048 2014-01-21 Thomas Quinot <quinot@adacore.com>
11050 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
11051 suppresses usage of primitive _assign for tagged types).
11052 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
11053 No_Ctrl_Actions for a tagged type that does not require
11054 finalization, as we want to disable usage of _assign (which
11055 may cause undesirable discriminant checks on an uninitialized,
11058 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11060 * sem_prag.adb: Reject invariant'class on completion.
11062 2014-01-21 Javier Miranda <miranda@adacore.com>
11064 * exp_ch3.adb (Build_Init_Procedure): For
11065 derivations of interfaces, do not move the the initialization
11066 of the _parent field since such assignment is not generated.
11068 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11070 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
11071 with the operator it renames if we are within an expression of
11072 a pre/postcondition, because the expression will be reanalyzed
11073 at a later point, and the analysis of the renaming may affect
11074 the visibility of the operator when in an instance.
11076 2014-01-21 Robert Dewar <dewar@adacore.com>
11078 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
11079 Add this flag to type conversion nodes and assignment nodes.
11080 * treepr.adb: Deal properly with Flag 1,2,3.
11081 * treeprs.adt: Minor comment update.
11083 2014-01-21 Robert Dewar <dewar@adacore.com>
11085 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
11087 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
11088 parameter, completely rewrite spec.
11090 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11092 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
11093 instance that is inlined, it may have been rewritten as a wrapper
11094 package. In that case the unit that must be made visible is the
11095 related instance of the package.
11097 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11099 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
11100 previous change in codepeer mode.
11102 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11104 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
11105 call to Abort_Undefer, as expected by the runtime.
11106 * s-tasren.adb (Local_Complete_Rendezvous): Replace
11107 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
11108 deferred at this point. Update comments.
11110 2014-01-21 Thomas Quinot <quinot@adacore.com>
11112 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
11114 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11116 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
11119 2014-01-21 Robert Dewar <dewar@adacore.com>
11121 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
11123 2014-01-21 Thomas Quinot <quinot@adacore.com>
11125 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
11126 this is value is used in Node_Id arithmetic operations.
11127 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
11128 instead of hard-coded unrolled code.
11130 2014-01-21 Yannick Moy <moy@adacore.com>
11132 * gnat1drv.adb: Minor code cleanup, removing useless code.
11134 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11136 * opt.ads (SPARK_Switches_File_Name): New.
11137 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
11138 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
11139 * gnat_ugn.texi: Document -gnates.
11141 2014-01-21 Yannick Moy <moy@adacore.com>
11143 * errout.adb (Special_Msg_Delete): Update comment. Remove
11144 special case for GNATprove which should not ignore mismatch
11145 in sizes for representation clauses.
11146 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
11147 which should not ignore pragma Pack.
11149 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11151 * sem_ch4.adb: Code clean up.
11153 2014-01-21 Steve Baird <baird@adacore.com>
11155 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
11157 2014-01-21 Robert Dewar <dewar@adacore.com>
11159 * gcc-interface/gigi.h: Get Flags array address.
11160 * gcc-interface/trans.c: Acquire Flags array address.
11161 * atree.adb: Add support for Flags array and Flag0,1,2,3.
11162 * atree.ads: Add support for Flags array and Flag0,1,2,3.
11163 * atree.h: Add support for Flags array and Flag0,1,2,3.
11164 * back_end.adb: Pass Flags array address to gigi.
11166 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11168 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
11169 reference to generated body so that legality checks on stream
11170 attributes are properly applied. If type is tagged and already
11171 frozen, insert generated body at the point of the renaming
11174 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11176 * sem_ch12.adb: Code clean up.
11177 * sem_ch8.adb: Minor reformatting
11179 2014-01-20 Robert Dewar <dewar@adacore.com>
11181 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
11182 converting warnings on inevitable exceptions to errors.
11183 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
11184 converting warnings on inevitable exceptions to errors.
11185 * opt.adb (SPARK_Mode_Config): Handled like other config flags
11186 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
11187 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
11188 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
11189 New flag (Config_Switches_Type): Add SPARK_Mode field
11190 * sem.adb: Minor code reorganization (remove unnecessary with)
11191 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
11192 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
11193 converting warnings on inevitable exceptions to errors.
11194 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
11195 converting warnings on inevitable exceptions to errors.
11196 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
11197 converting warnings on inevitable exceptions to errors.
11198 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
11199 converting warnings on inevitable exceptions to errors.
11200 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
11201 from spec if needed
11202 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
11203 from spec if needed
11204 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
11206 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
11207 converting warnings on inevitable exceptions to errors.
11208 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
11209 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
11210 of Get_SPARK_Mode_Id
11211 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
11212 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
11213 converting warnings on inevitable exceptions to errors.
11214 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
11215 converting warnings on inevitable exceptions to errors.
11216 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
11219 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11221 * sem_ch13.adb: Add semantic information to rewritten type
11224 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11226 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
11227 are of a type with unknown discriminants, convert both to the
11228 underlying view of the type, so that the proper constraint check
11229 can be applied to the right-hand side.
11231 2014-01-20 Robert Dewar <dewar@adacore.com>
11233 * atree.adb (Copy_Node): Fix failure to copy last component
11234 (Exchange_Entities): Fix failure to exchange last entity
11236 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11238 * sem_ch12.adb: Code clean up.
11240 2014-01-20 Robert Dewar <dewar@adacore.com>
11242 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
11244 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11246 * sem_ch4.adb (Analyze_Quantified_Expression): If after
11247 pre-analysis the loop parameter specification has been
11248 rewritten as a iterator specification, propagate the change to
11249 the quantified expression, for ASIS navigtion needs.
11251 2014-01-20 Vincent Celier <celier@adacore.com>
11253 * par-ch10.adb: Minor error message change: escape [ and ].
11255 2014-01-20 Robert Dewar <dewar@adacore.com>
11257 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
11258 * errout.adb: Implement [ and ] insertion characters.
11259 * errout.ads: Document new [ and ] insertion characters.
11260 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
11261 addition of ??? comment.
11262 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
11263 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
11264 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
11265 Make warnings on exceptions into errors in GNATprove mode.
11266 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
11269 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11271 * sem_ch13.adb: Code clean up.
11273 2014-01-20 Robert Dewar <dewar@adacore.com>
11275 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
11277 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
11278 error in GNATprove mode.
11280 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11282 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
11283 reference 'Old takes no parameters, and thus can appear as a
11286 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11288 * exp_aggr.adb: Fix minor typos.
11290 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11292 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
11293 instance the attribute is legal, and its value is determined
11294 statically if the type has no discriminants. This choice is
11295 more useful than rechecking the legality rule in the instance,
11296 is consistent with older usage, and is also consistent with all
11299 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11301 * sem_cat.adb (Validate_Static_Object_Name): Change error into
11302 warning in Relaxed_Semantic_Mode.
11304 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11306 * sem_attr.adb: Code and comments cleanup.
11308 2014-01-20 Yannick Moy <moy@adacore.com>
11310 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
11311 * errout.adb (Compilation_Errors): Remove special handling in
11313 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
11314 removed debug flags.
11315 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
11316 Global, Initial_Condition, Initializes and Refined_State pragmas and
11318 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
11319 SPARK_Strict_Mode): Remove global flags.
11320 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
11321 always performed now, on packages declaring a null state.
11322 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
11323 at providing pedantic mode for bounds of integer types.
11324 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
11325 "some" quantified expression now issued under control of -gnatw.t,
11326 like the other warning on unused bound variable.
11327 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
11329 (Analyze_Pragma): Remove tests for SPARK 2014
11330 pragmas, not officially allowed by GNAT.
11332 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11334 * sem_prag.adb (Analyze_Pragma): Ensure that
11335 the sole argument of pragmas Abstract_State, Contract_Cases,
11336 Depends, Global and Initializes in in aggregate form.
11337 (Analyze_Refined_Pragma): Ensure that the sole argument of
11338 pragmas Refined_Depends, Refined_Global and Refined_State is in
11340 (Ensure_Aggregate_Form): New routine.
11342 2014-01-20 Doug Rupp <rupp@adacore.com>
11344 * sem_attr.adb (Analyze_Attribute): case
11345 Attribute_Constrained => treat all prefixes as legal for Declib
11348 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11350 * sem_prag.adb (Check_Mode): Reimplement the routine.
11351 (Find_Mode): New routine.
11353 2014-01-20 Robert Dewar <dewar@adacore.com>
11355 * sem_ch4.adb (Operator_Check): Handle additional
11356 Allow_Integer_Address cases.
11358 2014-01-20 Robert Dewar <dewar@adacore.com>
11360 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
11361 allowed if address is non-private, no longer true.
11362 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11363 Remove check for address being private, causes difficulty when
11364 pragma used in gnat.adc file and is not needed, since we guard
11365 this in Address_Integer_Convert_OK.
11366 * exp_ch7.adb: Minor reformatting.
11367 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
11369 2014-01-20 Robert Dewar <dewar@adacore.com>
11371 * checks.adb (Apply_Range_Check): Remove gnatprove special
11372 casing of exponentiation.
11373 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
11374 operand for integer case to check range against Natural.
11376 2014-01-20 Robert Dewar <dewar@adacore.com>
11378 * s-tataat.adb: Minor reformatting.
11380 2014-01-20 Robert Dewar <dewar@adacore.com>
11382 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
11383 entities, and also fix documentation to remove mention of visible
11384 integer type, since this is not what the implementation does.
11385 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
11386 entities, and also fix documentation to remove mention of visible
11387 integer type, since this is not what the implementation does.
11388 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
11390 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
11391 case for parameter type check.
11392 * sem_res.adb (Resolve): Use new function
11393 Address_Integer_Convert_OK.
11394 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
11395 reformatting throughout.
11396 * sem_util.adb (Address_Integer_Convert_OK): New function.
11397 * sem_util.ads: Minor reformatting (put specs in alpha order)
11398 (Address_Integer_Convert_OK): New function.
11400 2014-01-20 Thomas Quinot <quinot@adacore.com>
11402 * exp_ch7.adb (Wrap_Transient_Expression):
11403 Insertion extra conditional expression only if
11404 Opt.Suppress_Control_Flow_Optimizations is set.
11406 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11408 * s-tataat.adb (Initialize_Attributes): Abort might already be
11409 deferred in Create_Task.
11411 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11413 * checks.adb (Apply_Scalar_Range_Check): Flag
11414 the exponent as requiring a range check when the expression is
11417 2014-01-20 Fedor Rybin <frybin@adacore.com>
11419 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
11421 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11423 * sem_util.adb (Default_Initialization): New routine.
11424 * sem_util.ads: Add new type Default_Initialization_Kind.
11425 (Default_Initialization): New routine.
11427 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11429 * sem_prag.adb (Check_Mode): Correct all error
11430 message logic dealing with in/in out parameters that may appear
11431 as inputs or have a self reference.
11433 2014-01-20 Robert Dewar <dewar@adacore.com>
11435 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
11436 * sem_res.adb (Resolve): Fix error causing infinite loop for
11437 integer used as address. Allow addresses as integers.
11439 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11441 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
11443 2014-01-20 Bob Duff <duff@adacore.com>
11445 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
11446 error when "use all" is not followed by "type".
11448 2014-01-20 Bob Duff <duff@adacore.com>
11450 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
11453 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11455 * checks.adb (Apply_Address_Clause_Check): If there is an
11456 alignment check on the expression in an address clause, and there
11457 is no local exception propagation, add an additional explanatory
11458 message to clarify the cause of previous warning.
11460 2014-01-20 Robert Dewar <dewar@adacore.com>
11462 * exp_ch7.adb: Minor reformatting.
11463 * opt.ads: Minor comment updates.
11464 * sem.adb: Minor name change Is_Main_Unit =>
11465 Is_Main_Unit_Or_Main_Unit_Spec.
11466 * sem_ch6.adb: Minor reformatting and code reorganization.
11468 2014-01-20 Bob Duff <duff@adacore.com>
11470 * gnat_ugn.texi: Update gnatpp switches.
11472 2014-01-20 Thomas Quinot <quinot@adacore.com>
11474 * exp_ch9.adb: Minor comment edit.
11476 2014-01-20 Robert Dewar <dewar@adacore.com>
11478 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
11479 only if System.Address is a private type.
11480 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
11481 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11482 Allowed only if type System.Address is private, since otherwise
11484 * sem_res.adb: Fix failure to properly Analyze unchecked
11485 conversions that were introduced by Allow_Integer_Address.
11486 * switch-c.adb: Remove -gnates switch.
11487 * usage.adb: Remove -gnates switch.
11488 * gnat_ugn.texi: Remove documentation of -gnates flag.
11490 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11492 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
11493 resolve expression to perform proper name capture.
11495 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11497 * sem.adb (Semantics): When saving/restoring configuration
11498 switches, the spec of a pre- defined unit that is the main unit
11499 must be treated as a predefined unit as well.
11501 2014-01-20 Thomas Quinot <quinot@adacore.com>
11503 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
11504 expression, insert an extra conditional expression when saving
11505 the value of the expression, for the benefit of control flow
11506 graph based coverage analysis.
11507 * exp_ch3.adb: Minor reformatting.
11509 2014-01-20 Robert Dewar <dewar@adacore.com>
11511 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
11512 * gnat_rm.texi: Document pragma Allow_Integer_Address.
11513 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
11514 * opt.ads: New flag Allow_Integer_Address.
11515 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
11516 * sem_ch5.adb: Minor reformatting.
11517 * sem_prag.adb: Implement pragma Allow_Integer_Address.
11518 * sem_res.adb (Resolve): Allow integer address value if
11520 * sem_util.adb: Minor reformatting.
11521 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
11522 * switch-c.adb: Recognize flag -gnates.
11523 * usage.adb: Document flag -gnates.
11525 2014-01-20 Thomas Quinot <quinot@adacore.com>
11527 * s-tadeca.adb: Fix minor typos in comment.
11529 2014-01-20 Pascal Obry <obry@adacore.com>
11531 * s-win32.ads (FreeLibrary): New import.
11533 2014-01-20 Robert Dewar <dewar@adacore.com>
11535 * sem_res.adb, sem_cat.adb: Minor reformatting.
11536 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
11537 assigning to OUT parameters for the current subprogram scope.
11538 * exp_ch4.adb: Minor reformatting.
11540 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11542 * exp_ch4.adb (Process_Transient_Object,
11543 Find_Enclosing_Contexts): If the top-level if-expression that
11544 generated the transient object is an actual in a call, the proper
11545 Hook_Context is a construct enclosing the call.
11546 * einfo.ads: Indicate that Related_Expression is used to link a
11547 loop variable to the container expression over which the loop
11549 (Analyze_Iterator_Specification): Set the Related_Expression of
11550 the loop variable in a container element iterator.
11551 (Note_Possible_Modification): If the variable is the loop
11552 variable in a container element iterator, indicate that the
11553 enclosing container is also modified.
11555 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11557 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
11559 2014-01-20 Robert Dewar <dewar@adacore.com>
11561 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
11562 Minor reformatting and code clean up.
11564 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11566 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
11567 of objects of private type if Relaxed_RM_Semantics.
11569 2014-01-20 Claire Dross <dross@adacore.com>
11571 * a-cofove.ads (Vector): Capacity discriminant
11572 should be in range of the index.
11574 2014-01-20 Thomas Quinot <quinot@adacore.com>
11576 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
11577 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
11578 possible difference between epoch of Ada.Calendar clock and Ada
11579 real-time/tasking clock.
11580 * s-taprop-posix.adb: Minor comment fix.
11582 2014-01-20 Doug Rupp <rupp@adacore.com>
11584 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
11586 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11588 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
11589 checks on the prefix of attribute 'Old.
11590 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
11591 generation of validity checks on a range that belongs to the
11592 iteration scheme of a quantified expression.
11593 * sem_ch5.adb (One_Bound): Suppress the generation of validity
11594 checks on a bound that belongs to the iteration scheme of a
11595 quantified expression, generate the check in all other cases.
11597 2014-01-20 Bob Duff <duff@adacore.com>
11599 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
11601 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11603 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
11604 interpretations that do not come from other predefined units,
11605 to prevent spurious ambiguities in the presence of user-defined
11606 operators in the context of (an instance of) a predefined unit.
11608 2014-01-20 Robert Dewar <dewar@adacore.com>
11610 * gnat_rm.texi: Document that Loop_Variant is included in
11611 Statement_Assertions.
11612 * sem_prag.adb (Check_Kind): Add Loop_Variant to
11613 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
11614 to Statement_Assertions.
11616 2014-01-20 Doug Rupp <rupp@adacore.com>
11618 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
11619 for errno ENOENT from RTP on NFS mounted file system.
11621 2014-01-20 Ed Schonberg <schonberg@adacore.com>
11623 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
11624 examine code that does not come from source. The check does not
11625 apply to code generated for constraint checks, and such code may
11626 generate spurious error messages when compiled with expansion
11627 disabled (as in a generic unit) because side effects may not
11629 2) Make error messages more explicit: indicate the component
11630 of the construct whose value is indeterminate because of a
11631 call to a function with in-out parameter in another component,
11632 when there is no mandated order of execution between the two
11633 components (actuals, aggregate components, alternatives).
11635 2014-01-20 Robert Dewar <dewar@adacore.com>
11637 * gnat_rm.texi: Minor cleanup.
11639 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11641 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
11642 can now apply to a refined postcondition.
11643 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
11644 variable Result_Seen. Add variables Case_Prag, Post_Prag,
11645 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
11646 whether postconditions and/or constract-cases mention attribute
11647 'Result and introduce a post-state when applied to functions.
11648 (Check_Result_And_Post_State): Removed.
11649 * sem_prag.adb (Analyze_Pragma): Add local variable
11650 Result_Seen. Verify that the expression of pragma Refined_Post
11651 mentions attribute 'Result and introduces a post-state.
11652 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
11654 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11656 * exp_ch7.adb (Is_Subprogram_Call): New routine.
11657 (Process_Transient_Objects): Make variable Must_Hook global with
11658 respect to all locally declared subprograms. Search the context
11659 for at least one subprogram call.
11660 (Requires_Hooking): Removed.
11662 2014-01-20 Claire Dross <dross@adacore.com>
11664 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
11665 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
11666 External_Axiomatization);
11668 2014-01-20 Robert Dewar <dewar@adacore.com>
11670 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
11671 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
11672 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
11673 Allow Loop_Entry to be used in these pragmas if they appear in
11674 an appropriate context.
11675 (Placement_Error): Specialize error
11676 message for pragma Assert[_And_Cut] or pragma Assume containing
11677 Loop_Entry attribute.
11678 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
11679 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
11680 and code clean ups.
11682 2014-01-20 Robert Dewar <dewar@adacore.com>
11684 * gnat1drv.adb: Minor comment update.
11686 2014-01-20 Tristan Gingold <gingold@adacore.com>
11688 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
11689 variables, comment out unused code.
11690 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
11691 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
11692 * s-excmac-arm.ads: New file.
11694 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11696 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
11697 Drange and Index_Typ. Remove the circuitry which creates a
11698 range check to compare the index type of the array against the
11700 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
11701 the circuitry which creates a range check to handle a
11702 discrete_range denoted by a subtype indication.
11704 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
11706 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
11707 nodes to get the original sloc range.
11709 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11711 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
11712 entity of a [library level] package.
11714 2014-01-20 Tristan Gingold <gingold@adacore.com>
11716 * raise-gcc.c (exception_class_eq): New function.
11717 (is_handled_by): Use it to compare exception classes.
11718 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
11719 be called to return URC_CONTINUE_UNWIND.
11720 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
11721 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
11723 2014-01-20 Robert Dewar <dewar@adacore.com>
11725 * opt.ads: Minor comment update.
11727 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11729 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
11730 constants to the "Local variables" area. Add new constant D. Add
11731 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
11732 to Pref_Typ and update all occurrences. Add circuitry to extract
11733 the discrete_range and the index type and build a range check.
11735 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11737 * gnat1drv.adb (Adjust_Global_Switches): Enable
11738 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
11741 2014-01-20 Thomas Quinot <quinot@adacore.com>
11743 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
11745 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11747 * sem_ch13.adb (Analyze_Aspect_Specifications):
11748 When aspect SPARK_Mode appears on a package body, insert the
11749 generated pragma at the top of the body declarations.
11751 2014-01-20 Robert Dewar <dewar@adacore.com>
11753 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
11754 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
11755 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
11756 sem_ch8.adb, exp_dist.adb: Minor reformatting.
11758 2014-01-20 Yannick Moy <moy@adacore.com>
11760 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
11763 2014-01-20 Pascal Obry <obry@adacore.com>
11765 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
11767 * g-arrspl.adb: Adapt all routine to this new implementation.
11768 (Set): Copy the Slice_Set definition before reusing it.
11770 2014-01-20 Arnaud Charlet <charlet@adacore.com>
11772 * sem_prag.adb (Process_Import_Or_Interface): In
11773 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
11774 (Analyze_Pragma): Ditto for pragma Export.
11775 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
11778 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11780 * einfo.ads: E_Abstract_State is now part of the entities that
11781 can be overloaded. Update type Overloadable_Kind to reflect the
11782 inclusion of abstract states.
11783 * sem_ch6.adb (New_Overloaded_Entity): A function can now
11784 overload an abstract state.
11785 * sem_prag.adb (Analyze_Constituent): Handle the overloading
11786 of states by functions. Use Entity_Of to obtain the entity of
11787 a constituent. (Analyze_Global_Item): Handle the overloading of
11788 states by functions.
11789 (Analyze_Initialization_Item): Handle the
11790 overloading of states by functions. Use Entity_Of to obtain the
11792 (Analyze_Input_Item): Handle the overloading
11793 of states by functions. Use Entity_Of to obtain the entity of an item.
11794 (Analyze_Input_Output): Handle the overloading of states by functions.
11795 (Analyze_Refinement_Clause): Handle the overloading
11796 of states by functions. Use Entity_Of to obtain the entity of an item.
11797 (Appears_In): Use Entity_Of to obtain the entity of an element.
11798 (Check_Usage): Use Entity_Of to obtain the entity of
11799 an item. Add a guard to prevent a crash due to a previous error.
11800 (Resolve_State): New routine.
11802 2014-01-20 Yannick Moy <moy@adacore.com>
11804 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
11805 opt.ads: Minor comments updates.
11807 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
11809 * einfo.adb (Non_Limited_View): Applies to abstract states.
11810 (Set_From_Limited_With): Applies to abstract states.
11811 (Set_Non_Limited_View): Applies to abstract states.
11812 (Write_Field17): Output the non-limited view of an abstract state.
11813 * einfo.ads: Update the comment on usage and occurrences in
11814 nodes for attributes From_Limited_With and Non_Limited_View.
11815 * sem_aux.adb (Available_View): This routine can now handle
11817 * sem_aux.ads (Available_View): This routine can now handle
11818 abstract states. Update the comment on usage.
11819 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
11820 of states and variables.
11821 (In_Pragmas_Depends_Or_Global): New routine.
11822 * sem_ch10.adb (Build_Limited_Views): Implement
11823 abstract (limited) views of variables and states.
11824 (Build_Shadow_Entity): This routine is now a procedure. Add
11825 formal parameter Shadow. Update the comment on usage. Add
11826 context-specific decoration for states and variables.
11827 (Decorate_State): New routine. (Decorate_Variable): New routine.
11828 (Find_And_Process_States): New routine.
11829 (Process_Declarations): Renamed to Process_Declarations_And_States.
11830 (Process_Declarations_And_States): Add formal parameters
11831 Pack and Create_Abstract_Views. Update the comment on usage.
11832 (Process_States): New routine.
11833 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
11834 views of states and variables. Match the abstract view of a state
11835 against its corresponding non-abstract view.
11836 (Is_Matching_Input):
11837 Handle abstract views of states and variables. Match the abstract
11838 view of a state against its corresponding non-abstract view.
11839 (Process_Global_Item): Handle abstract views of states and
11842 2014-01-20 Bob Duff <duff@adacore.com>
11844 * sem_ch10.adb (Expand_With_Clause): Don't
11845 recurse on the prefix if the current with-ed name refers to a
11846 package that renames its own parent, eg "package P.Q renames P;".
11848 2014-01-20 Yannick Moy <moy@adacore.com>
11850 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
11851 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
11852 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
11853 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
11854 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
11857 2014-01-20 Yannick Moy <moy@adacore.com>
11859 * sinfo.ads Update documentation of GNATprove mode.
11861 2014-01-20 Yannick Moy <moy@adacore.com>
11863 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
11864 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
11865 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
11866 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
11868 * sem_ch13.adb: Remove blank.
11869 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
11870 subprograms by alias for renamings, not for inherited primitive
11872 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
11874 (Remove_Side_Effects): Apply the removal in
11875 GNATprove mode, for the full analysis of expressions.
11876 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
11878 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
11879 save/restore actions for Expander_Active flag in GNATprove mode,
11880 similar to what is done in ASIS mode.
11881 * frontend.adb (Frontend): Generic bodies are instantiated in
11883 * gnat1drv.adb (Adjust_Global_Switches): Set operating
11884 mode to Check_Semantics in GNATprove mode, although a light
11885 expansion is still performed.
11886 (Gnat1drv): Set Back_End_Mode to
11887 Declarations_Only in GNATprove mode, and later on special case
11888 the GNATprove mode to continue analysis anyway.
11889 * lib-writ.adb (Write_ALI): Always generate ALI files in
11891 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
11893 (SPARK_Mode): Renamed as GNATprove_Mode.
11894 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
11895 tree in GNATprove_Mode.
11896 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
11897 body in GNATprove mode.
11898 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
11900 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
11901 Make sure side effects are removed in GNATprove mode.
11903 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11905 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
11906 for aliased objects with an unconstrained nominal subtype.
11907 * gcc-interface/trans.c (Call_to_gnu): Likewise.
11908 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
11909 <case N_Op_Minus>: Remove useless code.
11910 (Exception_Handler_to_gnu_zcx): Minor tweaks.
11912 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11914 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
11915 Tidy up. For a subtype with discriminants and variant part, if a
11916 variant is statically selected and the fields all have a constant
11917 position, put them in order of increasing position. Likewise if
11918 no variant part but representation clause is present.
11919 * gcc-interface/utils.c (make_packable_type): Robustify.
11920 (maybe_pad_type): Use local variable and tidy up condition. If no
11921 alignment is specified, use the original one.
11922 (create_type_stub_decl): Minor tweak.
11923 (convert) <case VECTOR_CST>: Fix typo.
11924 <case CONSTRUCTOR>: Deal with padding types around the same type.
11925 Do not punt on missing fields.
11926 (unchecked_convert): Call finish_record_type to lay out the special
11927 record types made for conversions from/to problematic integer types.
11928 Bump the alignment of CONSTRUCTORs before converting them to a more
11931 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
11933 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
11934 obsolete code for type_annotate_only mode, simplify code and slightly
11935 improve wording of comments.
11937 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
11940 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
11941 as intermediate type.
11942 (UI_To_gnu): Likewise.
11944 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
11946 * gnatvsn.ads (Current_Year): Bump to 2014.
11948 2014-01-02 Tobias Burnus <burnus@net-b.de>
11950 * gnat_ugn.texi: Bump @copying's copyright year.
11952 Copyright (C) 2014 Free Software Foundation, Inc.
11954 Copying and distribution of this file, with or without modification,
11955 are permitted in any medium without royalty provided the copyright
11956 notice and this notice are preserved.