1 2014-08-04 Robert Dewar <dewar@adacore.com>
3 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
4 of constructed 'Valid attribute in -gnatVa mode does not appear
6 * sem_attr.adb (Analyze_Access_Attribute): Don't set
7 Never_Set_In_Source for non-source reference.
8 * sem_util.adb: Minor reformatting.
9 * sem_warn.adb (Check_References): Don't check Address_Taken,
10 not necessary, see comment.
12 2014-08-04 Robert Dewar <dewar@adacore.com>
14 * sem_util.adb, sem_case.adb: Minor reformatting.
16 2014-08-04 Ed Schonberg <schonberg@adacore.com>
18 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
19 limited view, replace with non-limited view, which is available
20 at the point of an entry call.
22 2014-08-04 Ed Schonberg <schonberg@adacore.com>
24 * exp_ch6.adb (Expand_Call): If the call is to a function in
25 a run-time unit that is marked Inline_Always, we must suppress
26 debugging information on it, so that the code that is eventually
27 inlined will not affect debugging of the user program.
29 2014-08-04 Robert Dewar <dewar@adacore.com>
31 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
34 2014-08-04 Ed Schonberg <schonberg@adacore.com>
36 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
37 an aspect Import that specifies a False value.
39 2014-08-04 Robert Dewar <dewar@adacore.com>
41 * gnat_rm.texi: Add section on aspect Invariant'Class.
43 2014-08-04 Ed Schonberg <schonberg@adacore.com>
45 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
46 for better control of cascaded error messages when some choice
47 in a case statement over a predicated type violates the given
50 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
52 * sem_ch3.adb (Build_Derived_Type): Modify the
53 inheritance of the rep chain to ensure that a non-tagged type's
54 items are not clobbered during the inheritance.
56 2014-08-04 Robert Dewar <dewar@adacore.com>
58 * sem_ch3.adb, einfo.ads: Minor reformatting.
60 2014-08-04 Yannick Moy <moy@adacore.com>
62 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
63 detection of subprograms that cannot be inlined in GNATprove mode.
65 2014-08-04 Ed Schonberg <schonberg@adacore.com>
67 * einfo.adb: Add guard to Returns_Limited_View.
69 2014-08-04 Jose Ruiz <ruiz@adacore.com>
71 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
72 the secondary stack to respect the alignments of the returned objects.
74 2014-08-04 Ed Schonberg <schonberg@adacore.com>
76 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
77 on function entities whose return type is a limited view.
78 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
79 where to place the freeze node for a function that returns the
80 limited view of a type, when the function is called and frozen
83 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
85 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
88 2014-08-04 Robert Dewar <dewar@adacore.com>
90 * gnat_ugn.texi: Clarify documentation on assertions.
92 2014-08-04 Ed Schonberg <schonberg@adacore.com>
94 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
95 if a component association has a box initialization when the
96 component type has no default initialization, either through an
97 initial value, an aspect, or an implicit initialization procedure.
99 2014-08-04 Ed Schonberg <schonberg@adacore.com>
101 * freeze.adb: Code clean up.
103 2014-08-04 Thomas Quinot <quinot@adacore.com>
105 * sem_ch5.adb: Minor reformatting.
107 2014-08-04 Ed Schonberg <schonberg@adacore.com>
109 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
110 a function can return a limited view of a type declared
111 elsewhere. In that case the function cannot be frozen at the end
112 of its enclosing package. If its first use is in a different unit,
113 it cannot be frozen there, but if the call is legal the full view
114 of the return type is available and the subprogram can now be
115 frozen. However the freeze node cannot be inserted at the point
116 of call, but rather must go in the package holding the function,
117 so that the backend can process it in the proper context.
119 2014-08-04 Robert Dewar <dewar@adacore.com>
121 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
123 2014-08-04 Arnaud Charlet <charlet@adacore.com>
125 * sem_ch4.adb (Operator_Check): Refine previous change.
127 2014-08-04 Arnaud Charlet <charlet@adacore.com>
129 * sem_scil.ads: Improve comments.
130 * sem_ch4.adb (Analyze_Equality_Op): Add support for
131 Allow_Integer_Address (equality between Address and Integer).
133 2014-08-04 Yannick Moy <moy@adacore.com>
135 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
136 notation on untagged objects.
137 * sem.ads: Update comment.
138 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
139 not inline subprograms declared in the visible part of a package.
141 2014-08-04 Ed Schonberg <schonberg@adacore.com>
143 * exp_ch5.adb: minor reformatting.
144 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
147 2014-08-04 Thomas Quinot <quinot@adacore.com>
149 * s-fatgen.adb: Minor reformatting.
151 2014-08-04 Arnaud Charlet <charlet@adacore.com>
153 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
156 2014-08-04 Ed Schonberg <schonberg@adacore.com>
158 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
159 the loop parameter for element iterators over containers and
160 arrays, so that improper uses of it are detected in the loop
161 body when expansion is disabled.
162 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
163 generated cursor is that of the analyzed loop parameter.
165 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
167 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
168 Flag_Decl. Do not analyze the declaration of the flag as it is
169 not part of the tree yet, instead add it to the freeze actions
172 2014-08-04 Robert Dewar <dewar@adacore.com>
174 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
175 case of OUT and IN OUT parameter correctly (where Source_Typ is
176 set), we were missing one case where a check must be applied.
178 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
180 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
181 the generated code. Instead of hiding the renaming and using the
182 wrapper as the proper association, have the subprogram renaming
184 (Build_Spec): The entity of the wrapper is
185 now derived from the entity of the related primitive.
187 2014-08-04 Emmanuel Briot <briot@adacore.com>
189 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
190 using non-capturing groups.
192 2014-08-04 Ed Schonberg <schonberg@adacore.com>
194 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
195 related pragmas before copying the original body, to prevent
196 spurious errors when the pragmas apply to formals that will not
197 appear in the inlined body.
199 2014-08-04 Robert Dewar <dewar@adacore.com>
201 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
202 exp_ch3.adb: Minor reformatting.
204 2014-08-04 Robert Dewar <dewar@adacore.com>
206 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
208 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
210 * aspects.adb Add an entry in table Canonical_Aspect for
211 Default_Initial_Condition.
212 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
213 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
214 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
215 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
216 Has_Inherited_Default_Init_Cond.
217 (Default_Init_Cond_Procedure): New routine.
218 (Has_Default_Init_Cond): New routine.
219 (Has_Inherited_Default_Init_Cond): New routine.
220 (Is_Default_Init_Cond_Procedure): New routine.
221 (Set_Default_Init_Cond_Procedure): New routine.
222 (Set_Has_Default_Init_Cond): New routine.
223 (Set_Has_Inherited_Default_Init_Cond): New routine.
224 (Set_Is_Default_Init_Cond_Procedure): New routine.
225 (Write_Entity_Flags): Output all the new flags.
226 * einfo.ads New attributes Default_Init_Cond_Procedure,
227 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
228 along with usage in nodes.
229 (Default_Init_Cond_Procedure): New routine.
230 (Has_Default_Init_Cond): New routine and pragma Inline.
231 (Has_Inherited_Default_Init_Cond): New routine and
233 (Is_Default_Init_Cond_Procedure): New routine and
235 (Set_Default_Init_Cond_Procedure): New routine.
236 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
237 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
238 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
239 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
240 Next_N. Generate a call to the default initial condition procedure
241 if the object's type is subject to the pragma. (Freeze_Type):
242 Generate the body of the default initial condition procedure or
243 inherit the spec from a parent type.
244 * exp_ch7.adb Add with and use clause for Exp_Prag.
245 (Expand_Pragma_Initial_Condition): Removed.
246 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
248 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
249 not need special treatment by the parser.
250 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
251 attributes related to pragma Default_Initial_Condition to the
253 (Process_Full_View): Propagate the attributes
254 related to pragma Default_Initial_Condition to the full view.
255 * sem_ch7.adb (Analyze_Package_Specification): Build the
256 declaration of the default initial condition procedure for all
257 types that qualify or inherit the one from the parent type.
258 * sem_ch13.adb (Analyze_Aspect_Specifications):
259 Add processing for aspect Default_Initial_Condition.
260 (Check_Aspect_At_Freeze_Point): Aspect
261 Default_Initial_Condition does not require delayed analysis.
262 (Replace_Type_References_Generic): Moved to spec.
263 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
264 * sem_prag.adb Add an entry in table Sif_Glags for
265 Default_Initial_Condition.
266 (Analyze_Pragma): Pragma
267 Default_Initial_Condition is now part of assertion
268 policy. Add processing for pragma Default_Initial_Condition.
269 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
270 now recognized as a proper assertion policy.
271 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
273 (Build_Default_Init_Cond_Procedure_Body): New routine.
274 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
275 (Inherit_Default_Init_Cond_Procedure): New routine.
276 * snames.ads-tmpl Add new predefined name and pragma id for
277 Default_Initial_Condition.
279 2014-08-04 Vincent Celier <celier@adacore.com>
281 * prj-dect.adb (Parse_Case_Construction): It is no longer
282 an error if the variable for a case construction is not
283 typed, only if the variable value is not a single string. Call
284 Parse_Choice_List and End_Case_Construction with the new parameter
285 to indicate that the variable is typed.
286 * prj-strt.adb (End_Case_Construction): Only check the labels
287 if the variable is typed. If the variable is not typed,
288 issue a warning when there is no "when others" allternative.
289 (Parse_Choice_List): Manage the labels only if the variable
291 * prj-strt.ads (End_Case_Construction): New Boolean parameter
293 (Parse_Choice_List): Ditto.
295 2014-08-04 Ed Schonberg <schonberg@adacore.com>
297 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
299 2014-08-04 Vincent Celier <celier@adacore.com>
301 * projects.texi: Update documentation of case constructions with
302 variables that are not typed.
304 2014-08-04 Ed Schonberg <schonberg@adacore.com>
306 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
307 an Eliminated pragma, indicate that the wrapper is also to be
308 eliminated, to prevent spurious errors when using gnatelim on
309 programs that include box-initialization of equality operators
310 (consequence of AI05-071)..
312 2014-08-04 Robert Dewar <dewar@adacore.com>
314 * checks.adb (Activate_Overflow_Check): Handle floating-point
316 * checks.ads (Activate_Overflow_Check): Clarify handling of
317 floating-point cases.
318 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
319 flag if we generate an explicit overflow check (for
320 Check_Float_Overflow mode).
322 2014-08-04 Robert Dewar <dewar@adacore.com>
324 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
325 prj-attr.adb, prj-attr.ads: Minor reformatting.
327 2014-08-04 Yannick Moy <moy@adacore.com>
329 * expander.adb (Expand): Always perform special
330 expansion in GNATprove mode, even when doing pre-analysis.
332 2014-08-04 Thomas Quinot <quinot@adacore.com>
334 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
335 not default. Also list bit order if SSO is specified. Do not
336 assume that bit order is always equal to scalar storage order.
338 2014-08-04 Thomas Quinot <quinot@adacore.com>
340 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
341 order to reverse SSO for a type that has an explicit native
344 2014-08-04 Doug Rupp <rupp@adacore.com>
346 * cal.c: Macro check for VxWorks7.
347 * init.c (getpid): Likewise.
348 * mkdir.c (__gnat_mkdir): Likewise.
349 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
351 2014-08-04 Gary Dismukes <dismukes@adacore.com>
353 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
354 of an invariant check in the case where No_Initialization is set,
355 since the object is uninitialized.
357 2014-08-04 Thomas Quinot <quinot@adacore.com>
359 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
360 name, in addition to a pragma name.
361 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
362 Is_Pragma_Name): Adjust accordingly.
363 * sem_attr.ads, sem_attr.adb, exp_attr.adb
364 (Attribute_Default_Scalar_Storage_Order): Add handling of new
366 * gnat_rm.texi: Document the above.
368 2014-08-04 Arnaud Charlet <charlet@adacore.com>
370 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
371 mode for now, to revert to previous behavior.
372 * checks.adb: Revert previous change, no longer needed.
374 2014-08-04 Robert Dewar <dewar@adacore.com>
376 * gnat1drv.adb (Adjust_Global_Switches): Don't set
377 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
378 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
379 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
380 * switch-c.adb (Scan_Front_End_Switches): Don't set
381 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
383 2014-08-04 Vincent Celier <celier@adacore.com>
385 * prj-attr.adb: Add new default indications for
386 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
387 (Attribute_Default_Of): New function (Initialize): Set the
388 default for those attributes that have one specified.
389 * prj-attr.ads (Attribute_Data): New component Default.
390 * prj-proc.adb (Expression): Take into account the new defaults
391 for attributes Object_Dir, Exec_Dir and Source_Dirs.
392 * prj-strt.adb (Attribute_Reference): Set the default for
394 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
395 (Set_Default_Of): New procedure.
396 * prj.adb (The_Dot_String): New global Name_Id variable,
397 initialized in procedure Initialize.
398 (Dot_String): New function
399 (Initialize): Initialize The_Dot_String.
400 (Reset): Create the string list Shared.Dot_String_List.
401 * prj.ads (Attribute_Default_Value): New enumeration type.
402 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
403 (Dot_String): New function.
404 (Shared_Project_Tree_Data): New string list component Dot_String_List.
405 * projects.texi: Document new defaults for attribute Object_Dir,
406 Exec_Dir and Source_Dirs.
408 2014-08-04 Robert Dewar <dewar@adacore.com>
410 * sem_ch12.adb: Minor reformatting.
412 2014-08-04 Arnaud Charlet <charlet@adacore.com>
414 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
415 expansion in CodePeer_Mode.
416 (Selected_Range_Checks): Add handling of overflow checks in
419 2014-08-04 Robert Dewar <dewar@adacore.com>
421 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
422 Remove special test for Float'First, no longer required.
423 (Expand_N_Attribute_Reference, case Succ): Remove special test
424 for Float'First, no longer required.
425 * s-fatgen.adb (Pred): return infinity unchanged.
428 2014-08-04 Claire Dross <dross@adacore.com>
430 * sem_ch12.adb (Analyze_Associations): Defaults should only be
431 used if there is no explicit match.
432 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
433 Also check for pragma external_axiomatization on generic units.
435 2014-08-04 Robert Dewar <dewar@adacore.com>
437 * checks.adb (Activate_Overflow_Check): Remove
438 Check_Float_Overflow processing.
439 (Apply_Scalar_Range_Check): Ditto.
440 (Generate_Range_Check): Ditto.
441 * exp_ch4.adb (Expand_N_Op_Add): Add call to
442 Check_Float_Op_Overflow.
443 (Expand_N_Op_Divide): ditto.
444 (Expand_N_Op_Multiply): ditto.
445 (Expand_N_Op_Subtract): ditto.
446 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
447 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
448 Do_Range_Check is set for floating-point case in -gnatc or
450 (Analyze_Attribute, case Succ): Make sure
451 Do_Range_Check is set for floating-point case in -gnatc or
453 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
454 flag is set for real to integer conversion in GNATprove or
457 2014-08-04 Gary Dismukes <dismukes@adacore.com>
459 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
460 the expression of an Import or Export aspect as type Boolean
461 and require it to be static. Add ??? comment. Also, set the
462 Is_Exported flag when appropriate.
464 2014-08-04 Robert Dewar <dewar@adacore.com>
466 * exp_ch4.adb: Minor reformatting.
467 * exp_attr.adb: Minor reformatting.
469 2014-08-04 Thomas Quinot <quinot@adacore.com>
471 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
472 (Unaligned_Valid): Remove now unused subprogram.
473 * exp_attr.adb (Expand_N_Attribute_Reference, case
474 Attribute_Valid): If the prefix is in reverse SSO or potentially
475 unaligned, copy it using a byte copy operation to a temporary
477 * einfo.adb: Minor comment fix.
479 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
481 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
483 2014-08-04 Robert Dewar <dewar@adacore.com>
485 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
486 * s-fatgen.adb (Pred): Handle Float'First.
487 (Succ): Handle Float'Last.
489 2014-08-04 Ed Schonberg <schonberg@adacore.com>
491 * sem_util.adb (Is_Potentially_Unevaluated): If the original
492 node of a parent node in the tree is a short-circuit operation,
493 the node is potentially unevaluated.
495 2014-08-04 Robert Dewar <dewar@adacore.com>
497 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
498 conversion from a real type to an integer type.
500 2014-08-04 Yannick Moy <moy@adacore.com>
502 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
503 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
504 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
505 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
506 SPARK_05 instead of SPARK.
508 2014-08-04 Robert Dewar <dewar@adacore.com>
510 * sem.ads: Minor reformatting.
511 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
513 (Analyze_Aspect_Specifications, case Convention): Put External_Name
514 before Link_Name when constructing pragma.
516 2014-08-04 Yannick Moy <moy@adacore.com>
518 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
519 to True during analysis of a default component expression.
520 (Semantics): Save and restore In_Default_Expr around analysis.
521 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
522 Call new wrapper Preanalyze_Default_Expression.
523 (Preanalyze_Default_Expression): New wrapper on
524 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
525 * sem_res.adb (Resolve_Call): Mark calls inside default
526 expressions as not inlined in GNATprove mode.
528 2014-08-04 Robert Dewar <dewar@adacore.com>
530 * exp_ch4.adb: Minor reformatting.
532 2014-08-04 Olivier Hainque <hainque@adacore.com>
534 * link.c: remove const on __gnat_objlist_file_supported for AIX
536 2014-08-04 Robert Dewar <dewar@adacore.com>
538 * sem_util.ads: Minor addition of comment.
540 2014-08-04 Vincent Celier <celier@adacore.com>
542 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
543 all projects, including aggregate and aggregate library projects.
545 2014-08-04 Yannick Moy <moy@adacore.com>
547 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
549 2014-08-04 Robert Dewar <dewar@adacore.com>
551 * sem_eval.adb (Test_In_Range): Always in range for
552 Is_Known_Valid target type, where input type has smaller or
553 equal size and does not have biased rep.
555 2014-08-04 Ed Schonberg <schonberg@adacore.com>
557 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
558 a static attribute, and the Static flag must not be set on it
559 during resolution. It may be constant-folded during expansion,
560 but if expansion is disabled it is not a static expression.
562 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
564 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
565 referenced once resolution has taken place.
567 2014-08-04 Gary Dismukes <dismukes@adacore.com>
569 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
570 compare access levels in the case where the target type is the
571 anonymous type of an access discriminant, since the level of
572 such types is defined based on context. Add comment.
574 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
576 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
577 cases related to equality. Remove the special processing
578 for dispatching abstract subprograms as it is not needed.
579 (Interpretation_Error): Add a specialized error message for
580 predefined operators.
581 (Is_Intrinsic_Equality): New routine.
582 (Is_Suitable_Candidate): New routine.
584 2014-08-04 Gary Dismukes <dismukes@adacore.com>
586 * checks.adb: Minor comment reformatting.
588 2014-08-04 Ed Schonberg <schonberg@adacore.com>
590 * restrict.adb (Check_Restriction): For checked max_parameter
591 restrictions reset Violated flag, so that subsequent violations
592 are properly detected.
594 2014-08-04 Robert Dewar <dewar@adacore.com>
596 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
598 (Process_Discriminants): Fix bad test of GNATprove mode
600 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
602 * sem_ch12.adb (Instantiate_Formal_Subprogram):
603 Move variable to their own section. Propagate the source
604 location of a formal parameter to the corresponding formal of
605 the subprogram renaming declaration. Code reformatting.
607 2014-08-04 Arnaud Charlet <charlet@adacore.com>
609 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
611 2014-08-04 Ed Schonberg <schonberg@adacore.com>
613 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
614 if error already detected. We may reach this point in spite of
615 previous errors when compiling with -gnatq, to force all possible
616 errors (this is the usual ACATS mode).
618 2014-08-04 Gary Dismukes <dismukes@adacore.com>
620 * checks.adb (Generate_Range_Check): For the case of converting
621 a base type with a larger range to a smaller target subtype, only
622 use unchecked conversions of bounds in the range check followed
623 by conversion in the case where both types are discrete. In other
624 cases, convert to the target base type and save in a temporary
625 followed by the range check.
626 (Convert_And_Check_Range): New procedure factoring code to save
627 conversion to a temporary followed by a range check (called two
628 places in Generate_Range_Check).
629 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
630 check-in, to generate range checks for conversions between
631 any floating-point types rather than limiting it to matching
634 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
636 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
638 2014-08-01 Ed Schonberg <schonberg@adacore.com>
640 * restrict.adb (Update_Restrictions): For restrictions with a
641 maximum parameter (e.g. number of protected entries in Ravenscar)
642 do not compute the maximum of the violation over several objects,
643 because the restriction is per-object.
644 (Check_Restriction): After possible message, reset the value
645 of of a checked max_parameter restriction to zero, to prevent
647 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
648 (sub)type to determine whether derived type should be on the
649 list of private dependents of a type whose full view may become
650 visible subsequently.
652 2014-08-01 Olivier Hainque <hainque@adacore.com>
654 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
655 $(CXX) instead of ../../xg++ to feed CXX.
656 (CXX_LFLAGS): Remove. Now unused as the proper flags
657 are expected to be included in the CXX variable.
659 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
661 * gcc-interface/decl.c (elaborate_expression_1): Return the new
662 variable when debug info is needed and the expression is not
663 constant. Tag as external only new variables that are global.
664 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
665 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
666 attributes for IN array parameters when their actual subtype
668 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
669 * gcc-interface/gigi.h (process_deferred_decl_context): New.
670 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
671 emit debug info for ignored global declarations.
672 (struct deferred_decl_context_node,
673 add_deferred_decl_context, add_deferred_type_context,
674 compute_deferred_decl_context, defer_or_set_type_context,
675 deferred_decl_context_queue, get_debug_scope,
676 get_global_context, process_deferred_decl_context): New.
677 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
678 computation machinery to rely on the GNAT Scope attribute.
680 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
682 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
684 2014-08-01 Robert Dewar <dewar@adacore.com>
686 * sem_ch8.adb, opt.ads Minor comment updates.
688 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
690 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
691 from the side effects removal machinery.
692 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
693 Renaming_Req. Update the nested call to Remove_Side_Effects.
694 (Duplicate_Subexpr_No_Checks): Add formal parameter
695 Renaming_Req. Update the nested call to Remove_Side_Effects.
696 (Duplicate_Subexpr_Move_Checks): Add formal parameter
697 Renaming_Req. Update the nested call to Remove_Side_Effects.
698 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
699 an object renaming declaration when the caller requests it.
700 * exp_util.ads (Duplicate_Subexpr): Add formal
701 parameter Renaming_Req. Update comment on usage.
702 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
703 (Duplicate_Subexpr_Move_Checks): Add formal parameter
706 2014-08-01 Bob Duff <duff@adacore.com>
708 * gnat_ugn.texi: Minor updates.
710 2014-08-01 Robert Dewar <dewar@adacore.com>
712 * atree.adb: Minor reformatting.
714 2014-08-01 Ed Schonberg <schonberg@adacore.com>
716 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
717 private extension, get stored constraint, if any, from full view.
719 2014-08-01 Robert Dewar <dewar@adacore.com>
721 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
722 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
723 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
724 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
725 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
726 Remove code for checking with's, now in sem_ch10.adb, set
727 Opt.No_Elab_Code_All_Pragma.
729 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
731 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
732 access types as well and adjust the subtype mark if there are
735 2014-08-01 Robert Dewar <dewar@adacore.com>
737 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
739 2014-08-01 Robert Dewar <dewar@adacore.com>
741 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
743 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
745 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
746 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
747 of the actuals in the case of untagged record types too.
748 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
749 full derivation of a derived private type, extracted from...
750 (Copy_And_Build): In the case of record types and most
751 enumeration types, copy the original declaration. Build the
752 full derivation according to the approach extracted from...
753 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
754 to create the full derivation in all existing cases and also
755 create it in the no-discriminants/discriminants case instead of
756 deriving directly from the full view.
757 (Is_Visible_Component): Remove obsolete code.
758 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
760 2014-08-01 Arnaud Charlet <charlet@adacore.com>
762 * fe.h (GNAT_Mode): New.
763 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
764 reverse SSO in GNAT mode.
766 2014-08-01 Thomas Quinot <quinot@adacore.com>
768 * freeze.adb: Minor reformatting.
770 2014-08-01 Thomas Quinot <quinot@adacore.com>
772 * exp_ch3.adb (Default_Initialize_Object): Do not generate
773 default initialization for an imported object.
775 2014-08-01 Olivier Hainque <hainque@adacore.com>
777 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
778 to the expected FARPROC type instead of void *.
779 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
780 other datastructures.
781 (__gnat_file_time_name_attr): Adjust accordingly.
782 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
784 (__gnat_check_OWNER_ACL): Declare AccessMode
785 parameter as ACCESS_MODE instead of DWORD, in line with callers
787 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
788 unused on win32. Correct cast of "args" on call to spawnvp.
789 (add_handle): Cast realloc calls into their destination types.
790 (win32_wait): Remove declaration and initialization of unused variable.
791 (__gnat_locate_exec_on_path): Cast alloca calls
792 into their destination types.
793 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
794 their destination types.
796 2014-08-01 Gary Dismukes <dismukes@adacore.com>
798 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
799 range checks for conversions between floating-point subtypes
800 when the target and source types are the same.
802 2014-08-01 Robert Dewar <dewar@adacore.com>
804 * exp_aggr.adb: Minor reformatting.
806 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
808 * sem_ch13.adb (Check_Indexing_Functions): Initialize
811 2014-08-01 Arnaud Charlet <charlet@adacore.com>
813 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
814 ALI file before we call the backend (so that gnat2why can append
817 2014-08-01 Thomas Quinot <quinot@adacore.com>
819 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
820 Expand_Packed_Element_Reference): Pass additional Rev_SSO
821 parameter indicating whether the packed array type has reverse
822 scalar storage order to the s-pack* Set/Get routines.
823 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
824 indicating reverse scalar storage order.
826 2014-08-01 Robert Dewar <dewar@adacore.com>
828 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
829 for initial component value in -gnatc or GNATprove mode.
830 (Process_Discriminants): Same fix for default discriminant values.
831 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
834 2014-08-01 Robert Dewar <dewar@adacore.com>
836 * sinfo.ads: Minor comment clarification.
838 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
840 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
841 reformatting. Store the generated pragma Import in the related
842 subprogram as routine Wrap_Imported_Subprogram will need it later.
843 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
844 a private type with discriminants is considered to fall in the
845 category of unconstrained or tagged items.
847 2014-08-01 Arnaud charlet <charlet@adacore.com>
849 * s-os_lib.adb (Open_Append): New functions to open a file for
850 appending. This binds to the already existing (but not used)
852 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
853 to open a file for appending.
854 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
855 to open the ALI file for appending.
857 2014-08-01 Robert Dewar <dewar@adacore.com>
859 * sem_ch8.adb: Minor reformatting.
861 2014-08-01 Yannick Moy <moy@adacore.com>
863 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
864 pragmas from aspects, which need to be inserted in proper order.
866 2014-08-01 Ed Schonberg <schonberg@adacore.com>
868 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
869 Handle properly a type extension that constrains a discriminated
870 derived type that renames other discriminants of an ancestor.
872 2014-08-01 Thomas Quinot <quinot@adacore.com>
874 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
875 s-pack25.adb: Fix minor inconsistencies and typos.
877 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
879 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
880 globals and move certain variables to the "local
881 variable" section. Call Build_Class_Wide_Wrapper when
882 renaming a default actual subprogram with a class-wide actual.
883 (Build_Class_Wide_Wrapper): New routine.
884 (Check_Class_Wide_Actual): Removed.
885 (Find_Renamed_Entity): Code reformatting.
886 (Has_Class_Wide_Actual): Alphabetize. Change the
887 logic of the predicate as the renamed name may not necessarely
888 denote the correct subprogram.
890 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
892 * sem_ch7.adb: Fix minor oversight in condition.
894 2014-08-01 Bob Duff <duff@adacore.com>
896 * projects.texi: Minor documentation improvements.
898 2014-08-01 Robert Dewar <dewar@adacore.com>
900 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
901 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
902 * lib-load.adb: Initialize No_Elab_Code_All field.
903 * lib-writ.adb: Initialize No_Elab_Code_All.
904 * lib.ads, lib.adb: New field No_Elab_Code_All.
905 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
906 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
908 * sem_ch10.adb (Analyze_Context): Processing for
909 No_Elaboration_Code_All removed.
910 (Generate_Parent_References): Moved to Sem_Util.
911 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
912 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
914 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
915 * targparm.adb: Minor comment updates Add comments on ignoring
916 pragma No_Elaboration_Code_All.
918 2014-08-01 Nicolas Roche <roche@adacore.com>
920 * adaint.c (__gnat_set_close_on_exec): Ensure that
921 we can unset "close_on_exec" flag.
923 2014-08-01 Ed Schonberg <schonberg@adacore.com>
925 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
926 the parameter specs of the wrapper program for a primitive operation
927 of a synchronized type that implements an interface, copy the
928 null_exclusion indicator as well.
930 2014-08-01 Robert Dewar <dewar@adacore.com>
932 * sem_eval.ads: Minor reformatting.
934 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
936 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
937 to go down the chain of private derivations.
938 * freeze.adb (Freeze_Entity): Fix typo in comment.
940 2014-08-01 Ed Schonberg <schonberg@adacore.com>
942 * sem_ch3.adb (Access_Type_Declaration): If designated type is
943 a limited view, create a master entity (as is already done for
944 class-wide types) in case the full view designates a type that
946 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
947 and the designated type is a limited view, use the non-limited
950 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
952 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
953 (DECL_FUNCTION_STUB): Likewise.
954 (SET_DECL_FUNCTION_STUB): Likewise.
955 (DECL_PARM_ALT_TYPE): Likewise.
956 (SET_DECL_PARM_ALT_TYPE): Likewise.
957 (TYPE_VAX_FLOATING_POINT_P): Delete.
958 (TYPE_DIGITS_VALUE): Likewise.
959 (SET_TYPE_DIGITS_VALUE): Likewise.
960 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
961 (malloc32_decl): Delete.
962 (build_vms_descriptor): Likewise.
963 (build_vms_descriptor32): Likewise.
964 (fill_vms_descriptor): Likewise.
965 (convert_vms_descriptor): Likewise.
966 (TARGET_ABI_OPEN_VMS): Likewise.
967 (TARGET_MALLOC64): Likewise.
968 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
969 (gnat_to_gnu_entity): Call it to add the original type as a parallel
970 type to the implementation type of a packed array type.
971 <E_Procedure>: Remove now obsolete kludge.
972 <E_Exception>: Delete obsolete comment.
973 <object>: Small tweak.
974 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
975 for the descriptor passing mechanism.
976 (gnat_to_gnu_param): Likewise.
977 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
978 (gnat_print_type): Adjust.
979 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
980 (vms_builtin_establish_handler_decl): Delete.
981 (gnat_vms_condition_handler_decl): Likewise.
982 (establish_gnat_vms_condition_handler): Likewise.
983 (build_function_stub): Likewise.
984 (Subprogram_Body_to_gnu): Do not call above functions.
985 (Call_to_gnu): Remove support for the descriptor passing mechanism.
986 * gcc-interface/utils.c (make_descriptor_field): Delete.
987 (build_vms_descriptor32): Likewise.
988 (build_vms_descriptor): Likewise.
989 (fill_vms_descriptor): Likewise.
990 (convert_vms_descriptor64): Likewise.
991 (convert_vms_descriptor32): Likewise.
992 (convert_vms_descriptor): Likewise.
993 * gcc-interface/utils.c (unchecked_convert): Likewise.
994 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
996 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
998 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
999 type and get_unpadded_type for the longest FP type.
1000 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1001 (convert_with_check): Adjust formatting and remove FIXME.
1003 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1005 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1006 Do not convert the RM bounds to the base type.
1007 (E_Floating_Point_Subtype): Likewise.
1008 (E_Array_Subtype): Convert the bounds to the base type.
1009 * gcc-interface/trans.c (get_type_length): New function.
1010 (Attribute_to_gnu) <Range_Length>: Call it.
1012 (Loop_Statement_to_gnu): Convert the bounds to the base type.
1013 (gnat_to_gnu) <N_In>: Likewise.
1014 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1015 bounds to the base type.
1016 (create_range_type): Likewise.
1017 (convert): Convert the bounds to the base type for biased types.
1018 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1021 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1023 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1024 incorrect implicit type derivation.
1025 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1028 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1030 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1031 prefix of attribute Loop_Entry.
1032 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1033 Loop_Variant with respect to an enclosing loop (if any).
1034 (Contains_Loop_Entry): Update the parameter profile and all
1035 calls to this routine.
1036 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1037 for the corresponding body before determining the nature of the
1038 ultimate alias's declarative node.
1040 2014-08-01 Robert Dewar <dewar@adacore.com>
1042 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1044 2014-08-01 Robert Dewar <dewar@adacore.com>
1046 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1047 constraint error node since it is a list member.
1049 2014-08-01 Robert Dewar <dewar@adacore.com>
1051 * sem_warn.adb: Minor reformatting.
1053 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1055 * einfo.adb (Underlying_Type): Return the underlying full view
1056 of a private type if present.
1057 * freeze.adb (Freeze_Entity):
1058 Build a single freeze node for partial, full and underlying full
1060 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1061 missing guard before the access to the Underlying_Full_View.
1062 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1063 full view if present.
1064 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1066 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1068 * sem_res.adb (Resolve_Entry_Call): When an entry has
1069 preconditions, the entry call is wrapped in a procedure call
1070 that incorporates the precondition checks. To prevent a double
1071 expansion, with possible duplication of extra formals, that
1072 procedure call must only be pre-analyzed and resolved. Expansion
1073 takes place upon return to the caller Resolve_Call.
1075 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1077 * sem_res.adb (Resolve_Call): Do not perform
1078 GNATprove-specific inlining while within a generic.
1080 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1082 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1083 case expression with incompatible alternatives, when the first
1084 alternative is overloaded.
1086 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1088 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1089 to create the name of the parameterless call, rather than
1090 New_Copy, to preserve the tree structure when the name is a
1091 complex expression, e.g. a selected component that denotes a
1092 protected operation, whose prefix is itself a selected component.
1094 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1096 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1097 Unit_Declaration_Node to retrieve body when inlining, to handle
1098 properly subprogram child units.
1100 2014-08-01 Robert Dewar <dewar@adacore.com>
1102 * sem_attr.adb: Minor reformatting.
1104 2014-08-01 Vincent Celier <celier@adacore.com>
1106 * debug.adb: Minor documentation addition for -dn switch.
1108 2014-08-01 Robert Dewar <dewar@adacore.com>
1110 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1111 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1112 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1113 In several places, use the Is_OK version as suggested by the spec.
1115 2014-08-01 Vincent Celier <celier@adacore.com>
1117 * gnatcmd.adb: Revert last change which was not correct.
1119 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1121 * freeze.adb (Find_Constant): Ensure that the constant being
1122 inspected is still an object declaration (i.e. not a renaming).
1124 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1126 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1127 An attribute_reference to Loop_Entry denotes an iterator
1128 specification: its prefix is an object, as is the case for 'Old.
1129 b) If the domain of iteration is an expression whose type has
1130 the Iterable aspect defined, this is an iterator specification.
1132 2014-08-01 Robert Dewar <dewar@adacore.com>
1134 * gnatcmd.adb: Minor reformatting.
1136 2014-08-01 Robert Dewar <dewar@adacore.com>
1138 * atree.ads (Info_Messages): New counter.
1139 * err_vars.ads: Minor comment update.
1140 * errout.adb (Delete_Warning_And_Continuations): Deal
1141 with new Info_Messages counter.
1142 (Error_Msg_Internal): ditto.
1143 (Delete_Warning): ditto.
1144 (Initialize): ditto.
1145 (Write_Error_Summary): ditto.
1146 (Output_Messages): ditto.
1147 (To_Be_Removed): ditto.
1148 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1149 (Compilation_Errors): ditto.
1150 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1152 (Initialize): ditto.
1153 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1154 * gnat_ugn.texi: Document that -gnatwe does not affect info
1157 2014-08-01 Robert Dewar <dewar@adacore.com>
1159 * debug.adb: Document debug switch -gnatd.Z.
1160 * sem.adb (Semantics): Force expansion on in no or configurable
1163 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1165 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
1166 unchecked conversion denotes an iterator specification. Such a
1167 conversion will be inserted in the context of an inlined call
1168 when needed, and its argument is always an object.
1170 2014-08-01 Robert Dewar <dewar@adacore.com>
1172 * make.adb, makeutl.ads: Minor reformatting.
1173 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
1176 2014-08-01 Tristan Gingold <gingold@adacore.com>
1178 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
1180 2014-08-01 Javier Miranda <miranda@adacore.com>
1182 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
1184 * debug.adb: Updating documentation.
1185 * exp_ch6.adb (Expand_Call): Remove assertion.
1187 2014-08-01 Robert Dewar <dewar@adacore.com>
1189 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
1190 sem_res.adb: Minor reformatting.
1192 2014-08-01 Vincent Celier <celier@adacore.com>
1194 * make.adb (Initialize): Set Keep_Temporary_Files to True when
1196 * makeusg.adb: Add line for new switch --keep-temp-files.
1197 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
1198 * opt.ads (Keep_Temporary_Files): Document that it is also used
1199 by gnatmake and gprbuild.
1200 * switch-m.adb: Recognize new switch --keep-temp-files.
1202 2014-08-01 Tristan Gingold <gingold@adacore.com>
1204 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
1205 * exp_ch9.adb (Make_Task_Create_Call): ... here.
1207 2014-08-01 Vincent Celier <celier@adacore.com>
1209 * gnat1drv.adb: Do not try to get the target parameters when
1210 invoked with -gnats.
1212 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1214 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
1215 declaration subject to No_Initialization.
1217 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1219 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
1220 is a subtype with dynamic predicates, or a non-static subtype
1222 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
1223 expression if subtype has a dynamic predicate.
1224 (Constrain_Index): Reject subtype indication if subtype mark
1226 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
1227 (Make_Index): If index is a subtype indication, itype inhereits
1228 predicate flags for subsequent testing.
1229 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
1230 procedure Check_Predicate_Use, to reject illegal uses of domains
1231 of iteration that have dynamic predicates.
1232 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
1233 indication to which a predicate applies.
1234 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
1235 prevent cascaded errors when subtype is invalid.
1237 2014-08-01 Robert Dewar <dewar@adacore.com>
1239 * sem_ch10.adb: Minor reformatting.
1241 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1243 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
1244 because either type may be a subtype of the other.
1246 2014-08-01 Vincent Celier <celier@adacore.com>
1248 * makeusg.adb: Add documentation for debug switch -dn.
1250 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1252 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
1253 expression with standard operator and type, for pretty-printing
1254 use, when in ASIS_Mode. When generating code dimensional analysis
1255 is not involved and dimension expressions are handled statically,
1256 and other operators are resolved in the usual way.
1258 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1260 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
1261 Parent_Subtype in ASIS mode, leads to several failures.
1262 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
1263 if the prefix is a type extension, check whether component is
1264 declared in the parent type, possibly in a parent unit. Needed
1265 in ASIS mode when Parent_Subtype is not set.
1267 2014-08-01 Robert Dewar <dewar@adacore.com>
1269 * sem_prag.adb: Minor reformatting.
1270 * s-regpat.adb: Minor reformatting.
1271 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
1272 Treat_As_Volatile on constants.
1274 2014-08-01 Tristan Gingold <gingold@adacore.com>
1276 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
1278 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1280 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
1281 warning on a with_clause created for the renaming of a parent
1282 unit in an explicit with_clause.
1284 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1286 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
1287 Set Is_Imported flag at once, to simplify subsequent legality
1288 checks. Reject the aspect on an object whose declaration has an
1289 explicit initial value.
1290 * sem_prag.adb (Process_Import_Or_Interface): Use original node
1291 to check legality of an initial value for an imported entity.
1292 Set Is_Imported flag in case of error to prevent cascaded errors.
1293 Do not set the Is_Imported flag if the pragma comes from an
1294 aspect, because it is already done when analyzing the aspect.
1296 2014-08-01 Emmanuel Briot <briot@adacore.com>
1298 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
1300 2014-08-01 Robert Dewar <dewar@adacore.com>
1302 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
1305 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1307 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
1308 checks when the related variable comes from source.
1309 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
1310 when the related actual parameter comes from source. Update comment.
1311 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
1312 type of an array of pointers when the designated type is
1313 class-wide and its root type is the record being currently frozen.
1315 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1317 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
1318 of renaming declaration created for domain of iteration.
1319 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
1320 for error messages on aggregates whose index subtypes have
1321 predicates. The new placement avoids posting messages on previous
1322 subtype declarations rather than on the aggregate itself.
1323 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
1324 Add_Dispatching_Operation, to handle properly the overriding of
1325 the predefined operations on controlled types, when the partial
1326 view of a type is not visibly controlled.
1328 2014-08-01 Ben Brosgol <brosgol@adacore.com>
1330 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
1333 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1335 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
1336 assertion check as the attribute is defined for all entities.
1337 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
1338 check as the attribute is defined for all entities.
1339 * einfo.ads Update the documentation of attribute
1340 Is_Hidden_Non_Overridden_Subprogram.
1341 * sem_ch7.adb (Install_Package_Entity): No need to check the
1342 entity kind of the Id.
1343 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
1344 usage. Ensure that the homographs are of the same entity kind
1345 and not fully conformant.
1346 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
1348 2014-08-01 Robert Dewar <dewar@adacore.com>
1350 * inline.adb: Minor code reorganization.
1351 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
1353 2014-08-01 Robert Dewar <dewar@adacore.com>
1355 * inline.adb, s-os_lib.ads: Minor reformatting.
1357 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1359 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
1360 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
1363 2014-08-01 Yannick Moy <moy@adacore.com>
1365 * inline.adb (Cannot_Inline): Issue info message instead of
1366 warning for subprograms not inlined in GNATprove mode.
1367 * sem_res.adb (Resolve_Call): Take body into account for deciding
1368 whether subprogram can be inlined in GNATprove mode or not.
1370 2014-08-01 Claire Dross <dross@adacore.com>
1372 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
1373 of Get_First_Parent_With_External_Axiomatization_For_Entity for
1375 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
1376 for parameters of packages with external axiomatization.
1378 2014-08-01 Robert Dewar <dewar@adacore.com>
1380 * sem_res.adb: Minor comment addition.
1382 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1384 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
1385 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
1387 * s-os_lib.ads: Minor reformatting.
1389 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1391 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
1392 completely previous code since only GCC back-ends are prepared
1393 to handle e.g. 'Machine attribute.
1394 * targparm.adb, targparm.ads: Remove remaining refs and
1395 handling of OpenVMS_On_Target, VAX_Float_On_Target and
1396 RTX_RTSS_Kernel_Module_On_Target.
1397 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
1400 2014-08-01 Robert Dewar <dewar@adacore.com>
1402 * exp_dist.adb, exp_attr.adb: Minor reformatting.
1403 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
1404 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
1405 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
1406 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
1407 improper use of shall.
1409 2014-08-01 Robert Dewar <dewar@adacore.com>
1411 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
1412 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
1413 exp_ch3.adb: Minor reformatting & code reorganization.
1415 2014-08-01 Robert Dewar <dewar@adacore.com>
1417 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
1418 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
1419 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
1420 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
1421 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
1423 * gcc-interface/decl.c, gcc-interface/Makefile.in,
1424 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
1426 2014-08-01 Pascal Obry <obry@adacore.com>
1428 * s-os_lib.ads: Rename File_Size to Large_File_Size.
1430 2014-08-01 Robert Dewar <dewar@adacore.com>
1432 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
1433 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
1434 a-numaux-libc-x86.ads: Fix bad package header comments.
1435 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
1436 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
1437 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
1438 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
1439 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
1440 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
1441 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
1442 s-os_lib.adb: Remove VMS-specific code.
1444 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1446 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
1447 previous state in CodePeer_Mode.
1449 2014-08-01 Robert Dewar <dewar@adacore.com>
1451 * hostparm.ads: Put back definition of OpenVMS as False to aid
1452 the transition process.
1453 * sem_ch7.adb: Minor reformatting.
1454 * prj-env.adb: Minor code fix.
1455 * gnat_rm.texi: Complete previous change.
1456 * sem_ch3.adb: Minor reformatting.
1457 * sem_ch6.adb: Minor reformatting.
1458 * sem_elab.adb: Minor reformatting.
1459 * exp_strm.adb: Complete previous change.
1461 2014-08-01 Vincent Celier <celier@adacore.com>
1463 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
1464 warning when a constant is unreferenced and its type has pragma
1465 Unreferenced_Objects.
1467 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
1469 * einfo.adb: Flag2 is now known as
1470 Is_Hidden_Non_Overridden_Subprogram.
1471 (Is_Hidden_Non_Overridden_Subprogram): New routine.
1472 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
1473 (Write_Entity_Fields): Output Flag2.
1474 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
1475 along with occurrences in entities.
1476 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
1477 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
1479 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
1480 declared non-overriden homographs into visibility.
1481 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
1482 implicitly declared non-overriden homographs.
1483 (Hide_Non_Overridden_Subprograms): New routine.
1485 2014-08-01 Robert Dewar <dewar@adacore.com>
1487 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
1489 * prj-conf.adb: Minor reformatting.
1490 * xr_tabls.adb (Read_File): Restore code which was enabled on
1491 non VMS platforms before.
1492 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
1493 * sem_ch5.adb: Minor reformatting.
1494 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
1495 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
1496 Remove VMS-specific code.
1498 2014-08-01 Vincent Celier <celier@adacore.com>
1500 * make.adb (Await_Compile): Remove loop that was only needed
1503 2014-08-01 Robert Dewar <dewar@adacore.com>
1505 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
1506 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
1507 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
1508 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
1509 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
1510 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
1511 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
1512 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
1513 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
1514 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
1515 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
1516 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
1517 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
1518 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
1519 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
1520 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
1521 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
1522 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
1523 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
1524 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1525 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
1526 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
1527 specific code and comments.
1529 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1531 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
1532 Check_Reverse_Iteration, to verify the legality of the Reverse
1533 indicator on various container types, and to detect illegal
1534 reverse iterations on containers that only supoort forward
1537 2014-08-01 Vincent Celier <celier@adacore.com>
1539 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
1540 procedure GNATCmd the relevant declarations from packages VMS_Cmds
1542 * gnatcmd.ads: Update comments to remove any trace of VMS
1544 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1546 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
1547 defaulted actual that is an operator, before building wrapper
1548 for it in GNATprove mode. Restrict construction of wrapper to
1549 actuals that are operators.
1551 2014-08-01 Vincent Celier <celier@adacore.com>
1553 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
1554 specific packages no longer needed.
1556 2014-08-01 Pascal Obry <obry@adacore.com>
1558 * s-os_lib.ads (System.CRTL): Move with clause to body.
1559 (File_Size): New type.
1560 (File_Length64): Use it.
1561 (File_Length): Restore previous spec returning a Long_Integer.
1562 * s-os_lib.adb (System.CRTL): Move with clause here.
1564 2014-08-01 Vincent Celier <celier@adacore.com>
1566 * mlib-prj.adb: Update comments to remove any mention of VMS.
1568 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1570 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
1571 xgnatugn.adb and ug_words.
1573 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1575 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
1576 expansion can be avoid for Machine, Model and Rounding.
1577 (Is_Inline_Floating_Point_Attribute): Return true for Machine
1578 & Model, as well as Rounding if wrapped in a conversion to an
1580 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
1581 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
1582 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
1583 * gcc-interface/misc.c (enumerate_modes): Compute it.
1584 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
1585 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
1587 (Attribute_to_gnu) <Attr_Model>: New case.
1588 <Attr_Machine>): Likewise.
1589 (convert_with_check): Test
1590 fp_arith_may_widen variable.
1592 2014-08-01 Pascal Obry <obry@adacore.com>
1594 * adaint.h (GNAT_FOPEN): New definition for Windows.
1595 (GNAT_OPEN): Likewise.
1596 (GNAT_STAT): Likewise.
1597 (GNAT_FSTAT): Likewise.
1598 (GNAT_LSTAT): Likewise.
1599 (GNAT_STRUCT_STAT): Likewise.
1600 * adaint.c (__gnat_stat): Fix computation of file size for
1603 2014-08-01 Vincent Celier <celier@adacore.com>
1605 * Makefile.rtl: Minor comment update.
1607 2014-08-01 Vincent Celier <celier@adacore.com>
1609 * Make-generated.in: Remove dependencies for vms-help.
1611 2014-08-01 Gary Dismukes <dismukes@adacore.com>
1613 * makeutl.ads, opt.ads: Minor grammar fixes.
1614 * makeutl.adb: Minor code reorganization.
1616 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1618 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
1619 gnatsym.adb: Remove gnatsym (VMS only tool).
1621 2014-08-01 Ben Brosgol <brosgol@adacore.com>
1623 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
1624 conditionalization from gnat_ugn.texi and projects.texi, and updated
1625 (considerably simplified) xgnatugn.adb, to be removed soon.
1627 2014-08-01 Vincent Celier <celier@adacore.com>
1629 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
1630 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
1631 instead of Debug.Debug_Flag_S.
1632 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
1633 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
1635 * makeutl.ads (No_Exit_Message_Option): New constant string
1636 for switch --no-exit-message.
1637 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
1638 * switch-m.adb (Scan_Make_Switches): Recognize new switch
1641 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1643 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
1644 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
1646 2014-08-01 Javier Miranda <miranda@adacore.com>
1648 * inline.ads (Inlined_Calls, Backend_Calls,
1649 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
1650 moved to inline.adb (Cannot_Inline): Update documentation.
1651 (Check_And_Build_Body_To_Inline): Renamed.
1652 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1653 * inline.adb (Check_Inlining_Restrictions): New local variable.
1654 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
1655 Backend_Not_Inlined_Subps): Declarations moved here
1656 from inline.ads (Number_Of_Statements): Removed.
1657 (Remove_Pragmas): Avoid duplicated version of this subprogram.
1658 (Build_Body_To_Inline): Code cleanup.
1659 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
1660 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
1661 (Check_Body_To_Inline): Removed.
1662 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
1663 (Has_Excluded_Declaration): No action if not
1664 Check_Inlining_Restrictions.
1665 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
1666 (Initialize): Initialize the lists of inlined calls and subprograms.
1667 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
1668 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
1669 to Check_And_Build_Body_To_Inline since it has been renamed as
1670 Check_And_Split_Unconstrained_Function
1671 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
1673 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
1675 2014-08-01 Vincent Celier <celier@adacore.com>
1677 * debug.adb: Add documentation for new debug switch -ds.
1678 * make.adb (List_Bad_Compilations): Do not issue any message
1679 when switch -ds is specified.
1680 * makeutl.adb (Fail_Program): Do not issue any message when
1682 (Finish_Program): Ditto.
1684 2014-08-01 Robert Dewar <dewar@adacore.com>
1686 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
1687 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
1688 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
1689 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
1690 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
1691 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
1692 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
1693 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
1694 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
1695 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
1696 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
1697 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
1698 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
1699 s-tratas.ads: Minor fix to copyright notices.
1701 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
1703 * sinfo.ads: Remove long obsolete comment.
1704 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1706 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
1707 * sem_ch3.adb: Minor reformatting.
1709 2014-08-01 Pascal Obry <obry@adacore.com>
1711 * cstreams.c: Only enable large file support on know supported
1712 platforms. Add missing defines/includes.
1714 2014-08-01 Ed Schonberg <schonberg@adacore.com>
1716 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
1717 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
1718 on generic units that contain constructs that forbid subtypes
1720 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
1721 Inherit flags indicating the presence of predicates in subtype
1722 declarations with and without constraints.
1723 (Inherit_Predicate_Flags): Utility for the above.
1724 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
1725 indicate that the actual cannot have predicates, and preserve
1726 warning. In an instance, report error if actual has predicates
1727 and the construct appears in a package declaration.
1728 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
1729 for an actual with predicates, if the corresponding formal
1730 carries No_Predicate_On_Actual or (in the case of a loop)
1731 No_Dynamic_Predicate_On_Actual.
1732 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
1733 Static_Predicate function if the type is non-static (in the
1734 presence of previous errors),
1735 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
1736 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
1737 generic contract on actuals that cannot have predicates.
1739 2014-08-01 Pascal Obry <obry@adacore.com>
1741 * a-direct.adb (C_Size): Returns an int64.
1742 * osint.adb (System.CRTL): New with clause.
1743 (File_Length.Internal): Returns an int64.
1744 * s-os_lib.ads (File_Length): Returns an int64.
1746 2014-08-01 Robert Dewar <dewar@adacore.com>
1748 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
1749 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
1750 osint.adb, krunch.adb: Minor reformatting.
1752 2014-08-01 Robert Dewar <dewar@adacore.com>
1754 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
1755 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
1756 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
1757 Remove VMS-specific code.
1758 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
1760 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1762 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
1763 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
1764 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
1765 mlib.ads, tempdir.adb: Remove VMS handling.
1767 2014-08-01 Pascal Obry <obry@adacore.com>
1769 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
1770 (__gnat_named_file_length): Likewise.
1771 (__gnat_file_length_attr): Likewise.
1772 * a-direct.adb (C_Size): Use size_t as returned type.
1773 * osint.adb (File_Length): Adjust spec for Internal routine
1775 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
1776 (System.CRTL): With claused moved to spec.
1777 * s-os_lib.ads (System.CRTL): With clause moved to here.
1779 2014-08-01 Pascal Obry <obry@adacore.com>
1781 * adaint.h, adaint.c (__gnat_open): Added.
1782 * s-crtl.ads (open): Import __gnat_open for large file support.
1784 2014-08-01 Robert Dewar <dewar@adacore.com>
1786 * sem_case.adb (Dup_Choice): Improve message for integer constants.
1788 2014-08-01 Arnaud Charlet <charlet@adacore.com>
1790 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
1792 2014-08-01 Pascal Obry <obry@adacore.com>
1794 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
1795 * adaint.c (GNAT_OPEN): Uses new macro where needed.
1797 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
1799 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
1801 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
1802 * gcc-interface/gigi.h: Update comment.
1804 2014-07-31 Javier Miranda <miranda@adacore.com>
1806 * debug.adb Remove documentation of -gnatd.k (no longer needed).
1807 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
1808 * inline.ads (Backend_Inlined_Subps): New
1809 Elist. (Backend_Not_Inlined_Subps): New Elist.
1810 (Has_Excluded_Declaration): Declaration previously located in
1811 * inline.adb (Has_Excluded_Statement): Declaration previously
1812 located in inline.adb
1813 * inline.adb (Has_Single_Return): Moved out of
1814 Build_Body_To_Inline to avoid having duplicated code.
1815 (Number_Of_Statements): New subprogram.
1816 (Register_Backend_Inlined_Subprogram): New subprogram.
1817 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
1818 (Add_Inlined_Subprogram): Register backend inlined subprograms and
1819 also register subprograms that cannot be inlined by the backend.
1820 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
1821 to avoid having duplicated code. Replace occurrences of
1822 Debug_Flag_Dot_K by Back_End_Inlining.
1823 * sem_res.adb (Resolve_Call): Code cleanup.
1824 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
1825 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
1826 (List_Inlining_Info): Add listing of subprograms passed to the
1827 backend and listing of subprograms that cannot be inlined by
1829 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
1830 Debug_Flag_Dot_K by Back_End_Inlining.
1832 2014-07-31 Robert Dewar <dewar@adacore.com>
1834 * nlists.ads: Minor code fix (remove unwise Inline for
1837 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1839 * einfo.adb: Remove VMS specific code.
1840 * exp_attr.adb: Remove VAX specific code.
1841 * set_targ.adb: Remove handling of VAX_Float.
1842 * sem_vfpt.adb: Remove references to Vax_Native.
1843 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
1845 2014-07-31 Robert Dewar <dewar@adacore.com>
1847 * sem_ch4.adb: Minor reformatting.
1849 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1851 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
1852 to VMS. Misc clean ups.
1853 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
1855 2014-07-31 Robert Dewar <dewar@adacore.com>
1857 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
1858 exp_prag.adb, frontend.adb, interfac.ads,
1859 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
1860 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
1861 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
1862 snames.ads-tmpl: Remove obsolete VMS-specific code.
1864 2014-07-31 Robert Dewar <dewar@adacore.com>
1866 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
1868 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1870 * a-intnam-linux.ads: Minor: update obsolete comments.
1871 * s-taasde.adb: Minor: fix comment header.
1873 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1875 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
1876 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
1877 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
1878 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
1879 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
1880 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
1881 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
1882 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
1883 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
1884 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
1885 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
1886 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
1887 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
1888 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
1889 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
1890 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
1891 * namet.h (Is_Non_Ada_Error): Remove.
1893 2014-07-31 Robert Dewar <dewar@adacore.com>
1895 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
1898 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
1900 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
1901 which demonstrates the expansion of while loops subject to
1902 attribute 'Loop_Entry. The condition of a while loop along with
1903 related condition actions is now wrapped in a function. Instead
1904 of repeating the condition, the expansion now calls the function.
1906 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1908 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
1909 error when reporting of missing values in a case statement for
1910 a type with a static predicate.
1911 (Check_Choices): Reject a choice given by a subtype to which a
1912 Dynamic_Predicate applies.
1913 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
1914 Has_Dynamic_Predicate_Aspect flag from parent.
1916 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1918 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
1919 cannot apply to a subtype of an incomplete type.
1920 (Is_Static_Choice): Treat an Others_Clause as static. The
1921 staticness of the expression and of the range are checked
1924 2014-07-31 Pascal Obry <obry@adacore.com>
1926 * adaint.h (__gnat_ftell64): Added.
1927 (__gnat_fseek64): Added.
1929 * cstreams.c (__int64): Removed.
1931 2014-07-31 Pascal Obry <obry@adacore.com>
1933 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
1934 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
1935 (ftell64): Always returns a 64bit value.
1936 * cstreams.c (int64): New definition.
1937 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
1938 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
1939 uses ftello() on UNIX.
1940 (__gnat_fseek64): Offset is always a 64bit value. The
1941 implementation now uses fseeko() on UNIX.
1942 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
1943 always use fseek64 to set the offset.
1944 (Size): Simplify code, always use fseek64/ftell64.
1945 * s-direio.ads (Count): Now an int64.
1946 * g-socket.ads (Vector_Element): Adjust definition for Length
1947 to be a size_t. This matches the C definition and avoid using
1948 a 64bit integer on 32bit platforms now that Count is always 64bit.
1949 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
1950 (C_Recvmsg): Change some conversion to account for change in
1952 (C_Sendmsg): Likewise.
1954 2014-07-31 Robert Dewar <dewar@adacore.com>
1956 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
1957 * debug.adb: Remove documentation of -gnatdm flag.
1958 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
1961 2014-07-31 Arnaud Charlet <charlet@adacore.com>
1963 * lib-writ.adb (Write_Unit_Information): Fix case where U =
1966 2014-07-31 Claire Dross <dross@adacore.com>
1968 * exp_util.adb, exp_util.ads
1969 (Get_First_Parent_With_External_Axiomatization_For_Entity):
1970 New routine to find the first parent of an entity with
1971 a pragma Annotate (GNATprove, External_Axiomatization).
1972 (Has_Annotate_Pragma_For_External_Axiomatization): New function
1973 to check if a package has a pragma Annotate (GNATprove,
1974 External_Axiomatization).
1975 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
1976 flag on the entity for the declaration created for a formal
1977 subprogram in an instance. This is a renaming declaration,
1978 or in GNATprove_Mode the declaration of an expression function
1979 that captures the axiomatization of the actual.
1980 * sem_ch6.adb (Analyze_Expression_Function): For a
1981 Generic_Actual_Subprogram, place body immediately after the
1982 declaration because it may be used in a subsequent declaration
1984 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
1985 the actual is a function, not an operator. Handle functions with
1986 one and two parameters and binary and unary operators.
1988 2014-07-31 Pascal Obry <obry@adacore.com>
1990 * cstreams.c (__gnat_is_regular_file_fd): Removed.
1991 * adaint.c (__gnat_is_regular_file_fd): Added.
1993 2014-07-31 Robert Dewar <dewar@adacore.com>
1995 * exp_strm.adb: Minor reformatting.
1997 2014-07-31 Ed Schonberg <schonberg@adacore.com>
1999 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2000 Analyze_Associations, to create a wrapper around operators that
2001 are actuals to formal subprograms. This is done in GNATProve
2002 mode in order to propagate the contracts of the operators to
2003 the body of the instance.
2005 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2007 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
2008 legal if within an aspect specification for a generic subprogram.
2010 2014-07-31 Javier Miranda <miranda@adacore.com>
2012 * gnat1drv.adb (Back_End_Inlining): Set to false if
2013 Suppress_All_Inlining is set.
2014 * debug.adb: Adding documentation for -gnatd.z.
2015 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2016 processing to -gnatn1 for calls to Inline_Always routines.
2017 (Add_Inlined_Subprogram): Remove previous patch.
2019 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2021 * sem_ch13.adb (Check_One_Function): Apply properly the static
2022 semantic rules for indexing aspects and the functions they denote.
2024 2014-07-31 Javier Miranda <miranda@adacore.com>
2026 * debug.adb: Complete documentation of -gnatd.z.
2028 2014-07-31 Bob Duff <duff@adacore.com>
2030 * gnat_ugn.texi: Minor doc fixes.
2032 2014-07-31 Robert Dewar <dewar@adacore.com>
2034 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2037 2014-07-31 Tristan Gingold <gingold@adacore.com>
2039 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2040 (Packed_Bytes1): Make component aliased.
2042 2014-07-31 Robert Dewar <dewar@adacore.com>
2044 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2046 2014-07-31 Robert Dewar <dewar@adacore.com>
2048 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2051 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2053 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2054 on array references here, now done more selectively in trans.c.
2056 2014-07-31 Doug Rupp <rupp@adacore.com>
2058 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2060 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2062 * sem_util.adb (Is_Effectively_Volatile): New routine.
2064 2014-07-31 Fedor Rybin <frybin@adacore.com>
2066 * gnat_ugn.texi: Document --test-duration option for gnattest.
2068 2014-07-31 Javier Miranda <miranda@adacore.com>
2069 Eric Botcazou <ebotcazou@adacore.com>
2071 * opt.ads (Back_End_Inlining): New variable which controls
2072 activation of inlining by back-end expansion.
2073 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2074 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2075 the body to be inlined by the frontend if Back_End_Inlining
2077 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2078 (Expand_Call): If backend inlining is enabled let the backend to
2079 handle inlined subprograms.
2080 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2081 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2082 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2083 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2085 * debug.adb Document -gnatd.z
2086 * fe.h Import Back_End_Inlining variable.
2087 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2088 enabled then declare attribute "always inline"
2089 * gcc-interface/decl.c, gcc-interface/trans.c,
2090 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2092 2014-07-31 Robert Dewar <dewar@adacore.com>
2094 * a-ngelfu.ads: Minor comment fix.
2096 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2098 * freeze.adb (Freeze_Record_Type): Replace all calls to
2099 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2101 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2102 Replace all calls to Is_SPARK_Volatile with
2103 Is_Effectively_Volatile and update related comments.
2104 * sem_ch5.adb (Analyze_Iterator_Specification,
2105 Analyze_Loop_Parameter_Specification): Replace all calls to
2106 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2108 * sem_ch6.adb (Process_Formals): Replace all calls to
2109 Is_SPARK_Volatile with Is_Effectively_Volatile and update
2111 * sem_ch12.adb (Instantiate_Object): Replace the call to
2112 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2113 and update related comment.
2114 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2115 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2116 with Is_Effectively_Volatile and update related comments.
2117 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2118 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2119 update related comments.
2120 * sem_util.adb (Has_Enabled_Property,
2121 Variable_Has_Enabled_Property): Replace all calls
2122 to Is_SPARK_Volatile with Is_Effectively_Volatile and
2123 update related comments.
2124 (Is_Effectively_Volatile): New routine.
2125 (Is_Effectively_Volatile_Object): New routine.
2126 (Is_SPARK_Volatile): Removed.
2127 (Is_SPARK_Volatile_Object): Removed.
2128 * sem_util.ads (Is_Effectively_Volatile): New routine.
2129 (Is_Effectively_Volatile_Object): New routine.
2130 (Is_SPARK_Volatile): Removed.
2131 (Is_SPARK_Volatile_Object): Removed.
2133 2014-07-31 Pascal Obry <obry@adacore.com>
2135 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2136 the global list atomically. This ensures that the file descriptor
2137 won't be freed because another tasks is closing the file.
2139 2014-07-31 Robert Dewar <dewar@adacore.com>
2141 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2142 generation of _FIRST and _LAST variables even in GNATprove_Mode.
2143 * gnat_ugn.texi: Minor editing.
2144 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2145 aggregate is marked Comes_From_Source if argument is CFS.
2147 2014-07-31 Pascal Obry <obry@adacore.com>
2149 * s-fileio.adb: Remove obsolete comment.
2151 2014-07-31 Vincent Celier <celier@adacore.com>
2153 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2154 overriding keyword before function to avoid error when compiler
2155 is called with -gnatyO (check overriding indicators).
2157 2014-07-31 Tucker Taft <taft@adacore.com>
2159 * gnat_ugn.texi: Add a paragraph pointing the reader
2160 to the "plugins" example.
2162 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2164 * freeze.adb (Freeze_Expression): Document the
2165 purpose of the parent chain traversal.
2167 2014-07-31 Robert Dewar <dewar@adacore.com>
2169 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
2170 unconstrained fpt ops.
2172 2014-07-31 Pascal Obry <obry@adacore.com>
2174 * s-fileio.adb (Open): Make sure a shared file gets inserted into
2175 the global list atomically. This ensures that the file descriptor
2176 won't be freed because another tasks is closing the file.
2178 2014-07-31 Vincent Celier <celier@adacore.com>
2180 * projects.texi: Minor spelling error fix.
2182 2014-07-31 Robert Dewar <dewar@adacore.com>
2184 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
2185 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
2187 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
2188 * restrict.adb (Process_Restriction_Synonyms): Add handling
2189 of No_Elaboration_Code_All.
2190 * restrict.ads (Process_Restriction_Synonyms): Now handles
2191 No_Elaboration_Code_All.
2192 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
2193 No_Elaboration_Code_All.
2194 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
2195 Handle setting of No_Elab_Code in unit information. Handle
2196 No_Elaboration_Code_All.
2197 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
2199 (Name_No_Elaboration_Code_All): New name for pragma processing.
2201 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2203 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
2204 types with a null range and use the Esize of the component
2205 instead of its RM_Size to identify appropriate values.
2207 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2209 * freeze.adb Add with and use clause for Aspects.
2210 (Freeze_Expression): Emit an error when a volatile constant lacks
2211 Boolean aspect Import.
2212 (Has_Boolean_Aspect_Import): New routine.
2214 2014-07-31 Gary Dismukes <dismukes@adacore.com>
2216 * exp_util.adb: Minor reformatting.
2218 2014-07-31 Vincent Celier <celier@adacore.com>
2220 * errutil.adb (Error_Msg): Make sure that all components of
2221 the error message object are initialized.
2223 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2225 * sem_ch4.adb (Try_Container_Indexing): If the container type is
2226 class-wide, use specific type to locate iteration primitives.
2227 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
2228 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
2229 Minor error message reformating.
2230 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
2231 aspect for a derived type.
2233 2014-07-31 Robert Dewar <dewar@adacore.com>
2235 * debug.adb: Document debug flag d.X.
2237 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2239 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
2240 * sem_util.adb (Find_Specific_Type): If type is untagged private,
2241 retrieve full view so that primitive operations can be located.
2242 * exp_disp.adb Move Find_Specific_Type to sem_util.
2243 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
2244 Find_Specific_Type to locate primitive equality.
2245 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
2246 type does not require initialization.
2247 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
2248 body all visibility is established, and the enclosing package
2249 declarations must not be installed.
2251 2014-07-31 Yannick Moy <moy@adacore.com>
2253 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
2254 Make subprogram public.
2256 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2258 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
2259 predicate Discriminated_Size, to distinguish between private
2260 components that depend on discriminants from those whose size
2261 depends on some other non-static expression.
2263 2014-07-31 Nicolas Setton <setton@adacore.com>
2265 * g-exptty.adb (Close): Fix binding to Waitpid: use the
2268 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2270 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
2271 in a discrete range, when 'range was probably intended.
2273 2014-07-31 Robert Dewar <dewar@adacore.com>
2275 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
2277 2014-07-31 Robert Dewar <dewar@adacore.com>
2279 * frontend.adb: Minor reformatting.
2280 * sem.adb: Minor reformatting.
2281 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
2282 identifiers on rewrite.
2283 * par.adb: Minor comment updates.
2284 * a-ngelfu.adb (Cos): Minor simplification.
2285 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
2286 and recovery for bad aspect.
2287 * exp_ch3.adb: Code clean up.
2288 * sem_util.ads: Minor comment correction.
2289 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
2290 * sem_ch3.adb: Code clean up.
2291 * binderr.ads: Minor comment correction.
2293 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2295 * exp_disp.adb (Expand_Interface_Conversion): A call whose
2296 prefix is a static conversion to an interface type that is not
2297 class-wide is not dispatching.
2299 2014-07-31 Robert Dewar <dewar@adacore.com>
2301 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
2302 s-traceb-mastop.adb: Minor reformatting.
2304 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2306 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
2307 expansion, to handle properly visibility of selected components
2310 2014-07-31 Robert Dewar <dewar@adacore.com>
2312 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
2313 * par-ch2.adb (P_Pragma): Set Inside_Depends.
2314 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
2315 Check_Unary_Plus_Or_Minus.
2316 * scans.ads (Inside_Depends): New flag.
2317 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
2318 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
2319 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2320 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
2321 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
2322 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
2323 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
2325 2014-07-31 Javier Miranda <miranda@adacore.com>
2327 * s-vaflop.adb Move the body of function T_To_G before
2328 T_To_D. Required for frontend inlining.
2329 * inline.adb (Has_Excluded_Contract): New subprogram used to
2330 check if a subprogram inlined by the frontend has contracts
2331 which cannot be inlined.
2333 2014-07-31 Bob Duff <duff@adacore.com>
2335 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
2336 (Call_Chain): Add 1 to number of frames to skip, to account for
2337 the fact that there's one more frame on the stack.
2338 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
2340 2014-07-31 Robert Dewar <dewar@adacore.com>
2342 * checks.adb (Enable_Overflow_Check): More precise setting of
2343 Do_Overflow_Check flag for division.
2345 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
2347 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
2348 array types with implementation type.
2350 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2352 * sem_ch10.adb (Process_State): Remove local variable Name. Add
2353 local variable Decl. Partially declare an abstract state by
2354 generating an entity and storing it in the state declaration.
2355 * sem_prag.adb (Create_Abstract_State): Fully declare a
2356 semi-declared abstract state.
2358 2014-07-31 Robert Dewar <dewar@adacore.com>
2360 * prj-nmsc.adb: Minor reformatting.
2362 2014-07-31 Bob Duff <duff@adacore.com>
2364 * s-tasdeb.adb (System.Tasking.Debug): Remove
2365 all usage of the secondary stack from this package.
2367 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
2369 * freeze.adb (Freeze_Expression): Update the loop in charge
2370 of finding a proper insertion place for freeze nodes to handle
2371 N_Expression_With_Actions nodes.
2373 2014-07-31 Robert Dewar <dewar@adacore.com>
2375 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
2378 2014-07-31 Pascal Obry <obry@adacore.com>
2380 * prj-nmsc.adb: Minor reformatting.
2382 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2384 * sem_util.adb (Has_Preelaborable_Initialization): Check that
2385 type is tagged before checking whether a user-defined Initialize
2386 procedure is present.
2388 2014-07-31 Gary Dismukes <dismukes@adacore.com>
2390 * a-ngelfu.ads (Sqrt): Augment postcondition.
2392 2014-07-31 Pascal Obry <obry@adacore.com>
2394 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
2395 directory and ALI directory must be different than all object
2396 and library directories of aggregated projects.
2398 2014-07-31 Vincent Celier <celier@adacore.com>
2400 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
2401 to package body, as it is not called from outside. Remove argument
2402 Project_Tree, no longer used. When runtime cannot be found,
2403 call Raise_Invalid_Config instead of failing the program.
2405 2014-07-31 Robert Dewar <dewar@adacore.com>
2407 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
2409 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
2412 2014-07-31 Robert Dewar <dewar@adacore.com>
2414 * gnat_ugn.texi: Document new switch -gnato0.
2415 * sem_ch3.ads: Minor reformatting.
2416 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
2417 (we do not want overflow checks when incrementing elaboration
2419 * einfo.ads: Minor reformatting.
2421 2014-07-31 Robert Dewar <dewar@adacore.com>
2423 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
2424 * s-arit64.adb: Minor reformatting.
2426 2014-07-31 Robert Dewar <dewar@adacore.com>
2428 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
2429 checking is enabled except in GNAT_Mode.
2430 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
2431 (suppress overflow checks).
2433 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2435 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
2436 invariant procedure for an internally generated subtype that is
2437 created for an object of a class-wide type.
2439 2014-07-31 Vincent Celier <celier@adacore.com>
2441 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
2443 2014-07-31 Gary Dismukes <dismukes@adacore.com>
2445 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
2446 exp_disp.adb: Minor reformatting.
2448 2014-07-31 Robert Dewar <dewar@adacore.com>
2450 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
2451 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
2452 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
2455 2014-07-31 Robert Dewar <dewar@adacore.com>
2457 * sem_ch13.adb: Minor reformatting.
2459 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2461 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
2462 is an unchecked_union, warn that invariants will not be checked
2463 on components that have them.
2465 2014-07-31 Robert Dewar <dewar@adacore.com>
2467 * freeze.adb (Freeze_Entity): Check for error of
2468 Type_Invariant'Class applied to a untagged type.
2469 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
2470 as null body, so that we perform error checks even if expansion
2473 2014-07-31 Ed Schonberg <schonberg@adacore.com>
2475 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
2476 is already present, nothing to do.
2477 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
2478 component, check whether the access type has an invariant before
2479 checking the designated type.
2480 (Build_Record_Invariant_Proc): Change suffix of generated
2481 name to prevent ambiguity when record type has invariants
2482 in addition to those of components, and two subprograms are
2483 constructed. Consistent with handling of array types.
2484 (Insert_Component_Invariant_Checks): Build invariant procedure
2485 body when one has not been created yet, in the case of composite
2486 types that are completions and whose full declarations carry
2489 2014-07-30 Thomas Quinot <quinot@adacore.com>
2491 * gnat_rm.texi: Minor doc fixes.
2493 2014-07-30 Robert Dewar <dewar@adacore.com>
2495 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
2497 2014-07-30 Vincent Celier <celier@adacore.com>
2499 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
2501 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
2502 message to report that a directory cannot be created, to avoid
2503 processing of the directory path that may contains special
2504 insertion characters.
2506 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2508 * a-crdlli.ads: Place declaration of Empty_List after full type
2509 declaration for Curosr, to prevent freezing error.
2511 2014-07-30 Robert Dewar <dewar@adacore.com>
2513 * get_targ.adb: Minor code reorganization.
2514 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
2517 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2519 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
2520 not Program_Error, when attempting to remove an element not in
2521 the set. This is the given semantics for all set containers.
2523 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2525 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
2526 element is not present in tree return rather than violating
2527 an assertion. Constraint_Error will be raised in the caller if
2528 element is not in the container.
2530 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2532 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
2533 (elab body): Add provision for default target config file.
2534 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
2536 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2538 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
2539 when attempting to remove an element not in the set. This is
2540 the given semantics for all set containers.
2541 * a-cborse.adb (Delete): Attempt removal first, to check for
2542 tampering, before checking whether this is an attempt to
2543 delete a non-existing element, and in fthe latter case raise
2546 2014-07-30 Vincent Celier <celier@adacore.com>
2548 * prj-proc.adb (Recursive_Process): Do not create a new
2549 Project_Id if the project is already in the list of projects of
2552 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2554 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
2555 whose type is an incomplete formal type.
2556 (Analyze_Return_Type): Reject a return type that is an untagged
2557 imcomplete formal type.
2558 (Process_Formals): Reject a formal parameter whose type is an
2559 untagged formal incomplete type.
2560 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
2561 an untagged formal incomplete type.
2563 2014-07-30 Robert Dewar <dewar@adacore.com>
2565 * gnat_ugn.texi: Minor spelling correction.
2566 * makeutl.adb: Minor code reorganization.
2567 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
2569 2014-07-30 Robert Dewar <dewar@adacore.com>
2571 * einfo.ads (Has_Unchecked_Union): Document that this is used
2572 to check for illegal Valid_Scalars attribute references.
2573 * exp_attr.adb (Build_Record_VS_Func): New function
2574 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
2576 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
2577 Unchecked_Union Add note on 'Valid_Scalars generating a lot
2579 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
2580 error on attempt to apply Valid_Scalars to Unchecked_Union type.
2582 2014-07-30 Steve Baird <baird@adacore.com>
2584 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
2585 of A(I..J)(K) in CodePeer_Mode.
2587 2014-07-30 Ben Brosgol <brosgol@adacore.com>
2589 * gnat_ugn.texi: Fix typo.
2591 2014-07-30 Thomas Quinot <quinot@adacore.com>
2593 * lib-writ.ads: document format change.
2595 2014-07-30 Pascal Obry <obry@adacore.com>
2597 * prj-util.adb (For_Interface_Sources): Do not
2598 include sources from withed externally built projects.
2600 2014-07-30 Robert Dewar <dewar@adacore.com>
2602 * lib.adb: Minor reformatting.
2603 * prj-util.adb: Minor reformatting.
2605 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2607 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
2608 that depends on discriminants, and which is given by an others
2609 clause, create an explicit subtype with the discriminant values
2610 of the enclosing aggregate, because the backend cannot otherwise
2611 retrieve the actual bounds of the array.
2613 2014-07-30 Fedor Rybin <frybin@adacore.com>
2615 * gnat_ugn.texi: Improve gnattest documentation.
2617 2014-07-30 Pascal Obry <obry@adacore.com>
2619 * makeutl.adb (Insert_Project_Sources): Properly handle sources
2620 that are aggregated. We want to include sources not only part
2621 of libraries but also if part of an aggregated project from an
2623 * prj.adb (For_Project_And_Aggregated_Context): Properly check
2624 state of root project.
2626 2014-07-30 Thomas Quinot <quinot@adacore.com>
2628 * lib-load.ads: Minor reformatting.
2629 * sinfo.ads (Library_Unit): Update comment.
2630 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
2631 is redundant. Instead used the pragma Node_Id directly as the
2634 2014-07-30 Thomas Quinot <quinot@adacore.com>
2636 * lib.adb (Store_Note): Store only notes that do not come from
2637 an instance, and that are in the extended main source unit.
2638 * lib-writ (Write_Unit_Information): Annotations from subunits
2639 must be emitted along with those for the main unit, and they
2640 must carry a specific file name.
2641 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
2642 Unit_Id for the source file containing the pragma, as in the
2643 case of annotations from subunits we might not have a readily
2645 * ali.adb (Scan_ALI): Account for above change in data structure.
2647 2014-07-30 Vincent Celier <celier@adacore.com>
2649 * makeutl.adb (Insert_Project_Sources): When the library project
2650 is an aggregate Stand-Alone Library, insert in the queue the
2651 Ada interface units, with Closure set to True;
2653 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2655 * sem_util.adb: Fix minor typo.
2656 * makeutl.adb: Minor reformatting.
2658 2014-07-30 Robert Dewar <dewar@adacore.com>
2660 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
2662 2014-07-30 Yannick Moy <moy@adacore.com>
2664 * checks.ads: Fix typo in comment.
2666 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
2668 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
2669 entities that materialize range bounds, if any.
2671 2014-07-30 Vincent Celier <celier@adacore.com>
2673 * projects.texi: Minor spelling fix.
2675 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2677 * checks.adb (Make_Bignum_Block): Use the new secondary stack
2678 build routines to manage the mark.
2679 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
2680 Use the new secodary stack build routines to manage the mark.
2681 (Insert_Actions_In_Scope_Around): Add new formal parameter
2682 Manage_SS along with comment on its usage. Code and comment
2683 reformatting. Mark and release the secondary stack when the
2684 context warrants it.
2685 (Make_Transient_Block): Update the call
2686 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
2687 (Wrap_Transient_Declaration): Remove local variable
2688 Uses_SS. Ensure that the secondary stack is marked and released
2689 when the related object declaration appears in a library level
2690 package or package body. Code and comment reformatting.
2691 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
2692 (Build_SS_Release_Call): New routine.
2694 2014-07-30 Steve Baird <baird@adacore.com>
2696 * exp_attr.adb: Revert previous change, not needed after all.
2698 2014-07-30 Vincent Celier <celier@adacore.com>
2700 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
2701 Closure => True for interfaces of Stand-Alone Libraries.
2702 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
2703 Boolean component Closure, defaulted to False.
2705 2014-07-30 Yannick Moy <moy@adacore.com>
2707 * sem_res.adb: Fix typo in error message.
2709 2014-07-30 Robert Dewar <dewar@adacore.com>
2711 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
2712 as name suffixes rather than L/H for subtype bounds.
2713 * tbuild.ads: Minor comment improvements and fixes
2714 (Make_External_Name): Document that suffix can start with an
2717 2014-07-30 Bob Duff <duff@adacore.com>
2719 * gnat_ugn.texi: Document --rep-clauses switch.
2721 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2723 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
2724 Default_Component_Value can only be specified for scalar type or
2725 arrays of scalar types respectively. This legality check must
2726 be performed at the point the aspect is analyzed, in order to
2727 reject aspect specifications that apply to a partial view.
2729 2014-07-30 Thomas Quinot <quinot@adacore.com>
2731 * freeze.adb: Minor reformatting.
2733 2014-07-30 Robert Dewar <dewar@adacore.com>
2735 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
2738 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2740 * freeze.adb (Check_Expression_Function): At the freeze point
2741 of an expression function, verify that the expression in the
2742 function does not contain references to any deferred constants
2743 that have no completion yet.
2744 (Freeze_Expression, Freeze_Before): call
2745 Check_Expression_Function.
2746 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
2747 * a-ciorse.adb: Add Adjust and Finalize routines for
2748 Reference_Control_Type. Use it in the construction of Reference
2749 and Constant_Reference values.
2751 2014-07-30 Robert Dewar <dewar@adacore.com>
2753 * exp_aggr.adb: Update comments.
2754 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
2757 2014-07-30 Robert Dewar <dewar@adacore.com>
2759 * cstand.adb (New_Standard_Entity): New version takes name
2760 string to call Make_Name.
2761 (Create_Standard): Use this routine to set name before setting other
2764 2014-07-30 Robert Dewar <dewar@adacore.com>
2766 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
2768 (Expand_Attribute, case Last): Ditto.
2769 * exp_ch3.adb (Constrain_Index): New calling sequence for
2770 Process_Range_Expr_In_Decl.
2771 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
2773 * sem_ch3.adb (Constrain_Index): New calling sequence for
2774 Process_Range_Expr_In_Decl.
2775 (Set_Scalar_Range_For_Subtype): ditto.
2776 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
2778 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
2779 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
2780 types if we are not assuming no invalid values.
2782 2014-07-30 Robert Dewar <dewar@adacore.com>
2784 * clean.adb: Minor reformatting.
2785 * opt.ads: Minor fix to incorrect comment.
2787 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2789 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
2790 subprogram, used by bounded hashed sets, to delete a node at
2791 a given index, whose element may have been improperly updated
2792 through a Reference_Preserving key.
2793 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
2794 * a-cbhase.adb: Add Adjust and Finalize routines for
2795 Reference_Control_Type.
2796 (Delete, Insert): Raise Program_Error, not Constraint_Error,
2797 when operation is illegal.
2798 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
2799 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
2800 private with_clause for Ada.Finalization.
2801 * a-cbmutr.adb: Add Adjust and Finalize routines for
2802 Reference_Control_Type. Use it in the construction of Reference
2803 and Constant_Reference values.
2805 2014-07-30 Robert Dewar <dewar@adacore.com>
2807 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
2809 2014-07-30 Pascal Obry <obry@adacore.com>
2811 * clean.adb (Clean_Project): Properly check for directory
2812 existence before trying to enter it.
2814 2014-07-30 Robert Dewar <dewar@adacore.com>
2816 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
2818 2014-07-30 Robert Dewar <dewar@adacore.com>
2820 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
2821 missing semicolon after name.
2823 2014-07-30 Pascal Obry <obry@adacore.com>
2825 * prj.ads (Gprinstall_Flags): New constant.
2826 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
2827 missing library dir if Directories_Must_Exist_In_Projects
2830 2014-07-30 Bob Duff <duff@adacore.com>
2832 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
2833 * s-traceb.ads: Updagte comments.
2835 2014-07-30 Robert Dewar <dewar@adacore.com>
2837 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
2838 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
2839 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
2842 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2844 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
2845 subprogram, used by all versions of hashed sets, to delete a node
2846 whose element has been improperly updated through a Reference_
2848 * a-cohase.adb: Remove Delete_Node, use new common procedure
2849 Delete_Node_At_Index.
2850 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
2851 * a-cihase.adb: Add Adjust and Finalize routines for
2852 Reference_Control_Type.
2853 (Reference_Preserving_Key): Build aggregate for
2854 Reference_Control_Type
2856 2014-07-30 Yannick Moy <moy@adacore.com>
2858 * checks.adb, checks.ads (Determine_Range_R): New procedure to
2859 determine the possible range of a floating-point expression.
2861 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2863 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
2864 * a-cborse.adb: Add Adjust and Finalize routines for
2865 Reference_Control_Type.
2866 (Reference_Preserving_Key): Build aggregate for
2867 Reference_Control_Type.
2868 (Delete): Check for tampering, and raise Program_Error (not
2869 Constraint_Error) when attempting to delete an element not in
2873 2014-07-30 Bob Duff <duff@adacore.com>
2875 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
2876 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
2877 Exception_Information is used to produce useful debugging
2878 information for the programmer. However, it was also used to
2879 implement the stream attributes for type Exception_Occurrence. The
2880 latter requires a stable and portable interface, which meant
2881 that we couldn't include a symbolic traceback. A separate set of
2882 routines was used to provide symbolic tracebacks under program
2883 control (i.e. not automatically). The goal of this ticket is
2884 to provide such automatic tracebacks, so the change here is to
2885 split the two functionalities: Exception_Information gives the
2886 maximally useful information for debugging (i.e. it now includes
2887 a symbolic traceback when a decorator is set, and it can be
2888 improved freely in the future without disturbing streaming).
2889 Untailored_Exception_Information always uses hexadecimal addresses
2890 in the traceback, has a stable and portable output, and is now
2893 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
2895 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
2896 on the target of the assignment to find out whether it
2897 can be directly done by the back-end.
2898 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
2900 2014-07-30 Robert Dewar <dewar@adacore.com>
2902 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
2903 a-tasatt.adb: Minor reformatting.
2905 2014-07-30 Robert Dewar <dewar@adacore.com>
2907 * exp_ch4.adb: Minor reformatting.
2909 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2911 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
2912 Reference_Control_Type to generic package, to keep additional
2913 information for Reference_Types that manipulate keys. Add Adjust and
2914 Finalize procedures for this type.
2915 (Finalize): When finalizing a reference_preserving_key, verify
2916 that the key of the new value is equivalent to the key of the
2917 original element, raise Program_Error otherwise.
2918 (Insert): Detect tampering.
2919 (Reference_Preserving_Key): Build proper Reference_Control_Type,
2920 and update Busy and Lock bits to detect tampering.
2921 * a-cohase.ads: Keep with-clause private.
2923 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
2925 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
2926 of an equality are of an Unchecked_Union type and lack inferable
2929 2014-07-30 Bob Duff <duff@adacore.com>
2931 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
2932 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
2933 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
2934 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
2935 we can call them from the runtimes. Leave renamings in place under GNAT.
2937 2014-07-30 Yannick Moy <moy@adacore.com>
2939 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
2940 inlining in GNATprove mode.
2942 2014-07-30 Ed Schonberg <schonberg@adacore.com>
2944 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
2945 Reference_Control_Type to generic package, to keep additional
2946 information for Reference_Types that manipulate keys. Add Adjust and
2947 Finalize procedures for this type.
2948 (Delete_Node): New procedure called when finalizing a
2949 Reference_Control_Type, to remove a node whose element has been
2950 improperly updated through a Reference.
2951 (Insert): Detect tampering.
2952 (Reference_Preserving_Key): Build proper Reference_Control_Type,
2953 and update Busy and Lock bits to detect tampering.
2955 2014-07-30 Bob Duff <duff@adacore.com>
2957 * exp_intr.ads: Minor comment fix.
2959 2014-07-30 Gary Dismukes <dismukes@adacore.com>
2961 * exp_prag.adb, a-tags.ads: Minor typo fixes.
2963 2014-07-30 Bob Duff <duff@adacore.com>
2965 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
2966 a-except.ads, g-traceb.adb, memtrack.adb,
2967 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
2968 Cleanup: Make the three versions of System.Traceback.Call_Chain
2969 have the same interface. Use an array for the Traceback parameter
2970 instead of an Address. This will enable reduction in code
2973 2014-07-30 Pat Rogers <rogers@adacore.com>
2975 * gnat_ugn.texi: Corrected minor textual error in description
2978 2014-07-30 Bob Duff <duff@adacore.com>
2980 * Makefile.rtl: Sort file names.
2982 2014-07-30 Arnaud Charlet <charlet@adacore.com>
2984 * a-tasatt.adb: Complete previous change: kill spurious warning
2985 on e.g. sparc, and make sure we only use the fast path when the
2986 alignment is compatible.
2988 2014-07-30 Yannick Moy <moy@adacore.com>
2990 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
2993 2014-07-30 Yannick Moy <moy@adacore.com>
2995 * inline.adb (Build_Body_To_Inline): Issue more precise messages
2996 for declarations that prevent inlining.
2997 (Cannot_Inline): Change usual start of message to refer to contextual
2998 analysis in GNATprove mode.
2999 * sem_res.adb (Resolve_Call): Change usual start of message to
3000 refer to contextual analysis in GNATprove mode, when inlining
3003 2014-07-30 Robert Dewar <dewar@adacore.com>
3005 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3006 * inline.adb: Minor reformatting.
3008 2014-07-30 Javier Miranda <miranda@adacore.com>
3010 * a-tags.ads: Add comments.
3012 2014-07-30 Pat Rogers <rogers@adacore.com>
3014 * gnat_rm.texi: Minor word error.
3016 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3018 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3019 created to capture the value of the prefix of 'Old at the
3020 beginning of the current declarative part, to prevent data flow
3021 anomalies in the postcondition procedure that will follow.
3023 2014-07-30 Yannick Moy <moy@adacore.com>
3025 * debug.adb: Retire debug flag -gnatdQ.
3026 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3027 on decl, not on body. Ignore predicate functions.
3028 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3029 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
3030 body when generating a decl for a body on which SPARK_Mode aspect
3032 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3033 attaching pragma to entity, to account for declaration not coming
3035 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3036 as not always inlined in GNATprove mode, when called in an
3039 2014-07-30 Vincent Celier <celier@adacore.com>
3041 * debug.adb: Minor comment update.
3043 2014-07-30 Robert Dewar <dewar@adacore.com>
3045 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3046 * sprint.adb (Sprint_Node): Handle N_Contract case.
3047 * exp_prag.adb: Minor reformatting.
3048 * freeze.adb (Freeze_Entity): Check useless postcondition for
3049 No_Return subprogram.
3050 * sem_prag.adb: Minor reformatting.
3052 2014-07-30 Javier Miranda <miranda@adacore.com>
3054 * a-tags.ads: Complete comments about performance.
3056 2014-07-30 Fedor Rybin <frybin@adacore.com>
3058 * gnat_ugn.texi: Adding description for --exit-status option to
3059 gnattest section. Fixing index entry of --passed-tests option
3060 in gnattest section.
3062 2014-07-30 Javier Miranda <miranda@adacore.com>
3064 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3065 rtsfind.ads: Remove references to package Interfaces.CPP since this
3066 package is no longer needed.
3068 2014-07-30 Bob Duff <duff@adacore.com>
3070 * s-taasde.adb (Timer_Queue): Don't use a
3071 build-in-place function call to initialize the Timer_Queue.
3072 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3073 Turn off polling in these units, because otherwise we get
3074 elaboration circularities with Ada.Exceptions when the -gnatP
3076 * s-tassta.adb (Create_Task): Make sure independent tasks
3077 are created with Parent = Environment_Task. This was not true,
3078 for example, in s-interr.adb, when Interrupt_Manager does "new
3079 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3080 which is wrong because the master is determined by the access
3081 type, which is at library level.
3082 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3083 now set correctly by Create_Task.
3084 (Make_Passive): Remove the workaround for the race condition in
3086 * frontend.adb (Frontend): Revert to previous method of detecting
3087 temporary configuration pragma files, recognizing such files by
3088 ".tmp" in the name. This is more general than detecting pragmas
3089 Source_File_Name_Project, because it allows any tool to use
3090 this naming convention, no matter the content of the file.
3091 * gnat_ugn.texi: Document this naming convention.
3093 2014-07-30 Robert Dewar <dewar@adacore.com>
3095 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3096 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3097 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3098 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3099 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3102 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3104 * sem_ch5.adb: Improve error recovery.
3105 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3106 before analyzing the body, so that in GNATprove mode there is
3107 no light expansion. Whatever expansion is required by SPARK will
3108 be performed when analysing the inlined code.
3110 2014-07-30 Bob Duff <duff@adacore.com>
3112 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3114 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3116 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3117 verify that it is not hidden by an inner implicit declaration.
3119 2014-07-30 Thomas Quinot <quinot@adacore.com>
3121 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3122 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3123 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3124 the call returns an unconstrained type: in this case there is
3125 already a transient scope, and we should not establish a new one.
3126 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3127 True, also insert cleanup actions in the tree.
3128 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3129 with Clean set True.
3131 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3133 * s-taskin.ads (Direct_Index, Direct_Index_Range,
3134 Direct_Attribute_Element, Direct_Attribute_Array,
3135 Direct_Index_Vector, Direct_Attributes, Is_Defined,
3136 Indirect_Attributes): Removed. (Atomic_Address,
3137 Attribute_Array, Attributes): New.
3138 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3139 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3140 (Finalize_Attributes): Reimplement.
3141 * s-tassta.adb (Create_Task): Remove call to
3142 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3143 Replace Finalize_Attributes_Link by Finalize_Attributes.
3144 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3145 Reimplement from scratch, using a simpler and more efficient
3147 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3148 * s-parame.ads, s-parame-hpux.ads,
3149 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3150 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3151 Default_Attribute_Count.
3153 2014-07-30 Olivier Hainque <hainque@adacore.com>
3155 * vxworks-ppc-link.spec: New file. Extra link
3156 instructions for ppc-vxworks.
3157 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
3158 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
3159 * system-vxworks-arm.ads: Likewise.
3160 * gcc-interface/Makefile.in: Enable .spec files.
3162 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3164 * sem_aggr.adb: Minor comment reformatting.
3166 2014-07-30 Robert Dewar <dewar@adacore.com>
3168 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
3169 * sem_warn.adb (Has_Junk_Name): New function
3170 (Check_References): Use Has_Junk_Name to delete junk warnings
3171 (Check_Unset_Reference): ditto.
3172 (Warn_On_Unreferenced_Entity): ditto.
3173 (Warn_On_Useless_Assignment): ditto.
3175 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3177 * checks.adb (Insert_Valid_Check): Do not check for the packed
3178 array type of a prefix that is an access type.
3180 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3182 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
3183 Unconstrained_Array even if prefix is not frozen yet, as can
3184 occur with a private subtype used as a generic actual.
3186 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3188 * sem_attr.adb: Minor reformatting.
3190 2014-07-30 Pat Rogers <rogers@adacore.com>
3192 * gnat_rm.texi: Corrected minor wording error in description
3193 of No_Exception_Registration.
3195 2014-07-30 Yannick Moy <moy@adacore.com>
3197 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
3198 mode. Realphabetize two subprograms.
3199 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
3200 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
3201 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
3203 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
3204 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
3205 Is_Inline in GNATprove mode.
3206 (Analyze_Subprogram_Specification):
3207 Set Is_Inlined_Always at subprogram entity creation.
3208 * sem_res.adb (Resolve_Call): Do not deal with inlining during
3209 pre-analysis. Issue warning on call to possibly inlined
3210 subprogram when body not seen.
3212 2014-07-30 Yannick Moy <moy@adacore.com>
3214 * lib-xref.adb (Generate_Reference): Add special
3215 case for compiler-generated formals in GNATprove mode.
3217 2014-07-30 Yannick Moy <moy@adacore.com>
3219 * sem_ch6.adb: Add comments.
3221 2014-07-30 Thomas Quinot <quinot@adacore.com>
3223 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
3225 2014-07-30 Robert Dewar <dewar@adacore.com>
3227 * sem_aggr.adb, sem_res.adb: Minor reformatting.
3229 2014-07-30 Thomas Quinot <quinot@adacore.com>
3231 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3232 Bit_Order): Set Reverse_Bit_Order on the base type of the
3233 specified first subtype.
3235 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3237 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
3238 to capture the value of actuals of a limited type rather than
3239 an object declaration, to prevent spurious errors when analyzing
3242 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3244 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
3245 as an instance, and inhibit semantic checks on already analyzed
3246 code to prevent spurious errors.
3248 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3250 * a-exctra.ads ("="): New function, to restore compatibility.
3252 2014-07-30 Pascal Obry <obry@adacore.com>
3254 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
3255 routine to use the OS dst setting.
3257 2014-07-30 Pat Rogers <rogers@adacore.com>
3259 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
3261 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3263 * sem_util.adb (Wrong_Type): Disable some checks equally within
3264 instances and within inlined bodies, to suppress spurious type
3265 errors on already analyzed code.
3266 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
3267 is legal in an inlined body, juts as it is in an instance body.
3269 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3271 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
3272 body the operand of an unchecked conversion may be a literal, in
3273 which case its type is the target type of the conversion. This
3274 is in contrast to conversions in other contexts, where the
3275 operand cannot be a literal and must be resolvable independent
3278 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
3280 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
3281 mere scalar constant instead of a reference for a renaming of
3283 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
3284 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
3286 2014-07-30 Robert Dewar <dewar@adacore.com>
3288 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
3289 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
3290 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
3291 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
3292 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
3293 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
3294 & code reorganization.
3296 2014-07-30 Bob Duff <duff@adacore.com>
3298 * s-tassta.adb, sem_util.ads: Minor reformatting.
3300 2014-07-30 Yannick Moy <moy@adacore.com>
3302 * inline.adb (Build_Body_To_Inline): Detect when
3303 subprogram has multiple returns, or not a single last return
3304 statement, in GNATprove mode.
3305 (Cannot_Inline): Simplify logic to handle case of GNATprove
3308 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3310 * sem_ch6.adb: Stubs are not subject to inlining.
3312 2014-07-30 Bob Duff <duff@adacore.com>
3314 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
3315 from a procedure to a function, so that it can more easily be
3316 called before the "begin" of a task.
3317 * s-taasde.ads (Delay_Block): Make this type immutably limited,
3318 so we can use a build-in-place function call to initialize
3319 Timer_Queue in the body.
3320 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
3321 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
3322 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
3323 Make_Independent before reaching its "begin", to avoid race
3324 conditions. This causes the activating task to wait until after
3325 Make_Independent is complete before proceeding. In addition,
3326 we initialize data structures used by independent tasks before
3327 activating those tasks, to avoid possible use of uninitialized data.
3328 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
3329 Minor comment fixes.
3331 2014-07-30 Bob Duff <duff@adacore.com>
3333 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
3334 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
3335 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
3336 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
3337 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
3339 2014-07-30 Arnaud Charlet <charlet@adacore.com>
3341 * a-tasatt.adb: Remove old comments.
3343 2014-07-30 Yannick Moy <moy@adacore.com>
3345 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
3346 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
3347 to explain rationale for inlining or not in GNATprove mode.
3348 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
3349 to False when inlining is not possible.
3350 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
3351 flag to indicate that subprogram is fully inlined. To be reversed
3352 if inlining problem is found.
3353 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
3354 call in potentially unevaluated context.
3356 2014-07-30 Jose Ruiz <ruiz@adacore.com>
3358 * s-tarest.adb, s-tarest.ads: Fix comments.
3360 2014-07-30 Robert Dewar <dewar@adacore.com>
3362 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
3363 Change No_Scalar_Parts predicate to Scalar_Part_Present and
3364 invert sense of test. This avoids the "not No_xxx" situation
3365 which is always ugly.
3367 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3369 * inline.adb (Expand_Inlined_Call): When generating code for
3370 an internal subprogram the expansion uses the location of the
3371 call, so that gdb can skip over it. In GNATprove mode we want to
3372 preserve slocs of original subprogram when expanding an inlined
3373 call, to obtain better warnings, even though subprogram appears
3374 not to come from source if it is the inlining of a subprogram
3375 body without a previous spec.
3377 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3379 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3380 types with atomic components.
3382 2014-07-30 Thomas Quinot <quinot@adacore.com>
3384 * Make-generated.in: Remove now unnecessary targets after s-oscons
3387 2014-07-30 Yannick Moy <moy@adacore.com>
3389 * sem_res.adb (Resolve_Call): Use ultimate alias
3390 of callee when available.
3392 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3394 * sem_ch6.adb (Analyze_Expression_Function): To check whether
3395 an expression function is a completion, use the specification of
3396 the previous declaration, not its entity, which may be internally
3397 generated in an inlined context.
3399 2014-07-30 Doug Rupp <rupp@adacore.com>
3401 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
3402 temp files in /cache directory unless overridden by TMPDIR.
3404 2014-07-30 Jose Ruiz <ruiz@adacore.com>
3406 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
3407 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
3408 type CPU, so it can never be greater than CPU_Range'Last.
3410 2014-07-30 Bob Duff <duff@adacore.com>
3412 * s-taskin.ads: Minor comment fix.
3414 2014-07-30 Thomas Quinot <quinot@adacore.com>
3416 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
3419 2014-07-30 Yannick Moy <moy@adacore.com>
3421 * debug.adb: Free debug flag dQ used for frontend inlining in
3423 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
3426 2014-07-30 Thomas Quinot <quinot@adacore.com>
3428 * Make-generated.in: Remove generation of s-oscons.ads, only
3429 generate the xoscons utility, in runtime-agnostic rules.
3430 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
3431 no longer supported.
3433 2014-07-30 Bob Duff <duff@adacore.com>
3435 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
3436 parameter Chain to be used in the allocator case.
3437 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
3438 has tasks, wrap the code in a block that will activate them,
3439 including the usual finalization code to kill them off in case
3440 of exception or abort.
3442 2014-07-30 Robert Dewar <dewar@adacore.com>
3444 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
3445 Remove renamings (don't work for gdb).
3446 (par): New synonym for p (avoid gdb ambiguities).
3447 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
3449 2014-07-30 Bob Duff <duff@adacore.com>
3451 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
3453 * treepr.ads, treepr.adb (ppp): Make this debugging routine
3454 accept any type covered by Union_Id.
3456 2014-07-30 Robert Dewar <dewar@adacore.com>
3458 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
3460 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
3463 2014-07-30 Robert Dewar <dewar@adacore.com>
3465 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
3466 of predicate aspect on entity other than a type.
3468 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3470 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
3471 when a subprogram body without a previous spec cannot be inlined
3472 in GNATprove mode, because it includes aspects or pragmas that
3473 generate a SPARK contract clause.
3474 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
3475 instance cannot be inlined.
3477 2014-07-30 Robert Dewar <dewar@adacore.com>
3479 * debug.adb: Document that d7 suppresses compilation time output.
3480 * errout.adb (Write_Header): Include compilation time in
3482 * exp_intr.adb (Expand_Intrinsic_Call): Add
3483 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
3484 Compilation_Date/Compilation_Time.
3485 * g-souinf.ads (Compilation_Date): New function
3486 (Compilation_Time): New function.
3487 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
3488 * gnat_rm.texi (Compilation_Date): New function
3489 (Compilation_Time): New function.
3490 * opt.ads (Compilation_Time): New variable.
3491 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
3492 * sem_intr.adb (Compilation_Date): New function.
3493 (Compilation_Time): New function.
3494 * snames.ads-tmpl (Name_Compilation_Date): New entry.
3495 (Name_Compilation_Time): New entry.
3497 2014-07-30 Yannick Moy <moy@adacore.com>
3499 * inline.adb: Add comment.
3501 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3503 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
3504 parameterless attribute, and a postondition can mention an
3505 indexed component or a slice whose prefix is an attribute
3508 2014-07-30 Robert Dewar <dewar@adacore.com>
3510 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
3511 Avoid bomb when printing package Standard.
3513 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3515 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
3516 entity is created at this point, ensure that the name of the
3517 flag is unique, because the subprogram may be overloaded and
3518 other homonyms may also have elaboration flags created on the fly.
3520 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3522 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
3523 (Analyze_Attribute): Major cleanup of attribute
3524 'Update. The logic is now split into two distinct routines
3525 depending on the type of the prefix. The use of <> is now illegal
3526 in attribute 'Update.
3527 (Analyze_Record_Component_Update): New routine.
3528 (Check_Component_Reference): Removed.
3529 (Resolve_Attribute): Remove the return statement and ??? comment
3530 following the processing for attribute 'Update. As a result,
3531 the attribute now freezes its prefix.
3533 2014-07-30 Javier Miranda <miranda@adacore.com>
3535 * exp_ch4.adb (Apply_Accessibility_Check): Do
3536 not call Base_Address() in VM targets.
3538 2014-07-30 Yannick Moy <moy@adacore.com>
3540 * gnat1drv.adb (Adjust_Global_Switches): Set
3541 Ineffective_Inline_Warnings to True in GNATprove mode.
3542 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
3544 * opt.ads (Ineffective_Inline_Warnings): Add comment that
3545 describes use in GNATprove mode.
3546 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
3547 pragma when applied to the special body created for inlining.
3549 2014-07-30 Robert Dewar <dewar@adacore.com>
3551 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
3554 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3556 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
3557 not delayed. Update the delay status of most SPARK 2014 aspects.
3558 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
3559 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
3560 to Decorate and Insert_Pragma. Add various comments concerning
3561 the delay status of several SPARK 2014 aspects. The insertion
3562 of Refined_State now uses routine Insert_After_SPARK_Mode.
3563 (Decorate): New routine.
3564 (Decorate_Aspect_And_Pragma): Removed.
3565 (Insert_Delayed_Pragma): Removed.
3566 (Insert_Pragma): New routine.
3568 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3570 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
3571 only a warning, not an error on an attempt to inline a recursive
3574 2014-07-30 Robert Dewar <dewar@adacore.com>
3576 * g-forstr.adb: Minor code reorganization (use J rather than I
3577 as a variable name).
3578 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
3579 g-forstr.ads: Minor reformatting.
3581 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3583 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
3584 we are debugging the generated code.
3586 2014-07-30 Yannick Moy <moy@adacore.com>
3588 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
3589 returns True for source pointer for an inlined body.
3591 2014-07-30 Javier Miranda <miranda@adacore.com>
3593 * exp_ch4.adb (Apply_Accessibility_Check): Add
3594 missing calls to Base_Address().
3596 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3598 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
3599 mode, subprogram bodies without a previous declaration are also
3600 candidates for front-end inlining.
3602 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3604 * aspects.ads Aspects Async_Readers, Async_Writers,
3605 Effective_Reads and Effective_Writes do not need to be delayed.
3606 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
3607 optional Boolean expression when generating the corresponding
3608 pragma for an external property aspect.
3609 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
3610 local constant Obj. Add local constant Obj_Id. Reimplement the
3611 check which ensures that the related variable is in fact volatile.
3612 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
3613 * sem_util.adb (Is_Enabled): New routine.
3614 (Variable_Has_Enabled_Property): Reimplement the detection of
3615 an enabled external property.
3617 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
3619 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
3622 2014-07-30 Pascal Obry <obry@adacore.com>
3624 * g-forstr.adb, g-forstr.ads: New.
3625 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
3626 GNAT.Formatted_String.
3628 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
3630 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
3631 (Expand_Array_Aggregate): Also enable in-place expansion for
3632 code generated by the compiler. For an object declaration,
3633 set the kind of the object in addition to its type. If an
3634 in-place assignment is to be generated and it can be directly
3635 done by the back-end, do not expand the aggregate.
3636 * fe.h (Is_Others_Aggregate): Declare.
3637 * gcc-interface/trans.c
3638 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
3639 aggregate with a single Others choice on the RHS by means of
3640 __builtin_memset. Tidy up.
3642 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3644 * gnat_rm.texi: minor reformatting.
3646 2014-07-30 Yannick Moy <moy@adacore.com>
3648 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
3651 2014-07-30 Robert Dewar <dewar@adacore.com>
3653 * gnat_rm.texi: Document additional implementation-defined use
3656 2014-07-30 Robert Dewar <dewar@adacore.com>
3658 * prj-proc.adb, prj-strt.adb: Update comments.
3660 2014-07-30 Gary Dismukes <dismukes@adacore.com>
3662 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
3664 2014-07-30 Vincent Celier <celier@adacore.com>
3666 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
3667 parameter No_Extending, defaulted to False. When No_Extending
3668 is True, do not look for an extending project.
3669 (Expression): For a variable reference that is not for the current
3670 project, get its Id calling Imported_Or_Extended_Project_From
3671 with No_Extending set to True.
3672 * prj-strt.adb (Parse_Variable_Reference): If a referenced
3673 variable is not found in the current project, check if it is
3674 defined in one of the projects it extends.
3676 2014-07-30 Robert Dewar <dewar@adacore.com>
3678 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
3679 some additional cases of internally generated routines.
3681 2014-07-30 Ed Schonberg <schonberg@adacore.com>
3683 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
3684 if the compilation unit is a subunit, extend optional processing
3685 to all subunits of the current one. This allows gnatstub to
3686 supress generation of spurious bodies.
3688 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
3690 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
3691 track of the initial element's index within the tree.
3693 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3695 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
3696 (Insert_Child): Add local variable First. Capture the index of the
3697 first node being created to ensure correct cursor construction
3698 later on. Use the three parameter version of Allocate_Node
3699 when creating multiple children as this method allows aspect
3700 Default_Value to take effect (if applicable).
3702 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
3704 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
3705 (Expand_Array_Aggregate): For a safe slice assignment, just set
3706 the target and use the common code path.
3708 2014-07-29 Robert Dewar <dewar@adacore.com>
3710 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
3711 predicate No_Predicate_Test_On_Arguments, new name is
3712 Predicate_Tests_On_Arguments (with the opposite sense).
3714 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3716 * sem_attr.adb (Resolve_Attribute): Clean up the code for
3717 attribute 'Access. Do not generate an elaboration flag for a
3718 stand alone expression function. The expression of an expression
3719 function is now frozen when the expression function appears as
3720 the prefix of attribute 'Access.
3721 * sem_ch6.adb (Analyze_Expression_Function): Remove local
3722 variable New_Decl and update all references to it after the
3723 rewriting has taken place. Establish the linkages between the
3724 generated spec and body.
3726 2014-07-29 Robert Dewar <dewar@adacore.com>
3728 * sem_prag.adb (ip, rv): Prevent from being optimized away.
3729 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
3730 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
3733 2014-07-29 Vincent Celier <celier@adacore.com>
3735 * prj-pp.adb: Minor comment update.
3736 * frontend.adb: If a target dependency info file has been read
3737 through switch -gnateT= add it to the dependencies of the source
3740 2014-07-29 Robert Dewar <dewar@adacore.com>
3742 * sem_ch3.adb, prj.adb: Minor reformatting.
3744 2014-07-29 Vincent Celier <celier@adacore.com>
3746 * prj-pp.adb (Pretty_Print.Output_Project_File): New
3747 procedure to output project file names between quotes without
3748 concatenation, even if the line is too long.
3749 (Pretty_Print): Use Output_Project_File for project being extended and
3752 2014-07-29 Vincent Celier <celier@adacore.com>
3754 * gnat_ugn.texi: Document that configuration pragmas files are
3755 added to the dependencies, unless they contain only pragmas
3756 Source_File_Name_Project.
3758 2014-07-29 Robert Dewar <dewar@adacore.com>
3760 * frontend.adb: Minor reformatting.
3762 2014-07-29 Robert Dewar <dewar@adacore.com>
3764 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
3765 (Expand_Actuals): Make sure predicate checks are properly applied
3766 for the case of OUT or IN OUT parameters.
3767 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
3768 predicate tests on arguments for Finalize
3769 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
3770 if predicate tests on subprogram arguments should be skipped.
3771 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
3773 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3775 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
3776 clause for the object and the expression is an aggregate, defer
3777 resolution and expansion of the aggregate until the freeze point
3779 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
3780 the parent node is an N_Reference generated during expansion.
3782 2014-07-29 Vincent Celier <celier@adacore.com>
3784 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
3786 2014-07-29 Robert Dewar <dewar@adacore.com>
3788 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
3789 prepcomp.ads: Minor reformatting and code clean up.
3790 * exp_ch6.adb (Expand_Actuals): Generate predicate test
3791 unconditionally for case of OUT or IN OUT actual (before this
3792 was generated only for certain subcases, which is wrong, the
3793 test is always needed).
3795 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3797 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
3798 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
3799 until context type is available.
3800 * sem_res.adb (Resolve_Allocator): In the case of a qualified
3801 expression, complete resolution of expression.
3802 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
3803 to apply Ada2012 checks on aliased formals, as well as
3804 accesibility checks when the context of the call is an allocator
3805 or a qualified expression.
3806 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
3807 Moved here from sem_ch3.
3808 (Object_Access_Level): Handle properly aliased formals and
3810 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
3811 now properly performed in sem_res (Resolve_Actuals,
3812 Check_Aliased_Parameter).
3814 2014-07-29 Yannick Moy <moy@adacore.com>
3816 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
3817 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
3818 function to decide when a subprogram can be inlined in GNATprove mode.
3819 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
3820 condition for possible inlining.
3821 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
3822 for Inline_Always in GNATprove mode.
3823 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
3824 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
3825 * sem_prag.adb Minor change in comments.
3826 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
3827 inside subprograms marked as SPARK_Mode On.
3828 * sinfo.ads: Minor typo fix.
3830 2014-07-29 Vincent Celier <celier@adacore.com>
3832 * frontend.adb: Add dependency on gnat.adc when taken into account
3833 and on non-temporary configuration pragmas files specified in
3835 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
3836 dependencies on configuration pragmas files.
3838 2014-07-29 Pat Rogers <rogers@adacore.com>
3840 * gnat_ugn.texi: Minor clarification to the explanation for the
3843 2014-07-29 Robert Dewar <dewar@adacore.com>
3845 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
3846 documentation that explains the need for this extended range
3847 (use by C_Pass_By_Copy).
3849 2014-07-29 Robert Dewar <dewar@adacore.com>
3851 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
3853 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
3855 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
3858 2014-07-29 Thomas Quinot <quinot@adacore.com>
3861 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
3862 CRTSCTS to be visible.
3864 2014-07-29 Bob Duff <duff@adacore.com>
3866 * g-trasym.adb, g-trasym.ads: Code cleanup.
3868 2014-07-29 Doug Rupp <rupp@adacore.com>
3870 * sigtramp-vxworks.c: Minor reformatting.
3872 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3874 * gnat_rm.texi: No doc needed for Ada2012 aspect
3875 Implicit_dereference.
3877 2014-07-29 Robert Dewar <dewar@adacore.com>
3879 * sem_attr.adb (Attribute_12): New array
3880 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
3881 (Check_Ada_2012_Attribute): Removed.
3883 2014-07-29 Doug Rupp <rupp@adacore.com>
3885 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
3887 * sigtramp-vxworks.c: New file.
3888 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
3890 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3892 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
3893 derived array type, add information about component type, which
3894 was previously missing in ali file.
3895 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
3897 2014-07-29 Thomas Quinot <quinot@adacore.com>
3899 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
3900 of the subtype created for a record component, do not mark
3901 the subtype as frozen. For one thing, this is anomalous (in
3902 particular, the base type might not itself be frozen yet);
3903 furthermore, proper freezing of the subtype must happen in any
3904 case. So, we just mark the subtype as requiring delayed freezing
3905 (and we'll actually freeze it when generating the init_proc of
3906 the enclosing record).
3907 Also change the name of the constrained record subtype (append a
3908 'C' so that it is clearly different from the unconstrained record
3909 type, "related_idV") to make debugging easier.
3910 (Process_Full_View): When creating a full subtype for a pending
3911 private subtype, re-establish the scope of the private subtype
3912 so that we get proper visibility on outer discriminants.
3913 * exp_ch3.adb (Build_Init_Statements): Freeze any component
3914 subtype that is not frozen yet.
3916 2014-07-29 Vincent Celier <celier@adacore.com>
3918 * prj-proc.adb (Recursive_Process): Always initialize the
3919 environment when the project is an aggregate project, even when
3920 it is not the root tree.
3921 2014-07-29 Robert Dewar <dewar@adacore.com>
3923 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
3924 * gnat_rm.texi: Complete list of implementation aspects.
3925 * aspects.ads: Minor comment clarification.
3927 2014-07-29 Ed Schonberg <schonberg@adacore.com>
3929 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
3930 is a null-excluding access type, do not generate a constraint
3931 check if Suppress_Assignment_Checks is set on assignment node.
3932 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
3933 parameter of a null-excluding access type, there is access check
3934 on entry, so set Suppress_Assignment_Checks on generated statement
3935 that assigns actual to parameter block.
3936 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
3938 2014-07-29 Robert Dewar <dewar@adacore.com>
3940 * gnat_rm.texi: Change theta to @ in documentation of aspect
3943 2014-07-29 Robert Dewar <dewar@adacore.com>
3945 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
3947 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
3949 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
3950 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
3952 2014-07-29 Javier Miranda <miranda@adacore.com>
3954 * types.ads Update documentation on how to add new reason codes
3956 (RT_Exception_Code): Keep values ordered by their
3957 reason code. Required by the .NET backend.
3958 (RT_CE_Exceptions): Subtype declaration removed.
3959 (RT_PE_Exceptions): Subtype declaration removed.
3960 (RT_SE_Exceptions): Subtype declaration removed.
3961 (Kind): New mapping table of RT_Exception_Codes.
3962 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
3964 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
3965 mapping table. (Make_Raise_Program_Error): Updated to use the
3967 (Make_Raise_Storage_Error): Updated to use the new mapping table.
3968 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
3971 2014-07-29 Thomas Quinot <quinot@adacore.com>
3973 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
3974 distributed stubs generation.
3975 * exp_ch3.adb: Minor reformatting.
3977 2014-07-29 Yannick Moy <moy@adacore.com>
3979 * sinfo.ads: Document constraint between frontend and GNATprove.
3981 2014-07-29 Robert Dewar <dewar@adacore.com>
3983 * a-except.adb: Minor comment clarification.
3985 2014-07-29 Robert Dewar <dewar@adacore.com>
3987 * gnat_rm.texi: Complete list of implementation attributes.
3988 * snames.ads-tmpl: Clean up list of impl-defined attributes.
3990 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
3992 * freeze.adb (Freeze_Record_Type): Perform various
3993 volatility-related checks.
3995 2014-07-29 Robert Dewar <dewar@adacore.com>
3997 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
3999 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4001 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4002 the case where the attribute reference appears in a nested scope
4003 from that of the subprogram prefix.
4004 * sem_attr.adb: Minor reformatting.
4006 2014-07-29 Robert Dewar <dewar@adacore.com>
4008 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4009 initialization options.
4011 2014-07-29 Robert Dewar <dewar@adacore.com>
4013 * sinfo.ads: Minor comment addition.
4015 2014-07-29 Bob Duff <duff@adacore.com>
4017 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4019 2014-07-29 Doug Rupp <rupp@adacore.com>
4021 * init.c: Complete previous change.
4023 2014-07-29 Robert Dewar <dewar@adacore.com>
4025 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4028 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4030 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4031 and the completion will appear in the same declarative part,
4032 create elaboration flag.
4033 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4034 is a completion of a declaration in the same declarative part,
4035 and the subprogram has had its address taken, add elaboration
4036 check inside the subprogram body, to detect elaboration errors
4037 that may occur through indirect calls.
4039 2014-07-29 Doug Rupp <rupp@adacore.com>
4041 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4042 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4044 2014-07-29 Vincent Celier <celier@adacore.com>
4046 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4047 runtime directorie specified with two switches --RTS= designate
4048 the same directory, even when there are no literarily the same.
4050 2014-07-29 Robert Dewar <dewar@adacore.com>
4052 * gnat_ugn.texi: Minor documentation clarification.
4053 * switch-c.adb: Minor reformatting.
4055 2014-07-29 Robert Dewar <dewar@adacore.com>
4057 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4058 Fix incorrect RTE call which caused bomb if pragma was in
4059 configuration pragma file.
4061 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
4063 * expect.c (__gnat_expect_poll): Fix typo in previous change.
4064 * g-expect.adb: Update comments.
4066 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4068 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4069 (Default_Attribute_Count): Bump to 16 on native platforms.
4071 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4073 * sem_res.adb: Add guard to front-end inlining for SPARK.
4075 2014-07-29 Robert Dewar <dewar@adacore.com>
4077 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4080 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4082 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4083 inline in GNATprove mode when subprogran is marked Inline_Always.
4084 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4085 mode if body to inline is available.
4086 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4087 effective in GNATprove mode.
4088 * sem_ch10.adb (Analyze_Compilation_Unit): Call
4089 Check_Package_Body_For_Inlining in GNATprove mode, so that body
4090 containing subprograms with Inline_Always can be available before
4093 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4095 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4096 to Check_Package_Body_For_Inlining, to prevent confusion with other
4097 inlining subprograms.
4099 2014-07-29 Robert Dewar <dewar@adacore.com>
4101 * opt.ads: Minor comment update.
4102 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4103 we want setting of Uneval_Old at time of encountering the aspect.
4104 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4106 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4107 New function (Set_Uneval_Old_Accept): New procedure.
4108 (Set_Uneval_Old_Warn): New procedure.
4109 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4111 2014-07-29 Robert Dewar <dewar@adacore.com>
4113 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4114 * snames.ads-tmpl: Minor reformatting.
4115 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4116 to give <Error>. Not clear why this was there, but the compiler
4117 sources do not reference Name_Error, and this interfered with
4118 the circuits for pragma Unevaluated_Use_Of_Old.
4120 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4122 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4123 types in SPARK 2014 (again).
4124 * sem_res.adb (Is_OK_Volatile_Context): New routine.
4125 (Resolve_Entity_Name): Ensure that a volatile object with
4126 enabled properties Async_Writers or Effectire_Reads appears in
4127 a non-interfering context.
4129 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4131 * sem_ch6.adb: Move Build_Body_To_Inline,
4132 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4133 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4134 * inline.ads, inline.adb: Package now contains subprograms that
4135 implement front-end inlining. No functional changes, no test
4138 2014-07-29 Robert Dewar <dewar@adacore.com>
4140 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4142 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4144 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4145 is a limited view when the context is a package body, because
4146 there is no subsequent place at which the non-limited view may
4148 (Process_Formals): Ditto.
4149 * sinfo.ads, par-ch3.adb: Minor reformatting.
4151 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
4153 * expect.c (__gnat_expect_poll): New parameter dead_process
4154 used to return the dead process among the array of file
4155 descriptors. The Windows, VMS and HPUX implementations now
4156 properly report the dead process via this parameter. Other unixes
4158 * g-expect.adb (Poll): Adapt to the C profile.
4159 (Expect_Internal): Use the new parameter to properly close the
4160 File Descriptor. This then can be properly reported by the
4161 function First_Dead_Process as is expected.
4163 2014-07-29 Robert Dewar <dewar@adacore.com>
4165 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
4167 2014-07-29 Robert Dewar <dewar@adacore.com>
4169 * einfo.adb (Derived_Type_Link): New function
4170 (Set_Derived_Type_Link): New procedure.
4171 (Write_Field31_Name): Output Derived_Type_Link.
4172 * einfo.ads: New field Derived_Type_Link.
4173 * exp_ch6.adb (Expand_Call): Warn if change of representation
4175 * sem_ch13.adb: Minor addition of ??? comment.
4176 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
4177 expensive implicit conversion.
4178 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
4180 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4182 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
4183 to DF_Id. Add new local variable DF_Call. Do not perform any
4184 elaboration-related checks on the call to the partial finalization
4185 routine within an init proc to avoid generating bogus elaboration
4186 warnings on expansion-related code.
4187 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
4188 the top level of the routine. Ensure that Output_Calls takes
4189 into account flags -gnatel and -gnatwl when emitting warnings
4191 (Check_Internal_Call_Continue): Update the call to Output_Calls.
4192 (Elab_Warning): Moved to the top level of routine Check_A_Call.
4193 (Emit): New routines.
4194 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
4195 comment on usage. Output all warnings or info messages only when the
4196 caller context demands it and the proper elaboration flag is set.
4198 2014-07-29 Yannick Moy <moy@adacore.com>
4200 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
4201 Check rule about Old appearing in potentially unevaluated
4202 expression everywhere, not only in Post.
4204 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4206 * sem_prag.adb: Update comment.
4207 * a-except.adb, a-except-2005.adb: Minor editing.
4209 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
4211 * exp_dbug.adb (Debug_Renaming_Declaration):
4212 Do not create renaming entities for renamings of non-packed
4213 objects and for exceptions.
4215 2014-07-29 Robert Dewar <dewar@adacore.com>
4217 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
4218 sem_ch6.adb, par-ch3.adb: Minor reformatting.
4220 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4222 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
4223 subtype indication in an extended return statement when the
4224 return value is an ancestor of the return type of the function,
4225 and that return type is a null record extension.
4227 2014-07-29 Thomas Quinot <quinot@adacore.com>
4229 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
4230 message produced for the case of a type-related representation
4231 item that is made illegal by 13.10(1).
4232 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
4235 2014-07-29 Robert Dewar <dewar@adacore.com>
4237 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
4238 * erroutc.adb (Output_Error_Msgs): Take wide characters into
4239 account in computing position of error flags.
4240 * sinput.adb (Get_Column_Number): Take wide characters into
4243 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4245 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
4246 in an access type definition can carry a null_exclusion indicator.
4247 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
4248 carries a null_exclusion indicator, verify that the subtype
4249 indication denotes an access type, and create a null-excluding
4251 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
4252 defined on N_Access_To_Object_Definition to indicate that the
4253 subtype indication carries a null_exclusion indicator.
4255 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4257 * exp_ch6.adb (Add_Extra_Actual): Do not construct
4258 the extra actual by name, generate a reference instead.
4260 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4262 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
4263 Allow_Integer_Address if already set.
4264 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
4265 Fix order, for consistency with Rmsg_xx declarations.
4267 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4269 * sem_ch4.adb (Complete_Object_Operation): If the type of the
4270 candidate subprogram is a limited view, use non-limited view
4273 2014-07-29 Robert Dewar <dewar@adacore.com>
4275 * sem_ch13.adb: Minor change in RM reference.
4276 * sem_mech.ads: Minor reformatting.
4277 * einfo.ads: Minor comment fix.
4278 * types.ads: Minor correction to range given for Mechanism_Type.
4279 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
4280 check predicate on way out for OUT or IN OUT parameters.
4281 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
4282 better (P_Range_Constraint): Corresponding fix.
4283 * checks.ads: Minor comment clarification.
4285 2014-07-29 Gary Dismukes <dismukes@adacore.com>
4287 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
4288 and Treat_As_Volatile flags based on whether the renamed object
4289 is a volatile object.
4291 2014-07-29 Olivier Hainque <hainque@adacore.com>
4294 (Default_Alignment): Rename as Storage_Alignment. This is not
4295 a "default" that can be overriden. Augment comment to clarify
4296 intent and document why we need to manage alignment padding.
4297 (Header_Offset): Set to Header'Object_Size instead of 'Size
4298 rounded up to Storage_Alignment. Storage_Alignment on the
4299 allocation header is not required by our internals so was
4300 overkill. 'Object_Size is enough to ensure proper alignment
4301 of the header address when substracted from a storage address
4302 aligned on Storage_Alignment.
4303 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
4304 this is always added on top of the incoming allocation requests.
4305 (Align): New function, to perform alignment rounding operations.
4306 (Allocate): Add comments on the Storage_Address computation
4307 scheme and adjust so that the alignment padding applies to that
4308 (Storage_Address) only.
4310 2014-07-29 Robert Dewar <dewar@adacore.com>
4312 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
4313 pragma Unreferenced.
4314 * cstand.adb (Create_Standard): Use E_Array_Type for standard
4315 string types. Make sure index of Any_String/Any_Array is in a list.
4316 * errout.adb: Minor reformatting.
4318 2014-07-29 Robert Dewar <dewar@adacore.com>
4320 * gnat_ugn.texi: Clean up and correct documentation of warnings.
4321 * usage.adb: Minor corrections to make sure warnings are properly
4323 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
4324 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
4326 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4328 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
4329 created to match internal sequence numbers between compilations
4330 with/without abort must have its type properly set.
4332 2014-07-29 Robert Dewar <dewar@adacore.com>
4334 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
4335 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
4336 SSO_Default_Specified.
4337 * ali.ads (ALIs_Record): Add field SSO_Default
4338 (SSO_Default_Specified): New global switch.
4339 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
4340 (Check_Configuration_Consistency): Call this procedure
4341 * einfo.adb (SSO_Set_High_By_Default): New
4342 function (SSO_Set_Low_By_Default): New function
4343 (Set_SSO_Set_High_By_Default): New procedure
4344 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
4346 * einfo.ads (SSO_Set_Low_By_Default): New flag
4347 (SSO_Set_High_By_Default): New flag
4348 * freeze.adb (Set_SSO_From_Default): New procedure
4349 (Freeze_Array_Type): Call Set_SSO_From_Default
4350 (Freeze_Record_Type): Call Set_SSO_From_Default
4351 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
4352 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
4353 * lib-writ.ads: Add OL/OH parameters to P line
4354 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
4355 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
4357 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
4358 set by default using pragma Default_Scalar_Storage_Order.
4359 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
4360 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
4361 Clear SSO defaults when explicit SSO is inherited.
4362 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
4363 explicit SSO is specified.
4364 (Inherit_Aspects_At_Freeze_Point):
4365 Clear SSO default when inheriting SSO.
4366 * sem_ch3.adb (Set_Default_SSO): New procedure
4367 (Analyze_Private_Extension_Declaration): Set defualt SSO
4368 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
4369 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
4370 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
4371 (Record_Type_Declaration): ditto
4372 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
4374 * sem_prag.adb (Analyze_Pragma, case
4375 Default_Scalar_Storage_Order): Set Default_SSO
4377 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4379 * sem_ch6.adb (Valid_Operator_Definition): Verify that
4380 all parameter have mode IN. This check must be done here for
4381 subprogram instantiations that have operator names, because their
4382 analysis does not follow the same path as that for subprogram
4385 2014-07-29 Robert Dewar <dewar@adacore.com>
4387 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
4388 to make sure that the Etype of a component of the corresponding
4389 record type is present before trying to freeze it.
4390 * sem_ch5.adb: Minor reformatting.
4392 2014-07-29 Robert Dewar <dewar@adacore.com>
4394 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
4395 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
4396 and then use it when a stream operation is used from a library generic
4397 when the restriction (No_Streams) is active.
4399 2014-07-29 Thomas Quinot <quinot@adacore.com>
4401 * projects.texi: Fix minor typo.
4403 2014-07-29 Yannick Moy <moy@adacore.com>
4405 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
4407 2014-07-29 Arnaud Charlet <charlet@adacore.com>
4409 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
4412 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4414 * exp_ch7.adb (Find_Last_Init): Add local variable
4415 Deep_Init_Found. Check the statement immediately following the
4416 declaration if [Deep_]Initialization was not found.
4418 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4420 * exp_util.adb (Is_Aliased): It appears that
4421 'reference-d and renamed objects still play some role in Boolean
4422 expression with actions and cannot be finalized immediately.
4424 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4426 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
4427 Loop names are not part of the full qualification of entity names.
4429 2014-07-29 Robert Dewar <dewar@adacore.com>
4431 * einfo.adb (Has_Protected): Test base type.
4432 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
4433 that we always properly check No_Protected_Type_Allocators.
4435 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4437 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
4438 loop declarations as well.
4439 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
4440 to an iterator loop, because it may contain local renaming
4441 declarations that require debugging information.
4443 2014-07-29 Robert Dewar <dewar@adacore.com>
4445 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
4447 2014-07-29 Robert Dewar <dewar@adacore.com>
4449 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
4450 (Set_Static_Real_Or_String_Predicate): New procedure
4451 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
4452 string predicates (Is_Predicate_Static): Handle static string
4454 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
4455 New procedure (Check_Expression_Against_Static_Predicate):
4456 Deal with static string predicates, now fully implemented
4457 (Eval_Relational_Op): Allow string equality/inequality as static
4458 if not comes from source.
4460 2014-07-29 Robert Dewar <dewar@adacore.com>
4462 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
4463 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
4464 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
4465 handling. Change name of Discrete_Predicate to
4466 Discrete_Static_Predicate, and replace testing of the presence of this
4467 field by testing the flag Has_Static_Expression.
4469 2014-07-29 Robert Dewar <dewar@adacore.com>
4471 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
4472 * opt.adb: Handle Uneval_Old.
4473 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
4474 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
4475 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
4476 * sem_attr.adb (Uneval_Old_Msg): New procedure.
4477 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
4478 (Pop_Scope): Restore Uneval_Old.
4479 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
4481 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
4482 Add entries for Name_Warn, Name_Allow.
4484 2014-07-29 Robert Dewar <dewar@adacore.com>
4486 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
4487 to Is_OK_Static_Range.
4488 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
4489 static attributes (Eval_Attribute, case Size): Handle size of
4490 zero properly (Eval_Attribute, case Value_Size): Handle size of
4492 * sem_ch13.adb: Minor reformatting.
4493 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
4494 Is_Static_Range to Is_OK_Static_Range.
4495 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
4496 wrong in several ways (Is_Static_Range): Moved here from spec
4497 (Is_Static_Subtype): Moved here from spec Change some incorrect
4498 Is_Static_Subtype calls to Is_OK_Static_Subtype.
4499 * sem_eval.ads: Add comments to section on
4500 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
4501 Add clarifying comments (Is_Static_Range): Moved to body
4502 (Is_Statically_Unevaluated): New function.
4503 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
4504 Is_Static_Range to Is_OK_Static_Range.
4505 * sinfo.ads: Additional commments for Is_Static_Expression noting
4506 that clients should almost always use Is_OK_Static_Expression
4507 instead. Many other changes throughout front end units to obey
4509 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
4510 for enumeration literal.
4511 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
4512 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
4513 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
4514 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
4515 Replace all occurrences of Is_Static_Expression by
4516 Is_OK_Static_Expression.
4518 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4520 * exp_ch4.adb (Process_Transient_Object): Remove constant
4521 In_Cond_Expr, use its initialization expression in place.
4522 * exp_ch7.adb (Process_Declarations): There is no need to check
4523 that a transient object being hooked is controlled as it would
4524 not have been hooked in the first place.
4525 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
4526 objects are not considered aliased when the related context is
4527 a Boolean expression_with_actions.
4528 (Requires_Cleanup_Actions): There is no need to check that a transient
4529 object being hooked is controlled as it would not have been hooked in
4532 2014-07-29 Robert Dewar <dewar@adacore.com>
4534 * errout.adb: Minor reformatting.
4536 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4538 * exp_ch3.adb (Default_Initialize_Object): Add new variables
4539 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
4540 not allowed to ensure the symmetrical generation of symbols.
4541 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
4542 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
4543 temporary when aborts are not allowed to ensure symmertrical
4544 generation of symbols.
4545 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
4546 Dummy. Generate a dummy temporary when aborts are not allowed
4547 to ensure symmertrical generation of symbols.
4549 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4551 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
4552 renaming, indicate that the renamed entity itself needs debug
4553 information. This is necessary if that entity is a temporary,
4554 e.g. part of the expansion of an explicit dereference in an
4557 2014-07-29 Thomas Quinot <quinot@adacore.com>
4559 * errout.adb (Set_Error_Posted): When propagating flag to
4560 an enclosing named association, also propagate to the parent
4561 of that node, so that named and positional associations are
4562 treated consistently.
4564 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4566 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
4567 Do_Range_Check properly on array component expressions that
4568 have a scalar type. In GNATprove mode, only checks on scalar
4569 components must be marked by the front-end.
4571 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4573 * sem_res.adb (Resolve_Type_Conversion): If the type of the
4574 expression is a limited view, use the non-limited view when
4577 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4579 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
4580 case statement as coming from a conditional expression.
4581 (Expand_N_If_Expression): Mark the generated if statement as
4582 coming from a conditional expression.
4583 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
4584 objects found in case statement alternatives when the case
4585 statement is actually a case expression.
4586 (Expand_N_If_Statement):
4587 Do not process controlled objects found in an if statement when
4588 the if statement is actually an if expression.
4589 * sinfo.adb (From_Conditional_Expression): New routine.
4590 (Set_From_Conditional_Expression): New routine.
4591 * sinfo.ads Add new semantic flag From_Conditional_Expression and
4592 update related nodes.
4593 (From_Conditional_Expression): New routine along with pragma Inline.
4594 (Set_From_Conditional_Expression): New routine along with pragma Inline.
4596 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
4598 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
4599 formal parameter Obj_Id and update the comment on usage. Renamed
4600 Obj_Typ to Func_Typ and update all occurrences.
4601 (Find_Last_Init): Remove formal parameter Decl and update the comment
4603 Remove local constants Obj_Id and Obj_Typ. Remove local variables
4604 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
4605 (Find_Last_Init_In_Block): Remove formal parameter
4606 Init_Typ and update the comment on usage.
4607 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
4608 on usage. Check whether the procedure call is an initialization
4609 procedure of either the object type or the initialization type.
4610 (Is_Init_Proc_Of): New routine.
4611 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
4612 routine. Add new variable Init_Typ. Add circuitry to extract the object
4613 type as well as the initialization type.
4615 2014-07-29 Robert Dewar <dewar@adacore.com>
4617 * sem_case.adb: Minor reformatting.
4618 * sem_aux.ads: Minor reformatting.
4620 2014-07-29 Ed Schonberg <schonberg@adacore.com>
4622 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
4623 pointer on these fields, even though they are semantic, because
4624 subsequent analysis and expansion of action nades may require
4625 exploring the tree, for example to locate a node to be wrapped
4626 when a function with controlled result is called.
4628 2014-07-29 Claire Dross <dross@adacore.com>
4630 * sem_aux.adb (Get_Binary_Nkind): Use case on
4631 Name_Id instead of an intermediate string.
4632 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
4635 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
4637 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
4638 about processing sources with preprocessor directives.
4640 2014-07-24 Martin Liska <mliska@suse.cz>
4642 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
4643 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
4644 (gnat_write_global_declarations): Likewise.
4646 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
4648 * gnat_rm.texi: Clean up for makeinfo 5.2.
4650 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
4652 * gnat_rm.texi (Machine Code Insertions): Clean up.
4654 2014-07-18 Robert Dewar <dewar@adacore.com>
4656 * exp_ch7.adb: Minor reformatting.
4658 2014-07-18 Claire Dross <dross@adacore.com>
4660 * sem_aux.ads (Get_Binary_Nkind): New function that returns
4661 the Node_Kind value of an entity defining a binary operator.
4662 (Get_Unary_Nkind): New function that returns the Node_Kind value
4663 of an entity defining a unary operator.
4665 2014-07-18 Pascal Obry <obry@adacore.com>
4667 * sysdep.c: comment update.
4668 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
4669 platforms where it is known to be supported.
4671 2014-07-18 Thomas Quinot <quinot@adacore.com>
4673 * sem_dist.adb (Process_Remote_AST_Declaration): Need
4674 to set Fat_Type's Ekind in order to be able to use its
4675 Corresponding_Remote_Type attribute.
4677 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4679 * einfo.adb Last_Aggregate_Assignment is now Node 30.
4680 (Last_Aggregate_Assignment): Include
4681 constants in the assertion. Update the underlying node.
4682 (Set_Last_Aggregate_Assignment): Include constants in the
4683 assertion. Update the underlying node. (Write_Field11_Name):
4684 Remove the entry for Last_Aggregate_Assignment.
4685 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
4686 * einfo.ads Update the node designation and usage of attribute
4687 Last_Aggregate_Assignment.
4688 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
4689 assignment statement used to initialize a controlled object.
4690 (Late_Expansion): Store the last assignment statement used to
4691 initialize a controlled record or an array of controlled objects.
4692 * exp_ch3.adb (Expand_N_Object_Declaration): Default
4693 initialization of objects is now performed in a separate routine.
4694 (Default_Initialize_Object): New routine.
4695 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
4696 Obj_Id. Update the comment on usage.
4697 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
4698 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
4699 (Is_Init_Call): Add formal parameter Init_Typ. Update the
4700 comment on usage. Account for the type init proc when trying
4701 to determine whether a statement is an initialization call.
4702 (Make_Adjust_Call): Rename formal parameter For_Parent to
4703 Skip_Self. Update all occurrences of For_Parent. Account for
4704 non-tagged types. Update the call to Make_Call.
4705 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
4706 comment on usage. Update all occurrences of For_Parent.
4707 (Make_Final_Call): Rename formal parameter For_Parent to
4708 Skip_Self. Update all occurrences of For_Parent. Account
4709 for non-tagged types. Update the call to Make_Call.
4710 (Process_Object_Declaration): Most variables and constants are
4711 now local to the routine.
4712 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
4713 For_Parent to Skip_Self. Update the comment on usage.
4714 (Make_Final_Call): Rename formal parameter For_Parent to
4715 Skip_Self. Update the comment on usage.
4717 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4719 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
4720 can be a procedure that is implemented by entry, and have a
4721 formal that is a synchronized interface. It does not have to
4722 be declared as a protected operation.
4724 2014-07-18 Robert Dewar <dewar@adacore.com>
4726 * gnat_rm.texi: Remove mention of obsolete attributes
4727 Max[_Interrupt]_Priority, which have never been implemented
4728 (or at the very least were removed long ago if they ever were
4729 implemented. Add documentation of Max[_Interrupt]_Priority
4730 constants in package System.
4731 * ttypes.ads: Document actual handling of package System,
4732 rather than a historical fantasy version. Remove mention of
4733 non-existent attributes Max[_Interrupt]_Priority.
4735 2014-07-18 Pascal Obry <obry@adacore.com>
4737 * a-witeio.adb (Put): No 16-bit character output when text
4738 translation is disabled.
4739 * i-cstrea.ads: Code clean up.
4741 2014-07-18 Robert Dewar <dewar@adacore.com>
4743 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
4746 2014-07-18 Arnaud Charlet <charlet@adacore.com>
4748 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
4750 2014-07-18 Pascal Obry <obry@adacore.com>
4752 * adaint.c: Do not include wchar.h on VxWorks.
4753 * mingw32.h: Remove obsolete definition.
4755 2014-07-18 Pascal Obry <obry@adacore.com>
4757 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
4758 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
4759 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
4760 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
4762 2014-07-18 Pascal Obry <obry@adacore.com>
4764 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
4765 * a-ztexio.adb: Likewise.
4766 * a-witeio.adb: Likewise.
4767 (Open): Pass file's translation mode to set_text_mode.
4768 * s-ficobl.ads (Content_Encoding): New type.
4769 (Text_Content_Encoding): New subtype.
4770 (AFCB): Rename Is_Text_File to Text_Encoding.
4771 * s-fileio.adb (Open): Handles new text_translation
4772 values. Remove Is_Text_File which is equivalent to Text_Encoding
4773 in Text_Content_Encoding.
4774 * adaint.h (__gnat_set_mode): New routine.
4775 * sysdep.c (__gnat_set_wide_text_mode): Removed.
4776 (__gnat_set_mode): New routine.
4778 2014-07-18 Arnaud Charlet <charlet@adacore.com>
4780 * gcc-interface/decl.c, gcc-interface/trans.c,
4781 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
4782 Is_Packed_Array_Impl_Type.
4784 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4786 * sem_util.adb: Minor typo correction.
4788 2014-07-18 Ben Brosgol <brosgol@adacore.com>
4790 * gnat_rm.texi: Complete previous change.
4792 2014-07-18 Pascal Obry <obry@adacore.com>
4794 * s-fileio.adb: Minor style fix.
4796 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4798 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
4799 specification of stream attributes for subtypes that are not
4800 first subtypes, to prevent malformed rep_item chains in the case
4801 of such illegal specifications for discriminated private subtypes.
4802 (Check_Overloaded_Name): Verify that the name is an entity name
4803 before other checks.
4805 2014-07-18 Pascal Obry <obry@adacore.com>
4807 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
4809 2014-07-18 Robert Dewar <dewar@adacore.com>
4811 * sem_prag.adb, sem_attr.adb,
4812 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
4814 2014-07-18 Pascal Obry <obry@adacore.com>
4816 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
4817 * initialize.c (__gnat_wide_text_translation_required): Defined here.
4819 2014-07-18 Pascal Obry <obry@adacore.com>
4821 * adaint.c (__gnat_fputwc): New routine.
4822 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
4824 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4826 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
4827 (Set_Stores_Attribute_Old_Prefix): New routine.
4828 (Stores_Attribute_Old_Prefix): New routine.
4829 (Write_Entity_Flags):
4830 Output flag Stores_Attribute_Old_Prefix.
4831 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
4833 (Set_Stores_Attribute_Old_Prefix): New routine
4834 along with pragma Inline.
4835 (Stores_Attribute_Old_Prefix): New
4836 routine along with pragma Inline.
4837 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
4838 constant which captures the result of attribute 'Old's prefix.
4839 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
4840 relocated expression which acted as a prefix of attribute 'Old.
4842 2014-07-18 Bob Duff <duff@adacore.com>
4844 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
4845 null before dispatching to Deallocate_Subpool.
4846 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
4847 parameter of Default_Subpool_For_Pool to 'in out'.
4848 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
4849 a message to the raise.
4850 * sem_util.adb: Minor reformatting.
4852 2014-07-18 Robert Dewar <dewar@adacore.com>
4854 * sem_util.adb (Check_Expression_Against_Static_Predicate):
4855 Mark expression as non-static if it fails static predicate check,
4856 and issue additional warning.
4858 2014-07-18 Pascal Obry <obry@adacore.com>
4860 * a-witeio.adb (Put): Control translation based on
4861 wide_text_translation_required.
4862 * adaint.c (CurrentCCSEncoding): New variable.
4863 * initialize.c (__gnat_initialize): On Windows initialize
4864 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
4865 environment variable.
4866 * mingw32.h (CurrentCCSEncoding): New external.
4867 (__gnat_wide_text_translation_required): Likewise.
4868 * sysdep.c (wide_text_translation_required): New variable.
4869 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
4871 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4873 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
4874 variable Refined_States. Add global variable Matched_Items.
4875 (Check_Dependency_Clause): Account for dependency
4876 clauses utilizing states with visible null refinements.
4877 (Is_Null_Refined_State): New routine.
4878 (Match_Items): Record each successfully matched item of pragma Depends.
4879 (Record_Item): New routine.
4881 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4883 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
4884 Do_Range_Check flag on a dynamic index expression used in a
4885 component association in the argument of Update.
4887 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4889 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
4891 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4893 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
4894 of enclosing blocks, loops and the enclosing function using a
4895 parent-based traversal.
4896 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
4897 stack reclamation if the iterator loop contains a return statement
4898 that uses the stack.
4899 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
4900 patch up the scope stack as the secondary stack management now
4901 takes into account the enclosing function of the iterator loop.
4903 2014-07-18 Robert Dewar <dewar@adacore.com>
4905 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
4907 2014-07-18 Robert Dewar <dewar@adacore.com>
4909 * einfo.adb (Has_Static_Predicate): New function.
4910 (Set_Has_Static_Predicate): New procedure.
4911 * einfo.ads (Has_Static_Predicate): New flag.
4912 * sem_ch13.adb (Is_Predicate_Static): New function
4913 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
4914 (Add_Call): Minor change in Sloc of generated expression
4915 (Add_Predicates): Remove setting of Static_Pred, no longer used.
4916 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
4917 replace by use of the entity flag Has_Static_Predicate_Aspect.
4918 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
4919 and issue warning that predicate is not checked for now.
4920 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
4922 * sem_util.adb (Check_Expression_Against_Static_Predicate):
4923 Carry out check for any case where there is a static predicate,
4924 and output appropriate message.
4925 * sinfo.ads: Minor comment corrections.
4927 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4929 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
4930 from an untagged private type whose full view is tagged, the type
4931 is marked tagged for layout reasons, but it has no dispatch table,
4932 so Set_All_DT_Position must not be called.
4933 * exp_ch13.adb: If the freeze node is for a type internal to a
4934 record declaration, as is the case for a class-wide subtype
4935 of a parent component, the relevant scope is the scope of the
4938 2014-07-18 Thomas Quinot <quinot@adacore.com>
4940 * g-memdum.adb, g-memdum.ads: Code clean ups.
4942 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4944 * sem_prag.adb (Check_Dependency_Clause):
4945 Update the comment on usage. Reimplement the mechanism which
4946 attempts to match a single clause of Depends against one or
4947 more clauses of Refined_Depends.
4948 (Input_Match): Removed.
4949 (Inputs_Match): Removed.
4950 (Is_Self_Referential): Removed.
4951 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
4952 (Normalize_Outputs): Rename variable Split to New_Claue and update
4953 all its occurrences.
4954 (Report_Extra_Clauses): Update the comment on usage.
4955 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
4957 2014-07-18 Gary Dismukes <dismukes@adacore.com>
4959 * i-cstrea.ads: Minor reformatting.
4961 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
4963 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
4964 secondary stack-related flags to the generated block.
4965 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
4966 once the loop is relocated in a block.
4968 2014-07-18 Robert Dewar <dewar@adacore.com>
4970 * repinfo.ads: Add documentation on handling of back annotation
4973 2014-07-18 Ed Schonberg <schonberg@adacore.com>
4975 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
4976 of full type declaration, denotes previous declaration for
4977 incomplete view of the type.
4978 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
4979 of declaration if one is present.
4980 (Replace_Type): When constructing the signature of an inherited
4981 operation, handle properly the case where the operation has a
4982 formal whose type is an incomplete view.
4983 * sem_util.adb (Collect_Primitive_Operations): Handle properly
4984 the case of an operation declared after an incomplete declaration
4985 for a type T and before the full declaration of T.
4987 2014-07-18 Pascal Obry <obry@adacore.com>
4989 * i-cstrea.ads: Add documentation for set_wide_text_mode.
4991 2014-07-18 Robert Dewar <dewar@adacore.com>
4993 * a-witeio.adb: Minor code reorganization.
4994 * i-cstrea.ads: Add comment.
4996 2014-07-18 Thomas Quinot <quinot@adacore.com>
4998 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5001 2014-07-18 Robert Dewar <dewar@adacore.com>
5003 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5005 2014-07-18 Pascal Obry <obry@adacore.com>
5007 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5008 * a-witeio.adb (Put): On platforms where there is translation
5009 done by the OS output the raw text.
5010 (New_Line): Use Put above to properly handle the LM wide characters.
5012 2014-07-18 Thomas Quinot <quinot@adacore.com>
5014 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5015 to Absolute_Address.
5017 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5019 * opt.ads (Suppress_Back_Annotation): Remove as unused.
5020 * fe.h (Back_Annotate_Rep_Info): Likewise.
5021 (Global_Discard_Names): Likewise.
5023 2014-07-18 Robert Dewar <dewar@adacore.com>
5025 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5028 2014-07-18 Vincent Celier <celier@adacore.com>
5030 * s-osinte-vms.ads: Fix style errors.
5032 2014-07-18 Thomas Quinot <quinot@adacore.com>
5034 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5035 NAME_MAX and PATH_MAX.
5037 2014-07-18 Bob Duff <duff@adacore.com>
5039 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5040 Build_Record_Or_Elementary_Output_Procedure): For Input and
5041 Output attributes, do not read/write the discriminants if they
5042 have default values; that will be done by Read/Write.
5044 2014-07-18 Robert Dewar <dewar@adacore.com>
5046 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5047 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5048 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5049 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5050 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5052 2014-07-18 Robert Dewar <dewar@adacore.com>
5054 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5056 2014-07-18 Vincent Celier <celier@adacore.com>
5058 * lib-writ.ads: Update documentation about the D lines.
5060 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5062 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5063 as a parameter, rather than its Chars field, in order to locate
5064 freeze node of type. If the predicate or invariant has references
5065 to types other than the one to which the contract applies, these
5066 types must be frozen, and the corresponding predicate functions
5067 created, before that freeze node.
5069 2014-07-18 Robert Dewar <dewar@adacore.com>
5071 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5072 * par_sco.adb: Minor reformatting.
5074 2014-07-18 Gary Dismukes <dismukes@adacore.com>
5076 * exp_ch4.adb (Real_Range_Check): Turn off
5077 the Do_Range_Check flag on the conversion's current Expression
5078 argument rather than on the originally captured Operand node,
5079 as Expression may reflect a rewriting (as in conversions to a
5082 2014-07-18 Vincent Celier <celier@adacore.com>
5084 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5086 * ali.ads (Sdep_Record): New component Unit_Name.
5087 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5088 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5089 dependent unit is in a project and the source file name is not
5092 2014-07-18 Bob Duff <duff@adacore.com>
5094 * s-addima.ads: Minor: add comment.
5096 2014-07-18 Thomas Quinot <quinot@adacore.com>
5098 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5099 of nesting rules for composites with different SSOs.
5101 2014-07-18 Thomas Quinot <quinot@adacore.com>
5103 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5104 a proper logical operator.
5105 (Has_Decision): An If_Expression indicates the presence of a decision
5106 although it is not a logical operator.
5108 2014-07-18 Robert Dewar <dewar@adacore.com>
5110 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5111 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5113 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
5115 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5116 on the null statement.
5118 2014-07-18 Thomas Quinot <quinot@adacore.com>
5120 * adaint.c: Minor comment rewording.
5121 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5122 use of errno in this file is thread safe.
5124 2014-07-18 Arnaud Charlet <charlet@adacore.com>
5126 * gnat_ugn.texi: Doc clarification.
5127 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5128 * sem_ch13.ads: Minor comment update.
5130 2014-07-18 Robert Dewar <dewar@adacore.com>
5132 * repinfo.ads: Minor comment fix.
5134 2014-07-18 Robert Dewar <dewar@adacore.com>
5136 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5137 * sem_prag.adb: Add dummy implementation of
5138 Default_Scalar_Storage_Order.
5139 * snames.ads-tmpl: Add dummy entry for
5140 Default_Scalar_Storage_Order pragma.
5142 2014-07-18 Robert Dewar <dewar@adacore.com>
5144 * opt.adb (Tree_Read): Read Address_Is_Private,
5145 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5146 (Tree_Write): Corresponding writes
5147 * opt.ads: Minor comment reformatting and fixes.
5148 * tree_io.ads: Increment ASIS_Version_Number.
5150 2014-07-18 Robert Dewar <dewar@adacore.com>
5152 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5153 * types.h: Fix typo.
5155 2014-07-18 Robert Dewar <dewar@adacore.com>
5157 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
5159 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
5161 * sem_ch13.adb (Kill_Rep_Clause): New procedure
5162 (Analyze_Attribute_Definition_Clause): Use
5163 Kill_Rep_Clause. This is just a cleanup, no functional effect.
5164 (Analyze_Enumeration_Representation_Clause):
5165 Use Kill_Rep_Clause. This means that enum rep
5166 clauses are now properly removed from -gnatct trees.
5167 (Analyze_Record_Representation_Clause): Same change.
5168 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
5170 2014-07-18 Pascal Obry <obry@adacore.com>
5172 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
5173 OS_Time from time parts.
5174 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
5176 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5178 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
5179 indexing over containers that are derived types: check whether
5180 signature of found operation has the correct first parameter
5181 before retrieving directly a primitive operation.
5183 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5185 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5186 Do_Range_Check flag on dynamic bounds of a range used in a
5187 component association in the argument of Update.
5189 2014-07-18 Thomas Quinot <quinot@adacore.com>
5191 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
5192 accesses to errno(3) to be thread safe.
5194 2014-07-18 Vincent Celier <celier@adacore.com>
5196 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
5197 limited imported project that is an extending project, return
5198 a project being extended if it has the expected name.
5200 2014-07-18 Pascal Obry <obry@adacore.com>
5202 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
5203 routine to set the last modification time stamp for the given file.
5204 * gnatchop.adb (File_Time_Stamp): Removed.
5206 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
5208 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5210 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
5211 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
5212 Moved here, so it can be shared with the resolution of 'Update,
5213 whose argument shares some features with aggregates.
5214 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
5215 Aggregate_Constraint_Checks with the expression of each
5216 association, so that the Do_Range_Check flag is set when needed.
5218 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5220 * sem_ch4.adb (Try_Container_Indexing): If the container
5221 type is a derived type, the value of the inherited aspect is
5222 the Reference operation declared for the parent type. However,
5223 Reference is also a primitive operation of the new type, and
5224 the inherited operation has a different signature. We retrieve
5225 the right one from the list of primitive operations of the
5228 2014-07-18 Vincent Celier <celier@adacore.com>
5230 * debug.adb: Update comment.
5232 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5234 * exp_util.adb (Needs_Finalization): There is no reason why a
5235 C type should not benefit from finalization actions.
5237 2014-07-18 Thomas Quinot <quinot@adacore.com>
5239 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
5240 (FILENAME_MAX): Remove unneeded definition.
5242 2014-07-18 Robert Dewar <dewar@adacore.com>
5244 * exp_attr.adb, debug.adb: Update comments.
5246 2014-07-18 Vincent Celier <celier@adacore.com>
5248 * par-ch4.adb (Simple_Expression): Add missing style check
5249 for binary adding operators.
5250 (Term): Add missing style check for multiplying operators.
5252 2014-07-18 Robert Dewar <dewar@adacore.com>
5254 * impunit.adb: Minor comment correction.
5255 * widechar.adb, s-wchcon.ads: Minor comment corrections.
5257 2014-07-18 Robert Dewar <dewar@adacore.com>
5259 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
5260 for Build_Static_Predicate (Build_Predicate_Functions):
5261 Don't try to build discrete predicate for real type.
5262 (Build_Predicate_Functions): Report attempt to use
5263 Static_Predicate function on real type as unimplemented.
5264 * sem_util.adb (Check_Expression_Against_Static_Predicate):
5265 Add guard to prevent blow up on predicate for real type.
5267 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5269 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
5270 properly static predicate on enumeration types and modular types
5273 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
5275 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
5276 the corresponding source file index.
5277 * get_scos.ads (Get_SCOs): Add a default value for it.
5278 * par_sco.adb (SCO_Record): Fill the corresponding value.
5281 2014-07-18 Vincent Celier <celier@adacore.com>
5283 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
5284 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
5286 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
5288 2014-07-18 Thomas Quinot <quinot@adacore.com>
5290 * g-sercom.ads (Set): document possible data loss.
5292 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5294 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
5295 Output, Read, Write): If the restriction No_Streams is active,
5296 replace each occurrence of a stream attribute by an explicit
5299 2014-07-18 Robert Dewar <dewar@adacore.com>
5301 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
5304 2014-07-18 Robert Dewar <dewar@adacore.com>
5306 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
5308 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
5309 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
5310 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
5311 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
5313 2014-07-18 Robert Dewar <dewar@adacore.com>
5315 * bcheck.adb (Check_Consistent_Restrictions):
5316 Remove obsolete code checking for violation of
5317 No_Standard_Allocators_After_Elaboration (main program)
5318 * bindgen.adb (Gen_Adainit): Handle
5319 No_Standard_Allocators_After_Elaboration
5320 (Gen_Output_File_Ada): ditto.
5321 * exp_ch4.adb (Expand_N_Allocator): Handle
5322 No_Standard_Allocators_After_Elaboration.
5323 * Makefile.rtl: Add entry for s-elaall
5324 * rtsfind.ads: Add entry for Check_Standard_Allocator.
5325 * s-elaall.ads, s-elaall.adb: New files.
5326 * sem_ch4.adb (Analyze_Allocator): Handle
5327 No_Standard_Allocators_After_Elaboration.
5329 2014-07-18 Robert Dewar <dewar@adacore.com>
5331 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
5332 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
5333 Remove AB parameter from ali files and all uses.
5334 Remove Allocator_In_Body and all uses.
5336 2014-07-18 Robert Dewar <dewar@adacore.com>
5338 * g-expect-vms.adb: Add comment.
5340 2014-07-18 Thomas Quinot <quinot@adacore.com>
5342 * par_sco.adb (Is_Logical_Operation): return True for
5345 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5347 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
5348 analysis and resolution of each choice in the associations within
5349 the argument of Update, because they may be variable names.
5351 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5353 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
5354 actions before the generated if statement.
5356 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
5358 * gnat_ugn.texi Enhance the documentation of
5359 switches -gnateA and -gnateV.
5361 2014-07-18 Ed Schonberg <schonberg@adacore.com>
5363 * sem_util.adb (Build_Default_Subtype): Add missing condition
5364 so that code matches description: use the full view of the base
5365 only if the base is private and the subtype is not.
5367 2014-07-17 Gary Dismukes <dismukes@adacore.com>
5369 * exp_disp.adb: Minor reformatting.
5370 * exp_disp.adb: Minor code reorganization.
5372 2014-07-17 Thomas Quinot <quinot@adacore.com>
5374 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
5375 require an explicit SSO attribute definition clause on a composite type
5376 just because one of its components has one.
5378 2014-07-17 Robert Dewar <dewar@adacore.com>
5380 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
5381 attribute out of existence if the enclosing pragma is ignored.
5382 * sem_util.adb: Minor reformatting.
5384 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5386 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
5387 array aggregate expanded into assignments when it appears as a
5388 local declaration in an inlined body.
5390 2014-07-17 Doug Rupp <rupp@adacore.com>
5392 * init.c [__ANDROID__]: Modify for ZCX.
5393 * exp_aggr.adb: Minor reformatting
5394 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
5396 2014-07-17 Robert Dewar <dewar@adacore.com>
5398 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
5399 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
5400 scng.adb: Remove incorrect usage "allow to" and "allows to".
5402 2014-07-17 Robert Dewar <dewar@adacore.com>
5404 * exp_dist.adb: Minor reformatting.
5406 2014-07-17 Bob Duff <duff@adacore.com>
5408 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
5410 2014-07-17 Robert Dewar <dewar@adacore.com>
5412 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
5413 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
5415 2014-07-17 Thomas Quinot <quinot@adacore.com>
5417 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
5418 non-bit-packed array, propagate Reverse_Storage_Order to the
5421 2014-07-17 Javier Miranda <miranda@adacore.com>
5423 * exp_disp.adb: Fix comment.
5424 * exp_pakd.adb: Minor reformatting.
5426 2014-07-17 Robert Dewar <dewar@adacore.com>
5428 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
5429 entity if none exists (Gen_Elab_Calls): Complain if clash with
5430 No_Multiple_Elaboration.
5431 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
5432 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
5434 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
5435 * sem_ch4.adb: Minor comment updates.
5437 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5439 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
5440 of function call for later use when shared passive objects
5443 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5445 * par-ch13.adb (Get_Aspect_Specifications):
5446 Catch a case where the argument of SPARK aspect Refined_State
5447 is not properly parenthesized.
5449 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5451 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
5452 the lifetime of a reference to an Ada 2012 container element.
5453 (Is_Element_Reference): New routine.
5455 2014-07-17 Robert Dewar <dewar@adacore.com>
5457 * ali.ads: Minor comment fix.
5458 * lib-writ.adb: Minor reformatting.
5460 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5462 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
5463 in ASIS mode, load another subunit only if it a subunit of the
5464 current one, not a sibling that has been reached through the
5465 analysis of an ancestor. This allows the construction of the
5466 ASIS tree for the subunit even when sibling subunits have errors.
5468 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5470 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
5471 prevents the analysis of various contracts when the associated
5472 construct is erroneous.
5473 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
5474 SPARK_Pragma of an illegal or a partially decorated construct.
5476 2014-07-17 Robert Dewar <dewar@adacore.com>
5478 * s-imguns.ads: Minor reformatting.
5480 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5482 * exp_ch7.adb (Build_Finalization_Master): Move all local
5483 variables to the proper code section. When looking for an existing
5484 finalization master, inspect the ultimate ancestor type of the
5486 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
5488 2014-07-17 Robert Dewar <dewar@adacore.com>
5490 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
5491 * gnat_rm.texi: Document Entity argument for pragma Annotate and
5493 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
5494 for Annotate aspect.
5495 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
5496 Entity argument at end.
5497 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
5499 2014-07-17 Tristan Gingold <gingold@adacore.com>
5501 * s-imguns.ads: Fix minor typo.
5503 2014-07-17 Thomas Quinot <quinot@adacore.com>
5505 * sprint.adb: Minor reformatting.
5507 2014-07-17 Robert Dewar <dewar@adacore.com>
5509 * sprint.adb (Write_Itype): Print proper header for string
5512 2014-07-17 Steve Baird <baird@adacore.com>
5514 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
5516 2014-07-17 Vincent Celier <celier@adacore.com>
5518 * gnatbind.adb: Change in message "try ... for more information".
5520 2014-07-17 Robert Dewar <dewar@adacore.com>
5522 * sprint.adb: Code clean up.
5524 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5526 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
5527 the relevant code section. Add new local constant Obj_Id. When
5528 a limited controlled object is initialized by a function call,
5529 the build-in-place object access function call acts as the last
5530 initialization statement.
5531 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
5532 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
5533 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
5535 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5537 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
5538 propagate intrinsic flag to renamed entity, to allow e.g. renaming
5539 of Unchecked_Conversion.
5540 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
5541 if the declaration has errors.
5543 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5545 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
5546 container is busy before checking whether capacity allows for
5547 a further insertion. Insertion in a busy container that is full
5548 raises Program_Error rather than Capacity_Error. Previous to that
5549 patch which exception was raised varied among container types.
5551 2014-07-17 Robert Dewar <dewar@adacore.com>
5553 * g-comlin.ads, g-comlin.adb: Minor clean up.
5555 2014-07-17 Bob Duff <duff@adacore.com>
5557 * gnat_ugn.texi: Update gnatpp doc.
5559 2014-07-17 Robert Dewar <dewar@adacore.com>
5561 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
5562 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
5563 could do this by actually expanding a real generic.
5564 * a-tags.ads: Add comments about performance.
5565 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
5566 Print Etype of defining identifier, rather than the object
5567 definition. More information.
5569 2014-07-17 Thomas Quinot <quinot@adacore.com>
5571 * exp_dist.adb: Minor documentation clarification.
5573 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5575 * exp_util.adb (Is_Aliased): Revert previous change.
5577 2014-07-17 Vincent Celier <celier@adacore.com>
5579 * g-comlin.adb (Try_Help): New procedure.
5580 (Getopt): Use new procedure Try_Help.
5581 * g-comlin.ads (Try_Help): New procedure.
5583 2014-07-17 Bob Duff <duff@adacore.com>
5585 * gnat_ugn.texi: Minor update.
5587 2014-07-17 Robert Dewar <dewar@adacore.com>
5589 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
5590 * sinfo.ads: Document restriction on aggregates (must expand to
5591 assignments if one or more assignments needs expansion, e.g. for
5593 * sem_ch13.adb: All warning messages regarding bit order should
5595 * gnat_ugn.texi: Minor correction of missing @ on @code
5597 2014-07-17 Robert Dewar <dewar@adacore.com>
5599 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
5600 * s-rident.ads (Partition_Boolean_Restrictions): Add
5601 No_Long_Long_Integer.
5602 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
5603 Long_Integer'Size if restriction No_Long_Long_Integer is active.
5604 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
5605 as the implicit base type for a signed integer type declaration
5606 if restriction No_Long_Long_Integer is active.
5607 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
5608 No_Long_Long_Integer.
5610 2014-07-17 Robert Dewar <dewar@adacore.com>
5612 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
5613 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
5614 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
5615 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
5616 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
5618 2014-07-17 Robert Dewar <dewar@adacore.com>
5620 * debug.adb: Remove -gnatdQ.
5621 * exp_disp.adb: Remove -gnatdQ.
5622 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
5623 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
5624 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
5625 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
5626 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
5627 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
5629 2014-07-17 Robert Dewar <dewar@adacore.com>
5631 * back_end.adb: Minor reformatting and comment additions.
5632 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
5634 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
5635 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
5636 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
5637 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
5638 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
5639 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
5641 2014-07-17 Robert Dewar <dewar@adacore.com>
5643 * gnat_rm.texi: Minor comment updates.
5645 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5647 * sem_util.adb (Make_Explicit_Dereference): If the expression
5648 being dereferenced is a generalized indexing, reset the overloaded
5649 flag on the generalized indexing call, consistent with the
5650 resetting of the flag on the original indexed component.
5652 2014-07-17 Robert Dewar <dewar@adacore.com>
5654 * gnat_ugn.texi: Document advise not to mix -gnatV? and
5657 2014-07-17 Robert Dewar <dewar@adacore.com>
5659 * checks.adb (Insert_Valid_Check): Don't insist on a name
5660 for the prefix when we make calls to Force_Evaluation and
5661 Duplicate_Subexpr_No_Checks.
5662 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
5663 (Remove_Side_Effects): Handle all volatile references right
5664 (Side_Effect_Free): Volatile reference is never side effect free
5665 * sinfo.ads (N_Attribute_Reference): Add comments explaining
5666 that in the tree, the prefix can be a general expression.
5668 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5670 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
5671 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
5672 * sem_ch7.adb (Analyze_Package_Body_Contract,
5673 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
5675 2014-07-17 Robert Dewar <dewar@adacore.com>
5677 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
5678 Store_After_Actions_In_Scope.
5680 2014-07-17 Robert Dewar <dewar@adacore.com>
5682 * sem_aux.ads: Minor comment addition.
5684 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5686 * sem_res.adb (Make_Call_Into_Operator): If the call is already
5687 a rewriting of an operator node, there are no actuals to be
5688 propagated from original node to rewritten node when in ASIS mode.
5690 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5692 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
5693 Analyze_Subprogram_Contract): Add new local variable Mode. Save
5694 and restore the SPARK mode of the related construct in a
5696 * sem_ch7.adb (Analyze_Package_Body_Contract,
5697 Analyze_Package_Contract): Add new local variable Mode. Save and
5698 restore the SPARK mode of the related construct in a stack-like fashion.
5699 * sem_util.adb Remove with and use clause for Opt.
5700 (Restore_SPARK_Mode): New routine.
5701 (Save_SPARK_Mode_And_Set): New routine.
5702 * sem_util.ads Add with and use clause for Opt.
5703 (Restore_SPARK_Mode): New routine.
5704 (Save_SPARK_Mode_And_Set): New routine.
5706 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5708 * exp_util.adb (Is_Aliased): Transient objects
5709 within an expression with actions cannot be considered aliased.
5711 2014-07-17 Thomas Quinot <quinot@adacore.com>
5713 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
5714 introduce a new list (cleanup actions) for each (transient) scope.
5715 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
5717 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
5718 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
5719 processing for Store_xxx_Actions_In_Scope.
5720 (Build_Cleanup_Statements): Allow for a list of additional
5721 cleanup statements to be passed by the caller.
5722 (Expand_Cleanup_Actions): Take custom cleanup actions associated
5723 with an N_Block_Statement into account.
5724 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
5725 reorganization (refactoring only, no behaviour change).
5726 (Make_Transient_Block): Add assertion to ensure that the current
5727 scope is indeed a block (namely, the entity for the transient
5728 block being constructed syntactically, which has already been
5729 established as a scope). If cleanup actions are present in the
5730 transient scope, transfer them now to the transient block.
5731 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
5732 called function while it is still present as the name in a call
5733 in the tree. This may not be the case later on if the call is
5734 rewritten into a transient block.
5735 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
5736 inserted after calling a protected operation on a shared passive
5737 protected must be performed in a block finalizer, not just
5738 inserted in the tree, so that they are executed even in case of
5739 a normal (RETURN) or abnormal (exception) transfer of control
5740 outside of the current scope.
5741 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
5742 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
5743 Scope_Stack_Entry reorganization.
5745 2014-07-17 Thomas Quinot <quinot@adacore.com>
5747 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
5748 call for types that do not have an explicit attribute definition
5749 clause for External_Tag, as their default tag may clash with an
5750 explicit tag defined for some other type.
5752 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
5754 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
5755 controlled function call with multiple actual parameters that
5756 appears in Object.Operation form.
5758 2014-07-17 Thomas Quinot <quinot@adacore.com>
5760 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
5762 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5763 External_Tag): No need to set entity flag.
5764 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
5765 Reimplement correctly in terms of Has_Rep_Item.
5767 2014-07-17 Thomas Quinot <quinot@adacore.com>
5769 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
5770 Start examining the tree at the node passed to
5771 Establish_Transient_Scope (not its parent).
5772 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5773 The access type for the variable storing the reference to
5774 the call must be declared and frozen prior to establishing a
5776 * exp_ch9.adb: Minor reformatting.
5778 2014-07-17 Pascal Obry <obry@adacore.com>
5780 * s-os_lib.ads: Minor comment update.
5782 2014-07-17 Tristan Gingold <gingold@adacore.com>
5784 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
5786 * socket.c: Remove #warning to avoid warning.
5787 * expect.c: Indent some preprocessor directives to clarify
5788 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
5790 * env.c: Fix indentation. Port to PikeOS.
5791 * gsocket.h: Port to PikeOS. Remove #warning.
5792 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
5793 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
5794 of stubbed __gnat_setup_parent_communication.
5795 * adaint.c: Port to PikeOS. Reindent some preprocessor
5796 directives to clarify nested if. Fix indentation. Add missing
5799 2014-07-17 Robert Dewar <dewar@adacore.com>
5801 * sem_attr.adb: Minor reformatting.
5803 2014-07-17 Robert Dewar <dewar@adacore.com>
5805 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
5807 2014-07-17 Ed Schonberg <schonberg@adacore.com>
5809 * sem_case.adb (Check_Choice_Set): If the case expression is the
5810 expression in a predicate, do not recheck coverage against itself,
5811 to prevent spurious errors.
5812 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
5813 expression comes from an aspect specification, to prevent spurious
5814 errors when expression is a case expression in a predicate.
5816 2014-07-17 Pascal Obry <obry@adacore.com>
5818 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
5819 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
5821 2014-07-17 Vincent Celier <celier@adacore.com>
5823 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
5824 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
5825 the usage for an erroneous invocation of a gnat tool.
5827 2014-07-16 Vincent Celier <celier@adacore.com>
5829 * gnatls.adb: Get the target parameters only if -nostdinc was
5832 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5834 * checks.adb (Insert_Valid_Check): If the expression is a packed
5835 component of a modular type of the right size the data is always
5836 valid. This os particularly useful if the component is part of
5837 a volatile variable.
5839 2014-07-16 Robert Dewar <dewar@adacore.com>
5841 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
5843 2014-07-16 Thomas Quinot <quinot@adacore.com>
5845 * exp_ch7.ads: Minor documentation fix.
5847 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5849 * sem_ch3.adb (Find_Type_Name): Diagnose properly
5850 a private extension completion that is an interface definition
5851 with an interface list.
5853 2014-07-16 Arnaud Charlet <charlet@adacore.com>
5855 * gnatls.adb (Gnatls): Code clean ups.
5857 2014-07-16 Thomas Quinot <quinot@adacore.com>
5859 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
5860 * sem.adb (Analyze): Handle N_Compound_Statement.
5861 * sprint.adb (Sprint_Node_Actual): Ditto.
5862 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
5863 procedure to handle N_Compound_Statement.
5864 * exp_aggr.adb (Collect_Initialization_Statements):
5865 Use a proper compound statement node, instead of a bogus
5866 expression-with-actions with a NULL statement as its expression,
5867 to wrap collected initialization statements.
5868 * freeze.ads, freeze.adb
5869 (Explode_Initialization_Compound_Statement): New public procedure,
5870 lifted from Freeze_Entity.
5871 (Freeze_Entity): When freezing
5872 an object with captured initialization statements and without
5873 delayed freezing, explode compount statement.
5874 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
5875 case that used to handle bogus EWAs with NULL statement as
5877 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
5878 delayed freezing and captured initialization statements, explode
5881 2014-07-16 Gary Dismukes <dismukes@adacore.com>
5883 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
5885 2014-07-16 Doug Rupp <rupp@adacore.com>
5887 * s-interr-hwint.adb: Casing error on parameter.
5889 2014-07-16 Pascal Obry <obry@adacore.com>
5891 * Makefile.rtl: Add g-rewdat.o dependencies in
5892 GNATRTL_NONTASKING_OBJS.
5894 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5896 * sem_case.adb: Code clean up.
5898 2014-07-16 Vincent Celier <celier@adacore.com>
5900 * make.adb: Do not read gnat.adc when gnatmake is invoked
5903 2014-07-16 Pascal Obry <obry@adacore.com>
5905 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
5906 implementation of GNAT.Rewrite_Data.
5908 2014-07-16 Vincent Celier <celier@adacore.com>
5910 * gnatls.adb (Normalize): New function.
5911 (Gnatls): Get the target parameters. On targets other than VMS,
5912 normalize the path names in the source search path, the object search
5913 path and the project search path.
5915 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5917 * sem_case.adb: Avoid self-checking of case expressions in
5920 2014-07-16 Robert Dewar <dewar@adacore.com>
5922 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
5925 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
5927 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
5929 2014-07-16 Ben Brosgol <brosgol@adacore.com>
5931 * gnat_ugn.texi: Fix typo.
5933 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5935 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
5936 expression if it is the specification of a subtype predicate:
5937 it will be expanded when the return statement is analyzed, or
5938 when a static predicate is transformed into a static expression
5939 for evaluation by the front-end.
5940 * sem_ch13.adb (Get_RList): If the expression for a static
5941 predicate is a case expression, extract the alternatives of the
5942 branches with a True value to create the required statically
5943 evaluable expression.
5945 2014-07-16 Thomas Quinot <quinot@adacore.com>
5947 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
5948 expression, not the location of the aspect, for all generated
5949 code, so that in particular the call to raise_assert_failure
5950 gets the sloc of the associated condition.
5952 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
5953 Set an explicit End_Label on the handled sequence of statements
5954 for the _Postconditions procedure so that the implicit return
5955 statement does not erroneously get associated with code generated
5956 for the last condition in postconditions.
5958 2014-07-16 Thomas Quinot <quinot@adacore.com>
5960 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
5961 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
5962 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
5965 2014-07-16 Robert Dewar <dewar@adacore.com>
5967 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
5968 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
5969 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
5971 * par-ch4.adb (At_Start_Of_Attribute): New function
5972 (P_Simple_Expression): Better msg for bad attribute prefix.
5973 * scans.ads: Minor reformatting.
5975 2014-07-16 Ed Schonberg <schonberg@adacore.com>
5977 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
5978 static constant, check that in belongs to the corresponding index
5979 subtype, to produce the proer warning when expansion is disabled.
5981 2014-07-16 Robert Dewar <dewar@adacore.com>
5983 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
5984 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
5985 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
5986 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
5987 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
5989 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
5990 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
5993 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
5995 * exp_ch7.adb (Process_Declarations): Reinstate the check on
5996 a hook object to ensure that the related transient declaration
5998 * exp_util.adb (Is_Aliased): Do not consider expresison with
5999 actions as a special context.
6000 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6001 ensure that the related transient declaration is finalizable.
6003 2014-07-16 Robert Dewar <dewar@adacore.com>
6005 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6006 * snames.ads-tmpl: Add Allocation_Check to list of check names.
6007 * types.ads: Add Allocation_Check to list of check names.
6009 2014-07-16 Thomas Quinot <quinot@adacore.com>
6011 * sem_util.adb (Enter_Name): replace bogus test for presence of
6012 Corresponding_Remote_Type with correct test on Ekind.
6013 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6014 of calls to Corresponding_ Remote_Type (documentation fix).
6016 2014-07-16 Robert Dewar <dewar@adacore.com>
6018 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6019 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6021 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6022 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6024 2014-07-16 Robert Dewar <dewar@adacore.com>
6026 * gnat_ugn.texi: Document binder switch -Ra.
6027 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6029 * opt.ads (List_Closure_All): New switch.
6030 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6033 2014-07-16 Ben Brosgol <brosgol@adacore.com>
6035 * gnat_rm.texi: Minor edits, to make case consistent in names
6036 of types and fields.
6038 2014-07-16 Robert Dewar <dewar@adacore.com>
6040 * gnat_rm.texi: Document erroneous mixing of thin pointers and
6042 * gnat_ugn.texi: Add note on size of access types about thin
6043 pointers and the use of attribute Unrestricted_Access.
6045 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6047 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6048 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6049 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6050 machinery to detect tampering on bounded vectors.
6052 2014-07-16 Robert Dewar <dewar@adacore.com>
6054 * gnat_rm.texi: Document that leading/trailing asterisks are
6055 now implied for the pattern match string for pragma Warnings
6056 and Warning_As_Error.
6057 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6058 (Analyze_Pragma, case Warning_As_Error): Call
6059 Acquire_Warning_Match_String.
6060 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6062 2014-07-16 Bob Duff <duff@adacore.com>
6064 * gnat_ugn.texi: Document need for project file
6065 for --incremental switch for gnat2xml.
6067 2014-07-16 Robert Dewar <dewar@adacore.com>
6069 * gnat_rm.texi: Fix example of non-packable components in packed
6072 2014-07-16 Robert Dewar <dewar@adacore.com>
6074 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6075 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6076 upper case in exception messages.
6078 2014-07-16 Robert Dewar <dewar@adacore.com>
6080 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6081 is renamed Has_Same_Storage.
6082 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6083 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6086 2014-07-16 Robert Dewar <dewar@adacore.com>
6088 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6089 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6091 2014-07-16 Robert Dewar <dewar@adacore.com>
6093 * gnat_ugn.texi: Add note that integrated
6094 preprocessing cannot be applied to configuration pragma files.
6096 2014-07-16 Yannick Moy <moy@adacore.com>
6098 * sem_attr.adb (Analyze_Attribute/cases Pred
6099 and Succ): Always enable range check on fixed-point types if
6100 not suppressed for the type.
6102 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6104 * sem_util.adb (State_Has_Enabled_Property):
6105 Account for an external property denoted by an others choice.
6107 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6109 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6110 * exp_ch7.adb (Process_Declarations): There is no need to check
6111 that a transient object being hooked is controlled as it would
6112 not have been hooked in the first place.
6113 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6114 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6115 (Is_Aliased): A renaming of a transient controlled object is
6116 not considered aliasing when it occurs within an expression
6118 (Requires_Cleanup_Actions): There is no need to
6119 check that a transient object being hooked is controlled as it
6120 would not have been hooked in the first place.
6121 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6123 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
6125 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6126 the outer level of routine Analyze_Aspect_Specifications. Ensure
6127 that the corresponding pragmas of aspects Initial_Condition and
6128 Initializes are inserted after pragma SPARK_Mode.
6130 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6132 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6133 properly a choice list with more than one choice, where each
6134 is an aggregate denoting a sequence of array indices for a
6135 multidimentional array. For SPARK use.
6137 2014-07-16 Vadim Godunko <godunko@adacore.com>
6139 * a-coinho-shared.adb (Adjust): Create
6140 copy of internal shared object and element when source container
6143 (Query_Element): Likewise.
6144 (Update_Element): Likewise.
6145 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6146 to get reference for empty holder.
6147 (Reference): Likewise.
6149 2014-07-16 Thomas Quinot <quinot@adacore.com>
6151 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6152 from Process_Transient_Oject.
6153 * exp_ch4.ads: Ditto.
6154 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6155 declaration as an action on the topmost enclosing expression,
6156 not on a possibly conditional subexpreession.
6158 2014-07-16 Vadim Godunko <godunko@adacore.com>
6160 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
6161 Fix parameter mode of Update_Element.
6163 2014-07-16 Robert Dewar <dewar@adacore.com>
6165 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
6168 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6170 * a-cohase.ads: Type Iterator must be controlled, so that the
6171 tampering bit is properly set through an iteration.
6172 * a-cohase.adb: Add Finalize operation for type Iterator.
6174 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6176 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
6179 2014-07-16 Ed Schonberg <schonberg@adacore.com>
6181 * a-coinho-shared.adb: Fix spurious accessibility check.
6183 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
6185 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
6187 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
6190 * gnat_rm.texi: Fix errors with makeinfo 5.1.
6192 2014-06-14 Arnaud Charlet <charlet@adacore.com>
6195 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
6197 2014-06-13 Yannick Moy <moy@adacore.com>
6199 * exp_attr.adb: Fix typo in comment.
6200 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
6201 checking in GNATprove_Mode.
6203 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6205 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
6207 2014-06-13 Robert Dewar <dewar@adacore.com>
6209 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
6212 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6214 * sem_prag.adb (Analyze_Pragma): Add local
6215 variable Missing_Parentheses. Emit an error when a state
6216 declaration with options appears without parentheses. Add a
6217 guard to prevent a bogus error when a state declaration may be
6218 interpreted as an option if a previous declaration with options
6219 was not parenthesized.
6221 2014-06-13 Robert Dewar <dewar@adacore.com>
6223 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
6224 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
6225 * checks.ads (Alignment_Warnings_Record): New type.
6226 (Alignment_Warnings): New table
6227 (Validate_Alignment_Check_Warnings): New procedure.
6228 * errout.adb (Delete_Warning_And_Continuations): New procedure
6229 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
6230 Warnings_Treated_As_Errors (Finalize): Minor reformatting
6231 * errout.ads (Warning_Msg): New variable
6232 (Delete_Warning_And_Continuations): New procedure
6233 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
6234 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
6236 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6238 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
6240 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6242 * errout.adb (SPARK_Msg_N): New routine.
6243 (SPARK_Msg_NE): New routine.
6244 * errout.ads Add a section on SPARK-related error routines.
6245 (SPARK_Msg_N): New routine.
6246 (SPARK_Msg_NE): New routine.
6247 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
6248 pragma Abstract_State is always inserted after SPARK_Mode.
6249 (Insert_After_SPARK_Mode): New routine.
6250 * sem_prag.adb (Analyze_Abstract_State,
6251 Analyze_Constituent, Analyze_External_Property,
6252 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
6253 Analyze_Global_List, Analyze_Initialization_Item,
6254 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
6255 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
6256 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
6257 Analyze_Refined_Global_In_Decl_Part,
6258 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
6259 Check_Aspect_Specification_Order, Check_Constituent_Usage,
6260 Check_Declaration_Order, Check_Dependency_Clause,
6261 Check_Duplicate_Mode, Check_Duplicate_Option,
6262 Check_Duplicate_Property, Check_External_Properties,
6263 Check_External_Property, Check_Function_Return,
6264 Check_Matching_Constituent, Check_Matching_State,
6265 Check_Mode_Restriction_In_Enclosing_Context,
6266 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
6267 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
6268 Has_Extra_Parentheses, Inconsistent_Mode_Error,
6269 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
6270 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
6271 Report_Unrefined_States, Report_Unused_Constituents,
6272 Report_Unused_States, Role_Error, Usage_Error):
6273 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
6274 to report semantic errors only when SPARK_Mode is on.
6275 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
6276 pragma Depends explicitly, this is now done by the analysis.
6277 (Analyze_Global_In_Decl_List): Do not check the syntax of
6278 pragma Global explicitly, this is now done by the analysis.
6279 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
6280 pragma Initializes explicitly, this is now done by the analysis.
6281 (Analyze_Part_Of): Do not check the syntax of the encapsulating
6282 state, this is now done by the analysis.
6283 (Analyze_Pragma): Do
6284 not check the syntax of a state declaration, this is now done
6286 (Analyze_Refined_Depends_In_Decl_Part): Do not
6287 check the syntax of pragma Refined_Depends explicitly, this is now
6288 done by the analysis.
6289 (Analyze_Refined_Global_In_Decl_Part): Do
6290 not check the syntax of pragma Refined_Global explicitly, this is
6291 now done by the analysis.
6292 (Analyze_Refined_State_In_Decl_Part):
6293 Do not check the syntax of pragma Refined_State explicitly, this
6294 is now done by the analysis.
6295 (Check_Dependence_List_Syntax): Removed.
6296 (Check_Global_List_Syntax): Removed.
6297 (Check_Initialization_List_Syntax): Removed.
6298 (Check_Item_Syntax): Removed.
6299 (Check_Missing_Part_Of): Do not consider items from an instance.
6300 (Check_Refinement_List_Syntax): Removed.
6301 (Check_State_Declaration_Syntax): Removed.
6302 (Collect_Global_List): Do not raise Program_Error when the input is
6304 (Process_Global_List): Do not raise Program_Error when the input
6306 * sem_ch13.adb: Minor reformatting.
6308 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6310 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
6311 that is an interface definition with an interface list.
6312 (Process_Full_View): Move error message on missmatched interfaces
6313 between views to the declaration of full view, for clarity.
6314 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
6317 2014-06-13 Robert Dewar <dewar@adacore.com>
6319 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
6322 2014-06-13 Robert Dewar <dewar@adacore.com>
6324 * makeutl.adb: Minor reformatting.
6326 2014-06-13 Gail Schenker <schenker@adacore.com>
6328 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
6329 associated flag (d.z), no longer needed.
6331 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6333 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
6334 Export aspects, do not check whether a corresponding Convention
6335 aspect has been specified. Convention is optional in Ada2012,
6336 and defaults to Convention_Ada.
6338 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
6340 * checks.adb (Apply_Address_Clause_Check): Only issue the new
6341 warning if the propagation warning is issued.
6343 2014-06-13 Thomas Quinot <quinot@adacore.com>
6345 * exp_ch4.adb: Minor reformatting.
6347 2014-06-13 Robert Dewar <dewar@adacore.com>
6349 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
6350 Handle float range check case (Expand_N_Attribute_Reference,
6351 case Succ): Handle float range check case.
6352 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
6355 2014-06-13 Vincent Celier <celier@adacore.com>
6357 * makeutl.ads (Compute_Builder_Switches): Change name of
6358 parameter Root_Environment to Env.
6359 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
6360 Env parameter of procedure Get_Or_Create_Configuration_File.
6361 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
6362 of new parameter Env.
6363 * prj-conf.ads (Locate_Runtime): New parameter Env of type
6364 Prj.Tree.Environment.
6366 2014-06-13 Robert Dewar <dewar@adacore.com>
6368 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
6370 2014-06-13 Robert Dewar <dewar@adacore.com>
6372 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
6374 * sem_attr.adb: Minor code reformatting and simplification.
6375 * checks.adb: Fix minor typo.
6377 2014-06-13 Emmanuel Briot <briot@adacore.com>
6379 * g-comlin.adb (Get_Argument): fix expansion
6380 of command line arguments (e.g. "*.adb") when using a custom
6381 parser. The parser was not passed to the recursive call, and
6382 thus we were trying to do the expansion on the default command
6385 2014-06-13 Thomas Quinot <quinot@adacore.com>
6387 * exp_ch9.adb: Minor reformatting.
6389 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6391 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
6392 To determine whether the attribute should be expanded, examine
6393 whether the enclosing postcondition pragma is to be checked,
6394 rather than using the internal flag Assertions_Enabled.
6396 2014-06-13 Ben Brosgol <brosgol@adacore.com>
6398 * gnat_rm.texi: Minor fixes.
6399 * gnat_ugn.texi: Added a missing "@itemize".
6401 2014-06-13 Robert Dewar <dewar@adacore.com>
6403 * debug.adb: Remove -gnatd.1 flag documentation.
6404 * layout.adb (Layout_Type): Remove special handling of size
6405 for anonymous access type.
6406 * sem_ch3.adb (Replace_Type): Remove special handling of size
6407 for anonymous access type.
6409 2014-06-13 Robert Dewar <dewar@adacore.com>
6411 * debug.adb: Document debug flag -gnatd.1.
6412 * layout.adb (Layout_Type): Size change for anonymous access
6413 types under -gnatd.1.
6414 * sem_ch3.adb (Replace_Type): Size change for anonymous access
6415 types under -gnatd.1.
6417 2014-06-13 Robert Dewar <dewar@adacore.com>
6419 * layout.adb (Layout_Type): Anonymous access types designating
6420 unconstrained arrays are always thin pointers.
6421 * sem_ch3.adb (Replace_Type): Anonymous access types designating
6422 unconstrained arrays are always thin pointers.
6424 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6426 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
6427 to resolve the prefix of an attribute that is an entity name
6428 and may be a parameterless call. Minor code reorganization.
6430 2014-06-13 Robert Dewar <dewar@adacore.com>
6432 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
6434 * opt.ads (Compiler_Unit): New flag.
6435 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
6436 for null statement sequence (not allowed in compiler unit).
6437 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
6439 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
6441 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
6442 Check_Compiler_Unit.
6443 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
6444 Check_Compiler_Unit (this construct is not allowed in compiler
6446 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
6447 Set Opt.Compiler_Unit.
6449 2014-06-13 Geert Bosch <bosch@adacore.com>
6451 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
6452 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
6453 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
6455 2014-06-13 Robert Dewar <dewar@adacore.com>
6457 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
6459 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6461 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
6462 types in SPARK as it is poorly placed and poorly formulated. The
6463 check was flagging ALL volatile entities as illegal in SPARK.
6464 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
6465 types as illegal in SPARK.
6467 2014-06-13 Robert Dewar <dewar@adacore.com>
6469 * sem_cat.adb: Minor reformatting.
6471 2014-06-13 Yannick Moy <moy@adacore.com>
6473 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
6475 2014-06-13 Arnaud Charlet <charlet@adacore.com>
6477 * gnat_rm.texi: Add detail on SPARK_05 restriction.
6479 2014-06-13 Bob Duff <duff@adacore.com>
6481 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
6482 Add assertions requiring the secondary stack to be initialized.
6483 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
6484 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
6485 secondary stack is initialized before calling Init_Tasking_Soft_Links,
6486 by adding pragmas Elaborate_Body.
6488 2014-06-13 Thomas Quinot <quinot@adacore.com>
6490 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
6491 kludge disabling new legality check.
6493 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6495 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
6497 (Freeze_Type): Volatile types are now illegal in SPARK.
6499 2014-06-13 Robert Dewar <dewar@adacore.com>
6501 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
6502 * gnat_rm.texi: Document aspect Thread_Local_Storage.
6504 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6506 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
6507 value is a temporary that renames an aggregate is legal in a
6508 preelaborated unit. Illegalities, if any will be detected in
6509 the aggregate components.
6511 2014-06-13 Ed Schonberg <schonberg@adacore.com>
6513 * einfo.ads: Minor reformatting an comment expansion.
6515 2014-06-13 Robert Dewar <dewar@adacore.com>
6517 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
6519 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
6521 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
6522 * sem_warn.adb: Minor reformatting.
6524 2014-06-13 Doug Rupp <rupp@adacore.com>
6526 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
6529 2014-06-13 Yannick Moy <moy@adacore.com>
6531 * sem_warn.adb (Check_Unset_References): Take
6532 case of Refined_Post into account in Within_Postcondition check.
6534 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
6536 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
6539 2014-06-13 Yannick Moy <moy@adacore.com>
6541 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
6542 Aspect_Export): Consider that variables may be set outside the program.
6544 2014-06-13 Robert Dewar <dewar@adacore.com>
6546 * back_end.adb (Make_Id): New function.
6547 (Make_SC): New function.
6548 (Set_RND): New procedure.
6549 * back_end.ads (Make_Id): New function.
6550 (Make_SC): New function.
6551 (Set_RND): New procedure.
6552 * einfo.ads: Minor comment updates.
6553 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
6554 * gnat1drv.adb (Gnat1drv): New calling sequence for
6555 Get_Target_Parameters.
6556 (Gnat1drv): Move Atree.Initialize here from Frontend.
6557 * targparm.adb (Get_Target_Parameters): New calling
6558 sequence (Get_Target_Parameters): Handle pragma Restriction
6560 * targparm.ads (Get_Target_Parameters): New calling sequence.
6562 2014-06-13 Gary Dismukes <dismukes@adacore.com>
6564 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
6565 loop if the pragma does not come from source, so that an implicit
6566 pragma Import only applies to the first declaration, avoiding
6567 possible conflicts with earlier explicit and implicit declarations
6568 due to multiple Provide_Shift_Operators pragmas.
6569 (Set_Imported): Remove previous fix that bypassed pragma duplication
6571 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
6572 of Provide_Shift_Operators.
6574 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
6576 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
6577 string pointer directly to set_decl_section_name.
6579 2014-06-11 Robert Dewar <dewar@adacore.com>
6581 * sem_ch13.adb: Minor reformatting.
6583 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6585 * sem_prag.adb (Check_Clause_Syntax): Add new
6586 local variable Outputs. Account for the case where multiple
6587 output items appear as an aggregate.
6589 2014-06-11 Robert Dewar <dewar@adacore.com>
6591 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6594 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6596 * einfo.ads: Minor reformatting.
6598 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6600 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6601 new variable First_Node. Update the position after all insertions have
6602 taken place to First_Node.
6604 2014-06-11 Robert Dewar <dewar@adacore.com>
6606 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6607 * layout.adb (Layout_Type): Remove test of -gnatd.1.
6609 2014-06-11 Robert Dewar <dewar@adacore.com>
6611 * sem_ch13.adb: Minor reformatting.
6613 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6615 * sem_prag.adb (Check_Clause_Syntax): Add new
6616 local variable Outputs. Account for the case where multiple
6617 output items appear as an aggregate.
6619 2014-06-11 Robert Dewar <dewar@adacore.com>
6621 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
6624 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6626 * einfo.ads: Minor reformatting.
6628 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6630 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
6631 new variable First_Node. Update the position after all insertions have
6632 taken place to First_Node.
6634 2014-06-11 Robert Dewar <dewar@adacore.com>
6636 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
6637 * layout.adb (Layout_Type): Remove test of -gnatd.1.
6639 2014-06-11 Thomas Quinot <quinot@adacore.com>
6641 * freeze.ads: Minor reformatting.
6642 * checks.adb (Determine_Range): Do not attempt to determine
6643 the range of a deferred constant whose full view has not been
6645 * sem_res.adb (Resolve): Remove undesirable guard against
6646 resolving expressions from expression functions.
6648 2014-06-11 Robert Dewar <dewar@adacore.com>
6650 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
6652 * layout.adb (Layout_Type): Make anonymous access types for
6653 subprogram formal types and return types always thin. For now
6654 only enabled if -gnatd.1 set.
6656 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6658 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6659 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
6660 subprogram must be a null procedure.
6662 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6664 * sem_prag.adb (Analyze_Input_Item): Allow formal
6665 parameters to appear as input_items in an initialization_list
6666 of pragma Initializes. Encapsulation now applies to states and
6667 variables only (as it should). Add RM references to key errors.
6668 * sem_prag.adb (Set_Imported): Suppress errors
6669 about preceding Imports when the pragma does not come from source,
6670 which can happen through use of pragma Provide_Shift_Operators.
6672 2014-06-11 Thomas Quinot <quinot@adacore.com>
6674 * sem_ch3.adb: Minor reformatting.
6675 * einfo.ads (Full_View): Minor comment update.
6677 2014-06-11 Robert Dewar <dewar@adacore.com>
6679 * einfo.adb (Is_Independent): New flag.
6680 * einfo.ads (Is_Independent): New flag.
6681 (Has_Independent_Components): Clean up and fix comments.
6682 * sem_prag.adb (Fix_Error): Deal with changing argument
6683 [of] to entity [for].
6684 (Analyze_Pragma, case Independent): Set Is_Independent flag
6685 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
6686 in all components of specified record.
6688 2014-06-11 Thomas Quinot <quinot@adacore.com>
6690 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
6691 Set proper Etype on bounds of dummy type created for analysis
6694 2014-06-11 Robert Dewar <dewar@adacore.com>
6696 * debug.adb: Minor comment fix (add missing section of dot
6699 2014-06-11 Robert Dewar <dewar@adacore.com>
6701 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
6702 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
6703 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
6704 * errout.adb (Output_Messages): Avoid duplicate output for
6705 library level instance.
6706 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
6707 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
6708 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
6709 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
6710 accomodate largest modulus value.
6711 * gnat_ugn.texi: Minor updates.
6713 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6715 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
6716 load body of generic package or its parent, if body is optional
6717 and the unit does not require a body.
6719 2014-06-11 Robert Dewar <dewar@adacore.com>
6721 * gnat_rm.texi: Document System.Unsigned_Types.
6722 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
6723 * s-unstyp.ads: Update comments (this is now user available unit).
6725 2014-06-11 Robert Dewar <dewar@adacore.com>
6727 * make.adb, sem_res.adb: Minor reformatting.
6729 2014-06-11 Thomas Quinot <quinot@adacore.com>
6731 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
6732 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
6733 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
6734 Preelaborate_05 to just Preelaborate in runtime units, and similarly
6735 change Pure_05 to just Pure.
6737 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6739 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
6740 analysis if error has been posted on subprogram body.
6742 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6744 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
6745 rule given in RM 13.1 (8/1) for operational attributes to stream
6746 attributes: the attribute must apply to a first subtype. Fixes
6747 missing errors in ACATS test bdd2004.
6749 2014-06-11 Robert Dewar <dewar@adacore.com>
6751 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
6752 record type if restriction No_Implicit_Conditionals is active.
6753 (Expand_N_Object_Declaration): Don't allow default initialization
6754 for variant record type if restriction No_Implicit_Condition is active.
6755 (Build_Variant_Record_Equality): Don't build for variant
6756 record type if restriction No_Implicit_Conditionals is active.
6757 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
6758 No_Implicit_Conditionals.
6759 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
6761 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
6763 * i-cstrin.ads: Update comments.
6765 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6767 * sem_res.adb (Resolve_Selected_Component): Handle properly a
6768 selected component whose prefix is overloaded, when none of the
6769 interpretations matches the expected type.
6771 2014-06-11 Bob Duff <duff@adacore.com>
6773 * make.adb (Wait_For_Available_Slot): Give a more
6774 informative error message; if the ALI file is not found, print
6775 the full path of what it's looking for.
6777 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
6779 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
6780 option to specify the result file encoding.
6782 2014-06-11 Robert Dewar <dewar@adacore.com>
6784 * errout.ads, sem_ch12.adb: Minor reformatting.
6785 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
6786 * lib-xref.adb: Minor reformatting.
6787 * restrict.adb: Minor code reorganization (put routines in
6790 2014-06-11 Yannick Moy <moy@adacore.com>
6792 * einfo.ads: Minor typo in comment
6794 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6796 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
6797 formal private types and private type extensions, to indicate
6798 variable in a generic unit whose uninitialized use suggest that
6799 actual type should be fully initialized.
6800 Needs_Initialized_Actual: removed, functionaity replaced by
6802 * lib-xref.adb (Generate_Reference): Generate a reference for
6803 variables of a formal type when the unit is not the main unit,
6804 to enable appropriate warnings in an instance.
6805 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
6806 of variable in a generic unit that suggests that actual type
6807 should be full initialized.
6808 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
6809 and do not emot warning, which now only appears in an instance.
6811 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
6813 * gnat_ugn.texi: Fix minor typo.
6815 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
6817 * sem_ch3.adb Add with and use clause for Sem_Ch10.
6818 (Analyze_Declarations): Code reformatting. Analyze the contract
6819 of a subprogram body stub at the end of the declarative region.
6820 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
6821 now a variable. Do not process the body if its contract is not
6822 available. Account for subprogram body stubs when extracting
6823 the corresponding spec.
6824 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
6826 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
6828 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
6829 Account for subprogram body stubs when extracting the
6831 (Analyze_Global_In_Decl_List):
6832 Account for subprogram body stubs when extracting the
6834 (Analyze_Refined_Depends_In_Decl_Part):
6835 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
6836 of the related body. Spec_Is now a variable. Account for
6837 subprogram body stubs when extracting the corresponding spec.
6838 (Analyze_Refined_Global_In_Decl_Part): Use
6839 Find_Related_Subprogram_Or_Body to retrieve the declaration
6840 of the related body. Spec_Is now a variable. Account for
6841 subprogram body stubs when extracting the corresponding spec.
6842 (Collect_Subprogram_Inputs_Output): Account for subprogram body
6843 stubs when extracting the corresponding spec.
6845 2014-06-11 Vincent Celier <celier@adacore.com>
6847 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
6850 2014-06-11 Robert Dewar <dewar@adacore.com>
6852 * debug.adb: Add debug flag -gnatd.q.
6853 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
6855 * styleg.adb (Check_Xtra_Parens): Message should be a style
6857 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
6858 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
6859 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
6860 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
6862 2014-06-11 Ben Brosgol <brosgol@adacore.com>
6864 * gnat_rm.texi: Revised chapter on Implementation Defined
6867 2014-06-11 Geert Bosch <bosch@adacore.com>
6869 * s-exctab.adb: avoid race conditions in exception registration.
6871 2014-06-11 Robert Dewar <dewar@adacore.com>
6873 * errout.adb (Warn_Insertion): New function.
6874 (Error_Msg): Use Warn_Insertion and Prescan_Message.
6875 (Error_Msg_Internal): Set Info field of error object.
6876 (Error_Msg_NEL): Use Prescan_Message.
6877 (Set_Msg_Text): Don't store info: at start of message.
6878 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
6879 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
6880 * errout.ads: Document new ?$? and >$> insertion sequences
6881 Document use of "(style)" and "info: "
6882 * erroutc.adb (dmsg): Print several missing fields
6883 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
6884 Deal with new tagging of info messages
6885 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
6886 Add field Info (Prescan_Message): New procedure, this procedure
6887 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
6888 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
6889 sem_elab.adb: Follow new rules for info message (info belongs
6890 only at the start of a message, and only in the first message,
6891 not in any of the continuations).
6892 * gnat_ugn.texi: Document full set of warning tags.
6894 2014-06-11 Gary Dismukes <dismukes@adacore.com>
6896 * sem_util.adb: Minor typo fix.
6898 2014-06-11 Ed Schonberg <schonberg@adacore.com>
6900 * sem_warn.adb (Check_References): Do not emit spurious warnings
6901 on uninitialzed variable of a formal private type if variable
6904 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
6906 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
6907 set_decl_section_name accessor.
6909 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
6911 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
6912 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
6913 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
6915 2014-05-21 Robert Dewar <dewar@adacore.com>
6917 * layout.adb: Minor reformatting.
6918 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
6921 2014-05-21 Robert Dewar <dewar@adacore.com>
6923 * restrict.ads (Implementation_Restriction): Add entry for
6925 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
6926 Ada.[Wide_[Wide_]Text_IO.
6927 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
6928 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
6929 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
6930 Wide_Wide_Value if restriction No_Fixed_IO is set.
6931 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
6933 2014-05-21 Robert Dewar <dewar@adacore.com>
6935 * gnatcmd.adb: Minor error msg changes (no upper case letter
6937 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
6940 2014-05-21 Robert Dewar <dewar@adacore.com>
6942 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
6943 via generic formals.
6944 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
6947 2014-05-21 Thomas Quinot <quinot@adacore.com>
6949 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
6950 more accurately describe that this subprogram needs to come into
6951 play also in cases where no byte swapping is involved, because
6952 it also takes care of some required shifts (left-justification
6955 2014-05-21 Thomas Quinot <quinot@adacore.com>
6957 * freeze.adb (Check_Component_Storage_Order): Indicate whether
6958 a Scalar_Storage_Order attribute definition is present for the
6960 (Freeze_Record_Type): Suppress junk warnings
6961 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
6964 2014-05-21 Robert Dewar <dewar@adacore.com>
6966 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
6967 to Kill_Elaboration_Checks.
6969 2014-05-21 Gary Dismukes <dismukes@adacore.com>
6971 * layout.adb (Assoc_Add): Suppress the optimization of the (E
6972 - C1) + C2 case, when the expression type is unsigned and C1 <
6973 C2, to avoid creating a negative literal when folding.
6975 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
6977 * freeze.adb (Freeze_Record_Type): Update the use of
6979 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
6981 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
6982 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
6983 of Is_SPARK_Volatile.
6984 (Analyze_Loop_Parameter_Specification):
6985 Update the use of Is_SPARK_Volatile.
6986 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
6987 formal parameter when its type is volatile.
6988 * sem_prag.adb (Analyze_Global_Item): Update the use of
6990 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
6991 determines whether an entity is a volatile source SPARK object.
6992 * sem_util.adb (Has_Enabled_Property): Accout for external
6993 properties being set on objects other than abstract states
6994 and variables. An example would be a formal parameter.
6995 (Is_SPARK_Volatile): New routine.
6996 (Is_SPARK_Volatile_Object):
6997 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
6998 when checking entities and/or types.
6999 * sem_util.ads (Is_SPARK_Volatile): New routine.
7001 2014-05-21 Robert Dewar <dewar@adacore.com>
7003 * sem_warn.adb: Minor fix to warning messages (use ?? instead
7006 2014-05-21 Vincent Celier <celier@adacore.com>
7008 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7009 switch --version and --help.
7011 2014-05-21 Robert Dewar <dewar@adacore.com>
7013 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7015 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7017 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7018 iterator variable when the domain of iteration is a formal
7019 container and this is an element iterator.
7021 2014-05-21 Bob Duff <duff@adacore.com>
7023 * sem_ch12.adb: Minor reformatting.
7025 2014-05-21 Robert Dewar <dewar@adacore.com>
7027 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7029 2014-05-21 Robert Dewar <dewar@adacore.com>
7031 * sem_elab.adb: Minor reformatting.
7032 * s-taprop.ads: Minor comment fix.
7033 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7034 Kill_Elaboration_Checks.
7035 * errout.adb, erroutc.adb: Minor reformatting.
7037 2014-05-21 Thomas Quinot <quinot@adacore.com>
7039 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7040 component. No byte swapping occurs, but this procedure also takes
7041 care of appropriately justifying the argument.
7043 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7045 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7047 (Analyze_Subprogram_Body_Helper): Move the
7048 analysis of aspect specifications and the processing of the
7049 subprogram body contract after inlining has taken place.
7050 (Diagnose_Misplaced_Aspect_Specifications): Removed.
7052 2014-05-21 Javier Miranda <miranda@adacore.com>
7054 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7056 2014-05-21 Robert Dewar <dewar@adacore.com>
7058 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7059 continuations any more.
7061 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7063 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7064 present in formal_Private_Definitions and on private extension
7065 declarations of a formal derived type. Set when the use of the
7066 formal type in a generic suggests that the actual should be a
7067 fully initialized type.
7068 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7069 to indicate that an entity of a generic type has default
7070 initialization, and that the corresponing actual type in any
7071 subsequent instantiation should be fully initialized.
7072 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7073 to emit a warning if the actual for a generic type on which
7074 Needs_Initialized_Actual is set is not a fully initialized type.
7076 2014-05-21 Robert Dewar <dewar@adacore.com>
7078 * sem_elab.adb, prj-dect.adb: Minor reformatting.
7080 2014-05-21 Robert Dewar <dewar@adacore.com>
7082 * erroutc.ads: Minor comment addition.
7084 2014-05-21 Robert Dewar <dewar@adacore.com>
7086 * errout.ads: Add documentation for use of >*> tag.
7087 * restrict.adb: Make sure we use >*> tag for restriction warnings.
7089 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7091 * debug.adb: Add case of illegal overriding_indicator for a
7092 protected subprogram body to description of -gnatd.E switch.
7093 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7094 for cases of giving overriding_indicators on protected subprogram
7095 bodies, but change this to a warning if -gnatd.E is enabled. No
7096 longer give a style warning about missing indicators on protected
7099 2014-05-21 Robert Dewar <dewar@adacore.com>
7101 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7102 sem_elab.ads: Minor reformatting.
7103 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7106 2014-05-21 Pascal Obry <obry@adacore.com>
7108 * prj-dect.adb: Allow package Install in aggregate project.
7110 2014-05-21 Robert Dewar <dewar@adacore.com>
7112 * sem_ch13.adb (Analyze_Aspect_Specifications):
7113 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7114 * sem_prag.adb: Minor comment improvements.
7116 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7118 * sem_ch12.adb (Install_Body): When checking whether freezing of
7119 instantiation must be delayed, verify that the common enclosing
7120 subprogram to generic and instance is in fact an overloadable
7123 2014-05-21 Vincent Celier <celier@adacore.com>
7125 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7126 mains with the same name and fail if there is more than one.
7127 * prj.ads, prj.adb (Find_All_Sources): New function
7129 2014-05-21 Robert Dewar <dewar@adacore.com>
7131 * sem_ch13.adb: Minor reformatting.
7132 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7133 * sem_prag.adb: Minor error message improvement.
7135 2014-05-21 Yannick Moy <moy@adacore.com>
7137 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7138 (Enclosing_Subprogram_Or_Package): Only return a library-level
7141 2014-05-21 Javier Miranda <miranda@adacore.com>
7143 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7144 to the full view of the parent type when processing a derived type
7145 which is the full view of a private type not defined in a generic
7146 unit which is derived from a private type with discriminants
7147 whose full view is a non-tagged record type.
7149 2014-05-21 Javier Miranda <miranda@adacore.com>
7151 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7152 Complete previous patch.
7154 2014-05-21 Thomas Quinot <quinot@adacore.com>
7157 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
7158 Provide a behaviour more consistent with underlying datagram
7159 socket: do not attempt to loop over Send_Socket/Receive_Socket
7160 iterating along the buffer.
7162 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
7164 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
7165 or a tagged type is not labelled as volatile. Ensure that a
7166 non-volatile type has no volatile components.
7167 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
7168 Obj_Typ. Code reformatting. Ensure that a discriminated or
7169 tagged object is not labelled as volatile.
7170 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
7171 pragma Volatile applies to a full type declaration or an object
7172 declaration when SPARK mode is on.
7174 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
7176 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
7177 providing options needed for compiling the argument source for
7178 the situation when a project file can be used as a tool parameter.
7180 2014-05-21 Gary Dismukes <dismukes@adacore.com>
7182 * gnat_rm.texi: Minor typo fix.
7184 2014-05-21 Robert Dewar <dewar@adacore.com>
7186 * stand.adb (Tree_Read): Read missing entities.
7187 (Tree_Write): Write missing entities.
7189 2014-05-21 Ben Brosgol <brosgol@adacore.com>
7191 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
7192 section in gnatmetric chapter.
7194 2014-05-21 Robert Dewar <dewar@adacore.com>
7196 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
7197 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
7198 post-call copy write back (see detailed comment in code).
7199 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
7201 * tbuild.ads: Minor reformatting.
7203 2014-05-21 Robert Dewar <dewar@adacore.com>
7205 * stand.ads: Add warning about adding new entities and
7206 Tree_Read/Tree_Write.
7208 2014-05-21 Robert Dewar <dewar@adacore.com>
7210 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
7211 references to restricted entities within the units in which they
7214 2014-05-21 Robert Dewar <dewar@adacore.com>
7216 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
7217 simplify the needed test, and also deal with failure to catch
7218 situations with non-standard names.
7219 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
7220 (Source_File_Is_Subunit): Removed, no longer used.
7222 2014-05-21 Javier Miranda <miranda@adacore.com>
7225 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
7226 renaming of an access to interface object there is no need to
7227 generate extra code to reference the tag.
7229 2014-05-21 Robert Dewar <dewar@adacore.com>
7231 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
7232 Warnings (Off, string).
7234 2014-05-21 Robert Dewar <dewar@adacore.com>
7236 * osint.adb: Fix three error messages to say invalid instead
7238 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
7239 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
7240 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
7242 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7244 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
7245 sem_ch9.ads: Move discriminant manipulation routines for analysis of
7246 aspect specifications from sem_ch9 to sem_ch13, where they belong.
7248 2014-05-21 Robert Dewar <dewar@adacore.com>
7250 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
7251 Clearly document -gnatyg (GNAT style switches).
7252 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
7253 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
7254 available for VMS after all.
7255 * warnsw.adb: Reorganize to eliminate duplicated code
7256 (Restore_Warnings): Add a couple of missing entries
7257 (Save_Warnings): Add a couple of missing entries.
7258 * warnsw.ads: Add missing entries to Warning_Record (not clear
7259 what the impact is).
7261 2014-05-21 Robert Dewar <dewar@adacore.com>
7263 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
7265 * errout.ads: Document ?*? (restriction warning) insertion.
7266 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
7268 * erroutc.ads: Document use of * for restriction warning tag.
7269 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
7271 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7273 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
7274 make discriminants immediately visible when analyzing an aspect
7275 of a subtype declaration.
7276 (Uninstall_Discriminants): Do not apply to the entity in a
7277 subtype declaration.
7279 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7281 * sem_util.adb: Code clean up.
7283 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
7285 * gnat_ugn.texi: Document -Werror.
7287 2014-05-21 Bob Duff <duff@adacore.com>
7289 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
7290 This was returning False if the Object is a constant view. Fix
7291 it to return True in that case, because it might be a view of
7293 (Has_Discriminant_Dependent_Constraint): Fix latent
7294 bug; this function was crashing when passed a discriminant.
7296 2014-05-21 Robert Dewar <dewar@adacore.com>
7298 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
7299 * s-arit64.adb: Minor code reorganization.
7300 * sem_prag.adb: Minor comment fix (remove erroneous use of the
7303 2014-05-21 Robert Dewar <dewar@adacore.com>
7305 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
7306 computing new table size.
7308 2014-05-21 Robert Dewar <dewar@adacore.com>
7310 * einfo.ads: Minor reformatting.
7311 * ceinfo.adb: Deal with slight format change of einfo.ads.
7313 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7315 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
7316 implementation of the SPARK 2014 rule concerning private child
7319 2014-05-21 Vincent Celier <celier@adacore.com>
7321 * makeusg.adb: Add switch -d to usage.
7323 2014-05-21 Ed Schonberg <schonberg@adacore.com>
7325 * sem_util.adb (Find_Actual): If an actual that is the prefix
7326 of an enclosing prefixed call has been rewritten, use Nkind
7327 and Sloc to identify the corresponding formal, when handling
7328 deferred references.
7330 2014-05-21 Robert Dewar <dewar@adacore.com>
7332 * debug.adb: Document -gnatd.z switch.
7333 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
7335 2014-05-21 Robert Dewar <dewar@adacore.com>
7337 * einfo.ads (Can_Never_Be_Null): Minor comment update.
7338 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
7339 error message change.
7340 * s-arit64.adb ("abs"): New function. Use expression functions
7341 for the simple conversions and arithmetic.
7343 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7345 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
7346 set function_start_locus.
7348 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7350 * utils.c (gnat_write_global_declarations): Adjust the flags put on
7353 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7355 * gcc-interface/decl.c (change_qualified_type): New static function.
7356 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
7357 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
7358 <E_Array_Subtype>: Likewise.
7359 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
7360 (gnat_to_gnu_component_type): Likewise.
7361 (gnat_to_gnu_param): Likewise.
7363 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7365 * fe.h (Set_Present_Expr): Move around.
7366 (End_Location): New macro.
7367 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
7369 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7371 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
7372 lieu of more verbose construct.
7373 * gcc-interface/trans.c (Call_to_gnu): Likewise.
7374 (gnat_to_gnu): Likewise. Remove obsolete code.
7376 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
7378 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
7379 consider that regular packed arrays can never be superflat.
7381 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
7383 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
7385 * gcc-interface/decl.c (annotate_value): Adjust.
7386 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
7387 (push_range_check_info): Likewise.
7388 (Loop_Statement_to_gnu): Likewise.
7389 (Subprogram_Body_to_gnu): Likewise.
7390 (Compilation_Unit_to_gnu): Likewise.
7391 (start_stmt_group): Likewise.
7392 * gcc-interface/utils.c (init_gnat_utils): Likewise.
7393 (gnat_pushlevel): Likewise.
7394 (maybe_pad_type): Likewise.
7396 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
7398 * seh_init.c: Fix copyright year.
7400 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
7402 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
7403 are defined. Move include windows.h before system.h.
7404 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
7405 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
7407 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
7409 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
7410 to the appropriate type.
7411 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
7412 (pos_to_constructor): Likewise.
7414 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
7416 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
7418 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
7419 Mike Stump <mikestump@comcast.net>
7420 Richard Sandiford <rdsandiford@googlemail.com>
7422 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
7423 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
7424 (annotate_value): Use wide-int interfaces.
7425 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
7427 2014-04-28 Richard Henderson <rth@redhat.com>
7429 * gcc-interface/Makefile.in: Support aarch64-linux.
7431 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
7433 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
7434 add 'Suffix' parameter and adjust comment.
7435 (Get_External_Name_With_Suffix): Delete.
7436 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
7437 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
7439 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
7440 Call Get_External_Name instead of Get_External_Name_With_Suffix.
7441 (Get_Secondary_DT_External_Name): Likewise.
7442 * exp_cg.adb (Write_Call_Info): Likewise.
7443 * exp_disp.adb (Export_DT): Likewise.
7444 (Import_DT): Likewise.
7445 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
7446 parameter with False default.
7447 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
7448 * types.h (Fat_Pointer): Rename into...
7449 (String_Pointer): ...this. Add comment on interfacing rules.
7450 * fe.h (Compiler_Abort): Adjust for above renaming.
7451 (Error_Msg_N): Likewise.
7452 (Error_Msg_NE): Likewise.
7453 (Get_External_Name): Likewise. Add third parameter.
7454 (Get_External_Name_With_Suffix): Delete.
7455 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
7456 (create_concat_name): Adjust call to Get_External_Name, remove call to
7457 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
7458 * gcc-interface/trans.c (post_error): Likewise.
7459 (post_error_ne): Likewise.
7460 * gcc-interface/misc.c (internal_error_function): Likewise.
7462 2014-04-28 Richard Biener <rguenther@suse.de>
7465 * gcc-interface/utils.c: Define flag_isoc11.
7467 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
7469 * gnatvsn.ads (Library_Version): Bump to 4.10.
7471 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
7474 2014-04-22 Richard Henderson <rth@redhat.com>
7476 * gcc-interface/Makefile.in: Support aarch64-linux.
7478 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
7480 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7481 (Error_Msg_N): Likewise.
7482 (Error_Msg_NE): Likewise.
7483 (Get_External_Name_With_Suffix): Likewise.
7484 * types.h (Fat_Pointer): Delete.
7485 (String_Pointer): New type.
7486 (DECLARE_STRING_POINTER): New macro.
7487 * gcc-interface/decl.c (create_concat_name): Adjust.
7488 * gcc-interface/trans.c (post_error): Likewise.
7489 (post_error_ne): Likewise.
7490 * gcc-interface/misc.c (internal_error_function): Likewise.
7492 2014-04-22 Richard Henderson <rth@redhat.com>
7494 * gcc-interface/Makefile.in: Support aarch64-linux.
7496 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
7497 (__gnat_alternate_stack): Enable for all linux except ia64.
7499 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
7501 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
7502 (Error_Msg_N): Likewise.
7503 (Error_Msg_NE): Likewise.
7504 (Get_External_Name_With_Suffix): Likewise.
7505 * types.h (Fat_Pointer): Delete.
7506 (String_Pointer): New type.
7507 (DECLARE_STRING_POINTER): New macro.
7508 * gcc-interface/decl.c (create_concat_name): Adjust.
7509 * gcc-interface/trans.c (post_error): Likewise.
7510 (post_error_ne): Likewise.
7511 * gcc-interface/misc.c (internal_error_function): Likewise.
7513 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
7514 Pierre-Marie de Rodat <derodat@adacore.com>
7516 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
7517 scalar constant instead of a reference for renaming of scalar literal.
7518 Do not create a new object for constant renaming except for a function
7519 call. Make sure a VAR_DECL is created for the renaming pointer.
7520 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
7521 (fold_constant_decl_in_expr): New function.
7522 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
7523 For a constant renaming, try to fold a constant DECL in the result.
7524 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
7525 (Identifier_to_gnu): Reference the renamed object of constant renaming
7527 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
7528 invalidate constant renaming pointers.
7530 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
7532 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
7533 (build_vector_type_for_size): New function.
7534 (build_vector_type_for_array): Likewise.
7535 (unchecked_convert): Build an intermediate vector type to convert
7536 from a generic array type to a vector type.
7537 (handle_vector_size_attribute): Reimplement.
7538 (handle_vector_type_attribute): Likewise.
7540 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
7542 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
7543 Is_OK_Static_Expression in lieu of Is_Static_Expression to
7544 detect valid arguments.
7546 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
7548 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
7550 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
7552 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
7553 (components_to_record): Likewise.
7554 * gcc-interface/utils.c (make_aligning_type): Likewise.
7555 (maybe_pad_type): Likewise.
7556 (finish_record_type): Likewise.
7557 (rest_of_record_type_compilation): Likewise.
7559 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
7561 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
7562 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
7564 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
7565 hint for Loop_Optimize.
7566 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
7567 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7568 with new Ivdep hint.
7569 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
7570 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
7571 with new Ivdep hint.
7572 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
7574 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
7575 Robert Dewar <dewar@adacore.com>
7577 * opt.ads (Suppress_Back_Annotation): Remove as unused.
7578 * fe.h (Back_Annotate_Rep_Info): Likewise.
7579 (Global_Discard_Names): Likewise.
7580 (List_Representation_Info): Declare.
7581 * types.h (Uint_Minus_1): Likewise.
7582 * repinfo.ads: Document back-annotation change.
7583 * gcc-interface/gigi.h (init_gnat_decl): Declare.
7584 (destroy_gnat_decl): Likewise.
7585 * gcc-interface/decl.c (annotate_value): Do not create the cache of
7586 annotated values here but...
7587 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
7589 (init_gnat_decl): ...here instead. New function.
7590 (destroy_gnat_decl): Likewise.
7591 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
7592 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
7594 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
7596 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
7597 offset for the field, if any.
7599 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
7600 Svante Signell <svante.signell@gmail.com>
7604 * s-osinte-x32.adb: New file.
7605 * s-linux.ads (Time): New section.
7606 * s-linux-alpha.ads (Time): Likewise.
7607 * s-linux-android.ads (Time: Likewise.
7608 * s-linux-hppa.ads (Time): Likewise.
7609 * s-linux-mipsel.ads (Time): Likewise.
7610 * s-linux-sparc.ads (Time): Likewise.
7611 * s-linux-x32.ads (Time): Likewise.
7612 * s-osprim-x32.ads (timespec): Adjust.
7614 (To_Timespec): Likewise.
7615 * s-osinte-linux.ads (Time): Define local subtypes for those defined
7617 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
7618 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
7619 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
7620 * s-osinte-solaris-posix.ads (timespec): Likewise.
7621 * s-osinte-posix.adb (To_Timespec): Likewise.
7622 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
7624 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
7627 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
7628 * s-linux-android.ads: New file.
7629 * s-intman-android.adb: Likewise.
7630 * s-osinte-android.ads: Adjust.
7631 * sigtramp-armdroid.c: Likewise.
7632 * sigtramp.h: Add Android support.
7634 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
7636 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
7638 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
7641 * system-linux-alpha.ads: Adjust for Ada 2005.
7642 * system-linux-mips.ads: Likewise.
7643 * system-linux-mips64el.ads: Likewise.
7644 * system-linux-mipsel.ads: Likewise.
7645 * system-linux-s390.ads: Likewise.
7646 * system-linux-s390x.ads: Likewise.
7647 * system-linux-sparc.ads: Likewise.
7648 * system-linux-sparcv9.ads: Likewise.
7649 * system-rtems.ads: Likewise.
7650 * system-vxworks-arm.ads: Likewise.
7652 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
7655 * gcc-interface/Makefile.in (target_cpu_default): Revert
7658 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
7661 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
7662 it to set the RM size. Use directly 'size' for the Esize.
7663 (Create_Back_End_Float_Types): Adjust call to above.
7664 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
7665 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
7666 (Write_Target_Dependent_Values): Adjust comment.
7667 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
7669 (Write_Target_Dependent_Values): Write the precision in lieu of size.
7670 (Initialization): Read the precision in lieu of size and compute the
7671 size from the precision and the alignment.
7672 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
7673 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
7674 types for vector modes, pass the size in addition to the precision.
7676 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
7678 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
7680 2014-03-07 Doug Rupp <rupp@adacore.com>
7683 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
7684 (Support_64_Bit_Divides): Removed, no longer used.
7685 (ZCX_By_Default): Enabled.
7687 2014-02-25 Doug Rupp <rupp@adacore.com>
7689 * gcc-interface/Makefile.in (arm-linux):
7690 (EH_MECHANISM): Use ARM unwinder (-arm)
7691 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
7693 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
7694 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
7695 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
7696 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
7697 Add dependencies for sigtramp-armvxw.o.
7699 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7701 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
7703 2014-02-25 Robert Dewar <dewar@adacore.com>
7705 * rtsfind.adb (Is_RTE): Protect against entity with no scope
7706 field (previously this call blew up on the Standard entity).
7707 * sem_attr.adb (Analyze_Attribute, case Access): Remove
7708 test for No_Abort_Statements, this is now handled in
7709 Set_Entity_With_Checks.
7710 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
7711 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
7712 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
7713 Set_Entity_With_Checks.
7714 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
7715 Add checks for No_Abort_Statements.
7717 2014-02-25 Robert Dewar <dewar@adacore.com>
7719 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
7720 Check_Restriction is OK.
7722 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7724 * sem_ch3.adb (Process_Full_View): Better error message when
7725 the full view of a private type without discriminants is an
7727 * sem_ch7.adb (Uninstall_Declarations): Ditto.
7729 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7731 * sigtramp-armvxw.c: Also restore r0.
7733 2014-02-25 Robert Dewar <dewar@adacore.com>
7735 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
7736 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
7737 set unconditionally.
7738 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
7739 any more (Output_Msg_Text): Rewritten with new convention on
7740 output of warnings that are treated as errors.
7741 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
7743 * gnat_rm.texi: Updates to documentation on pragma
7745 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
7746 set Warning_Doc_Switch.
7747 * lib-writ.ads: Add documentation note on ALI file generation
7749 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
7751 * sem_attr.adb (Resolve_Attribute, case Access):
7752 Abort_Task'Access violates the No_Abort_Statements restriction.
7753 * sem_res.adb (Resolve_Call): Check restriction
7754 No_Abort_Statements for call to Abort_Task or a renaming of it.
7756 2014-02-25 Robert Dewar <dewar@adacore.com>
7758 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
7760 * lib.ads: Minor reformatting.
7761 * einfo.ads: Minor reformatting.
7763 2014-02-25 Doug Rupp <rupp@adacore.com>
7765 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
7766 use Short_Descriptor(S) as the argument passing mechanism.
7768 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7770 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
7772 2014-02-25 Robert Dewar <dewar@adacore.com>
7774 * atree.ads (Warnings_Treated_As_Errors): New variable.
7775 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
7776 error object (Initialize): Initialize Warnings_As_Errors_Count
7777 (Write_Error_Summary): Include count of warnings treated as errors.
7778 * erroutc.adb (Warning_Treated_As_Error): New function.
7779 (Matches): Function moved to outer level of package.
7780 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
7781 (Warning_Treated_As_Error): New function.
7782 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
7783 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
7784 * opt.ads (Config_Switches_Type): Add entry for
7785 Warnings_As_Errors_Count.
7786 (Warnings_As_Errors_Count): New variable.
7787 (Warnings_As_Errors): New array.
7788 * par-prag.adb: Add dummy entry for Warning_As_Error.
7789 * sem_prag.adb (Analyze_Pragma): Implement new pragma
7791 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
7793 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
7795 * sigtramp.h: Fix minor inaccuracy.
7797 2014-02-25 Ben Brosgol <brosgol@adacore.com>
7799 * gnat_ugn.texi: Added description of kill command.
7801 2014-02-25 Robert Dewar <dewar@adacore.com>
7803 * gnat_rm.texi (Address_Clauses): Add a section discussing the
7804 problem of address clauses causing unexpected initialization,
7805 including the effect of Initialize_Scalars.
7807 2014-02-25 Robert Dewar <dewar@adacore.com>
7809 * errout.adb: Various changes for better msgs for anonmous access
7811 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
7813 (Buffer_Remove): Version with character argument.
7814 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
7815 of mismatching conventions for access-to-subprogram case.
7816 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
7817 access types in record.
7818 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
7819 types, including in records.
7821 2014-02-25 Doug Rupp <rupp@adacore.com>
7823 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
7824 enhancements and corrections.
7826 2014-02-25 Robert Dewar <dewar@adacore.com>
7828 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
7830 2014-02-25 Robert Dewar <dewar@adacore.com>
7832 * gnat_rm.texi: First set of documentation additions for
7833 predefined RM units.
7834 * checks.adb: Minor reformatting.
7835 * sem_elab.adb (Check_Task_Activation): Minor fix to error
7837 * sem_util.adb: Minor reformatting.
7839 2014-02-25 Arnaud Charlet <charlet@adacore.com>
7841 * usage.adb (Usage): Add help on -gnateC.
7842 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
7843 * opt.ads (Generate_CodePeer_Messages): New flag.
7844 * gnat_ugn.texi: Document new switch -gnateC.
7846 2014-02-25 Ben Brosgol <brosgol@adacore.com>
7848 * gnat_rm.texi: Corrected minor typos in Implementation Defined
7850 * opt.ads: Minor reformatting.
7852 2014-02-25 Robert Dewar <dewar@adacore.com>
7854 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
7855 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
7857 * opt.ads (Warn_Info_Messages): New flag.
7858 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
7860 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
7862 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
7863 * usage.adb: Add documentation of -gnatel/-gnateL Update
7864 documentation of -gnatwl/-gnatwL.
7865 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
7866 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
7868 2014-02-25 Robert Dewar <dewar@adacore.com>
7870 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
7871 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
7872 * interfac.ads: Minor code reorganization (add pragma
7873 Compiler_Unit_Warning).
7874 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
7875 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
7876 Has_Shift_Operator flag.
7877 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
7878 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
7879 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
7880 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
7881 Add entry for Name_Amount.
7882 * checks.adb (Selected_Range_Checks): When checking for a null
7883 range, make sure we use the base type, and not the subtype for
7884 deciding a range is null.
7885 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
7886 for suspicious loop bound which is outside the range of the
7888 * gnat_ugn.texi: Add documentation section "Determining the
7889 Chosen Elaboration Order"
7890 * sem_ch13.adb (UC_Entry): Add field Act_Unit
7891 (Validate_Unchecked_Conversion): Store Act_Unit
7892 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
7893 * treepr.adb: Minor reformatting.
7895 2014-02-25 Arnaud Charlet <charlet@adacore.com>
7897 * usage.adb: Minor: fix typo.
7899 2014-02-25 Robert Dewar <dewar@adacore.com>
7901 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
7902 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
7903 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
7904 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
7905 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
7906 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
7907 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
7908 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
7909 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
7910 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
7911 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
7912 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
7913 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
7914 Compiler_Unit_Warning, change Compiler_Unit everywhere to
7915 Compiler_Unit_Warning.
7917 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
7919 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
7920 in ASIS mode aggregates that are used as aspect definitions.
7922 2014-02-25 Robert Dewar <dewar@adacore.com>
7924 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
7927 2014-02-25 Ed Schonberg <schonberg@adacore.com>
7929 * freeze.adb (Freeze_Entity): If the return type of a function
7930 is a limited view, and the non-limited view has not been seen yet,
7931 defer freezing to some later point.
7933 2014-02-25 Robert Dewar <dewar@adacore.com>
7935 * sem_ch3.adb: Minor reformatting.
7937 2014-02-25 Robert Dewar <dewar@adacore.com>
7939 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
7940 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
7941 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
7942 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
7943 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
7944 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
7945 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
7946 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
7947 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
7948 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
7949 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
7950 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
7951 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
7952 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
7953 snames.ads-tmpl: Change Compiler_Unit everywhere to
7954 Compiler_Unit_Warning.
7956 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7958 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
7959 (Collect_Body_Postconditions_In_Decls): New routine.
7960 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
7961 postcondition aspects or pragmas that appear on a subprogram
7963 (Collect_Spec_Preconditions): Factor out code. Handle
7964 precondition aspects or pragmas that appear on a subprogram
7966 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
7967 aspects that apply to a subprogram body stub is no longer delayed,
7968 the aspects are analyzed on the spot.
7969 (SPARK_Aspect_Error):
7970 Aspects that apply to a subprogram declaration cannot appear in
7972 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
7973 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
7974 is now a local variable. Code cleanup. Analysis related to
7975 the aspects of a subprogram body stub is now carried out by
7976 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
7977 and/or pragmas of a subprogram body stub to the proper body
7978 as this is no longer needed. Do not analyze the aspects of a
7979 subprogram stub when the corresponding source unit is missing.
7980 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
7982 (Analyze_Task_Body_Stub): Flag the illegal use of
7984 (Optional_Subunit): Add local variable Unum.
7985 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
7986 pragma when it applies to a subprogram body stub.
7987 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
7988 Depends and Global can now apply to a subprogram body stub as
7989 long as it acts as its own spec.
7990 (Analyze_Refined_Pragma):
7991 Code reformatting. Refinement pragmas cannot apply to a subunit.
7993 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
7995 * einfo.ads Update the usage of flag
7996 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
7997 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
7998 now starts with the letter 'C'. This makes reading expanded
8000 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8001 Iter_Loop. Signal that an Ada 2012 iterator loop requires
8002 secondary stack management when creating a transient scope for
8003 an element reference.
8004 * exp_util.adb (Process_Statements_For_Controlled_Objects):
8005 When wrapping the statements of a loop, pass the E_Loop entity
8006 to the wrapping machinery.
8007 (Wrap_Statements_In_Block): Add
8008 formal parameter Scop along with comment on usage. Add local
8009 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8010 block as requiring secondary stack management when the block is
8011 created inside an Ada 2012 iterator loop. This ensures that any
8012 reference objects are reclaimed on each iteration of the loop.
8013 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8014 tasked with the handling of container iterators as requiring
8015 secondary stack management. This ensures that iterators are
8016 reclaimed when the loop terminates or is exited in any fashion.
8017 * sem_util.adb (Add_Block_Identifier): New routine.
8018 (Find_Enclosing_Iterator_Loop): New routine.
8019 * sem_util.ads (Add_Block_Identifier): New routine.
8020 (Find_Enclosing_Iterator_Loop): New routine.
8022 2014-02-25 Robert Dewar <dewar@adacore.com>
8024 * sinfo.ads: Minor reformatting.
8026 2014-02-25 Tristan Gingold <gingold@adacore.com>
8028 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8030 2014-02-25 Pascal Obry <obry@adacore.com>
8032 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8034 2014-02-25 Tristan Gingold <gingold@adacore.com>
8036 * sem_ch10.adb: Minor comment fix.
8038 2014-02-25 Bob Duff <duff@adacore.com>
8040 * s-tasdeb.adb: Misc cleanup of this package,
8041 including printing addresses in hexadecimal.
8042 (Write): Fix minor bug when taking 'Address of an empty string.
8044 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8046 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8047 public child unit when it does not refer to the abstract state
8048 of a public ancestor.
8050 2014-02-25 Yannick Moy <moy@adacore.com>
8052 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8053 Validity_Checks in GNATprove and CodePeer modes.
8055 2014-02-25 Pascal Obry <obry@adacore.com>
8057 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8058 Artifacts attribute.
8060 2014-02-25 Yannick Moy <moy@adacore.com>
8062 * sem_prag.adb: Minor reformatting to get consistent messages.
8064 2014-02-25 Robert Dewar <dewar@adacore.com>
8066 * checks.adb: Minor reformatting.
8067 * sinfo.ads (Do_Range_Check): Document that this flag is never
8068 passed to the back end.
8070 2014-02-25 Yannick Moy <moy@adacore.com>
8072 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8073 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8075 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8077 * sem_res.adb (Appears_In_Check): New routine.
8078 (Resolve_Entity_Name): Remove local variables Prev and
8079 Usage_OK. Par is now a constant. Remove the parent chain traversal
8080 as the placement of a volatile object with enabled property
8081 Async_Writers and/or Effective_Reads must appear immediately
8082 within a legal construct.
8084 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
8086 * checks.adb (Apply_Selected_Range_Checks):
8087 Alphabetize local constants and variables. Add comments.
8088 Always insert a range check that requires runtime evaluation into
8091 2014-02-25 Robert Dewar <dewar@adacore.com>
8093 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8095 2014-02-25 Bob Duff <duff@adacore.com>
8097 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8098 iterations while waiting for independent tasks to terminate;
8099 if an independent task does not terminate, we do not want to
8100 hang here. In that case, the thread will be terminated when the
8102 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8104 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8106 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8107 used to perform pre-analysis of the expression for SPARK
8108 aspects that have a non-standard syntax, such as GLobal and
8109 Initializes. The procedure applies to the original expression
8110 in an aspect specification, prior to the analysis of the
8111 corresponding pragma, in order to provide semantic information
8112 for ASIS navigation purposes.
8113 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8114 Call new subprogram.
8116 2014-02-25 Yannick Moy <moy@adacore.com>
8118 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8120 2014-02-25 Doug Rupp <rupp@adacore.com>
8122 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8123 (__gnat_adjust_context_for_raise): Bump the PC by 2.
8125 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8127 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8128 misplaced IS, add a statement sequence to improper body only if
8129 one has not been parsed already.
8131 2014-02-25 Ed Schonberg <schonberg@adacore.com>
8133 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8134 mismatch when multidimensional array is updated with a single
8137 2014-02-25 Yannick Moy <moy@adacore.com>
8139 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8140 sem_ch6.adb: Mark most references to SPARK RM in error messages
8143 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8145 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8146 appears in a list of basic declarations, complete the tree with
8147 an empty statement list, to prevent cascaded errors and crashes
8148 if semantic analysis is attempted.
8150 2014-02-24 Thomas Quinot <quinot@adacore.com>
8152 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8154 * erroutc.adb: Minor reformatting.
8156 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8158 * sem_prag.adb (Check_Clause_Syntax): Account
8159 for a solitary input item in a dependency list.
8161 2014-02-24 Yannick Moy <moy@adacore.com>
8163 * gnat1drv.adb (Adjust_Global_Switches): Do not
8164 use validity checks at all in GNATprove_Mode.
8166 2014-02-24 Robert Dewar <dewar@adacore.com>
8168 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
8169 atree.adb, atree.ads: Minor reformatting.
8171 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8173 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
8174 global and dependence refinement when SPARK_Mode is off.
8175 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
8176 state refinement when SPARK_Mode is off.
8177 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
8178 variable Decl. Insert the generated pragma for Refined_State
8179 after a potential pragma SPARK_Mode.
8180 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
8181 constant Deps. Remove local variable Expr. Check the syntax
8182 of pragma Depends when SPARK_Mode is off. Factor out the
8183 processing for extra parenthesis around individual clauses.
8184 (Analyze_Global_In_Decl_List): Items is now a constant. Check
8185 the syntax of pragma Global when SPARK_Mode is off.
8186 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
8187 Initializes when SPARK_Mode is off.
8188 (Analyze_Part_Of): Check
8189 the syntax of the encapsulating state when SPARK_Mode is off.
8190 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
8191 SPARK_Mode is off. Move the declaration order check with respect
8192 to pragma Initializes to the end of the processing. Do not verify
8193 the declaration order for pragma Initial_Condition when SPARK_Mode
8194 is off. Do not complain about a useless package refinement when
8196 (Analyze_Refined_Depends_In_Decl_Part): Refs
8197 is now a constant. Check the syntax of pragma Refined_Depends
8198 when SPARK_Mode is off.
8199 (Analyze_Refined_Global_In_Decl_Part):
8200 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
8201 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
8202 Refined_State when SPARK_Mode is off.
8203 (Check_Dependence_List_Syntax): New routine.
8204 (Check_Global_List_Syntax): New routine.
8205 (Check_Initialization_List_Syntax): New routine.
8206 (Check_Item_Syntax): New routine.
8207 (Check_State_Declaration_Syntax): New routine.
8208 (Check_Refinement_List_Syntax): New routine.
8209 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
8211 2014-02-24 Robert Dewar <dewar@adacore.com>
8213 * a-tags.adb, s-os_lib.adb: Minor reformatting.
8215 2014-02-24 Thomas Quinot <quinot@adacore.com>
8217 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
8218 strerror message, not just numeric errno value.
8220 2014-02-24 Doug Rupp <rupp@adacore.com>
8222 * raise-gcc.c (exception_class_eq): Make endian neutral.
8224 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8226 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
8227 flag, and reset Etype and Analyzed attributes unconditionally
8228 when copying a tree that may be partly analyzed.
8229 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
8230 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
8231 within a subprogram body and applies to it, remove it from the
8232 body before making a copy of it, to prevent spurious errors when
8233 analyzing the copied body.
8235 2014-02-24 Thomas Quinot <quinot@adacore.com>
8237 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
8238 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
8239 vxWorks.h has been included. Also ensure that file attributes
8240 related definitions are output even in cases where socket support
8242 * a-tags.adb: Code clean up.
8243 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
8244 instead of -I to add the main ada source directory to the header
8245 search path, in order to avoid conflict between our own "types.h"
8246 and VxWork's <types.h>.
8248 2014-02-24 Robert Dewar <dewar@adacore.com>
8250 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
8251 * debug.adb: Remove documentation of -gnatd.X, no longer used.
8252 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
8254 2014-02-24 Bob Duff <duff@adacore.com>
8256 * gnat_ugn.texi: Improve documentation of gnatpp.
8258 2014-02-24 Thomas Quinot <quinot@adacore.com>
8260 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
8261 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
8262 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
8263 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
8264 a chars_ptr, because on Windows this is a renaming of
8265 Socket_Error_Message.
8267 2014-02-24 Robert Dewar <dewar@adacore.com>
8269 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
8270 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
8271 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
8274 2014-02-24 Thomas Quinot <quinot@adacore.com>
8276 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
8277 that the source directory containing s-oscons-tmplt.c is on the
8278 include path, so that all internal header files are available.
8280 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8282 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
8283 domain of iteration is an attribute reference 'Old, this is an
8284 Ada 2012 iterator and the loop must be rewritten as such.
8286 2014-02-24 Thomas Quinot <quinot@adacore.com>
8288 * s-fileio.adb (Errno_Message): Remove, use shared version from
8290 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
8291 * g-stseme (Socket_Error_Message): Reimplement in terms of new
8293 * g-socthi.ads, g-socthi.adb: Change profile of
8294 Socket_Error_Message to return String to allow the above.
8295 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
8296 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
8297 * g-socthi-vxworks.ads: Update to account for the above profile
8299 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
8300 * s-crtl.ads (strncpy): New procedure.
8301 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
8302 Use import from s-crtl.
8303 * a-envvar.adb, osint.adb: Use imports of C runtime functions
8304 from s-crtl instead of re-importing locally.
8306 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8308 * sem_prag.adb (Analyze_Global_Item): Emit the
8309 variable related checks concerning volatile objects only when
8312 2014-02-24 Robert Dewar <dewar@adacore.com>
8314 * sem_ch5.adb (Analyze_Iterator_Specification): use
8315 Error_Msg_Ada_2012_Feature.
8317 2014-02-24 Jose Ruiz <ruiz@adacore.com>
8319 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
8320 No_Local_Timing_Events and No_Specific_Termination_Handlers
8321 must be set, according to the Ravenscar profile definition
8324 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8326 * sem_ch6.adb (Analyze_Expression_Function): If this is a
8327 completion, freeze return type and its designated type if needed.
8329 2014-02-24 Thomas Quinot <quinot@adacore.com>
8331 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8332 'Address): When moving initialization statements to a freeze
8333 entity, keep them under a single node (i.e. do not unwrap
8334 expressions with actions), and set the Initialization_Statements
8335 attribute again so that processing of a later pragma Import can
8338 2014-02-24 Claire Dross <dross@adacore.com>
8340 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
8341 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
8342 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
8343 Left/Right to First_To_Previous/Current_To_Last.
8345 2014-02-24 Thomas Quinot <quinot@adacore.com>
8347 * adaint.h (struct file_attributes): New component "error"
8348 (__gnat_error_attributes): Accessor for the above.
8349 * adaint.c (__gnat_error_attributes): New subprogram
8350 (__gnat_stat): Fix returned value (expect errno value)
8351 (__gnat_stat_to_attr): Add management of error component (set to
8352 stat errno value, except for missing files where it is set to 0,
8353 and exists is set to 0).
8354 * osint.ads (File_Attributes_Size): Update per change above,
8355 also clarify documentation.
8356 * s-filatt.ads: New file, binding to file attributes related
8358 * Makefile.rtl (s-filatt): New runtime unit.
8359 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
8360 to library function if not available on target).
8361 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
8362 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
8363 SIZEOF_struct_dirent_alloc): New constants.
8364 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
8365 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
8366 Perform appropriate error checking if stat fails (do not just
8367 ignore existing files if stat fails)
8368 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
8371 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8373 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
8374 the use of volatile objects as global items in a function to
8375 the variable related checks section.
8376 * sem_util.adb (Async_Readers_Enabled): Directly call
8377 Has_Enabled_Property.
8378 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
8379 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
8380 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
8381 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
8382 Update the comment on usage. State_Has_Enabled_Property how handles
8383 the original logic of the routine. Add processing for variables.
8384 (State_Has_Enabled_Property): New routine.
8385 (Variable_Has_Enabled_Property): New routine.
8387 2014-02-24 Robert Dewar <dewar@adacore.com>
8389 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
8391 * atree.ads, atree.adb (Node35): New function.
8392 (Set_Node35): New procedure.
8393 * debug.adb: Define new debug flag -gnatd.X.
8394 * einfo.ads, einfo.adb (Import_Pragma): New field.
8395 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
8396 really active yet, has to be activated with -gnatd.X.
8397 * sem_prag.adb (Set_Imported): Set new Import_Pragma
8398 field (Set_Imported): Don't set Is_Public (see
8399 Freeze.Wrap_Imported_Subprogram)
8400 * par-ch3.adb (P_Component_List): Handle unexpected null component.
8402 2014-02-24 Yannick Moy <moy@adacore.com>
8404 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
8405 * gnat_rm.texi: Correct documentation of attribute Update.
8407 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8409 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
8410 iterator in older versions of Ada.
8412 2014-02-24 Gary Dismukes <dismukes@adacore.com>
8414 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
8415 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
8417 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8419 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
8420 indexed_components that are instances of Ada 2012 container
8421 indexing operations. Analysis and resolution of such nodes
8422 is performed on the attribute, and the original source is
8423 preserved for ASIS operations. If expansion is enabled, the
8424 indexed component is replaced by the value of this attribute,
8425 which is in a call to an Indexing aspect, in most case wrapped
8426 in a dereference operation.
8427 * sem_ch4.adb (Analyze_Indexed_Component): Create
8428 Generalized_Indexing attribute when appropriate.
8429 (Analyze_Call): If prefix is not overloadable and has an indexing
8430 aspect, transform into an indexed component so it can be analyzed
8431 as a potential container indexing.
8432 (Analyze_Expression): If node is an indexed component with a
8433 Generalized_ Indexing, do not re-analyze.
8434 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
8435 of an indexed_component that has been transformed into a container
8437 (Resolve_Indexed_Component): Call the above when required.
8438 (Resolve): Do not insert an explicit dereference operation on
8439 an indexed_component whose type has an implicit dereference:
8440 the operation is inserted when resolving the related
8441 Generalized_Indexing.
8443 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
8445 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
8448 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8450 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
8452 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
8453 Merge the expected and available mode errors.
8454 (Report_Unused_Constituents): Remove leading spaces in error messages.
8455 (Report_Unused_States): Remove leading spaces in error messages.
8457 2014-02-24 Thomas Quinot <quinot@adacore.com>
8459 * par_sco.adb (Traverse_One): Refine categorization of statement
8462 2014-02-24 Robert Dewar <dewar@adacore.com>
8464 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
8465 Pure_05, Pure_12 and Preelaborate_05.
8466 * gnat_rm.texi: Update accordingly.
8467 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
8468 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
8469 Recognize one argument form of these pragmas only in GNAT mode
8472 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8474 * s-dimmks.ads: Replace symbol for temperature, previously the
8475 Greek letter Theta, by the ASCII @ sign.
8476 * s-diflio.ads: ditto.
8478 2014-02-24 Robert Dewar <dewar@adacore.com>
8480 * exp_ch4.adb: Minor code reorganization (use OR for boolean
8482 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
8484 2014-02-24 Ben Brosgol <brosgol@adacore.com>
8486 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
8487 so that references to gnatmem and ASIS tools do not appear in the FSF
8488 edition of the GNAT User's Guide.
8490 2014-02-24 Yannick Moy <moy@adacore.com>
8492 * freeze.adb (Freeze_Entity): Do not issue warning
8493 for pre/post being ignored on imported subprogram in GNATprove
8496 2014-02-24 Robert Dewar <dewar@adacore.com>
8498 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
8499 stand.ads, sem_eval.adb: Minor reformatting.
8501 2014-02-24 Yannick Moy <moy@adacore.com>
8503 * sem_prag.adb: Minor rewording in error message.
8505 2014-02-24 Johannes Kanig <kanig@adacore.com>
8507 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
8508 GNATprove_mode, gnat2why doesn't need nor use these types.
8510 2014-02-24 Gary Dismukes <dismukes@adacore.com>
8512 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
8513 target, in the case of signed integer exponentiation that uses a
8514 run-time routine, always select the Exp_* versions, since overflow
8515 checking is automatically done by AAMP arithmetic instructions.
8517 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8519 * sem_ch13.adb (Analyze_Aspect_Specifications):
8520 When the related context is a package instace, insert pragma
8521 Abstract_State after all internally-generated renamings related
8522 to the instance "header".
8524 2014-02-24 Ed Schonberg <schonberg@adacore.com>
8526 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
8528 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
8529 call to an abstract subprogram is legal if it appears in a
8530 pre/postcondition of another abstract operation.
8532 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
8534 * gnat_ugn.texi: Misc updates.
8536 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
8538 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
8540 2014-02-24 Gary Dismukes <dismukes@adacore.com>
8542 * layout.adb (Layout_Variant_Record): Instantiate
8543 Generic_Check_Choices and call Check_Choices before calling
8544 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
8545 set to prevent generating incorrect discriminant-checking
8546 functions for 'others' variants (functions that unconditionally
8547 return True rather than accounting for the values covered by the
8549 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
8550 Formal_Derived_Matching.
8551 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
8552 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
8553 Formal_Derived_Matching formal to Subtypes_Statically_Match.
8554 (Subtypes_Statically_Match): Suppress the Object_Size matching
8555 test in the case where Formal_Derived_Matching is True.
8556 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
8557 True for Formal_Derived_Matching_Formal on the call to
8558 Subtypes_Statically_Compatible.
8560 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
8562 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
8564 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
8566 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
8567 Look through a conversion between original and packable version to get
8569 (build_component_ref): Rework comment and fix formatting.
8571 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
8573 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
8574 project-specific options.
8576 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8578 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
8579 not Constraint_Error.
8580 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
8581 * sem_ch5.adb: Code clean up.
8583 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
8585 * sem_prag.adb (Usage_Error): Remove local
8586 constant Typ. Remove the specialized diagnostics for unconstrained
8587 or tagged items as those are not part of the explicit input set
8588 of the related subprogram and should not be flagged.
8590 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8592 * sem_attr.adb: Add guard to preserve all errors.
8594 2014-02-20 Vincent Celier <celier@adacore.com>
8596 * switch-m.adb (Normalize_Compiler_Switches): Take into account
8597 switches that are recorded in ALI files: -gnateA, -gnateE,
8598 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
8600 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8602 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
8603 of an element iterator form over a formal container with an
8605 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
8606 to create declaration and loop statements for both forms of
8607 container iterators.
8608 (Expand_Formal_Container_Element_Iterator): New procedure
8609 to handle loops of the form "for E of C" when C is a formal
8611 (Expand_Formal_Container_Iterator): Code cleanup.
8613 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
8615 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
8616 (Analyze_Contract_Case): Remove the use of
8617 "may". Replace "aspect Contract_Cases" to avoid categorization
8618 of aspect vs pragma.
8619 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
8620 (Analyze_Global_Item): Remove
8621 the use of "formal", specify the subprogram. Split the
8622 error message about a state with visible refinement into
8623 two. Remove the use of "global" from "volatile global item".
8624 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
8626 (Analyze_Input_Output): Update the call to
8627 Check_Mode. Specify the duplicated item. Reword the error
8628 message concerning an input of a null output list. Use "\"
8629 for error message continuation.
8630 (Analyze_Part_Of): Remove
8631 the use of "may". Use "\" for error message continuation.
8632 (Analyze_Refined_Depends_In_Decl_Part): Update the error
8633 message concerning a useless refinement to match the format
8635 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
8636 concerning a useless refinement.
8637 (Analyze_Refinement_Clause): Use "\" for error message continuation.
8638 (Check_Constituent_Usage): Use "\" for error message continuation.
8639 (Check_Dependency_Clause): Use "\" for error message continuation.
8640 (Check_Matching_Constituent): Use "\" for error message continuation.
8641 (Check_Missing_Part_Of): Use "\" for error message continuation.
8642 (Check_Mode): Renamed to
8643 Check_Role. Update the comment on usage. Redo the error reporting
8645 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
8646 message continuation.
8647 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
8648 with comment on usage. Update all occurrences of Is_Input and Is_Output.
8649 (Inconsistent_Mode_Error): Use "\" for error message continuation.
8650 (Input_Match): Use "\" for error message continuation.
8651 (Role_Error): New routine.
8652 (Set_Convention_From_Pragma): Use "\" for error message continuation.
8653 (Usage_Error): Add local variable Error_Msg. Build specialized error
8654 message showcasing the offending item kind. Redo the diagnostics for
8655 unconstrained types.
8657 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8659 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
8660 to determine whether a type is a container type, rather than
8661 examining only its type declaration, so that subtypes and derived
8662 types are handled properly.
8664 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
8666 * gnat_ugn.texi: gnatmetric: add description of project-specific
8669 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8671 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
8672 all choices in an association for a record type have the same
8673 type, as is done for record aggregates.
8675 2014-02-20 Robert Dewar <dewar@adacore.com>
8677 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
8678 Unmodified rather than Warnings (Off). Make comments
8679 uniform in the four affected units.
8681 2014-02-20 Robert Dewar <dewar@adacore.com>
8683 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
8684 Object_Size): For non-scalar types allow any value that is a
8686 * gnat_rm.texi: Document Object_Size for composites more clearly.
8688 2014-02-20 Yannick Moy <moy@adacore.com>
8690 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
8692 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8694 * stand.ads: Raise_Type: new predefined entity, used as the type
8695 of a Raise_Expression prior to resolution.
8696 * cstand.adb: Build entity for Raise_Type.
8697 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
8698 initial type of the node.
8699 * sem_type.adb (Covers): Raise_Type is compatible with all
8701 * sem_res.adb (Resolve): Remove special handling of Any_Type on
8702 Raise_Expression nodes.
8703 (Resolve_Raise_Expression): Signal ambiguity if the type of the
8704 context is still Raise_Type.
8706 2014-02-20 Robert Dewar <dewar@adacore.com>
8708 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
8709 mismatching predicates.
8710 * sem_ch6.adb (Check_Conformance): Give better messages on
8712 * sem_eval.adb (Predicates_Match): Move to spec.
8713 * sem_eval.ads (Predicates_Match): Moved here from body.
8715 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8717 * a-cbmutr.adb: Use default value in Insert_Child.
8719 2014-02-20 Vincent Celier <celier@adacore.com>
8721 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
8722 Stringt.Initialize in all project aware tools.
8724 2014-02-20 Doug Rupp <rupp@adacore.com>
8726 * gnat_ugn.texi: Document gnatbind -X option.
8727 * vms_data.ads: Minor warnings documentation reformatting.
8729 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8731 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
8732 procedure for a base type.
8734 2014-02-20 Robert Dewar <dewar@adacore.com>
8736 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
8737 expression with type info.
8738 * sem_ch13.adb: Minor reformatting.
8739 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
8740 False if predicates do not match on the two types.
8742 2014-02-20 Arnaud Charlet <charlet@adacore.com>
8744 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
8745 In Relaxed_RM_Semantics mode, allow any static integer value,
8746 for compatibility with other compilers.
8748 2014-02-20 Vincent Celier <celier@adacore.com>
8750 * errutil.adb (Initialize): Properly initialize entry in table
8751 Warnings when warnings are suppressed.
8753 2014-02-20 Robert Dewar <dewar@adacore.com>
8755 * s-os_lib.ads: Add warning about non-portability of Rename_File.
8756 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
8757 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
8758 * gnat_ugn.texi: Document no warnings on junk variable names.
8759 * layout.adb: Minor code reorganization (use Ekind_In).
8760 * stringt.adb: Move initialization of Null_String_Id to Initialize
8763 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8765 * sem_ch13.adb: Initialize optional Element_Id.
8767 2014-02-20 Robert Dewar <dewar@adacore.com>
8769 * s-os_lib.ads (Rename_File): Minor commment addition.
8771 2014-02-20 Thomas Quinot <quinot@adacore.com>
8773 * einfo.ads: Minor reformatting.
8775 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
8777 * aspects.adb (Exchange_Aspects): New routine.
8778 * aspects.ads (Exchange_Aspects): New routine.
8779 * atree.adb (Rewrite): Do not check whether the save node has
8780 aspects as it never will, instead check the node about to be clobbered.
8781 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
8782 entities of generic packages.
8783 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
8784 pointer of an aspect specification list after rewriting takes place.
8785 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
8786 specifications of the generic template and the copy used for analysis.
8787 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
8788 the aspect specifications of the generic template and the
8789 copy used for analysis.
8790 (Analyze_Package_Instantiation): Propagate the aspect specifications
8791 from the generic template to the instantiation.
8792 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
8793 specifications from the generic template to the instantiation.
8794 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
8795 Abstract_State, Initializes and Initial_Condition when they
8796 apply to a package instantiation.
8798 2014-02-20 Robert Dewar <dewar@adacore.com>
8800 * stringt.adb: Add call to Initialize in package initialization.
8802 2014-02-20 Robert Dewar <dewar@adacore.com>
8804 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
8805 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
8806 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
8807 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
8810 2014-02-20 Bob Duff <duff@adacore.com>
8812 * s-os_lib.ads: Minor: Remove incorrect comment.
8814 2014-02-20 Robert Dewar <dewar@adacore.com>
8816 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
8818 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8820 * a-cborma.adb (Assign): When creating a node without a specified
8821 element, insert an uninitialized element in the map, because
8822 the instance may provide an element type with a default
8823 initialization, e.g a scalar with a Default_Value aspect.
8824 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
8825 (Insert): In the version without explicit element, provide an
8826 uninitialized element, as above.
8827 * a-cbdlli.adb (Append): In the version without explicit element,
8828 provide an uninitalized element, as above.
8829 (Allocate): Remove unused version.
8831 2014-02-20 Robert Dewar <dewar@adacore.com>
8833 * sem_elab.adb: Minor code reorganization (use Nkind_In).
8834 * stringt.adb: Remove temporary pragma Warnings (Off).
8835 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
8838 2014-02-20 Matthew Heaney <heaney@adacore.com>
8840 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
8843 2014-02-20 Ed Schonberg <schonberg@adacore.com>
8845 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
8846 properly the cursor type for subsequent volatile testing in SPARK
8847 mode, when domain is a formal container with an Iterabe aspect.
8849 2014-02-20 Robert Dewar <dewar@adacore.com>
8851 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
8852 (Set_Specific_Warning_Off): Add Reason argument.
8853 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
8854 (Set_Specific_Warning_Off): Add Reason argument.
8855 * erroutc.adb (Warnings_Entry): Add Reason field
8856 (Specific_Warning_Entry): Add Reason field.
8857 (Warnings_Suppressed): return String_Id for Reason.
8858 (Warning_Specifically_Suppressed): return String_Id for Reason.
8859 * erroutc.ads (Warnings_Entry): Add Reason field.
8860 (Specific_Warning_Entry): Add Reason field.
8861 (Set_Specific_Warning_Off): Add Reason argument.
8862 (Set_Warnings_Mode_Off): Add Reason argument.
8863 (Warnings_Suppressed): return String_Id for Reason.
8864 (Warning_Specifically_Suppressed): return String_Id for Reason.
8865 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
8866 (Warning_Specifically_Suppressed): returns String_Id for Reason
8867 * gnat_rm.texi: Document that Warning parameter is string literal
8868 or a concatenation of string literals.
8869 * par-prag.adb: New handling for Reason argument.
8870 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
8871 for Reason argument.
8872 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
8873 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
8874 * stringt.adb: Set Null_String_Id.
8875 * stringt.ads (Null_String_Id): New constant.
8877 2014-02-20 Robert Dewar <dewar@adacore.com>
8879 * einfo.ads: Minor comment addition: Etype of package is
8881 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
8882 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
8883 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
8884 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
8885 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
8886 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
8887 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
8888 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
8889 Replace all calls with calls to New_Occurrence_Of.
8891 2014-02-20 Robert Dewar <dewar@adacore.com>
8893 * par-util.adb (Ignore, case of right paren): Make this a
8896 2014-02-19 Robert Dewar <dewar@adacore.com>
8898 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
8899 * debug.adb: Remove -gnatd.X switch, no longer used.
8900 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
8903 2014-02-19 Bob Duff <duff@adacore.com>
8905 * g-socket.ads: Minor: Correct some comments.
8907 2014-02-19 Ed Schonberg <schonberg@adacore.com>
8909 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
8911 2014-02-19 Arnaud Charlet <charlet@adacore.com>
8913 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
8914 an error on out of range priorities if Relaxed_RM_Semantics.
8915 * sem_prag.adb (Analyze_Pragma): Ditto.
8917 2014-02-19 Bob Duff <duff@adacore.com>
8919 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
8920 where F denotes the renaming of an enumeration literal, and
8921 issue a specialized error message.
8923 2014-02-19 Matthew Heaney <heaney@adacore.com>
8925 * a-chtgop.ads (Checked_Index): New operation.
8926 (Next): Changed mode of hash table.
8927 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
8928 (Generic_Read, Reserve_Capacity): Ditto.
8929 (Generic_Equal): Detect tampering.
8930 (Next): Changed mode of hash table, detect tampering.
8931 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
8933 (Find): Changed mode of hash table.
8934 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
8935 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
8937 (Find): Changed mode of hash table, check for tampering.
8938 (Generic_Replace_Element): Check for tampering.
8939 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
8940 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
8941 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
8943 (Find, Generic_Replace_Element): Check for tampering.
8944 * a-chtgbo.ads (Checked_Index): New operation.
8945 * a-chtgbo.adb (Checked_Index): New operation
8946 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
8947 (Generic_Read, Next): Ditto.
8948 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
8949 table (Difference, Intersection): Use variable view of
8950 source, detect tampering (Find, Is_Subset, Overlap): Use
8951 variable view of container (Symmetric_Difference, Union):
8952 Detect tampering (Vet): Use Checked_Index to detect tampering
8953 (Constant_Reference, Element, Find): Use variable view of
8955 (Update_Element_Preserving_Key): Detect tampering.
8956 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
8959 (Equivalent_Sets, Overlap): Use Node's Next component.
8960 (Vet): Use Checked_Index to detect tampering.
8961 (Constant_Reference, Element, Find): Use variable view of container.
8962 (Update_Element_Preserving_Key): Detect tampering.
8963 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
8964 Element, Find): Use variable view of container.
8965 (Reference): Rename hash table component.
8966 (Vet): Use Checked_Index to detect tampering.
8968 2014-02-19 Arnaud Charlet <charlet@adacore.com>
8970 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
8973 2014-02-19 Thomas Quinot <quinot@adacore.com>
8975 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
8976 against calls without Def_Id.
8978 2014-02-19 Claire Dross <dross@adacore.com>
8980 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
8981 a-cofove.ads: Add global annotations to subprograms.
8983 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
8985 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
8986 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
8987 Initial_Condition no longer requires the presence of pragma
8988 Initialized. Do not try to diagnose whether all variables mentioned in
8989 pragma Initializes also appear in Initial_Condition.
8990 (Collect_Variables): Removed.
8991 (Match_Variable): Removed.
8992 (Match_Variables): Removed.
8993 (Report_Unused_Variables): Removed.
8995 2014-02-19 Thomas Quinot <quinot@adacore.com>
8997 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
8999 2014-02-19 Robert Dewar <dewar@adacore.com>
9001 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9004 2014-02-19 Vincent Celier <celier@adacore.com>
9006 * prj-part.adb (Parse_Single_Project): Use the fully resolved
9007 project path, with all symbolic links resolved, to check if the
9008 same project is imported with a different unresolved path.
9009 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9010 changed to Resolved_Path to reflect that all symbolic links
9013 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9015 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9016 from sem_ch13, for use elsewhere.
9017 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9018 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9019 cursor type on the loop variable when the iteration is over o
9022 2014-02-19 Vincent Celier <celier@adacore.com>
9024 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9025 for an empty Target (Check_Target): Never fail when an empty
9026 target is declared in the configuration project.
9028 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9030 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9031 the pragma comes fron a predicate aspect and the context is a
9032 record declaration within the scope that declares the type.
9034 2014-02-19 Robert Dewar <dewar@adacore.com>
9036 * gnat_rm.texi: Minor clarifications.
9037 * expander.adb, sem_aggr.adb: Add comments.
9039 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9041 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9042 applies to a subprogram body, the name is the current scope,
9043 rather than being declared in the current scope.
9044 (Analyze_Pragma, case No_Return): Handle properly a No_Return
9045 aspect applied to a subprogram body.
9047 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9049 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9050 of overloaded subprograms, and fix bug in handling of primitive
9053 2014-02-19 Pascal Obry <obry@adacore.com>
9055 * s-os_lib.adb: Minor reformatting.
9057 2014-02-19 Yannick Moy <moy@adacore.com>
9059 * expander.adb (Expand): Do nothing inside generics.
9060 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9063 2014-02-19 Yannick Moy <moy@adacore.com>
9065 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9067 2014-02-19 Robert Dewar <dewar@adacore.com>
9069 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9070 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9073 2014-02-19 Claire Dross <dross@adacore.com>
9075 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9076 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9078 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9080 * sem_ch3.adb (Analyze_Declarations): Analyze
9081 a package contract at the end of the private declarations (if
9082 applicable), otherwise analyze it and the end of the visible
9085 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9087 * style.adb (Missing_Overriding): If subprogram is an
9088 instantiation, place warning on the instance node itself,
9089 without mention of the original generic. Do not emit message
9090 if explicit Ada version is older than the introduction of the
9091 overriding indicator.
9093 2014-02-19 Yannick Moy <moy@adacore.com>
9095 * gnat_rm.texi: Doc clarifications.
9097 2014-02-19 Yannick Moy <moy@adacore.com>
9099 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9102 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9104 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9105 specified First primitive, rather than by name.
9106 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9107 and extend error checking for missing primitives and incorrect
9110 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9112 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9113 errors when a Synchronization aspect on an overriding protected
9114 operation does not match the given aspect on the overridden
9115 operation of an ancestor interface.
9117 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9119 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9120 (Check_Loop_Pragma_Placement): Update
9121 comment on usage. Remove local variables Orig_Stmt and
9122 Within_Same_Sequence. Check that the current Loop_Invariant or
9123 Loop_Variant pragma is grouped together with other such pragmas.
9124 (Is_Loop_Pragma): New routine.
9125 (Prev_In_Loop): Removed.
9127 2014-02-19 Robert Dewar <dewar@adacore.com>
9129 * par-ch6.adb (P_Return): For extended return, end column lines
9131 * par.adb: Minor documentation clarification.
9133 2014-02-19 Yannick Moy <moy@adacore.com>
9135 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9136 that Loop_Invariant and Loop_Variant appear consecutively.
9137 * gnat_rm.texi Update documentation of Loop_Invariant and
9138 Loop_Variant pragmas.
9140 2014-02-19 Robert Dewar <dewar@adacore.com>
9142 * debug.adb: Document -gnatd.X.
9143 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9145 (Check_Then_Column): Ditto.
9146 * styleg.adb (Check_Then): Allow THEN on line after IF.
9147 (Check_Then): Check THEN placement under control of -gnatd.X
9148 * styleg.ads (Check_Then): Now called even if THEN is not first
9150 * stylesw.ads (Style_Check_If_Then_Layout): Document new
9152 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9154 2014-02-19 Robert Dewar <dewar@adacore.com>
9156 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
9157 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
9158 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
9159 vms_conv.adb: Fix bad layout of IF statements
9161 2014-02-19 Robert Dewar <dewar@adacore.com>
9163 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
9165 2014-02-19 Robert Dewar <dewar@adacore.com>
9167 * exp_util.adb: Update comments.
9169 2014-02-19 Doug Rupp <rupp@adacore.com>
9171 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
9172 * init.c (__gl_float_format): [VMS] New global.
9173 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
9174 representation in effect.
9176 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9178 * exp_ch6.adb Add with and use clause for Exp_Prag.
9179 (Expand_Contract_Cases): Relocated to Exp_Prag.
9180 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
9181 * exp_prag.adb Add with and use clauses for Checks and Validsw.
9182 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
9183 structure of the expanded code to showcase the evaluation of
9184 attribute 'Old prefixes. Add local variable Old_Evals. Expand
9185 any attribute 'Old references found within a consequence. Add
9186 circuitry to evaluate the prefixes of attribute 'Old that
9187 belong to a selected consequence.
9188 (Expand_Old_In_Consequence): New routine.
9189 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
9190 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
9191 potentially unevaluated prefix is always evaluated.
9193 2014-02-19 Robert Dewar <dewar@adacore.com>
9195 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
9196 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
9197 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
9198 handling for the case of Modify_Tree_For_C, this approach did
9200 * exp_util.adb (Matching_Standard_Type): New function
9201 (Side_Effect_Free): New top level functions (from
9202 Remove_Side_Effects).
9203 * exp_util.ads (Side_Effect_Free): New top level functions
9205 * sinfo.ads: Minor comment updates.
9207 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9209 * exp_ch6.adb (Expand_Simple_Function_Return): If return
9210 type is unconstrained and uses the secondary stack, mark the
9211 enclosing function accordingly, to ensure that the value is not
9212 prematurely removed.
9214 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9216 * par.adb Alphabetize the routines in Par.Sync.
9217 (Resync_Past_Malformed_Aspect): New routine.
9218 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
9219 variables. Code and comment reformatting. Detect missing
9220 parentheses on aspects [Refined_]Global and [Refined_]Depends
9221 with a non-null definition.
9222 * par-sync.adb: Alphabetize all routines in this separate unit.
9223 (Resync_Past_Malformed_Aspect): New routine.
9225 2014-02-19 Robert Dewar <dewar@adacore.com>
9227 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
9228 if Esize values do not match.
9230 2014-02-19 Yannick Moy <moy@adacore.com>
9232 * sinfo.ads: Minor comment update.
9234 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9236 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
9238 2014-02-19 Thomas Quinot <quinot@adacore.com>
9240 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
9241 that has the No_Ctrl_Actions flag is a suitable node to be
9242 wrapped if the assigned expression has no finalization actions.
9243 * sem_eval.adb (Eval_Entity_Name): For a compile time known
9244 boolean value, mark the corresponding condition SCO as constant.
9246 2014-02-19 Robert Dewar <dewar@adacore.com>
9248 * exp_util.adb: Minor reformatting.
9249 * exp_util.ads (Matching_Standard_Type): New function.
9250 * exp_ch7.adb: Minor reformatting.
9252 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9254 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
9255 to find declaration for Cursor, to handle properly the case of
9256 a discriminated iterable type.
9258 2014-02-19 Vincent Celier <celier@adacore.com>
9260 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
9261 imported library projects with the library ALI dirs, when setting
9263 * prj-env.ads (Ada_Objects_Path): Correct comments about
9264 argument Including_Libraries.
9266 2014-02-19 Gary Dismukes <dismukes@adacore.com>
9268 * gnat_rm.texi: Minor spelling fixes.
9270 2014-02-19 Doug Rupp <rupp@adacore.com>
9272 * init.c: Remove unneeded code.
9273 * fe.h (Float_Format): New macro
9274 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
9276 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9278 * sem_prag.adb (Check_Refined_Global_Item):
9279 A state or variable acts as a constituent only it is part of an
9280 encapsulating state and the state has visible refinement.
9282 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9284 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
9285 postcondition for a function when the expression does not mention
9286 'Result but the function has in-out parameters.
9288 2014-02-19 Robert Dewar <dewar@adacore.com>
9290 * gnat_rm.texi: Add documentation on Value_Size forcing biased
9293 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9295 * lib-xref.ads Remove the small table of letter and symbol usage as we
9298 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9300 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
9301 messages depending on the offending misplaced aspect specifications.
9302 (Diagnose_Misplaced_Aspect_Specifications): New routine.
9304 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9306 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
9307 for iterable aspect primitives.
9308 (Resolve_Iterable_Operation): Use expected signature of iterable
9309 aspect to resolve primitive when overloading is present.
9310 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
9311 (Check_Signature): Removed.
9313 2014-02-19 Yannick Moy <moy@adacore.com>
9315 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
9316 subunit in GNATprove_Mode.
9317 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
9319 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9321 * lib-xref.ads Alphabetize the contents of table
9322 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
9323 for E_Abstract_State. List all letters and symbols in use.
9324 * sem_prag.adb (Analyze_Abstract_State): Update all calls
9325 to Create_Abstract_State to reflect the new signature.
9326 (Create_Abstract_State): Change subprogram profile and update
9327 the comment on usage. Use the proper location of the state
9328 declaration when creating a new abstract state entity. Do not
9329 generate an external name, but simply reuse the name coming from
9330 the state declaration.
9332 2014-02-19 Robert Dewar <dewar@adacore.com>
9334 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
9335 declarations get properly inserted in Modify_Tree_For_C mode.
9336 * sinfo.ads: Minor comment addition.
9338 2014-02-19 Robert Dewar <dewar@adacore.com>
9340 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
9341 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
9343 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9345 * style.adb (Missing_Overriding): Warning does not apply in
9346 language versions prior to Ada 2005.
9347 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
9348 * sem_attr.adb: Add Attribute_Iterable where needed.
9349 * exp_attr.adb: ditto.
9350 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
9351 handle loops and quantified expressions over types that have an
9352 iterable aspect. Called from Expand_Iterator_Loop.
9353 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
9354 with Iterable aspect.
9355 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
9356 subprograms specified in the Iterable aspect have the proper
9357 signature involving container and cursor.
9358 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
9359 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
9360 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
9361 New procedure to retrieve one of the primitives First, Last,
9362 or Has_Element, from the value of the iterable aspect of a
9364 (Is_Container_Element): Predicate to recognize expressions
9365 that denote an element of one of the predefined containers,
9366 for possible optimization. This subprogram is not currently
9367 used, pending ARG discussions on the legality of the proposed
9368 optimization. Worth preserving for eventual use.
9369 (Is_Iterator): Recognize formal container types.
9370 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
9372 2014-02-19 Robert Dewar <dewar@adacore.com>
9374 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
9375 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
9376 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
9377 declarations from list of actions.
9378 * output.ads, output.adb (Delete_Last_Char): New procedure.
9379 * sinfo.ads: Document handling of Mod and expression with actions
9380 in Modify_Tree_For_C mode.
9382 2014-02-19 Ed Schonberg <schonberg@adacore.com>
9384 * par-ch9.adb (P_Task): Add a null statement to produce a
9385 well-formed task body when due to a previous syntax error the
9386 statement list is empty.
9388 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
9390 * sem_prag.adb (Check_Dependency_Clause): Account
9391 for the case where a state with a non-null refinement matches a
9392 null output list. Comment reformatting.
9393 (Inputs_Match): Copy a solitary input to avoid an assertion failure
9394 when trying to match the same input in multiple clauses.
9396 2014-02-19 Gary Dismukes <dismukes@adacore.com>
9398 * sem_attr.adb: Minor typo fix.
9400 2014-02-18 Robert Dewar <dewar@adacore.com>
9402 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
9403 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
9404 (Create_Standard): Create new unsigned types.
9405 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
9406 mode (Expand_N_Reference): Removed, problematic and not needed
9408 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
9410 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
9411 * expander.adb: Remove call to Expand_N_Reference (problematic,
9412 and not needed now).
9413 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
9414 * stand.adb: Read and write unsigned type entities.
9415 * stand.ads: Add new unsigned types.
9417 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
9419 * sem_ch4.adb (Analyze_Call): Do not mark a function call
9420 as being inside an assertion expression as the flag is now removed.
9421 (Check_Ghost_Subprogram_Call): Do not query the
9422 In_Assertion_Expression flag as it is now removed, instead use
9423 a predicate function.
9424 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
9425 In_Assertion_Expression flag as it is now removed, instead use
9426 a predicate function.
9427 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
9428 * sem_util.adb Add with and use clause for Sem_Prag.
9429 (In_Assertion_Expression_Pragma): New routine.
9430 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
9431 * sinfo.adb (In_Assertion_Expression): Removed.
9432 (Set_In_Assertion_Expression): Removed.
9433 * sinfo.ads Remove flag In_Assertion_Expression along with its
9435 (In_Assertion_Expression): Removed along with
9436 pragma Inline. (Set_In_Assertion_Expression): Removed along
9439 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
9441 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
9442 used together with '-r', '-rf' or '-rnb' options.
9444 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
9446 * sem_attr.adb (Analyze_Attribute): Comment
9447 and code reformatting. Use separate routines to check the
9448 legality of attribute 'Old in certain pragmas. Verify
9449 the use of 'Old, 'Result and locally declared entities
9450 within the prefix of 'Old.
9451 (Check_References_In_Prefix): New routine.
9452 (Check_Use_In_Contract_Cases): New routine.
9453 (Check_Use_In_Test_Case): New routine.
9455 2014-02-18 Vincent Celier <celier@adacore.com>
9457 * sem_aux.adb (Is_By_Reference_Type): For each components of
9458 a record type, check also if the component is volatile as it
9459 may have an aspect that makes it volatile. If it is, then the
9460 record type is a by reference type.
9462 2014-02-18 Robert Dewar <dewar@adacore.com>
9464 * exp_attr.adb: Minor reformatting.
9465 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
9466 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
9467 as another case where we don't generate N_Reference nodes for
9469 * expander.adb (Expand): Add call to Expand_N_Reference.
9471 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9473 * sem_prag.adb (Analyze_Refined_Pragma): Remove
9474 local variable Pack_Spec. Refinement pragmas may now apply to
9475 bodies of both visible and private subprograms.
9477 2014-02-06 Robert Dewar <dewar@adacore.com>
9479 * exp_attr.adb (Expand_Loop_Entry_Attribute):
9480 Minor change (Attr => N) (Expand_Pred_Succ): New name
9481 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
9482 Max): Expand into if expression if Modify_Tree_For_C mode.
9483 (Expand_N_Attribute_Reference, case Min): ditto
9484 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
9487 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9489 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
9490 predicate check if this is an internal declaration with
9491 No_Initialization set, as for an expanded aggregate component.
9493 2014-02-06 Doug Rupp <rupp@adacore.com>
9495 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
9496 conditions with severity of "SUCCESS" or "INFORMATIONAL".
9498 2014-02-06 Yannick Moy <moy@adacore.com>
9500 * sem_prag.adb (Analyze_Pragma): Analyze pragma
9501 Debug rewritten node before rewriting it as a null statement in
9504 2014-02-06 Robert Dewar <dewar@adacore.com>
9506 * sem_attr.adb (Min_Max): New procedure.
9507 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
9510 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
9512 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
9515 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9517 * sem_prag.adb (Analyze_Abstract_State): Update
9518 all calls to Create_Abstract_State to pass the proper state
9520 (Create_Abstract_State): Add new formal parameter
9521 State_Decl along with comment on usage. Establish a link between
9522 the abstract state entity and the state declaration.
9524 2014-02-06 Robert Dewar <dewar@adacore.com>
9526 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
9527 comparison of unordered enumeration type.
9528 (Analyze_Attribute, case Max): Check for improper comparison of
9529 unordered enumeration type.
9530 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
9532 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
9533 Moved here from Sem_Res.
9535 2014-02-06 Robert Dewar <dewar@adacore.com>
9537 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
9540 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9542 * sem_ch6.adb (Process_Formals): Error message reformatting.
9544 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9546 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
9547 variable Spec. Do not inherit the null indicator from the
9548 subprogram body when generating the spec.
9550 2014-02-06 Robert Dewar <dewar@adacore.com>
9552 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
9555 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9557 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
9558 when the function has a foreign convention, but not if only the
9559 limited return type has such a convention.
9561 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9563 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
9564 variable Spec. Comment reformatting. Use Copy_Separate_Tree
9565 rather than New_Copy_Tree when building the corresponding
9566 subprogram declaration.
9568 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9570 * sem_prag.adb (Analyze_Global_Item): Remove
9571 the mode-related checks on abstract states with enabled external
9573 (Property_Error): Removed.
9575 2014-02-06 Javier Miranda <miranda@adacore.com>
9577 * lib-xref.adb (Generate_Reference): When
9578 generating the reference to the first private entity take care
9579 of handling swapped entities.
9581 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
9583 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9586 2014-02-06 Robert Dewar <dewar@adacore.com>
9588 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
9589 than the word size when operating in Modify_Tree_For_C mode.
9590 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
9592 2014-02-06 Robert Dewar <dewar@adacore.com>
9594 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
9595 compare is case insensitive.
9596 * gnat_rm.texi: Document that string compare for Warnings Off
9597 is now case insensitive.
9599 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
9601 * gnat_rm.texi: Small wording tweak.
9603 2014-02-06 Pascal Obry <obry@adacore.com>
9605 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
9606 and Included_Artifact_Patterns attribute definitions.
9608 2014-02-06 Yannick Moy <moy@adacore.com>
9610 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
9611 SPARK_Mode pragma component for all subprograms, including stubs.
9613 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9615 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
9616 the configuration options of the enclosing context in a
9618 (Analyze_Subprogram_Body_Stub): Maintain the
9619 configuration options of the enclosing context in a stack-like
9622 2014-02-06 Robert Dewar <dewar@adacore.com>
9624 * debug.adb: -gnatd.u sets Modify_Tree_For C
9625 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
9626 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
9627 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
9628 * exp_intr.adb (Expand_Shift): Call expander so we do
9629 Modify_Tree_For_C expansions.
9630 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
9633 2014-02-06 Fedor Rybin <frybin@adacore.com>
9635 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
9636 after the phase 1 of the processing of each aggregated project
9637 to get access to project trees of aggregated projects.
9638 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
9639 If specified, On_New_Tree_Loaded is called after each aggregated
9640 project has been processed succesfully.
9641 (Process): new parameter On_New_Tree_Loaded.
9642 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
9643 callback added after processing of each aggregated project.
9644 (Recursive_Process): new parameter On_New_Tree_Loaded.
9645 (Process): new parameter On_New_Tree_Loaded.
9646 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
9647 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
9649 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
9652 2014-02-06 Bob Duff <duff@adacore.com>
9654 * gnat_ugn.texi: Implement --insert-blank-lines and
9655 --preserve-blank-lines switches.
9657 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
9659 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
9662 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
9664 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
9665 of the pragma on individual objects.
9667 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9669 * einfo.adb Node29 is now used as BIP_Initialization_Call.
9670 (BIP_Initialization_Call): New routine.
9671 (Set_BIP_Initialization_Call): New routine.
9672 (Write_Field29_Name): Add an entry for constants and variables.
9673 * einfo.ads Add new attribute BIP_Initialization_Call and update
9675 (BIP_Initialization_Call): New routine along with pragma Inline.
9676 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
9677 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
9678 Add local declaration Res_Decl. Capture the build-in-place
9679 initialization call when the related object declaration has
9680 created a transient block.
9681 * exp_ch7.adb (Process_Transient_Objects): Add local variable
9682 Fin_Insrt. Recognize a scenario where an object declaration acts
9683 as a transient context and is initialized by a build-in-place
9686 2014-02-06 Pascal Obry <obry@adacore.com>
9688 * prj-util.adb (For_Interface_Sources): Fix handling of required
9689 bodies for aggregate libs.
9691 2014-02-06 Robert Dewar <dewar@adacore.com>
9693 * nlists.ads: Minor comment clarifications.
9695 2014-02-06 Robert Dewar <dewar@adacore.com>
9697 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
9699 * opt.ads (Modify_Tree_For_C): New flag.
9700 * output.ads, output.adb (Last_Char): New function.
9702 2014-02-06 Pascal Obry <obry@adacore.com>
9704 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
9705 share/gpr for cross-builds.
9707 2014-02-06 Robert Dewar <dewar@adacore.com>
9709 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
9710 Minor reformatting and code clean ups.
9712 2014-02-06 Pascal Obry <obry@adacore.com>
9714 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
9715 * prj.ads: Minor typo fix in comment.
9717 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9719 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
9720 local variable Expr. Flag clauses with extra parenthesis as this
9721 is not allowed by the syntax of the pragma. Code reformatting.
9723 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9725 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
9726 variables. Rename variabme Tnn to Temp. Do not create a temporary
9727 if assertions are disabled. Find enclosing routine _Postconditions
9728 and insert the temporary that captures the value of the prefix
9730 * exp_ch6.adb (Build_Postconditions_Procedure):
9731 Insert the generated _Postconditions routine
9732 before the first source declaration of the related
9734 (Insert_After_Last_Declaration): Removed.
9735 (Insert_Before_First_Source_Declaration): New routine.
9737 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9739 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
9740 Utility to determine whether current expansion is for the body
9741 of a predefined primitive operation.
9742 (Make_Predicate_Check): Use Within_Internal_Subpgram
9743 * checks.adb (Apply_Predicate_Check): Use
9744 Within_Internal_Subprogram
9745 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
9747 2014-02-06 Pascal Obry <obry@adacore.com>
9749 * prj.ads, prj-util.adb: Minor reformatting.
9751 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9753 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
9754 Take into account the Split_PPC flag to ensure that conjuncts
9755 in a composite postcondition aspect are tested in source order.
9757 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9759 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
9761 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
9762 illegal use of SPARK_Mode.
9763 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
9764 * sem_prag.adb (Analyze_Pragma): Code reformatting.
9765 * sem_util.adb Add with and use clause for Aspects.
9766 (Check_SPARK_Mode_In_Generic): New routine.
9767 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
9769 2014-02-06 Thomas Quinot <quinot@adacore.com>
9771 * a-calend.adb (Formatting_Operations.Split): Ensure that
9772 Time_Error is raised for invalid time values.
9774 2014-02-06 Arnaud Charlet <charlet@adacore.com>
9776 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
9779 2014-02-06 Robert Dewar <dewar@adacore.com>
9781 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
9782 * exp_ch3.adb (Build_Dcheck_Function): Set
9783 Is_Discriminant_Check_Function.
9785 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9787 * exp_ch7.adb (Is_Subprogram_Call): Inspect
9788 the original tree in certain cases where a construct has been
9789 factored out and replaced by a reference to a temporary.
9791 2014-02-06 Ed Schonberg <schonberg@adacore.com>
9793 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
9794 parameters when propagating predicate function to full view.
9795 (Find_Type_Of_Object): Freeze base type of object type to catch
9796 premature use of discriminated private type without a full view.
9798 2014-02-06 Robert Dewar <dewar@adacore.com>
9800 * sprint.adb: Minor reformatting.
9802 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9804 * exp_ch4.adb (Process_Transient_Object): Add local variable
9805 Temp_Ins. When the transient object is initialized by an
9806 aggregate, the hook must capture the object after the last
9807 component assignment takes place.
9808 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
9809 routine Is_Subprogram_Call.
9810 (Is_Subprogram_Call): Inspect an
9811 aggregate that has been heavily expanded for subprogram calls.
9812 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
9813 and Temp_Ins. Remove the nested declare block and adjust the
9814 indentation. When the transient object is initialized by an
9815 aggregate, the hook must capture the object after the last
9816 component assignment takes place.
9818 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9820 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
9821 external states with enabled properties that do not match the
9823 (Property_Error): New routine.
9824 * sem_res.adb (Property_Error): New routine.
9825 (Resolve_Actuals): Detect illegal uses of external variables with
9826 enabled properties in procedure calls that do not match the mode of
9827 the corresponding formal parameter.
9829 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
9831 * sem_util.adb (Has_Enabled_Property): Rename
9832 formal parameter Prop_Nam to Property. Update the comment on usage
9833 and all occurrences in the body. Add local variable Prop_Nam. When
9834 inspecting a property with an expression, the property name
9835 appears as the first choice of the component association.
9837 2014-02-04 Robert Dewar <dewar@adacore.com>
9839 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
9841 2014-02-04 Gary Dismukes <dismukes@adacore.com>
9843 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
9844 for consistency with other messages.
9846 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9848 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
9849 iterator, indicate that the element is a constant if the container
9850 type does not have a variable indexing aspect.
9851 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
9852 marked as constant, do not reset its Ekind, to ensure that
9853 container elements in an element loop are not modified if the
9854 container (e.g. a hashed set) only has a constant indexing aspect.
9856 2014-02-04 Arnaud Charlet <charlet@adacore.com>
9858 * g-souinf.ads: Subprograms in this unit are actually not pure.
9859 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
9860 * einfo.ads (Is_Pure): Update doc to match implementation.
9862 2014-02-04 Gary Dismukes <dismukes@adacore.com>
9864 * exp_ch13.adb: Minor spelling fix.
9866 2014-02-04 Robert Dewar <dewar@adacore.com>
9868 * opt.ads: Minor comment update.
9870 2014-02-04 Robert Dewar <dewar@adacore.com>
9872 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
9875 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9877 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
9878 on null expressions if component type is non-null, when the
9879 corresponding association covers an empty range of index values.
9881 2014-02-04 Robert Dewar <dewar@adacore.com>
9883 * sinfo.ads: Further comments on N_Expression_With_Actions node.
9885 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
9887 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
9888 variables Out_Items and Ref_Global. Remove local constant
9889 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
9890 and D8. Remove the useless collection of global items as this
9891 was a leftover from an earlier version of the routine. Move
9892 several routines out to avoid deep nesting and indentation.
9893 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
9894 parameter Do_Checks to Post_Errors. Update the comment on usage.
9895 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
9896 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
9897 to Post_Errors. Update the comment on usage. Account for the
9898 case where a self referential state may have a null input_list.
9899 (Is_Self_Referential): New routine.
9901 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9903 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
9904 entity renames an expression, as in the case of an object of
9905 an unconstrained type initialized by a function call, defer the
9906 rewriting of the expression to the expander.
9907 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
9908 'Alignment): If the entity renames an expression, introduce
9909 temporary to capture value, and rewrite original declaration to
9912 2014-02-04 Gary Dismukes <dismukes@adacore.com>
9914 * g-comlin.adb: Minor typo fix.
9916 2014-02-04 Ed Schonberg <schonberg@adacore.com>
9918 * freeze.adb (Freeze_All): Types derived from a formal
9919 access_to_classwide type do not have a finalization master.
9921 2014-02-04 Robert Dewar <dewar@adacore.com>
9923 * sprint.adb: Minor reformatting.
9925 2014-02-04 Robert Dewar <dewar@adacore.com>
9927 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
9928 cases where Actions is a null list.
9929 * sinfo.ads (N_Expression_With_Actions): Actions can be
9930 temporarily empty during semantic analysis, but must be non-empty
9931 in the final expanded tree.
9933 2014-01-31 Robert Dewar <dewar@adacore.com>
9935 * exp_ch9.adb: Minor reformatting.
9937 2014-01-31 Emmanuel Briot <briot@adacore.com>
9939 * g-comlin.adb (Set_Command_Line): Take the switches
9940 configuration from the Command_Line_Config.
9942 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9944 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
9947 2014-01-31 Vincent Celier <celier@adacore.com>
9949 * projects.texi: Add more documentation about others used as an
9950 index in indexed attributes.
9952 2014-01-31 Robert Dewar <dewar@adacore.com>
9954 * gnat_ugn.texi: Minor update.
9955 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
9956 * exp_util.adb: Minor reformatting.
9958 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9960 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
9961 depends on data that is not private to the protected object,
9962 and potentially modifiable in unsynchronized fashion.
9964 2014-01-31 Yannick Moy <moy@adacore.com>
9966 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
9969 2014-01-31 Robert Dewar <dewar@adacore.com>
9971 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
9972 for Unknown_Package.
9973 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
9975 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
9977 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
9978 the logic that generates a runtime check to determine the
9979 controlled status of the object about to be allocated or
9980 deallocated. Class-wide types now always use a runtime check
9981 even if they appear as generic actuals.
9982 (Find_Object): Detect
9983 a special case that involves interface class-wide types because
9984 the object appears as a complex expression.
9986 2014-01-31 Ed Schonberg <schonberg@adacore.com>
9988 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
9989 subprogram with an incomplete untagged formals on the list of
9990 private dependents, to verify that the type is properly completed
9991 in the private part.
9992 * sem_attr.adb: Code clean up.
9994 2014-01-31 Robert Dewar <dewar@adacore.com>
9996 * exp_ch6.adb: Minor reformatting.
9998 2014-01-31 Vincent Celier <celier@adacore.com>
10000 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10001 when Pkg is unknown.
10003 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
10005 * sem_res.adb (Resolve_Entity_Name): Comment
10006 reformatting. Allow volatile objects in various generated checks.
10008 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10010 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10011 component association, set the etype of the identifier, for
10014 2014-01-31 Ed Schonberg <schonberg@adacore.com>
10016 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10017 declared in a package, not checks can apply to the subprogram.
10019 2014-01-31 Robert Dewar <dewar@adacore.com>
10021 * erroutc.adb (Validate_Specific_Warnings): Warnings are
10022 controlled -gnatw.W.
10023 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10024 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10026 2014-01-31 Arnaud Charlet <charlet@adacore.com>
10028 * exp_disp.adb: Update comments.
10030 2014-01-31 Yannick Moy <moy@adacore.com>
10032 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10033 Save_Global_References): Guard access to expression in aspect.
10035 2014-01-31 Yannick Moy <moy@adacore.com>
10037 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10038 Issue an error when the pragma is applied to a generic unit,
10039 a generic declaration, or inside a generic.
10041 2014-01-31 Yannick Moy <moy@adacore.com>
10043 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10046 2014-01-31 Robert Dewar <dewar@adacore.com>
10048 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10051 2014-01-31 Tristan Gingold <gingold@adacore.com>
10053 * exp_disp.adb: Add a historic note.
10055 2014-01-31 Robert Dewar <dewar@adacore.com>
10057 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10058 Process_Deferred_References.
10060 2014-01-31 Yannick Moy <moy@adacore.com>
10062 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10063 ineffective pragma Warnings(Off) in GNATprove_Mode.
10065 2014-01-31 Bob Duff <duff@adacore.com>
10067 * s-taskin.ads: Minor comment fix.
10068 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10069 just direct dependents. If this is actually an abort, each task
10070 will take care of aborting its dependents, so all dependents will
10071 get aborted, as before. However, when this is called the second
10072 time from Vulnerable_Complete_Master "for convenience" (i.e. to
10073 kill off tasks waiting at terminate alternatives), aborting
10074 indirect dependents is wrong, because it causes some unrelated
10075 tasks to get aborted.
10077 2014-01-31 Robert Dewar <dewar@adacore.com>
10079 * sem_ch4.adb: Minor reformatting.
10081 2014-01-31 Robert Dewar <dewar@adacore.com>
10083 * exp_ch2.adb: New calling sequence for Is_LHS.
10084 * frontend.adb: Add call to Process_Deferred_References.
10085 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10086 (Deferred_References): New table.
10087 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10089 (Find_Expanded_Name): Ditto.
10090 * sem_res.adb: New calling sequence for Is_LHS.
10091 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10092 * sem_warn.adb: Call Process_Deferred_References before issuing
10095 2014-01-31 Tristan Gingold <gingold@adacore.com>
10097 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10098 use of System_Tasking_Protected_Objects_Single_Entry.
10099 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10100 of Protected_Single_Entry_Call.
10101 (Expand_N_Timed_Entry_Call): Remove single_entry case.
10102 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10104 (Make_Disp_Timed_Select_Body): Likewise.
10105 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10106 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10108 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10109 (Wait_For_Completion_With_Timeout): Remove.
10110 (Protected_Single_Entry_Call): Remove Mode parameter
10111 (always Simple_Call).
10112 (Service_Entry): Remove Self_Id constant (not used anymore).
10113 (Timed_Protected_Single_Entry_Call): Remove.
10114 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10115 (Protected_Single_Entry_Call): Remove Mode parameter.
10117 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10119 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10120 * einfo.ads (Get_Pragma): Update the comment on special pragmas
10121 handled by this routine.
10122 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10123 to the contract of the related subprogram body.
10124 * sem_util.adb (Add_Contract_Item): Handle the insertion of
10125 pragma Refined_Post into the contract of a subprogram body.
10126 * sinfo.ads Update the documentation of node N_Contract.
10127 * sem_res.adb (Resolve_Entity_Name): Add a guard
10128 to detect abstract states and variables only when checking the
10129 SPARK 2014 rules concerning volatile object placement.
10131 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10133 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10134 null is compatible with any access type.
10136 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10138 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10139 placement is not in a package.
10141 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10143 * sem_util.adb (Has_Enabled_Property): Compare the character field of
10146 2014-01-29 Robert Dewar <dewar@adacore.com>
10148 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10149 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10150 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10152 2014-01-29 Robert Dewar <dewar@adacore.com>
10154 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10155 * sem_warn.adb (Check_References): Suppress warnings if inside
10156 Initial_Condition pragma.
10158 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10160 * sem_prag.adb (Check_Missing_Part_Of): List all values of
10161 State_Space_Kind for readability reasons. Do not emit an error on
10162 a private item when the enclosing package lacks aspect/pragma
10163 Abstract_State. Do not emit an error on a private package
10164 instantiation when the corresponding generic template lacks
10166 (Has_Visible_State): New routine.
10167 * sem_util.adb (Find_Placement_In_State_Space): The visible
10168 declarations of any kind of child units in general act as proper
10169 placement location.
10171 2014-01-29 Robert Dewar <dewar@adacore.com>
10173 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
10174 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
10175 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
10176 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
10177 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
10178 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
10179 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
10180 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
10181 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
10182 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
10183 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
10184 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
10185 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
10186 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
10187 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
10188 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
10189 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
10190 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
10191 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
10192 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
10193 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
10194 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
10195 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
10196 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
10197 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
10198 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
10199 s-regpat.adb, s-secsta.adb, s-stalib.ads,
10200 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
10201 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
10202 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
10203 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
10204 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
10206 2014-01-29 Robert Dewar <dewar@adacore.com>
10208 * expander.adb: Minor reformatting.
10210 2014-01-29 Javier Miranda <miranda@adacore.com>
10212 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
10215 2014-01-29 Javier Miranda <miranda@adacore.com>
10217 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
10218 that checks if an interface types defines the predefined "="
10219 function because the compiler was erroneously not generating the
10220 predefined "=" primitive as soon as the name of some interface
10221 primitive is "=" (formals were not checked).
10223 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10225 * expander.adb (Expander): In GNATprove mode, do not process
10226 transient scopes: they are in general not created in this mode,
10227 and an attempt to examine them will lead to constraint errors when
10228 processing configuration pragmas that have analyzable expressions.
10230 2014-01-29 Vincent Celier <celier@adacore.com>
10232 * clean.adb (Gnatclean): Fail if main project is an aggregate
10233 project or if there is an aggregate library project in the
10235 * gnatcmd.adb: Fail if the main project is an aggregate project
10236 or if there is an aggegate library project in the project tree.
10237 * make.adb (Initialize): : Fail if main project is an aggregate
10238 project or if there is an aggregate library project in the
10240 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
10241 * prj-makr.adb (Initialize): Fail if the main project is an
10242 aggregate project or an aggregate library project.
10244 2014-01-29 Vincent Celier <celier@adacore.com>
10246 * prj-part.adb (Check_Import_Aggregate): New procedure
10247 to check if an imported project is an aggregate project.
10248 (Parse_Single_Project): Call Check_Import_Aggregate
10249 * projects.texi: Document that aggregate projects cannot be
10250 extended or imported.
10252 2014-01-29 Robert Dewar <dewar@adacore.com>
10254 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
10255 reformatting and code clean up.
10256 * gnat_ugn.texi: Add documentation section on Atomic Variables
10259 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10261 * einfo.adb Flag264 is now unused.
10262 (Has_Body_References): Removed.
10263 (Set_Has_Body_References): Removed.
10264 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
10265 * einfo.ads Update the comment on usage of attribute
10266 Body_References. Remove attribute Has_Body_References and its
10268 (Has_Body_References): Removed along with pragma Inline.
10269 (Set_Has_Body_References): Removed along with pragma Inline.
10270 * sem_prag.adb (Analyze_Global_Item): Move the call to
10271 Record_Possible_Body_Reference in the state related checks
10272 section. Add a comment intended function.
10273 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
10274 in the state related checks section. Add a comment intended function.
10275 (Analyze_Refinement_Clause): Cleanup the illegal body reference
10276 reporting. Add a comment on timing of error reporting.
10277 (Record_Possible_Body_Reference): Reimplement the routine.
10279 2014-01-29 Vincent Celier <celier@adacore.com>
10281 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
10282 unit-based languages.
10283 (Mains.Complete_Mains.Do_Complete): Use the source file project
10284 tree when calling Find_File_Add_Extension. Use the correct
10285 project name when reporting an error.
10287 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
10289 * aspects.adb Add an entry for aspect Part_Of in table
10291 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
10292 Aspect_Argument, Aspect_Names and Aspect_Delay.
10293 * atree.h Define Elist9.
10294 * atree.adb (Elist9): New routine.
10295 (Set_Elist9): New routine.
10296 * atree.ads (Elist9): New routine.
10297 (Set_Elist9): New routine.
10298 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
10299 the list of node usage. Remove Refined_State from the list of
10301 (Encapsulating_State): New routine.
10303 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
10304 (Refined_State): Removed.
10305 (Set_Encapsulating_State): New routine.
10306 (Set_Part_Of_Constituents): New routine.
10307 (Set_Refined_State): Removed.
10308 (Write_Field9_Name): Add an entry
10309 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
10310 Encapsulating_State. Remove the entry for Refined_State.
10311 * einfo.ads Add new attributes Encapsulating_State
10312 and Part_Of_Constituents alond with their usage in
10313 entities. Remove attribute Refined_State along with its
10315 (Encapsulating_State): New routine and
10316 pragma Inline. (Get_Pragma): Update the comment on usage.
10317 (Part_Of_Constituents): New routine and pragma Inline.
10318 (Refined_State): Removed along with pragma Inline.
10319 (Set_Encapsulating_State): New routine and pragma Inline.
10320 (Set_Part_Of_Constituents): New routine and pragma Inline.
10321 (Set_Refined_State): Removed along with pragma Inline.
10322 * par-prag.adb Pragma Part_Of does not need any special processing
10324 * sem_ch3.adb (Analyze_Declarations): Remove local variables
10325 Body_Id and Prag. Call separate routines to analyze the
10326 contract of a package [body].
10327 (Analyze_Object_Contract):
10328 Update the comment on usage. Remove local variables
10329 Items and Nam. Use Get_Pragma rather than traversing the
10330 classification list. Verify whether the lack of indicator
10331 Part_Of agrees with the placement of the variable in state space.
10332 (Analyze_Object_Declaration): Initialize the encapsulating state
10333 of a variable. (Requires_State_Refinement): Moved to sem_util.
10334 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
10335 (Analyze_Package_Contract): New routine.
10336 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
10337 (Analyze_Package_Contract): New routine.
10338 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
10339 state and Part_Of constituents.
10340 * sem_ch13.adb (Analyze_Aspect_Specifications):
10341 Add processing for aspect Part_Of. Update all
10342 calls to Decorate_Delayed_Aspect_And_Pragma.
10343 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
10344 not need any special processing at freeze time.
10345 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
10346 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
10347 update the associated comment.
10348 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
10349 (Analyze_Abstract_State): Add new global variable State_Id. Remove
10350 local constants Errors and Loc. Remove local variables Is_Null
10351 and State_Nam. Create the entity of the abstract state on the
10352 spot, before all remaining checks are performed. Verify that a
10353 missing Part_Of option agrees with the placement of the abstract
10354 state within the state space.
10355 (Analyze_Depends_In_Decl_Part):
10356 Add new global variables Constits_Seen and States_Seen. Check
10357 that a state and a corresponding constituent do not appear
10358 in pragma [Refined_]Depends.
10359 (Analyze_Global_In_Decl_Part):
10360 Add new global variables Constits_Seen and States_Seen. Check
10361 that a state and a corresponding constituent do not appear
10362 in pragma [Refined_]Global.
10363 (Analyze_Global_Item):
10364 Remove the now obsolete code that deals with Part_Of.
10365 Add the entity of the global item to the list of processed
10366 items. (Analyze_Initializes_In_Decl_Part): Add new global
10367 variables Constits_Seen and States_Seen. Check that a state
10368 and a corresponding constituent do not appear in pragma
10370 (Analyze_Initialization_Item): Add the entity
10371 of the initialization item to the list of processed items.
10372 (Analyze_Input_Item): Add the entity of the initialization
10373 item to the list of processed items.
10374 (Analyze_Input_Output):
10375 Remove the now obsolete code that deals with Part_Of. Add the
10376 entity of the input/output to the list of processed items.
10377 (Analyze_Part_Of): New routine.
10378 (Analyze_Part_Of_Option): Remove
10379 local constant Par_State. Add local constant Encaps and local
10380 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
10381 the option. Turn the related state into a Part_Of constituent
10382 if the option is legal.
10383 (Analyze_Pragma): Add processing
10384 for pragma Part_Of.
10385 (Analyze_Refined_State_In_Decl_Part):
10386 Remove global constants Pack_Body and Spec_Id. Remove
10387 global variables Abstr_States and Hidden_States. Add new
10388 global variables Available_States, Body_Id, Body_States and
10389 Spec_Id. Add new local constant Body_Decl. Reimplement the
10390 logic that extracts the states available for refinement from
10391 the related package and the body hidden states of the said
10393 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
10394 (Check_Applicable_Policy): Alphabetize body.
10395 (Check_Dependency_Clause): Replace Refined_State
10396 with Encapsulating_State.
10397 (Check_Matching_Constituent):
10398 Reimplement the logic that determines whether an item is a valid
10399 / invalid constituent of the current refined state. Return when
10400 a construct does not denote a valid abstract state. Extract the
10401 list of Part_Of constituents for further analysis. Check that all
10402 Part_Of constituents of a state have been used in its refinement.
10403 (Check_Matching_State): Update the comment on usage. Operate
10404 on the list of available states.
10405 (Check_Missing_Part_Of): New routine.
10406 (Check_Refined_Global_Item): Replace Refined_State
10407 with Encapsulating_State.
10408 (Check_State_And_Constituent_Use): New routine.
10409 (Create_Abstract_State): New routine.
10410 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
10411 (Is_Part_Of): Removed.
10412 (Collect_Body_States): New routine.
10413 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
10414 (Collect_Hidden_States): Removed.
10415 (Report_Unrefined_States): Change the profile of the procedure along
10416 with the comment on usage.
10417 (Report_Unused_Constituents): New routine.
10418 (Report_Unused_Hidden_States): Removed.
10419 (Report_Unused_States): New routine.
10420 * sem_prag.ads (Check_Missing_Part_Of): New routine.
10421 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
10422 appear in the classification pragmas of a package instantiation
10424 (Find_Placement_In_State_Space): New routine.
10425 (Is_Child): Removed.
10426 (Is_Child_Or_Sibling): Remove formal
10427 parameter Private_Child. Remove the private child checks.
10428 (Requires_State_Refinement): Moved from sem_ch3.
10429 * sem_util.ads Add new type State_Space_Kind along with
10430 comment on its usage and values.
10431 (Add_Contract_Item): Update the comment on usage.
10432 (Find_Body_Discriminal): Alphabetize spec.
10433 (Find_Placement_In_State_Space): New routine.
10434 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
10435 and update the comment on usage.
10436 (Requires_State_Refinement): Moved from sem_ch3.
10437 * sinfo.ads: Update the documentation of N_Contract.
10438 * snames.ads-tmpl The predefined name for Part_Of is now used
10439 to denote a pragma. Add Pragma_Id for Part_Of.
10441 2014-01-29 Emmanuel Briot <briot@adacore.com>
10443 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
10445 (Dump): New subprogram.
10447 2014-01-29 Tristan Gingold <gingold@adacore.com>
10449 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
10450 Expand_Entry_Declaration to factorize code.
10452 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10454 * checks.adb: minor clarification.
10455 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
10456 search for primitive operations to the entities that immediately
10457 follow the type declaration.
10459 2014-01-29 Tristan Gingold <gingold@adacore.com>
10461 * exp_ch9.adb (Build_Protected_Entry): Do not call
10462 Complete_Entry_Body anymore.
10463 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
10464 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
10466 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
10468 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
10469 string when the Name input bigger than allowed. Adapt the function
10472 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10474 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
10475 if expression is within a case_expression of if_expression.
10477 2014-01-29 Robert Dewar <dewar@adacore.com>
10479 * exp_ch9.adb, inline.ads: Minor reformatting.
10481 2014-01-29 Tristan Gingold <gingold@adacore.com>
10483 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
10485 2014-01-29 Yannick Moy <moy@adacore.com>
10487 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
10488 SPARK_Mode_Pragma components to be able to analyze generic
10490 * sem_ch12.adb (Analyze_Package_Instantiation,
10491 Inline_Instance_Body, Need_Subprogram_Instance_Body,
10492 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
10493 for future analysis of the instance.
10494 (Instantiate_Package_Body,
10495 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
10496 from instantiation to analyze the instance.
10498 2014-01-29 Robert Dewar <dewar@adacore.com>
10500 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
10503 2014-01-29 Yannick Moy <moy@adacore.com>
10505 * gnat_rm.texi: Update description of SPARK_Mode pragma.
10507 2014-01-29 Tristan Gingold <gingold@adacore.com>
10509 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
10511 2014-01-29 Thomas Quinot <quinot@adacore.com>
10513 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
10515 2014-01-29 Ed Schonberg <schonberg@adacore.com>
10517 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
10518 resulting string is an internal entity. and thus requires no
10519 initialization. This is relevant when Initialize_ Scalars is
10520 enabled, because the resultant spurious initialization may lead to
10521 secondary stack anomalies that produce a mangled name for a task.
10523 2014-01-29 Yannick Moy <moy@adacore.com>
10525 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
10526 not inherited from spec anymore. Check consistency
10527 rules after processing of declarations.
10528 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
10529 from spec anymore. Check consistency rules after processing of
10531 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
10533 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
10536 2014-01-27 Robert Dewar <dewar@adacore.com>
10538 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
10540 (Resolve_Range): Add type name/location to unordered msg.
10542 2014-01-27 Claire Dross <dross@adacore.com>
10544 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
10545 Capacity) is only called with Capacity >= Length (Source) and
10546 Capacity in Capacity_Range.
10547 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
10548 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
10549 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
10550 in the code is this is not the case.
10552 2014-01-27 Thomas Quinot <quinot@adacore.com>
10554 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
10555 selected component in an instance where the component of the
10556 actual is not visibile at instantiation.
10558 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10560 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
10561 has a dynamic predicate, generate freeze node for Actual_Subtype
10562 at once, because the declaration of the corresponding predicate
10563 function will make reference to it.
10565 2014-01-27 Tristan Gingold <gingold@adacore.com>
10567 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
10569 2014-01-27 Robert Dewar <dewar@adacore.com>
10571 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
10572 for 2**X optimization.
10574 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10576 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
10577 explicitly whether value is in range of Character, because the
10578 library is typically compiled with range checks disabled, and
10579 we cannot rely on the implicit check on the argument of 'Val.
10581 2014-01-27 Vincent Celier <celier@adacore.com>
10583 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
10584 not the Target to itself.
10586 2014-01-27 Robert Dewar <dewar@adacore.com>
10588 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
10589 changes to avoid incorrect use of unordered enum types.
10591 2014-01-27 Thomas Quinot <quinot@adacore.com>
10593 * sem_ch4.adb: Minor reformatting.
10595 2014-01-27 Robert Dewar <dewar@adacore.com>
10597 * scn.adb (Check_End_Of_Line): Removed.
10598 (Error_Long_Line): Removed.
10599 (Determine_License): Use versions of above routines from Scanner.
10600 * scng.adb (Check_End_Of_Line): Moved to spec.
10601 (Error_Long_Line): Removed, no longer used.
10602 * scng.ads (Check_End_Of_Line): Moved here from body.
10604 2014-01-27 Tristan Gingold <gingold@adacore.com>
10606 * exp_ch7.adb (Build_Cleanup_Statements): Call
10607 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
10608 for protected body.
10609 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
10610 Remove Service_Name variable.
10611 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
10612 factorize code from the above subprograms.
10613 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
10615 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
10617 * einfo.adb (Has_Option): Reimplemented.
10618 * sem_prag.adb (Analyze_Refinement_Clause): Add global
10619 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
10620 External_Constit_Seen and State. Add local variables Body_Ref,
10621 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
10622 avoid a cumbersome while pool. Verify the legality of an external
10623 state and relevant properties.
10624 (Check_External_Property): New routine.
10625 (Check_Matching_State): Remove parameter profile
10626 and update comment on usage.
10627 (Collect_Constituent): Store the
10628 relevant external property of a constituent.
10629 * sem_util.adb (Async_Readers_Enabled): Update the call to
10630 Has_Enabled_Property.
10631 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
10632 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
10633 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
10634 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
10635 Update comment on usage. Reimplement the logic to recognize the various
10636 formats of properties.
10638 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10640 * par-ch5.adb: Minor reformatting.
10642 2014-01-27 Tristan Gingold <gingold@adacore.com>
10644 * s-tposen.ads: Harmonize style and comments.
10646 2014-01-27 Vincent Celier <celier@adacore.com>
10648 * projects.texi: Document that shared library projects, by
10649 default, cannot import projects that are not shared library
10652 2014-01-27 Robert Dewar <dewar@adacore.com>
10654 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
10657 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10659 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
10660 any other exception is raised.
10661 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
10662 still necessary to perform a conversion in order to remove overlong
10665 2014-01-27 Robert Dewar <dewar@adacore.com>
10667 * exp_smem.adb: Minor reformatting.
10669 2014-01-27 Thomas Quinot <quinot@adacore.com>
10671 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
10673 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10675 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
10676 nodes for operands to the original node for the call, to preserve
10677 Original_Node pointers within the resolved operands, given that
10678 they may have been rewritten as well. Previous approach copied
10679 the operands into a new tree and lost those pointers.
10681 2014-01-27 Claire Dross <dross@adacore.com>
10684 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
10686 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10688 * sem_util.adb (Check_Internal_Protected_Use): A call through
10689 an anonymous access parameter of the current protected function
10690 is not a potential modification of the current object.
10692 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10694 * a-cobove.adb (Reserve_Capacity): Procedure raises
10695 Capacity_Error, not Constraint_Error, when request cannot be
10698 2014-01-27 Vincent Celier <celier@adacore.com>
10700 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
10701 not the Target to itself.
10703 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10705 * exp_ch4.adb (Expand_Concatenate): If the target of the
10706 concatenation is a library-level entity, always use the off-line
10707 version of concatenation, regardless of optimization level. This
10708 is space-efficient, and prevents linking problems when some
10709 units are compiled with different optimization levels.
10711 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10713 * sem_ch5.adb: Code clean up.
10715 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10717 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
10718 when an array or container iterator includes a subtype indication,
10719 which is only legal in an element iterator.
10721 2014-01-27 Thomas Quinot <quinot@adacore.com>
10723 * exp_ch7.adb: Minor reformatting.
10725 2014-01-27 Robert Dewar <dewar@adacore.com>
10727 * opt.adb (SPARK_Mode): Default for library units is None rather
10729 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
10731 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
10733 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
10735 2014-01-27 Robert Dewar <dewar@adacore.com>
10737 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
10738 Suspicious_Labels table if we have identifier; followed by loop
10740 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
10741 * par.adb (Suspicious_Labels): New table.
10743 2014-01-27 Robert Dewar <dewar@adacore.com>
10745 * exp_aggr.adb (Check_Bounds): Reason is range check, not
10748 2014-01-27 Yannick Moy <moy@adacore.com>
10750 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
10752 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
10754 (Add_SPARK_Xrefs): Include references to constants.
10755 * spark_xrefs.ads Document new character 'c' for references to
10758 2014-01-27 Thomas Quinot <quinot@adacore.com>
10760 * exp_smem.adb (Add_Write_After): For a function call, insert write as
10761 an after action in a transient scope.
10763 2014-01-27 Thomas Quinot <quinot@adacore.com>
10765 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
10766 to a shared variable as an OUT formal in a call to an init proc,
10767 the 'Read call must be emitted after, not before, the call.
10769 2014-01-27 Robert Dewar <dewar@adacore.com>
10771 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
10773 2014-01-27 Robert Dewar <dewar@adacore.com>
10775 * a-wichha.adb (Character_Set_Version): Change to output proper
10778 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
10780 * einfo.adb (Is_Input_Only_State): Removed.
10781 (Is_Non_Volatile_State): Removed.
10782 (Is_Output_State): Removed.
10783 * einfo.ads (Is_Input_Only_State): Remove attribute and
10784 subprogram. Update related entity.
10785 (Is_Non_Volatile_State):
10786 Remove attribute and subprogram. Update related entity.
10787 (Is_Output_State): Removed attribute and subprogram. Update
10789 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
10791 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
10792 an object, not just variables.
10793 (Analyze_Object_Contract): New routine.
10794 (Analyze_Variable_Contract): Removed.
10795 (Process_Discriminants): Detect an illegal use of volatile
10796 discriminant in SPARK mode.
10797 * sem_ch5.adb (Analyze_Iterator_Specification):
10798 Detect an illegal use of volatile loop variable.
10799 (Analyze_Loop_Parameter_Specification): Detect an illegal use
10800 of volatile loop variable.
10801 * sem_ch6.adb (Process_Formals): Update the volatile object
10802 detection. Detect an illegal formal of mode IN OUT or OUT in
10803 SPARK mode. Enhance the error messages with references.
10804 * sem_ch12.adb (Instantiate_Object): Update the volatile object
10805 detection. Enhance the error messages with references.
10806 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
10807 messages with references.
10808 (Analyze_Contract_Case): Enhance the error messages with references.
10809 (Analyze_External_Property): Call Check_Duplicate_Property to process
10810 an external property.
10811 (Analyze_External_Property_In_Decl_Part): New routine.
10812 (Analyze_External_State_In_Decl_Part): Removed.
10813 (Analyze_Global_Item): Detect an illegal
10814 use of a volatile constant. Detect an illegal use
10815 of a variable with enabled Effective_Reads. Enhance
10816 the error messages with references. Remove obsolete
10817 checks concerning Input_Only and Output_Only states.
10818 (Analyze_Initialization_Item): Enhance the error messages
10820 (Analyze_Initializes_In_Decl_Part): Do not
10821 collect the states and variables when the initialization list
10823 (Analyze_Input_Item): Enhance the error messages with references.
10824 (Analyze_Input_Output): Enhance the error messages with references.
10825 (Analyze_Pragma): Enhance the error messages with references.
10826 (Analyze_Refinement_Clause): Code reformatting.
10827 (Analyze_Refined_Depends_In_Decl_Part):
10828 Rename global variable Global to Reg_Global and update all
10829 occurrences. Add local variables D7 and D8. Update the error
10830 messages with references. Update the call to Collect_Global_Items.
10831 (Analyze_Refined_Global_In_Decl_Part): Add local variables
10832 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
10833 the call to Collect_Global_Items. Account for a Proof_In state
10834 in null / useless refinement checks. Verify the coverage of
10836 (Check_Dependency_Clause): Remove local variable
10837 Out_Constits. Remove the retrieval and removal of constituents
10838 for an Output_Only state. Remove the reporting of unused
10839 Output_Only state constituents.
10840 (Check_Duplicate_Mode): Enhance
10841 the error message with a reference.
10842 (Check_Duplicate_Property): New routine.
10843 (Check_Duplicate_Option): Enhance the error message with a reference.
10844 (Check_External_Properties): Enhance the error message with a reference.
10845 (Check_Function_Return): Enhance the error message with a reference.
10846 (Check_In_Out_States): Update
10847 comment on usage. Add a specialized error message for Proof_In
10848 constituents. Enhance the error message with a reference.
10849 (Check_Input_States): Update comment on usage. Account for
10850 possible Proof_In constituents. Enhance the error message
10852 (Check_Matching_Constituent): Enhance the error message with a
10854 (Check_Matching_State): Enchance the error message with a reference.
10855 (Check_Mode): Add local variable From_Global. Update the call to
10856 Find_Mode. Emit more precise error messages concerning extra items
10857 (Check_Mode_Restriction_In_Enclosing_Context): Consider
10858 pragma Refined_Global. Enhance the error message with a
10860 (Check_Mode_Restriction_In_Function): Enhance the error message with
10862 (Check_Output_States): Update comment on usage. Add local variable
10863 Posted. Account for possible Proof_In constituents. Produce a detailed
10864 list of missing constituents.
10865 (Check_Proof_In_States): New routine.
10866 (Check_Refined_Global_Item): Handle Proof_In
10867 constituents. Enchance the error message with a reference.
10868 (Collect_Global_Items): Add formal parameters Proof_In_Items
10869 and Has_Proof_In_State. Update the comment on usage. Account
10870 for Proof_In items.
10871 (Create_Or_Modify_Clause): Enchance
10872 the error message with a reference.
10874 formal parameter From_Global. Update the comment on usage.
10875 Detect when the mode is governed by pragma [Refined_]Global.
10876 (Output_Constituents): Removed.
10877 (Report_Extra_Constituents):
10878 Report extra Proof_In constituents.
10879 (Report_Unused_Constituents): Removed.
10880 (Usage_Error): Code reformatting. Enhance the error
10881 messages with reference.
10882 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
10883 (Analyze_External_State_In_Decl_Part): Removed.
10884 * sem_res.adb (Resolve_Actuals): Update the volatile object
10885 detection. Enhance the error message with a reference.
10886 (Resolve_Entity_Name): Update the volatile object
10887 detection. Enhance the error message with a reference.
10888 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
10889 (Is_SPARK_Volatile_Object): New routine.
10890 (Has_Volatile_Component): New routine.
10891 * sem_util.ads (Is_Delegate): Alphabetized.
10892 (Is_SPARK_Volatile_Object): New routine.
10893 (Has_Volatile_Component): New routine.
10894 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
10896 2014-01-27 Ed Schonberg <schonberg@adacore.com>
10898 * sem_attr.adb: Resolve fully prefix of 'Update.
10900 2014-01-27 Ben Brosgol <brosgol@adacore.com>
10902 * gnat_rm.texi: Minor clarifications.
10904 2014-01-27 Robert Dewar <dewar@adacore.com>
10906 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
10907 about call that is generated as part of an Initial_Condition
10909 * sem_prag.adb: Minor spelling correction.
10911 2014-01-27 Robert Dewar <dewar@adacore.com>
10913 * sem_prag.adb (Set_Convention_From_Pragma): Check that
10914 convention Ghost can only apply to functions.
10915 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
10917 2014-01-27 Robert Dewar <dewar@adacore.com>
10919 * gnat_ugn.texi: Add Short_Enums to documentation of
10922 2014-01-27 Robert Dewar <dewar@adacore.com>
10924 * sem_prag.adb (Analyze_Input_Item): Correct check for input
10925 item in same package.
10926 * sem_util.ads, sem_util.adb (Within_Scope): New function.
10928 2014-01-26 Arnaud Charlet <charlet@adacore.com>
10930 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
10931 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
10932 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
10933 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
10936 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
10938 * gcc-interface/Makefile.in: Fix oversight.
10940 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
10942 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
10943 conversion from a thin pointer with a shifted value.
10944 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
10945 read-only flag from the values onto the result.
10946 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
10948 2014-01-25 Tristan Gingold <gingold@adacore.com>
10950 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
10951 for E_Variable with a pragma Linker_Section.
10953 2014-01-25 Robert Dewar <dewar@adacore.com>
10955 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
10956 with Default_Value aspect is passed in by copy.
10958 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
10960 * set_targ.adb: Set Short_Enums.
10961 * gcc-interface/lang.opt (fshort-enums): New option.
10962 * gcc-interface/misc.c (gnat_handle_option): Handle it.
10963 (gnat_post_options): Do not modify the global settings.
10965 2014-01-24 Robert Dewar <dewar@adacore.com>
10967 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
10969 (Random_Decimal_Fixed): New generic function.
10970 * s-rannum.ads: Minor comment clarifications.
10972 2014-01-24 Robert Dewar <dewar@adacore.com>
10974 * back_end.adb: Remove Short_Enums handling (handled in
10975 Ttypes/Get_Targ now) Minor added comments.
10976 * freeze.adb: Change name Short_Enums_On_Target to
10977 Target_Short_Enums.
10978 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
10979 * opt.ads: Minor comment updates.
10980 * sem_ch13.adb: Change name Short_Enums_On_Target to
10981 Target_Short_Enums.
10982 * set_targ.adb: Set Short_Enums from gcc back end.
10983 * set_targ.ads (Short_Enums): New variable.
10984 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
10985 Ttypes/Get_Targ now).
10986 * ttypes.ads (Target_Short_Enums): New constant boolean switch
10988 2014-01-24 Pascal Obry <obry@adacore.com>
10990 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
10992 2014-01-24 Gary Dismukes <dismukes@adacore.com>
10994 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
10995 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
10998 2014-01-24 Robert Dewar <dewar@adacore.com>
11000 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11002 2014-01-24 Vincent Celier <celier@adacore.com>
11004 * prj.adb (Add_Aggregated_Project): Do not add a project in
11005 the list if it is already there.
11007 2014-01-24 Yannick Moy <moy@adacore.com>
11009 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11010 Correct the search for a subrogram declaration to which a pragma is
11013 2014-01-24 Bob Duff <duff@adacore.com>
11015 * gnat_ugn.texi: Document --decimal-grouping and
11016 --based-grouping switches in gnatpp.
11018 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11020 * sinfo.ads: Documentation update.
11022 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11024 * sem_ch3.adb (Constant_Redeclaration): New declaration is
11025 illegal if previous one has an initial expression that is an
11026 aggregate expanded into assignments.
11028 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11030 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11031 code reorganization to remove spurious warning on a loop with
11032 an array element iterator that has a null range.
11034 2014-01-24 Vincent Celier <celier@adacore.com>
11036 * make.adb (Binding_Phase): When setting the Ada paths, use
11037 the library ALI dir, not the object dir in libraries.
11039 2014-01-24 Yannick Moy <moy@adacore.com>
11041 * sinfo.ads: Add documentation of check flag fields.
11043 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11045 * sem_res.adb (Resolve_Actuals): If an actual is a view
11046 conversion of a discriminated object, and the formal type is
11047 discriminated and constrained, apply a discriminant check to
11050 2014-01-24 Robert Dewar <dewar@adacore.com>
11052 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11054 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11056 * sem_ch3.adb (Analyze_Declarations): At the end of an
11057 appropriate declarative part, call Freeze_All from the first
11058 declaration in the scope, not from the first unfrozen one. This
11059 is necessary to apply visibility checks to entities with delayed
11060 aspects. Otherwise, in the presence of instantiations and cleanups
11061 that they may generate, the delayed aspects may be analyzed too
11062 late and produce spurious visibility errors.
11063 * sem_attr.adb: Place etype on range.
11064 * sem_ch6.adb: Documentation expression functions.
11066 2014-01-24 Robert Dewar <dewar@adacore.com>
11068 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11069 terminology in compiler).
11071 2014-01-24 Robert Dewar <dewar@adacore.com>
11073 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11074 categories, now that Ada 95 supports raise expressions.
11076 2014-01-24 Robert Dewar <dewar@adacore.com>
11078 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11079 Short_Enums_On_Target.
11080 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11082 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11084 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11086 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11087 indication is given explicity, check that it matches the array
11088 component type or the container element type of the domain
11091 2014-01-24 Tristan Gingold <gingold@adacore.com>
11093 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11094 * gcc-interface/misc.c (flag_short_enums): Declare.
11095 (gnat_post_options): Set it.
11097 2014-01-24 Vincent Celier <celier@adacore.com>
11099 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11100 to cache the result when Including_Libraries is False.
11101 * prj-env.ads (Ada_Objects_Path): Update documentation
11102 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11103 (Get_Object_Directory): Return the Library_Ali_Dir only when
11104 when Including_Libraries is True.
11105 * prj.ads (Get_Object_Directory): Fix and complete documentation
11106 (Project_Data): New component Ada_Objects_Path_No_Libs
11108 2014-01-24 Robert Dewar <dewar@adacore.com>
11110 * checks.adb (Expr_Known_Valid): Result of fpt operator never
11113 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11115 * back_end.adb: Minor fix in comment.
11117 2014-01-24 Javier Miranda <miranda@adacore.com>
11119 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11120 required to report the error in case of task types.
11122 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11124 * sem_attr.adb: Additional index checking.
11126 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11128 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11129 expressions in each component association, and for records note
11130 the entity in each association choice, for subsequent resolution.
11131 (Resolve_Attribute, case 'Update): Complete resolution of
11132 expressions in each component association.
11134 2014-01-24 Robert Dewar <dewar@adacore.com>
11136 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11137 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11138 leading to wrong handling of SPARK_Mode for library units).
11140 2014-01-24 Robert Dewar <dewar@adacore.com>
11142 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11143 on generic instances (do not consider them to be internally
11146 2014-01-24 Doug Rupp <rupp@adacore.com>
11148 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11149 vice pthread_sigmask.
11151 2014-01-24 Vincent Celier <celier@adacore.com>
11153 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11156 2014-01-24 Vincent Celier <celier@adacore.com>
11158 * prj-ext.adb (Add): Do not output anything when Silent is True,
11159 whatever the verbosity. When Source is From_External_Attribute,
11160 set the corresponding environment variable if it is not already set.
11161 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
11163 * prj-proc.adb (Process_Expression_For_Associative_Array):
11164 For attribute External, call Prj.Ext.Add with Silent set to
11165 True for the child environment, to avoid useless output in non
11168 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11170 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
11171 range given by a subtype indication, and force evaluation of
11172 the bounds, as for a simple range.
11173 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
11174 of bounds of slice for various kinds of discrete ranges.
11175 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
11176 Evaluate_Slice_Bounds.
11178 2014-01-24 Bob Duff <duff@adacore.com>
11180 * s-taskin.ads (Activator): Make this Atomic, because
11181 Activation_Is_Complete reads it, and that can be called
11182 from any task. Previously, this component was only
11183 modified by the activator before activation, and by
11184 Self after activation.
11185 * a-taside.ads, a-taside.adb (Environment_Task,
11186 Activation_Is_Complete): Implement these missing functions.
11188 2014-01-24 Doug Rupp <rupp@adacore.com>
11190 * init.c: Add a handler section for Android.
11192 2014-01-24 Arnaud Charlet <charlet@adacore.com>
11194 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
11196 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11198 * sem_ch4.adb (Operator_Check): If one operand is a
11199 Raise_Expression, set its type to that of the other operand.
11200 * sem_res.adb (Resolve_Raise_Expression): new procedure.
11201 (Resolve_Actuals): For an actual that is a Raise_Expression,
11202 set the type to that of the formal.
11203 * sem_type.adb (Find_Unique_Type): If one of the operands is a
11204 Raise_Expression, return type of the other operand.
11206 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11208 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
11209 component of the record has a type with a default aspect, and
11210 the corresponding aggregate component is initiaized with a box,
11211 use the default value in the rewritten aggregate.
11213 2014-01-24 Tristan Gingold <gingold@adacore.com>
11215 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
11216 s-interr-sigaction.adb,
11217 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
11218 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
11219 to the call to Install_Restricted_Handlers.
11221 2014-01-24 Emmanuel Briot <briot@adacore.com>
11223 * prj-nmsc.adb (Check_File): Add protection when the source is
11224 not fully initialized.
11226 2014-01-24 Ed Schonberg <schonberg@adacore.com>
11228 * sem_util.adb (Is_Post_State): In a postcondition, a selected
11229 component that denotes an implicit dereference is a reference
11230 to the post state of the subprogram.
11232 2014-01-24 Robert Dewar <dewar@adacore.com>
11234 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
11235 for generated subprograms.
11236 (Analyze_Subprogram_Specification): Ditto.
11238 2014-01-24 Vincent Celier <celier@adacore.com>
11240 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
11241 attributes in package Builder of aggregate and aggregate library
11243 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
11244 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
11245 Remove parameters. Change error message from "... externally
11246 build library ..." to "... externally built project ...".
11247 (Process_Naming_Scheme.Check): Do not do any check in aggregate
11248 project, as attribute Library_Dir and Library_Name have already
11249 been detected as forbidden.
11251 2014-01-24 Vincent Celier <celier@adacore.com>
11253 * prj-env.adb (Find_Project): If cached project path is not in
11254 project directory, look in current directory first and use cached
11255 project path only if project is not found in project directory.
11257 2014-01-24 Robert Dewar <dewar@adacore.com>
11259 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
11261 2014-01-24 Vincent Celier <celier@adacore.com>
11263 * projects.texi: Document that aggregate projects are only
11264 supported by gprbuild, but not by gnatmake. Document that the
11265 only attribute Switches in package Binder of aggregate projects
11266 will be ignored if its index is not others. Document that
11267 attribute Global_Config_File is allowed in package Binder of
11268 aggregate projects.
11270 2014-01-24 Robert Dewar <dewar@adacore.com>
11272 * sem_prag.adb: Minor code reorganization.
11273 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
11275 2014-01-24 Pascal Obry <obry@adacore.com>
11277 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
11278 attribute definition.
11280 2014-01-24 Vincent Celier <celier@adacore.com>
11282 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
11283 in the Queue the same source (same path, same multi-source index)
11284 from the same project file, to avoid compiling several times
11287 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
11289 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
11290 (Has_Gigi_Rep_Item): Likewise.
11291 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
11292 Has_Gigi_Rep_Item for objects.
11293 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
11294 (prepend_one_attribute): ...this.
11295 (prepend_one_attribute_pragma): New function extracted from...
11296 (prepend_attributes): ...here. Swap the parameters for consistency.
11297 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
11298 prepend_attributes.
11299 <object>: Deal with a pragma Linker_Section on a constant
11300 or variable. <E_Function>: Deal with a pragma Linker_Section
11302 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
11304 2014-01-24 Vincent Celier <celier@adacore.com>
11306 * opt.ads: Minor comment update.
11308 2014-01-24 Robert Dewar <dewar@adacore.com>
11310 * sem_prag.adb (Analyze_Input_Output): Add missing error check
11312 * sem_util.adb (Is_Refined_State): Add defense against junk
11315 2014-01-24 Pascal Obry <obry@adacore.com>
11317 * projects.texi: Removes Build_Slaves attribute documentation.
11319 2014-01-23 Robert Dewar <dewar@adacore.com>
11321 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
11324 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11326 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
11327 applies to expressions that come from source.
11328 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
11330 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
11331 rule regarding potentially unevaluated expressions, to prefix
11334 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11336 * exp_util.adb (Make_Invqriant_Call): If type of expression is
11337 a private extension, get invariant from base type.
11339 2014-01-23 Robert Dewar <dewar@adacore.com>
11341 * sem_util.adb, sem_attr.adb: Minor reformatting.
11343 2014-01-23 Robert Dewar <dewar@adacore.com>
11345 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
11346 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
11347 * sem.adb (Semantics): Remove save/restore of
11348 SPARK_Mode[_Pragma]. Not needed since already done in
11349 Save/Restore_Opt_Config_Switches.
11351 2014-01-23 Robert Dewar <dewar@adacore.com>
11353 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
11354 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
11355 Linker_Section enhancements.
11357 2014-01-23 Tristan Gingold <gingold@adacore.com>
11359 * gnat_rm.texi: Minor editing.
11361 2014-01-23 Robert Dewar <dewar@adacore.com>
11363 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
11364 with'ed internal units.
11365 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11367 2014-01-23 Javier Miranda <miranda@adacore.com>
11369 * lib-xref.adb (Generate_Reference): As part of processing the
11370 "end-of-spec" reference generate an extra reference to the first
11371 private entity of the package.
11372 * xr_tabls.adb (Add_Reference): No action needed for the extra
11373 'E' reference associated; similar to the processing of the
11376 2014-01-23 Bob Duff <duff@adacore.com>
11378 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
11380 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11382 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
11383 predicate to implement rule given in 6.1.1 (20/3).
11384 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
11385 'Old in a postcondition, if it is potentially unevaluated and
11386 it is not an entity name.
11388 2014-01-23 Bob Duff <duff@adacore.com>
11390 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
11392 2014-01-23 Robert Dewar <dewar@adacore.com>
11394 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
11397 2014-01-23 Bob Duff <duff@adacore.com>
11399 * g-dynhta.ads: Minor comment fix.
11401 2014-01-23 Yannick Moy <moy@adacore.com>
11403 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
11404 from spec on body only when not already inherited on spec. Set
11405 SPARK_Mode from context on body without previous spec. *
11406 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
11407 library-level entities. Correct retrieval of entity from
11408 declaration, for cases where the declaration is not a unit.
11409 * sem_ch12.adb (Instantiate_Object): Avoid
11410 calling Is_Volatile_Object on an empty node.
11412 2014-01-23 Robert Dewar <dewar@adacore.com>
11414 * gnatlink.adb (Gnatlink): Check for suspicious executable file
11417 2014-01-23 Robert Dewar <dewar@adacore.com>
11419 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
11420 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
11421 style errors in instances.
11422 * g-dynhta.ads (Static_HTable): Comment updates.
11424 2014-01-23 Vincent Celier <celier@adacore.com>
11426 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
11427 to find a configuration project file when Config_File_Name is
11428 No_Configuration_File.
11429 * prj-conf.ads (No_Configuration_File): New constant String.
11430 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
11431 with Config_File_Name set to No_Configuration_File, so that
11432 no existing configuration project file will be used, and the
11433 configuration project will be only created in memory when
11434 Add_Default_GNAT_Naming_Scheme is called.
11435 * projects.texi: Minor reformatting.
11437 2014-01-23 Vincent Celier <celier@adacore.com>
11439 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
11440 a config project file if On_Load_Config is not null.
11441 * prj-pars.adb: Minor comment changes.
11443 2014-01-23 Ed Schonberg <schonberg@adacore.com>
11445 * lib-xref.adb (Output_References): Output progenitors of
11446 synchronized tagged types, for source navigation.
11448 2014-01-23 Robert Dewar <dewar@adacore.com>
11450 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
11451 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
11452 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
11454 2014-01-23 Emmanuel Briot <briot@adacore.com>
11456 * prj-conf.adb (Get_Or_Create_Configuration_File): call
11457 On_Load_Config later.
11459 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
11461 * sem_ch3.adb (Analyze_Declarations): Do not
11462 generate the spec of the late primitive in ASIS mode. Add two
11463 comments to explain the special cases when the expansion is
11466 2014-01-23 Robert Dewar <dewar@adacore.com>
11468 * sem_util.adb (Note_Possible_Modification): Fix error of
11469 misbehaving for implicit dereference cases in -gnatc mode.
11471 2014-01-23 Emmanuel Briot <briot@adacore.com>
11473 * prj-pars.adb: Minor reformatting.
11475 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11477 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
11478 body generated for an expression function within a protected body
11479 needs a set of renaming declarations if the expression function
11482 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11484 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
11485 list interface progenitor of a tagged concurrent type, for better
11488 2014-01-22 Robert Dewar <dewar@adacore.com>
11490 * lib.adb (In_Extended_Main_Code_Unit): Return False for
11492 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
11493 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
11494 treatment of Slocs No_Location and Standard_Location.
11495 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
11496 check for entity with Standard_Location Sloc, rather than relying
11497 on Lib routines to do that.
11498 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
11499 that a call cannot occur before a later occuring body within
11502 2014-01-22 Thomas Quinot <quinot@adacore.com>
11504 * rtsfind.adb: Update comment.
11506 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
11508 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
11509 * sem_ch3.adb (Analyze_Declarations): Add local variable
11510 Body_Seen. Generate the spec of a late controlled
11511 primitive body that is about to freeze its related type.
11512 (Handle_Late_Controlled_Primitive): New routine.
11514 2014-01-22 Robert Dewar <dewar@adacore.com>
11516 * a-stream.adb: Minor reformatting.
11518 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11520 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
11521 sub-procedure Declared_In_Actual to handle properly the visibility
11522 of actuals in actual packages, that are themselves actuals to a
11523 actual package of the current instance. This mimics properly the
11524 visibility of formals of formal packages declared with a box,
11525 within the corresponding generic unit.
11527 2014-01-22 Robert Dewar <dewar@adacore.com>
11529 * checks.adb: Do not assume that a volatile variable is valid.
11531 2014-01-22 Thomas Quinot <quinot@adacore.com>
11533 * g-catiio.ads (Image, Value): Clarify that these functions
11534 operate in the local time zone. Minor documentation update.
11536 2014-01-22 Thomas Quinot <quinot@adacore.com>
11538 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
11540 2014-01-22 Robert Dewar <dewar@adacore.com>
11542 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
11543 Moved to sem_aux.adb.
11545 2014-01-22 Robert Dewar <dewar@adacore.com>
11547 * vms_data.ads: Minor reformatting.
11549 2014-01-22 Robert Dewar <dewar@adacore.com>
11551 * debug.adb: Document messages affected by -gnatd.E including
11552 the new ones that relate to late definition of equality.
11553 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
11554 debug flag -gnatd.E is set, then generate warnings rather than
11556 (Check_Untagged_Equality): In earlier versions of Ada,
11557 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
11559 2014-01-22 Robert Dewar <dewar@adacore.com>
11561 * sem_prag.adb (Usage_Error): Output additional messages for
11562 unconstrained OUT parameters lacking an input dependency.
11564 2014-01-22 Robert Dewar <dewar@adacore.com>
11566 * sem_ch4.adb: Minor reformatting.
11568 2014-01-22 Robert Dewar <dewar@adacore.com>
11570 * restrict.ads: Minor reformatting.
11571 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
11572 forbids a call from within a subprogram to the same subprogram.
11574 2014-01-22 Thomas Quinot <quinot@adacore.com>
11576 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
11577 stream attributes for Stream_Element_Array.
11578 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
11579 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
11580 defined in the current scope.
11582 2014-01-22 Robert Dewar <dewar@adacore.com>
11584 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
11586 2014-01-22 Thomas Quinot <quinot@adacore.com>
11588 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
11590 2014-01-22 Thomas Quinot <quinot@adacore.com>
11592 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
11593 declaration initialized with a function call, whose type
11594 has variable size, need to remove side effects so that the
11595 initialization expression becomes a dereference of a temporary
11596 reference to the function result.
11598 2014-01-22 Yannick Moy <moy@adacore.com>
11600 * errout.adb (Initialize): Remove trick to add dummy entry
11602 * erroutc.adb (Set_Warnings_Mode_Off,
11603 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
11604 command line switch.
11605 * opt.ads (Warning_Mode): Document behavior
11606 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
11608 2014-01-22 Robert Dewar <dewar@adacore.com>
11610 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
11612 2014-01-22 Robert Dewar <dewar@adacore.com>
11614 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
11615 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
11616 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
11617 case Storage_Size): call Check_Pool_Size_Clash.
11619 2014-01-22 Robert Dewar <dewar@adacore.com>
11621 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
11622 sem_eval.ads: Minor reformatting.
11624 2014-01-22 Thomas Quinot <quinot@adacore.com>
11626 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
11627 Any_Composite to prevent cascaded errors.
11629 2014-01-22 Yannick Moy <moy@adacore.com>
11631 * errout.adb (Initialize): Do not insert special entry in Warnings
11632 table in GNATprove_Mode.
11633 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
11635 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
11638 2014-01-22 Robert Dewar <dewar@adacore.com>
11640 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
11643 2014-01-22 Robert Dewar <dewar@adacore.com>
11645 * snames.ads-tmpl: Update header.
11647 2014-01-22 Thomas Quinot <quinot@adacore.com>
11649 * exp_util.adb (Insert_Actions): When inserting actions on a
11650 short circuit operator that has already been analyzed, do not park
11651 actions in node; instead introduce an N_Expression_With_Actions
11652 and insert actions immediately.
11653 Add guard for unexpected case of climbing up through statement
11654 in Actions list of an N_Expression_With_Actions.
11655 * sem_elab.adb (Insert_Elab_Check): Remove complex
11656 specialized circuitry for the case where the context is already
11657 analyzed, as it is not needed and introduces irregularities in
11658 finalization. Instead rely on the above change to Insert_Actions
11659 to ensure that late insertion on short circuit operators works
11662 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11664 * sem_ch4.adb (Operator_Check): Improve error message when an
11665 operand of concatenation is an access type.
11667 2014-01-22 Thomas Quinot <quinot@adacore.com>
11669 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
11672 2014-01-22 Ed Schonberg <schonberg@adacore.com>
11674 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
11675 of an expanded name in a proper body, whose prefix is a package
11676 in the context of the proper body, when there is a homonym of
11677 the package declared in the parent unit.
11679 2014-01-22 Robert Dewar <dewar@adacore.com>
11681 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
11682 msg if errors found.
11683 (Check_One_Unit): Same change.
11685 2014-01-22 Robert Dewar <dewar@adacore.com>
11687 * ug_words: Add missing/wrong entries for VMS warning switches.
11688 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
11690 2014-01-22 Jerome Guitton <guitton@adacore.com>
11692 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
11695 2014-01-22 Robert Dewar <dewar@adacore.com>
11697 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
11699 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
11701 * gcc-interface/Makefile.in: Minor fixes.
11703 2014-01-21 Robert Dewar <dewar@adacore.com>
11705 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
11706 * par-ch5.adb (P_Condition): New version with expression prescanned.
11707 * par.adb (P_Condition): New version with expression prescanned.
11709 2014-01-21 Robert Dewar <dewar@adacore.com>
11711 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
11712 if Address is not a private type.
11713 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
11714 Ignore pragma if System.Address is not a private type.
11716 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11718 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
11719 uninitialized value.
11721 2014-01-21 Thomas Quinot <quinot@adacore.com>
11723 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
11725 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11727 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
11728 the value of Assertions_Enabled flag when compiling an instance of
11729 an internal unit. This facilitates the use of pre/postconditions
11730 in generic internal units, such as the new elementary function
11733 2014-01-21 Robert Dewar <dewar@adacore.com>
11735 * exp_aggr.adb: Minor reformatting.
11736 * sem_attr.adb: Minor reformatting.
11737 * sem_res.adb: Minor comment addition.
11738 * einfo.adb: Minor comment updates.
11739 * freeze.adb: Minor reformatting and code reorganization.
11741 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11743 * par-ch4.adb (P_If_Expression): Handle more gracefully an
11744 elsif clause that does not have an else part.
11746 2014-01-21 Robert Dewar <dewar@adacore.com>
11748 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
11749 * gcc-interface/Makefile.in: clean up target pairs.
11751 2014-01-21 Pascal Obry <obry@adacore.com>
11753 * projects.texi: Minor typo fix.
11755 2014-01-21 Thomas Quinot <quinot@adacore.com>
11757 * freeze.adb (Check_Component_Storage_Order): If a record type
11758 has an explicit Scalar_Storage_Order attribute definition clause,
11759 reject any component that itself is of a composite type and does
11762 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11764 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
11765 can be used to generate proper cross-reference information for
11766 the parent units of proper bodies.
11768 2014-01-21 Thomas Quinot <quinot@adacore.com>
11770 * exp_pakd.adb (Expand_Packed_Element_Set,
11771 Expand_Packed_Element_Reference): No byte swapping required in
11772 the front-end for the case of a reverse storage order array,
11773 as this is now handled uniformly in the back-end. However we
11774 still need to swap back an extracted element if it is itself a
11775 nested composite with reverse storage order.
11777 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
11779 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
11780 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
11783 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11785 * gnat_ugn.texi: Minor updates.
11787 2014-01-21 Thomas Quinot <quinot@adacore.com>
11789 * exp_pakd.adb: Update comment, minor reformatting.
11791 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
11793 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
11794 object check when SPARK_Mode is on.
11795 * sem_ch6.adb (Process_Formals): Trigger the volatile object
11796 check when SPARK_Mode is on.
11797 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
11798 check when SPARK_Mode is on.
11799 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
11800 corresponding pragma of aspect SPARK_Mode in the visible
11801 declarations of a package declaration.
11802 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
11803 check when SPARK_Mode is on.
11804 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
11805 check when SPARK_Mode is on.
11806 (Resolve_Entity_Name): Trigger
11807 the volatile object check when SPARK_Mode is on.
11809 2014-01-21 Robert Dewar <dewar@adacore.com>
11811 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
11812 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
11814 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11816 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
11817 object is declared, it is rewritten as a renaming of an dynamic
11818 expression that wraps the initial value. The renaming declaration
11819 is first given an internal name, to prevent collisions with the
11820 entity already declared, and then the name is modified to reflect
11821 the original one. the modification of the name must preserve
11822 the source location of the original, to prevent spurious errors
11823 when compiling with style checks if the declaration involves
11824 more than one entity.
11826 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
11828 * aspects.adb Add entries for Async_Readers, Async_Writers,
11829 Effective_Reads and Effective_Writes in table Canonical_Aspect.
11830 * aspects.ads Add entries for Async_Readers, Async_Writers,
11831 Effective_Reads and Effective_Writes in tables Aspect_Id,
11832 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
11833 * atree.adb (Ekind_In): New version with 8 parameters.
11834 (Node34): New routine.
11835 (Set_Node34): New routine.
11836 * atree.ads (Ekind_In): New version with 8 parameters.
11837 (Node34): New routine.
11838 (Set_Node34): New routine.
11839 * einfo.adb Contract is now Node34.
11840 (Contract): Update the assertion and node usage.
11841 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
11842 Effective_Reads and Effective_Writes.
11843 (Set_Contract): Update the assertion and node usage.
11844 (Write_Field24_Name): Remove the output for a contract.
11845 (Write_Field34_Name): Add output for a contract.
11846 * einfo.ads Contract is now Node34. Update the comment on
11847 attribute usage and related node structures.
11848 (Get_Pragma): Update the comment on usage.
11849 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
11850 Effective_Reads and Effective_Writes do not require special
11851 processing by the parser.
11852 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
11853 (Analyze_Declarations): Analyze the contract of a variable at
11854 the end of the declarative region.
11855 (Analyze_Object_Declaration): Create a contract for a variable.
11856 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
11857 of classification pragmas.
11858 (Process_Formals): Detect an illegal
11859 use of a volatile object as a formal in a function.
11860 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
11861 a volatile object as an actual in generic instantiation.
11862 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
11863 Effective_Reads and Effective_Writes in table Sig_Flags.
11864 (Analyze_External_State_In_Decl_Part): New routine.
11865 (Analyze_Global_Item): Detect an illegal use of a volatile object
11866 as a global item of a function.
11867 (Analyze_Pragma): Reimplement
11868 pragma Abstract_State. Add support for pragmas Async_Readers,
11869 Async_Writers, Effective_Reads and Effective_Writes.
11870 (Check_External_Properties): New routine.
11871 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
11872 (Check_External_Properties): New routine.
11873 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
11874 volatile object as an actual in a call.
11875 (Resolve_Entity_Name):
11876 Add local variables Par, Prev and Usage_OK. Detect illegal
11877 contexts of volatile objects.
11878 * sem_util.adb (Add_Contract_Item): Add support for
11879 pragmas associated with the contract of a variable.
11880 (Async_Readers_Enabled): New routine.
11881 (Async_Writers_Enabled): New routine.
11882 (Effective_Reads_Enabled): New routine.
11883 (Effective_Writes_Enabled): New routine.
11884 (Has_Enabled_Property):
11886 (Is_Unchecked_Conversion_Instance): New routine.
11887 (Is_Volatile_Object): Add support for entities that may denote
11889 * sem_util.ads (Add_Contract_Item): Update the
11891 (Async_Readers_Enabled): New routine.
11892 (Async_Writers_Enabled): New routine.
11893 (Effective_Reads_Enabled): New routine.
11894 (Effective_Writes_Enabled): New routine.
11895 (Is_Unchecked_Conversion_Instance): New routine.
11896 * sinfo.ads Update the comment on the structure of N_Contract.
11897 * snames.ads-tmpl Add predefined names for Async_Readers,
11898 Async_Writers, Effective_Reads and Effective_Writes. Add
11899 pragma ids for Async_Readers, Async_Writers, Effective_Reads
11900 and Effective_Writes.
11902 2014-01-21 Robert Dewar <dewar@adacore.com>
11904 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
11905 * sem_eval.adb (Compile_Time_Known_Value): Remove special
11906 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
11907 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
11908 (Test_Foldable): Add CRT_Safe parameter
11909 * sem_eval.ads (Compile_Time_Known_Value): Remove special
11910 handling of CRT mode.
11911 (CRT_Safe_Compile_Time_Known_Value): New function.
11913 2014-01-21 Robert Dewar <dewar@adacore.com>
11915 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
11916 with pragma or aspect that applies to package spec or subprogram
11919 2014-01-21 Robert Dewar <dewar@adacore.com>
11921 * exp_aggr.adb: Minor reformatting.
11923 2014-01-21 Johannes Kanig <kanig@adacore.com>
11925 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
11927 2014-01-21 Bob Duff <duff@adacore.com>
11929 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
11931 2014-01-21 Steve Baird <baird@adacore.com>
11933 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
11935 2014-01-21 Vincent Celier <celier@adacore.com>
11937 * prj-part.adb (Parse_Single_Project): Accept to extend a project
11938 if it has only be imported by an project being extended. When a
11939 project that has only been imported by a project being extended
11940 is imported by another project that is not being extended,
11941 reset the previous indication, so that it will be an error if
11942 this project is extended later.
11943 * prj-tree.adb (Create_Project): Include component From_Extended
11944 in table Projects_HT
11945 * prj-tree.ads (Project_Name_And_Node): New Boolean component
11948 2014-01-21 Robert Dewar <dewar@adacore.com>
11950 * atree.ads, atree.adb: Add Node33 and Set_Node33.
11951 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
11952 New field (SPARK_Pragma_Inherited): New flag
11953 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
11955 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
11956 * opt.ads (SPARK_Mode_Pragma): New global variable.
11957 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
11958 * sem_ch3.adb: Use new SPARK_Mode data structures.
11959 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
11960 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
11961 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
11962 (Pop_Scope): Restore SPARK_Mode_Pragma.
11963 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
11964 new data structures.
11966 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11968 * back_end.adb: Undo previous change, not needed. Minor reformatting.
11970 2014-01-21 Thomas Quinot <quinot@adacore.com>
11972 * exp_ch5.adb: Fix comment.
11973 * switch-c.adb: Minor comment update.
11974 * exp_ch3.adb: Minor reformatting.
11976 2014-01-21 Arnaud Charlet <charlet@adacore.com>
11978 * back_end.adb (Scan_Compiler_Arguments): Do not store object
11979 filename in gnatprove mode.
11981 2014-01-21 Thomas Quinot <quinot@adacore.com>
11983 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
11984 suppresses usage of primitive _assign for tagged types).
11985 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
11986 No_Ctrl_Actions for a tagged type that does not require
11987 finalization, as we want to disable usage of _assign (which
11988 may cause undesirable discriminant checks on an uninitialized,
11991 2014-01-21 Ed Schonberg <schonberg@adacore.com>
11993 * sem_prag.adb: Reject invariant'class on completion.
11995 2014-01-21 Javier Miranda <miranda@adacore.com>
11997 * exp_ch3.adb (Build_Init_Procedure): For
11998 derivations of interfaces, do not move the the initialization
11999 of the _parent field since such assignment is not generated.
12001 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12003 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12004 with the operator it renames if we are within an expression of
12005 a pre/postcondition, because the expression will be reanalyzed
12006 at a later point, and the analysis of the renaming may affect
12007 the visibility of the operator when in an instance.
12009 2014-01-21 Robert Dewar <dewar@adacore.com>
12011 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12012 Add this flag to type conversion nodes and assignment nodes.
12013 * treepr.adb: Deal properly with Flag 1,2,3.
12014 * treeprs.adt: Minor comment update.
12016 2014-01-21 Robert Dewar <dewar@adacore.com>
12018 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12020 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12021 parameter, completely rewrite spec.
12023 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12025 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12026 instance that is inlined, it may have been rewritten as a wrapper
12027 package. In that case the unit that must be made visible is the
12028 related instance of the package.
12030 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12032 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12033 previous change in codepeer mode.
12035 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12037 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12038 call to Abort_Undefer, as expected by the runtime.
12039 * s-tasren.adb (Local_Complete_Rendezvous): Replace
12040 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12041 deferred at this point. Update comments.
12043 2014-01-21 Thomas Quinot <quinot@adacore.com>
12045 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12047 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12049 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12052 2014-01-21 Robert Dewar <dewar@adacore.com>
12054 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12056 2014-01-21 Thomas Quinot <quinot@adacore.com>
12058 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12059 this is value is used in Node_Id arithmetic operations.
12060 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12061 instead of hard-coded unrolled code.
12063 2014-01-21 Yannick Moy <moy@adacore.com>
12065 * gnat1drv.adb: Minor code cleanup, removing useless code.
12067 2014-01-21 Arnaud Charlet <charlet@adacore.com>
12069 * opt.ads (SPARK_Switches_File_Name): New.
12070 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12071 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12072 * gnat_ugn.texi: Document -gnates.
12074 2014-01-21 Yannick Moy <moy@adacore.com>
12076 * errout.adb (Special_Msg_Delete): Update comment. Remove
12077 special case for GNATprove which should not ignore mismatch
12078 in sizes for representation clauses.
12079 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12080 which should not ignore pragma Pack.
12082 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12084 * sem_ch4.adb: Code clean up.
12086 2014-01-21 Steve Baird <baird@adacore.com>
12088 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12090 2014-01-21 Robert Dewar <dewar@adacore.com>
12092 * gcc-interface/gigi.h: Get Flags array address.
12093 * gcc-interface/trans.c: Acquire Flags array address.
12094 * atree.adb: Add support for Flags array and Flag0,1,2,3.
12095 * atree.ads: Add support for Flags array and Flag0,1,2,3.
12096 * atree.h: Add support for Flags array and Flag0,1,2,3.
12097 * back_end.adb: Pass Flags array address to gigi.
12099 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12101 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12102 reference to generated body so that legality checks on stream
12103 attributes are properly applied. If type is tagged and already
12104 frozen, insert generated body at the point of the renaming
12107 2014-01-21 Ed Schonberg <schonberg@adacore.com>
12109 * sem_ch12.adb: Code clean up.
12110 * sem_ch8.adb: Minor reformatting
12112 2014-01-20 Robert Dewar <dewar@adacore.com>
12114 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12115 converting warnings on inevitable exceptions to errors.
12116 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12117 converting warnings on inevitable exceptions to errors.
12118 * opt.adb (SPARK_Mode_Config): Handled like other config flags
12119 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12120 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12121 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12122 New flag (Config_Switches_Type): Add SPARK_Mode field
12123 * sem.adb: Minor code reorganization (remove unnecessary with)
12124 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12125 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12126 converting warnings on inevitable exceptions to errors.
12127 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12128 converting warnings on inevitable exceptions to errors.
12129 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12130 converting warnings on inevitable exceptions to errors.
12131 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12132 converting warnings on inevitable exceptions to errors.
12133 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12134 from spec if needed
12135 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12136 from spec if needed
12137 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12139 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12140 converting warnings on inevitable exceptions to errors.
12141 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12142 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12143 of Get_SPARK_Mode_Id
12144 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12145 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12146 converting warnings on inevitable exceptions to errors.
12147 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12148 converting warnings on inevitable exceptions to errors.
12149 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12152 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12154 * sem_ch13.adb: Add semantic information to rewritten type
12157 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12159 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
12160 are of a type with unknown discriminants, convert both to the
12161 underlying view of the type, so that the proper constraint check
12162 can be applied to the right-hand side.
12164 2014-01-20 Robert Dewar <dewar@adacore.com>
12166 * atree.adb (Copy_Node): Fix failure to copy last component
12167 (Exchange_Entities): Fix failure to exchange last entity
12169 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12171 * sem_ch12.adb: Code clean up.
12173 2014-01-20 Robert Dewar <dewar@adacore.com>
12175 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
12177 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12179 * sem_ch4.adb (Analyze_Quantified_Expression): If after
12180 pre-analysis the loop parameter specification has been
12181 rewritten as a iterator specification, propagate the change to
12182 the quantified expression, for ASIS navigtion needs.
12184 2014-01-20 Vincent Celier <celier@adacore.com>
12186 * par-ch10.adb: Minor error message change: escape [ and ].
12188 2014-01-20 Robert Dewar <dewar@adacore.com>
12190 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
12191 * errout.adb: Implement [ and ] insertion characters.
12192 * errout.ads: Document new [ and ] insertion characters.
12193 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
12194 addition of ??? comment.
12195 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
12196 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
12197 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
12198 Make warnings on exceptions into errors in GNATprove mode.
12199 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
12202 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12204 * sem_ch13.adb: Code clean up.
12206 2014-01-20 Robert Dewar <dewar@adacore.com>
12208 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
12210 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
12211 error in GNATprove mode.
12213 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12215 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
12216 reference 'Old takes no parameters, and thus can appear as a
12219 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12221 * exp_aggr.adb: Fix minor typos.
12223 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12225 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
12226 instance the attribute is legal, and its value is determined
12227 statically if the type has no discriminants. This choice is
12228 more useful than rechecking the legality rule in the instance,
12229 is consistent with older usage, and is also consistent with all
12232 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12234 * sem_cat.adb (Validate_Static_Object_Name): Change error into
12235 warning in Relaxed_Semantic_Mode.
12237 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12239 * sem_attr.adb: Code and comments cleanup.
12241 2014-01-20 Yannick Moy <moy@adacore.com>
12243 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
12244 * errout.adb (Compilation_Errors): Remove special handling in
12246 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
12247 removed debug flags.
12248 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
12249 Global, Initial_Condition, Initializes and Refined_State pragmas and
12251 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
12252 SPARK_Strict_Mode): Remove global flags.
12253 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
12254 always performed now, on packages declaring a null state.
12255 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
12256 at providing pedantic mode for bounds of integer types.
12257 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
12258 "some" quantified expression now issued under control of -gnatw.t,
12259 like the other warning on unused bound variable.
12260 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
12262 (Analyze_Pragma): Remove tests for SPARK 2014
12263 pragmas, not officially allowed by GNAT.
12265 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12267 * sem_prag.adb (Analyze_Pragma): Ensure that
12268 the sole argument of pragmas Abstract_State, Contract_Cases,
12269 Depends, Global and Initializes in in aggregate form.
12270 (Analyze_Refined_Pragma): Ensure that the sole argument of
12271 pragmas Refined_Depends, Refined_Global and Refined_State is in
12273 (Ensure_Aggregate_Form): New routine.
12275 2014-01-20 Doug Rupp <rupp@adacore.com>
12277 * sem_attr.adb (Analyze_Attribute): case
12278 Attribute_Constrained => treat all prefixes as legal for Declib
12281 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12283 * sem_prag.adb (Check_Mode): Reimplement the routine.
12284 (Find_Mode): New routine.
12286 2014-01-20 Robert Dewar <dewar@adacore.com>
12288 * sem_ch4.adb (Operator_Check): Handle additional
12289 Allow_Integer_Address cases.
12291 2014-01-20 Robert Dewar <dewar@adacore.com>
12293 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
12294 allowed if address is non-private, no longer true.
12295 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12296 Remove check for address being private, causes difficulty when
12297 pragma used in gnat.adc file and is not needed, since we guard
12298 this in Address_Integer_Convert_OK.
12299 * exp_ch7.adb: Minor reformatting.
12300 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
12302 2014-01-20 Robert Dewar <dewar@adacore.com>
12304 * checks.adb (Apply_Range_Check): Remove gnatprove special
12305 casing of exponentiation.
12306 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
12307 operand for integer case to check range against Natural.
12309 2014-01-20 Robert Dewar <dewar@adacore.com>
12311 * s-tataat.adb: Minor reformatting.
12313 2014-01-20 Robert Dewar <dewar@adacore.com>
12315 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
12316 entities, and also fix documentation to remove mention of visible
12317 integer type, since this is not what the implementation does.
12318 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
12319 entities, and also fix documentation to remove mention of visible
12320 integer type, since this is not what the implementation does.
12321 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
12323 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
12324 case for parameter type check.
12325 * sem_res.adb (Resolve): Use new function
12326 Address_Integer_Convert_OK.
12327 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
12328 reformatting throughout.
12329 * sem_util.adb (Address_Integer_Convert_OK): New function.
12330 * sem_util.ads: Minor reformatting (put specs in alpha order)
12331 (Address_Integer_Convert_OK): New function.
12333 2014-01-20 Thomas Quinot <quinot@adacore.com>
12335 * exp_ch7.adb (Wrap_Transient_Expression):
12336 Insertion extra conditional expression only if
12337 Opt.Suppress_Control_Flow_Optimizations is set.
12339 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12341 * s-tataat.adb (Initialize_Attributes): Abort might already be
12342 deferred in Create_Task.
12344 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12346 * checks.adb (Apply_Scalar_Range_Check): Flag
12347 the exponent as requiring a range check when the expression is
12350 2014-01-20 Fedor Rybin <frybin@adacore.com>
12352 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
12354 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12356 * sem_util.adb (Default_Initialization): New routine.
12357 * sem_util.ads: Add new type Default_Initialization_Kind.
12358 (Default_Initialization): New routine.
12360 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12362 * sem_prag.adb (Check_Mode): Correct all error
12363 message logic dealing with in/in out parameters that may appear
12364 as inputs or have a self reference.
12366 2014-01-20 Robert Dewar <dewar@adacore.com>
12368 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
12369 * sem_res.adb (Resolve): Fix error causing infinite loop for
12370 integer used as address. Allow addresses as integers.
12372 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12374 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
12376 2014-01-20 Bob Duff <duff@adacore.com>
12378 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
12379 error when "use all" is not followed by "type".
12381 2014-01-20 Bob Duff <duff@adacore.com>
12383 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
12386 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12388 * checks.adb (Apply_Address_Clause_Check): If there is an
12389 alignment check on the expression in an address clause, and there
12390 is no local exception propagation, add an additional explanatory
12391 message to clarify the cause of previous warning.
12393 2014-01-20 Robert Dewar <dewar@adacore.com>
12395 * exp_ch7.adb: Minor reformatting.
12396 * opt.ads: Minor comment updates.
12397 * sem.adb: Minor name change Is_Main_Unit =>
12398 Is_Main_Unit_Or_Main_Unit_Spec.
12399 * sem_ch6.adb: Minor reformatting and code reorganization.
12401 2014-01-20 Bob Duff <duff@adacore.com>
12403 * gnat_ugn.texi: Update gnatpp switches.
12405 2014-01-20 Thomas Quinot <quinot@adacore.com>
12407 * exp_ch9.adb: Minor comment edit.
12409 2014-01-20 Robert Dewar <dewar@adacore.com>
12411 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
12412 only if System.Address is a private type.
12413 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
12414 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12415 Allowed only if type System.Address is private, since otherwise
12417 * sem_res.adb: Fix failure to properly Analyze unchecked
12418 conversions that were introduced by Allow_Integer_Address.
12419 * switch-c.adb: Remove -gnates switch.
12420 * usage.adb: Remove -gnates switch.
12421 * gnat_ugn.texi: Remove documentation of -gnates flag.
12423 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12425 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
12426 resolve expression to perform proper name capture.
12428 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12430 * sem.adb (Semantics): When saving/restoring configuration
12431 switches, the spec of a pre- defined unit that is the main unit
12432 must be treated as a predefined unit as well.
12434 2014-01-20 Thomas Quinot <quinot@adacore.com>
12436 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
12437 expression, insert an extra conditional expression when saving
12438 the value of the expression, for the benefit of control flow
12439 graph based coverage analysis.
12440 * exp_ch3.adb: Minor reformatting.
12442 2014-01-20 Robert Dewar <dewar@adacore.com>
12444 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
12445 * gnat_rm.texi: Document pragma Allow_Integer_Address.
12446 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
12447 * opt.ads: New flag Allow_Integer_Address.
12448 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
12449 * sem_ch5.adb: Minor reformatting.
12450 * sem_prag.adb: Implement pragma Allow_Integer_Address.
12451 * sem_res.adb (Resolve): Allow integer address value if
12453 * sem_util.adb: Minor reformatting.
12454 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
12455 * switch-c.adb: Recognize flag -gnates.
12456 * usage.adb: Document flag -gnates.
12458 2014-01-20 Thomas Quinot <quinot@adacore.com>
12460 * s-tadeca.adb: Fix minor typos in comment.
12462 2014-01-20 Pascal Obry <obry@adacore.com>
12464 * s-win32.ads (FreeLibrary): New import.
12466 2014-01-20 Robert Dewar <dewar@adacore.com>
12468 * sem_res.adb, sem_cat.adb: Minor reformatting.
12469 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
12470 assigning to OUT parameters for the current subprogram scope.
12471 * exp_ch4.adb: Minor reformatting.
12473 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12475 * exp_ch4.adb (Process_Transient_Object,
12476 Find_Enclosing_Contexts): If the top-level if-expression that
12477 generated the transient object is an actual in a call, the proper
12478 Hook_Context is a construct enclosing the call.
12479 * einfo.ads: Indicate that Related_Expression is used to link a
12480 loop variable to the container expression over which the loop
12482 (Analyze_Iterator_Specification): Set the Related_Expression of
12483 the loop variable in a container element iterator.
12484 (Note_Possible_Modification): If the variable is the loop
12485 variable in a container element iterator, indicate that the
12486 enclosing container is also modified.
12488 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12490 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
12492 2014-01-20 Robert Dewar <dewar@adacore.com>
12494 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
12495 Minor reformatting and code clean up.
12497 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12499 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
12500 of objects of private type if Relaxed_RM_Semantics.
12502 2014-01-20 Claire Dross <dross@adacore.com>
12504 * a-cofove.ads (Vector): Capacity discriminant
12505 should be in range of the index.
12507 2014-01-20 Thomas Quinot <quinot@adacore.com>
12509 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
12510 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
12511 possible difference between epoch of Ada.Calendar clock and Ada
12512 real-time/tasking clock.
12513 * s-taprop-posix.adb: Minor comment fix.
12515 2014-01-20 Doug Rupp <rupp@adacore.com>
12517 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
12519 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12521 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
12522 checks on the prefix of attribute 'Old.
12523 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
12524 generation of validity checks on a range that belongs to the
12525 iteration scheme of a quantified expression.
12526 * sem_ch5.adb (One_Bound): Suppress the generation of validity
12527 checks on a bound that belongs to the iteration scheme of a
12528 quantified expression, generate the check in all other cases.
12530 2014-01-20 Bob Duff <duff@adacore.com>
12532 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
12534 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12536 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
12537 interpretations that do not come from other predefined units,
12538 to prevent spurious ambiguities in the presence of user-defined
12539 operators in the context of (an instance of) a predefined unit.
12541 2014-01-20 Robert Dewar <dewar@adacore.com>
12543 * gnat_rm.texi: Document that Loop_Variant is included in
12544 Statement_Assertions.
12545 * sem_prag.adb (Check_Kind): Add Loop_Variant to
12546 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
12547 to Statement_Assertions.
12549 2014-01-20 Doug Rupp <rupp@adacore.com>
12551 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
12552 for errno ENOENT from RTP on NFS mounted file system.
12554 2014-01-20 Ed Schonberg <schonberg@adacore.com>
12556 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
12557 examine code that does not come from source. The check does not
12558 apply to code generated for constraint checks, and such code may
12559 generate spurious error messages when compiled with expansion
12560 disabled (as in a generic unit) because side effects may not
12562 2) Make error messages more explicit: indicate the component
12563 of the construct whose value is indeterminate because of a
12564 call to a function with in-out parameter in another component,
12565 when there is no mandated order of execution between the two
12566 components (actuals, aggregate components, alternatives).
12568 2014-01-20 Robert Dewar <dewar@adacore.com>
12570 * gnat_rm.texi: Minor cleanup.
12572 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12574 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
12575 can now apply to a refined postcondition.
12576 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
12577 variable Result_Seen. Add variables Case_Prag, Post_Prag,
12578 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
12579 whether postconditions and/or constract-cases mention attribute
12580 'Result and introduce a post-state when applied to functions.
12581 (Check_Result_And_Post_State): Removed.
12582 * sem_prag.adb (Analyze_Pragma): Add local variable
12583 Result_Seen. Verify that the expression of pragma Refined_Post
12584 mentions attribute 'Result and introduces a post-state.
12585 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
12587 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12589 * exp_ch7.adb (Is_Subprogram_Call): New routine.
12590 (Process_Transient_Objects): Make variable Must_Hook global with
12591 respect to all locally declared subprograms. Search the context
12592 for at least one subprogram call.
12593 (Requires_Hooking): Removed.
12595 2014-01-20 Claire Dross <dross@adacore.com>
12597 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
12598 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
12599 External_Axiomatization);
12601 2014-01-20 Robert Dewar <dewar@adacore.com>
12603 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
12604 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
12605 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
12606 Allow Loop_Entry to be used in these pragmas if they appear in
12607 an appropriate context.
12608 (Placement_Error): Specialize error
12609 message for pragma Assert[_And_Cut] or pragma Assume containing
12610 Loop_Entry attribute.
12611 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
12612 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
12613 and code clean ups.
12615 2014-01-20 Robert Dewar <dewar@adacore.com>
12617 * gnat1drv.adb: Minor comment update.
12619 2014-01-20 Tristan Gingold <gingold@adacore.com>
12621 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
12622 variables, comment out unused code.
12623 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
12624 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
12625 * s-excmac-arm.ads: New file.
12627 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12629 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
12630 Drange and Index_Typ. Remove the circuitry which creates a
12631 range check to compare the index type of the array against the
12633 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
12634 the circuitry which creates a range check to handle a
12635 discrete_range denoted by a subtype indication.
12637 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
12639 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
12640 nodes to get the original sloc range.
12642 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12644 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
12645 entity of a [library level] package.
12647 2014-01-20 Tristan Gingold <gingold@adacore.com>
12649 * raise-gcc.c (exception_class_eq): New function.
12650 (is_handled_by): Use it to compare exception classes.
12651 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
12652 be called to return URC_CONTINUE_UNWIND.
12653 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
12654 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
12656 2014-01-20 Robert Dewar <dewar@adacore.com>
12658 * opt.ads: Minor comment update.
12660 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12662 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
12663 constants to the "Local variables" area. Add new constant D. Add
12664 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
12665 to Pref_Typ and update all occurrences. Add circuitry to extract
12666 the discrete_range and the index type and build a range check.
12668 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12670 * gnat1drv.adb (Adjust_Global_Switches): Enable
12671 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
12674 2014-01-20 Thomas Quinot <quinot@adacore.com>
12676 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
12678 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12680 * sem_ch13.adb (Analyze_Aspect_Specifications):
12681 When aspect SPARK_Mode appears on a package body, insert the
12682 generated pragma at the top of the body declarations.
12684 2014-01-20 Robert Dewar <dewar@adacore.com>
12686 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
12687 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
12688 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
12689 sem_ch8.adb, exp_dist.adb: Minor reformatting.
12691 2014-01-20 Yannick Moy <moy@adacore.com>
12693 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
12696 2014-01-20 Pascal Obry <obry@adacore.com>
12698 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
12700 * g-arrspl.adb: Adapt all routine to this new implementation.
12701 (Set): Copy the Slice_Set definition before reusing it.
12703 2014-01-20 Arnaud Charlet <charlet@adacore.com>
12705 * sem_prag.adb (Process_Import_Or_Interface): In
12706 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
12707 (Analyze_Pragma): Ditto for pragma Export.
12708 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
12711 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12713 * einfo.ads: E_Abstract_State is now part of the entities that
12714 can be overloaded. Update type Overloadable_Kind to reflect the
12715 inclusion of abstract states.
12716 * sem_ch6.adb (New_Overloaded_Entity): A function can now
12717 overload an abstract state.
12718 * sem_prag.adb (Analyze_Constituent): Handle the overloading
12719 of states by functions. Use Entity_Of to obtain the entity of
12720 a constituent. (Analyze_Global_Item): Handle the overloading of
12721 states by functions.
12722 (Analyze_Initialization_Item): Handle the
12723 overloading of states by functions. Use Entity_Of to obtain the
12725 (Analyze_Input_Item): Handle the overloading
12726 of states by functions. Use Entity_Of to obtain the entity of an item.
12727 (Analyze_Input_Output): Handle the overloading of states by functions.
12728 (Analyze_Refinement_Clause): Handle the overloading
12729 of states by functions. Use Entity_Of to obtain the entity of an item.
12730 (Appears_In): Use Entity_Of to obtain the entity of an element.
12731 (Check_Usage): Use Entity_Of to obtain the entity of
12732 an item. Add a guard to prevent a crash due to a previous error.
12733 (Resolve_State): New routine.
12735 2014-01-20 Yannick Moy <moy@adacore.com>
12737 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
12738 opt.ads: Minor comments updates.
12740 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
12742 * einfo.adb (Non_Limited_View): Applies to abstract states.
12743 (Set_From_Limited_With): Applies to abstract states.
12744 (Set_Non_Limited_View): Applies to abstract states.
12745 (Write_Field17): Output the non-limited view of an abstract state.
12746 * einfo.ads: Update the comment on usage and occurrences in
12747 nodes for attributes From_Limited_With and Non_Limited_View.
12748 * sem_aux.adb (Available_View): This routine can now handle
12750 * sem_aux.ads (Available_View): This routine can now handle
12751 abstract states. Update the comment on usage.
12752 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
12753 of states and variables.
12754 (In_Pragmas_Depends_Or_Global): New routine.
12755 * sem_ch10.adb (Build_Limited_Views): Implement
12756 abstract (limited) views of variables and states.
12757 (Build_Shadow_Entity): This routine is now a procedure. Add
12758 formal parameter Shadow. Update the comment on usage. Add
12759 context-specific decoration for states and variables.
12760 (Decorate_State): New routine. (Decorate_Variable): New routine.
12761 (Find_And_Process_States): New routine.
12762 (Process_Declarations): Renamed to Process_Declarations_And_States.
12763 (Process_Declarations_And_States): Add formal parameters
12764 Pack and Create_Abstract_Views. Update the comment on usage.
12765 (Process_States): New routine.
12766 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
12767 views of states and variables. Match the abstract view of a state
12768 against its corresponding non-abstract view.
12769 (Is_Matching_Input):
12770 Handle abstract views of states and variables. Match the abstract
12771 view of a state against its corresponding non-abstract view.
12772 (Process_Global_Item): Handle abstract views of states and
12775 2014-01-20 Bob Duff <duff@adacore.com>
12777 * sem_ch10.adb (Expand_With_Clause): Don't
12778 recurse on the prefix if the current with-ed name refers to a
12779 package that renames its own parent, eg "package P.Q renames P;".
12781 2014-01-20 Yannick Moy <moy@adacore.com>
12783 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
12784 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
12785 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
12786 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
12787 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
12790 2014-01-20 Yannick Moy <moy@adacore.com>
12792 * sinfo.ads Update documentation of GNATprove mode.
12794 2014-01-20 Yannick Moy <moy@adacore.com>
12796 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
12797 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
12798 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
12799 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
12801 * sem_ch13.adb: Remove blank.
12802 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
12803 subprograms by alias for renamings, not for inherited primitive
12805 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
12807 (Remove_Side_Effects): Apply the removal in
12808 GNATprove mode, for the full analysis of expressions.
12809 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
12811 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
12812 save/restore actions for Expander_Active flag in GNATprove mode,
12813 similar to what is done in ASIS mode.
12814 * frontend.adb (Frontend): Generic bodies are instantiated in
12816 * gnat1drv.adb (Adjust_Global_Switches): Set operating
12817 mode to Check_Semantics in GNATprove mode, although a light
12818 expansion is still performed.
12819 (Gnat1drv): Set Back_End_Mode to
12820 Declarations_Only in GNATprove mode, and later on special case
12821 the GNATprove mode to continue analysis anyway.
12822 * lib-writ.adb (Write_ALI): Always generate ALI files in
12824 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
12826 (SPARK_Mode): Renamed as GNATprove_Mode.
12827 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
12828 tree in GNATprove_Mode.
12829 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
12830 body in GNATprove mode.
12831 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
12833 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
12834 Make sure side effects are removed in GNATprove mode.
12836 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12838 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
12839 for aliased objects with an unconstrained nominal subtype.
12840 * gcc-interface/trans.c (Call_to_gnu): Likewise.
12841 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
12842 <case N_Op_Minus>: Remove useless code.
12843 (Exception_Handler_to_gnu_zcx): Minor tweaks.
12845 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12847 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
12848 Tidy up. For a subtype with discriminants and variant part, if a
12849 variant is statically selected and the fields all have a constant
12850 position, put them in order of increasing position. Likewise if
12851 no variant part but representation clause is present.
12852 * gcc-interface/utils.c (make_packable_type): Robustify.
12853 (maybe_pad_type): Use local variable and tidy up condition. If no
12854 alignment is specified, use the original one.
12855 (create_type_stub_decl): Minor tweak.
12856 (convert) <case VECTOR_CST>: Fix typo.
12857 <case CONSTRUCTOR>: Deal with padding types around the same type.
12858 Do not punt on missing fields.
12859 (unchecked_convert): Call finish_record_type to lay out the special
12860 record types made for conversions from/to problematic integer types.
12861 Bump the alignment of CONSTRUCTORs before converting them to a more
12864 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
12866 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
12867 obsolete code for type_annotate_only mode, simplify code and slightly
12868 improve wording of comments.
12870 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
12873 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
12874 as intermediate type.
12875 (UI_To_gnu): Likewise.
12877 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
12879 * gnatvsn.ads (Current_Year): Bump to 2014.
12881 2014-01-02 Tobias Burnus <burnus@net-b.de>
12883 * gnat_ugn.texi: Bump @copying's copyright year.
12885 Copyright (C) 2014 Free Software Foundation, Inc.
12887 Copying and distribution of this file, with or without modification,
12888 are permitted in any medium without royalty provided the copyright
12889 notice and this notice are preserved.