1 2014-07-31 Gary Dismukes <dismukes@adacore.com>
3 * exp_util.adb: Minor reformatting.
5 2014-07-31 Vincent Celier <celier@adacore.com>
7 * errutil.adb (Error_Msg): Make sure that all components of
8 the error message object are initialized.
10 2014-07-31 Ed Schonberg <schonberg@adacore.com>
12 * sem_ch4.adb (Try_Container_Indexing): If the container type is
13 class-wide, use specific type to locate iteration primitives.
14 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
15 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
16 Minor error message reformating.
17 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
18 aspect for a derived type.
20 2014-07-31 Robert Dewar <dewar@adacore.com>
22 * debug.adb: Document debug flag d.X.
24 2014-07-31 Ed Schonberg <schonberg@adacore.com>
26 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
27 * sem_util.adb (Find_Specific_Type): If type is untagged private,
28 retrieve full view so that primitive operations can be located.
29 * exp_disp.adb Move Find_Specific_Type to sem_util.
30 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
31 Find_Specific_Type to locate primitive equality.
32 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
33 type does not require initialization.
34 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
35 body all visibility is established, and the enclosing package
36 declarations must not be installed.
38 2014-07-31 Yannick Moy <moy@adacore.com>
40 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
41 Make subprogram public.
43 2014-07-31 Ed Schonberg <schonberg@adacore.com>
45 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
46 predicate Discriminated_Size, to distinguish between private
47 components that depend on discriminants from those whose size
48 depends on some other non-static expression.
50 2014-07-31 Nicolas Setton <setton@adacore.com>
52 * g-exptty.adb (Close): Fix binding to Waitpid: use the
55 2014-07-31 Ed Schonberg <schonberg@adacore.com>
57 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
58 in a discrete range, when 'range was probably intended.
60 2014-07-31 Robert Dewar <dewar@adacore.com>
62 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
64 2014-07-31 Robert Dewar <dewar@adacore.com>
66 * frontend.adb: Minor reformatting.
67 * sem.adb: Minor reformatting.
68 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
69 identifiers on rewrite.
70 * par.adb: Minor comment updates.
71 * a-ngelfu.adb (Cos): Minor simplification.
72 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
73 and recovery for bad aspect.
74 * exp_ch3.adb: Code clean up.
75 * sem_util.ads: Minor comment correction.
76 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
77 * sem_ch3.adb: Code clean up.
78 * binderr.ads: Minor comment correction.
80 2014-07-31 Ed Schonberg <schonberg@adacore.com>
82 * exp_disp.adb (Expand_Interface_Conversion): A call whose
83 prefix is a static conversion to an interface type that is not
84 class-wide is not dispatching.
86 2014-07-31 Robert Dewar <dewar@adacore.com>
88 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
89 s-traceb-mastop.adb: Minor reformatting.
91 2014-07-31 Ed Schonberg <schonberg@adacore.com>
93 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
94 expansion, to handle properly visibility of selected components
97 2014-07-31 Robert Dewar <dewar@adacore.com>
99 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
100 * par-ch2.adb (P_Pragma): Set Inside_Depends.
101 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
102 Check_Unary_Plus_Or_Minus.
103 * scans.ads (Inside_Depends): New flag.
104 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
105 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
106 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
107 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
108 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
109 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
110 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
112 2014-07-31 Javier Miranda <miranda@adacore.com>
114 * s-vaflop.adb Move the body of function T_To_G before
115 T_To_D. Required for frontend inlining.
116 * inline.adb (Has_Excluded_Contract): New subprogram used to
117 check if a subprogram inlined by the frontend has contracts
118 which cannot be inlined.
120 2014-07-31 Bob Duff <duff@adacore.com>
122 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
123 (Call_Chain): Add 1 to number of frames to skip, to account for
124 the fact that there's one more frame on the stack.
125 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
127 2014-07-31 Robert Dewar <dewar@adacore.com>
129 * checks.adb (Enable_Overflow_Check): More precise setting of
130 Do_Overflow_Check flag for division.
132 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
134 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
135 array types with implementation type.
137 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
139 * sem_ch10.adb (Process_State): Remove local variable Name. Add
140 local variable Decl. Partially declare an abstract state by
141 generating an entity and storing it in the state declaration.
142 * sem_prag.adb (Create_Abstract_State): Fully declare a
143 semi-declared abstract state.
145 2014-07-31 Robert Dewar <dewar@adacore.com>
147 * prj-nmsc.adb: Minor reformatting.
149 2014-07-31 Bob Duff <duff@adacore.com>
151 * s-tasdeb.adb (System.Tasking.Debug): Remove
152 all usage of the secondary stack from this package.
154 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
156 * freeze.adb (Freeze_Expression): Update the loop in charge
157 of finding a proper insertion place for freeze nodes to handle
158 N_Expression_With_Actions nodes.
160 2014-07-31 Robert Dewar <dewar@adacore.com>
162 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
165 2014-07-31 Pascal Obry <obry@adacore.com>
167 * prj-nmsc.adb: Minor reformatting.
169 2014-07-31 Ed Schonberg <schonberg@adacore.com>
171 * sem_util.adb (Has_Preelaborable_Initialization): Check that
172 type is tagged before checking whether a user-defined Initialize
173 procedure is present.
175 2014-07-31 Gary Dismukes <dismukes@adacore.com>
177 * a-ngelfu.ads (Sqrt): Augment postcondition.
179 2014-07-31 Pascal Obry <obry@adacore.com>
181 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
182 directory and ALI directory must be different than all object
183 and library directories of aggregated projects.
185 2014-07-31 Vincent Celier <celier@adacore.com>
187 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
188 to package body, as it is not called from outside. Remove argument
189 Project_Tree, no longer used. When runtime cannot be found,
190 call Raise_Invalid_Config instead of failing the program.
192 2014-07-31 Robert Dewar <dewar@adacore.com>
194 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
196 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
199 2014-07-31 Robert Dewar <dewar@adacore.com>
201 * gnat_ugn.texi: Document new switch -gnato0.
202 * sem_ch3.ads: Minor reformatting.
203 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
204 (we do not want overflow checks when incrementing elaboration
206 * einfo.ads: Minor reformatting.
208 2014-07-31 Robert Dewar <dewar@adacore.com>
210 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
211 * s-arit64.adb: Minor reformatting.
213 2014-07-31 Robert Dewar <dewar@adacore.com>
215 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
216 checking is enabled except in GNAT_Mode.
217 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
218 (suppress overflow checks).
220 2014-07-31 Ed Schonberg <schonberg@adacore.com>
222 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
223 invariant procedure for an internally generated subtype that is
224 created for an object of a class-wide type.
226 2014-07-31 Vincent Celier <celier@adacore.com>
228 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
230 2014-07-31 Gary Dismukes <dismukes@adacore.com>
232 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
233 exp_disp.adb: Minor reformatting.
235 2014-07-31 Robert Dewar <dewar@adacore.com>
237 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
238 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
239 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
242 2014-07-31 Robert Dewar <dewar@adacore.com>
244 * sem_ch13.adb: Minor reformatting.
246 2014-07-31 Ed Schonberg <schonberg@adacore.com>
248 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
249 is an unchecked_union, warn that invariants will not be checked
250 on components that have them.
252 2014-07-31 Robert Dewar <dewar@adacore.com>
254 * freeze.adb (Freeze_Entity): Check for error of
255 Type_Invariant'Class applied to a untagged type.
256 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
257 as null body, so that we perform error checks even if expansion
260 2014-07-31 Ed Schonberg <schonberg@adacore.com>
262 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
263 is already present, nothing to do.
264 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
265 component, check whether the access type has an invariant before
266 checking the designated type.
267 (Build_Record_Invariant_Proc): Change suffix of generated
268 name to prevent ambiguity when record type has invariants
269 in addition to those of components, and two subprograms are
270 constructed. Consistent with handling of array types.
271 (Insert_Component_Invariant_Checks): Build invariant procedure
272 body when one has not been created yet, in the case of composite
273 types that are completions and whose full declarations carry
276 2014-07-30 Thomas Quinot <quinot@adacore.com>
278 * gnat_rm.texi: Minor doc fixes.
280 2014-07-30 Robert Dewar <dewar@adacore.com>
282 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
284 2014-07-30 Vincent Celier <celier@adacore.com>
286 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
288 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
289 message to report that a directory cannot be created, to avoid
290 processing of the directory path that may contains special
291 insertion characters.
293 2014-07-30 Ed Schonberg <schonberg@adacore.com>
295 * a-crdlli.ads: Place declaration of Empty_List after full type
296 declaration for Curosr, to prevent freezing error.
298 2014-07-30 Robert Dewar <dewar@adacore.com>
300 * get_targ.adb: Minor code reorganization.
301 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
304 2014-07-30 Ed Schonberg <schonberg@adacore.com>
306 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
307 not Program_Error, when attempting to remove an element not in
308 the set. This is the given semantics for all set containers.
310 2014-07-30 Ed Schonberg <schonberg@adacore.com>
312 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
313 element is not present in tree return rather than violating
314 an assertion. Constraint_Error will be raised in the caller if
315 element is not in the container.
317 2014-07-30 Arnaud Charlet <charlet@adacore.com>
319 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
320 (elab body): Add provision for default target config file.
321 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
323 2014-07-30 Ed Schonberg <schonberg@adacore.com>
325 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
326 when attempting to remove an element not in the set. This is
327 the given semantics for all set containers.
328 * a-cborse.adb (Delete): Attempt removal first, to check for
329 tampering, before checking whether this is an attempt to
330 delete a non-existing element, and in fthe latter case raise
333 2014-07-30 Vincent Celier <celier@adacore.com>
335 * prj-proc.adb (Recursive_Process): Do not create a new
336 Project_Id if the project is already in the list of projects of
339 2014-07-30 Ed Schonberg <schonberg@adacore.com>
341 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
342 whose type is an incomplete formal type.
343 (Analyze_Return_Type): Reject a return type that is an untagged
344 imcomplete formal type.
345 (Process_Formals): Reject a formal parameter whose type is an
346 untagged formal incomplete type.
347 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
348 an untagged formal incomplete type.
350 2014-07-30 Robert Dewar <dewar@adacore.com>
352 * gnat_ugn.texi: Minor spelling correction.
353 * makeutl.adb: Minor code reorganization.
354 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
356 2014-07-30 Robert Dewar <dewar@adacore.com>
358 * einfo.ads (Has_Unchecked_Union): Document that this is used
359 to check for illegal Valid_Scalars attribute references.
360 * exp_attr.adb (Build_Record_VS_Func): New function
361 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
363 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
364 Unchecked_Union Add note on 'Valid_Scalars generating a lot
366 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
367 error on attempt to apply Valid_Scalars to Unchecked_Union type.
369 2014-07-30 Steve Baird <baird@adacore.com>
371 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
372 of A(I..J)(K) in CodePeer_Mode.
374 2014-07-30 Ben Brosgol <brosgol@adacore.com>
376 * gnat_ugn.texi: Fix typo.
378 2014-07-30 Thomas Quinot <quinot@adacore.com>
380 * lib-writ.ads: document format change.
382 2014-07-30 Pascal Obry <obry@adacore.com>
384 * prj-util.adb (For_Interface_Sources): Do not
385 include sources from withed externally built projects.
387 2014-07-30 Robert Dewar <dewar@adacore.com>
389 * lib.adb: Minor reformatting.
390 * prj-util.adb: Minor reformatting.
392 2014-07-30 Ed Schonberg <schonberg@adacore.com>
394 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
395 that depends on discriminants, and which is given by an others
396 clause, create an explicit subtype with the discriminant values
397 of the enclosing aggregate, because the backend cannot otherwise
398 retrieve the actual bounds of the array.
400 2014-07-30 Fedor Rybin <frybin@adacore.com>
402 * gnat_ugn.texi: Improve gnattest documentation.
404 2014-07-30 Pascal Obry <obry@adacore.com>
406 * makeutl.adb (Insert_Project_Sources): Properly handle sources
407 that are aggregated. We want to include sources not only part
408 of libraries but also if part of an aggregated project from an
410 * prj.adb (For_Project_And_Aggregated_Context): Properly check
411 state of root project.
413 2014-07-30 Thomas Quinot <quinot@adacore.com>
415 * lib-load.ads: Minor reformatting.
416 * sinfo.ads (Library_Unit): Update comment.
417 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
418 is redundant. Instead used the pragma Node_Id directly as the
421 2014-07-30 Thomas Quinot <quinot@adacore.com>
423 * lib.adb (Store_Note): Store only notes that do not come from
424 an instance, and that are in the extended main source unit.
425 * lib-writ (Write_Unit_Information): Annotations from subunits
426 must be emitted along with those for the main unit, and they
427 must carry a specific file name.
428 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
429 Unit_Id for the source file containing the pragma, as in the
430 case of annotations from subunits we might not have a readily
432 * ali.adb (Scan_ALI): Account for above change in data structure.
434 2014-07-30 Vincent Celier <celier@adacore.com>
436 * makeutl.adb (Insert_Project_Sources): When the library project
437 is an aggregate Stand-Alone Library, insert in the queue the
438 Ada interface units, with Closure set to True;
440 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
442 * sem_util.adb: Fix minor typo.
443 * makeutl.adb: Minor reformatting.
445 2014-07-30 Robert Dewar <dewar@adacore.com>
447 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
449 2014-07-30 Yannick Moy <moy@adacore.com>
451 * checks.ads: Fix typo in comment.
453 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
455 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
456 entities that materialize range bounds, if any.
458 2014-07-30 Vincent Celier <celier@adacore.com>
460 * projects.texi: Minor spelling fix.
462 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
464 * checks.adb (Make_Bignum_Block): Use the new secondary stack
465 build routines to manage the mark.
466 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
467 Use the new secodary stack build routines to manage the mark.
468 (Insert_Actions_In_Scope_Around): Add new formal parameter
469 Manage_SS along with comment on its usage. Code and comment
470 reformatting. Mark and release the secondary stack when the
472 (Make_Transient_Block): Update the call
473 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
474 (Wrap_Transient_Declaration): Remove local variable
475 Uses_SS. Ensure that the secondary stack is marked and released
476 when the related object declaration appears in a library level
477 package or package body. Code and comment reformatting.
478 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
479 (Build_SS_Release_Call): New routine.
481 2014-07-30 Steve Baird <baird@adacore.com>
483 * exp_attr.adb: Revert previous change, not needed after all.
485 2014-07-30 Vincent Celier <celier@adacore.com>
487 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
488 Closure => True for interfaces of Stand-Alone Libraries.
489 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
490 Boolean component Closure, defaulted to False.
492 2014-07-30 Yannick Moy <moy@adacore.com>
494 * sem_res.adb: Fix typo in error message.
496 2014-07-30 Robert Dewar <dewar@adacore.com>
498 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
499 as name suffixes rather than L/H for subtype bounds.
500 * tbuild.ads: Minor comment improvements and fixes
501 (Make_External_Name): Document that suffix can start with an
504 2014-07-30 Bob Duff <duff@adacore.com>
506 * gnat_ugn.texi: Document --rep-clauses switch.
508 2014-07-30 Ed Schonberg <schonberg@adacore.com>
510 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
511 Default_Component_Value can only be specified for scalar type or
512 arrays of scalar types respectively. This legality check must
513 be performed at the point the aspect is analyzed, in order to
514 reject aspect specifications that apply to a partial view.
516 2014-07-30 Thomas Quinot <quinot@adacore.com>
518 * freeze.adb: Minor reformatting.
520 2014-07-30 Robert Dewar <dewar@adacore.com>
522 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
525 2014-07-30 Ed Schonberg <schonberg@adacore.com>
527 * freeze.adb (Check_Expression_Function): At the freeze point
528 of an expression function, verify that the expression in the
529 function does not contain references to any deferred constants
530 that have no completion yet.
531 (Freeze_Expression, Freeze_Before): call
532 Check_Expression_Function.
533 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
534 * a-ciorse.adb: Add Adjust and Finalize routines for
535 Reference_Control_Type. Use it in the construction of Reference
536 and Constant_Reference values.
538 2014-07-30 Robert Dewar <dewar@adacore.com>
540 * exp_aggr.adb: Update comments.
541 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
544 2014-07-30 Robert Dewar <dewar@adacore.com>
546 * cstand.adb (New_Standard_Entity): New version takes name
547 string to call Make_Name.
548 (Create_Standard): Use this routine to set name before setting other
551 2014-07-30 Robert Dewar <dewar@adacore.com>
553 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
555 (Expand_Attribute, case Last): Ditto.
556 * exp_ch3.adb (Constrain_Index): New calling sequence for
557 Process_Range_Expr_In_Decl.
558 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
560 * sem_ch3.adb (Constrain_Index): New calling sequence for
561 Process_Range_Expr_In_Decl.
562 (Set_Scalar_Range_For_Subtype): ditto.
563 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
565 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
566 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
567 types if we are not assuming no invalid values.
569 2014-07-30 Robert Dewar <dewar@adacore.com>
571 * clean.adb: Minor reformatting.
572 * opt.ads: Minor fix to incorrect comment.
574 2014-07-30 Ed Schonberg <schonberg@adacore.com>
576 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
577 subprogram, used by bounded hashed sets, to delete a node at
578 a given index, whose element may have been improperly updated
579 through a Reference_Preserving key.
580 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
581 * a-cbhase.adb: Add Adjust and Finalize routines for
582 Reference_Control_Type.
583 (Delete, Insert): Raise Program_Error, not Constraint_Error,
584 when operation is illegal.
585 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
586 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
587 private with_clause for Ada.Finalization.
588 * a-cbmutr.adb: Add Adjust and Finalize routines for
589 Reference_Control_Type. Use it in the construction of Reference
590 and Constant_Reference values.
592 2014-07-30 Robert Dewar <dewar@adacore.com>
594 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
596 2014-07-30 Pascal Obry <obry@adacore.com>
598 * clean.adb (Clean_Project): Properly check for directory
599 existence before trying to enter it.
601 2014-07-30 Robert Dewar <dewar@adacore.com>
603 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
605 2014-07-30 Robert Dewar <dewar@adacore.com>
607 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
608 missing semicolon after name.
610 2014-07-30 Pascal Obry <obry@adacore.com>
612 * prj.ads (Gprinstall_Flags): New constant.
613 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
614 missing library dir if Directories_Must_Exist_In_Projects
617 2014-07-30 Bob Duff <duff@adacore.com>
619 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
620 * s-traceb.ads: Updagte comments.
622 2014-07-30 Robert Dewar <dewar@adacore.com>
624 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
625 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
626 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
629 2014-07-30 Ed Schonberg <schonberg@adacore.com>
631 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
632 subprogram, used by all versions of hashed sets, to delete a node
633 whose element has been improperly updated through a Reference_
635 * a-cohase.adb: Remove Delete_Node, use new common procedure
636 Delete_Node_At_Index.
637 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
638 * a-cihase.adb: Add Adjust and Finalize routines for
639 Reference_Control_Type.
640 (Reference_Preserving_Key): Build aggregate for
641 Reference_Control_Type
643 2014-07-30 Yannick Moy <moy@adacore.com>
645 * checks.adb, checks.ads (Determine_Range_R): New procedure to
646 determine the possible range of a floating-point expression.
648 2014-07-30 Ed Schonberg <schonberg@adacore.com>
650 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
651 * a-cborse.adb: Add Adjust and Finalize routines for
652 Reference_Control_Type.
653 (Reference_Preserving_Key): Build aggregate for
654 Reference_Control_Type.
655 (Delete): Check for tampering, and raise Program_Error (not
656 Constraint_Error) when attempting to delete an element not in
660 2014-07-30 Bob Duff <duff@adacore.com>
662 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
663 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
664 Exception_Information is used to produce useful debugging
665 information for the programmer. However, it was also used to
666 implement the stream attributes for type Exception_Occurrence. The
667 latter requires a stable and portable interface, which meant
668 that we couldn't include a symbolic traceback. A separate set of
669 routines was used to provide symbolic tracebacks under program
670 control (i.e. not automatically). The goal of this ticket is
671 to provide such automatic tracebacks, so the change here is to
672 split the two functionalities: Exception_Information gives the
673 maximally useful information for debugging (i.e. it now includes
674 a symbolic traceback when a decorator is set, and it can be
675 improved freely in the future without disturbing streaming).
676 Untailored_Exception_Information always uses hexadecimal addresses
677 in the traceback, has a stable and portable output, and is now
680 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
682 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
683 on the target of the assignment to find out whether it
684 can be directly done by the back-end.
685 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
687 2014-07-30 Robert Dewar <dewar@adacore.com>
689 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
690 a-tasatt.adb: Minor reformatting.
692 2014-07-30 Robert Dewar <dewar@adacore.com>
694 * exp_ch4.adb: Minor reformatting.
696 2014-07-30 Ed Schonberg <schonberg@adacore.com>
698 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
699 Reference_Control_Type to generic package, to keep additional
700 information for Reference_Types that manipulate keys. Add Adjust and
701 Finalize procedures for this type.
702 (Finalize): When finalizing a reference_preserving_key, verify
703 that the key of the new value is equivalent to the key of the
704 original element, raise Program_Error otherwise.
705 (Insert): Detect tampering.
706 (Reference_Preserving_Key): Build proper Reference_Control_Type,
707 and update Busy and Lock bits to detect tampering.
708 * a-cohase.ads: Keep with-clause private.
710 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
712 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
713 of an equality are of an Unchecked_Union type and lack inferable
716 2014-07-30 Bob Duff <duff@adacore.com>
718 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
719 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
720 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
721 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
722 we can call them from the runtimes. Leave renamings in place under GNAT.
724 2014-07-30 Yannick Moy <moy@adacore.com>
726 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
727 inlining in GNATprove mode.
729 2014-07-30 Ed Schonberg <schonberg@adacore.com>
731 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
732 Reference_Control_Type to generic package, to keep additional
733 information for Reference_Types that manipulate keys. Add Adjust and
734 Finalize procedures for this type.
735 (Delete_Node): New procedure called when finalizing a
736 Reference_Control_Type, to remove a node whose element has been
737 improperly updated through a Reference.
738 (Insert): Detect tampering.
739 (Reference_Preserving_Key): Build proper Reference_Control_Type,
740 and update Busy and Lock bits to detect tampering.
742 2014-07-30 Bob Duff <duff@adacore.com>
744 * exp_intr.ads: Minor comment fix.
746 2014-07-30 Gary Dismukes <dismukes@adacore.com>
748 * exp_prag.adb, a-tags.ads: Minor typo fixes.
750 2014-07-30 Bob Duff <duff@adacore.com>
752 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
753 a-except.ads, g-traceb.adb, memtrack.adb,
754 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
755 Cleanup: Make the three versions of System.Traceback.Call_Chain
756 have the same interface. Use an array for the Traceback parameter
757 instead of an Address. This will enable reduction in code
760 2014-07-30 Pat Rogers <rogers@adacore.com>
762 * gnat_ugn.texi: Corrected minor textual error in description
765 2014-07-30 Bob Duff <duff@adacore.com>
767 * Makefile.rtl: Sort file names.
769 2014-07-30 Arnaud Charlet <charlet@adacore.com>
771 * a-tasatt.adb: Complete previous change: kill spurious warning
772 on e.g. sparc, and make sure we only use the fast path when the
773 alignment is compatible.
775 2014-07-30 Yannick Moy <moy@adacore.com>
777 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
780 2014-07-30 Yannick Moy <moy@adacore.com>
782 * inline.adb (Build_Body_To_Inline): Issue more precise messages
783 for declarations that prevent inlining.
784 (Cannot_Inline): Change usual start of message to refer to contextual
785 analysis in GNATprove mode.
786 * sem_res.adb (Resolve_Call): Change usual start of message to
787 refer to contextual analysis in GNATprove mode, when inlining
790 2014-07-30 Robert Dewar <dewar@adacore.com>
792 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
793 * inline.adb: Minor reformatting.
795 2014-07-30 Javier Miranda <miranda@adacore.com>
797 * a-tags.ads: Add comments.
799 2014-07-30 Pat Rogers <rogers@adacore.com>
801 * gnat_rm.texi: Minor word error.
803 2014-07-30 Ed Schonberg <schonberg@adacore.com>
805 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
806 created to capture the value of the prefix of 'Old at the
807 beginning of the current declarative part, to prevent data flow
808 anomalies in the postcondition procedure that will follow.
810 2014-07-30 Yannick Moy <moy@adacore.com>
812 * debug.adb: Retire debug flag -gnatdQ.
813 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
814 on decl, not on body. Ignore predicate functions.
815 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
816 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
817 body when generating a decl for a body on which SPARK_Mode aspect
819 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
820 attaching pragma to entity, to account for declaration not coming
822 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
823 as not always inlined in GNATprove mode, when called in an
826 2014-07-30 Vincent Celier <celier@adacore.com>
828 * debug.adb: Minor comment update.
830 2014-07-30 Robert Dewar <dewar@adacore.com>
832 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
833 * sprint.adb (Sprint_Node): Handle N_Contract case.
834 * exp_prag.adb: Minor reformatting.
835 * freeze.adb (Freeze_Entity): Check useless postcondition for
836 No_Return subprogram.
837 * sem_prag.adb: Minor reformatting.
839 2014-07-30 Javier Miranda <miranda@adacore.com>
841 * a-tags.ads: Complete comments about performance.
843 2014-07-30 Fedor Rybin <frybin@adacore.com>
845 * gnat_ugn.texi: Adding description for --exit-status option to
846 gnattest section. Fixing index entry of --passed-tests option
849 2014-07-30 Javier Miranda <miranda@adacore.com>
851 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
852 rtsfind.ads: Remove references to package Interfaces.CPP since this
853 package is no longer needed.
855 2014-07-30 Bob Duff <duff@adacore.com>
857 * s-taasde.adb (Timer_Queue): Don't use a
858 build-in-place function call to initialize the Timer_Queue.
859 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
860 Turn off polling in these units, because otherwise we get
861 elaboration circularities with Ada.Exceptions when the -gnatP
863 * s-tassta.adb (Create_Task): Make sure independent tasks
864 are created with Parent = Environment_Task. This was not true,
865 for example, in s-interr.adb, when Interrupt_Manager does "new
866 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
867 which is wrong because the master is determined by the access
868 type, which is at library level.
869 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
870 now set correctly by Create_Task.
871 (Make_Passive): Remove the workaround for the race condition in
873 * frontend.adb (Frontend): Revert to previous method of detecting
874 temporary configuration pragma files, recognizing such files by
875 ".tmp" in the name. This is more general than detecting pragmas
876 Source_File_Name_Project, because it allows any tool to use
877 this naming convention, no matter the content of the file.
878 * gnat_ugn.texi: Document this naming convention.
880 2014-07-30 Robert Dewar <dewar@adacore.com>
882 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
883 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
884 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
885 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
886 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
889 2014-07-30 Ed Schonberg <schonberg@adacore.com>
891 * sem_ch5.adb: Improve error recovery.
892 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
893 before analyzing the body, so that in GNATprove mode there is
894 no light expansion. Whatever expansion is required by SPARK will
895 be performed when analysing the inlined code.
897 2014-07-30 Bob Duff <duff@adacore.com>
899 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
901 2014-07-30 Ed Schonberg <schonberg@adacore.com>
903 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
904 verify that it is not hidden by an inner implicit declaration.
906 2014-07-30 Thomas Quinot <quinot@adacore.com>
908 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
909 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
910 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
911 the call returns an unconstrained type: in this case there is
912 already a transient scope, and we should not establish a new one.
913 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
914 True, also insert cleanup actions in the tree.
915 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
918 2014-07-30 Arnaud Charlet <charlet@adacore.com>
920 * s-taskin.ads (Direct_Index, Direct_Index_Range,
921 Direct_Attribute_Element, Direct_Attribute_Array,
922 Direct_Index_Vector, Direct_Attributes, Is_Defined,
923 Indirect_Attributes): Removed. (Atomic_Address,
924 Attribute_Array, Attributes): New.
925 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
926 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
927 (Finalize_Attributes): Reimplement.
928 * s-tassta.adb (Create_Task): Remove call to
929 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
930 Replace Finalize_Attributes_Link by Finalize_Attributes.
931 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
932 Reimplement from scratch, using a simpler and more efficient
934 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
935 * s-parame.ads, s-parame-hpux.ads,
936 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
937 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
938 Default_Attribute_Count.
940 2014-07-30 Olivier Hainque <hainque@adacore.com>
942 * vxworks-ppc-link.spec: New file. Extra link
943 instructions for ppc-vxworks.
944 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
945 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
946 * system-vxworks-arm.ads: Likewise.
947 * gcc-interface/Makefile.in: Enable .spec files.
949 2014-07-30 Ed Schonberg <schonberg@adacore.com>
951 * sem_aggr.adb: Minor comment reformatting.
953 2014-07-30 Robert Dewar <dewar@adacore.com>
955 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
956 * sem_warn.adb (Has_Junk_Name): New function
957 (Check_References): Use Has_Junk_Name to delete junk warnings
958 (Check_Unset_Reference): ditto.
959 (Warn_On_Unreferenced_Entity): ditto.
960 (Warn_On_Useless_Assignment): ditto.
962 2014-07-30 Ed Schonberg <schonberg@adacore.com>
964 * checks.adb (Insert_Valid_Check): Do not check for the packed
965 array type of a prefix that is an access type.
967 2014-07-30 Ed Schonberg <schonberg@adacore.com>
969 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
970 Unconstrained_Array even if prefix is not frozen yet, as can
971 occur with a private subtype used as a generic actual.
973 2014-07-30 Gary Dismukes <dismukes@adacore.com>
975 * sem_attr.adb: Minor reformatting.
977 2014-07-30 Pat Rogers <rogers@adacore.com>
979 * gnat_rm.texi: Corrected minor wording error in description
980 of No_Exception_Registration.
982 2014-07-30 Yannick Moy <moy@adacore.com>
984 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
985 mode. Realphabetize two subprograms.
986 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
987 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
988 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
990 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
991 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
992 Is_Inline in GNATprove mode.
993 (Analyze_Subprogram_Specification):
994 Set Is_Inlined_Always at subprogram entity creation.
995 * sem_res.adb (Resolve_Call): Do not deal with inlining during
996 pre-analysis. Issue warning on call to possibly inlined
997 subprogram when body not seen.
999 2014-07-30 Yannick Moy <moy@adacore.com>
1001 * lib-xref.adb (Generate_Reference): Add special
1002 case for compiler-generated formals in GNATprove mode.
1004 2014-07-30 Yannick Moy <moy@adacore.com>
1006 * sem_ch6.adb: Add comments.
1008 2014-07-30 Thomas Quinot <quinot@adacore.com>
1010 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
1012 2014-07-30 Robert Dewar <dewar@adacore.com>
1014 * sem_aggr.adb, sem_res.adb: Minor reformatting.
1016 2014-07-30 Thomas Quinot <quinot@adacore.com>
1018 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1019 Bit_Order): Set Reverse_Bit_Order on the base type of the
1020 specified first subtype.
1022 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1024 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
1025 to capture the value of actuals of a limited type rather than
1026 an object declaration, to prevent spurious errors when analyzing
1029 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1031 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
1032 as an instance, and inhibit semantic checks on already analyzed
1033 code to prevent spurious errors.
1035 2014-07-30 Arnaud Charlet <charlet@adacore.com>
1037 * a-exctra.ads ("="): New function, to restore compatibility.
1039 2014-07-30 Pascal Obry <obry@adacore.com>
1041 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
1042 routine to use the OS dst setting.
1044 2014-07-30 Pat Rogers <rogers@adacore.com>
1046 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
1048 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1050 * sem_util.adb (Wrong_Type): Disable some checks equally within
1051 instances and within inlined bodies, to suppress spurious type
1052 errors on already analyzed code.
1053 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
1054 is legal in an inlined body, juts as it is in an instance body.
1056 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1058 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
1059 body the operand of an unchecked conversion may be a literal, in
1060 which case its type is the target type of the conversion. This
1061 is in contrast to conversions in other contexts, where the
1062 operand cannot be a literal and must be resolvable independent
1065 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
1067 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
1068 mere scalar constant instead of a reference for a renaming of
1070 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
1071 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
1073 2014-07-30 Robert Dewar <dewar@adacore.com>
1075 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
1076 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
1077 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
1078 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
1079 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
1080 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
1081 & code reorganization.
1083 2014-07-30 Bob Duff <duff@adacore.com>
1085 * s-tassta.adb, sem_util.ads: Minor reformatting.
1087 2014-07-30 Yannick Moy <moy@adacore.com>
1089 * inline.adb (Build_Body_To_Inline): Detect when
1090 subprogram has multiple returns, or not a single last return
1091 statement, in GNATprove mode.
1092 (Cannot_Inline): Simplify logic to handle case of GNATprove
1095 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1097 * sem_ch6.adb: Stubs are not subject to inlining.
1099 2014-07-30 Bob Duff <duff@adacore.com>
1101 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
1102 from a procedure to a function, so that it can more easily be
1103 called before the "begin" of a task.
1104 * s-taasde.ads (Delay_Block): Make this type immutably limited,
1105 so we can use a build-in-place function call to initialize
1106 Timer_Queue in the body.
1107 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
1108 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
1109 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
1110 Make_Independent before reaching its "begin", to avoid race
1111 conditions. This causes the activating task to wait until after
1112 Make_Independent is complete before proceeding. In addition,
1113 we initialize data structures used by independent tasks before
1114 activating those tasks, to avoid possible use of uninitialized data.
1115 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
1116 Minor comment fixes.
1118 2014-07-30 Bob Duff <duff@adacore.com>
1120 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
1121 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
1122 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
1123 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
1124 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
1126 2014-07-30 Arnaud Charlet <charlet@adacore.com>
1128 * a-tasatt.adb: Remove old comments.
1130 2014-07-30 Yannick Moy <moy@adacore.com>
1132 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
1133 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
1134 to explain rationale for inlining or not in GNATprove mode.
1135 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
1136 to False when inlining is not possible.
1137 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
1138 flag to indicate that subprogram is fully inlined. To be reversed
1139 if inlining problem is found.
1140 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
1141 call in potentially unevaluated context.
1143 2014-07-30 Jose Ruiz <ruiz@adacore.com>
1145 * s-tarest.adb, s-tarest.ads: Fix comments.
1147 2014-07-30 Robert Dewar <dewar@adacore.com>
1149 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
1150 Change No_Scalar_Parts predicate to Scalar_Part_Present and
1151 invert sense of test. This avoids the "not No_xxx" situation
1152 which is always ugly.
1154 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1156 * inline.adb (Expand_Inlined_Call): When generating code for
1157 an internal subprogram the expansion uses the location of the
1158 call, so that gdb can skip over it. In GNATprove mode we want to
1159 preserve slocs of original subprogram when expanding an inlined
1160 call, to obtain better warnings, even though subprogram appears
1161 not to come from source if it is the inlining of a subprogram
1162 body without a previous spec.
1164 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1166 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
1167 types with atomic components.
1169 2014-07-30 Thomas Quinot <quinot@adacore.com>
1171 * Make-generated.in: Remove now unnecessary targets after s-oscons
1174 2014-07-30 Yannick Moy <moy@adacore.com>
1176 * sem_res.adb (Resolve_Call): Use ultimate alias
1177 of callee when available.
1179 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1181 * sem_ch6.adb (Analyze_Expression_Function): To check whether
1182 an expression function is a completion, use the specification of
1183 the previous declaration, not its entity, which may be internally
1184 generated in an inlined context.
1186 2014-07-30 Doug Rupp <rupp@adacore.com>
1188 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
1189 temp files in /cache directory unless overridden by TMPDIR.
1191 2014-07-30 Jose Ruiz <ruiz@adacore.com>
1193 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
1194 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
1195 type CPU, so it can never be greater than CPU_Range'Last.
1197 2014-07-30 Bob Duff <duff@adacore.com>
1199 * s-taskin.ads: Minor comment fix.
1201 2014-07-30 Thomas Quinot <quinot@adacore.com>
1203 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
1206 2014-07-30 Yannick Moy <moy@adacore.com>
1208 * debug.adb: Free debug flag dQ used for frontend inlining in
1210 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
1213 2014-07-30 Thomas Quinot <quinot@adacore.com>
1215 * Make-generated.in: Remove generation of s-oscons.ads, only
1216 generate the xoscons utility, in runtime-agnostic rules.
1217 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
1218 no longer supported.
1220 2014-07-30 Bob Duff <duff@adacore.com>
1222 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
1223 parameter Chain to be used in the allocator case.
1224 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
1225 has tasks, wrap the code in a block that will activate them,
1226 including the usual finalization code to kill them off in case
1227 of exception or abort.
1229 2014-07-30 Robert Dewar <dewar@adacore.com>
1231 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
1232 Remove renamings (don't work for gdb).
1233 (par): New synonym for p (avoid gdb ambiguities).
1234 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
1236 2014-07-30 Bob Duff <duff@adacore.com>
1238 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
1240 * treepr.ads, treepr.adb (ppp): Make this debugging routine
1241 accept any type covered by Union_Id.
1243 2014-07-30 Robert Dewar <dewar@adacore.com>
1245 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
1247 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
1250 2014-07-30 Robert Dewar <dewar@adacore.com>
1252 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
1253 of predicate aspect on entity other than a type.
1255 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1257 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
1258 when a subprogram body without a previous spec cannot be inlined
1259 in GNATprove mode, because it includes aspects or pragmas that
1260 generate a SPARK contract clause.
1261 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
1262 instance cannot be inlined.
1264 2014-07-30 Robert Dewar <dewar@adacore.com>
1266 * debug.adb: Document that d7 suppresses compilation time output.
1267 * errout.adb (Write_Header): Include compilation time in
1269 * exp_intr.adb (Expand_Intrinsic_Call): Add
1270 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
1271 Compilation_Date/Compilation_Time.
1272 * g-souinf.ads (Compilation_Date): New function
1273 (Compilation_Time): New function.
1274 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
1275 * gnat_rm.texi (Compilation_Date): New function
1276 (Compilation_Time): New function.
1277 * opt.ads (Compilation_Time): New variable.
1278 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
1279 * sem_intr.adb (Compilation_Date): New function.
1280 (Compilation_Time): New function.
1281 * snames.ads-tmpl (Name_Compilation_Date): New entry.
1282 (Name_Compilation_Time): New entry.
1284 2014-07-30 Yannick Moy <moy@adacore.com>
1286 * inline.adb: Add comment.
1288 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1290 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
1291 parameterless attribute, and a postondition can mention an
1292 indexed component or a slice whose prefix is an attribute
1295 2014-07-30 Robert Dewar <dewar@adacore.com>
1297 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
1298 Avoid bomb when printing package Standard.
1300 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1302 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
1303 entity is created at this point, ensure that the name of the
1304 flag is unique, because the subprogram may be overloaded and
1305 other homonyms may also have elaboration flags created on the fly.
1307 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1309 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
1310 (Analyze_Attribute): Major cleanup of attribute
1311 'Update. The logic is now split into two distinct routines
1312 depending on the type of the prefix. The use of <> is now illegal
1313 in attribute 'Update.
1314 (Analyze_Record_Component_Update): New routine.
1315 (Check_Component_Reference): Removed.
1316 (Resolve_Attribute): Remove the return statement and ??? comment
1317 following the processing for attribute 'Update. As a result,
1318 the attribute now freezes its prefix.
1320 2014-07-30 Javier Miranda <miranda@adacore.com>
1322 * exp_ch4.adb (Apply_Accessibility_Check): Do
1323 not call Base_Address() in VM targets.
1325 2014-07-30 Yannick Moy <moy@adacore.com>
1327 * gnat1drv.adb (Adjust_Global_Switches): Set
1328 Ineffective_Inline_Warnings to True in GNATprove mode.
1329 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
1331 * opt.ads (Ineffective_Inline_Warnings): Add comment that
1332 describes use in GNATprove mode.
1333 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
1334 pragma when applied to the special body created for inlining.
1336 2014-07-30 Robert Dewar <dewar@adacore.com>
1338 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
1341 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1343 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
1344 not delayed. Update the delay status of most SPARK 2014 aspects.
1345 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
1346 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
1347 to Decorate and Insert_Pragma. Add various comments concerning
1348 the delay status of several SPARK 2014 aspects. The insertion
1349 of Refined_State now uses routine Insert_After_SPARK_Mode.
1350 (Decorate): New routine.
1351 (Decorate_Aspect_And_Pragma): Removed.
1352 (Insert_Delayed_Pragma): Removed.
1353 (Insert_Pragma): New routine.
1355 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1357 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
1358 only a warning, not an error on an attempt to inline a recursive
1361 2014-07-30 Robert Dewar <dewar@adacore.com>
1363 * g-forstr.adb: Minor code reorganization (use J rather than I
1364 as a variable name).
1365 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
1366 g-forstr.ads: Minor reformatting.
1368 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1370 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
1371 we are debugging the generated code.
1373 2014-07-30 Yannick Moy <moy@adacore.com>
1375 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
1376 returns True for source pointer for an inlined body.
1378 2014-07-30 Javier Miranda <miranda@adacore.com>
1380 * exp_ch4.adb (Apply_Accessibility_Check): Add
1381 missing calls to Base_Address().
1383 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1385 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
1386 mode, subprogram bodies without a previous declaration are also
1387 candidates for front-end inlining.
1389 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1391 * aspects.ads Aspects Async_Readers, Async_Writers,
1392 Effective_Reads and Effective_Writes do not need to be delayed.
1393 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
1394 optional Boolean expression when generating the corresponding
1395 pragma for an external property aspect.
1396 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
1397 local constant Obj. Add local constant Obj_Id. Reimplement the
1398 check which ensures that the related variable is in fact volatile.
1399 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
1400 * sem_util.adb (Is_Enabled): New routine.
1401 (Variable_Has_Enabled_Property): Reimplement the detection of
1402 an enabled external property.
1404 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
1406 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
1409 2014-07-30 Pascal Obry <obry@adacore.com>
1411 * g-forstr.adb, g-forstr.ads: New.
1412 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
1413 GNAT.Formatted_String.
1415 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
1417 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
1418 (Expand_Array_Aggregate): Also enable in-place expansion for
1419 code generated by the compiler. For an object declaration,
1420 set the kind of the object in addition to its type. If an
1421 in-place assignment is to be generated and it can be directly
1422 done by the back-end, do not expand the aggregate.
1423 * fe.h (Is_Others_Aggregate): Declare.
1424 * gcc-interface/trans.c
1425 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
1426 aggregate with a single Others choice on the RHS by means of
1427 __builtin_memset. Tidy up.
1429 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1431 * gnat_rm.texi: minor reformatting.
1433 2014-07-30 Yannick Moy <moy@adacore.com>
1435 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
1438 2014-07-30 Robert Dewar <dewar@adacore.com>
1440 * gnat_rm.texi: Document additional implementation-defined use
1443 2014-07-30 Robert Dewar <dewar@adacore.com>
1445 * prj-proc.adb, prj-strt.adb: Update comments.
1447 2014-07-30 Gary Dismukes <dismukes@adacore.com>
1449 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
1451 2014-07-30 Vincent Celier <celier@adacore.com>
1453 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
1454 parameter No_Extending, defaulted to False. When No_Extending
1455 is True, do not look for an extending project.
1456 (Expression): For a variable reference that is not for the current
1457 project, get its Id calling Imported_Or_Extended_Project_From
1458 with No_Extending set to True.
1459 * prj-strt.adb (Parse_Variable_Reference): If a referenced
1460 variable is not found in the current project, check if it is
1461 defined in one of the projects it extends.
1463 2014-07-30 Robert Dewar <dewar@adacore.com>
1465 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
1466 some additional cases of internally generated routines.
1468 2014-07-30 Ed Schonberg <schonberg@adacore.com>
1470 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
1471 if the compilation unit is a subunit, extend optional processing
1472 to all subunits of the current one. This allows gnatstub to
1473 supress generation of spurious bodies.
1475 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
1477 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
1478 track of the initial element's index within the tree.
1480 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1482 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
1483 (Insert_Child): Add local variable First. Capture the index of the
1484 first node being created to ensure correct cursor construction
1485 later on. Use the three parameter version of Allocate_Node
1486 when creating multiple children as this method allows aspect
1487 Default_Value to take effect (if applicable).
1489 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
1491 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
1492 (Expand_Array_Aggregate): For a safe slice assignment, just set
1493 the target and use the common code path.
1495 2014-07-29 Robert Dewar <dewar@adacore.com>
1497 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
1498 predicate No_Predicate_Test_On_Arguments, new name is
1499 Predicate_Tests_On_Arguments (with the opposite sense).
1501 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1503 * sem_attr.adb (Resolve_Attribute): Clean up the code for
1504 attribute 'Access. Do not generate an elaboration flag for a
1505 stand alone expression function. The expression of an expression
1506 function is now frozen when the expression function appears as
1507 the prefix of attribute 'Access.
1508 * sem_ch6.adb (Analyze_Expression_Function): Remove local
1509 variable New_Decl and update all references to it after the
1510 rewriting has taken place. Establish the linkages between the
1511 generated spec and body.
1513 2014-07-29 Robert Dewar <dewar@adacore.com>
1515 * sem_prag.adb (ip, rv): Prevent from being optimized away.
1516 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
1517 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
1520 2014-07-29 Vincent Celier <celier@adacore.com>
1522 * prj-pp.adb: Minor comment update.
1523 * frontend.adb: If a target dependency info file has been read
1524 through switch -gnateT= add it to the dependencies of the source
1527 2014-07-29 Robert Dewar <dewar@adacore.com>
1529 * sem_ch3.adb, prj.adb: Minor reformatting.
1531 2014-07-29 Vincent Celier <celier@adacore.com>
1533 * prj-pp.adb (Pretty_Print.Output_Project_File): New
1534 procedure to output project file names between quotes without
1535 concatenation, even if the line is too long.
1536 (Pretty_Print): Use Output_Project_File for project being extended and
1539 2014-07-29 Vincent Celier <celier@adacore.com>
1541 * gnat_ugn.texi: Document that configuration pragmas files are
1542 added to the dependencies, unless they contain only pragmas
1543 Source_File_Name_Project.
1545 2014-07-29 Robert Dewar <dewar@adacore.com>
1547 * frontend.adb: Minor reformatting.
1549 2014-07-29 Robert Dewar <dewar@adacore.com>
1551 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
1552 (Expand_Actuals): Make sure predicate checks are properly applied
1553 for the case of OUT or IN OUT parameters.
1554 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
1555 predicate tests on arguments for Finalize
1556 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
1557 if predicate tests on subprogram arguments should be skipped.
1558 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
1560 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1562 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
1563 clause for the object and the expression is an aggregate, defer
1564 resolution and expansion of the aggregate until the freeze point
1566 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
1567 the parent node is an N_Reference generated during expansion.
1569 2014-07-29 Vincent Celier <celier@adacore.com>
1571 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
1573 2014-07-29 Robert Dewar <dewar@adacore.com>
1575 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
1576 prepcomp.ads: Minor reformatting and code clean up.
1577 * exp_ch6.adb (Expand_Actuals): Generate predicate test
1578 unconditionally for case of OUT or IN OUT actual (before this
1579 was generated only for certain subcases, which is wrong, the
1580 test is always needed).
1582 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1584 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
1585 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
1586 until context type is available.
1587 * sem_res.adb (Resolve_Allocator): In the case of a qualified
1588 expression, complete resolution of expression.
1589 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
1590 to apply Ada2012 checks on aliased formals, as well as
1591 accesibility checks when the context of the call is an allocator
1592 or a qualified expression.
1593 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
1594 Moved here from sem_ch3.
1595 (Object_Access_Level): Handle properly aliased formals and
1597 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
1598 now properly performed in sem_res (Resolve_Actuals,
1599 Check_Aliased_Parameter).
1601 2014-07-29 Yannick Moy <moy@adacore.com>
1603 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
1604 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
1605 function to decide when a subprogram can be inlined in GNATprove mode.
1606 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
1607 condition for possible inlining.
1608 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
1609 for Inline_Always in GNATprove mode.
1610 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
1611 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
1612 * sem_prag.adb Minor change in comments.
1613 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
1614 inside subprograms marked as SPARK_Mode On.
1615 * sinfo.ads: Minor typo fix.
1617 2014-07-29 Vincent Celier <celier@adacore.com>
1619 * frontend.adb: Add dependency on gnat.adc when taken into account
1620 and on non-temporary configuration pragmas files specified in
1622 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
1623 dependencies on configuration pragmas files.
1625 2014-07-29 Pat Rogers <rogers@adacore.com>
1627 * gnat_ugn.texi: Minor clarification to the explanation for the
1630 2014-07-29 Robert Dewar <dewar@adacore.com>
1632 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
1633 documentation that explains the need for this extended range
1634 (use by C_Pass_By_Copy).
1636 2014-07-29 Robert Dewar <dewar@adacore.com>
1638 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
1640 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
1642 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
1645 2014-07-29 Thomas Quinot <quinot@adacore.com>
1648 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
1649 CRTSCTS to be visible.
1651 2014-07-29 Bob Duff <duff@adacore.com>
1653 * g-trasym.adb, g-trasym.ads: Code cleanup.
1655 2014-07-29 Doug Rupp <rupp@adacore.com>
1657 * sigtramp-vxworks.c: Minor reformatting.
1659 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1661 * gnat_rm.texi: No doc needed for Ada2012 aspect
1662 Implicit_dereference.
1664 2014-07-29 Robert Dewar <dewar@adacore.com>
1666 * sem_attr.adb (Attribute_12): New array
1667 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
1668 (Check_Ada_2012_Attribute): Removed.
1670 2014-07-29 Doug Rupp <rupp@adacore.com>
1672 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
1674 * sigtramp-vxworks.c: New file.
1675 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
1677 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1679 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
1680 derived array type, add information about component type, which
1681 was previously missing in ali file.
1682 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
1684 2014-07-29 Thomas Quinot <quinot@adacore.com>
1686 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
1687 of the subtype created for a record component, do not mark
1688 the subtype as frozen. For one thing, this is anomalous (in
1689 particular, the base type might not itself be frozen yet);
1690 furthermore, proper freezing of the subtype must happen in any
1691 case. So, we just mark the subtype as requiring delayed freezing
1692 (and we'll actually freeze it when generating the init_proc of
1693 the enclosing record).
1694 Also change the name of the constrained record subtype (append a
1695 'C' so that it is clearly different from the unconstrained record
1696 type, "related_idV") to make debugging easier.
1697 (Process_Full_View): When creating a full subtype for a pending
1698 private subtype, re-establish the scope of the private subtype
1699 so that we get proper visibility on outer discriminants.
1700 * exp_ch3.adb (Build_Init_Statements): Freeze any component
1701 subtype that is not frozen yet.
1703 2014-07-29 Vincent Celier <celier@adacore.com>
1705 * prj-proc.adb (Recursive_Process): Always initialize the
1706 environment when the project is an aggregate project, even when
1707 it is not the root tree.
1708 2014-07-29 Robert Dewar <dewar@adacore.com>
1710 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
1711 * gnat_rm.texi: Complete list of implementation aspects.
1712 * aspects.ads: Minor comment clarification.
1714 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1716 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
1717 is a null-excluding access type, do not generate a constraint
1718 check if Suppress_Assignment_Checks is set on assignment node.
1719 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
1720 parameter of a null-excluding access type, there is access check
1721 on entry, so set Suppress_Assignment_Checks on generated statement
1722 that assigns actual to parameter block.
1723 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
1725 2014-07-29 Robert Dewar <dewar@adacore.com>
1727 * gnat_rm.texi: Change theta to @ in documentation of aspect
1730 2014-07-29 Robert Dewar <dewar@adacore.com>
1732 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
1734 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
1736 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
1737 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
1739 2014-07-29 Javier Miranda <miranda@adacore.com>
1741 * types.ads Update documentation on how to add new reason codes
1743 (RT_Exception_Code): Keep values ordered by their
1744 reason code. Required by the .NET backend.
1745 (RT_CE_Exceptions): Subtype declaration removed.
1746 (RT_PE_Exceptions): Subtype declaration removed.
1747 (RT_SE_Exceptions): Subtype declaration removed.
1748 (Kind): New mapping table of RT_Exception_Codes.
1749 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
1751 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
1752 mapping table. (Make_Raise_Program_Error): Updated to use the
1754 (Make_Raise_Storage_Error): Updated to use the new mapping table.
1755 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
1758 2014-07-29 Thomas Quinot <quinot@adacore.com>
1760 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
1761 distributed stubs generation.
1762 * exp_ch3.adb: Minor reformatting.
1764 2014-07-29 Yannick Moy <moy@adacore.com>
1766 * sinfo.ads: Document constraint between frontend and GNATprove.
1768 2014-07-29 Robert Dewar <dewar@adacore.com>
1770 * a-except.adb: Minor comment clarification.
1772 2014-07-29 Robert Dewar <dewar@adacore.com>
1774 * gnat_rm.texi: Complete list of implementation attributes.
1775 * snames.ads-tmpl: Clean up list of impl-defined attributes.
1777 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1779 * freeze.adb (Freeze_Record_Type): Perform various
1780 volatility-related checks.
1782 2014-07-29 Robert Dewar <dewar@adacore.com>
1784 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
1786 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1788 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
1789 the case where the attribute reference appears in a nested scope
1790 from that of the subprogram prefix.
1791 * sem_attr.adb: Minor reformatting.
1793 2014-07-29 Robert Dewar <dewar@adacore.com>
1795 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
1796 initialization options.
1798 2014-07-29 Robert Dewar <dewar@adacore.com>
1800 * sinfo.ads: Minor comment addition.
1802 2014-07-29 Bob Duff <duff@adacore.com>
1804 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
1806 2014-07-29 Doug Rupp <rupp@adacore.com>
1808 * init.c: Complete previous change.
1810 2014-07-29 Robert Dewar <dewar@adacore.com>
1812 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
1815 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1817 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
1818 and the completion will appear in the same declarative part,
1819 create elaboration flag.
1820 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
1821 is a completion of a declaration in the same declarative part,
1822 and the subprogram has had its address taken, add elaboration
1823 check inside the subprogram body, to detect elaboration errors
1824 that may occur through indirect calls.
1826 2014-07-29 Doug Rupp <rupp@adacore.com>
1828 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
1829 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
1831 2014-07-29 Vincent Celier <celier@adacore.com>
1833 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
1834 runtime directorie specified with two switches --RTS= designate
1835 the same directory, even when there are no literarily the same.
1837 2014-07-29 Robert Dewar <dewar@adacore.com>
1839 * gnat_ugn.texi: Minor documentation clarification.
1840 * switch-c.adb: Minor reformatting.
1842 2014-07-29 Robert Dewar <dewar@adacore.com>
1844 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
1845 Fix incorrect RTE call which caused bomb if pragma was in
1846 configuration pragma file.
1848 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
1850 * expect.c (__gnat_expect_poll): Fix typo in previous change.
1851 * g-expect.adb: Update comments.
1853 2014-07-29 Arnaud Charlet <charlet@adacore.com>
1855 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
1856 (Default_Attribute_Count): Bump to 16 on native platforms.
1858 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1860 * sem_res.adb: Add guard to front-end inlining for SPARK.
1862 2014-07-29 Robert Dewar <dewar@adacore.com>
1864 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
1867 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1869 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
1870 inline in GNATprove mode when subprogran is marked Inline_Always.
1871 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
1872 mode if body to inline is available.
1873 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
1874 effective in GNATprove mode.
1875 * sem_ch10.adb (Analyze_Compilation_Unit): Call
1876 Check_Package_Body_For_Inlining in GNATprove mode, so that body
1877 containing subprograms with Inline_Always can be available before
1880 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1882 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
1883 to Check_Package_Body_For_Inlining, to prevent confusion with other
1884 inlining subprograms.
1886 2014-07-29 Robert Dewar <dewar@adacore.com>
1888 * opt.ads: Minor comment update.
1889 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
1890 we want setting of Uneval_Old at time of encountering the aspect.
1891 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
1893 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
1894 New function (Set_Uneval_Old_Accept): New procedure.
1895 (Set_Uneval_Old_Warn): New procedure.
1896 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
1898 2014-07-29 Robert Dewar <dewar@adacore.com>
1900 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
1901 * snames.ads-tmpl: Minor reformatting.
1902 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
1903 to give <Error>. Not clear why this was there, but the compiler
1904 sources do not reference Name_Error, and this interfered with
1905 the circuits for pragma Unevaluated_Use_Of_Old.
1907 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1909 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
1910 types in SPARK 2014 (again).
1911 * sem_res.adb (Is_OK_Volatile_Context): New routine.
1912 (Resolve_Entity_Name): Ensure that a volatile object with
1913 enabled properties Async_Writers or Effectire_Reads appears in
1914 a non-interfering context.
1916 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1918 * sem_ch6.adb: Move Build_Body_To_Inline,
1919 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
1920 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
1921 * inline.ads, inline.adb: Package now contains subprograms that
1922 implement front-end inlining. No functional changes, no test
1925 2014-07-29 Robert Dewar <dewar@adacore.com>
1927 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
1929 2014-07-29 Ed Schonberg <schonberg@adacore.com>
1931 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
1932 is a limited view when the context is a package body, because
1933 there is no subsequent place at which the non-limited view may
1935 (Process_Formals): Ditto.
1936 * sinfo.ads, par-ch3.adb: Minor reformatting.
1938 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
1940 * expect.c (__gnat_expect_poll): New parameter dead_process
1941 used to return the dead process among the array of file
1942 descriptors. The Windows, VMS and HPUX implementations now
1943 properly report the dead process via this parameter. Other unixes
1945 * g-expect.adb (Poll): Adapt to the C profile.
1946 (Expect_Internal): Use the new parameter to properly close the
1947 File Descriptor. This then can be properly reported by the
1948 function First_Dead_Process as is expected.
1950 2014-07-29 Robert Dewar <dewar@adacore.com>
1952 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
1954 2014-07-29 Robert Dewar <dewar@adacore.com>
1956 * einfo.adb (Derived_Type_Link): New function
1957 (Set_Derived_Type_Link): New procedure.
1958 (Write_Field31_Name): Output Derived_Type_Link.
1959 * einfo.ads: New field Derived_Type_Link.
1960 * exp_ch6.adb (Expand_Call): Warn if change of representation
1962 * sem_ch13.adb: Minor addition of ??? comment.
1963 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
1964 expensive implicit conversion.
1965 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
1967 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
1969 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
1970 to DF_Id. Add new local variable DF_Call. Do not perform any
1971 elaboration-related checks on the call to the partial finalization
1972 routine within an init proc to avoid generating bogus elaboration
1973 warnings on expansion-related code.
1974 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
1975 the top level of the routine. Ensure that Output_Calls takes
1976 into account flags -gnatel and -gnatwl when emitting warnings
1978 (Check_Internal_Call_Continue): Update the call to Output_Calls.
1979 (Elab_Warning): Moved to the top level of routine Check_A_Call.
1980 (Emit): New routines.
1981 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
1982 comment on usage. Output all warnings or info messages only when the
1983 caller context demands it and the proper elaboration flag is set.
1985 2014-07-29 Yannick Moy <moy@adacore.com>
1987 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
1988 Check rule about Old appearing in potentially unevaluated
1989 expression everywhere, not only in Post.
1991 2014-07-29 Arnaud Charlet <charlet@adacore.com>
1993 * sem_prag.adb: Update comment.
1994 * a-except.adb, a-except-2005.adb: Minor editing.
1996 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
1998 * exp_dbug.adb (Debug_Renaming_Declaration):
1999 Do not create renaming entities for renamings of non-packed
2000 objects and for exceptions.
2002 2014-07-29 Robert Dewar <dewar@adacore.com>
2004 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
2005 sem_ch6.adb, par-ch3.adb: Minor reformatting.
2007 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2009 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
2010 subtype indication in an extended return statement when the
2011 return value is an ancestor of the return type of the function,
2012 and that return type is a null record extension.
2014 2014-07-29 Thomas Quinot <quinot@adacore.com>
2016 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
2017 message produced for the case of a type-related representation
2018 item that is made illegal by 13.10(1).
2019 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
2022 2014-07-29 Robert Dewar <dewar@adacore.com>
2024 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
2025 * erroutc.adb (Output_Error_Msgs): Take wide characters into
2026 account in computing position of error flags.
2027 * sinput.adb (Get_Column_Number): Take wide characters into
2030 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2032 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
2033 in an access type definition can carry a null_exclusion indicator.
2034 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
2035 carries a null_exclusion indicator, verify that the subtype
2036 indication denotes an access type, and create a null-excluding
2038 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
2039 defined on N_Access_To_Object_Definition to indicate that the
2040 subtype indication carries a null_exclusion indicator.
2042 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2044 * exp_ch6.adb (Add_Extra_Actual): Do not construct
2045 the extra actual by name, generate a reference instead.
2047 2014-07-29 Arnaud Charlet <charlet@adacore.com>
2049 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
2050 Allow_Integer_Address if already set.
2051 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
2052 Fix order, for consistency with Rmsg_xx declarations.
2054 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2056 * sem_ch4.adb (Complete_Object_Operation): If the type of the
2057 candidate subprogram is a limited view, use non-limited view
2060 2014-07-29 Robert Dewar <dewar@adacore.com>
2062 * sem_ch13.adb: Minor change in RM reference.
2063 * sem_mech.ads: Minor reformatting.
2064 * einfo.ads: Minor comment fix.
2065 * types.ads: Minor correction to range given for Mechanism_Type.
2066 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
2067 check predicate on way out for OUT or IN OUT parameters.
2068 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
2069 better (P_Range_Constraint): Corresponding fix.
2070 * checks.ads: Minor comment clarification.
2072 2014-07-29 Gary Dismukes <dismukes@adacore.com>
2074 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
2075 and Treat_As_Volatile flags based on whether the renamed object
2076 is a volatile object.
2078 2014-07-29 Olivier Hainque <hainque@adacore.com>
2081 (Default_Alignment): Rename as Storage_Alignment. This is not
2082 a "default" that can be overriden. Augment comment to clarify
2083 intent and document why we need to manage alignment padding.
2084 (Header_Offset): Set to Header'Object_Size instead of 'Size
2085 rounded up to Storage_Alignment. Storage_Alignment on the
2086 allocation header is not required by our internals so was
2087 overkill. 'Object_Size is enough to ensure proper alignment
2088 of the header address when substracted from a storage address
2089 aligned on Storage_Alignment.
2090 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
2091 this is always added on top of the incoming allocation requests.
2092 (Align): New function, to perform alignment rounding operations.
2093 (Allocate): Add comments on the Storage_Address computation
2094 scheme and adjust so that the alignment padding applies to that
2095 (Storage_Address) only.
2097 2014-07-29 Robert Dewar <dewar@adacore.com>
2099 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
2100 pragma Unreferenced.
2101 * cstand.adb (Create_Standard): Use E_Array_Type for standard
2102 string types. Make sure index of Any_String/Any_Array is in a list.
2103 * errout.adb: Minor reformatting.
2105 2014-07-29 Robert Dewar <dewar@adacore.com>
2107 * gnat_ugn.texi: Clean up and correct documentation of warnings.
2108 * usage.adb: Minor corrections to make sure warnings are properly
2110 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
2111 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
2113 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2115 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
2116 created to match internal sequence numbers between compilations
2117 with/without abort must have its type properly set.
2119 2014-07-29 Robert Dewar <dewar@adacore.com>
2121 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
2122 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
2123 SSO_Default_Specified.
2124 * ali.ads (ALIs_Record): Add field SSO_Default
2125 (SSO_Default_Specified): New global switch.
2126 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
2127 (Check_Configuration_Consistency): Call this procedure
2128 * einfo.adb (SSO_Set_High_By_Default): New
2129 function (SSO_Set_Low_By_Default): New function
2130 (Set_SSO_Set_High_By_Default): New procedure
2131 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
2133 * einfo.ads (SSO_Set_Low_By_Default): New flag
2134 (SSO_Set_High_By_Default): New flag
2135 * freeze.adb (Set_SSO_From_Default): New procedure
2136 (Freeze_Array_Type): Call Set_SSO_From_Default
2137 (Freeze_Record_Type): Call Set_SSO_From_Default
2138 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
2139 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
2140 * lib-writ.ads: Add OL/OH parameters to P line
2141 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
2142 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
2144 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
2145 set by default using pragma Default_Scalar_Storage_Order.
2146 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
2147 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
2148 Clear SSO defaults when explicit SSO is inherited.
2149 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
2150 explicit SSO is specified.
2151 (Inherit_Aspects_At_Freeze_Point):
2152 Clear SSO default when inheriting SSO.
2153 * sem_ch3.adb (Set_Default_SSO): New procedure
2154 (Analyze_Private_Extension_Declaration): Set defualt SSO
2155 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
2156 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
2157 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
2158 (Record_Type_Declaration): ditto
2159 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
2161 * sem_prag.adb (Analyze_Pragma, case
2162 Default_Scalar_Storage_Order): Set Default_SSO
2164 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2166 * sem_ch6.adb (Valid_Operator_Definition): Verify that
2167 all parameter have mode IN. This check must be done here for
2168 subprogram instantiations that have operator names, because their
2169 analysis does not follow the same path as that for subprogram
2172 2014-07-29 Robert Dewar <dewar@adacore.com>
2174 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
2175 to make sure that the Etype of a component of the corresponding
2176 record type is present before trying to freeze it.
2177 * sem_ch5.adb: Minor reformatting.
2179 2014-07-29 Robert Dewar <dewar@adacore.com>
2181 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
2182 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
2183 and then use it when a stream operation is used from a library generic
2184 when the restriction (No_Streams) is active.
2186 2014-07-29 Thomas Quinot <quinot@adacore.com>
2188 * projects.texi: Fix minor typo.
2190 2014-07-29 Yannick Moy <moy@adacore.com>
2192 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
2194 2014-07-29 Arnaud Charlet <charlet@adacore.com>
2196 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
2199 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2201 * exp_ch7.adb (Find_Last_Init): Add local variable
2202 Deep_Init_Found. Check the statement immediately following the
2203 declaration if [Deep_]Initialization was not found.
2205 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2207 * exp_util.adb (Is_Aliased): It appears that
2208 'reference-d and renamed objects still play some role in Boolean
2209 expression with actions and cannot be finalized immediately.
2211 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2213 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
2214 Loop names are not part of the full qualification of entity names.
2216 2014-07-29 Robert Dewar <dewar@adacore.com>
2218 * einfo.adb (Has_Protected): Test base type.
2219 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
2220 that we always properly check No_Protected_Type_Allocators.
2222 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2224 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
2225 loop declarations as well.
2226 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
2227 to an iterator loop, because it may contain local renaming
2228 declarations that require debugging information.
2230 2014-07-29 Robert Dewar <dewar@adacore.com>
2232 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
2234 2014-07-29 Robert Dewar <dewar@adacore.com>
2236 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
2237 (Set_Static_Real_Or_String_Predicate): New procedure
2238 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
2239 string predicates (Is_Predicate_Static): Handle static string
2241 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
2242 New procedure (Check_Expression_Against_Static_Predicate):
2243 Deal with static string predicates, now fully implemented
2244 (Eval_Relational_Op): Allow string equality/inequality as static
2245 if not comes from source.
2247 2014-07-29 Robert Dewar <dewar@adacore.com>
2249 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
2250 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
2251 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
2252 handling. Change name of Discrete_Predicate to
2253 Discrete_Static_Predicate, and replace testing of the presence of this
2254 field by testing the flag Has_Static_Expression.
2256 2014-07-29 Robert Dewar <dewar@adacore.com>
2258 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
2259 * opt.adb: Handle Uneval_Old.
2260 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
2261 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
2262 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
2263 * sem_attr.adb (Uneval_Old_Msg): New procedure.
2264 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
2265 (Pop_Scope): Restore Uneval_Old.
2266 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
2268 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
2269 Add entries for Name_Warn, Name_Allow.
2271 2014-07-29 Robert Dewar <dewar@adacore.com>
2273 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
2274 to Is_OK_Static_Range.
2275 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
2276 static attributes (Eval_Attribute, case Size): Handle size of
2277 zero properly (Eval_Attribute, case Value_Size): Handle size of
2279 * sem_ch13.adb: Minor reformatting.
2280 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
2281 Is_Static_Range to Is_OK_Static_Range.
2282 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
2283 wrong in several ways (Is_Static_Range): Moved here from spec
2284 (Is_Static_Subtype): Moved here from spec Change some incorrect
2285 Is_Static_Subtype calls to Is_OK_Static_Subtype.
2286 * sem_eval.ads: Add comments to section on
2287 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
2288 Add clarifying comments (Is_Static_Range): Moved to body
2289 (Is_Statically_Unevaluated): New function.
2290 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
2291 Is_Static_Range to Is_OK_Static_Range.
2292 * sinfo.ads: Additional commments for Is_Static_Expression noting
2293 that clients should almost always use Is_OK_Static_Expression
2294 instead. Many other changes throughout front end units to obey
2296 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
2297 for enumeration literal.
2298 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
2299 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
2300 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
2301 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
2302 Replace all occurrences of Is_Static_Expression by
2303 Is_OK_Static_Expression.
2305 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2307 * exp_ch4.adb (Process_Transient_Object): Remove constant
2308 In_Cond_Expr, use its initialization expression in place.
2309 * exp_ch7.adb (Process_Declarations): There is no need to check
2310 that a transient object being hooked is controlled as it would
2311 not have been hooked in the first place.
2312 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
2313 objects are not considered aliased when the related context is
2314 a Boolean expression_with_actions.
2315 (Requires_Cleanup_Actions): There is no need to check that a transient
2316 object being hooked is controlled as it would not have been hooked in
2319 2014-07-29 Robert Dewar <dewar@adacore.com>
2321 * errout.adb: Minor reformatting.
2323 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2325 * exp_ch3.adb (Default_Initialize_Object): Add new variables
2326 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
2327 not allowed to ensure the symmetrical generation of symbols.
2328 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
2329 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
2330 temporary when aborts are not allowed to ensure symmertrical
2331 generation of symbols.
2332 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
2333 Dummy. Generate a dummy temporary when aborts are not allowed
2334 to ensure symmertrical generation of symbols.
2336 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2338 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
2339 renaming, indicate that the renamed entity itself needs debug
2340 information. This is necessary if that entity is a temporary,
2341 e.g. part of the expansion of an explicit dereference in an
2344 2014-07-29 Thomas Quinot <quinot@adacore.com>
2346 * errout.adb (Set_Error_Posted): When propagating flag to
2347 an enclosing named association, also propagate to the parent
2348 of that node, so that named and positional associations are
2349 treated consistently.
2351 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2353 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
2354 Do_Range_Check properly on array component expressions that
2355 have a scalar type. In GNATprove mode, only checks on scalar
2356 components must be marked by the front-end.
2358 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2360 * sem_res.adb (Resolve_Type_Conversion): If the type of the
2361 expression is a limited view, use the non-limited view when
2364 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2366 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
2367 case statement as coming from a conditional expression.
2368 (Expand_N_If_Expression): Mark the generated if statement as
2369 coming from a conditional expression.
2370 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
2371 objects found in case statement alternatives when the case
2372 statement is actually a case expression.
2373 (Expand_N_If_Statement):
2374 Do not process controlled objects found in an if statement when
2375 the if statement is actually an if expression.
2376 * sinfo.adb (From_Conditional_Expression): New routine.
2377 (Set_From_Conditional_Expression): New routine.
2378 * sinfo.ads Add new semantic flag From_Conditional_Expression and
2379 update related nodes.
2380 (From_Conditional_Expression): New routine along with pragma Inline.
2381 (Set_From_Conditional_Expression): New routine along with pragma Inline.
2383 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
2385 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
2386 formal parameter Obj_Id and update the comment on usage. Renamed
2387 Obj_Typ to Func_Typ and update all occurrences.
2388 (Find_Last_Init): Remove formal parameter Decl and update the comment
2390 Remove local constants Obj_Id and Obj_Typ. Remove local variables
2391 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
2392 (Find_Last_Init_In_Block): Remove formal parameter
2393 Init_Typ and update the comment on usage.
2394 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
2395 on usage. Check whether the procedure call is an initialization
2396 procedure of either the object type or the initialization type.
2397 (Is_Init_Proc_Of): New routine.
2398 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
2399 routine. Add new variable Init_Typ. Add circuitry to extract the object
2400 type as well as the initialization type.
2402 2014-07-29 Robert Dewar <dewar@adacore.com>
2404 * sem_case.adb: Minor reformatting.
2405 * sem_aux.ads: Minor reformatting.
2407 2014-07-29 Ed Schonberg <schonberg@adacore.com>
2409 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
2410 pointer on these fields, even though they are semantic, because
2411 subsequent analysis and expansion of action nades may require
2412 exploring the tree, for example to locate a node to be wrapped
2413 when a function with controlled result is called.
2415 2014-07-29 Claire Dross <dross@adacore.com>
2417 * sem_aux.adb (Get_Binary_Nkind): Use case on
2418 Name_Id instead of an intermediate string.
2419 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
2422 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
2424 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
2425 about processing sources with preprocessor directives.
2427 2014-07-24 Martin Liska <mliska@suse.cz>
2429 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
2430 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
2431 (gnat_write_global_declarations): Likewise.
2433 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
2435 * gnat_rm.texi: Clean up for makeinfo 5.2.
2437 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
2439 * gnat_rm.texi (Machine Code Insertions): Clean up.
2441 2014-07-18 Robert Dewar <dewar@adacore.com>
2443 * exp_ch7.adb: Minor reformatting.
2445 2014-07-18 Claire Dross <dross@adacore.com>
2447 * sem_aux.ads (Get_Binary_Nkind): New function that returns
2448 the Node_Kind value of an entity defining a binary operator.
2449 (Get_Unary_Nkind): New function that returns the Node_Kind value
2450 of an entity defining a unary operator.
2452 2014-07-18 Pascal Obry <obry@adacore.com>
2454 * sysdep.c: comment update.
2455 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
2456 platforms where it is known to be supported.
2458 2014-07-18 Thomas Quinot <quinot@adacore.com>
2460 * sem_dist.adb (Process_Remote_AST_Declaration): Need
2461 to set Fat_Type's Ekind in order to be able to use its
2462 Corresponding_Remote_Type attribute.
2464 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2466 * einfo.adb Last_Aggregate_Assignment is now Node 30.
2467 (Last_Aggregate_Assignment): Include
2468 constants in the assertion. Update the underlying node.
2469 (Set_Last_Aggregate_Assignment): Include constants in the
2470 assertion. Update the underlying node. (Write_Field11_Name):
2471 Remove the entry for Last_Aggregate_Assignment.
2472 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
2473 * einfo.ads Update the node designation and usage of attribute
2474 Last_Aggregate_Assignment.
2475 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
2476 assignment statement used to initialize a controlled object.
2477 (Late_Expansion): Store the last assignment statement used to
2478 initialize a controlled record or an array of controlled objects.
2479 * exp_ch3.adb (Expand_N_Object_Declaration): Default
2480 initialization of objects is now performed in a separate routine.
2481 (Default_Initialize_Object): New routine.
2482 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
2483 Obj_Id. Update the comment on usage.
2484 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
2485 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
2486 (Is_Init_Call): Add formal parameter Init_Typ. Update the
2487 comment on usage. Account for the type init proc when trying
2488 to determine whether a statement is an initialization call.
2489 (Make_Adjust_Call): Rename formal parameter For_Parent to
2490 Skip_Self. Update all occurrences of For_Parent. Account for
2491 non-tagged types. Update the call to Make_Call.
2492 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
2493 comment on usage. Update all occurrences of For_Parent.
2494 (Make_Final_Call): Rename formal parameter For_Parent to
2495 Skip_Self. Update all occurrences of For_Parent. Account
2496 for non-tagged types. Update the call to Make_Call.
2497 (Process_Object_Declaration): Most variables and constants are
2498 now local to the routine.
2499 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
2500 For_Parent to Skip_Self. Update the comment on usage.
2501 (Make_Final_Call): Rename formal parameter For_Parent to
2502 Skip_Self. Update the comment on usage.
2504 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2506 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
2507 can be a procedure that is implemented by entry, and have a
2508 formal that is a synchronized interface. It does not have to
2509 be declared as a protected operation.
2511 2014-07-18 Robert Dewar <dewar@adacore.com>
2513 * gnat_rm.texi: Remove mention of obsolete attributes
2514 Max[_Interrupt]_Priority, which have never been implemented
2515 (or at the very least were removed long ago if they ever were
2516 implemented. Add documentation of Max[_Interrupt]_Priority
2517 constants in package System.
2518 * ttypes.ads: Document actual handling of package System,
2519 rather than a historical fantasy version. Remove mention of
2520 non-existent attributes Max[_Interrupt]_Priority.
2522 2014-07-18 Pascal Obry <obry@adacore.com>
2524 * a-witeio.adb (Put): No 16-bit character output when text
2525 translation is disabled.
2526 * i-cstrea.ads: Code clean up.
2528 2014-07-18 Robert Dewar <dewar@adacore.com>
2530 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
2533 2014-07-18 Arnaud Charlet <charlet@adacore.com>
2535 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
2537 2014-07-18 Pascal Obry <obry@adacore.com>
2539 * adaint.c: Do not include wchar.h on VxWorks.
2540 * mingw32.h: Remove obsolete definition.
2542 2014-07-18 Pascal Obry <obry@adacore.com>
2544 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
2545 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
2546 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
2547 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
2549 2014-07-18 Pascal Obry <obry@adacore.com>
2551 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
2552 * a-ztexio.adb: Likewise.
2553 * a-witeio.adb: Likewise.
2554 (Open): Pass file's translation mode to set_text_mode.
2555 * s-ficobl.ads (Content_Encoding): New type.
2556 (Text_Content_Encoding): New subtype.
2557 (AFCB): Rename Is_Text_File to Text_Encoding.
2558 * s-fileio.adb (Open): Handles new text_translation
2559 values. Remove Is_Text_File which is equivalent to Text_Encoding
2560 in Text_Content_Encoding.
2561 * adaint.h (__gnat_set_mode): New routine.
2562 * sysdep.c (__gnat_set_wide_text_mode): Removed.
2563 (__gnat_set_mode): New routine.
2565 2014-07-18 Arnaud Charlet <charlet@adacore.com>
2567 * gcc-interface/decl.c, gcc-interface/trans.c,
2568 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
2569 Is_Packed_Array_Impl_Type.
2571 2014-07-18 Gary Dismukes <dismukes@adacore.com>
2573 * sem_util.adb: Minor typo correction.
2575 2014-07-18 Ben Brosgol <brosgol@adacore.com>
2577 * gnat_rm.texi: Complete previous change.
2579 2014-07-18 Pascal Obry <obry@adacore.com>
2581 * s-fileio.adb: Minor style fix.
2583 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2585 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
2586 specification of stream attributes for subtypes that are not
2587 first subtypes, to prevent malformed rep_item chains in the case
2588 of such illegal specifications for discriminated private subtypes.
2589 (Check_Overloaded_Name): Verify that the name is an entity name
2590 before other checks.
2592 2014-07-18 Pascal Obry <obry@adacore.com>
2594 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
2596 2014-07-18 Robert Dewar <dewar@adacore.com>
2598 * sem_prag.adb, sem_attr.adb,
2599 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
2601 2014-07-18 Pascal Obry <obry@adacore.com>
2603 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
2604 * initialize.c (__gnat_wide_text_translation_required): Defined here.
2606 2014-07-18 Pascal Obry <obry@adacore.com>
2608 * adaint.c (__gnat_fputwc): New routine.
2609 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
2611 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2613 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
2614 (Set_Stores_Attribute_Old_Prefix): New routine.
2615 (Stores_Attribute_Old_Prefix): New routine.
2616 (Write_Entity_Flags):
2617 Output flag Stores_Attribute_Old_Prefix.
2618 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
2620 (Set_Stores_Attribute_Old_Prefix): New routine
2621 along with pragma Inline.
2622 (Stores_Attribute_Old_Prefix): New
2623 routine along with pragma Inline.
2624 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
2625 constant which captures the result of attribute 'Old's prefix.
2626 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
2627 relocated expression which acted as a prefix of attribute 'Old.
2629 2014-07-18 Bob Duff <duff@adacore.com>
2631 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
2632 null before dispatching to Deallocate_Subpool.
2633 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
2634 parameter of Default_Subpool_For_Pool to 'in out'.
2635 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
2636 a message to the raise.
2637 * sem_util.adb: Minor reformatting.
2639 2014-07-18 Robert Dewar <dewar@adacore.com>
2641 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2642 Mark expression as non-static if it fails static predicate check,
2643 and issue additional warning.
2645 2014-07-18 Pascal Obry <obry@adacore.com>
2647 * a-witeio.adb (Put): Control translation based on
2648 wide_text_translation_required.
2649 * adaint.c (CurrentCCSEncoding): New variable.
2650 * initialize.c (__gnat_initialize): On Windows initialize
2651 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
2652 environment variable.
2653 * mingw32.h (CurrentCCSEncoding): New external.
2654 (__gnat_wide_text_translation_required): Likewise.
2655 * sysdep.c (wide_text_translation_required): New variable.
2656 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
2658 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2660 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
2661 variable Refined_States. Add global variable Matched_Items.
2662 (Check_Dependency_Clause): Account for dependency
2663 clauses utilizing states with visible null refinements.
2664 (Is_Null_Refined_State): New routine.
2665 (Match_Items): Record each successfully matched item of pragma Depends.
2666 (Record_Item): New routine.
2668 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2670 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
2671 Do_Range_Check flag on a dynamic index expression used in a
2672 component association in the argument of Update.
2674 2014-07-18 Gary Dismukes <dismukes@adacore.com>
2676 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
2678 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2680 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
2681 of enclosing blocks, loops and the enclosing function using a
2682 parent-based traversal.
2683 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
2684 stack reclamation if the iterator loop contains a return statement
2685 that uses the stack.
2686 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
2687 patch up the scope stack as the secondary stack management now
2688 takes into account the enclosing function of the iterator loop.
2690 2014-07-18 Robert Dewar <dewar@adacore.com>
2692 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
2694 2014-07-18 Robert Dewar <dewar@adacore.com>
2696 * einfo.adb (Has_Static_Predicate): New function.
2697 (Set_Has_Static_Predicate): New procedure.
2698 * einfo.ads (Has_Static_Predicate): New flag.
2699 * sem_ch13.adb (Is_Predicate_Static): New function
2700 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
2701 (Add_Call): Minor change in Sloc of generated expression
2702 (Add_Predicates): Remove setting of Static_Pred, no longer used.
2703 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
2704 replace by use of the entity flag Has_Static_Predicate_Aspect.
2705 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
2706 and issue warning that predicate is not checked for now.
2707 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
2709 * sem_util.adb (Check_Expression_Against_Static_Predicate):
2710 Carry out check for any case where there is a static predicate,
2711 and output appropriate message.
2712 * sinfo.ads: Minor comment corrections.
2714 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2716 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
2717 from an untagged private type whose full view is tagged, the type
2718 is marked tagged for layout reasons, but it has no dispatch table,
2719 so Set_All_DT_Position must not be called.
2720 * exp_ch13.adb: If the freeze node is for a type internal to a
2721 record declaration, as is the case for a class-wide subtype
2722 of a parent component, the relevant scope is the scope of the
2725 2014-07-18 Thomas Quinot <quinot@adacore.com>
2727 * g-memdum.adb, g-memdum.ads: Code clean ups.
2729 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2731 * sem_prag.adb (Check_Dependency_Clause):
2732 Update the comment on usage. Reimplement the mechanism which
2733 attempts to match a single clause of Depends against one or
2734 more clauses of Refined_Depends.
2735 (Input_Match): Removed.
2736 (Inputs_Match): Removed.
2737 (Is_Self_Referential): Removed.
2738 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
2739 (Normalize_Outputs): Rename variable Split to New_Claue and update
2740 all its occurrences.
2741 (Report_Extra_Clauses): Update the comment on usage.
2742 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
2744 2014-07-18 Gary Dismukes <dismukes@adacore.com>
2746 * i-cstrea.ads: Minor reformatting.
2748 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
2750 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
2751 secondary stack-related flags to the generated block.
2752 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
2753 once the loop is relocated in a block.
2755 2014-07-18 Robert Dewar <dewar@adacore.com>
2757 * repinfo.ads: Add documentation on handling of back annotation
2760 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2762 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
2763 of full type declaration, denotes previous declaration for
2764 incomplete view of the type.
2765 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
2766 of declaration if one is present.
2767 (Replace_Type): When constructing the signature of an inherited
2768 operation, handle properly the case where the operation has a
2769 formal whose type is an incomplete view.
2770 * sem_util.adb (Collect_Primitive_Operations): Handle properly
2771 the case of an operation declared after an incomplete declaration
2772 for a type T and before the full declaration of T.
2774 2014-07-18 Pascal Obry <obry@adacore.com>
2776 * i-cstrea.ads: Add documentation for set_wide_text_mode.
2778 2014-07-18 Robert Dewar <dewar@adacore.com>
2780 * a-witeio.adb: Minor code reorganization.
2781 * i-cstrea.ads: Add comment.
2783 2014-07-18 Thomas Quinot <quinot@adacore.com>
2785 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
2788 2014-07-18 Robert Dewar <dewar@adacore.com>
2790 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
2792 2014-07-18 Pascal Obry <obry@adacore.com>
2794 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
2795 * a-witeio.adb (Put): On platforms where there is translation
2796 done by the OS output the raw text.
2797 (New_Line): Use Put above to properly handle the LM wide characters.
2799 2014-07-18 Thomas Quinot <quinot@adacore.com>
2801 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
2802 to Absolute_Address.
2804 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
2806 * opt.ads (Suppress_Back_Annotation): Remove as unused.
2807 * fe.h (Back_Annotate_Rep_Info): Likewise.
2808 (Global_Discard_Names): Likewise.
2810 2014-07-18 Robert Dewar <dewar@adacore.com>
2812 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
2815 2014-07-18 Vincent Celier <celier@adacore.com>
2817 * s-osinte-vms.ads: Fix style errors.
2819 2014-07-18 Thomas Quinot <quinot@adacore.com>
2821 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
2822 NAME_MAX and PATH_MAX.
2824 2014-07-18 Bob Duff <duff@adacore.com>
2826 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
2827 Build_Record_Or_Elementary_Output_Procedure): For Input and
2828 Output attributes, do not read/write the discriminants if they
2829 have default values; that will be done by Read/Write.
2831 2014-07-18 Robert Dewar <dewar@adacore.com>
2833 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
2834 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
2835 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
2836 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
2837 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
2839 2014-07-18 Robert Dewar <dewar@adacore.com>
2841 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
2843 2014-07-18 Vincent Celier <celier@adacore.com>
2845 * lib-writ.ads: Update documentation about the D lines.
2847 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2849 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
2850 as a parameter, rather than its Chars field, in order to locate
2851 freeze node of type. If the predicate or invariant has references
2852 to types other than the one to which the contract applies, these
2853 types must be frozen, and the corresponding predicate functions
2854 created, before that freeze node.
2856 2014-07-18 Robert Dewar <dewar@adacore.com>
2858 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
2859 * par_sco.adb: Minor reformatting.
2861 2014-07-18 Gary Dismukes <dismukes@adacore.com>
2863 * exp_ch4.adb (Real_Range_Check): Turn off
2864 the Do_Range_Check flag on the conversion's current Expression
2865 argument rather than on the originally captured Operand node,
2866 as Expression may reflect a rewriting (as in conversions to a
2869 2014-07-18 Vincent Celier <celier@adacore.com>
2871 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
2873 * ali.ads (Sdep_Record): New component Unit_Name.
2874 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
2875 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
2876 dependent unit is in a project and the source file name is not
2879 2014-07-18 Bob Duff <duff@adacore.com>
2881 * s-addima.ads: Minor: add comment.
2883 2014-07-18 Thomas Quinot <quinot@adacore.com>
2885 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
2886 of nesting rules for composites with different SSOs.
2888 2014-07-18 Thomas Quinot <quinot@adacore.com>
2890 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
2891 a proper logical operator.
2892 (Has_Decision): An If_Expression indicates the presence of a decision
2893 although it is not a logical operator.
2895 2014-07-18 Robert Dewar <dewar@adacore.com>
2897 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
2898 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
2900 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
2902 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
2903 on the null statement.
2905 2014-07-18 Thomas Quinot <quinot@adacore.com>
2907 * adaint.c: Minor comment rewording.
2908 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
2909 use of errno in this file is thread safe.
2911 2014-07-18 Arnaud Charlet <charlet@adacore.com>
2913 * gnat_ugn.texi: Doc clarification.
2914 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
2915 * sem_ch13.ads: Minor comment update.
2917 2014-07-18 Robert Dewar <dewar@adacore.com>
2919 * repinfo.ads: Minor comment fix.
2921 2014-07-18 Robert Dewar <dewar@adacore.com>
2923 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
2924 * sem_prag.adb: Add dummy implementation of
2925 Default_Scalar_Storage_Order.
2926 * snames.ads-tmpl: Add dummy entry for
2927 Default_Scalar_Storage_Order pragma.
2929 2014-07-18 Robert Dewar <dewar@adacore.com>
2931 * opt.adb (Tree_Read): Read Address_Is_Private,
2932 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
2933 (Tree_Write): Corresponding writes
2934 * opt.ads: Minor comment reformatting and fixes.
2935 * tree_io.ads: Increment ASIS_Version_Number.
2937 2014-07-18 Robert Dewar <dewar@adacore.com>
2939 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
2940 * types.h: Fix typo.
2942 2014-07-18 Robert Dewar <dewar@adacore.com>
2944 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
2946 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
2948 * sem_ch13.adb (Kill_Rep_Clause): New procedure
2949 (Analyze_Attribute_Definition_Clause): Use
2950 Kill_Rep_Clause. This is just a cleanup, no functional effect.
2951 (Analyze_Enumeration_Representation_Clause):
2952 Use Kill_Rep_Clause. This means that enum rep
2953 clauses are now properly removed from -gnatct trees.
2954 (Analyze_Record_Representation_Clause): Same change.
2955 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
2957 2014-07-18 Pascal Obry <obry@adacore.com>
2959 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
2960 OS_Time from time parts.
2961 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
2963 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2965 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
2966 indexing over containers that are derived types: check whether
2967 signature of found operation has the correct first parameter
2968 before retrieving directly a primitive operation.
2970 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2972 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
2973 Do_Range_Check flag on dynamic bounds of a range used in a
2974 component association in the argument of Update.
2976 2014-07-18 Thomas Quinot <quinot@adacore.com>
2978 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
2979 accesses to errno(3) to be thread safe.
2981 2014-07-18 Vincent Celier <celier@adacore.com>
2983 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
2984 limited imported project that is an extending project, return
2985 a project being extended if it has the expected name.
2987 2014-07-18 Pascal Obry <obry@adacore.com>
2989 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
2990 routine to set the last modification time stamp for the given file.
2991 * gnatchop.adb (File_Time_Stamp): Removed.
2993 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
2995 2014-07-18 Ed Schonberg <schonberg@adacore.com>
2997 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
2998 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
2999 Moved here, so it can be shared with the resolution of 'Update,
3000 whose argument shares some features with aggregates.
3001 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
3002 Aggregate_Constraint_Checks with the expression of each
3003 association, so that the Do_Range_Check flag is set when needed.
3005 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3007 * sem_ch4.adb (Try_Container_Indexing): If the container
3008 type is a derived type, the value of the inherited aspect is
3009 the Reference operation declared for the parent type. However,
3010 Reference is also a primitive operation of the new type, and
3011 the inherited operation has a different signature. We retrieve
3012 the right one from the list of primitive operations of the
3015 2014-07-18 Vincent Celier <celier@adacore.com>
3017 * debug.adb: Update comment.
3019 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3021 * exp_util.adb (Needs_Finalization): There is no reason why a
3022 C type should not benefit from finalization actions.
3024 2014-07-18 Thomas Quinot <quinot@adacore.com>
3026 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
3027 (FILENAME_MAX): Remove unneeded definition.
3029 2014-07-18 Robert Dewar <dewar@adacore.com>
3031 * exp_attr.adb, debug.adb: Update comments.
3033 2014-07-18 Vincent Celier <celier@adacore.com>
3035 * par-ch4.adb (Simple_Expression): Add missing style check
3036 for binary adding operators.
3037 (Term): Add missing style check for multiplying operators.
3039 2014-07-18 Robert Dewar <dewar@adacore.com>
3041 * impunit.adb: Minor comment correction.
3042 * widechar.adb, s-wchcon.ads: Minor comment corrections.
3044 2014-07-18 Robert Dewar <dewar@adacore.com>
3046 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
3047 for Build_Static_Predicate (Build_Predicate_Functions):
3048 Don't try to build discrete predicate for real type.
3049 (Build_Predicate_Functions): Report attempt to use
3050 Static_Predicate function on real type as unimplemented.
3051 * sem_util.adb (Check_Expression_Against_Static_Predicate):
3052 Add guard to prevent blow up on predicate for real type.
3054 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3056 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
3057 properly static predicate on enumeration types and modular types
3060 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
3062 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
3063 the corresponding source file index.
3064 * get_scos.ads (Get_SCOs): Add a default value for it.
3065 * par_sco.adb (SCO_Record): Fill the corresponding value.
3068 2014-07-18 Vincent Celier <celier@adacore.com>
3070 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
3071 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
3073 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
3075 2014-07-18 Thomas Quinot <quinot@adacore.com>
3077 * g-sercom.ads (Set): document possible data loss.
3079 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3081 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
3082 Output, Read, Write): If the restriction No_Streams is active,
3083 replace each occurrence of a stream attribute by an explicit
3086 2014-07-18 Robert Dewar <dewar@adacore.com>
3088 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
3091 2014-07-18 Robert Dewar <dewar@adacore.com>
3093 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
3095 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
3096 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
3097 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
3098 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
3100 2014-07-18 Robert Dewar <dewar@adacore.com>
3102 * bcheck.adb (Check_Consistent_Restrictions):
3103 Remove obsolete code checking for violation of
3104 No_Standard_Allocators_After_Elaboration (main program)
3105 * bindgen.adb (Gen_Adainit): Handle
3106 No_Standard_Allocators_After_Elaboration
3107 (Gen_Output_File_Ada): ditto.
3108 * exp_ch4.adb (Expand_N_Allocator): Handle
3109 No_Standard_Allocators_After_Elaboration.
3110 * Makefile.rtl: Add entry for s-elaall
3111 * rtsfind.ads: Add entry for Check_Standard_Allocator.
3112 * s-elaall.ads, s-elaall.adb: New files.
3113 * sem_ch4.adb (Analyze_Allocator): Handle
3114 No_Standard_Allocators_After_Elaboration.
3116 2014-07-18 Robert Dewar <dewar@adacore.com>
3118 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
3119 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
3120 Remove AB parameter from ali files and all uses.
3121 Remove Allocator_In_Body and all uses.
3123 2014-07-18 Robert Dewar <dewar@adacore.com>
3125 * g-expect-vms.adb: Add comment.
3127 2014-07-18 Thomas Quinot <quinot@adacore.com>
3129 * par_sco.adb (Is_Logical_Operation): return True for
3132 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3134 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
3135 analysis and resolution of each choice in the associations within
3136 the argument of Update, because they may be variable names.
3138 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3140 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
3141 actions before the generated if statement.
3143 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
3145 * gnat_ugn.texi Enhance the documentation of
3146 switches -gnateA and -gnateV.
3148 2014-07-18 Ed Schonberg <schonberg@adacore.com>
3150 * sem_util.adb (Build_Default_Subtype): Add missing condition
3151 so that code matches description: use the full view of the base
3152 only if the base is private and the subtype is not.
3154 2014-07-17 Gary Dismukes <dismukes@adacore.com>
3156 * exp_disp.adb: Minor reformatting.
3157 * exp_disp.adb: Minor code reorganization.
3159 2014-07-17 Thomas Quinot <quinot@adacore.com>
3161 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
3162 require an explicit SSO attribute definition clause on a composite type
3163 just because one of its components has one.
3165 2014-07-17 Robert Dewar <dewar@adacore.com>
3167 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
3168 attribute out of existence if the enclosing pragma is ignored.
3169 * sem_util.adb: Minor reformatting.
3171 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3173 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
3174 array aggregate expanded into assignments when it appears as a
3175 local declaration in an inlined body.
3177 2014-07-17 Doug Rupp <rupp@adacore.com>
3179 * init.c [__ANDROID__]: Modify for ZCX.
3180 * exp_aggr.adb: Minor reformatting
3181 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
3183 2014-07-17 Robert Dewar <dewar@adacore.com>
3185 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
3186 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
3187 scng.adb: Remove incorrect usage "allow to" and "allows to".
3189 2014-07-17 Robert Dewar <dewar@adacore.com>
3191 * exp_dist.adb: Minor reformatting.
3193 2014-07-17 Bob Duff <duff@adacore.com>
3195 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
3197 2014-07-17 Robert Dewar <dewar@adacore.com>
3199 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
3200 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
3202 2014-07-17 Thomas Quinot <quinot@adacore.com>
3204 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
3205 non-bit-packed array, propagate Reverse_Storage_Order to the
3208 2014-07-17 Javier Miranda <miranda@adacore.com>
3210 * exp_disp.adb: Fix comment.
3211 * exp_pakd.adb: Minor reformatting.
3213 2014-07-17 Robert Dewar <dewar@adacore.com>
3215 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
3216 entity if none exists (Gen_Elab_Calls): Complain if clash with
3217 No_Multiple_Elaboration.
3218 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
3219 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
3221 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
3222 * sem_ch4.adb: Minor comment updates.
3224 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3226 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
3227 of function call for later use when shared passive objects
3230 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3232 * par-ch13.adb (Get_Aspect_Specifications):
3233 Catch a case where the argument of SPARK aspect Refined_State
3234 is not properly parenthesized.
3236 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3238 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
3239 the lifetime of a reference to an Ada 2012 container element.
3240 (Is_Element_Reference): New routine.
3242 2014-07-17 Robert Dewar <dewar@adacore.com>
3244 * ali.ads: Minor comment fix.
3245 * lib-writ.adb: Minor reformatting.
3247 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3249 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
3250 in ASIS mode, load another subunit only if it a subunit of the
3251 current one, not a sibling that has been reached through the
3252 analysis of an ancestor. This allows the construction of the
3253 ASIS tree for the subunit even when sibling subunits have errors.
3255 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3257 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
3258 prevents the analysis of various contracts when the associated
3259 construct is erroneous.
3260 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
3261 SPARK_Pragma of an illegal or a partially decorated construct.
3263 2014-07-17 Robert Dewar <dewar@adacore.com>
3265 * s-imguns.ads: Minor reformatting.
3267 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3269 * exp_ch7.adb (Build_Finalization_Master): Move all local
3270 variables to the proper code section. When looking for an existing
3271 finalization master, inspect the ultimate ancestor type of the
3273 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
3275 2014-07-17 Robert Dewar <dewar@adacore.com>
3277 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
3278 * gnat_rm.texi: Document Entity argument for pragma Annotate and
3280 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
3281 for Annotate aspect.
3282 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
3283 Entity argument at end.
3284 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
3286 2014-07-17 Tristan Gingold <gingold@adacore.com>
3288 * s-imguns.ads: Fix minor typo.
3290 2014-07-17 Thomas Quinot <quinot@adacore.com>
3292 * sprint.adb: Minor reformatting.
3294 2014-07-17 Robert Dewar <dewar@adacore.com>
3296 * sprint.adb (Write_Itype): Print proper header for string
3299 2014-07-17 Steve Baird <baird@adacore.com>
3301 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
3303 2014-07-17 Vincent Celier <celier@adacore.com>
3305 * gnatbind.adb: Change in message "try ... for more information".
3307 2014-07-17 Robert Dewar <dewar@adacore.com>
3309 * sprint.adb: Code clean up.
3311 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3313 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
3314 the relevant code section. Add new local constant Obj_Id. When
3315 a limited controlled object is initialized by a function call,
3316 the build-in-place object access function call acts as the last
3317 initialization statement.
3318 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
3319 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
3320 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
3322 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3324 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
3325 propagate intrinsic flag to renamed entity, to allow e.g. renaming
3326 of Unchecked_Conversion.
3327 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
3328 if the declaration has errors.
3330 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3332 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
3333 container is busy before checking whether capacity allows for
3334 a further insertion. Insertion in a busy container that is full
3335 raises Program_Error rather than Capacity_Error. Previous to that
3336 patch which exception was raised varied among container types.
3338 2014-07-17 Robert Dewar <dewar@adacore.com>
3340 * g-comlin.ads, g-comlin.adb: Minor clean up.
3342 2014-07-17 Bob Duff <duff@adacore.com>
3344 * gnat_ugn.texi: Update gnatpp doc.
3346 2014-07-17 Robert Dewar <dewar@adacore.com>
3348 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
3349 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
3350 could do this by actually expanding a real generic.
3351 * a-tags.ads: Add comments about performance.
3352 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
3353 Print Etype of defining identifier, rather than the object
3354 definition. More information.
3356 2014-07-17 Thomas Quinot <quinot@adacore.com>
3358 * exp_dist.adb: Minor documentation clarification.
3360 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3362 * exp_util.adb (Is_Aliased): Revert previous change.
3364 2014-07-17 Vincent Celier <celier@adacore.com>
3366 * g-comlin.adb (Try_Help): New procedure.
3367 (Getopt): Use new procedure Try_Help.
3368 * g-comlin.ads (Try_Help): New procedure.
3370 2014-07-17 Bob Duff <duff@adacore.com>
3372 * gnat_ugn.texi: Minor update.
3374 2014-07-17 Robert Dewar <dewar@adacore.com>
3376 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
3377 * sinfo.ads: Document restriction on aggregates (must expand to
3378 assignments if one or more assignments needs expansion, e.g. for
3380 * sem_ch13.adb: All warning messages regarding bit order should
3382 * gnat_ugn.texi: Minor correction of missing @ on @code
3384 2014-07-17 Robert Dewar <dewar@adacore.com>
3386 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
3387 * s-rident.ads (Partition_Boolean_Restrictions): Add
3388 No_Long_Long_Integer.
3389 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
3390 Long_Integer'Size if restriction No_Long_Long_Integer is active.
3391 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
3392 as the implicit base type for a signed integer type declaration
3393 if restriction No_Long_Long_Integer is active.
3394 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
3395 No_Long_Long_Integer.
3397 2014-07-17 Robert Dewar <dewar@adacore.com>
3399 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
3400 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
3401 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
3402 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
3403 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
3405 2014-07-17 Robert Dewar <dewar@adacore.com>
3407 * debug.adb: Remove -gnatdQ.
3408 * exp_disp.adb: Remove -gnatdQ.
3409 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
3410 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
3411 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
3412 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
3413 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
3414 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
3416 2014-07-17 Robert Dewar <dewar@adacore.com>
3418 * back_end.adb: Minor reformatting and comment additions.
3419 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
3421 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
3422 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
3423 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
3424 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
3425 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
3426 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
3428 2014-07-17 Robert Dewar <dewar@adacore.com>
3430 * gnat_rm.texi: Minor comment updates.
3432 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3434 * sem_util.adb (Make_Explicit_Dereference): If the expression
3435 being dereferenced is a generalized indexing, reset the overloaded
3436 flag on the generalized indexing call, consistent with the
3437 resetting of the flag on the original indexed component.
3439 2014-07-17 Robert Dewar <dewar@adacore.com>
3441 * gnat_ugn.texi: Document advise not to mix -gnatV? and
3444 2014-07-17 Robert Dewar <dewar@adacore.com>
3446 * checks.adb (Insert_Valid_Check): Don't insist on a name
3447 for the prefix when we make calls to Force_Evaluation and
3448 Duplicate_Subexpr_No_Checks.
3449 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
3450 (Remove_Side_Effects): Handle all volatile references right
3451 (Side_Effect_Free): Volatile reference is never side effect free
3452 * sinfo.ads (N_Attribute_Reference): Add comments explaining
3453 that in the tree, the prefix can be a general expression.
3455 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3457 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
3458 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
3459 * sem_ch7.adb (Analyze_Package_Body_Contract,
3460 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
3462 2014-07-17 Robert Dewar <dewar@adacore.com>
3464 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
3465 Store_After_Actions_In_Scope.
3467 2014-07-17 Robert Dewar <dewar@adacore.com>
3469 * sem_aux.ads: Minor comment addition.
3471 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3473 * sem_res.adb (Make_Call_Into_Operator): If the call is already
3474 a rewriting of an operator node, there are no actuals to be
3475 propagated from original node to rewritten node when in ASIS mode.
3477 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3479 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
3480 Analyze_Subprogram_Contract): Add new local variable Mode. Save
3481 and restore the SPARK mode of the related construct in a
3483 * sem_ch7.adb (Analyze_Package_Body_Contract,
3484 Analyze_Package_Contract): Add new local variable Mode. Save and
3485 restore the SPARK mode of the related construct in a stack-like fashion.
3486 * sem_util.adb Remove with and use clause for Opt.
3487 (Restore_SPARK_Mode): New routine.
3488 (Save_SPARK_Mode_And_Set): New routine.
3489 * sem_util.ads Add with and use clause for Opt.
3490 (Restore_SPARK_Mode): New routine.
3491 (Save_SPARK_Mode_And_Set): New routine.
3493 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3495 * exp_util.adb (Is_Aliased): Transient objects
3496 within an expression with actions cannot be considered aliased.
3498 2014-07-17 Thomas Quinot <quinot@adacore.com>
3500 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
3501 introduce a new list (cleanup actions) for each (transient) scope.
3502 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
3504 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
3505 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
3506 processing for Store_xxx_Actions_In_Scope.
3507 (Build_Cleanup_Statements): Allow for a list of additional
3508 cleanup statements to be passed by the caller.
3509 (Expand_Cleanup_Actions): Take custom cleanup actions associated
3510 with an N_Block_Statement into account.
3511 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
3512 reorganization (refactoring only, no behaviour change).
3513 (Make_Transient_Block): Add assertion to ensure that the current
3514 scope is indeed a block (namely, the entity for the transient
3515 block being constructed syntactically, which has already been
3516 established as a scope). If cleanup actions are present in the
3517 transient scope, transfer them now to the transient block.
3518 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
3519 called function while it is still present as the name in a call
3520 in the tree. This may not be the case later on if the call is
3521 rewritten into a transient block.
3522 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
3523 inserted after calling a protected operation on a shared passive
3524 protected must be performed in a block finalizer, not just
3525 inserted in the tree, so that they are executed even in case of
3526 a normal (RETURN) or abnormal (exception) transfer of control
3527 outside of the current scope.
3528 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
3529 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
3530 Scope_Stack_Entry reorganization.
3532 2014-07-17 Thomas Quinot <quinot@adacore.com>
3534 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
3535 call for types that do not have an explicit attribute definition
3536 clause for External_Tag, as their default tag may clash with an
3537 explicit tag defined for some other type.
3539 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
3541 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
3542 controlled function call with multiple actual parameters that
3543 appears in Object.Operation form.
3545 2014-07-17 Thomas Quinot <quinot@adacore.com>
3547 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
3549 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3550 External_Tag): No need to set entity flag.
3551 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
3552 Reimplement correctly in terms of Has_Rep_Item.
3554 2014-07-17 Thomas Quinot <quinot@adacore.com>
3556 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
3557 Start examining the tree at the node passed to
3558 Establish_Transient_Scope (not its parent).
3559 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3560 The access type for the variable storing the reference to
3561 the call must be declared and frozen prior to establishing a
3563 * exp_ch9.adb: Minor reformatting.
3565 2014-07-17 Pascal Obry <obry@adacore.com>
3567 * s-os_lib.ads: Minor comment update.
3569 2014-07-17 Tristan Gingold <gingold@adacore.com>
3571 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
3573 * socket.c: Remove #warning to avoid warning.
3574 * expect.c: Indent some preprocessor directives to clarify
3575 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
3577 * env.c: Fix indentation. Port to PikeOS.
3578 * gsocket.h: Port to PikeOS. Remove #warning.
3579 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
3580 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
3581 of stubbed __gnat_setup_parent_communication.
3582 * adaint.c: Port to PikeOS. Reindent some preprocessor
3583 directives to clarify nested if. Fix indentation. Add missing
3586 2014-07-17 Robert Dewar <dewar@adacore.com>
3588 * sem_attr.adb: Minor reformatting.
3590 2014-07-17 Robert Dewar <dewar@adacore.com>
3592 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
3594 2014-07-17 Ed Schonberg <schonberg@adacore.com>
3596 * sem_case.adb (Check_Choice_Set): If the case expression is the
3597 expression in a predicate, do not recheck coverage against itself,
3598 to prevent spurious errors.
3599 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
3600 expression comes from an aspect specification, to prevent spurious
3601 errors when expression is a case expression in a predicate.
3603 2014-07-17 Pascal Obry <obry@adacore.com>
3605 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
3606 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
3608 2014-07-17 Vincent Celier <celier@adacore.com>
3610 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
3611 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
3612 the usage for an erroneous invocation of a gnat tool.
3614 2014-07-16 Vincent Celier <celier@adacore.com>
3616 * gnatls.adb: Get the target parameters only if -nostdinc was
3619 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3621 * checks.adb (Insert_Valid_Check): If the expression is a packed
3622 component of a modular type of the right size the data is always
3623 valid. This os particularly useful if the component is part of
3624 a volatile variable.
3626 2014-07-16 Robert Dewar <dewar@adacore.com>
3628 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
3630 2014-07-16 Thomas Quinot <quinot@adacore.com>
3632 * exp_ch7.ads: Minor documentation fix.
3634 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3636 * sem_ch3.adb (Find_Type_Name): Diagnose properly
3637 a private extension completion that is an interface definition
3638 with an interface list.
3640 2014-07-16 Arnaud Charlet <charlet@adacore.com>
3642 * gnatls.adb (Gnatls): Code clean ups.
3644 2014-07-16 Thomas Quinot <quinot@adacore.com>
3646 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
3647 * sem.adb (Analyze): Handle N_Compound_Statement.
3648 * sprint.adb (Sprint_Node_Actual): Ditto.
3649 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
3650 procedure to handle N_Compound_Statement.
3651 * exp_aggr.adb (Collect_Initialization_Statements):
3652 Use a proper compound statement node, instead of a bogus
3653 expression-with-actions with a NULL statement as its expression,
3654 to wrap collected initialization statements.
3655 * freeze.ads, freeze.adb
3656 (Explode_Initialization_Compound_Statement): New public procedure,
3657 lifted from Freeze_Entity.
3658 (Freeze_Entity): When freezing
3659 an object with captured initialization statements and without
3660 delayed freezing, explode compount statement.
3661 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
3662 case that used to handle bogus EWAs with NULL statement as
3664 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
3665 delayed freezing and captured initialization statements, explode
3668 2014-07-16 Gary Dismukes <dismukes@adacore.com>
3670 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
3672 2014-07-16 Doug Rupp <rupp@adacore.com>
3674 * s-interr-hwint.adb: Casing error on parameter.
3676 2014-07-16 Pascal Obry <obry@adacore.com>
3678 * Makefile.rtl: Add g-rewdat.o dependencies in
3679 GNATRTL_NONTASKING_OBJS.
3681 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3683 * sem_case.adb: Code clean up.
3685 2014-07-16 Vincent Celier <celier@adacore.com>
3687 * make.adb: Do not read gnat.adc when gnatmake is invoked
3690 2014-07-16 Pascal Obry <obry@adacore.com>
3692 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
3693 implementation of GNAT.Rewrite_Data.
3695 2014-07-16 Vincent Celier <celier@adacore.com>
3697 * gnatls.adb (Normalize): New function.
3698 (Gnatls): Get the target parameters. On targets other than VMS,
3699 normalize the path names in the source search path, the object search
3700 path and the project search path.
3702 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3704 * sem_case.adb: Avoid self-checking of case expressions in
3707 2014-07-16 Robert Dewar <dewar@adacore.com>
3709 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
3712 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
3714 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
3716 2014-07-16 Ben Brosgol <brosgol@adacore.com>
3718 * gnat_ugn.texi: Fix typo.
3720 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3722 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
3723 expression if it is the specification of a subtype predicate:
3724 it will be expanded when the return statement is analyzed, or
3725 when a static predicate is transformed into a static expression
3726 for evaluation by the front-end.
3727 * sem_ch13.adb (Get_RList): If the expression for a static
3728 predicate is a case expression, extract the alternatives of the
3729 branches with a True value to create the required statically
3730 evaluable expression.
3732 2014-07-16 Thomas Quinot <quinot@adacore.com>
3734 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
3735 expression, not the location of the aspect, for all generated
3736 code, so that in particular the call to raise_assert_failure
3737 gets the sloc of the associated condition.
3739 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
3740 Set an explicit End_Label on the handled sequence of statements
3741 for the _Postconditions procedure so that the implicit return
3742 statement does not erroneously get associated with code generated
3743 for the last condition in postconditions.
3745 2014-07-16 Thomas Quinot <quinot@adacore.com>
3747 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
3748 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
3749 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
3752 2014-07-16 Robert Dewar <dewar@adacore.com>
3754 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
3755 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
3756 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
3758 * par-ch4.adb (At_Start_Of_Attribute): New function
3759 (P_Simple_Expression): Better msg for bad attribute prefix.
3760 * scans.ads: Minor reformatting.
3762 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3764 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
3765 static constant, check that in belongs to the corresponding index
3766 subtype, to produce the proer warning when expansion is disabled.
3768 2014-07-16 Robert Dewar <dewar@adacore.com>
3770 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
3771 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
3772 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
3773 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
3774 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
3776 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
3777 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
3780 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3782 * exp_ch7.adb (Process_Declarations): Reinstate the check on
3783 a hook object to ensure that the related transient declaration
3785 * exp_util.adb (Is_Aliased): Do not consider expresison with
3786 actions as a special context.
3787 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
3788 ensure that the related transient declaration is finalizable.
3790 2014-07-16 Robert Dewar <dewar@adacore.com>
3792 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
3793 * snames.ads-tmpl: Add Allocation_Check to list of check names.
3794 * types.ads: Add Allocation_Check to list of check names.
3796 2014-07-16 Thomas Quinot <quinot@adacore.com>
3798 * sem_util.adb (Enter_Name): replace bogus test for presence of
3799 Corresponding_Remote_Type with correct test on Ekind.
3800 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
3801 of calls to Corresponding_ Remote_Type (documentation fix).
3803 2014-07-16 Robert Dewar <dewar@adacore.com>
3805 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
3806 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
3808 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
3809 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
3811 2014-07-16 Robert Dewar <dewar@adacore.com>
3813 * gnat_ugn.texi: Document binder switch -Ra.
3814 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
3816 * opt.ads (List_Closure_All): New switch.
3817 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
3820 2014-07-16 Ben Brosgol <brosgol@adacore.com>
3822 * gnat_rm.texi: Minor edits, to make case consistent in names
3823 of types and fields.
3825 2014-07-16 Robert Dewar <dewar@adacore.com>
3827 * gnat_rm.texi: Document erroneous mixing of thin pointers and
3829 * gnat_ugn.texi: Add note on size of access types about thin
3830 pointers and the use of attribute Unrestricted_Access.
3832 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3834 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
3835 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
3836 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
3837 machinery to detect tampering on bounded vectors.
3839 2014-07-16 Robert Dewar <dewar@adacore.com>
3841 * gnat_rm.texi: Document that leading/trailing asterisks are
3842 now implied for the pattern match string for pragma Warnings
3843 and Warning_As_Error.
3844 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
3845 (Analyze_Pragma, case Warning_As_Error): Call
3846 Acquire_Warning_Match_String.
3847 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
3849 2014-07-16 Bob Duff <duff@adacore.com>
3851 * gnat_ugn.texi: Document need for project file
3852 for --incremental switch for gnat2xml.
3854 2014-07-16 Robert Dewar <dewar@adacore.com>
3856 * gnat_rm.texi: Fix example of non-packable components in packed
3859 2014-07-16 Robert Dewar <dewar@adacore.com>
3861 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
3862 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
3863 upper case in exception messages.
3865 2014-07-16 Robert Dewar <dewar@adacore.com>
3867 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
3868 is renamed Has_Same_Storage.
3869 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
3870 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
3873 2014-07-16 Robert Dewar <dewar@adacore.com>
3875 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
3876 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
3878 2014-07-16 Robert Dewar <dewar@adacore.com>
3880 * gnat_ugn.texi: Add note that integrated
3881 preprocessing cannot be applied to configuration pragma files.
3883 2014-07-16 Yannick Moy <moy@adacore.com>
3885 * sem_attr.adb (Analyze_Attribute/cases Pred
3886 and Succ): Always enable range check on fixed-point types if
3887 not suppressed for the type.
3889 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3891 * sem_util.adb (State_Has_Enabled_Property):
3892 Account for an external property denoted by an others choice.
3894 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3896 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
3897 * exp_ch7.adb (Process_Declarations): There is no need to check
3898 that a transient object being hooked is controlled as it would
3899 not have been hooked in the first place.
3900 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
3901 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
3902 (Is_Aliased): A renaming of a transient controlled object is
3903 not considered aliasing when it occurs within an expression
3905 (Requires_Cleanup_Actions): There is no need to
3906 check that a transient object being hooked is controlled as it
3907 would not have been hooked in the first place.
3908 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
3910 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
3912 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
3913 the outer level of routine Analyze_Aspect_Specifications. Ensure
3914 that the corresponding pragmas of aspects Initial_Condition and
3915 Initializes are inserted after pragma SPARK_Mode.
3917 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3919 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
3920 properly a choice list with more than one choice, where each
3921 is an aggregate denoting a sequence of array indices for a
3922 multidimentional array. For SPARK use.
3924 2014-07-16 Vadim Godunko <godunko@adacore.com>
3926 * a-coinho-shared.adb (Adjust): Create
3927 copy of internal shared object and element when source container
3930 (Query_Element): Likewise.
3931 (Update_Element): Likewise.
3932 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
3933 to get reference for empty holder.
3934 (Reference): Likewise.
3936 2014-07-16 Thomas Quinot <quinot@adacore.com>
3938 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
3939 from Process_Transient_Oject.
3940 * exp_ch4.ads: Ditto.
3941 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
3942 declaration as an action on the topmost enclosing expression,
3943 not on a possibly conditional subexpreession.
3945 2014-07-16 Vadim Godunko <godunko@adacore.com>
3947 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
3948 Fix parameter mode of Update_Element.
3950 2014-07-16 Robert Dewar <dewar@adacore.com>
3952 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
3955 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3957 * a-cohase.ads: Type Iterator must be controlled, so that the
3958 tampering bit is properly set through an iteration.
3959 * a-cohase.adb: Add Finalize operation for type Iterator.
3961 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3963 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
3966 2014-07-16 Ed Schonberg <schonberg@adacore.com>
3968 * a-coinho-shared.adb: Fix spurious accessibility check.
3970 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
3972 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
3974 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
3977 * gnat_rm.texi: Fix errors with makeinfo 5.1.
3979 2014-06-14 Arnaud Charlet <charlet@adacore.com>
3982 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
3984 2014-06-13 Yannick Moy <moy@adacore.com>
3986 * exp_attr.adb: Fix typo in comment.
3987 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
3988 checking in GNATprove_Mode.
3990 2014-06-13 Ed Schonberg <schonberg@adacore.com>
3992 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
3994 2014-06-13 Robert Dewar <dewar@adacore.com>
3996 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
3999 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4001 * sem_prag.adb (Analyze_Pragma): Add local
4002 variable Missing_Parentheses. Emit an error when a state
4003 declaration with options appears without parentheses. Add a
4004 guard to prevent a bogus error when a state declaration may be
4005 interpreted as an option if a previous declaration with options
4006 was not parenthesized.
4008 2014-06-13 Robert Dewar <dewar@adacore.com>
4010 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
4011 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
4012 * checks.ads (Alignment_Warnings_Record): New type.
4013 (Alignment_Warnings): New table
4014 (Validate_Alignment_Check_Warnings): New procedure.
4015 * errout.adb (Delete_Warning_And_Continuations): New procedure
4016 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
4017 Warnings_Treated_As_Errors (Finalize): Minor reformatting
4018 * errout.ads (Warning_Msg): New variable
4019 (Delete_Warning_And_Continuations): New procedure
4020 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
4021 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
4023 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4025 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
4027 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4029 * errout.adb (SPARK_Msg_N): New routine.
4030 (SPARK_Msg_NE): New routine.
4031 * errout.ads Add a section on SPARK-related error routines.
4032 (SPARK_Msg_N): New routine.
4033 (SPARK_Msg_NE): New routine.
4034 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
4035 pragma Abstract_State is always inserted after SPARK_Mode.
4036 (Insert_After_SPARK_Mode): New routine.
4037 * sem_prag.adb (Analyze_Abstract_State,
4038 Analyze_Constituent, Analyze_External_Property,
4039 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
4040 Analyze_Global_List, Analyze_Initialization_Item,
4041 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
4042 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
4043 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
4044 Analyze_Refined_Global_In_Decl_Part,
4045 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
4046 Check_Aspect_Specification_Order, Check_Constituent_Usage,
4047 Check_Declaration_Order, Check_Dependency_Clause,
4048 Check_Duplicate_Mode, Check_Duplicate_Option,
4049 Check_Duplicate_Property, Check_External_Properties,
4050 Check_External_Property, Check_Function_Return,
4051 Check_Matching_Constituent, Check_Matching_State,
4052 Check_Mode_Restriction_In_Enclosing_Context,
4053 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
4054 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
4055 Has_Extra_Parentheses, Inconsistent_Mode_Error,
4056 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
4057 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
4058 Report_Unrefined_States, Report_Unused_Constituents,
4059 Report_Unused_States, Role_Error, Usage_Error):
4060 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
4061 to report semantic errors only when SPARK_Mode is on.
4062 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
4063 pragma Depends explicitly, this is now done by the analysis.
4064 (Analyze_Global_In_Decl_List): Do not check the syntax of
4065 pragma Global explicitly, this is now done by the analysis.
4066 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
4067 pragma Initializes explicitly, this is now done by the analysis.
4068 (Analyze_Part_Of): Do not check the syntax of the encapsulating
4069 state, this is now done by the analysis.
4070 (Analyze_Pragma): Do
4071 not check the syntax of a state declaration, this is now done
4073 (Analyze_Refined_Depends_In_Decl_Part): Do not
4074 check the syntax of pragma Refined_Depends explicitly, this is now
4075 done by the analysis.
4076 (Analyze_Refined_Global_In_Decl_Part): Do
4077 not check the syntax of pragma Refined_Global explicitly, this is
4078 now done by the analysis.
4079 (Analyze_Refined_State_In_Decl_Part):
4080 Do not check the syntax of pragma Refined_State explicitly, this
4081 is now done by the analysis.
4082 (Check_Dependence_List_Syntax): Removed.
4083 (Check_Global_List_Syntax): Removed.
4084 (Check_Initialization_List_Syntax): Removed.
4085 (Check_Item_Syntax): Removed.
4086 (Check_Missing_Part_Of): Do not consider items from an instance.
4087 (Check_Refinement_List_Syntax): Removed.
4088 (Check_State_Declaration_Syntax): Removed.
4089 (Collect_Global_List): Do not raise Program_Error when the input is
4091 (Process_Global_List): Do not raise Program_Error when the input
4093 * sem_ch13.adb: Minor reformatting.
4095 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4097 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
4098 that is an interface definition with an interface list.
4099 (Process_Full_View): Move error message on missmatched interfaces
4100 between views to the declaration of full view, for clarity.
4101 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
4104 2014-06-13 Robert Dewar <dewar@adacore.com>
4106 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
4109 2014-06-13 Robert Dewar <dewar@adacore.com>
4111 * makeutl.adb: Minor reformatting.
4113 2014-06-13 Gail Schenker <schenker@adacore.com>
4115 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
4116 associated flag (d.z), no longer needed.
4118 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4120 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
4121 Export aspects, do not check whether a corresponding Convention
4122 aspect has been specified. Convention is optional in Ada2012,
4123 and defaults to Convention_Ada.
4125 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
4127 * checks.adb (Apply_Address_Clause_Check): Only issue the new
4128 warning if the propagation warning is issued.
4130 2014-06-13 Thomas Quinot <quinot@adacore.com>
4132 * exp_ch4.adb: Minor reformatting.
4134 2014-06-13 Robert Dewar <dewar@adacore.com>
4136 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
4137 Handle float range check case (Expand_N_Attribute_Reference,
4138 case Succ): Handle float range check case.
4139 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
4142 2014-06-13 Vincent Celier <celier@adacore.com>
4144 * makeutl.ads (Compute_Builder_Switches): Change name of
4145 parameter Root_Environment to Env.
4146 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
4147 Env parameter of procedure Get_Or_Create_Configuration_File.
4148 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
4149 of new parameter Env.
4150 * prj-conf.ads (Locate_Runtime): New parameter Env of type
4151 Prj.Tree.Environment.
4153 2014-06-13 Robert Dewar <dewar@adacore.com>
4155 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
4157 2014-06-13 Robert Dewar <dewar@adacore.com>
4159 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
4161 * sem_attr.adb: Minor code reformatting and simplification.
4162 * checks.adb: Fix minor typo.
4164 2014-06-13 Emmanuel Briot <briot@adacore.com>
4166 * g-comlin.adb (Get_Argument): fix expansion
4167 of command line arguments (e.g. "*.adb") when using a custom
4168 parser. The parser was not passed to the recursive call, and
4169 thus we were trying to do the expansion on the default command
4172 2014-06-13 Thomas Quinot <quinot@adacore.com>
4174 * exp_ch9.adb: Minor reformatting.
4176 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4178 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
4179 To determine whether the attribute should be expanded, examine
4180 whether the enclosing postcondition pragma is to be checked,
4181 rather than using the internal flag Assertions_Enabled.
4183 2014-06-13 Ben Brosgol <brosgol@adacore.com>
4185 * gnat_rm.texi: Minor fixes.
4186 * gnat_ugn.texi: Added a missing "@itemize".
4188 2014-06-13 Robert Dewar <dewar@adacore.com>
4190 * debug.adb: Remove -gnatd.1 flag documentation.
4191 * layout.adb (Layout_Type): Remove special handling of size
4192 for anonymous access type.
4193 * sem_ch3.adb (Replace_Type): Remove special handling of size
4194 for anonymous access type.
4196 2014-06-13 Robert Dewar <dewar@adacore.com>
4198 * debug.adb: Document debug flag -gnatd.1.
4199 * layout.adb (Layout_Type): Size change for anonymous access
4200 types under -gnatd.1.
4201 * sem_ch3.adb (Replace_Type): Size change for anonymous access
4202 types under -gnatd.1.
4204 2014-06-13 Robert Dewar <dewar@adacore.com>
4206 * layout.adb (Layout_Type): Anonymous access types designating
4207 unconstrained arrays are always thin pointers.
4208 * sem_ch3.adb (Replace_Type): Anonymous access types designating
4209 unconstrained arrays are always thin pointers.
4211 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4213 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
4214 to resolve the prefix of an attribute that is an entity name
4215 and may be a parameterless call. Minor code reorganization.
4217 2014-06-13 Robert Dewar <dewar@adacore.com>
4219 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
4221 * opt.ads (Compiler_Unit): New flag.
4222 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
4223 for null statement sequence (not allowed in compiler unit).
4224 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
4226 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
4228 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
4229 Check_Compiler_Unit.
4230 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
4231 Check_Compiler_Unit (this construct is not allowed in compiler
4233 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
4234 Set Opt.Compiler_Unit.
4236 2014-06-13 Geert Bosch <bosch@adacore.com>
4238 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
4239 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
4240 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
4242 2014-06-13 Robert Dewar <dewar@adacore.com>
4244 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
4246 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4248 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
4249 types in SPARK as it is poorly placed and poorly formulated. The
4250 check was flagging ALL volatile entities as illegal in SPARK.
4251 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
4252 types as illegal in SPARK.
4254 2014-06-13 Robert Dewar <dewar@adacore.com>
4256 * sem_cat.adb: Minor reformatting.
4258 2014-06-13 Yannick Moy <moy@adacore.com>
4260 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
4262 2014-06-13 Arnaud Charlet <charlet@adacore.com>
4264 * gnat_rm.texi: Add detail on SPARK_05 restriction.
4266 2014-06-13 Bob Duff <duff@adacore.com>
4268 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
4269 Add assertions requiring the secondary stack to be initialized.
4270 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
4271 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
4272 secondary stack is initialized before calling Init_Tasking_Soft_Links,
4273 by adding pragmas Elaborate_Body.
4275 2014-06-13 Thomas Quinot <quinot@adacore.com>
4277 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
4278 kludge disabling new legality check.
4280 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4282 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
4284 (Freeze_Type): Volatile types are now illegal in SPARK.
4286 2014-06-13 Robert Dewar <dewar@adacore.com>
4288 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
4289 * gnat_rm.texi: Document aspect Thread_Local_Storage.
4291 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4293 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
4294 value is a temporary that renames an aggregate is legal in a
4295 preelaborated unit. Illegalities, if any will be detected in
4296 the aggregate components.
4298 2014-06-13 Ed Schonberg <schonberg@adacore.com>
4300 * einfo.ads: Minor reformatting an comment expansion.
4302 2014-06-13 Robert Dewar <dewar@adacore.com>
4304 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
4306 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
4308 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
4309 * sem_warn.adb: Minor reformatting.
4311 2014-06-13 Doug Rupp <rupp@adacore.com>
4313 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
4316 2014-06-13 Yannick Moy <moy@adacore.com>
4318 * sem_warn.adb (Check_Unset_References): Take
4319 case of Refined_Post into account in Within_Postcondition check.
4321 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
4323 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
4326 2014-06-13 Yannick Moy <moy@adacore.com>
4328 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
4329 Aspect_Export): Consider that variables may be set outside the program.
4331 2014-06-13 Robert Dewar <dewar@adacore.com>
4333 * back_end.adb (Make_Id): New function.
4334 (Make_SC): New function.
4335 (Set_RND): New procedure.
4336 * back_end.ads (Make_Id): New function.
4337 (Make_SC): New function.
4338 (Set_RND): New procedure.
4339 * einfo.ads: Minor comment updates.
4340 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
4341 * gnat1drv.adb (Gnat1drv): New calling sequence for
4342 Get_Target_Parameters.
4343 (Gnat1drv): Move Atree.Initialize here from Frontend.
4344 * targparm.adb (Get_Target_Parameters): New calling
4345 sequence (Get_Target_Parameters): Handle pragma Restriction
4347 * targparm.ads (Get_Target_Parameters): New calling sequence.
4349 2014-06-13 Gary Dismukes <dismukes@adacore.com>
4351 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
4352 loop if the pragma does not come from source, so that an implicit
4353 pragma Import only applies to the first declaration, avoiding
4354 possible conflicts with earlier explicit and implicit declarations
4355 due to multiple Provide_Shift_Operators pragmas.
4356 (Set_Imported): Remove previous fix that bypassed pragma duplication
4358 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
4359 of Provide_Shift_Operators.
4361 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
4363 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
4364 string pointer directly to set_decl_section_name.
4366 2014-06-11 Robert Dewar <dewar@adacore.com>
4368 * sem_ch13.adb: Minor reformatting.
4370 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4372 * sem_prag.adb (Check_Clause_Syntax): Add new
4373 local variable Outputs. Account for the case where multiple
4374 output items appear as an aggregate.
4376 2014-06-11 Robert Dewar <dewar@adacore.com>
4378 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
4381 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4383 * einfo.ads: Minor reformatting.
4385 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4387 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
4388 new variable First_Node. Update the position after all insertions have
4389 taken place to First_Node.
4391 2014-06-11 Robert Dewar <dewar@adacore.com>
4393 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
4394 * layout.adb (Layout_Type): Remove test of -gnatd.1.
4396 2014-06-11 Robert Dewar <dewar@adacore.com>
4398 * sem_ch13.adb: Minor reformatting.
4400 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4402 * sem_prag.adb (Check_Clause_Syntax): Add new
4403 local variable Outputs. Account for the case where multiple
4404 output items appear as an aggregate.
4406 2014-06-11 Robert Dewar <dewar@adacore.com>
4408 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
4411 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4413 * einfo.ads: Minor reformatting.
4415 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4417 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
4418 new variable First_Node. Update the position after all insertions have
4419 taken place to First_Node.
4421 2014-06-11 Robert Dewar <dewar@adacore.com>
4423 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
4424 * layout.adb (Layout_Type): Remove test of -gnatd.1.
4426 2014-06-11 Thomas Quinot <quinot@adacore.com>
4428 * freeze.ads: Minor reformatting.
4429 * checks.adb (Determine_Range): Do not attempt to determine
4430 the range of a deferred constant whose full view has not been
4432 * sem_res.adb (Resolve): Remove undesirable guard against
4433 resolving expressions from expression functions.
4435 2014-06-11 Robert Dewar <dewar@adacore.com>
4437 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
4439 * layout.adb (Layout_Type): Make anonymous access types for
4440 subprogram formal types and return types always thin. For now
4441 only enabled if -gnatd.1 set.
4443 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4445 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
4446 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
4447 subprogram must be a null procedure.
4449 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4451 * sem_prag.adb (Analyze_Input_Item): Allow formal
4452 parameters to appear as input_items in an initialization_list
4453 of pragma Initializes. Encapsulation now applies to states and
4454 variables only (as it should). Add RM references to key errors.
4455 * sem_prag.adb (Set_Imported): Suppress errors
4456 about preceding Imports when the pragma does not come from source,
4457 which can happen through use of pragma Provide_Shift_Operators.
4459 2014-06-11 Thomas Quinot <quinot@adacore.com>
4461 * sem_ch3.adb: Minor reformatting.
4462 * einfo.ads (Full_View): Minor comment update.
4464 2014-06-11 Robert Dewar <dewar@adacore.com>
4466 * einfo.adb (Is_Independent): New flag.
4467 * einfo.ads (Is_Independent): New flag.
4468 (Has_Independent_Components): Clean up and fix comments.
4469 * sem_prag.adb (Fix_Error): Deal with changing argument
4470 [of] to entity [for].
4471 (Analyze_Pragma, case Independent): Set Is_Independent flag
4472 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
4473 in all components of specified record.
4475 2014-06-11 Thomas Quinot <quinot@adacore.com>
4477 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
4478 Set proper Etype on bounds of dummy type created for analysis
4481 2014-06-11 Robert Dewar <dewar@adacore.com>
4483 * debug.adb: Minor comment fix (add missing section of dot
4486 2014-06-11 Robert Dewar <dewar@adacore.com>
4488 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
4489 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
4490 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
4491 * errout.adb (Output_Messages): Avoid duplicate output for
4492 library level instance.
4493 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
4494 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
4495 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
4496 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
4497 accomodate largest modulus value.
4498 * gnat_ugn.texi: Minor updates.
4500 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4502 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
4503 load body of generic package or its parent, if body is optional
4504 and the unit does not require a body.
4506 2014-06-11 Robert Dewar <dewar@adacore.com>
4508 * gnat_rm.texi: Document System.Unsigned_Types.
4509 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
4510 * s-unstyp.ads: Update comments (this is now user available unit).
4512 2014-06-11 Robert Dewar <dewar@adacore.com>
4514 * make.adb, sem_res.adb: Minor reformatting.
4516 2014-06-11 Thomas Quinot <quinot@adacore.com>
4518 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
4519 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
4520 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
4521 Preelaborate_05 to just Preelaborate in runtime units, and similarly
4522 change Pure_05 to just Pure.
4524 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4526 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
4527 analysis if error has been posted on subprogram body.
4529 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4531 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
4532 rule given in RM 13.1 (8/1) for operational attributes to stream
4533 attributes: the attribute must apply to a first subtype. Fixes
4534 missing errors in ACATS test bdd2004.
4536 2014-06-11 Robert Dewar <dewar@adacore.com>
4538 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
4539 record type if restriction No_Implicit_Conditionals is active.
4540 (Expand_N_Object_Declaration): Don't allow default initialization
4541 for variant record type if restriction No_Implicit_Condition is active.
4542 (Build_Variant_Record_Equality): Don't build for variant
4543 record type if restriction No_Implicit_Conditionals is active.
4544 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
4545 No_Implicit_Conditionals.
4546 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
4548 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
4550 * i-cstrin.ads: Update comments.
4552 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4554 * sem_res.adb (Resolve_Selected_Component): Handle properly a
4555 selected component whose prefix is overloaded, when none of the
4556 interpretations matches the expected type.
4558 2014-06-11 Bob Duff <duff@adacore.com>
4560 * make.adb (Wait_For_Available_Slot): Give a more
4561 informative error message; if the ALI file is not found, print
4562 the full path of what it's looking for.
4564 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
4566 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
4567 option to specify the result file encoding.
4569 2014-06-11 Robert Dewar <dewar@adacore.com>
4571 * errout.ads, sem_ch12.adb: Minor reformatting.
4572 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
4573 * lib-xref.adb: Minor reformatting.
4574 * restrict.adb: Minor code reorganization (put routines in
4577 2014-06-11 Yannick Moy <moy@adacore.com>
4579 * einfo.ads: Minor typo in comment
4581 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4583 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
4584 formal private types and private type extensions, to indicate
4585 variable in a generic unit whose uninitialized use suggest that
4586 actual type should be fully initialized.
4587 Needs_Initialized_Actual: removed, functionaity replaced by
4589 * lib-xref.adb (Generate_Reference): Generate a reference for
4590 variables of a formal type when the unit is not the main unit,
4591 to enable appropriate warnings in an instance.
4592 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
4593 of variable in a generic unit that suggests that actual type
4594 should be full initialized.
4595 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
4596 and do not emot warning, which now only appears in an instance.
4598 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
4600 * gnat_ugn.texi: Fix minor typo.
4602 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
4604 * sem_ch3.adb Add with and use clause for Sem_Ch10.
4605 (Analyze_Declarations): Code reformatting. Analyze the contract
4606 of a subprogram body stub at the end of the declarative region.
4607 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
4608 now a variable. Do not process the body if its contract is not
4609 available. Account for subprogram body stubs when extracting
4610 the corresponding spec.
4611 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
4613 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
4615 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
4616 Account for subprogram body stubs when extracting the
4618 (Analyze_Global_In_Decl_List):
4619 Account for subprogram body stubs when extracting the
4621 (Analyze_Refined_Depends_In_Decl_Part):
4622 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
4623 of the related body. Spec_Is now a variable. Account for
4624 subprogram body stubs when extracting the corresponding spec.
4625 (Analyze_Refined_Global_In_Decl_Part): Use
4626 Find_Related_Subprogram_Or_Body to retrieve the declaration
4627 of the related body. Spec_Is now a variable. Account for
4628 subprogram body stubs when extracting the corresponding spec.
4629 (Collect_Subprogram_Inputs_Output): Account for subprogram body
4630 stubs when extracting the corresponding spec.
4632 2014-06-11 Vincent Celier <celier@adacore.com>
4634 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
4637 2014-06-11 Robert Dewar <dewar@adacore.com>
4639 * debug.adb: Add debug flag -gnatd.q.
4640 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
4642 * styleg.adb (Check_Xtra_Parens): Message should be a style
4644 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
4645 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
4646 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
4647 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
4649 2014-06-11 Ben Brosgol <brosgol@adacore.com>
4651 * gnat_rm.texi: Revised chapter on Implementation Defined
4654 2014-06-11 Geert Bosch <bosch@adacore.com>
4656 * s-exctab.adb: avoid race conditions in exception registration.
4658 2014-06-11 Robert Dewar <dewar@adacore.com>
4660 * errout.adb (Warn_Insertion): New function.
4661 (Error_Msg): Use Warn_Insertion and Prescan_Message.
4662 (Error_Msg_Internal): Set Info field of error object.
4663 (Error_Msg_NEL): Use Prescan_Message.
4664 (Set_Msg_Text): Don't store info: at start of message.
4665 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
4666 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
4667 * errout.ads: Document new ?$? and >$> insertion sequences
4668 Document use of "(style)" and "info: "
4669 * erroutc.adb (dmsg): Print several missing fields
4670 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
4671 Deal with new tagging of info messages
4672 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
4673 Add field Info (Prescan_Message): New procedure, this procedure
4674 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
4675 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
4676 sem_elab.adb: Follow new rules for info message (info belongs
4677 only at the start of a message, and only in the first message,
4678 not in any of the continuations).
4679 * gnat_ugn.texi: Document full set of warning tags.
4681 2014-06-11 Gary Dismukes <dismukes@adacore.com>
4683 * sem_util.adb: Minor typo fix.
4685 2014-06-11 Ed Schonberg <schonberg@adacore.com>
4687 * sem_warn.adb (Check_References): Do not emit spurious warnings
4688 on uninitialzed variable of a formal private type if variable
4691 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
4693 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
4694 set_decl_section_name accessor.
4696 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
4698 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
4699 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
4700 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
4702 2014-05-21 Robert Dewar <dewar@adacore.com>
4704 * layout.adb: Minor reformatting.
4705 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
4708 2014-05-21 Robert Dewar <dewar@adacore.com>
4710 * restrict.ads (Implementation_Restriction): Add entry for
4712 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
4713 Ada.[Wide_[Wide_]Text_IO.
4714 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
4715 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
4716 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
4717 Wide_Wide_Value if restriction No_Fixed_IO is set.
4718 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
4720 2014-05-21 Robert Dewar <dewar@adacore.com>
4722 * gnatcmd.adb: Minor error msg changes (no upper case letter
4724 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
4727 2014-05-21 Robert Dewar <dewar@adacore.com>
4729 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
4730 via generic formals.
4731 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
4734 2014-05-21 Thomas Quinot <quinot@adacore.com>
4736 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
4737 more accurately describe that this subprogram needs to come into
4738 play also in cases where no byte swapping is involved, because
4739 it also takes care of some required shifts (left-justification
4742 2014-05-21 Thomas Quinot <quinot@adacore.com>
4744 * freeze.adb (Check_Component_Storage_Order): Indicate whether
4745 a Scalar_Storage_Order attribute definition is present for the
4747 (Freeze_Record_Type): Suppress junk warnings
4748 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
4751 2014-05-21 Robert Dewar <dewar@adacore.com>
4753 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
4754 to Kill_Elaboration_Checks.
4756 2014-05-21 Gary Dismukes <dismukes@adacore.com>
4758 * layout.adb (Assoc_Add): Suppress the optimization of the (E
4759 - C1) + C2 case, when the expression type is unsigned and C1 <
4760 C2, to avoid creating a negative literal when folding.
4762 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4764 * freeze.adb (Freeze_Record_Type): Update the use of
4766 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
4768 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
4769 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
4770 of Is_SPARK_Volatile.
4771 (Analyze_Loop_Parameter_Specification):
4772 Update the use of Is_SPARK_Volatile.
4773 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
4774 formal parameter when its type is volatile.
4775 * sem_prag.adb (Analyze_Global_Item): Update the use of
4777 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
4778 determines whether an entity is a volatile source SPARK object.
4779 * sem_util.adb (Has_Enabled_Property): Accout for external
4780 properties being set on objects other than abstract states
4781 and variables. An example would be a formal parameter.
4782 (Is_SPARK_Volatile): New routine.
4783 (Is_SPARK_Volatile_Object):
4784 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
4785 when checking entities and/or types.
4786 * sem_util.ads (Is_SPARK_Volatile): New routine.
4788 2014-05-21 Robert Dewar <dewar@adacore.com>
4790 * sem_warn.adb: Minor fix to warning messages (use ?? instead
4793 2014-05-21 Vincent Celier <celier@adacore.com>
4795 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
4796 switch --version and --help.
4798 2014-05-21 Robert Dewar <dewar@adacore.com>
4800 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
4802 2014-05-21 Ed Schonberg <schonberg@adacore.com>
4804 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
4805 iterator variable when the domain of iteration is a formal
4806 container and this is an element iterator.
4808 2014-05-21 Bob Duff <duff@adacore.com>
4810 * sem_ch12.adb: Minor reformatting.
4812 2014-05-21 Robert Dewar <dewar@adacore.com>
4814 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
4816 2014-05-21 Robert Dewar <dewar@adacore.com>
4818 * sem_elab.adb: Minor reformatting.
4819 * s-taprop.ads: Minor comment fix.
4820 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
4821 Kill_Elaboration_Checks.
4822 * errout.adb, erroutc.adb: Minor reformatting.
4824 2014-05-21 Thomas Quinot <quinot@adacore.com>
4826 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
4827 component. No byte swapping occurs, but this procedure also takes
4828 care of appropriately justifying the argument.
4830 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4832 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
4834 (Analyze_Subprogram_Body_Helper): Move the
4835 analysis of aspect specifications and the processing of the
4836 subprogram body contract after inlining has taken place.
4837 (Diagnose_Misplaced_Aspect_Specifications): Removed.
4839 2014-05-21 Javier Miranda <miranda@adacore.com>
4841 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
4843 2014-05-21 Robert Dewar <dewar@adacore.com>
4845 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
4846 continuations any more.
4848 2014-05-21 Ed Schonberg <schonberg@adacore.com>
4850 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
4851 present in formal_Private_Definitions and on private extension
4852 declarations of a formal derived type. Set when the use of the
4853 formal type in a generic suggests that the actual should be a
4854 fully initialized type.
4855 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
4856 to indicate that an entity of a generic type has default
4857 initialization, and that the corresponing actual type in any
4858 subsequent instantiation should be fully initialized.
4859 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
4860 to emit a warning if the actual for a generic type on which
4861 Needs_Initialized_Actual is set is not a fully initialized type.
4863 2014-05-21 Robert Dewar <dewar@adacore.com>
4865 * sem_elab.adb, prj-dect.adb: Minor reformatting.
4867 2014-05-21 Robert Dewar <dewar@adacore.com>
4869 * erroutc.ads: Minor comment addition.
4871 2014-05-21 Robert Dewar <dewar@adacore.com>
4873 * errout.ads: Add documentation for use of >*> tag.
4874 * restrict.adb: Make sure we use >*> tag for restriction warnings.
4876 2014-05-21 Gary Dismukes <dismukes@adacore.com>
4878 * debug.adb: Add case of illegal overriding_indicator for a
4879 protected subprogram body to description of -gnatd.E switch.
4880 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
4881 for cases of giving overriding_indicators on protected subprogram
4882 bodies, but change this to a warning if -gnatd.E is enabled. No
4883 longer give a style warning about missing indicators on protected
4886 2014-05-21 Robert Dewar <dewar@adacore.com>
4888 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
4889 sem_elab.ads: Minor reformatting.
4890 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
4893 2014-05-21 Pascal Obry <obry@adacore.com>
4895 * prj-dect.adb: Allow package Install in aggregate project.
4897 2014-05-21 Robert Dewar <dewar@adacore.com>
4899 * sem_ch13.adb (Analyze_Aspect_Specifications):
4900 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
4901 * sem_prag.adb: Minor comment improvements.
4903 2014-05-21 Ed Schonberg <schonberg@adacore.com>
4905 * sem_ch12.adb (Install_Body): When checking whether freezing of
4906 instantiation must be delayed, verify that the common enclosing
4907 subprogram to generic and instance is in fact an overloadable
4910 2014-05-21 Vincent Celier <celier@adacore.com>
4912 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
4913 mains with the same name and fail if there is more than one.
4914 * prj.ads, prj.adb (Find_All_Sources): New function
4916 2014-05-21 Robert Dewar <dewar@adacore.com>
4918 * sem_ch13.adb: Minor reformatting.
4919 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
4920 * sem_prag.adb: Minor error message improvement.
4922 2014-05-21 Yannick Moy <moy@adacore.com>
4924 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
4925 (Enclosing_Subprogram_Or_Package): Only return a library-level
4928 2014-05-21 Javier Miranda <miranda@adacore.com>
4930 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
4931 to the full view of the parent type when processing a derived type
4932 which is the full view of a private type not defined in a generic
4933 unit which is derived from a private type with discriminants
4934 whose full view is a non-tagged record type.
4936 2014-05-21 Javier Miranda <miranda@adacore.com>
4938 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
4939 Complete previous patch.
4941 2014-05-21 Thomas Quinot <quinot@adacore.com>
4944 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
4945 Provide a behaviour more consistent with underlying datagram
4946 socket: do not attempt to loop over Send_Socket/Receive_Socket
4947 iterating along the buffer.
4949 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
4951 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
4952 or a tagged type is not labelled as volatile. Ensure that a
4953 non-volatile type has no volatile components.
4954 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
4955 Obj_Typ. Code reformatting. Ensure that a discriminated or
4956 tagged object is not labelled as volatile.
4957 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
4958 pragma Volatile applies to a full type declaration or an object
4959 declaration when SPARK mode is on.
4961 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
4963 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
4964 providing options needed for compiling the argument source for
4965 the situation when a project file can be used as a tool parameter.
4967 2014-05-21 Gary Dismukes <dismukes@adacore.com>
4969 * gnat_rm.texi: Minor typo fix.
4971 2014-05-21 Robert Dewar <dewar@adacore.com>
4973 * stand.adb (Tree_Read): Read missing entities.
4974 (Tree_Write): Write missing entities.
4976 2014-05-21 Ben Brosgol <brosgol@adacore.com>
4978 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
4979 section in gnatmetric chapter.
4981 2014-05-21 Robert Dewar <dewar@adacore.com>
4983 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
4984 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
4985 post-call copy write back (see detailed comment in code).
4986 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
4988 * tbuild.ads: Minor reformatting.
4990 2014-05-21 Robert Dewar <dewar@adacore.com>
4992 * stand.ads: Add warning about adding new entities and
4993 Tree_Read/Tree_Write.
4995 2014-05-21 Robert Dewar <dewar@adacore.com>
4997 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
4998 references to restricted entities within the units in which they
5001 2014-05-21 Robert Dewar <dewar@adacore.com>
5003 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
5004 simplify the needed test, and also deal with failure to catch
5005 situations with non-standard names.
5006 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
5007 (Source_File_Is_Subunit): Removed, no longer used.
5009 2014-05-21 Javier Miranda <miranda@adacore.com>
5012 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
5013 renaming of an access to interface object there is no need to
5014 generate extra code to reference the tag.
5016 2014-05-21 Robert Dewar <dewar@adacore.com>
5018 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
5019 Warnings (Off, string).
5021 2014-05-21 Robert Dewar <dewar@adacore.com>
5023 * osint.adb: Fix three error messages to say invalid instead
5025 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
5026 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
5027 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
5029 2014-05-21 Ed Schonberg <schonberg@adacore.com>
5031 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
5032 sem_ch9.ads: Move discriminant manipulation routines for analysis of
5033 aspect specifications from sem_ch9 to sem_ch13, where they belong.
5035 2014-05-21 Robert Dewar <dewar@adacore.com>
5037 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
5038 Clearly document -gnatyg (GNAT style switches).
5039 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
5040 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
5041 available for VMS after all.
5042 * warnsw.adb: Reorganize to eliminate duplicated code
5043 (Restore_Warnings): Add a couple of missing entries
5044 (Save_Warnings): Add a couple of missing entries.
5045 * warnsw.ads: Add missing entries to Warning_Record (not clear
5046 what the impact is).
5048 2014-05-21 Robert Dewar <dewar@adacore.com>
5050 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
5052 * errout.ads: Document ?*? (restriction warning) insertion.
5053 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
5055 * erroutc.ads: Document use of * for restriction warning tag.
5056 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
5058 2014-05-21 Ed Schonberg <schonberg@adacore.com>
5060 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
5061 make discriminants immediately visible when analyzing an aspect
5062 of a subtype declaration.
5063 (Uninstall_Discriminants): Do not apply to the entity in a
5064 subtype declaration.
5066 2014-05-21 Ed Schonberg <schonberg@adacore.com>
5068 * sem_util.adb: Code clean up.
5070 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
5072 * gnat_ugn.texi: Document -Werror.
5074 2014-05-21 Bob Duff <duff@adacore.com>
5076 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
5077 This was returning False if the Object is a constant view. Fix
5078 it to return True in that case, because it might be a view of
5080 (Has_Discriminant_Dependent_Constraint): Fix latent
5081 bug; this function was crashing when passed a discriminant.
5083 2014-05-21 Robert Dewar <dewar@adacore.com>
5085 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
5086 * s-arit64.adb: Minor code reorganization.
5087 * sem_prag.adb: Minor comment fix (remove erroneous use of the
5090 2014-05-21 Robert Dewar <dewar@adacore.com>
5092 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
5093 computing new table size.
5095 2014-05-21 Robert Dewar <dewar@adacore.com>
5097 * einfo.ads: Minor reformatting.
5098 * ceinfo.adb: Deal with slight format change of einfo.ads.
5100 2014-05-21 Ed Schonberg <schonberg@adacore.com>
5102 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
5103 implementation of the SPARK 2014 rule concerning private child
5106 2014-05-21 Vincent Celier <celier@adacore.com>
5108 * makeusg.adb: Add switch -d to usage.
5110 2014-05-21 Ed Schonberg <schonberg@adacore.com>
5112 * sem_util.adb (Find_Actual): If an actual that is the prefix
5113 of an enclosing prefixed call has been rewritten, use Nkind
5114 and Sloc to identify the corresponding formal, when handling
5115 deferred references.
5117 2014-05-21 Robert Dewar <dewar@adacore.com>
5119 * debug.adb: Document -gnatd.z switch.
5120 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
5122 2014-05-21 Robert Dewar <dewar@adacore.com>
5124 * einfo.ads (Can_Never_Be_Null): Minor comment update.
5125 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
5126 error message change.
5127 * s-arit64.adb ("abs"): New function. Use expression functions
5128 for the simple conversions and arithmetic.
5130 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
5132 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
5133 set function_start_locus.
5135 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
5137 * utils.c (gnat_write_global_declarations): Adjust the flags put on
5140 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
5142 * gcc-interface/decl.c (change_qualified_type): New static function.
5143 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
5144 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
5145 <E_Array_Subtype>: Likewise.
5146 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
5147 (gnat_to_gnu_component_type): Likewise.
5148 (gnat_to_gnu_param): Likewise.
5150 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
5152 * fe.h (Set_Present_Expr): Move around.
5153 (End_Location): New macro.
5154 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
5156 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
5158 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
5159 lieu of more verbose construct.
5160 * gcc-interface/trans.c (Call_to_gnu): Likewise.
5161 (gnat_to_gnu): Likewise. Remove obsolete code.
5163 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
5165 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
5166 consider that regular packed arrays can never be superflat.
5168 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
5170 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
5172 * gcc-interface/decl.c (annotate_value): Adjust.
5173 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
5174 (push_range_check_info): Likewise.
5175 (Loop_Statement_to_gnu): Likewise.
5176 (Subprogram_Body_to_gnu): Likewise.
5177 (Compilation_Unit_to_gnu): Likewise.
5178 (start_stmt_group): Likewise.
5179 * gcc-interface/utils.c (init_gnat_utils): Likewise.
5180 (gnat_pushlevel): Likewise.
5181 (maybe_pad_type): Likewise.
5183 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
5185 * seh_init.c: Fix copyright year.
5187 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
5189 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
5190 are defined. Move include windows.h before system.h.
5191 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
5192 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
5194 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
5196 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
5197 to the appropriate type.
5198 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
5199 (pos_to_constructor): Likewise.
5201 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
5203 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
5205 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
5206 Mike Stump <mikestump@comcast.net>
5207 Richard Sandiford <rdsandiford@googlemail.com>
5209 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
5210 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
5211 (annotate_value): Use wide-int interfaces.
5212 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
5214 2014-04-28 Richard Henderson <rth@redhat.com>
5216 * gcc-interface/Makefile.in: Support aarch64-linux.
5218 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
5220 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
5221 add 'Suffix' parameter and adjust comment.
5222 (Get_External_Name_With_Suffix): Delete.
5223 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
5224 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
5226 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
5227 Call Get_External_Name instead of Get_External_Name_With_Suffix.
5228 (Get_Secondary_DT_External_Name): Likewise.
5229 * exp_cg.adb (Write_Call_Info): Likewise.
5230 * exp_disp.adb (Export_DT): Likewise.
5231 (Import_DT): Likewise.
5232 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
5233 parameter with False default.
5234 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
5235 * types.h (Fat_Pointer): Rename into...
5236 (String_Pointer): ...this. Add comment on interfacing rules.
5237 * fe.h (Compiler_Abort): Adjust for above renaming.
5238 (Error_Msg_N): Likewise.
5239 (Error_Msg_NE): Likewise.
5240 (Get_External_Name): Likewise. Add third parameter.
5241 (Get_External_Name_With_Suffix): Delete.
5242 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
5243 (create_concat_name): Adjust call to Get_External_Name, remove call to
5244 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
5245 * gcc-interface/trans.c (post_error): Likewise.
5246 (post_error_ne): Likewise.
5247 * gcc-interface/misc.c (internal_error_function): Likewise.
5249 2014-04-28 Richard Biener <rguenther@suse.de>
5252 * gcc-interface/utils.c: Define flag_isoc11.
5254 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
5256 * gnatvsn.ads (Library_Version): Bump to 4.10.
5258 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
5261 2014-04-22 Richard Henderson <rth@redhat.com>
5263 * gcc-interface/Makefile.in: Support aarch64-linux.
5265 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
5267 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
5268 (Error_Msg_N): Likewise.
5269 (Error_Msg_NE): Likewise.
5270 (Get_External_Name_With_Suffix): Likewise.
5271 * types.h (Fat_Pointer): Delete.
5272 (String_Pointer): New type.
5273 (DECLARE_STRING_POINTER): New macro.
5274 * gcc-interface/decl.c (create_concat_name): Adjust.
5275 * gcc-interface/trans.c (post_error): Likewise.
5276 (post_error_ne): Likewise.
5277 * gcc-interface/misc.c (internal_error_function): Likewise.
5279 2014-04-22 Richard Henderson <rth@redhat.com>
5281 * gcc-interface/Makefile.in: Support aarch64-linux.
5283 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
5284 (__gnat_alternate_stack): Enable for all linux except ia64.
5286 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
5288 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
5289 (Error_Msg_N): Likewise.
5290 (Error_Msg_NE): Likewise.
5291 (Get_External_Name_With_Suffix): Likewise.
5292 * types.h (Fat_Pointer): Delete.
5293 (String_Pointer): New type.
5294 (DECLARE_STRING_POINTER): New macro.
5295 * gcc-interface/decl.c (create_concat_name): Adjust.
5296 * gcc-interface/trans.c (post_error): Likewise.
5297 (post_error_ne): Likewise.
5298 * gcc-interface/misc.c (internal_error_function): Likewise.
5300 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5301 Pierre-Marie de Rodat <derodat@adacore.com>
5303 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
5304 scalar constant instead of a reference for renaming of scalar literal.
5305 Do not create a new object for constant renaming except for a function
5306 call. Make sure a VAR_DECL is created for the renaming pointer.
5307 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
5308 (fold_constant_decl_in_expr): New function.
5309 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
5310 For a constant renaming, try to fold a constant DECL in the result.
5311 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
5312 (Identifier_to_gnu): Reference the renamed object of constant renaming
5314 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
5315 invalidate constant renaming pointers.
5317 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5319 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
5320 (build_vector_type_for_size): New function.
5321 (build_vector_type_for_array): Likewise.
5322 (unchecked_convert): Build an intermediate vector type to convert
5323 from a generic array type to a vector type.
5324 (handle_vector_size_attribute): Reimplement.
5325 (handle_vector_type_attribute): Likewise.
5327 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5329 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
5330 Is_OK_Static_Expression in lieu of Is_Static_Expression to
5331 detect valid arguments.
5333 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
5335 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
5337 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
5339 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
5340 (components_to_record): Likewise.
5341 * gcc-interface/utils.c (make_aligning_type): Likewise.
5342 (maybe_pad_type): Likewise.
5343 (finish_record_type): Likewise.
5344 (rest_of_record_type_compilation): Likewise.
5346 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
5348 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
5349 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
5351 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
5352 hint for Loop_Optimize.
5353 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
5354 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
5355 with new Ivdep hint.
5356 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
5357 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
5358 with new Ivdep hint.
5359 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
5361 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
5362 Robert Dewar <dewar@adacore.com>
5364 * opt.ads (Suppress_Back_Annotation): Remove as unused.
5365 * fe.h (Back_Annotate_Rep_Info): Likewise.
5366 (Global_Discard_Names): Likewise.
5367 (List_Representation_Info): Declare.
5368 * types.h (Uint_Minus_1): Likewise.
5369 * repinfo.ads: Document back-annotation change.
5370 * gcc-interface/gigi.h (init_gnat_decl): Declare.
5371 (destroy_gnat_decl): Likewise.
5372 * gcc-interface/decl.c (annotate_value): Do not create the cache of
5373 annotated values here but...
5374 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
5376 (init_gnat_decl): ...here instead. New function.
5377 (destroy_gnat_decl): Likewise.
5378 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
5379 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
5381 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
5383 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
5384 offset for the field, if any.
5386 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
5387 Svante Signell <svante.signell@gmail.com>
5391 * s-osinte-x32.adb: New file.
5392 * s-linux.ads (Time): New section.
5393 * s-linux-alpha.ads (Time): Likewise.
5394 * s-linux-android.ads (Time: Likewise.
5395 * s-linux-hppa.ads (Time): Likewise.
5396 * s-linux-mipsel.ads (Time): Likewise.
5397 * s-linux-sparc.ads (Time): Likewise.
5398 * s-linux-x32.ads (Time): Likewise.
5399 * s-osprim-x32.ads (timespec): Adjust.
5401 (To_Timespec): Likewise.
5402 * s-osinte-linux.ads (Time): Define local subtypes for those defined
5404 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
5405 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
5406 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
5407 * s-osinte-solaris-posix.ads (timespec): Likewise.
5408 * s-osinte-posix.adb (To_Timespec): Likewise.
5409 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
5411 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
5414 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
5415 * s-linux-android.ads: New file.
5416 * s-intman-android.adb: Likewise.
5417 * s-osinte-android.ads: Adjust.
5418 * sigtramp-armdroid.c: Likewise.
5419 * sigtramp.h: Add Android support.
5421 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
5423 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
5425 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
5428 * system-linux-alpha.ads: Adjust for Ada 2005.
5429 * system-linux-mips.ads: Likewise.
5430 * system-linux-mips64el.ads: Likewise.
5431 * system-linux-mipsel.ads: Likewise.
5432 * system-linux-s390.ads: Likewise.
5433 * system-linux-s390x.ads: Likewise.
5434 * system-linux-sparc.ads: Likewise.
5435 * system-linux-sparcv9.ads: Likewise.
5436 * system-rtems.ads: Likewise.
5437 * system-vxworks-arm.ads: Likewise.
5439 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
5442 * gcc-interface/Makefile.in (target_cpu_default): Revert
5445 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
5448 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
5449 it to set the RM size. Use directly 'size' for the Esize.
5450 (Create_Back_End_Float_Types): Adjust call to above.
5451 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
5452 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
5453 (Write_Target_Dependent_Values): Adjust comment.
5454 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
5456 (Write_Target_Dependent_Values): Write the precision in lieu of size.
5457 (Initialization): Read the precision in lieu of size and compute the
5458 size from the precision and the alignment.
5459 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
5460 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
5461 types for vector modes, pass the size in addition to the precision.
5463 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
5465 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
5467 2014-03-07 Doug Rupp <rupp@adacore.com>
5470 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
5471 (Support_64_Bit_Divides): Removed, no longer used.
5472 (ZCX_By_Default): Enabled.
5474 2014-02-25 Doug Rupp <rupp@adacore.com>
5476 * gcc-interface/Makefile.in (arm-linux):
5477 (EH_MECHANISM): Use ARM unwinder (-arm)
5478 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
5480 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
5481 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
5482 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
5483 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
5484 Add dependencies for sigtramp-armvxw.o.
5486 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5488 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
5490 2014-02-25 Robert Dewar <dewar@adacore.com>
5492 * rtsfind.adb (Is_RTE): Protect against entity with no scope
5493 field (previously this call blew up on the Standard entity).
5494 * sem_attr.adb (Analyze_Attribute, case Access): Remove
5495 test for No_Abort_Statements, this is now handled in
5496 Set_Entity_With_Checks.
5497 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
5498 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
5499 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
5500 Set_Entity_With_Checks.
5501 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
5502 Add checks for No_Abort_Statements.
5504 2014-02-25 Robert Dewar <dewar@adacore.com>
5506 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
5507 Check_Restriction is OK.
5509 2014-02-25 Ed Schonberg <schonberg@adacore.com>
5511 * sem_ch3.adb (Process_Full_View): Better error message when
5512 the full view of a private type without discriminants is an
5514 * sem_ch7.adb (Uninstall_Declarations): Ditto.
5516 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5518 * sigtramp-armvxw.c: Also restore r0.
5520 2014-02-25 Robert Dewar <dewar@adacore.com>
5522 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
5523 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
5524 set unconditionally.
5525 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
5526 any more (Output_Msg_Text): Rewritten with new convention on
5527 output of warnings that are treated as errors.
5528 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
5530 * gnat_rm.texi: Updates to documentation on pragma
5532 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
5533 set Warning_Doc_Switch.
5534 * lib-writ.ads: Add documentation note on ALI file generation
5536 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
5538 * sem_attr.adb (Resolve_Attribute, case Access):
5539 Abort_Task'Access violates the No_Abort_Statements restriction.
5540 * sem_res.adb (Resolve_Call): Check restriction
5541 No_Abort_Statements for call to Abort_Task or a renaming of it.
5543 2014-02-25 Robert Dewar <dewar@adacore.com>
5545 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
5547 * lib.ads: Minor reformatting.
5548 * einfo.ads: Minor reformatting.
5550 2014-02-25 Doug Rupp <rupp@adacore.com>
5552 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
5553 use Short_Descriptor(S) as the argument passing mechanism.
5555 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5557 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
5559 2014-02-25 Robert Dewar <dewar@adacore.com>
5561 * atree.ads (Warnings_Treated_As_Errors): New variable.
5562 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
5563 error object (Initialize): Initialize Warnings_As_Errors_Count
5564 (Write_Error_Summary): Include count of warnings treated as errors.
5565 * erroutc.adb (Warning_Treated_As_Error): New function.
5566 (Matches): Function moved to outer level of package.
5567 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
5568 (Warning_Treated_As_Error): New function.
5569 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
5570 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
5571 * opt.ads (Config_Switches_Type): Add entry for
5572 Warnings_As_Errors_Count.
5573 (Warnings_As_Errors_Count): New variable.
5574 (Warnings_As_Errors): New array.
5575 * par-prag.adb: Add dummy entry for Warning_As_Error.
5576 * sem_prag.adb (Analyze_Pragma): Implement new pragma
5578 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
5580 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
5582 * sigtramp.h: Fix minor inaccuracy.
5584 2014-02-25 Ben Brosgol <brosgol@adacore.com>
5586 * gnat_ugn.texi: Added description of kill command.
5588 2014-02-25 Robert Dewar <dewar@adacore.com>
5590 * gnat_rm.texi (Address_Clauses): Add a section discussing the
5591 problem of address clauses causing unexpected initialization,
5592 including the effect of Initialize_Scalars.
5594 2014-02-25 Robert Dewar <dewar@adacore.com>
5596 * errout.adb: Various changes for better msgs for anonmous access
5598 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
5600 (Buffer_Remove): Version with character argument.
5601 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
5602 of mismatching conventions for access-to-subprogram case.
5603 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
5604 access types in record.
5605 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
5606 types, including in records.
5608 2014-02-25 Doug Rupp <rupp@adacore.com>
5610 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
5611 enhancements and corrections.
5613 2014-02-25 Robert Dewar <dewar@adacore.com>
5615 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
5617 2014-02-25 Robert Dewar <dewar@adacore.com>
5619 * gnat_rm.texi: First set of documentation additions for
5620 predefined RM units.
5621 * checks.adb: Minor reformatting.
5622 * sem_elab.adb (Check_Task_Activation): Minor fix to error
5624 * sem_util.adb: Minor reformatting.
5626 2014-02-25 Arnaud Charlet <charlet@adacore.com>
5628 * usage.adb (Usage): Add help on -gnateC.
5629 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
5630 * opt.ads (Generate_CodePeer_Messages): New flag.
5631 * gnat_ugn.texi: Document new switch -gnateC.
5633 2014-02-25 Ben Brosgol <brosgol@adacore.com>
5635 * gnat_rm.texi: Corrected minor typos in Implementation Defined
5637 * opt.ads: Minor reformatting.
5639 2014-02-25 Robert Dewar <dewar@adacore.com>
5641 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
5642 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
5644 * opt.ads (Warn_Info_Messages): New flag.
5645 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
5647 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
5649 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
5650 * usage.adb: Add documentation of -gnatel/-gnateL Update
5651 documentation of -gnatwl/-gnatwL.
5652 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
5653 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
5655 2014-02-25 Robert Dewar <dewar@adacore.com>
5657 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
5658 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
5659 * interfac.ads: Minor code reorganization (add pragma
5660 Compiler_Unit_Warning).
5661 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
5662 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
5663 Has_Shift_Operator flag.
5664 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
5665 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
5666 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
5667 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
5668 Add entry for Name_Amount.
5669 * checks.adb (Selected_Range_Checks): When checking for a null
5670 range, make sure we use the base type, and not the subtype for
5671 deciding a range is null.
5672 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
5673 for suspicious loop bound which is outside the range of the
5675 * gnat_ugn.texi: Add documentation section "Determining the
5676 Chosen Elaboration Order"
5677 * sem_ch13.adb (UC_Entry): Add field Act_Unit
5678 (Validate_Unchecked_Conversion): Store Act_Unit
5679 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
5680 * treepr.adb: Minor reformatting.
5682 2014-02-25 Arnaud Charlet <charlet@adacore.com>
5684 * usage.adb: Minor: fix typo.
5686 2014-02-25 Robert Dewar <dewar@adacore.com>
5688 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
5689 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
5690 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
5691 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
5692 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
5693 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
5694 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
5695 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
5696 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
5697 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
5698 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
5699 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
5700 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
5701 Compiler_Unit_Warning, change Compiler_Unit everywhere to
5702 Compiler_Unit_Warning.
5704 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
5706 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
5707 in ASIS mode aggregates that are used as aspect definitions.
5709 2014-02-25 Robert Dewar <dewar@adacore.com>
5711 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
5714 2014-02-25 Ed Schonberg <schonberg@adacore.com>
5716 * freeze.adb (Freeze_Entity): If the return type of a function
5717 is a limited view, and the non-limited view has not been seen yet,
5718 defer freezing to some later point.
5720 2014-02-25 Robert Dewar <dewar@adacore.com>
5722 * sem_ch3.adb: Minor reformatting.
5724 2014-02-25 Robert Dewar <dewar@adacore.com>
5726 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
5727 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
5728 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
5729 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
5730 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
5731 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
5732 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
5733 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
5734 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
5735 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
5736 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
5737 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
5738 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
5739 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
5740 snames.ads-tmpl: Change Compiler_Unit everywhere to
5741 Compiler_Unit_Warning.
5743 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5745 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
5746 (Collect_Body_Postconditions_In_Decls): New routine.
5747 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
5748 postcondition aspects or pragmas that appear on a subprogram
5750 (Collect_Spec_Preconditions): Factor out code. Handle
5751 precondition aspects or pragmas that appear on a subprogram
5753 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
5754 aspects that apply to a subprogram body stub is no longer delayed,
5755 the aspects are analyzed on the spot.
5756 (SPARK_Aspect_Error):
5757 Aspects that apply to a subprogram declaration cannot appear in
5759 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
5760 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
5761 is now a local variable. Code cleanup. Analysis related to
5762 the aspects of a subprogram body stub is now carried out by
5763 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
5764 and/or pragmas of a subprogram body stub to the proper body
5765 as this is no longer needed. Do not analyze the aspects of a
5766 subprogram stub when the corresponding source unit is missing.
5767 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
5769 (Analyze_Task_Body_Stub): Flag the illegal use of
5771 (Optional_Subunit): Add local variable Unum.
5772 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
5773 pragma when it applies to a subprogram body stub.
5774 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
5775 Depends and Global can now apply to a subprogram body stub as
5776 long as it acts as its own spec.
5777 (Analyze_Refined_Pragma):
5778 Code reformatting. Refinement pragmas cannot apply to a subunit.
5780 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5782 * einfo.ads Update the usage of flag
5783 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
5784 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
5785 now starts with the letter 'C'. This makes reading expanded
5787 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
5788 Iter_Loop. Signal that an Ada 2012 iterator loop requires
5789 secondary stack management when creating a transient scope for
5790 an element reference.
5791 * exp_util.adb (Process_Statements_For_Controlled_Objects):
5792 When wrapping the statements of a loop, pass the E_Loop entity
5793 to the wrapping machinery.
5794 (Wrap_Statements_In_Block): Add
5795 formal parameter Scop along with comment on usage. Add local
5796 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
5797 block as requiring secondary stack management when the block is
5798 created inside an Ada 2012 iterator loop. This ensures that any
5799 reference objects are reclaimed on each iteration of the loop.
5800 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
5801 tasked with the handling of container iterators as requiring
5802 secondary stack management. This ensures that iterators are
5803 reclaimed when the loop terminates or is exited in any fashion.
5804 * sem_util.adb (Add_Block_Identifier): New routine.
5805 (Find_Enclosing_Iterator_Loop): New routine.
5806 * sem_util.ads (Add_Block_Identifier): New routine.
5807 (Find_Enclosing_Iterator_Loop): New routine.
5809 2014-02-25 Robert Dewar <dewar@adacore.com>
5811 * sinfo.ads: Minor reformatting.
5813 2014-02-25 Tristan Gingold <gingold@adacore.com>
5815 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
5817 2014-02-25 Pascal Obry <obry@adacore.com>
5819 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
5821 2014-02-25 Tristan Gingold <gingold@adacore.com>
5823 * sem_ch10.adb: Minor comment fix.
5825 2014-02-25 Bob Duff <duff@adacore.com>
5827 * s-tasdeb.adb: Misc cleanup of this package,
5828 including printing addresses in hexadecimal.
5829 (Write): Fix minor bug when taking 'Address of an empty string.
5831 2014-02-25 Ed Schonberg <schonberg@adacore.com>
5833 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
5834 public child unit when it does not refer to the abstract state
5835 of a public ancestor.
5837 2014-02-25 Yannick Moy <moy@adacore.com>
5839 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
5840 Validity_Checks in GNATprove and CodePeer modes.
5842 2014-02-25 Pascal Obry <obry@adacore.com>
5844 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
5845 Artifacts attribute.
5847 2014-02-25 Yannick Moy <moy@adacore.com>
5849 * sem_prag.adb: Minor reformatting to get consistent messages.
5851 2014-02-25 Robert Dewar <dewar@adacore.com>
5853 * checks.adb: Minor reformatting.
5854 * sinfo.ads (Do_Range_Check): Document that this flag is never
5855 passed to the back end.
5857 2014-02-25 Yannick Moy <moy@adacore.com>
5859 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
5860 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
5862 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5864 * sem_res.adb (Appears_In_Check): New routine.
5865 (Resolve_Entity_Name): Remove local variables Prev and
5866 Usage_OK. Par is now a constant. Remove the parent chain traversal
5867 as the placement of a volatile object with enabled property
5868 Async_Writers and/or Effective_Reads must appear immediately
5869 within a legal construct.
5871 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
5873 * checks.adb (Apply_Selected_Range_Checks):
5874 Alphabetize local constants and variables. Add comments.
5875 Always insert a range check that requires runtime evaluation into
5878 2014-02-25 Robert Dewar <dewar@adacore.com>
5880 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
5882 2014-02-25 Bob Duff <duff@adacore.com>
5884 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
5885 iterations while waiting for independent tasks to terminate;
5886 if an independent task does not terminate, we do not want to
5887 hang here. In that case, the thread will be terminated when the
5889 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
5891 2014-02-25 Ed Schonberg <schonberg@adacore.com>
5893 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
5894 used to perform pre-analysis of the expression for SPARK
5895 aspects that have a non-standard syntax, such as GLobal and
5896 Initializes. The procedure applies to the original expression
5897 in an aspect specification, prior to the analysis of the
5898 corresponding pragma, in order to provide semantic information
5899 for ASIS navigation purposes.
5900 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
5901 Call new subprogram.
5903 2014-02-25 Yannick Moy <moy@adacore.com>
5905 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
5907 2014-02-25 Doug Rupp <rupp@adacore.com>
5909 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
5910 (__gnat_adjust_context_for_raise): Bump the PC by 2.
5912 2014-02-25 Ed Schonberg <schonberg@adacore.com>
5914 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
5915 misplaced IS, add a statement sequence to improper body only if
5916 one has not been parsed already.
5918 2014-02-25 Ed Schonberg <schonberg@adacore.com>
5920 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
5921 mismatch when multidimensional array is updated with a single
5924 2014-02-25 Yannick Moy <moy@adacore.com>
5926 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
5927 sem_ch6.adb: Mark most references to SPARK RM in error messages
5930 2014-02-24 Ed Schonberg <schonberg@adacore.com>
5932 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
5933 appears in a list of basic declarations, complete the tree with
5934 an empty statement list, to prevent cascaded errors and crashes
5935 if semantic analysis is attempted.
5937 2014-02-24 Thomas Quinot <quinot@adacore.com>
5939 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
5941 * erroutc.adb: Minor reformatting.
5943 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
5945 * sem_prag.adb (Check_Clause_Syntax): Account
5946 for a solitary input item in a dependency list.
5948 2014-02-24 Yannick Moy <moy@adacore.com>
5950 * gnat1drv.adb (Adjust_Global_Switches): Do not
5951 use validity checks at all in GNATprove_Mode.
5953 2014-02-24 Robert Dewar <dewar@adacore.com>
5955 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
5956 atree.adb, atree.ads: Minor reformatting.
5958 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
5960 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
5961 global and dependence refinement when SPARK_Mode is off.
5962 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
5963 state refinement when SPARK_Mode is off.
5964 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
5965 variable Decl. Insert the generated pragma for Refined_State
5966 after a potential pragma SPARK_Mode.
5967 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
5968 constant Deps. Remove local variable Expr. Check the syntax
5969 of pragma Depends when SPARK_Mode is off. Factor out the
5970 processing for extra parenthesis around individual clauses.
5971 (Analyze_Global_In_Decl_List): Items is now a constant. Check
5972 the syntax of pragma Global when SPARK_Mode is off.
5973 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
5974 Initializes when SPARK_Mode is off.
5975 (Analyze_Part_Of): Check
5976 the syntax of the encapsulating state when SPARK_Mode is off.
5977 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
5978 SPARK_Mode is off. Move the declaration order check with respect
5979 to pragma Initializes to the end of the processing. Do not verify
5980 the declaration order for pragma Initial_Condition when SPARK_Mode
5981 is off. Do not complain about a useless package refinement when
5983 (Analyze_Refined_Depends_In_Decl_Part): Refs
5984 is now a constant. Check the syntax of pragma Refined_Depends
5985 when SPARK_Mode is off.
5986 (Analyze_Refined_Global_In_Decl_Part):
5987 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
5988 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
5989 Refined_State when SPARK_Mode is off.
5990 (Check_Dependence_List_Syntax): New routine.
5991 (Check_Global_List_Syntax): New routine.
5992 (Check_Initialization_List_Syntax): New routine.
5993 (Check_Item_Syntax): New routine.
5994 (Check_State_Declaration_Syntax): New routine.
5995 (Check_Refinement_List_Syntax): New routine.
5996 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
5998 2014-02-24 Robert Dewar <dewar@adacore.com>
6000 * a-tags.adb, s-os_lib.adb: Minor reformatting.
6002 2014-02-24 Thomas Quinot <quinot@adacore.com>
6004 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
6005 strerror message, not just numeric errno value.
6007 2014-02-24 Doug Rupp <rupp@adacore.com>
6009 * raise-gcc.c (exception_class_eq): Make endian neutral.
6011 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6013 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
6014 flag, and reset Etype and Analyzed attributes unconditionally
6015 when copying a tree that may be partly analyzed.
6016 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
6017 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
6018 within a subprogram body and applies to it, remove it from the
6019 body before making a copy of it, to prevent spurious errors when
6020 analyzing the copied body.
6022 2014-02-24 Thomas Quinot <quinot@adacore.com>
6024 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
6025 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
6026 vxWorks.h has been included. Also ensure that file attributes
6027 related definitions are output even in cases where socket support
6029 * a-tags.adb: Code clean up.
6030 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
6031 instead of -I to add the main ada source directory to the header
6032 search path, in order to avoid conflict between our own "types.h"
6033 and VxWork's <types.h>.
6035 2014-02-24 Robert Dewar <dewar@adacore.com>
6037 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
6038 * debug.adb: Remove documentation of -gnatd.X, no longer used.
6039 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
6041 2014-02-24 Bob Duff <duff@adacore.com>
6043 * gnat_ugn.texi: Improve documentation of gnatpp.
6045 2014-02-24 Thomas Quinot <quinot@adacore.com>
6047 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
6048 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
6049 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
6050 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
6051 a chars_ptr, because on Windows this is a renaming of
6052 Socket_Error_Message.
6054 2014-02-24 Robert Dewar <dewar@adacore.com>
6056 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
6057 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
6058 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
6061 2014-02-24 Thomas Quinot <quinot@adacore.com>
6063 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
6064 that the source directory containing s-oscons-tmplt.c is on the
6065 include path, so that all internal header files are available.
6067 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6069 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
6070 domain of iteration is an attribute reference 'Old, this is an
6071 Ada 2012 iterator and the loop must be rewritten as such.
6073 2014-02-24 Thomas Quinot <quinot@adacore.com>
6075 * s-fileio.adb (Errno_Message): Remove, use shared version from
6077 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
6078 * g-stseme (Socket_Error_Message): Reimplement in terms of new
6080 * g-socthi.ads, g-socthi.adb: Change profile of
6081 Socket_Error_Message to return String to allow the above.
6082 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
6083 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
6084 * g-socthi-vxworks.ads: Update to account for the above profile
6086 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
6087 * s-crtl.ads (strncpy): New procedure.
6088 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
6089 Use import from s-crtl.
6090 * a-envvar.adb, osint.adb: Use imports of C runtime functions
6091 from s-crtl instead of re-importing locally.
6093 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6095 * sem_prag.adb (Analyze_Global_Item): Emit the
6096 variable related checks concerning volatile objects only when
6099 2014-02-24 Robert Dewar <dewar@adacore.com>
6101 * sem_ch5.adb (Analyze_Iterator_Specification): use
6102 Error_Msg_Ada_2012_Feature.
6104 2014-02-24 Jose Ruiz <ruiz@adacore.com>
6106 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
6107 No_Local_Timing_Events and No_Specific_Termination_Handlers
6108 must be set, according to the Ravenscar profile definition
6111 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6113 * sem_ch6.adb (Analyze_Expression_Function): If this is a
6114 completion, freeze return type and its designated type if needed.
6116 2014-02-24 Thomas Quinot <quinot@adacore.com>
6118 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6119 'Address): When moving initialization statements to a freeze
6120 entity, keep them under a single node (i.e. do not unwrap
6121 expressions with actions), and set the Initialization_Statements
6122 attribute again so that processing of a later pragma Import can
6125 2014-02-24 Claire Dross <dross@adacore.com>
6127 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
6128 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
6129 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
6130 Left/Right to First_To_Previous/Current_To_Last.
6132 2014-02-24 Thomas Quinot <quinot@adacore.com>
6134 * adaint.h (struct file_attributes): New component "error"
6135 (__gnat_error_attributes): Accessor for the above.
6136 * adaint.c (__gnat_error_attributes): New subprogram
6137 (__gnat_stat): Fix returned value (expect errno value)
6138 (__gnat_stat_to_attr): Add management of error component (set to
6139 stat errno value, except for missing files where it is set to 0,
6140 and exists is set to 0).
6141 * osint.ads (File_Attributes_Size): Update per change above,
6142 also clarify documentation.
6143 * s-filatt.ads: New file, binding to file attributes related
6145 * Makefile.rtl (s-filatt): New runtime unit.
6146 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
6147 to library function if not available on target).
6148 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
6149 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
6150 SIZEOF_struct_dirent_alloc): New constants.
6151 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
6152 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
6153 Perform appropriate error checking if stat fails (do not just
6154 ignore existing files if stat fails)
6155 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
6158 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6160 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
6161 the use of volatile objects as global items in a function to
6162 the variable related checks section.
6163 * sem_util.adb (Async_Readers_Enabled): Directly call
6164 Has_Enabled_Property.
6165 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
6166 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
6167 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
6168 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
6169 Update the comment on usage. State_Has_Enabled_Property how handles
6170 the original logic of the routine. Add processing for variables.
6171 (State_Has_Enabled_Property): New routine.
6172 (Variable_Has_Enabled_Property): New routine.
6174 2014-02-24 Robert Dewar <dewar@adacore.com>
6176 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
6178 * atree.ads, atree.adb (Node35): New function.
6179 (Set_Node35): New procedure.
6180 * debug.adb: Define new debug flag -gnatd.X.
6181 * einfo.ads, einfo.adb (Import_Pragma): New field.
6182 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
6183 really active yet, has to be activated with -gnatd.X.
6184 * sem_prag.adb (Set_Imported): Set new Import_Pragma
6185 field (Set_Imported): Don't set Is_Public (see
6186 Freeze.Wrap_Imported_Subprogram)
6187 * par-ch3.adb (P_Component_List): Handle unexpected null component.
6189 2014-02-24 Yannick Moy <moy@adacore.com>
6191 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
6192 * gnat_rm.texi: Correct documentation of attribute Update.
6194 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6196 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
6197 iterator in older versions of Ada.
6199 2014-02-24 Gary Dismukes <dismukes@adacore.com>
6201 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
6202 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
6204 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6206 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
6207 indexed_components that are instances of Ada 2012 container
6208 indexing operations. Analysis and resolution of such nodes
6209 is performed on the attribute, and the original source is
6210 preserved for ASIS operations. If expansion is enabled, the
6211 indexed component is replaced by the value of this attribute,
6212 which is in a call to an Indexing aspect, in most case wrapped
6213 in a dereference operation.
6214 * sem_ch4.adb (Analyze_Indexed_Component): Create
6215 Generalized_Indexing attribute when appropriate.
6216 (Analyze_Call): If prefix is not overloadable and has an indexing
6217 aspect, transform into an indexed component so it can be analyzed
6218 as a potential container indexing.
6219 (Analyze_Expression): If node is an indexed component with a
6220 Generalized_ Indexing, do not re-analyze.
6221 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
6222 of an indexed_component that has been transformed into a container
6224 (Resolve_Indexed_Component): Call the above when required.
6225 (Resolve): Do not insert an explicit dereference operation on
6226 an indexed_component whose type has an implicit dereference:
6227 the operation is inserted when resolving the related
6228 Generalized_Indexing.
6230 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
6232 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
6235 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6237 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
6239 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
6240 Merge the expected and available mode errors.
6241 (Report_Unused_Constituents): Remove leading spaces in error messages.
6242 (Report_Unused_States): Remove leading spaces in error messages.
6244 2014-02-24 Thomas Quinot <quinot@adacore.com>
6246 * par_sco.adb (Traverse_One): Refine categorization of statement
6249 2014-02-24 Robert Dewar <dewar@adacore.com>
6251 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
6252 Pure_05, Pure_12 and Preelaborate_05.
6253 * gnat_rm.texi: Update accordingly.
6254 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
6255 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
6256 Recognize one argument form of these pragmas only in GNAT mode
6259 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6261 * s-dimmks.ads: Replace symbol for temperature, previously the
6262 Greek letter Theta, by the ASCII @ sign.
6263 * s-diflio.ads: ditto.
6265 2014-02-24 Robert Dewar <dewar@adacore.com>
6267 * exp_ch4.adb: Minor code reorganization (use OR for boolean
6269 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
6271 2014-02-24 Ben Brosgol <brosgol@adacore.com>
6273 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
6274 so that references to gnatmem and ASIS tools do not appear in the FSF
6275 edition of the GNAT User's Guide.
6277 2014-02-24 Yannick Moy <moy@adacore.com>
6279 * freeze.adb (Freeze_Entity): Do not issue warning
6280 for pre/post being ignored on imported subprogram in GNATprove
6283 2014-02-24 Robert Dewar <dewar@adacore.com>
6285 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
6286 stand.ads, sem_eval.adb: Minor reformatting.
6288 2014-02-24 Yannick Moy <moy@adacore.com>
6290 * sem_prag.adb: Minor rewording in error message.
6292 2014-02-24 Johannes Kanig <kanig@adacore.com>
6294 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
6295 GNATprove_mode, gnat2why doesn't need nor use these types.
6297 2014-02-24 Gary Dismukes <dismukes@adacore.com>
6299 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
6300 target, in the case of signed integer exponentiation that uses a
6301 run-time routine, always select the Exp_* versions, since overflow
6302 checking is automatically done by AAMP arithmetic instructions.
6304 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6306 * sem_ch13.adb (Analyze_Aspect_Specifications):
6307 When the related context is a package instace, insert pragma
6308 Abstract_State after all internally-generated renamings related
6309 to the instance "header".
6311 2014-02-24 Ed Schonberg <schonberg@adacore.com>
6313 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
6315 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
6316 call to an abstract subprogram is legal if it appears in a
6317 pre/postcondition of another abstract operation.
6319 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
6321 * gnat_ugn.texi: Misc updates.
6323 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
6325 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
6327 2014-02-24 Gary Dismukes <dismukes@adacore.com>
6329 * layout.adb (Layout_Variant_Record): Instantiate
6330 Generic_Check_Choices and call Check_Choices before calling
6331 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
6332 set to prevent generating incorrect discriminant-checking
6333 functions for 'others' variants (functions that unconditionally
6334 return True rather than accounting for the values covered by the
6336 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
6337 Formal_Derived_Matching.
6338 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
6339 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
6340 Formal_Derived_Matching formal to Subtypes_Statically_Match.
6341 (Subtypes_Statically_Match): Suppress the Object_Size matching
6342 test in the case where Formal_Derived_Matching is True.
6343 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
6344 True for Formal_Derived_Matching_Formal on the call to
6345 Subtypes_Statically_Compatible.
6347 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
6349 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
6351 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
6353 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
6354 Look through a conversion between original and packable version to get
6356 (build_component_ref): Rework comment and fix formatting.
6358 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
6360 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
6361 project-specific options.
6363 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6365 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
6366 not Constraint_Error.
6367 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
6368 * sem_ch5.adb: Code clean up.
6370 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
6372 * sem_prag.adb (Usage_Error): Remove local
6373 constant Typ. Remove the specialized diagnostics for unconstrained
6374 or tagged items as those are not part of the explicit input set
6375 of the related subprogram and should not be flagged.
6377 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6379 * sem_attr.adb: Add guard to preserve all errors.
6381 2014-02-20 Vincent Celier <celier@adacore.com>
6383 * switch-m.adb (Normalize_Compiler_Switches): Take into account
6384 switches that are recorded in ALI files: -gnateA, -gnateE,
6385 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
6387 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6389 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
6390 of an element iterator form over a formal container with an
6392 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
6393 to create declaration and loop statements for both forms of
6394 container iterators.
6395 (Expand_Formal_Container_Element_Iterator): New procedure
6396 to handle loops of the form "for E of C" when C is a formal
6398 (Expand_Formal_Container_Iterator): Code cleanup.
6400 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
6402 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
6403 (Analyze_Contract_Case): Remove the use of
6404 "may". Replace "aspect Contract_Cases" to avoid categorization
6405 of aspect vs pragma.
6406 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
6407 (Analyze_Global_Item): Remove
6408 the use of "formal", specify the subprogram. Split the
6409 error message about a state with visible refinement into
6410 two. Remove the use of "global" from "volatile global item".
6411 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
6413 (Analyze_Input_Output): Update the call to
6414 Check_Mode. Specify the duplicated item. Reword the error
6415 message concerning an input of a null output list. Use "\"
6416 for error message continuation.
6417 (Analyze_Part_Of): Remove
6418 the use of "may". Use "\" for error message continuation.
6419 (Analyze_Refined_Depends_In_Decl_Part): Update the error
6420 message concerning a useless refinement to match the format
6422 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
6423 concerning a useless refinement.
6424 (Analyze_Refinement_Clause): Use "\" for error message continuation.
6425 (Check_Constituent_Usage): Use "\" for error message continuation.
6426 (Check_Dependency_Clause): Use "\" for error message continuation.
6427 (Check_Matching_Constituent): Use "\" for error message continuation.
6428 (Check_Missing_Part_Of): Use "\" for error message continuation.
6429 (Check_Mode): Renamed to
6430 Check_Role. Update the comment on usage. Redo the error reporting
6432 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
6433 message continuation.
6434 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
6435 with comment on usage. Update all occurrences of Is_Input and Is_Output.
6436 (Inconsistent_Mode_Error): Use "\" for error message continuation.
6437 (Input_Match): Use "\" for error message continuation.
6438 (Role_Error): New routine.
6439 (Set_Convention_From_Pragma): Use "\" for error message continuation.
6440 (Usage_Error): Add local variable Error_Msg. Build specialized error
6441 message showcasing the offending item kind. Redo the diagnostics for
6442 unconstrained types.
6444 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6446 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
6447 to determine whether a type is a container type, rather than
6448 examining only its type declaration, so that subtypes and derived
6449 types are handled properly.
6451 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
6453 * gnat_ugn.texi: gnatmetric: add description of project-specific
6456 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6458 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
6459 all choices in an association for a record type have the same
6460 type, as is done for record aggregates.
6462 2014-02-20 Robert Dewar <dewar@adacore.com>
6464 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
6465 Unmodified rather than Warnings (Off). Make comments
6466 uniform in the four affected units.
6468 2014-02-20 Robert Dewar <dewar@adacore.com>
6470 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6471 Object_Size): For non-scalar types allow any value that is a
6473 * gnat_rm.texi: Document Object_Size for composites more clearly.
6475 2014-02-20 Yannick Moy <moy@adacore.com>
6477 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
6479 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6481 * stand.ads: Raise_Type: new predefined entity, used as the type
6482 of a Raise_Expression prior to resolution.
6483 * cstand.adb: Build entity for Raise_Type.
6484 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
6485 initial type of the node.
6486 * sem_type.adb (Covers): Raise_Type is compatible with all
6488 * sem_res.adb (Resolve): Remove special handling of Any_Type on
6489 Raise_Expression nodes.
6490 (Resolve_Raise_Expression): Signal ambiguity if the type of the
6491 context is still Raise_Type.
6493 2014-02-20 Robert Dewar <dewar@adacore.com>
6495 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
6496 mismatching predicates.
6497 * sem_ch6.adb (Check_Conformance): Give better messages on
6499 * sem_eval.adb (Predicates_Match): Move to spec.
6500 * sem_eval.ads (Predicates_Match): Moved here from body.
6502 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6504 * a-cbmutr.adb: Use default value in Insert_Child.
6506 2014-02-20 Vincent Celier <celier@adacore.com>
6508 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
6509 Stringt.Initialize in all project aware tools.
6511 2014-02-20 Doug Rupp <rupp@adacore.com>
6513 * gnat_ugn.texi: Document gnatbind -X option.
6514 * vms_data.ads: Minor warnings documentation reformatting.
6516 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6518 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
6519 procedure for a base type.
6521 2014-02-20 Robert Dewar <dewar@adacore.com>
6523 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
6524 expression with type info.
6525 * sem_ch13.adb: Minor reformatting.
6526 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
6527 False if predicates do not match on the two types.
6529 2014-02-20 Arnaud Charlet <charlet@adacore.com>
6531 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
6532 In Relaxed_RM_Semantics mode, allow any static integer value,
6533 for compatibility with other compilers.
6535 2014-02-20 Vincent Celier <celier@adacore.com>
6537 * errutil.adb (Initialize): Properly initialize entry in table
6538 Warnings when warnings are suppressed.
6540 2014-02-20 Robert Dewar <dewar@adacore.com>
6542 * s-os_lib.ads: Add warning about non-portability of Rename_File.
6543 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
6544 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
6545 * gnat_ugn.texi: Document no warnings on junk variable names.
6546 * layout.adb: Minor code reorganization (use Ekind_In).
6547 * stringt.adb: Move initialization of Null_String_Id to Initialize
6550 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6552 * sem_ch13.adb: Initialize optional Element_Id.
6554 2014-02-20 Robert Dewar <dewar@adacore.com>
6556 * s-os_lib.ads (Rename_File): Minor commment addition.
6558 2014-02-20 Thomas Quinot <quinot@adacore.com>
6560 * einfo.ads: Minor reformatting.
6562 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
6564 * aspects.adb (Exchange_Aspects): New routine.
6565 * aspects.ads (Exchange_Aspects): New routine.
6566 * atree.adb (Rewrite): Do not check whether the save node has
6567 aspects as it never will, instead check the node about to be clobbered.
6568 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
6569 entities of generic packages.
6570 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
6571 pointer of an aspect specification list after rewriting takes place.
6572 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
6573 specifications of the generic template and the copy used for analysis.
6574 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
6575 the aspect specifications of the generic template and the
6576 copy used for analysis.
6577 (Analyze_Package_Instantiation): Propagate the aspect specifications
6578 from the generic template to the instantiation.
6579 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
6580 specifications from the generic template to the instantiation.
6581 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
6582 Abstract_State, Initializes and Initial_Condition when they
6583 apply to a package instantiation.
6585 2014-02-20 Robert Dewar <dewar@adacore.com>
6587 * stringt.adb: Add call to Initialize in package initialization.
6589 2014-02-20 Robert Dewar <dewar@adacore.com>
6591 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
6592 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
6593 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
6594 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
6597 2014-02-20 Bob Duff <duff@adacore.com>
6599 * s-os_lib.ads: Minor: Remove incorrect comment.
6601 2014-02-20 Robert Dewar <dewar@adacore.com>
6603 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
6605 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6607 * a-cborma.adb (Assign): When creating a node without a specified
6608 element, insert an uninitialized element in the map, because
6609 the instance may provide an element type with a default
6610 initialization, e.g a scalar with a Default_Value aspect.
6611 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
6612 (Insert): In the version without explicit element, provide an
6613 uninitialized element, as above.
6614 * a-cbdlli.adb (Append): In the version without explicit element,
6615 provide an uninitalized element, as above.
6616 (Allocate): Remove unused version.
6618 2014-02-20 Robert Dewar <dewar@adacore.com>
6620 * sem_elab.adb: Minor code reorganization (use Nkind_In).
6621 * stringt.adb: Remove temporary pragma Warnings (Off).
6622 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
6625 2014-02-20 Matthew Heaney <heaney@adacore.com>
6627 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
6630 2014-02-20 Ed Schonberg <schonberg@adacore.com>
6632 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
6633 properly the cursor type for subsequent volatile testing in SPARK
6634 mode, when domain is a formal container with an Iterabe aspect.
6636 2014-02-20 Robert Dewar <dewar@adacore.com>
6638 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
6639 (Set_Specific_Warning_Off): Add Reason argument.
6640 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
6641 (Set_Specific_Warning_Off): Add Reason argument.
6642 * erroutc.adb (Warnings_Entry): Add Reason field
6643 (Specific_Warning_Entry): Add Reason field.
6644 (Warnings_Suppressed): return String_Id for Reason.
6645 (Warning_Specifically_Suppressed): return String_Id for Reason.
6646 * erroutc.ads (Warnings_Entry): Add Reason field.
6647 (Specific_Warning_Entry): Add Reason field.
6648 (Set_Specific_Warning_Off): Add Reason argument.
6649 (Set_Warnings_Mode_Off): Add Reason argument.
6650 (Warnings_Suppressed): return String_Id for Reason.
6651 (Warning_Specifically_Suppressed): return String_Id for Reason.
6652 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
6653 (Warning_Specifically_Suppressed): returns String_Id for Reason
6654 * gnat_rm.texi: Document that Warning parameter is string literal
6655 or a concatenation of string literals.
6656 * par-prag.adb: New handling for Reason argument.
6657 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
6658 for Reason argument.
6659 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
6660 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
6661 * stringt.adb: Set Null_String_Id.
6662 * stringt.ads (Null_String_Id): New constant.
6664 2014-02-20 Robert Dewar <dewar@adacore.com>
6666 * einfo.ads: Minor comment addition: Etype of package is
6668 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
6669 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
6670 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
6671 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
6672 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
6673 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
6674 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
6675 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
6676 Replace all calls with calls to New_Occurrence_Of.
6678 2014-02-20 Robert Dewar <dewar@adacore.com>
6680 * par-util.adb (Ignore, case of right paren): Make this a
6683 2014-02-19 Robert Dewar <dewar@adacore.com>
6685 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
6686 * debug.adb: Remove -gnatd.X switch, no longer used.
6687 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
6690 2014-02-19 Bob Duff <duff@adacore.com>
6692 * g-socket.ads: Minor: Correct some comments.
6694 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6696 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
6698 2014-02-19 Arnaud Charlet <charlet@adacore.com>
6700 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
6701 an error on out of range priorities if Relaxed_RM_Semantics.
6702 * sem_prag.adb (Analyze_Pragma): Ditto.
6704 2014-02-19 Bob Duff <duff@adacore.com>
6706 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
6707 where F denotes the renaming of an enumeration literal, and
6708 issue a specialized error message.
6710 2014-02-19 Matthew Heaney <heaney@adacore.com>
6712 * a-chtgop.ads (Checked_Index): New operation.
6713 (Next): Changed mode of hash table.
6714 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
6715 (Generic_Read, Reserve_Capacity): Ditto.
6716 (Generic_Equal): Detect tampering.
6717 (Next): Changed mode of hash table, detect tampering.
6718 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
6720 (Find): Changed mode of hash table.
6721 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
6722 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
6724 (Find): Changed mode of hash table, check for tampering.
6725 (Generic_Replace_Element): Check for tampering.
6726 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
6727 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
6728 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
6730 (Find, Generic_Replace_Element): Check for tampering.
6731 * a-chtgbo.ads (Checked_Index): New operation.
6732 * a-chtgbo.adb (Checked_Index): New operation
6733 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
6734 (Generic_Read, Next): Ditto.
6735 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
6736 table (Difference, Intersection): Use variable view of
6737 source, detect tampering (Find, Is_Subset, Overlap): Use
6738 variable view of container (Symmetric_Difference, Union):
6739 Detect tampering (Vet): Use Checked_Index to detect tampering
6740 (Constant_Reference, Element, Find): Use variable view of
6742 (Update_Element_Preserving_Key): Detect tampering.
6743 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
6746 (Equivalent_Sets, Overlap): Use Node's Next component.
6747 (Vet): Use Checked_Index to detect tampering.
6748 (Constant_Reference, Element, Find): Use variable view of container.
6749 (Update_Element_Preserving_Key): Detect tampering.
6750 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
6751 Element, Find): Use variable view of container.
6752 (Reference): Rename hash table component.
6753 (Vet): Use Checked_Index to detect tampering.
6755 2014-02-19 Arnaud Charlet <charlet@adacore.com>
6757 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
6760 2014-02-19 Thomas Quinot <quinot@adacore.com>
6762 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
6763 against calls without Def_Id.
6765 2014-02-19 Claire Dross <dross@adacore.com>
6767 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
6768 a-cofove.ads: Add global annotations to subprograms.
6770 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6772 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
6773 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
6774 Initial_Condition no longer requires the presence of pragma
6775 Initialized. Do not try to diagnose whether all variables mentioned in
6776 pragma Initializes also appear in Initial_Condition.
6777 (Collect_Variables): Removed.
6778 (Match_Variable): Removed.
6779 (Match_Variables): Removed.
6780 (Report_Unused_Variables): Removed.
6782 2014-02-19 Thomas Quinot <quinot@adacore.com>
6784 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
6786 2014-02-19 Robert Dewar <dewar@adacore.com>
6788 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
6791 2014-02-19 Vincent Celier <celier@adacore.com>
6793 * prj-part.adb (Parse_Single_Project): Use the fully resolved
6794 project path, with all symbolic links resolved, to check if the
6795 same project is imported with a different unresolved path.
6796 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
6797 changed to Resolved_Path to reflect that all symbolic links
6800 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6802 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
6803 from sem_ch13, for use elsewhere.
6804 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
6805 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
6806 cursor type on the loop variable when the iteration is over o
6809 2014-02-19 Vincent Celier <celier@adacore.com>
6811 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
6812 for an empty Target (Check_Target): Never fail when an empty
6813 target is declared in the configuration project.
6815 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6817 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
6818 the pragma comes fron a predicate aspect and the context is a
6819 record declaration within the scope that declares the type.
6821 2014-02-19 Robert Dewar <dewar@adacore.com>
6823 * gnat_rm.texi: Minor clarifications.
6824 * expander.adb, sem_aggr.adb: Add comments.
6826 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6828 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
6829 applies to a subprogram body, the name is the current scope,
6830 rather than being declared in the current scope.
6831 (Analyze_Pragma, case No_Return): Handle properly a No_Return
6832 aspect applied to a subprogram body.
6834 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6836 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
6837 of overloaded subprograms, and fix bug in handling of primitive
6840 2014-02-19 Pascal Obry <obry@adacore.com>
6842 * s-os_lib.adb: Minor reformatting.
6844 2014-02-19 Yannick Moy <moy@adacore.com>
6846 * expander.adb (Expand): Do nothing inside generics.
6847 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
6850 2014-02-19 Yannick Moy <moy@adacore.com>
6852 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
6854 2014-02-19 Robert Dewar <dewar@adacore.com>
6856 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
6857 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
6860 2014-02-19 Claire Dross <dross@adacore.com>
6862 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
6863 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
6865 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6867 * sem_ch3.adb (Analyze_Declarations): Analyze
6868 a package contract at the end of the private declarations (if
6869 applicable), otherwise analyze it and the end of the visible
6872 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6874 * style.adb (Missing_Overriding): If subprogram is an
6875 instantiation, place warning on the instance node itself,
6876 without mention of the original generic. Do not emit message
6877 if explicit Ada version is older than the introduction of the
6878 overriding indicator.
6880 2014-02-19 Yannick Moy <moy@adacore.com>
6882 * gnat_rm.texi: Doc clarifications.
6884 2014-02-19 Yannick Moy <moy@adacore.com>
6886 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
6889 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6891 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
6892 specified First primitive, rather than by name.
6893 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
6894 and extend error checking for missing primitives and incorrect
6897 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6899 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
6900 errors when a Synchronization aspect on an overriding protected
6901 operation does not match the given aspect on the overridden
6902 operation of an ancestor interface.
6904 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6906 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
6907 (Check_Loop_Pragma_Placement): Update
6908 comment on usage. Remove local variables Orig_Stmt and
6909 Within_Same_Sequence. Check that the current Loop_Invariant or
6910 Loop_Variant pragma is grouped together with other such pragmas.
6911 (Is_Loop_Pragma): New routine.
6912 (Prev_In_Loop): Removed.
6914 2014-02-19 Robert Dewar <dewar@adacore.com>
6916 * par-ch6.adb (P_Return): For extended return, end column lines
6918 * par.adb: Minor documentation clarification.
6920 2014-02-19 Yannick Moy <moy@adacore.com>
6922 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
6923 that Loop_Invariant and Loop_Variant appear consecutively.
6924 * gnat_rm.texi Update documentation of Loop_Invariant and
6925 Loop_Variant pragmas.
6927 2014-02-19 Robert Dewar <dewar@adacore.com>
6929 * debug.adb: Document -gnatd.X.
6930 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
6932 (Check_Then_Column): Ditto.
6933 * styleg.adb (Check_Then): Allow THEN on line after IF.
6934 (Check_Then): Check THEN placement under control of -gnatd.X
6935 * styleg.ads (Check_Then): Now called even if THEN is not first
6937 * stylesw.ads (Style_Check_If_Then_Layout): Document new
6939 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
6941 2014-02-19 Robert Dewar <dewar@adacore.com>
6943 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
6944 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
6945 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
6946 vms_conv.adb: Fix bad layout of IF statements
6948 2014-02-19 Robert Dewar <dewar@adacore.com>
6950 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
6952 2014-02-19 Robert Dewar <dewar@adacore.com>
6954 * exp_util.adb: Update comments.
6956 2014-02-19 Doug Rupp <rupp@adacore.com>
6958 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
6959 * init.c (__gl_float_format): [VMS] New global.
6960 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
6961 representation in effect.
6963 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
6965 * exp_ch6.adb Add with and use clause for Exp_Prag.
6966 (Expand_Contract_Cases): Relocated to Exp_Prag.
6967 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
6968 * exp_prag.adb Add with and use clauses for Checks and Validsw.
6969 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
6970 structure of the expanded code to showcase the evaluation of
6971 attribute 'Old prefixes. Add local variable Old_Evals. Expand
6972 any attribute 'Old references found within a consequence. Add
6973 circuitry to evaluate the prefixes of attribute 'Old that
6974 belong to a selected consequence.
6975 (Expand_Old_In_Consequence): New routine.
6976 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
6977 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
6978 potentially unevaluated prefix is always evaluated.
6980 2014-02-19 Robert Dewar <dewar@adacore.com>
6982 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
6983 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
6984 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
6985 handling for the case of Modify_Tree_For_C, this approach did
6987 * exp_util.adb (Matching_Standard_Type): New function
6988 (Side_Effect_Free): New top level functions (from
6989 Remove_Side_Effects).
6990 * exp_util.ads (Side_Effect_Free): New top level functions
6992 * sinfo.ads: Minor comment updates.
6994 2014-02-19 Ed Schonberg <schonberg@adacore.com>
6996 * exp_ch6.adb (Expand_Simple_Function_Return): If return
6997 type is unconstrained and uses the secondary stack, mark the
6998 enclosing function accordingly, to ensure that the value is not
6999 prematurely removed.
7001 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7003 * par.adb Alphabetize the routines in Par.Sync.
7004 (Resync_Past_Malformed_Aspect): New routine.
7005 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
7006 variables. Code and comment reformatting. Detect missing
7007 parentheses on aspects [Refined_]Global and [Refined_]Depends
7008 with a non-null definition.
7009 * par-sync.adb: Alphabetize all routines in this separate unit.
7010 (Resync_Past_Malformed_Aspect): New routine.
7012 2014-02-19 Robert Dewar <dewar@adacore.com>
7014 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
7015 if Esize values do not match.
7017 2014-02-19 Yannick Moy <moy@adacore.com>
7019 * sinfo.ads: Minor comment update.
7021 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7023 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
7025 2014-02-19 Thomas Quinot <quinot@adacore.com>
7027 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
7028 that has the No_Ctrl_Actions flag is a suitable node to be
7029 wrapped if the assigned expression has no finalization actions.
7030 * sem_eval.adb (Eval_Entity_Name): For a compile time known
7031 boolean value, mark the corresponding condition SCO as constant.
7033 2014-02-19 Robert Dewar <dewar@adacore.com>
7035 * exp_util.adb: Minor reformatting.
7036 * exp_util.ads (Matching_Standard_Type): New function.
7037 * exp_ch7.adb: Minor reformatting.
7039 2014-02-19 Ed Schonberg <schonberg@adacore.com>
7041 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
7042 to find declaration for Cursor, to handle properly the case of
7043 a discriminated iterable type.
7045 2014-02-19 Vincent Celier <celier@adacore.com>
7047 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
7048 imported library projects with the library ALI dirs, when setting
7050 * prj-env.ads (Ada_Objects_Path): Correct comments about
7051 argument Including_Libraries.
7053 2014-02-19 Gary Dismukes <dismukes@adacore.com>
7055 * gnat_rm.texi: Minor spelling fixes.
7057 2014-02-19 Doug Rupp <rupp@adacore.com>
7059 * init.c: Remove unneeded code.
7060 * fe.h (Float_Format): New macro
7061 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
7063 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7065 * sem_prag.adb (Check_Refined_Global_Item):
7066 A state or variable acts as a constituent only it is part of an
7067 encapsulating state and the state has visible refinement.
7069 2014-02-19 Ed Schonberg <schonberg@adacore.com>
7071 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
7072 postcondition for a function when the expression does not mention
7073 'Result but the function has in-out parameters.
7075 2014-02-19 Robert Dewar <dewar@adacore.com>
7077 * gnat_rm.texi: Add documentation on Value_Size forcing biased
7080 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7082 * lib-xref.ads Remove the small table of letter and symbol usage as we
7085 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7087 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
7088 messages depending on the offending misplaced aspect specifications.
7089 (Diagnose_Misplaced_Aspect_Specifications): New routine.
7091 2014-02-19 Ed Schonberg <schonberg@adacore.com>
7093 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
7094 for iterable aspect primitives.
7095 (Resolve_Iterable_Operation): Use expected signature of iterable
7096 aspect to resolve primitive when overloading is present.
7097 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
7098 (Check_Signature): Removed.
7100 2014-02-19 Yannick Moy <moy@adacore.com>
7102 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
7103 subunit in GNATprove_Mode.
7104 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
7106 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7108 * lib-xref.ads Alphabetize the contents of table
7109 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
7110 for E_Abstract_State. List all letters and symbols in use.
7111 * sem_prag.adb (Analyze_Abstract_State): Update all calls
7112 to Create_Abstract_State to reflect the new signature.
7113 (Create_Abstract_State): Change subprogram profile and update
7114 the comment on usage. Use the proper location of the state
7115 declaration when creating a new abstract state entity. Do not
7116 generate an external name, but simply reuse the name coming from
7117 the state declaration.
7119 2014-02-19 Robert Dewar <dewar@adacore.com>
7121 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
7122 declarations get properly inserted in Modify_Tree_For_C mode.
7123 * sinfo.ads: Minor comment addition.
7125 2014-02-19 Robert Dewar <dewar@adacore.com>
7127 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
7128 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
7130 2014-02-19 Ed Schonberg <schonberg@adacore.com>
7132 * style.adb (Missing_Overriding): Warning does not apply in
7133 language versions prior to Ada 2005.
7134 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
7135 * sem_attr.adb: Add Attribute_Iterable where needed.
7136 * exp_attr.adb: ditto.
7137 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
7138 handle loops and quantified expressions over types that have an
7139 iterable aspect. Called from Expand_Iterator_Loop.
7140 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
7141 with Iterable aspect.
7142 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
7143 subprograms specified in the Iterable aspect have the proper
7144 signature involving container and cursor.
7145 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
7146 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
7147 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
7148 New procedure to retrieve one of the primitives First, Last,
7149 or Has_Element, from the value of the iterable aspect of a
7151 (Is_Container_Element): Predicate to recognize expressions
7152 that denote an element of one of the predefined containers,
7153 for possible optimization. This subprogram is not currently
7154 used, pending ARG discussions on the legality of the proposed
7155 optimization. Worth preserving for eventual use.
7156 (Is_Iterator): Recognize formal container types.
7157 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
7159 2014-02-19 Robert Dewar <dewar@adacore.com>
7161 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
7162 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
7163 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
7164 declarations from list of actions.
7165 * output.ads, output.adb (Delete_Last_Char): New procedure.
7166 * sinfo.ads: Document handling of Mod and expression with actions
7167 in Modify_Tree_For_C mode.
7169 2014-02-19 Ed Schonberg <schonberg@adacore.com>
7171 * par-ch9.adb (P_Task): Add a null statement to produce a
7172 well-formed task body when due to a previous syntax error the
7173 statement list is empty.
7175 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
7177 * sem_prag.adb (Check_Dependency_Clause): Account
7178 for the case where a state with a non-null refinement matches a
7179 null output list. Comment reformatting.
7180 (Inputs_Match): Copy a solitary input to avoid an assertion failure
7181 when trying to match the same input in multiple clauses.
7183 2014-02-19 Gary Dismukes <dismukes@adacore.com>
7185 * sem_attr.adb: Minor typo fix.
7187 2014-02-18 Robert Dewar <dewar@adacore.com>
7189 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
7190 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
7191 (Create_Standard): Create new unsigned types.
7192 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
7193 mode (Expand_N_Reference): Removed, problematic and not needed
7195 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
7197 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
7198 * expander.adb: Remove call to Expand_N_Reference (problematic,
7199 and not needed now).
7200 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
7201 * stand.adb: Read and write unsigned type entities.
7202 * stand.ads: Add new unsigned types.
7204 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
7206 * sem_ch4.adb (Analyze_Call): Do not mark a function call
7207 as being inside an assertion expression as the flag is now removed.
7208 (Check_Ghost_Subprogram_Call): Do not query the
7209 In_Assertion_Expression flag as it is now removed, instead use
7210 a predicate function.
7211 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
7212 In_Assertion_Expression flag as it is now removed, instead use
7213 a predicate function.
7214 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
7215 * sem_util.adb Add with and use clause for Sem_Prag.
7216 (In_Assertion_Expression_Pragma): New routine.
7217 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
7218 * sinfo.adb (In_Assertion_Expression): Removed.
7219 (Set_In_Assertion_Expression): Removed.
7220 * sinfo.ads Remove flag In_Assertion_Expression along with its
7222 (In_Assertion_Expression): Removed along with
7223 pragma Inline. (Set_In_Assertion_Expression): Removed along
7226 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
7228 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
7229 used together with '-r', '-rf' or '-rnb' options.
7231 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
7233 * sem_attr.adb (Analyze_Attribute): Comment
7234 and code reformatting. Use separate routines to check the
7235 legality of attribute 'Old in certain pragmas. Verify
7236 the use of 'Old, 'Result and locally declared entities
7237 within the prefix of 'Old.
7238 (Check_References_In_Prefix): New routine.
7239 (Check_Use_In_Contract_Cases): New routine.
7240 (Check_Use_In_Test_Case): New routine.
7242 2014-02-18 Vincent Celier <celier@adacore.com>
7244 * sem_aux.adb (Is_By_Reference_Type): For each components of
7245 a record type, check also if the component is volatile as it
7246 may have an aspect that makes it volatile. If it is, then the
7247 record type is a by reference type.
7249 2014-02-18 Robert Dewar <dewar@adacore.com>
7251 * exp_attr.adb: Minor reformatting.
7252 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
7253 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
7254 as another case where we don't generate N_Reference nodes for
7256 * expander.adb (Expand): Add call to Expand_N_Reference.
7258 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7260 * sem_prag.adb (Analyze_Refined_Pragma): Remove
7261 local variable Pack_Spec. Refinement pragmas may now apply to
7262 bodies of both visible and private subprograms.
7264 2014-02-06 Robert Dewar <dewar@adacore.com>
7266 * exp_attr.adb (Expand_Loop_Entry_Attribute):
7267 Minor change (Attr => N) (Expand_Pred_Succ): New name
7268 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
7269 Max): Expand into if expression if Modify_Tree_For_C mode.
7270 (Expand_N_Attribute_Reference, case Min): ditto
7271 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
7274 2014-02-06 Ed Schonberg <schonberg@adacore.com>
7276 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
7277 predicate check if this is an internal declaration with
7278 No_Initialization set, as for an expanded aggregate component.
7280 2014-02-06 Doug Rupp <rupp@adacore.com>
7282 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
7283 conditions with severity of "SUCCESS" or "INFORMATIONAL".
7285 2014-02-06 Yannick Moy <moy@adacore.com>
7287 * sem_prag.adb (Analyze_Pragma): Analyze pragma
7288 Debug rewritten node before rewriting it as a null statement in
7291 2014-02-06 Robert Dewar <dewar@adacore.com>
7293 * sem_attr.adb (Min_Max): New procedure.
7294 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
7297 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
7299 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
7302 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7304 * sem_prag.adb (Analyze_Abstract_State): Update
7305 all calls to Create_Abstract_State to pass the proper state
7307 (Create_Abstract_State): Add new formal parameter
7308 State_Decl along with comment on usage. Establish a link between
7309 the abstract state entity and the state declaration.
7311 2014-02-06 Robert Dewar <dewar@adacore.com>
7313 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
7314 comparison of unordered enumeration type.
7315 (Analyze_Attribute, case Max): Check for improper comparison of
7316 unordered enumeration type.
7317 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
7319 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
7320 Moved here from Sem_Res.
7322 2014-02-06 Robert Dewar <dewar@adacore.com>
7324 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
7327 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7329 * sem_ch6.adb (Process_Formals): Error message reformatting.
7331 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7333 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
7334 variable Spec. Do not inherit the null indicator from the
7335 subprogram body when generating the spec.
7337 2014-02-06 Robert Dewar <dewar@adacore.com>
7339 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
7342 2014-02-06 Ed Schonberg <schonberg@adacore.com>
7344 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
7345 when the function has a foreign convention, but not if only the
7346 limited return type has such a convention.
7348 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7350 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
7351 variable Spec. Comment reformatting. Use Copy_Separate_Tree
7352 rather than New_Copy_Tree when building the corresponding
7353 subprogram declaration.
7355 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7357 * sem_prag.adb (Analyze_Global_Item): Remove
7358 the mode-related checks on abstract states with enabled external
7360 (Property_Error): Removed.
7362 2014-02-06 Javier Miranda <miranda@adacore.com>
7364 * lib-xref.adb (Generate_Reference): When
7365 generating the reference to the first private entity take care
7366 of handling swapped entities.
7368 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
7370 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
7373 2014-02-06 Robert Dewar <dewar@adacore.com>
7375 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
7376 than the word size when operating in Modify_Tree_For_C mode.
7377 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
7379 2014-02-06 Robert Dewar <dewar@adacore.com>
7381 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
7382 compare is case insensitive.
7383 * gnat_rm.texi: Document that string compare for Warnings Off
7384 is now case insensitive.
7386 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
7388 * gnat_rm.texi: Small wording tweak.
7390 2014-02-06 Pascal Obry <obry@adacore.com>
7392 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
7393 and Included_Artifact_Patterns attribute definitions.
7395 2014-02-06 Yannick Moy <moy@adacore.com>
7397 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
7398 SPARK_Mode pragma component for all subprograms, including stubs.
7400 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7402 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
7403 the configuration options of the enclosing context in a
7405 (Analyze_Subprogram_Body_Stub): Maintain the
7406 configuration options of the enclosing context in a stack-like
7409 2014-02-06 Robert Dewar <dewar@adacore.com>
7411 * debug.adb: -gnatd.u sets Modify_Tree_For C
7412 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
7413 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
7414 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
7415 * exp_intr.adb (Expand_Shift): Call expander so we do
7416 Modify_Tree_For_C expansions.
7417 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
7420 2014-02-06 Fedor Rybin <frybin@adacore.com>
7422 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
7423 after the phase 1 of the processing of each aggregated project
7424 to get access to project trees of aggregated projects.
7425 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
7426 If specified, On_New_Tree_Loaded is called after each aggregated
7427 project has been processed succesfully.
7428 (Process): new parameter On_New_Tree_Loaded.
7429 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
7430 callback added after processing of each aggregated project.
7431 (Recursive_Process): new parameter On_New_Tree_Loaded.
7432 (Process): new parameter On_New_Tree_Loaded.
7433 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
7434 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
7436 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
7439 2014-02-06 Bob Duff <duff@adacore.com>
7441 * gnat_ugn.texi: Implement --insert-blank-lines and
7442 --preserve-blank-lines switches.
7444 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
7446 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
7449 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
7451 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
7452 of the pragma on individual objects.
7454 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7456 * einfo.adb Node29 is now used as BIP_Initialization_Call.
7457 (BIP_Initialization_Call): New routine.
7458 (Set_BIP_Initialization_Call): New routine.
7459 (Write_Field29_Name): Add an entry for constants and variables.
7460 * einfo.ads Add new attribute BIP_Initialization_Call and update
7462 (BIP_Initialization_Call): New routine along with pragma Inline.
7463 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
7464 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7465 Add local declaration Res_Decl. Capture the build-in-place
7466 initialization call when the related object declaration has
7467 created a transient block.
7468 * exp_ch7.adb (Process_Transient_Objects): Add local variable
7469 Fin_Insrt. Recognize a scenario where an object declaration acts
7470 as a transient context and is initialized by a build-in-place
7473 2014-02-06 Pascal Obry <obry@adacore.com>
7475 * prj-util.adb (For_Interface_Sources): Fix handling of required
7476 bodies for aggregate libs.
7478 2014-02-06 Robert Dewar <dewar@adacore.com>
7480 * nlists.ads: Minor comment clarifications.
7482 2014-02-06 Robert Dewar <dewar@adacore.com>
7484 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
7486 * opt.ads (Modify_Tree_For_C): New flag.
7487 * output.ads, output.adb (Last_Char): New function.
7489 2014-02-06 Pascal Obry <obry@adacore.com>
7491 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
7492 share/gpr for cross-builds.
7494 2014-02-06 Robert Dewar <dewar@adacore.com>
7496 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
7497 Minor reformatting and code clean ups.
7499 2014-02-06 Pascal Obry <obry@adacore.com>
7501 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
7502 * prj.ads: Minor typo fix in comment.
7504 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7506 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
7507 local variable Expr. Flag clauses with extra parenthesis as this
7508 is not allowed by the syntax of the pragma. Code reformatting.
7510 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7512 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
7513 variables. Rename variabme Tnn to Temp. Do not create a temporary
7514 if assertions are disabled. Find enclosing routine _Postconditions
7515 and insert the temporary that captures the value of the prefix
7517 * exp_ch6.adb (Build_Postconditions_Procedure):
7518 Insert the generated _Postconditions routine
7519 before the first source declaration of the related
7521 (Insert_After_Last_Declaration): Removed.
7522 (Insert_Before_First_Source_Declaration): New routine.
7524 2014-02-06 Ed Schonberg <schonberg@adacore.com>
7526 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
7527 Utility to determine whether current expansion is for the body
7528 of a predefined primitive operation.
7529 (Make_Predicate_Check): Use Within_Internal_Subpgram
7530 * checks.adb (Apply_Predicate_Check): Use
7531 Within_Internal_Subprogram
7532 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
7534 2014-02-06 Pascal Obry <obry@adacore.com>
7536 * prj.ads, prj-util.adb: Minor reformatting.
7538 2014-02-06 Ed Schonberg <schonberg@adacore.com>
7540 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
7541 Take into account the Split_PPC flag to ensure that conjuncts
7542 in a composite postcondition aspect are tested in source order.
7544 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7546 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
7548 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
7549 illegal use of SPARK_Mode.
7550 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
7551 * sem_prag.adb (Analyze_Pragma): Code reformatting.
7552 * sem_util.adb Add with and use clause for Aspects.
7553 (Check_SPARK_Mode_In_Generic): New routine.
7554 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
7556 2014-02-06 Thomas Quinot <quinot@adacore.com>
7558 * a-calend.adb (Formatting_Operations.Split): Ensure that
7559 Time_Error is raised for invalid time values.
7561 2014-02-06 Arnaud Charlet <charlet@adacore.com>
7563 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
7566 2014-02-06 Robert Dewar <dewar@adacore.com>
7568 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
7569 * exp_ch3.adb (Build_Dcheck_Function): Set
7570 Is_Discriminant_Check_Function.
7572 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7574 * exp_ch7.adb (Is_Subprogram_Call): Inspect
7575 the original tree in certain cases where a construct has been
7576 factored out and replaced by a reference to a temporary.
7578 2014-02-06 Ed Schonberg <schonberg@adacore.com>
7580 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
7581 parameters when propagating predicate function to full view.
7582 (Find_Type_Of_Object): Freeze base type of object type to catch
7583 premature use of discriminated private type without a full view.
7585 2014-02-06 Robert Dewar <dewar@adacore.com>
7587 * sprint.adb: Minor reformatting.
7589 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7591 * exp_ch4.adb (Process_Transient_Object): Add local variable
7592 Temp_Ins. When the transient object is initialized by an
7593 aggregate, the hook must capture the object after the last
7594 component assignment takes place.
7595 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
7596 routine Is_Subprogram_Call.
7597 (Is_Subprogram_Call): Inspect an
7598 aggregate that has been heavily expanded for subprogram calls.
7599 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
7600 and Temp_Ins. Remove the nested declare block and adjust the
7601 indentation. When the transient object is initialized by an
7602 aggregate, the hook must capture the object after the last
7603 component assignment takes place.
7605 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7607 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
7608 external states with enabled properties that do not match the
7610 (Property_Error): New routine.
7611 * sem_res.adb (Property_Error): New routine.
7612 (Resolve_Actuals): Detect illegal uses of external variables with
7613 enabled properties in procedure calls that do not match the mode of
7614 the corresponding formal parameter.
7616 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
7618 * sem_util.adb (Has_Enabled_Property): Rename
7619 formal parameter Prop_Nam to Property. Update the comment on usage
7620 and all occurrences in the body. Add local variable Prop_Nam. When
7621 inspecting a property with an expression, the property name
7622 appears as the first choice of the component association.
7624 2014-02-04 Robert Dewar <dewar@adacore.com>
7626 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
7628 2014-02-04 Gary Dismukes <dismukes@adacore.com>
7630 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
7631 for consistency with other messages.
7633 2014-02-04 Ed Schonberg <schonberg@adacore.com>
7635 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
7636 iterator, indicate that the element is a constant if the container
7637 type does not have a variable indexing aspect.
7638 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
7639 marked as constant, do not reset its Ekind, to ensure that
7640 container elements in an element loop are not modified if the
7641 container (e.g. a hashed set) only has a constant indexing aspect.
7643 2014-02-04 Arnaud Charlet <charlet@adacore.com>
7645 * g-souinf.ads: Subprograms in this unit are actually not pure.
7646 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
7647 * einfo.ads (Is_Pure): Update doc to match implementation.
7649 2014-02-04 Gary Dismukes <dismukes@adacore.com>
7651 * exp_ch13.adb: Minor spelling fix.
7653 2014-02-04 Robert Dewar <dewar@adacore.com>
7655 * opt.ads: Minor comment update.
7657 2014-02-04 Robert Dewar <dewar@adacore.com>
7659 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
7662 2014-02-04 Ed Schonberg <schonberg@adacore.com>
7664 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
7665 on null expressions if component type is non-null, when the
7666 corresponding association covers an empty range of index values.
7668 2014-02-04 Robert Dewar <dewar@adacore.com>
7670 * sinfo.ads: Further comments on N_Expression_With_Actions node.
7672 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
7674 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
7675 variables Out_Items and Ref_Global. Remove local constant
7676 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
7677 and D8. Remove the useless collection of global items as this
7678 was a leftover from an earlier version of the routine. Move
7679 several routines out to avoid deep nesting and indentation.
7680 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
7681 parameter Do_Checks to Post_Errors. Update the comment on usage.
7682 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
7683 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
7684 to Post_Errors. Update the comment on usage. Account for the
7685 case where a self referential state may have a null input_list.
7686 (Is_Self_Referential): New routine.
7688 2014-02-04 Ed Schonberg <schonberg@adacore.com>
7690 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
7691 entity renames an expression, as in the case of an object of
7692 an unconstrained type initialized by a function call, defer the
7693 rewriting of the expression to the expander.
7694 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
7695 'Alignment): If the entity renames an expression, introduce
7696 temporary to capture value, and rewrite original declaration to
7699 2014-02-04 Gary Dismukes <dismukes@adacore.com>
7701 * g-comlin.adb: Minor typo fix.
7703 2014-02-04 Ed Schonberg <schonberg@adacore.com>
7705 * freeze.adb (Freeze_All): Types derived from a formal
7706 access_to_classwide type do not have a finalization master.
7708 2014-02-04 Robert Dewar <dewar@adacore.com>
7710 * sprint.adb: Minor reformatting.
7712 2014-02-04 Robert Dewar <dewar@adacore.com>
7714 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
7715 cases where Actions is a null list.
7716 * sinfo.ads (N_Expression_With_Actions): Actions can be
7717 temporarily empty during semantic analysis, but must be non-empty
7718 in the final expanded tree.
7720 2014-01-31 Robert Dewar <dewar@adacore.com>
7722 * exp_ch9.adb: Minor reformatting.
7724 2014-01-31 Emmanuel Briot <briot@adacore.com>
7726 * g-comlin.adb (Set_Command_Line): Take the switches
7727 configuration from the Command_Line_Config.
7729 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
7731 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
7734 2014-01-31 Vincent Celier <celier@adacore.com>
7736 * projects.texi: Add more documentation about others used as an
7737 index in indexed attributes.
7739 2014-01-31 Robert Dewar <dewar@adacore.com>
7741 * gnat_ugn.texi: Minor update.
7742 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
7743 * exp_util.adb: Minor reformatting.
7745 2014-01-31 Ed Schonberg <schonberg@adacore.com>
7747 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
7748 depends on data that is not private to the protected object,
7749 and potentially modifiable in unsynchronized fashion.
7751 2014-01-31 Yannick Moy <moy@adacore.com>
7753 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
7756 2014-01-31 Robert Dewar <dewar@adacore.com>
7758 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
7759 for Unknown_Package.
7760 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
7762 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
7764 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
7765 the logic that generates a runtime check to determine the
7766 controlled status of the object about to be allocated or
7767 deallocated. Class-wide types now always use a runtime check
7768 even if they appear as generic actuals.
7769 (Find_Object): Detect
7770 a special case that involves interface class-wide types because
7771 the object appears as a complex expression.
7773 2014-01-31 Ed Schonberg <schonberg@adacore.com>
7775 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
7776 subprogram with an incomplete untagged formals on the list of
7777 private dependents, to verify that the type is properly completed
7778 in the private part.
7779 * sem_attr.adb: Code clean up.
7781 2014-01-31 Robert Dewar <dewar@adacore.com>
7783 * exp_ch6.adb: Minor reformatting.
7785 2014-01-31 Vincent Celier <celier@adacore.com>
7787 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
7788 when Pkg is unknown.
7790 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
7792 * sem_res.adb (Resolve_Entity_Name): Comment
7793 reformatting. Allow volatile objects in various generated checks.
7795 2014-01-31 Ed Schonberg <schonberg@adacore.com>
7797 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
7798 component association, set the etype of the identifier, for
7801 2014-01-31 Ed Schonberg <schonberg@adacore.com>
7803 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
7804 declared in a package, not checks can apply to the subprogram.
7806 2014-01-31 Robert Dewar <dewar@adacore.com>
7808 * erroutc.adb (Validate_Specific_Warnings): Warnings are
7809 controlled -gnatw.W.
7810 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
7811 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
7813 2014-01-31 Arnaud Charlet <charlet@adacore.com>
7815 * exp_disp.adb: Update comments.
7817 2014-01-31 Yannick Moy <moy@adacore.com>
7819 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
7820 Save_Global_References): Guard access to expression in aspect.
7822 2014-01-31 Yannick Moy <moy@adacore.com>
7824 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
7825 Issue an error when the pragma is applied to a generic unit,
7826 a generic declaration, or inside a generic.
7828 2014-01-31 Yannick Moy <moy@adacore.com>
7830 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
7833 2014-01-31 Robert Dewar <dewar@adacore.com>
7835 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
7838 2014-01-31 Tristan Gingold <gingold@adacore.com>
7840 * exp_disp.adb: Add a historic note.
7842 2014-01-31 Robert Dewar <dewar@adacore.com>
7844 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
7845 Process_Deferred_References.
7847 2014-01-31 Yannick Moy <moy@adacore.com>
7849 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
7850 ineffective pragma Warnings(Off) in GNATprove_Mode.
7852 2014-01-31 Bob Duff <duff@adacore.com>
7854 * s-taskin.ads: Minor comment fix.
7855 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
7856 just direct dependents. If this is actually an abort, each task
7857 will take care of aborting its dependents, so all dependents will
7858 get aborted, as before. However, when this is called the second
7859 time from Vulnerable_Complete_Master "for convenience" (i.e. to
7860 kill off tasks waiting at terminate alternatives), aborting
7861 indirect dependents is wrong, because it causes some unrelated
7862 tasks to get aborted.
7864 2014-01-31 Robert Dewar <dewar@adacore.com>
7866 * sem_ch4.adb: Minor reformatting.
7868 2014-01-31 Robert Dewar <dewar@adacore.com>
7870 * exp_ch2.adb: New calling sequence for Is_LHS.
7871 * frontend.adb: Add call to Process_Deferred_References.
7872 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
7873 (Deferred_References): New table.
7874 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
7876 (Find_Expanded_Name): Ditto.
7877 * sem_res.adb: New calling sequence for Is_LHS.
7878 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
7879 * sem_warn.adb: Call Process_Deferred_References before issuing
7882 2014-01-31 Tristan Gingold <gingold@adacore.com>
7884 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
7885 use of System_Tasking_Protected_Objects_Single_Entry.
7886 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
7887 of Protected_Single_Entry_Call.
7888 (Expand_N_Timed_Entry_Call): Remove single_entry case.
7889 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
7891 (Make_Disp_Timed_Select_Body): Likewise.
7892 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
7893 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
7895 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
7896 (Wait_For_Completion_With_Timeout): Remove.
7897 (Protected_Single_Entry_Call): Remove Mode parameter
7898 (always Simple_Call).
7899 (Service_Entry): Remove Self_Id constant (not used anymore).
7900 (Timed_Protected_Single_Entry_Call): Remove.
7901 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
7902 (Protected_Single_Entry_Call): Remove Mode parameter.
7904 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7906 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
7907 * einfo.ads (Get_Pragma): Update the comment on special pragmas
7908 handled by this routine.
7909 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
7910 to the contract of the related subprogram body.
7911 * sem_util.adb (Add_Contract_Item): Handle the insertion of
7912 pragma Refined_Post into the contract of a subprogram body.
7913 * sinfo.ads Update the documentation of node N_Contract.
7914 * sem_res.adb (Resolve_Entity_Name): Add a guard
7915 to detect abstract states and variables only when checking the
7916 SPARK 2014 rules concerning volatile object placement.
7918 2014-01-29 Ed Schonberg <schonberg@adacore.com>
7920 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
7921 null is compatible with any access type.
7923 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7925 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
7926 placement is not in a package.
7928 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7930 * sem_util.adb (Has_Enabled_Property): Compare the character field of
7933 2014-01-29 Robert Dewar <dewar@adacore.com>
7935 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
7936 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
7937 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
7939 2014-01-29 Robert Dewar <dewar@adacore.com>
7941 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
7942 * sem_warn.adb (Check_References): Suppress warnings if inside
7943 Initial_Condition pragma.
7945 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
7947 * sem_prag.adb (Check_Missing_Part_Of): List all values of
7948 State_Space_Kind for readability reasons. Do not emit an error on
7949 a private item when the enclosing package lacks aspect/pragma
7950 Abstract_State. Do not emit an error on a private package
7951 instantiation when the corresponding generic template lacks
7953 (Has_Visible_State): New routine.
7954 * sem_util.adb (Find_Placement_In_State_Space): The visible
7955 declarations of any kind of child units in general act as proper
7958 2014-01-29 Robert Dewar <dewar@adacore.com>
7960 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
7961 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
7962 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
7963 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
7964 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
7965 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
7966 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
7967 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
7968 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
7969 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
7970 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
7971 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
7972 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
7973 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
7974 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
7975 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
7976 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
7977 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
7978 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
7979 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
7980 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
7981 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
7982 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
7983 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
7984 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
7985 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
7986 s-regpat.adb, s-secsta.adb, s-stalib.ads,
7987 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
7988 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
7989 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
7990 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
7991 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
7993 2014-01-29 Robert Dewar <dewar@adacore.com>
7995 * expander.adb: Minor reformatting.
7997 2014-01-29 Javier Miranda <miranda@adacore.com>
7999 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
8002 2014-01-29 Javier Miranda <miranda@adacore.com>
8004 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
8005 that checks if an interface types defines the predefined "="
8006 function because the compiler was erroneously not generating the
8007 predefined "=" primitive as soon as the name of some interface
8008 primitive is "=" (formals were not checked).
8010 2014-01-29 Ed Schonberg <schonberg@adacore.com>
8012 * expander.adb (Expander): In GNATprove mode, do not process
8013 transient scopes: they are in general not created in this mode,
8014 and an attempt to examine them will lead to constraint errors when
8015 processing configuration pragmas that have analyzable expressions.
8017 2014-01-29 Vincent Celier <celier@adacore.com>
8019 * clean.adb (Gnatclean): Fail if main project is an aggregate
8020 project or if there is an aggregate library project in the
8022 * gnatcmd.adb: Fail if the main project is an aggregate project
8023 or if there is an aggegate library project in the project tree.
8024 * make.adb (Initialize): : Fail if main project is an aggregate
8025 project or if there is an aggregate library project in the
8027 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
8028 * prj-makr.adb (Initialize): Fail if the main project is an
8029 aggregate project or an aggregate library project.
8031 2014-01-29 Vincent Celier <celier@adacore.com>
8033 * prj-part.adb (Check_Import_Aggregate): New procedure
8034 to check if an imported project is an aggregate project.
8035 (Parse_Single_Project): Call Check_Import_Aggregate
8036 * projects.texi: Document that aggregate projects cannot be
8037 extended or imported.
8039 2014-01-29 Robert Dewar <dewar@adacore.com>
8041 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
8042 reformatting and code clean up.
8043 * gnat_ugn.texi: Add documentation section on Atomic Variables
8046 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
8048 * einfo.adb Flag264 is now unused.
8049 (Has_Body_References): Removed.
8050 (Set_Has_Body_References): Removed.
8051 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
8052 * einfo.ads Update the comment on usage of attribute
8053 Body_References. Remove attribute Has_Body_References and its
8055 (Has_Body_References): Removed along with pragma Inline.
8056 (Set_Has_Body_References): Removed along with pragma Inline.
8057 * sem_prag.adb (Analyze_Global_Item): Move the call to
8058 Record_Possible_Body_Reference in the state related checks
8059 section. Add a comment intended function.
8060 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
8061 in the state related checks section. Add a comment intended function.
8062 (Analyze_Refinement_Clause): Cleanup the illegal body reference
8063 reporting. Add a comment on timing of error reporting.
8064 (Record_Possible_Body_Reference): Reimplement the routine.
8066 2014-01-29 Vincent Celier <celier@adacore.com>
8068 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
8069 unit-based languages.
8070 (Mains.Complete_Mains.Do_Complete): Use the source file project
8071 tree when calling Find_File_Add_Extension. Use the correct
8072 project name when reporting an error.
8074 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
8076 * aspects.adb Add an entry for aspect Part_Of in table
8078 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
8079 Aspect_Argument, Aspect_Names and Aspect_Delay.
8080 * atree.h Define Elist9.
8081 * atree.adb (Elist9): New routine.
8082 (Set_Elist9): New routine.
8083 * atree.ads (Elist9): New routine.
8084 (Set_Elist9): New routine.
8085 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
8086 the list of node usage. Remove Refined_State from the list of
8088 (Encapsulating_State): New routine.
8090 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
8091 (Refined_State): Removed.
8092 (Set_Encapsulating_State): New routine.
8093 (Set_Part_Of_Constituents): New routine.
8094 (Set_Refined_State): Removed.
8095 (Write_Field9_Name): Add an entry
8096 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
8097 Encapsulating_State. Remove the entry for Refined_State.
8098 * einfo.ads Add new attributes Encapsulating_State
8099 and Part_Of_Constituents alond with their usage in
8100 entities. Remove attribute Refined_State along with its
8102 (Encapsulating_State): New routine and
8103 pragma Inline. (Get_Pragma): Update the comment on usage.
8104 (Part_Of_Constituents): New routine and pragma Inline.
8105 (Refined_State): Removed along with pragma Inline.
8106 (Set_Encapsulating_State): New routine and pragma Inline.
8107 (Set_Part_Of_Constituents): New routine and pragma Inline.
8108 (Set_Refined_State): Removed along with pragma Inline.
8109 * par-prag.adb Pragma Part_Of does not need any special processing
8111 * sem_ch3.adb (Analyze_Declarations): Remove local variables
8112 Body_Id and Prag. Call separate routines to analyze the
8113 contract of a package [body].
8114 (Analyze_Object_Contract):
8115 Update the comment on usage. Remove local variables
8116 Items and Nam. Use Get_Pragma rather than traversing the
8117 classification list. Verify whether the lack of indicator
8118 Part_Of agrees with the placement of the variable in state space.
8119 (Analyze_Object_Declaration): Initialize the encapsulating state
8120 of a variable. (Requires_State_Refinement): Moved to sem_util.
8121 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
8122 (Analyze_Package_Contract): New routine.
8123 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
8124 (Analyze_Package_Contract): New routine.
8125 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
8126 state and Part_Of constituents.
8127 * sem_ch13.adb (Analyze_Aspect_Specifications):
8128 Add processing for aspect Part_Of. Update all
8129 calls to Decorate_Delayed_Aspect_And_Pragma.
8130 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
8131 not need any special processing at freeze time.
8132 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
8133 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
8134 update the associated comment.
8135 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
8136 (Analyze_Abstract_State): Add new global variable State_Id. Remove
8137 local constants Errors and Loc. Remove local variables Is_Null
8138 and State_Nam. Create the entity of the abstract state on the
8139 spot, before all remaining checks are performed. Verify that a
8140 missing Part_Of option agrees with the placement of the abstract
8141 state within the state space.
8142 (Analyze_Depends_In_Decl_Part):
8143 Add new global variables Constits_Seen and States_Seen. Check
8144 that a state and a corresponding constituent do not appear
8145 in pragma [Refined_]Depends.
8146 (Analyze_Global_In_Decl_Part):
8147 Add new global variables Constits_Seen and States_Seen. Check
8148 that a state and a corresponding constituent do not appear
8149 in pragma [Refined_]Global.
8150 (Analyze_Global_Item):
8151 Remove the now obsolete code that deals with Part_Of.
8152 Add the entity of the global item to the list of processed
8153 items. (Analyze_Initializes_In_Decl_Part): Add new global
8154 variables Constits_Seen and States_Seen. Check that a state
8155 and a corresponding constituent do not appear in pragma
8157 (Analyze_Initialization_Item): Add the entity
8158 of the initialization item to the list of processed items.
8159 (Analyze_Input_Item): Add the entity of the initialization
8160 item to the list of processed items.
8161 (Analyze_Input_Output):
8162 Remove the now obsolete code that deals with Part_Of. Add the
8163 entity of the input/output to the list of processed items.
8164 (Analyze_Part_Of): New routine.
8165 (Analyze_Part_Of_Option): Remove
8166 local constant Par_State. Add local constant Encaps and local
8167 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
8168 the option. Turn the related state into a Part_Of constituent
8169 if the option is legal.
8170 (Analyze_Pragma): Add processing
8172 (Analyze_Refined_State_In_Decl_Part):
8173 Remove global constants Pack_Body and Spec_Id. Remove
8174 global variables Abstr_States and Hidden_States. Add new
8175 global variables Available_States, Body_Id, Body_States and
8176 Spec_Id. Add new local constant Body_Decl. Reimplement the
8177 logic that extracts the states available for refinement from
8178 the related package and the body hidden states of the said
8180 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
8181 (Check_Applicable_Policy): Alphabetize body.
8182 (Check_Dependency_Clause): Replace Refined_State
8183 with Encapsulating_State.
8184 (Check_Matching_Constituent):
8185 Reimplement the logic that determines whether an item is a valid
8186 / invalid constituent of the current refined state. Return when
8187 a construct does not denote a valid abstract state. Extract the
8188 list of Part_Of constituents for further analysis. Check that all
8189 Part_Of constituents of a state have been used in its refinement.
8190 (Check_Matching_State): Update the comment on usage. Operate
8191 on the list of available states.
8192 (Check_Missing_Part_Of): New routine.
8193 (Check_Refined_Global_Item): Replace Refined_State
8194 with Encapsulating_State.
8195 (Check_State_And_Constituent_Use): New routine.
8196 (Create_Abstract_State): New routine.
8197 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
8198 (Is_Part_Of): Removed.
8199 (Collect_Body_States): New routine.
8200 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
8201 (Collect_Hidden_States): Removed.
8202 (Report_Unrefined_States): Change the profile of the procedure along
8203 with the comment on usage.
8204 (Report_Unused_Constituents): New routine.
8205 (Report_Unused_Hidden_States): Removed.
8206 (Report_Unused_States): New routine.
8207 * sem_prag.ads (Check_Missing_Part_Of): New routine.
8208 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
8209 appear in the classification pragmas of a package instantiation
8211 (Find_Placement_In_State_Space): New routine.
8212 (Is_Child): Removed.
8213 (Is_Child_Or_Sibling): Remove formal
8214 parameter Private_Child. Remove the private child checks.
8215 (Requires_State_Refinement): Moved from sem_ch3.
8216 * sem_util.ads Add new type State_Space_Kind along with
8217 comment on its usage and values.
8218 (Add_Contract_Item): Update the comment on usage.
8219 (Find_Body_Discriminal): Alphabetize spec.
8220 (Find_Placement_In_State_Space): New routine.
8221 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
8222 and update the comment on usage.
8223 (Requires_State_Refinement): Moved from sem_ch3.
8224 * sinfo.ads: Update the documentation of N_Contract.
8225 * snames.ads-tmpl The predefined name for Part_Of is now used
8226 to denote a pragma. Add Pragma_Id for Part_Of.
8228 2014-01-29 Emmanuel Briot <briot@adacore.com>
8230 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
8232 (Dump): New subprogram.
8234 2014-01-29 Tristan Gingold <gingold@adacore.com>
8236 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
8237 Expand_Entry_Declaration to factorize code.
8239 2014-01-29 Ed Schonberg <schonberg@adacore.com>
8241 * checks.adb: minor clarification.
8242 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
8243 search for primitive operations to the entities that immediately
8244 follow the type declaration.
8246 2014-01-29 Tristan Gingold <gingold@adacore.com>
8248 * exp_ch9.adb (Build_Protected_Entry): Do not call
8249 Complete_Entry_Body anymore.
8250 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
8251 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
8253 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
8255 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
8256 string when the Name input bigger than allowed. Adapt the function
8259 2014-01-29 Ed Schonberg <schonberg@adacore.com>
8261 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
8262 if expression is within a case_expression of if_expression.
8264 2014-01-29 Robert Dewar <dewar@adacore.com>
8266 * exp_ch9.adb, inline.ads: Minor reformatting.
8268 2014-01-29 Tristan Gingold <gingold@adacore.com>
8270 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
8272 2014-01-29 Yannick Moy <moy@adacore.com>
8274 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
8275 SPARK_Mode_Pragma components to be able to analyze generic
8277 * sem_ch12.adb (Analyze_Package_Instantiation,
8278 Inline_Instance_Body, Need_Subprogram_Instance_Body,
8279 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
8280 for future analysis of the instance.
8281 (Instantiate_Package_Body,
8282 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
8283 from instantiation to analyze the instance.
8285 2014-01-29 Robert Dewar <dewar@adacore.com>
8287 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
8290 2014-01-29 Yannick Moy <moy@adacore.com>
8292 * gnat_rm.texi: Update description of SPARK_Mode pragma.
8294 2014-01-29 Tristan Gingold <gingold@adacore.com>
8296 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
8298 2014-01-29 Thomas Quinot <quinot@adacore.com>
8300 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
8302 2014-01-29 Ed Schonberg <schonberg@adacore.com>
8304 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
8305 resulting string is an internal entity. and thus requires no
8306 initialization. This is relevant when Initialize_ Scalars is
8307 enabled, because the resultant spurious initialization may lead to
8308 secondary stack anomalies that produce a mangled name for a task.
8310 2014-01-29 Yannick Moy <moy@adacore.com>
8312 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
8313 not inherited from spec anymore. Check consistency
8314 rules after processing of declarations.
8315 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
8316 from spec anymore. Check consistency rules after processing of
8318 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
8320 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
8323 2014-01-27 Robert Dewar <dewar@adacore.com>
8325 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
8327 (Resolve_Range): Add type name/location to unordered msg.
8329 2014-01-27 Claire Dross <dross@adacore.com>
8331 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
8332 Capacity) is only called with Capacity >= Length (Source) and
8333 Capacity in Capacity_Range.
8334 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
8335 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
8336 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
8337 in the code is this is not the case.
8339 2014-01-27 Thomas Quinot <quinot@adacore.com>
8341 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
8342 selected component in an instance where the component of the
8343 actual is not visibile at instantiation.
8345 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8347 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
8348 has a dynamic predicate, generate freeze node for Actual_Subtype
8349 at once, because the declaration of the corresponding predicate
8350 function will make reference to it.
8352 2014-01-27 Tristan Gingold <gingold@adacore.com>
8354 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
8356 2014-01-27 Robert Dewar <dewar@adacore.com>
8358 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
8359 for 2**X optimization.
8361 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8363 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
8364 explicitly whether value is in range of Character, because the
8365 library is typically compiled with range checks disabled, and
8366 we cannot rely on the implicit check on the argument of 'Val.
8368 2014-01-27 Vincent Celier <celier@adacore.com>
8370 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
8371 not the Target to itself.
8373 2014-01-27 Robert Dewar <dewar@adacore.com>
8375 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
8376 changes to avoid incorrect use of unordered enum types.
8378 2014-01-27 Thomas Quinot <quinot@adacore.com>
8380 * sem_ch4.adb: Minor reformatting.
8382 2014-01-27 Robert Dewar <dewar@adacore.com>
8384 * scn.adb (Check_End_Of_Line): Removed.
8385 (Error_Long_Line): Removed.
8386 (Determine_License): Use versions of above routines from Scanner.
8387 * scng.adb (Check_End_Of_Line): Moved to spec.
8388 (Error_Long_Line): Removed, no longer used.
8389 * scng.ads (Check_End_Of_Line): Moved here from body.
8391 2014-01-27 Tristan Gingold <gingold@adacore.com>
8393 * exp_ch7.adb (Build_Cleanup_Statements): Call
8394 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
8396 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
8397 Remove Service_Name variable.
8398 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
8399 factorize code from the above subprograms.
8400 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
8402 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
8404 * einfo.adb (Has_Option): Reimplemented.
8405 * sem_prag.adb (Analyze_Refinement_Clause): Add global
8406 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
8407 External_Constit_Seen and State. Add local variables Body_Ref,
8408 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
8409 avoid a cumbersome while pool. Verify the legality of an external
8410 state and relevant properties.
8411 (Check_External_Property): New routine.
8412 (Check_Matching_State): Remove parameter profile
8413 and update comment on usage.
8414 (Collect_Constituent): Store the
8415 relevant external property of a constituent.
8416 * sem_util.adb (Async_Readers_Enabled): Update the call to
8417 Has_Enabled_Property.
8418 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
8419 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
8420 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
8421 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
8422 Update comment on usage. Reimplement the logic to recognize the various
8423 formats of properties.
8425 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8427 * par-ch5.adb: Minor reformatting.
8429 2014-01-27 Tristan Gingold <gingold@adacore.com>
8431 * s-tposen.ads: Harmonize style and comments.
8433 2014-01-27 Vincent Celier <celier@adacore.com>
8435 * projects.texi: Document that shared library projects, by
8436 default, cannot import projects that are not shared library
8439 2014-01-27 Robert Dewar <dewar@adacore.com>
8441 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
8444 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8446 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
8447 any other exception is raised.
8448 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
8449 still necessary to perform a conversion in order to remove overlong
8452 2014-01-27 Robert Dewar <dewar@adacore.com>
8454 * exp_smem.adb: Minor reformatting.
8456 2014-01-27 Thomas Quinot <quinot@adacore.com>
8458 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
8460 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8462 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
8463 nodes for operands to the original node for the call, to preserve
8464 Original_Node pointers within the resolved operands, given that
8465 they may have been rewritten as well. Previous approach copied
8466 the operands into a new tree and lost those pointers.
8468 2014-01-27 Claire Dross <dross@adacore.com>
8471 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
8473 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8475 * sem_util.adb (Check_Internal_Protected_Use): A call through
8476 an anonymous access parameter of the current protected function
8477 is not a potential modification of the current object.
8479 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8481 * a-cobove.adb (Reserve_Capacity): Procedure raises
8482 Capacity_Error, not Constraint_Error, when request cannot be
8485 2014-01-27 Vincent Celier <celier@adacore.com>
8487 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
8488 not the Target to itself.
8490 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8492 * exp_ch4.adb (Expand_Concatenate): If the target of the
8493 concatenation is a library-level entity, always use the off-line
8494 version of concatenation, regardless of optimization level. This
8495 is space-efficient, and prevents linking problems when some
8496 units are compiled with different optimization levels.
8498 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8500 * sem_ch5.adb: Code clean up.
8502 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8504 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
8505 when an array or container iterator includes a subtype indication,
8506 which is only legal in an element iterator.
8508 2014-01-27 Thomas Quinot <quinot@adacore.com>
8510 * exp_ch7.adb: Minor reformatting.
8512 2014-01-27 Robert Dewar <dewar@adacore.com>
8514 * opt.adb (SPARK_Mode): Default for library units is None rather
8516 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
8518 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
8520 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
8522 2014-01-27 Robert Dewar <dewar@adacore.com>
8524 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
8525 Suspicious_Labels table if we have identifier; followed by loop
8527 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
8528 * par.adb (Suspicious_Labels): New table.
8530 2014-01-27 Robert Dewar <dewar@adacore.com>
8532 * exp_aggr.adb (Check_Bounds): Reason is range check, not
8535 2014-01-27 Yannick Moy <moy@adacore.com>
8537 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
8539 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
8541 (Add_SPARK_Xrefs): Include references to constants.
8542 * spark_xrefs.ads Document new character 'c' for references to
8545 2014-01-27 Thomas Quinot <quinot@adacore.com>
8547 * exp_smem.adb (Add_Write_After): For a function call, insert write as
8548 an after action in a transient scope.
8550 2014-01-27 Thomas Quinot <quinot@adacore.com>
8552 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
8553 to a shared variable as an OUT formal in a call to an init proc,
8554 the 'Read call must be emitted after, not before, the call.
8556 2014-01-27 Robert Dewar <dewar@adacore.com>
8558 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
8560 2014-01-27 Robert Dewar <dewar@adacore.com>
8562 * a-wichha.adb (Character_Set_Version): Change to output proper
8565 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
8567 * einfo.adb (Is_Input_Only_State): Removed.
8568 (Is_Non_Volatile_State): Removed.
8569 (Is_Output_State): Removed.
8570 * einfo.ads (Is_Input_Only_State): Remove attribute and
8571 subprogram. Update related entity.
8572 (Is_Non_Volatile_State):
8573 Remove attribute and subprogram. Update related entity.
8574 (Is_Output_State): Removed attribute and subprogram. Update
8576 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
8578 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
8579 an object, not just variables.
8580 (Analyze_Object_Contract): New routine.
8581 (Analyze_Variable_Contract): Removed.
8582 (Process_Discriminants): Detect an illegal use of volatile
8583 discriminant in SPARK mode.
8584 * sem_ch5.adb (Analyze_Iterator_Specification):
8585 Detect an illegal use of volatile loop variable.
8586 (Analyze_Loop_Parameter_Specification): Detect an illegal use
8587 of volatile loop variable.
8588 * sem_ch6.adb (Process_Formals): Update the volatile object
8589 detection. Detect an illegal formal of mode IN OUT or OUT in
8590 SPARK mode. Enhance the error messages with references.
8591 * sem_ch12.adb (Instantiate_Object): Update the volatile object
8592 detection. Enhance the error messages with references.
8593 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
8594 messages with references.
8595 (Analyze_Contract_Case): Enhance the error messages with references.
8596 (Analyze_External_Property): Call Check_Duplicate_Property to process
8597 an external property.
8598 (Analyze_External_Property_In_Decl_Part): New routine.
8599 (Analyze_External_State_In_Decl_Part): Removed.
8600 (Analyze_Global_Item): Detect an illegal
8601 use of a volatile constant. Detect an illegal use
8602 of a variable with enabled Effective_Reads. Enhance
8603 the error messages with references. Remove obsolete
8604 checks concerning Input_Only and Output_Only states.
8605 (Analyze_Initialization_Item): Enhance the error messages
8607 (Analyze_Initializes_In_Decl_Part): Do not
8608 collect the states and variables when the initialization list
8610 (Analyze_Input_Item): Enhance the error messages with references.
8611 (Analyze_Input_Output): Enhance the error messages with references.
8612 (Analyze_Pragma): Enhance the error messages with references.
8613 (Analyze_Refinement_Clause): Code reformatting.
8614 (Analyze_Refined_Depends_In_Decl_Part):
8615 Rename global variable Global to Reg_Global and update all
8616 occurrences. Add local variables D7 and D8. Update the error
8617 messages with references. Update the call to Collect_Global_Items.
8618 (Analyze_Refined_Global_In_Decl_Part): Add local variables
8619 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
8620 the call to Collect_Global_Items. Account for a Proof_In state
8621 in null / useless refinement checks. Verify the coverage of
8623 (Check_Dependency_Clause): Remove local variable
8624 Out_Constits. Remove the retrieval and removal of constituents
8625 for an Output_Only state. Remove the reporting of unused
8626 Output_Only state constituents.
8627 (Check_Duplicate_Mode): Enhance
8628 the error message with a reference.
8629 (Check_Duplicate_Property): New routine.
8630 (Check_Duplicate_Option): Enhance the error message with a reference.
8631 (Check_External_Properties): Enhance the error message with a reference.
8632 (Check_Function_Return): Enhance the error message with a reference.
8633 (Check_In_Out_States): Update
8634 comment on usage. Add a specialized error message for Proof_In
8635 constituents. Enhance the error message with a reference.
8636 (Check_Input_States): Update comment on usage. Account for
8637 possible Proof_In constituents. Enhance the error message
8639 (Check_Matching_Constituent): Enhance the error message with a
8641 (Check_Matching_State): Enchance the error message with a reference.
8642 (Check_Mode): Add local variable From_Global. Update the call to
8643 Find_Mode. Emit more precise error messages concerning extra items
8644 (Check_Mode_Restriction_In_Enclosing_Context): Consider
8645 pragma Refined_Global. Enhance the error message with a
8647 (Check_Mode_Restriction_In_Function): Enhance the error message with
8649 (Check_Output_States): Update comment on usage. Add local variable
8650 Posted. Account for possible Proof_In constituents. Produce a detailed
8651 list of missing constituents.
8652 (Check_Proof_In_States): New routine.
8653 (Check_Refined_Global_Item): Handle Proof_In
8654 constituents. Enchance the error message with a reference.
8655 (Collect_Global_Items): Add formal parameters Proof_In_Items
8656 and Has_Proof_In_State. Update the comment on usage. Account
8658 (Create_Or_Modify_Clause): Enchance
8659 the error message with a reference.
8661 formal parameter From_Global. Update the comment on usage.
8662 Detect when the mode is governed by pragma [Refined_]Global.
8663 (Output_Constituents): Removed.
8664 (Report_Extra_Constituents):
8665 Report extra Proof_In constituents.
8666 (Report_Unused_Constituents): Removed.
8667 (Usage_Error): Code reformatting. Enhance the error
8668 messages with reference.
8669 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
8670 (Analyze_External_State_In_Decl_Part): Removed.
8671 * sem_res.adb (Resolve_Actuals): Update the volatile object
8672 detection. Enhance the error message with a reference.
8673 (Resolve_Entity_Name): Update the volatile object
8674 detection. Enhance the error message with a reference.
8675 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
8676 (Is_SPARK_Volatile_Object): New routine.
8677 (Has_Volatile_Component): New routine.
8678 * sem_util.ads (Is_Delegate): Alphabetized.
8679 (Is_SPARK_Volatile_Object): New routine.
8680 (Has_Volatile_Component): New routine.
8681 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
8683 2014-01-27 Ed Schonberg <schonberg@adacore.com>
8685 * sem_attr.adb: Resolve fully prefix of 'Update.
8687 2014-01-27 Ben Brosgol <brosgol@adacore.com>
8689 * gnat_rm.texi: Minor clarifications.
8691 2014-01-27 Robert Dewar <dewar@adacore.com>
8693 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
8694 about call that is generated as part of an Initial_Condition
8696 * sem_prag.adb: Minor spelling correction.
8698 2014-01-27 Robert Dewar <dewar@adacore.com>
8700 * sem_prag.adb (Set_Convention_From_Pragma): Check that
8701 convention Ghost can only apply to functions.
8702 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
8704 2014-01-27 Robert Dewar <dewar@adacore.com>
8706 * gnat_ugn.texi: Add Short_Enums to documentation of
8709 2014-01-27 Robert Dewar <dewar@adacore.com>
8711 * sem_prag.adb (Analyze_Input_Item): Correct check for input
8712 item in same package.
8713 * sem_util.ads, sem_util.adb (Within_Scope): New function.
8715 2014-01-26 Arnaud Charlet <charlet@adacore.com>
8717 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
8718 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
8719 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
8720 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
8723 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
8725 * gcc-interface/Makefile.in: Fix oversight.
8727 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
8729 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
8730 conversion from a thin pointer with a shifted value.
8731 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
8732 read-only flag from the values onto the result.
8733 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
8735 2014-01-25 Tristan Gingold <gingold@adacore.com>
8737 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
8738 for E_Variable with a pragma Linker_Section.
8740 2014-01-25 Robert Dewar <dewar@adacore.com>
8742 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
8743 with Default_Value aspect is passed in by copy.
8745 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
8747 * set_targ.adb: Set Short_Enums.
8748 * gcc-interface/lang.opt (fshort-enums): New option.
8749 * gcc-interface/misc.c (gnat_handle_option): Handle it.
8750 (gnat_post_options): Do not modify the global settings.
8752 2014-01-24 Robert Dewar <dewar@adacore.com>
8754 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
8756 (Random_Decimal_Fixed): New generic function.
8757 * s-rannum.ads: Minor comment clarifications.
8759 2014-01-24 Robert Dewar <dewar@adacore.com>
8761 * back_end.adb: Remove Short_Enums handling (handled in
8762 Ttypes/Get_Targ now) Minor added comments.
8763 * freeze.adb: Change name Short_Enums_On_Target to
8765 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
8766 * opt.ads: Minor comment updates.
8767 * sem_ch13.adb: Change name Short_Enums_On_Target to
8769 * set_targ.adb: Set Short_Enums from gcc back end.
8770 * set_targ.ads (Short_Enums): New variable.
8771 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
8772 Ttypes/Get_Targ now).
8773 * ttypes.ads (Target_Short_Enums): New constant boolean switch
8775 2014-01-24 Pascal Obry <obry@adacore.com>
8777 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
8779 2014-01-24 Gary Dismukes <dismukes@adacore.com>
8781 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
8782 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
8785 2014-01-24 Robert Dewar <dewar@adacore.com>
8787 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
8789 2014-01-24 Vincent Celier <celier@adacore.com>
8791 * prj.adb (Add_Aggregated_Project): Do not add a project in
8792 the list if it is already there.
8794 2014-01-24 Yannick Moy <moy@adacore.com>
8796 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
8797 Correct the search for a subrogram declaration to which a pragma is
8800 2014-01-24 Bob Duff <duff@adacore.com>
8802 * gnat_ugn.texi: Document --decimal-grouping and
8803 --based-grouping switches in gnatpp.
8805 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8807 * sinfo.ads: Documentation update.
8809 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8811 * sem_ch3.adb (Constant_Redeclaration): New declaration is
8812 illegal if previous one has an initial expression that is an
8813 aggregate expanded into assignments.
8815 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8817 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
8818 code reorganization to remove spurious warning on a loop with
8819 an array element iterator that has a null range.
8821 2014-01-24 Vincent Celier <celier@adacore.com>
8823 * make.adb (Binding_Phase): When setting the Ada paths, use
8824 the library ALI dir, not the object dir in libraries.
8826 2014-01-24 Yannick Moy <moy@adacore.com>
8828 * sinfo.ads: Add documentation of check flag fields.
8830 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8832 * sem_res.adb (Resolve_Actuals): If an actual is a view
8833 conversion of a discriminated object, and the formal type is
8834 discriminated and constrained, apply a discriminant check to
8837 2014-01-24 Robert Dewar <dewar@adacore.com>
8839 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
8841 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8843 * sem_ch3.adb (Analyze_Declarations): At the end of an
8844 appropriate declarative part, call Freeze_All from the first
8845 declaration in the scope, not from the first unfrozen one. This
8846 is necessary to apply visibility checks to entities with delayed
8847 aspects. Otherwise, in the presence of instantiations and cleanups
8848 that they may generate, the delayed aspects may be analyzed too
8849 late and produce spurious visibility errors.
8850 * sem_attr.adb: Place etype on range.
8851 * sem_ch6.adb: Documentation expression functions.
8853 2014-01-24 Robert Dewar <dewar@adacore.com>
8855 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
8856 terminology in compiler).
8858 2014-01-24 Robert Dewar <dewar@adacore.com>
8860 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
8861 categories, now that Ada 95 supports raise expressions.
8863 2014-01-24 Robert Dewar <dewar@adacore.com>
8865 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
8866 Short_Enums_On_Target.
8867 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
8869 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
8871 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8873 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
8874 indication is given explicity, check that it matches the array
8875 component type or the container element type of the domain
8878 2014-01-24 Tristan Gingold <gingold@adacore.com>
8880 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
8881 * gcc-interface/misc.c (flag_short_enums): Declare.
8882 (gnat_post_options): Set it.
8884 2014-01-24 Vincent Celier <celier@adacore.com>
8886 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
8887 to cache the result when Including_Libraries is False.
8888 * prj-env.ads (Ada_Objects_Path): Update documentation
8889 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
8890 (Get_Object_Directory): Return the Library_Ali_Dir only when
8891 when Including_Libraries is True.
8892 * prj.ads (Get_Object_Directory): Fix and complete documentation
8893 (Project_Data): New component Ada_Objects_Path_No_Libs
8895 2014-01-24 Robert Dewar <dewar@adacore.com>
8897 * checks.adb (Expr_Known_Valid): Result of fpt operator never
8900 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
8902 * back_end.adb: Minor fix in comment.
8904 2014-01-24 Javier Miranda <miranda@adacore.com>
8906 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
8907 required to report the error in case of task types.
8909 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8911 * sem_attr.adb: Additional index checking.
8913 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8915 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
8916 expressions in each component association, and for records note
8917 the entity in each association choice, for subsequent resolution.
8918 (Resolve_Attribute, case 'Update): Complete resolution of
8919 expressions in each component association.
8921 2014-01-24 Robert Dewar <dewar@adacore.com>
8923 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
8924 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
8925 leading to wrong handling of SPARK_Mode for library units).
8927 2014-01-24 Robert Dewar <dewar@adacore.com>
8929 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
8930 on generic instances (do not consider them to be internally
8933 2014-01-24 Doug Rupp <rupp@adacore.com>
8935 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
8936 vice pthread_sigmask.
8938 2014-01-24 Vincent Celier <celier@adacore.com>
8940 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
8943 2014-01-24 Vincent Celier <celier@adacore.com>
8945 * prj-ext.adb (Add): Do not output anything when Silent is True,
8946 whatever the verbosity. When Source is From_External_Attribute,
8947 set the corresponding environment variable if it is not already set.
8948 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
8950 * prj-proc.adb (Process_Expression_For_Associative_Array):
8951 For attribute External, call Prj.Ext.Add with Silent set to
8952 True for the child environment, to avoid useless output in non
8955 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8957 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
8958 range given by a subtype indication, and force evaluation of
8959 the bounds, as for a simple range.
8960 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
8961 of bounds of slice for various kinds of discrete ranges.
8962 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
8963 Evaluate_Slice_Bounds.
8965 2014-01-24 Bob Duff <duff@adacore.com>
8967 * s-taskin.ads (Activator): Make this Atomic, because
8968 Activation_Is_Complete reads it, and that can be called
8969 from any task. Previously, this component was only
8970 modified by the activator before activation, and by
8971 Self after activation.
8972 * a-taside.ads, a-taside.adb (Environment_Task,
8973 Activation_Is_Complete): Implement these missing functions.
8975 2014-01-24 Doug Rupp <rupp@adacore.com>
8977 * init.c: Add a handler section for Android.
8979 2014-01-24 Arnaud Charlet <charlet@adacore.com>
8981 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
8983 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8985 * sem_ch4.adb (Operator_Check): If one operand is a
8986 Raise_Expression, set its type to that of the other operand.
8987 * sem_res.adb (Resolve_Raise_Expression): new procedure.
8988 (Resolve_Actuals): For an actual that is a Raise_Expression,
8989 set the type to that of the formal.
8990 * sem_type.adb (Find_Unique_Type): If one of the operands is a
8991 Raise_Expression, return type of the other operand.
8993 2014-01-24 Ed Schonberg <schonberg@adacore.com>
8995 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
8996 component of the record has a type with a default aspect, and
8997 the corresponding aggregate component is initiaized with a box,
8998 use the default value in the rewritten aggregate.
9000 2014-01-24 Tristan Gingold <gingold@adacore.com>
9002 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
9003 s-interr-sigaction.adb,
9004 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
9005 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
9006 to the call to Install_Restricted_Handlers.
9008 2014-01-24 Emmanuel Briot <briot@adacore.com>
9010 * prj-nmsc.adb (Check_File): Add protection when the source is
9011 not fully initialized.
9013 2014-01-24 Ed Schonberg <schonberg@adacore.com>
9015 * sem_util.adb (Is_Post_State): In a postcondition, a selected
9016 component that denotes an implicit dereference is a reference
9017 to the post state of the subprogram.
9019 2014-01-24 Robert Dewar <dewar@adacore.com>
9021 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
9022 for generated subprograms.
9023 (Analyze_Subprogram_Specification): Ditto.
9025 2014-01-24 Vincent Celier <celier@adacore.com>
9027 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
9028 attributes in package Builder of aggregate and aggregate library
9030 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
9031 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
9032 Remove parameters. Change error message from "... externally
9033 build library ..." to "... externally built project ...".
9034 (Process_Naming_Scheme.Check): Do not do any check in aggregate
9035 project, as attribute Library_Dir and Library_Name have already
9036 been detected as forbidden.
9038 2014-01-24 Vincent Celier <celier@adacore.com>
9040 * prj-env.adb (Find_Project): If cached project path is not in
9041 project directory, look in current directory first and use cached
9042 project path only if project is not found in project directory.
9044 2014-01-24 Robert Dewar <dewar@adacore.com>
9046 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
9048 2014-01-24 Vincent Celier <celier@adacore.com>
9050 * projects.texi: Document that aggregate projects are only
9051 supported by gprbuild, but not by gnatmake. Document that the
9052 only attribute Switches in package Binder of aggregate projects
9053 will be ignored if its index is not others. Document that
9054 attribute Global_Config_File is allowed in package Binder of
9057 2014-01-24 Robert Dewar <dewar@adacore.com>
9059 * sem_prag.adb: Minor code reorganization.
9060 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
9062 2014-01-24 Pascal Obry <obry@adacore.com>
9064 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
9065 attribute definition.
9067 2014-01-24 Vincent Celier <celier@adacore.com>
9069 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
9070 in the Queue the same source (same path, same multi-source index)
9071 from the same project file, to avoid compiling several times
9074 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
9076 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
9077 (Has_Gigi_Rep_Item): Likewise.
9078 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
9079 Has_Gigi_Rep_Item for objects.
9080 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
9081 (prepend_one_attribute): ...this.
9082 (prepend_one_attribute_pragma): New function extracted from...
9083 (prepend_attributes): ...here. Swap the parameters for consistency.
9084 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
9086 <object>: Deal with a pragma Linker_Section on a constant
9087 or variable. <E_Function>: Deal with a pragma Linker_Section
9089 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
9091 2014-01-24 Vincent Celier <celier@adacore.com>
9093 * opt.ads: Minor comment update.
9095 2014-01-24 Robert Dewar <dewar@adacore.com>
9097 * sem_prag.adb (Analyze_Input_Output): Add missing error check
9099 * sem_util.adb (Is_Refined_State): Add defense against junk
9102 2014-01-24 Pascal Obry <obry@adacore.com>
9104 * projects.texi: Removes Build_Slaves attribute documentation.
9106 2014-01-23 Robert Dewar <dewar@adacore.com>
9108 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
9111 2014-01-23 Ed Schonberg <schonberg@adacore.com>
9113 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
9114 applies to expressions that come from source.
9115 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
9117 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
9118 rule regarding potentially unevaluated expressions, to prefix
9121 2014-01-23 Ed Schonberg <schonberg@adacore.com>
9123 * exp_util.adb (Make_Invqriant_Call): If type of expression is
9124 a private extension, get invariant from base type.
9126 2014-01-23 Robert Dewar <dewar@adacore.com>
9128 * sem_util.adb, sem_attr.adb: Minor reformatting.
9130 2014-01-23 Robert Dewar <dewar@adacore.com>
9132 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
9133 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
9134 * sem.adb (Semantics): Remove save/restore of
9135 SPARK_Mode[_Pragma]. Not needed since already done in
9136 Save/Restore_Opt_Config_Switches.
9138 2014-01-23 Robert Dewar <dewar@adacore.com>
9140 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
9141 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
9142 Linker_Section enhancements.
9144 2014-01-23 Tristan Gingold <gingold@adacore.com>
9146 * gnat_rm.texi: Minor editing.
9148 2014-01-23 Robert Dewar <dewar@adacore.com>
9150 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
9151 with'ed internal units.
9152 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
9154 2014-01-23 Javier Miranda <miranda@adacore.com>
9156 * lib-xref.adb (Generate_Reference): As part of processing the
9157 "end-of-spec" reference generate an extra reference to the first
9158 private entity of the package.
9159 * xr_tabls.adb (Add_Reference): No action needed for the extra
9160 'E' reference associated; similar to the processing of the
9163 2014-01-23 Bob Duff <duff@adacore.com>
9165 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
9167 2014-01-23 Ed Schonberg <schonberg@adacore.com>
9169 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
9170 predicate to implement rule given in 6.1.1 (20/3).
9171 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
9172 'Old in a postcondition, if it is potentially unevaluated and
9173 it is not an entity name.
9175 2014-01-23 Bob Duff <duff@adacore.com>
9177 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
9179 2014-01-23 Robert Dewar <dewar@adacore.com>
9181 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
9184 2014-01-23 Bob Duff <duff@adacore.com>
9186 * g-dynhta.ads: Minor comment fix.
9188 2014-01-23 Yannick Moy <moy@adacore.com>
9190 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
9191 from spec on body only when not already inherited on spec. Set
9192 SPARK_Mode from context on body without previous spec. *
9193 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
9194 library-level entities. Correct retrieval of entity from
9195 declaration, for cases where the declaration is not a unit.
9196 * sem_ch12.adb (Instantiate_Object): Avoid
9197 calling Is_Volatile_Object on an empty node.
9199 2014-01-23 Robert Dewar <dewar@adacore.com>
9201 * gnatlink.adb (Gnatlink): Check for suspicious executable file
9204 2014-01-23 Robert Dewar <dewar@adacore.com>
9206 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
9207 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
9208 style errors in instances.
9209 * g-dynhta.ads (Static_HTable): Comment updates.
9211 2014-01-23 Vincent Celier <celier@adacore.com>
9213 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
9214 to find a configuration project file when Config_File_Name is
9215 No_Configuration_File.
9216 * prj-conf.ads (No_Configuration_File): New constant String.
9217 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
9218 with Config_File_Name set to No_Configuration_File, so that
9219 no existing configuration project file will be used, and the
9220 configuration project will be only created in memory when
9221 Add_Default_GNAT_Naming_Scheme is called.
9222 * projects.texi: Minor reformatting.
9224 2014-01-23 Vincent Celier <celier@adacore.com>
9226 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
9227 a config project file if On_Load_Config is not null.
9228 * prj-pars.adb: Minor comment changes.
9230 2014-01-23 Ed Schonberg <schonberg@adacore.com>
9232 * lib-xref.adb (Output_References): Output progenitors of
9233 synchronized tagged types, for source navigation.
9235 2014-01-23 Robert Dewar <dewar@adacore.com>
9237 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
9238 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
9239 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
9241 2014-01-23 Emmanuel Briot <briot@adacore.com>
9243 * prj-conf.adb (Get_Or_Create_Configuration_File): call
9244 On_Load_Config later.
9246 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
9248 * sem_ch3.adb (Analyze_Declarations): Do not
9249 generate the spec of the late primitive in ASIS mode. Add two
9250 comments to explain the special cases when the expansion is
9253 2014-01-23 Robert Dewar <dewar@adacore.com>
9255 * sem_util.adb (Note_Possible_Modification): Fix error of
9256 misbehaving for implicit dereference cases in -gnatc mode.
9258 2014-01-23 Emmanuel Briot <briot@adacore.com>
9260 * prj-pars.adb: Minor reformatting.
9262 2014-01-22 Ed Schonberg <schonberg@adacore.com>
9264 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
9265 body generated for an expression function within a protected body
9266 needs a set of renaming declarations if the expression function
9269 2014-01-22 Ed Schonberg <schonberg@adacore.com>
9271 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
9272 list interface progenitor of a tagged concurrent type, for better
9275 2014-01-22 Robert Dewar <dewar@adacore.com>
9277 * lib.adb (In_Extended_Main_Code_Unit): Return False for
9279 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
9280 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
9281 treatment of Slocs No_Location and Standard_Location.
9282 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
9283 check for entity with Standard_Location Sloc, rather than relying
9284 on Lib routines to do that.
9285 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
9286 that a call cannot occur before a later occuring body within
9289 2014-01-22 Thomas Quinot <quinot@adacore.com>
9291 * rtsfind.adb: Update comment.
9293 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
9295 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
9296 * sem_ch3.adb (Analyze_Declarations): Add local variable
9297 Body_Seen. Generate the spec of a late controlled
9298 primitive body that is about to freeze its related type.
9299 (Handle_Late_Controlled_Primitive): New routine.
9301 2014-01-22 Robert Dewar <dewar@adacore.com>
9303 * a-stream.adb: Minor reformatting.
9305 2014-01-22 Ed Schonberg <schonberg@adacore.com>
9307 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
9308 sub-procedure Declared_In_Actual to handle properly the visibility
9309 of actuals in actual packages, that are themselves actuals to a
9310 actual package of the current instance. This mimics properly the
9311 visibility of formals of formal packages declared with a box,
9312 within the corresponding generic unit.
9314 2014-01-22 Robert Dewar <dewar@adacore.com>
9316 * checks.adb: Do not assume that a volatile variable is valid.
9318 2014-01-22 Thomas Quinot <quinot@adacore.com>
9320 * g-catiio.ads (Image, Value): Clarify that these functions
9321 operate in the local time zone. Minor documentation update.
9323 2014-01-22 Thomas Quinot <quinot@adacore.com>
9325 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
9327 2014-01-22 Robert Dewar <dewar@adacore.com>
9329 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
9330 Moved to sem_aux.adb.
9332 2014-01-22 Robert Dewar <dewar@adacore.com>
9334 * vms_data.ads: Minor reformatting.
9336 2014-01-22 Robert Dewar <dewar@adacore.com>
9338 * debug.adb: Document messages affected by -gnatd.E including
9339 the new ones that relate to late definition of equality.
9340 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
9341 debug flag -gnatd.E is set, then generate warnings rather than
9343 (Check_Untagged_Equality): In earlier versions of Ada,
9344 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
9346 2014-01-22 Robert Dewar <dewar@adacore.com>
9348 * sem_prag.adb (Usage_Error): Output additional messages for
9349 unconstrained OUT parameters lacking an input dependency.
9351 2014-01-22 Robert Dewar <dewar@adacore.com>
9353 * sem_ch4.adb: Minor reformatting.
9355 2014-01-22 Robert Dewar <dewar@adacore.com>
9357 * restrict.ads: Minor reformatting.
9358 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
9359 forbids a call from within a subprogram to the same subprogram.
9361 2014-01-22 Thomas Quinot <quinot@adacore.com>
9363 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
9364 stream attributes for Stream_Element_Array.
9365 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
9366 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
9367 defined in the current scope.
9369 2014-01-22 Robert Dewar <dewar@adacore.com>
9371 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
9373 2014-01-22 Thomas Quinot <quinot@adacore.com>
9375 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
9377 2014-01-22 Thomas Quinot <quinot@adacore.com>
9379 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
9380 declaration initialized with a function call, whose type
9381 has variable size, need to remove side effects so that the
9382 initialization expression becomes a dereference of a temporary
9383 reference to the function result.
9385 2014-01-22 Yannick Moy <moy@adacore.com>
9387 * errout.adb (Initialize): Remove trick to add dummy entry
9389 * erroutc.adb (Set_Warnings_Mode_Off,
9390 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
9391 command line switch.
9392 * opt.ads (Warning_Mode): Document behavior
9393 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
9395 2014-01-22 Robert Dewar <dewar@adacore.com>
9397 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
9399 2014-01-22 Robert Dewar <dewar@adacore.com>
9401 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
9402 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
9403 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
9404 case Storage_Size): call Check_Pool_Size_Clash.
9406 2014-01-22 Robert Dewar <dewar@adacore.com>
9408 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
9409 sem_eval.ads: Minor reformatting.
9411 2014-01-22 Thomas Quinot <quinot@adacore.com>
9413 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
9414 Any_Composite to prevent cascaded errors.
9416 2014-01-22 Yannick Moy <moy@adacore.com>
9418 * errout.adb (Initialize): Do not insert special entry in Warnings
9419 table in GNATprove_Mode.
9420 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
9422 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
9425 2014-01-22 Robert Dewar <dewar@adacore.com>
9427 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
9430 2014-01-22 Robert Dewar <dewar@adacore.com>
9432 * snames.ads-tmpl: Update header.
9434 2014-01-22 Thomas Quinot <quinot@adacore.com>
9436 * exp_util.adb (Insert_Actions): When inserting actions on a
9437 short circuit operator that has already been analyzed, do not park
9438 actions in node; instead introduce an N_Expression_With_Actions
9439 and insert actions immediately.
9440 Add guard for unexpected case of climbing up through statement
9441 in Actions list of an N_Expression_With_Actions.
9442 * sem_elab.adb (Insert_Elab_Check): Remove complex
9443 specialized circuitry for the case where the context is already
9444 analyzed, as it is not needed and introduces irregularities in
9445 finalization. Instead rely on the above change to Insert_Actions
9446 to ensure that late insertion on short circuit operators works
9449 2014-01-22 Ed Schonberg <schonberg@adacore.com>
9451 * sem_ch4.adb (Operator_Check): Improve error message when an
9452 operand of concatenation is an access type.
9454 2014-01-22 Thomas Quinot <quinot@adacore.com>
9456 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
9459 2014-01-22 Ed Schonberg <schonberg@adacore.com>
9461 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
9462 of an expanded name in a proper body, whose prefix is a package
9463 in the context of the proper body, when there is a homonym of
9464 the package declared in the parent unit.
9466 2014-01-22 Robert Dewar <dewar@adacore.com>
9468 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
9469 msg if errors found.
9470 (Check_One_Unit): Same change.
9472 2014-01-22 Robert Dewar <dewar@adacore.com>
9474 * ug_words: Add missing/wrong entries for VMS warning switches.
9475 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
9477 2014-01-22 Jerome Guitton <guitton@adacore.com>
9479 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
9482 2014-01-22 Robert Dewar <dewar@adacore.com>
9484 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
9486 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
9488 * gcc-interface/Makefile.in: Minor fixes.
9490 2014-01-21 Robert Dewar <dewar@adacore.com>
9492 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
9493 * par-ch5.adb (P_Condition): New version with expression prescanned.
9494 * par.adb (P_Condition): New version with expression prescanned.
9496 2014-01-21 Robert Dewar <dewar@adacore.com>
9498 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
9499 if Address is not a private type.
9500 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
9501 Ignore pragma if System.Address is not a private type.
9503 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9505 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
9506 uninitialized value.
9508 2014-01-21 Thomas Quinot <quinot@adacore.com>
9510 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
9512 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9514 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
9515 the value of Assertions_Enabled flag when compiling an instance of
9516 an internal unit. This facilitates the use of pre/postconditions
9517 in generic internal units, such as the new elementary function
9520 2014-01-21 Robert Dewar <dewar@adacore.com>
9522 * exp_aggr.adb: Minor reformatting.
9523 * sem_attr.adb: Minor reformatting.
9524 * sem_res.adb: Minor comment addition.
9525 * einfo.adb: Minor comment updates.
9526 * freeze.adb: Minor reformatting and code reorganization.
9528 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9530 * par-ch4.adb (P_If_Expression): Handle more gracefully an
9531 elsif clause that does not have an else part.
9533 2014-01-21 Robert Dewar <dewar@adacore.com>
9535 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
9536 * gcc-interface/Makefile.in: clean up target pairs.
9538 2014-01-21 Pascal Obry <obry@adacore.com>
9540 * projects.texi: Minor typo fix.
9542 2014-01-21 Thomas Quinot <quinot@adacore.com>
9544 * freeze.adb (Check_Component_Storage_Order): If a record type
9545 has an explicit Scalar_Storage_Order attribute definition clause,
9546 reject any component that itself is of a composite type and does
9549 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9551 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
9552 can be used to generate proper cross-reference information for
9553 the parent units of proper bodies.
9555 2014-01-21 Thomas Quinot <quinot@adacore.com>
9557 * exp_pakd.adb (Expand_Packed_Element_Set,
9558 Expand_Packed_Element_Reference): No byte swapping required in
9559 the front-end for the case of a reverse storage order array,
9560 as this is now handled uniformly in the back-end. However we
9561 still need to swap back an extracted element if it is itself a
9562 nested composite with reverse storage order.
9564 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
9566 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
9567 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
9570 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9572 * gnat_ugn.texi: Minor updates.
9574 2014-01-21 Thomas Quinot <quinot@adacore.com>
9576 * exp_pakd.adb: Update comment, minor reformatting.
9578 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
9580 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
9581 object check when SPARK_Mode is on.
9582 * sem_ch6.adb (Process_Formals): Trigger the volatile object
9583 check when SPARK_Mode is on.
9584 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
9585 check when SPARK_Mode is on.
9586 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
9587 corresponding pragma of aspect SPARK_Mode in the visible
9588 declarations of a package declaration.
9589 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
9590 check when SPARK_Mode is on.
9591 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
9592 check when SPARK_Mode is on.
9593 (Resolve_Entity_Name): Trigger
9594 the volatile object check when SPARK_Mode is on.
9596 2014-01-21 Robert Dewar <dewar@adacore.com>
9598 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
9599 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
9601 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9603 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
9604 object is declared, it is rewritten as a renaming of an dynamic
9605 expression that wraps the initial value. The renaming declaration
9606 is first given an internal name, to prevent collisions with the
9607 entity already declared, and then the name is modified to reflect
9608 the original one. the modification of the name must preserve
9609 the source location of the original, to prevent spurious errors
9610 when compiling with style checks if the declaration involves
9611 more than one entity.
9613 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
9615 * aspects.adb Add entries for Async_Readers, Async_Writers,
9616 Effective_Reads and Effective_Writes in table Canonical_Aspect.
9617 * aspects.ads Add entries for Async_Readers, Async_Writers,
9618 Effective_Reads and Effective_Writes in tables Aspect_Id,
9619 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
9620 * atree.adb (Ekind_In): New version with 8 parameters.
9621 (Node34): New routine.
9622 (Set_Node34): New routine.
9623 * atree.ads (Ekind_In): New version with 8 parameters.
9624 (Node34): New routine.
9625 (Set_Node34): New routine.
9626 * einfo.adb Contract is now Node34.
9627 (Contract): Update the assertion and node usage.
9628 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
9629 Effective_Reads and Effective_Writes.
9630 (Set_Contract): Update the assertion and node usage.
9631 (Write_Field24_Name): Remove the output for a contract.
9632 (Write_Field34_Name): Add output for a contract.
9633 * einfo.ads Contract is now Node34. Update the comment on
9634 attribute usage and related node structures.
9635 (Get_Pragma): Update the comment on usage.
9636 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
9637 Effective_Reads and Effective_Writes do not require special
9638 processing by the parser.
9639 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
9640 (Analyze_Declarations): Analyze the contract of a variable at
9641 the end of the declarative region.
9642 (Analyze_Object_Declaration): Create a contract for a variable.
9643 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
9644 of classification pragmas.
9645 (Process_Formals): Detect an illegal
9646 use of a volatile object as a formal in a function.
9647 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
9648 a volatile object as an actual in generic instantiation.
9649 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
9650 Effective_Reads and Effective_Writes in table Sig_Flags.
9651 (Analyze_External_State_In_Decl_Part): New routine.
9652 (Analyze_Global_Item): Detect an illegal use of a volatile object
9653 as a global item of a function.
9654 (Analyze_Pragma): Reimplement
9655 pragma Abstract_State. Add support for pragmas Async_Readers,
9656 Async_Writers, Effective_Reads and Effective_Writes.
9657 (Check_External_Properties): New routine.
9658 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
9659 (Check_External_Properties): New routine.
9660 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
9661 volatile object as an actual in a call.
9662 (Resolve_Entity_Name):
9663 Add local variables Par, Prev and Usage_OK. Detect illegal
9664 contexts of volatile objects.
9665 * sem_util.adb (Add_Contract_Item): Add support for
9666 pragmas associated with the contract of a variable.
9667 (Async_Readers_Enabled): New routine.
9668 (Async_Writers_Enabled): New routine.
9669 (Effective_Reads_Enabled): New routine.
9670 (Effective_Writes_Enabled): New routine.
9671 (Has_Enabled_Property):
9673 (Is_Unchecked_Conversion_Instance): New routine.
9674 (Is_Volatile_Object): Add support for entities that may denote
9676 * sem_util.ads (Add_Contract_Item): Update the
9678 (Async_Readers_Enabled): New routine.
9679 (Async_Writers_Enabled): New routine.
9680 (Effective_Reads_Enabled): New routine.
9681 (Effective_Writes_Enabled): New routine.
9682 (Is_Unchecked_Conversion_Instance): New routine.
9683 * sinfo.ads Update the comment on the structure of N_Contract.
9684 * snames.ads-tmpl Add predefined names for Async_Readers,
9685 Async_Writers, Effective_Reads and Effective_Writes. Add
9686 pragma ids for Async_Readers, Async_Writers, Effective_Reads
9687 and Effective_Writes.
9689 2014-01-21 Robert Dewar <dewar@adacore.com>
9691 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
9692 * sem_eval.adb (Compile_Time_Known_Value): Remove special
9693 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
9694 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
9695 (Test_Foldable): Add CRT_Safe parameter
9696 * sem_eval.ads (Compile_Time_Known_Value): Remove special
9697 handling of CRT mode.
9698 (CRT_Safe_Compile_Time_Known_Value): New function.
9700 2014-01-21 Robert Dewar <dewar@adacore.com>
9702 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
9703 with pragma or aspect that applies to package spec or subprogram
9706 2014-01-21 Robert Dewar <dewar@adacore.com>
9708 * exp_aggr.adb: Minor reformatting.
9710 2014-01-21 Johannes Kanig <kanig@adacore.com>
9712 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
9714 2014-01-21 Bob Duff <duff@adacore.com>
9716 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
9718 2014-01-21 Steve Baird <baird@adacore.com>
9720 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
9722 2014-01-21 Vincent Celier <celier@adacore.com>
9724 * prj-part.adb (Parse_Single_Project): Accept to extend a project
9725 if it has only be imported by an project being extended. When a
9726 project that has only been imported by a project being extended
9727 is imported by another project that is not being extended,
9728 reset the previous indication, so that it will be an error if
9729 this project is extended later.
9730 * prj-tree.adb (Create_Project): Include component From_Extended
9731 in table Projects_HT
9732 * prj-tree.ads (Project_Name_And_Node): New Boolean component
9735 2014-01-21 Robert Dewar <dewar@adacore.com>
9737 * atree.ads, atree.adb: Add Node33 and Set_Node33.
9738 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
9739 New field (SPARK_Pragma_Inherited): New flag
9740 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
9742 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
9743 * opt.ads (SPARK_Mode_Pragma): New global variable.
9744 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
9745 * sem_ch3.adb: Use new SPARK_Mode data structures.
9746 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
9747 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
9748 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
9749 (Pop_Scope): Restore SPARK_Mode_Pragma.
9750 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
9751 new data structures.
9753 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9755 * back_end.adb: Undo previous change, not needed. Minor reformatting.
9757 2014-01-21 Thomas Quinot <quinot@adacore.com>
9759 * exp_ch5.adb: Fix comment.
9760 * switch-c.adb: Minor comment update.
9761 * exp_ch3.adb: Minor reformatting.
9763 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9765 * back_end.adb (Scan_Compiler_Arguments): Do not store object
9766 filename in gnatprove mode.
9768 2014-01-21 Thomas Quinot <quinot@adacore.com>
9770 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
9771 suppresses usage of primitive _assign for tagged types).
9772 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
9773 No_Ctrl_Actions for a tagged type that does not require
9774 finalization, as we want to disable usage of _assign (which
9775 may cause undesirable discriminant checks on an uninitialized,
9778 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9780 * sem_prag.adb: Reject invariant'class on completion.
9782 2014-01-21 Javier Miranda <miranda@adacore.com>
9784 * exp_ch3.adb (Build_Init_Procedure): For
9785 derivations of interfaces, do not move the the initialization
9786 of the _parent field since such assignment is not generated.
9788 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9790 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
9791 with the operator it renames if we are within an expression of
9792 a pre/postcondition, because the expression will be reanalyzed
9793 at a later point, and the analysis of the renaming may affect
9794 the visibility of the operator when in an instance.
9796 2014-01-21 Robert Dewar <dewar@adacore.com>
9798 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
9799 Add this flag to type conversion nodes and assignment nodes.
9800 * treepr.adb: Deal properly with Flag 1,2,3.
9801 * treeprs.adt: Minor comment update.
9803 2014-01-21 Robert Dewar <dewar@adacore.com>
9805 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
9807 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
9808 parameter, completely rewrite spec.
9810 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9812 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
9813 instance that is inlined, it may have been rewritten as a wrapper
9814 package. In that case the unit that must be made visible is the
9815 related instance of the package.
9817 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9819 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
9820 previous change in codepeer mode.
9822 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9824 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
9825 call to Abort_Undefer, as expected by the runtime.
9826 * s-tasren.adb (Local_Complete_Rendezvous): Replace
9827 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
9828 deferred at this point. Update comments.
9830 2014-01-21 Thomas Quinot <quinot@adacore.com>
9832 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
9834 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9836 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
9839 2014-01-21 Robert Dewar <dewar@adacore.com>
9841 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
9843 2014-01-21 Thomas Quinot <quinot@adacore.com>
9845 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
9846 this is value is used in Node_Id arithmetic operations.
9847 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
9848 instead of hard-coded unrolled code.
9850 2014-01-21 Yannick Moy <moy@adacore.com>
9852 * gnat1drv.adb: Minor code cleanup, removing useless code.
9854 2014-01-21 Arnaud Charlet <charlet@adacore.com>
9856 * opt.ads (SPARK_Switches_File_Name): New.
9857 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
9858 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
9859 * gnat_ugn.texi: Document -gnates.
9861 2014-01-21 Yannick Moy <moy@adacore.com>
9863 * errout.adb (Special_Msg_Delete): Update comment. Remove
9864 special case for GNATprove which should not ignore mismatch
9865 in sizes for representation clauses.
9866 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
9867 which should not ignore pragma Pack.
9869 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9871 * sem_ch4.adb: Code clean up.
9873 2014-01-21 Steve Baird <baird@adacore.com>
9875 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
9877 2014-01-21 Robert Dewar <dewar@adacore.com>
9879 * gcc-interface/gigi.h: Get Flags array address.
9880 * gcc-interface/trans.c: Acquire Flags array address.
9881 * atree.adb: Add support for Flags array and Flag0,1,2,3.
9882 * atree.ads: Add support for Flags array and Flag0,1,2,3.
9883 * atree.h: Add support for Flags array and Flag0,1,2,3.
9884 * back_end.adb: Pass Flags array address to gigi.
9886 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9888 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
9889 reference to generated body so that legality checks on stream
9890 attributes are properly applied. If type is tagged and already
9891 frozen, insert generated body at the point of the renaming
9894 2014-01-21 Ed Schonberg <schonberg@adacore.com>
9896 * sem_ch12.adb: Code clean up.
9897 * sem_ch8.adb: Minor reformatting
9899 2014-01-20 Robert Dewar <dewar@adacore.com>
9901 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
9902 converting warnings on inevitable exceptions to errors.
9903 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
9904 converting warnings on inevitable exceptions to errors.
9905 * opt.adb (SPARK_Mode_Config): Handled like other config flags
9906 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
9907 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
9908 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
9909 New flag (Config_Switches_Type): Add SPARK_Mode field
9910 * sem.adb: Minor code reorganization (remove unnecessary with)
9911 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
9912 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
9913 converting warnings on inevitable exceptions to errors.
9914 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
9915 converting warnings on inevitable exceptions to errors.
9916 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
9917 converting warnings on inevitable exceptions to errors.
9918 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
9919 converting warnings on inevitable exceptions to errors.
9920 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
9922 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
9924 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
9926 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
9927 converting warnings on inevitable exceptions to errors.
9928 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
9929 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
9930 of Get_SPARK_Mode_Id
9931 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
9932 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
9933 converting warnings on inevitable exceptions to errors.
9934 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
9935 converting warnings on inevitable exceptions to errors.
9936 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
9939 2014-01-20 Ed Schonberg <schonberg@adacore.com>
9941 * sem_ch13.adb: Add semantic information to rewritten type
9944 2014-01-20 Ed Schonberg <schonberg@adacore.com>
9946 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
9947 are of a type with unknown discriminants, convert both to the
9948 underlying view of the type, so that the proper constraint check
9949 can be applied to the right-hand side.
9951 2014-01-20 Robert Dewar <dewar@adacore.com>
9953 * atree.adb (Copy_Node): Fix failure to copy last component
9954 (Exchange_Entities): Fix failure to exchange last entity
9956 2014-01-20 Ed Schonberg <schonberg@adacore.com>
9958 * sem_ch12.adb: Code clean up.
9960 2014-01-20 Robert Dewar <dewar@adacore.com>
9962 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
9964 2014-01-20 Ed Schonberg <schonberg@adacore.com>
9966 * sem_ch4.adb (Analyze_Quantified_Expression): If after
9967 pre-analysis the loop parameter specification has been
9968 rewritten as a iterator specification, propagate the change to
9969 the quantified expression, for ASIS navigtion needs.
9971 2014-01-20 Vincent Celier <celier@adacore.com>
9973 * par-ch10.adb: Minor error message change: escape [ and ].
9975 2014-01-20 Robert Dewar <dewar@adacore.com>
9977 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
9978 * errout.adb: Implement [ and ] insertion characters.
9979 * errout.ads: Document new [ and ] insertion characters.
9980 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
9981 addition of ??? comment.
9982 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
9983 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
9984 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
9985 Make warnings on exceptions into errors in GNATprove mode.
9986 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
9989 2014-01-20 Ed Schonberg <schonberg@adacore.com>
9991 * sem_ch13.adb: Code clean up.
9993 2014-01-20 Robert Dewar <dewar@adacore.com>
9995 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
9997 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
9998 error in GNATprove mode.
10000 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10002 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
10003 reference 'Old takes no parameters, and thus can appear as a
10006 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10008 * exp_aggr.adb: Fix minor typos.
10010 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10012 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
10013 instance the attribute is legal, and its value is determined
10014 statically if the type has no discriminants. This choice is
10015 more useful than rechecking the legality rule in the instance,
10016 is consistent with older usage, and is also consistent with all
10019 2014-01-20 Arnaud Charlet <charlet@adacore.com>
10021 * sem_cat.adb (Validate_Static_Object_Name): Change error into
10022 warning in Relaxed_Semantic_Mode.
10024 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10026 * sem_attr.adb: Code and comments cleanup.
10028 2014-01-20 Yannick Moy <moy@adacore.com>
10030 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
10031 * errout.adb (Compilation_Errors): Remove special handling in
10033 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
10034 removed debug flags.
10035 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
10036 Global, Initial_Condition, Initializes and Refined_State pragmas and
10038 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
10039 SPARK_Strict_Mode): Remove global flags.
10040 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
10041 always performed now, on packages declaring a null state.
10042 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
10043 at providing pedantic mode for bounds of integer types.
10044 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
10045 "some" quantified expression now issued under control of -gnatw.t,
10046 like the other warning on unused bound variable.
10047 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
10049 (Analyze_Pragma): Remove tests for SPARK 2014
10050 pragmas, not officially allowed by GNAT.
10052 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10054 * sem_prag.adb (Analyze_Pragma): Ensure that
10055 the sole argument of pragmas Abstract_State, Contract_Cases,
10056 Depends, Global and Initializes in in aggregate form.
10057 (Analyze_Refined_Pragma): Ensure that the sole argument of
10058 pragmas Refined_Depends, Refined_Global and Refined_State is in
10060 (Ensure_Aggregate_Form): New routine.
10062 2014-01-20 Doug Rupp <rupp@adacore.com>
10064 * sem_attr.adb (Analyze_Attribute): case
10065 Attribute_Constrained => treat all prefixes as legal for Declib
10068 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10070 * sem_prag.adb (Check_Mode): Reimplement the routine.
10071 (Find_Mode): New routine.
10073 2014-01-20 Robert Dewar <dewar@adacore.com>
10075 * sem_ch4.adb (Operator_Check): Handle additional
10076 Allow_Integer_Address cases.
10078 2014-01-20 Robert Dewar <dewar@adacore.com>
10080 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
10081 allowed if address is non-private, no longer true.
10082 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
10083 Remove check for address being private, causes difficulty when
10084 pragma used in gnat.adc file and is not needed, since we guard
10085 this in Address_Integer_Convert_OK.
10086 * exp_ch7.adb: Minor reformatting.
10087 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
10089 2014-01-20 Robert Dewar <dewar@adacore.com>
10091 * checks.adb (Apply_Range_Check): Remove gnatprove special
10092 casing of exponentiation.
10093 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
10094 operand for integer case to check range against Natural.
10096 2014-01-20 Robert Dewar <dewar@adacore.com>
10098 * s-tataat.adb: Minor reformatting.
10100 2014-01-20 Robert Dewar <dewar@adacore.com>
10102 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
10103 entities, and also fix documentation to remove mention of visible
10104 integer type, since this is not what the implementation does.
10105 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
10106 entities, and also fix documentation to remove mention of visible
10107 integer type, since this is not what the implementation does.
10108 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
10110 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
10111 case for parameter type check.
10112 * sem_res.adb (Resolve): Use new function
10113 Address_Integer_Convert_OK.
10114 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
10115 reformatting throughout.
10116 * sem_util.adb (Address_Integer_Convert_OK): New function.
10117 * sem_util.ads: Minor reformatting (put specs in alpha order)
10118 (Address_Integer_Convert_OK): New function.
10120 2014-01-20 Thomas Quinot <quinot@adacore.com>
10122 * exp_ch7.adb (Wrap_Transient_Expression):
10123 Insertion extra conditional expression only if
10124 Opt.Suppress_Control_Flow_Optimizations is set.
10126 2014-01-20 Arnaud Charlet <charlet@adacore.com>
10128 * s-tataat.adb (Initialize_Attributes): Abort might already be
10129 deferred in Create_Task.
10131 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10133 * checks.adb (Apply_Scalar_Range_Check): Flag
10134 the exponent as requiring a range check when the expression is
10137 2014-01-20 Fedor Rybin <frybin@adacore.com>
10139 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
10141 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10143 * sem_util.adb (Default_Initialization): New routine.
10144 * sem_util.ads: Add new type Default_Initialization_Kind.
10145 (Default_Initialization): New routine.
10147 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10149 * sem_prag.adb (Check_Mode): Correct all error
10150 message logic dealing with in/in out parameters that may appear
10151 as inputs or have a self reference.
10153 2014-01-20 Robert Dewar <dewar@adacore.com>
10155 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
10156 * sem_res.adb (Resolve): Fix error causing infinite loop for
10157 integer used as address. Allow addresses as integers.
10159 2014-01-20 Arnaud Charlet <charlet@adacore.com>
10161 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
10163 2014-01-20 Bob Duff <duff@adacore.com>
10165 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
10166 error when "use all" is not followed by "type".
10168 2014-01-20 Bob Duff <duff@adacore.com>
10170 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
10173 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10175 * checks.adb (Apply_Address_Clause_Check): If there is an
10176 alignment check on the expression in an address clause, and there
10177 is no local exception propagation, add an additional explanatory
10178 message to clarify the cause of previous warning.
10180 2014-01-20 Robert Dewar <dewar@adacore.com>
10182 * exp_ch7.adb: Minor reformatting.
10183 * opt.ads: Minor comment updates.
10184 * sem.adb: Minor name change Is_Main_Unit =>
10185 Is_Main_Unit_Or_Main_Unit_Spec.
10186 * sem_ch6.adb: Minor reformatting and code reorganization.
10188 2014-01-20 Bob Duff <duff@adacore.com>
10190 * gnat_ugn.texi: Update gnatpp switches.
10192 2014-01-20 Thomas Quinot <quinot@adacore.com>
10194 * exp_ch9.adb: Minor comment edit.
10196 2014-01-20 Robert Dewar <dewar@adacore.com>
10198 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
10199 only if System.Address is a private type.
10200 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
10201 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
10202 Allowed only if type System.Address is private, since otherwise
10204 * sem_res.adb: Fix failure to properly Analyze unchecked
10205 conversions that were introduced by Allow_Integer_Address.
10206 * switch-c.adb: Remove -gnates switch.
10207 * usage.adb: Remove -gnates switch.
10208 * gnat_ugn.texi: Remove documentation of -gnates flag.
10210 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10212 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
10213 resolve expression to perform proper name capture.
10215 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10217 * sem.adb (Semantics): When saving/restoring configuration
10218 switches, the spec of a pre- defined unit that is the main unit
10219 must be treated as a predefined unit as well.
10221 2014-01-20 Thomas Quinot <quinot@adacore.com>
10223 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
10224 expression, insert an extra conditional expression when saving
10225 the value of the expression, for the benefit of control flow
10226 graph based coverage analysis.
10227 * exp_ch3.adb: Minor reformatting.
10229 2014-01-20 Robert Dewar <dewar@adacore.com>
10231 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
10232 * gnat_rm.texi: Document pragma Allow_Integer_Address.
10233 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
10234 * opt.ads: New flag Allow_Integer_Address.
10235 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
10236 * sem_ch5.adb: Minor reformatting.
10237 * sem_prag.adb: Implement pragma Allow_Integer_Address.
10238 * sem_res.adb (Resolve): Allow integer address value if
10240 * sem_util.adb: Minor reformatting.
10241 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
10242 * switch-c.adb: Recognize flag -gnates.
10243 * usage.adb: Document flag -gnates.
10245 2014-01-20 Thomas Quinot <quinot@adacore.com>
10247 * s-tadeca.adb: Fix minor typos in comment.
10249 2014-01-20 Pascal Obry <obry@adacore.com>
10251 * s-win32.ads (FreeLibrary): New import.
10253 2014-01-20 Robert Dewar <dewar@adacore.com>
10255 * sem_res.adb, sem_cat.adb: Minor reformatting.
10256 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
10257 assigning to OUT parameters for the current subprogram scope.
10258 * exp_ch4.adb: Minor reformatting.
10260 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10262 * exp_ch4.adb (Process_Transient_Object,
10263 Find_Enclosing_Contexts): If the top-level if-expression that
10264 generated the transient object is an actual in a call, the proper
10265 Hook_Context is a construct enclosing the call.
10266 * einfo.ads: Indicate that Related_Expression is used to link a
10267 loop variable to the container expression over which the loop
10269 (Analyze_Iterator_Specification): Set the Related_Expression of
10270 the loop variable in a container element iterator.
10271 (Note_Possible_Modification): If the variable is the loop
10272 variable in a container element iterator, indicate that the
10273 enclosing container is also modified.
10275 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10277 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
10279 2014-01-20 Robert Dewar <dewar@adacore.com>
10281 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
10282 Minor reformatting and code clean up.
10284 2014-01-20 Arnaud Charlet <charlet@adacore.com>
10286 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
10287 of objects of private type if Relaxed_RM_Semantics.
10289 2014-01-20 Claire Dross <dross@adacore.com>
10291 * a-cofove.ads (Vector): Capacity discriminant
10292 should be in range of the index.
10294 2014-01-20 Thomas Quinot <quinot@adacore.com>
10296 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
10297 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
10298 possible difference between epoch of Ada.Calendar clock and Ada
10299 real-time/tasking clock.
10300 * s-taprop-posix.adb: Minor comment fix.
10302 2014-01-20 Doug Rupp <rupp@adacore.com>
10304 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
10306 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10308 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
10309 checks on the prefix of attribute 'Old.
10310 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
10311 generation of validity checks on a range that belongs to the
10312 iteration scheme of a quantified expression.
10313 * sem_ch5.adb (One_Bound): Suppress the generation of validity
10314 checks on a bound that belongs to the iteration scheme of a
10315 quantified expression, generate the check in all other cases.
10317 2014-01-20 Bob Duff <duff@adacore.com>
10319 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
10321 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10323 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
10324 interpretations that do not come from other predefined units,
10325 to prevent spurious ambiguities in the presence of user-defined
10326 operators in the context of (an instance of) a predefined unit.
10328 2014-01-20 Robert Dewar <dewar@adacore.com>
10330 * gnat_rm.texi: Document that Loop_Variant is included in
10331 Statement_Assertions.
10332 * sem_prag.adb (Check_Kind): Add Loop_Variant to
10333 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
10334 to Statement_Assertions.
10336 2014-01-20 Doug Rupp <rupp@adacore.com>
10338 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
10339 for errno ENOENT from RTP on NFS mounted file system.
10341 2014-01-20 Ed Schonberg <schonberg@adacore.com>
10343 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
10344 examine code that does not come from source. The check does not
10345 apply to code generated for constraint checks, and such code may
10346 generate spurious error messages when compiled with expansion
10347 disabled (as in a generic unit) because side effects may not
10349 2) Make error messages more explicit: indicate the component
10350 of the construct whose value is indeterminate because of a
10351 call to a function with in-out parameter in another component,
10352 when there is no mandated order of execution between the two
10353 components (actuals, aggregate components, alternatives).
10355 2014-01-20 Robert Dewar <dewar@adacore.com>
10357 * gnat_rm.texi: Minor cleanup.
10359 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10361 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
10362 can now apply to a refined postcondition.
10363 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
10364 variable Result_Seen. Add variables Case_Prag, Post_Prag,
10365 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
10366 whether postconditions and/or constract-cases mention attribute
10367 'Result and introduce a post-state when applied to functions.
10368 (Check_Result_And_Post_State): Removed.
10369 * sem_prag.adb (Analyze_Pragma): Add local variable
10370 Result_Seen. Verify that the expression of pragma Refined_Post
10371 mentions attribute 'Result and introduces a post-state.
10372 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
10374 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10376 * exp_ch7.adb (Is_Subprogram_Call): New routine.
10377 (Process_Transient_Objects): Make variable Must_Hook global with
10378 respect to all locally declared subprograms. Search the context
10379 for at least one subprogram call.
10380 (Requires_Hooking): Removed.
10382 2014-01-20 Claire Dross <dross@adacore.com>
10384 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
10385 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
10386 External_Axiomatization);
10388 2014-01-20 Robert Dewar <dewar@adacore.com>
10390 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
10391 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
10392 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
10393 Allow Loop_Entry to be used in these pragmas if they appear in
10394 an appropriate context.
10395 (Placement_Error): Specialize error
10396 message for pragma Assert[_And_Cut] or pragma Assume containing
10397 Loop_Entry attribute.
10398 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
10399 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
10400 and code clean ups.
10402 2014-01-20 Robert Dewar <dewar@adacore.com>
10404 * gnat1drv.adb: Minor comment update.
10406 2014-01-20 Tristan Gingold <gingold@adacore.com>
10408 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
10409 variables, comment out unused code.
10410 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
10411 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
10412 * s-excmac-arm.ads: New file.
10414 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10416 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
10417 Drange and Index_Typ. Remove the circuitry which creates a
10418 range check to compare the index type of the array against the
10420 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
10421 the circuitry which creates a range check to handle a
10422 discrete_range denoted by a subtype indication.
10424 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
10426 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
10427 nodes to get the original sloc range.
10429 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10431 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
10432 entity of a [library level] package.
10434 2014-01-20 Tristan Gingold <gingold@adacore.com>
10436 * raise-gcc.c (exception_class_eq): New function.
10437 (is_handled_by): Use it to compare exception classes.
10438 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
10439 be called to return URC_CONTINUE_UNWIND.
10440 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
10441 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
10443 2014-01-20 Robert Dewar <dewar@adacore.com>
10445 * opt.ads: Minor comment update.
10447 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10449 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
10450 constants to the "Local variables" area. Add new constant D. Add
10451 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
10452 to Pref_Typ and update all occurrences. Add circuitry to extract
10453 the discrete_range and the index type and build a range check.
10455 2014-01-20 Arnaud Charlet <charlet@adacore.com>
10457 * gnat1drv.adb (Adjust_Global_Switches): Enable
10458 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
10461 2014-01-20 Thomas Quinot <quinot@adacore.com>
10463 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
10465 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10467 * sem_ch13.adb (Analyze_Aspect_Specifications):
10468 When aspect SPARK_Mode appears on a package body, insert the
10469 generated pragma at the top of the body declarations.
10471 2014-01-20 Robert Dewar <dewar@adacore.com>
10473 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
10474 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
10475 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
10476 sem_ch8.adb, exp_dist.adb: Minor reformatting.
10478 2014-01-20 Yannick Moy <moy@adacore.com>
10480 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
10483 2014-01-20 Pascal Obry <obry@adacore.com>
10485 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
10487 * g-arrspl.adb: Adapt all routine to this new implementation.
10488 (Set): Copy the Slice_Set definition before reusing it.
10490 2014-01-20 Arnaud Charlet <charlet@adacore.com>
10492 * sem_prag.adb (Process_Import_Or_Interface): In
10493 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
10494 (Analyze_Pragma): Ditto for pragma Export.
10495 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
10498 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10500 * einfo.ads: E_Abstract_State is now part of the entities that
10501 can be overloaded. Update type Overloadable_Kind to reflect the
10502 inclusion of abstract states.
10503 * sem_ch6.adb (New_Overloaded_Entity): A function can now
10504 overload an abstract state.
10505 * sem_prag.adb (Analyze_Constituent): Handle the overloading
10506 of states by functions. Use Entity_Of to obtain the entity of
10507 a constituent. (Analyze_Global_Item): Handle the overloading of
10508 states by functions.
10509 (Analyze_Initialization_Item): Handle the
10510 overloading of states by functions. Use Entity_Of to obtain the
10512 (Analyze_Input_Item): Handle the overloading
10513 of states by functions. Use Entity_Of to obtain the entity of an item.
10514 (Analyze_Input_Output): Handle the overloading of states by functions.
10515 (Analyze_Refinement_Clause): Handle the overloading
10516 of states by functions. Use Entity_Of to obtain the entity of an item.
10517 (Appears_In): Use Entity_Of to obtain the entity of an element.
10518 (Check_Usage): Use Entity_Of to obtain the entity of
10519 an item. Add a guard to prevent a crash due to a previous error.
10520 (Resolve_State): New routine.
10522 2014-01-20 Yannick Moy <moy@adacore.com>
10524 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
10525 opt.ads: Minor comments updates.
10527 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
10529 * einfo.adb (Non_Limited_View): Applies to abstract states.
10530 (Set_From_Limited_With): Applies to abstract states.
10531 (Set_Non_Limited_View): Applies to abstract states.
10532 (Write_Field17): Output the non-limited view of an abstract state.
10533 * einfo.ads: Update the comment on usage and occurrences in
10534 nodes for attributes From_Limited_With and Non_Limited_View.
10535 * sem_aux.adb (Available_View): This routine can now handle
10537 * sem_aux.ads (Available_View): This routine can now handle
10538 abstract states. Update the comment on usage.
10539 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
10540 of states and variables.
10541 (In_Pragmas_Depends_Or_Global): New routine.
10542 * sem_ch10.adb (Build_Limited_Views): Implement
10543 abstract (limited) views of variables and states.
10544 (Build_Shadow_Entity): This routine is now a procedure. Add
10545 formal parameter Shadow. Update the comment on usage. Add
10546 context-specific decoration for states and variables.
10547 (Decorate_State): New routine. (Decorate_Variable): New routine.
10548 (Find_And_Process_States): New routine.
10549 (Process_Declarations): Renamed to Process_Declarations_And_States.
10550 (Process_Declarations_And_States): Add formal parameters
10551 Pack and Create_Abstract_Views. Update the comment on usage.
10552 (Process_States): New routine.
10553 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
10554 views of states and variables. Match the abstract view of a state
10555 against its corresponding non-abstract view.
10556 (Is_Matching_Input):
10557 Handle abstract views of states and variables. Match the abstract
10558 view of a state against its corresponding non-abstract view.
10559 (Process_Global_Item): Handle abstract views of states and
10562 2014-01-20 Bob Duff <duff@adacore.com>
10564 * sem_ch10.adb (Expand_With_Clause): Don't
10565 recurse on the prefix if the current with-ed name refers to a
10566 package that renames its own parent, eg "package P.Q renames P;".
10568 2014-01-20 Yannick Moy <moy@adacore.com>
10570 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
10571 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
10572 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
10573 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
10574 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
10577 2014-01-20 Yannick Moy <moy@adacore.com>
10579 * sinfo.ads Update documentation of GNATprove mode.
10581 2014-01-20 Yannick Moy <moy@adacore.com>
10583 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
10584 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
10585 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
10586 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
10588 * sem_ch13.adb: Remove blank.
10589 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
10590 subprograms by alias for renamings, not for inherited primitive
10592 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
10594 (Remove_Side_Effects): Apply the removal in
10595 GNATprove mode, for the full analysis of expressions.
10596 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
10598 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
10599 save/restore actions for Expander_Active flag in GNATprove mode,
10600 similar to what is done in ASIS mode.
10601 * frontend.adb (Frontend): Generic bodies are instantiated in
10603 * gnat1drv.adb (Adjust_Global_Switches): Set operating
10604 mode to Check_Semantics in GNATprove mode, although a light
10605 expansion is still performed.
10606 (Gnat1drv): Set Back_End_Mode to
10607 Declarations_Only in GNATprove mode, and later on special case
10608 the GNATprove mode to continue analysis anyway.
10609 * lib-writ.adb (Write_ALI): Always generate ALI files in
10611 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
10613 (SPARK_Mode): Renamed as GNATprove_Mode.
10614 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
10615 tree in GNATprove_Mode.
10616 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
10617 body in GNATprove mode.
10618 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
10620 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
10621 Make sure side effects are removed in GNATprove mode.
10623 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10625 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
10626 for aliased objects with an unconstrained nominal subtype.
10627 * gcc-interface/trans.c (Call_to_gnu): Likewise.
10628 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
10629 <case N_Op_Minus>: Remove useless code.
10630 (Exception_Handler_to_gnu_zcx): Minor tweaks.
10632 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10634 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
10635 Tidy up. For a subtype with discriminants and variant part, if a
10636 variant is statically selected and the fields all have a constant
10637 position, put them in order of increasing position. Likewise if
10638 no variant part but representation clause is present.
10639 * gcc-interface/utils.c (make_packable_type): Robustify.
10640 (maybe_pad_type): Use local variable and tidy up condition. If no
10641 alignment is specified, use the original one.
10642 (create_type_stub_decl): Minor tweak.
10643 (convert) <case VECTOR_CST>: Fix typo.
10644 <case CONSTRUCTOR>: Deal with padding types around the same type.
10645 Do not punt on missing fields.
10646 (unchecked_convert): Call finish_record_type to lay out the special
10647 record types made for conversions from/to problematic integer types.
10648 Bump the alignment of CONSTRUCTORs before converting them to a more
10651 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
10653 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
10654 obsolete code for type_annotate_only mode, simplify code and slightly
10655 improve wording of comments.
10657 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
10660 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
10661 as intermediate type.
10662 (UI_To_gnu): Likewise.
10664 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
10666 * gnatvsn.ads (Current_Year): Bump to 2014.
10668 2014-01-02 Tobias Burnus <burnus@net-b.de>
10670 * gnat_ugn.texi: Bump @copying's copyright year.
10672 Copyright (C) 2014 Free Software Foundation, Inc.
10674 Copying and distribution of this file, with or without modification,
10675 are permitted in any medium without royalty provided the copyright
10676 notice and this notice are preserved.