1 2017-01-13 Javier Miranda <miranda@adacore.com>
3 * einfo.ads (Component_Bit_Offset): Fix documentation.
4 * sem_ch13.adb (Check_Record_Representation_Clause): Skip check
5 on record holes for components with unknown compile-time offsets.
7 2017-01-13 Bob Duff <duff@adacore.com>
9 * ali.ads, ali.adb (Static_Elaboration_Model_Used): Remove unused flag.
10 * g-locfil.ads: Minor comment fix.
12 2017-01-13 Bob Duff <duff@adacore.com>
14 * binde.adb (Elab_New): New elaboration order algorithm
15 that is expected to cause fewer ABE issues. This is a work in
16 progress. The new algorithm is currently disabled, and can be
17 enable by the -dp switch, or by modifying the Do_Old and Do_New
18 etc. flags and rebuilding. Experimental code is included to
19 compare the results of the old and new algorithms.
20 * binde.ads: Use GNAT.Dynamic_Tables instead of Table, so we
21 can have multiple of these tables, so the old and new algorithms
23 * bindgen.ads (Gen_Output_File): Pass Elab_Order as an 'in'
24 parameter of type array. This avoids the global variable, and
25 allows bounds checking (which is normally defeated by the tables
26 packages). It also ensures that the Elab_Order is read-only
28 * bindgen.adb: Pass Elab_Order as an 'in' parameter to all
29 subprograms that need it, as above.
30 * debug.adb: Document new -dp switch. Modify doc of old -do
32 * gnatbind.adb (Gnatbind): Make use of new interfaces to Binde
33 and Bindgen. Move writing of closure (-R and -Ra switches)
34 to Binde; that's more convenient.
36 2017-01-13 Ed Schonberg <schonberg@adacore.com>
38 * sem_ch6.adb (Analyze_Expression_Function): If the expression
39 function is a completion, all entities referenced in the
40 expression are frozen. As a consequence, a reference to an
41 uncompleted private type from an enclosing scope is illegal.
43 2017-01-13 Javier Miranda <miranda@adacore.com>
45 * sem_ch6.adb (Freeze_Expr_Types): New subprogram.
46 (Analyze_Subprogram_Body_Helper): At the occurrence of an
47 expression function declaration that is a completion, its
48 expression causes freezing (AI12-0103).
50 2017-01-13 Vadim Godunko <godunko@adacore.com>
52 * a-coinho-shared.adb: Fix memory leaks in Constant_Reference and
53 Reference functions of Ada.Containers.Indefinite_Holders.
55 2017-01-13 Bob Duff <duff@adacore.com>
57 * s-os_lib.ads: Minor comment fixes.
59 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
61 * exp_ch3.adb (Default_Initialize_Object): Do not default
62 initialize an object when it is of a task type and restriction
63 No_Tasking is in effect because the initialization is obsolete.
64 * exp_ch9.adb (Build_Master_Entity): Do not generate a master when
65 restriction No_Tasking is in effect.
66 (Build_Master_Renaming): Do not rename a master when restriction
67 No_Tasking is in effect.
69 2017-01-13 Ed Schonberg <schonberg@adacore.com>
71 * sem_aggr.adb (Resolve_Array_Aggregate): The code that verifies
72 the legality of An others clause applies as well to a choice in
73 an Iterated_component_ association.
74 (Resolve_Iterated_Component_Association): An others choice
76 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): An
77 Iterated_Component_Association is not static.
79 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
81 * exp_ch3.adb (Freeze_Type): Mark the Ghost mode as set in case
82 control is passed to the expresion handler before the new mode
84 * sem_ch12.adb (Analyze_Package_Instantiation,
85 Analyze_Subprogram_Instantiation): Mark the Ghost mode as set
86 in case control is passed to the expresion handler before the
89 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
91 * sem_aggr.adb, sem_ch3.adb, inline.adb, sem_util.adb, exp_ch4.adb,
92 exp_aggr.adb: Minor reformatting.
94 2017-01-13 Gary Dismukes <dismukes@adacore.com>
96 * inline.adb: Minor reformatting and typo fix.
98 2017-01-13 Ed Schonberg <schonberg@adacore.com>
100 * sem_util.ads, sem_util.adb (Choice_List): Move function here
101 from sem_aggr.adb, for use elsewhere.
102 * sem_ch3.adb (Analyze_Object_Declaration): Use Choice_List.
103 * sem_aggr.adb (Resolve_Array_Aggregate): Remove
104 Iterated_Component_Present.
105 * exp_aggr.adb: Use Choice_List throughout, to handle
106 Iterated_Component_Associations.
107 (Gen_Loop): Generate proper loop for an
108 Iterated_Component_Association: loop variable has the identifier
109 of the original association. Generate a loop even for a single
110 component choice, in order to make loop parameter visible in
112 (Flatten): An Iterated_Component_Association is not static.
114 2017-01-13 Yannick Moy <moy@adacore.com>
116 * exp_ch4.adb (Expand_N_Op_Expon): Ensure that the value of
117 float exponentiation for statically known small negative values
118 is the reciprocal of the exponentiation for the opposite value
120 * s-exnllf.adb (Exn_Float, Exn_Long_Float, Exn_Long_Long_Float):
121 Ensure that the value of float exponentiation for negative values
122 is the reciprocal of the exponentiation for the opposite value
124 * inline.adb (Expand_Inlined_Call): Fix the count
125 for the number of generated gotos.
127 2017-01-13 Yannick Moy <moy@adacore.com>
129 * inline.adb: Code cleanup.
130 * sem_util.adb (Is_OK_Volatile_Context): Add
131 expression in delay statement as OK for volatile context.
133 2017-01-13 Ed Schonberg <schonberg@adacore.com>
135 * sem_aggr.adb (Resolve_Array_Aggregate): In normal compilation
136 mode a choice that is a subtype with a static predicate is
137 replaced by the values it covers. This transformation must not
138 be performed in ASIS mode, to preserve the source for analysis.
140 2017-01-13 Justin Squirek <squirek@adacore.com>
142 * nlists.ads: Correct minor typo.
144 2017-01-13 Gary Dismukes <dismukes@adacore.com>
146 * sem_ch13.adb: Minor reformatting and typo fix.
148 2017-01-13 Ed Schonberg <schonberg@adacore.com>
150 * par-ch4.adb (P_Aggregate_Or_Parent_Expr): An
151 Iterated_Component_Association is a named association in an
153 * sem_aggr.adb (Resolve_Iterated_Component_Association): New
154 procedure, subsidiary of Resolve_Array_Aggregate, to analyze
155 and resolve the discrete choices and the expression of the
157 * sinfo.adb, sinfo.ads: In analogy with N_Component_Association,
158 Loop_Actions and Box_Present are attributes of
159 N_Iterated_Component_Association nodes. Box_Present is always
161 * sprint.adb (Sprint_Node): An Iterated_Component_Association
162 has a Discrete_Choices list, as specified in the RM. A
163 Component_Association for aggregate uses instead a Choices list.
164 We have to live with this small inconsistency because the new
165 construct also has a defining identifier, and there is no way
166 to merge the two node structures.
168 2017-01-13 Yannick Moy <moy@adacore.com>
170 * inline.adb (Remove_Aspects_And_Pragmas): Add Unused to the
171 list of pragmas to remove. Remove pragmas from the list of
172 statements in the body to inline.
173 * namet.adb, namet.ads (Nam_In): New version with 12 parameters.
175 2017-01-13 Ed Schonberg <schonberg@adacore.com>
177 * sem_ch3.adb (Resolve_Aspects): New procedure, subsidiary of
178 Analyze_Declarations, to analyze and resolve the expressions of
179 aspect specifications in the current declarative list, so that
180 the expressions have proper entity and type info. This is needed
181 for ASIS when there is no subsequent expansion to generate this
182 semantic information.
183 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Use Etype of
184 original expression, to suppress cascaded errors when expression
185 has been constant-folded.
186 (Resolve_Aspect_Expressions, Resolve_Name): Preserve entities in
187 ASIS mode, because there is no subsequent expansion to decorate
190 2017-01-13 Yannick Moy <moy@adacore.com>
192 * inline.adb, inline.ads (Call_Can_Be_Inlined_In_GNATprove_Mode):
193 New function to detect when a call may be inlined or not in
195 (Expand_Inlined_Call): Ensure that a temporary
196 is always created in the cases where a type conversion may be
197 needed on an input parameter in GNATprove mode, so that GNATprove
198 sees the check to perform.
199 * sem_res.adb (Resolve_Call): In GNATprove mode, skip inlining
200 when not applicable due to actual requiring type conversion
201 with possible check but no temporary value can be copied for
202 GNATprove to see the check.
204 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
206 * sem_aggr.adb, par_sco.adb, s-osprim-mingw.adb, exp_ch5.adb,
207 exp_prag.adb, sem_ch3.adb, xr_tabls.adb, lib-xref-spark_specific.adb,
208 layout.adb, sem_dist.adb, exp_spark.adb, exp_ch7.adb, gnatcmd.adb,
209 exp_util.adb, prj-proc.adb, sem_aux.adb, comperr.adb, g-memdum.adb,
210 exp_attr.adb, s-intman-solaris.adb, exp_ch9.adb, make.adb, live.adb,
211 g-sercom-linux.adb, sem_dim.adb, mlib-prj.adb, s-intman-posix.adb,
212 sem_ch9.adb, sem_ch10.adb, prep.adb, einfo.adb, scng.adb, checks.adb,
213 prj-strt.adb, sem_prag.adb, eval_fat.adb, sem_ch12.adb, sem.adb,
214 a-numaux-x86.adb, a-stwifi.adb, i-cobol.adb, prj.adb,
215 get_spark_xrefs.adb, s-tasini.adb, rtsfind.adb, freeze.adb,
216 g-arrspl.adb, par-ch4.adb, sem_util.adb, sem_res.adb, expander.adb,
217 sem_attr.adb, exp_dbug.adb, prj-pp.adb, a-stzfix.adb, s-interr.adb,
218 s-wchcnv.adb, switch-m.adb, gnat1drv.adb, sinput-l.adb, stylesw.adb,
219 contracts.adb, s-intman-android.adb, g-expect.adb, exp_ch4.adb,
220 g-comlin.adb, errout.adb, sinput.adb, s-exctra.adb, repinfo.adb,
221 g-spipat.adb, g-debpoo.adb, exp_ch6.adb, sem_ch4.adb, exp_ch13.adb,
222 a-wtedit.adb, validsw.adb, pprint.adb, widechar.adb, makeutl.adb,
223 ali.adb, set_targ.adb, sem_mech.adb, sem_ch6.adb, gnatdll.adb,
224 get_scos.adb, g-pehage.adb, s-tratas-default.adb, gnatbind.adb,
225 prj-dect.adb, g-socthi-mingw.adb, par-prag.adb, prj-nmsc.adb,
226 exp_disp.adb, par-ch12.adb, binde.adb, sem_ch8.adb,
227 s-tfsetr-default.adb, s-regexp.adb, gprep.adb, s-tpobop.adb,
228 a-teioed.adb, sem_warn.adb, sem_eval.adb, g-awk.adb, s-io.adb,
229 a-ztedit.adb, xoscons.adb, exp_intr.adb, sem_cat.adb, sprint.adb,
230 g-socket.adb, exp_dist.adb, sem_ch13.adb, s-tfsetr-vxworks.adb,
231 par-ch3.adb, treepr.adb, g-forstr.adb, g-catiio.adb, par-ch5.adb,
232 uname.adb, osint.adb, exp_ch3.adb, prj-env.adb, a-strfix.adb,
233 a-stzsup.adb, prj-tree.adb, s-fileio.adb: Update all eligible case
234 statements to reflect the new style for case alternatives. Various
235 code clean up and reformatting.
237 2017-01-13 Gary Dismukes <dismukes@adacore.com>
239 * exp_util.adb: Minor reformatting.
241 2017-01-13 Yannick Moy <moy@adacore.com>
243 * exp_spark.adb: Code cleanup.
244 * sem_ch9.adb (Analyze_Delay_Until): Resolve
245 expression so that calls are identified as such inside delay
248 2017-01-13 Ed Schonberg <schonberg@adacore.com>
250 * exp_util.adb (Insert_Actions): Handle Iterated_Component_Association.
251 * par-ch3.adb (P_Discrete_Choice_List): An
252 Iterated_Component_Association is an array aggregate component.
253 * par-ch4.adb (P_Iterated_Component_Association): New procedure.
254 (Is_Quantified_Expression): New function that performs a lookahead
255 to distinguish quantified expressions from iterated component
257 (P_Aggregate_Or_Paren_Expr): Recognize iterated component
259 (P_Unparen_Cond_Case_Quant_Expression, P_Primary): Ditto.
260 * sem.adb (Analyze): Handle Iterated_Component_Association.
261 * sem_aggr.adb (Resolve_Array_Aggregate): Dummy handling of iterated
262 component associations.
263 * sinfo.ads, sinfo.adb: Entries for for
264 N_Iterated_Component_Association and its fields.
265 * sprint.adb (Sprint_Node_Actual): Handle
266 N_Iterated_Component_Association.
268 2017-01-13 Justin Squirek <squirek@adacore.com>
270 * sem_ch12.adb (Analyze_Package_Instantiation): Move disabiling
271 of the style check until after preanalysis of acutals.
273 2017-01-13 Yannick Moy <moy@adacore.com>
275 * sem_ch13.adb: Minor reformatting.
276 * par-ch11.adb: minor style fix in whitespace
277 * gnatbind.adb (Gnatbind): Scope of Std_Lib_File
278 reduced to Add_Artificial_ALI_File; style fix in declaration of
279 Text; grammar fix in comment.
280 * osint-c.adb (Read_Library_Info): strip trailing NUL from result.
281 * freeze.adb: Cleanup to pass pragma instead of
283 * exp_spark.adb (Expand_SPARK_Attribute_Reference): New procedure to
284 replace System'To_Address by equivalent call.
286 2017-01-13 Arnaud Charlet <charlet@adacore.com>
288 * bindusg.adb: Improve usage output for -f switch.
290 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
292 * frontend.adb, freeze.adb, sem_res.adb, sem_attr.adb, sem_ch8.adb:
295 2017-01-13 Ed Schonberg <schonberg@adacore.com>
297 * sem_ch13.adb (Is_Predicate_Static): Following the intent of the RM,
298 treat comparisons on strings as legal in a Static_Predicate.
299 (Is_Predicate_Static, Is_Type_Ref): Predicate also returns true on
300 a function call that is the expansion of a string comparison.The
301 function call is built when compiling the corresponding predicate
302 function, but the expression has been found legal as a static
303 predicate during earlier analysis.
304 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches): Handle
305 properly a function call that is the expansion of a string
306 comparison operation, in order to recover the Static_Predicate
307 expression and apply it to a static argument when needed.
309 2017-01-13 Tristan Gingold <gingold@adacore.com>
311 * s-mmap.adb, s-mmap.ads (Open_Read_No_Exception): New function.
312 (Open_Read): Re-implement using Open_Read_No_Exception.
313 (Open_Write): Raise exception in case of error.
314 * s-mmosin-mingw.adb (Open_Common): Do not raise exception.
315 * s-mmosin-unix.adb (Open_Read, Open_Write): Do not
317 * s-mmosin-mingw.ads, s-mmosin-unix.ads (Open_Read): Adjust comment.
319 2017-01-13 Yannick Moy <moy@adacore.com>
321 * checks.adb: Code cleanup.
323 2017-01-13 Yannick Moy <moy@adacore.com>
325 * freeze.adb (Check_Inherited_Conditions): Use analyzed pragma
326 expression instead of unanalyzed aspect expression for checking
327 the validity of inheriting an operation. Also copy the expression
328 being passing it to Build_Class_Wide_Expression, as this call
329 modifies its argument.
330 * sem_util.ads Fix comment to reference correct function name
333 2017-01-13 Javier Miranda <miranda@adacore.com>
335 * sem_res.adb (Resolve_Generalized_Indexing): Compiling in ASIS mode,
336 when we propagate information about the indexes back to the original
337 indexing mode and the prefix of the index is a function call, do not
338 remove any parameter from such call.
340 2017-01-13 Gary Dismukes <dismukes@adacore.com>
342 * exp_ch6.ads (Needs_BIP_Finalization_Master): Update comment.
343 * exp_ch6.adb (Needs_BIP_Finalization_Master): Return True for
344 a build-in-place function whose result type is tagged.
346 2017-01-13 Yannick Moy <moy@adacore.com>
348 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
349 Do not generate a wrapper when the only candidate is a class-wide
351 (Analyze_Subprogram_Renaming): Do not freeze the renaming or renamed
352 inside a generic context.
354 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
356 * exp_util.adb (Add_Inherited_Tagged_DIC):
357 Pass the object parameters of both the parent and the derived
358 type DIC procedure to the reference replacement circuitry.
359 (Find_DIC_Type): Modify the circuitry to present the partial
360 view of a private type in case the private type defines its own
362 (Replace_Object_And_Primitive_References): Add two
363 optional formal parameters. Update the comment on usage. Update
364 the replacement of references to object parameters.
366 2017-01-13 Gary Dismukes <dismukes@adacore.com>
368 * einfo.adb, sem_ch6.adb, atree.adb: Minor reformatting and typo fix.
370 2017-01-13 Ed Schonberg <schonberg@adacore.com>
372 * sem_res.adb (Resolve_Actuals): Apply Scalar_Range_Check to
373 an out parameter that is a type conversion, independently of th
374 range check that may apply to the expression of the conversion,
375 for use in GNATProve.
377 2017-01-13 Yannick Moy <moy@adacore.com>
379 * gnat1drv.adb (Gnat1drv): Move the implicit with for System in
380 GNATprove_Mode here to Frontend.
381 * frontend.adb (Frontend): Move the implicit with for System
382 in GNATprove_Mode here as it ismore correct this way; the old
383 place only worked by chance, since there were no overloaded names.
384 * rtsfind.ads (RE_Id, RE_Unit_Table): Add RE_Tasking_State.
385 * sem_attr.adb (Analyze_Attribute): In GNATprove_Mode, for the
386 four attributes identified in SRM 9(18), add an implicit with
387 to Ada.Task_Identification.
388 * sem_ch8.adb (Analyze_Subprogram_Renaming.Build_Class_Wide_Wrapper):
389 Deal specially with the wrapper introduced for AI05-0071 in GNATprove
391 * checks.adb (Apply_Discriminant_Check,
392 Apply_Selected_Length_Checks, Apply_Selected_Range_Checks):
393 In GNATprove mode, we do not apply the checks, but we still
394 analyze the expression to possibly issue errors on SPARK
395 code when a run-time error can be detected at compile time.
396 (Selected_Length_Checks, Selected_Range_Checks): Perform analysis
399 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
401 * expander.adb (Expand): Add a warning about using return
402 statements in Ghost management code.
403 * exp_ch3.adb (Freeze_Type): Add a warning about using return
404 statements in Ghost management code.
405 * exp_ch7.adb (Build_Invariant_Procedure_Body,
406 Build_Invariant_Procedure_Declaration): Add a warning about
407 using return statements in Ghost management code.
408 * exp_disp.adb (Make_DT): Add a warning about using return
409 statements in Ghost management code.
410 * exp_util.adb (Build_DIC_Procedure_Body,
411 Build_DIC_Procedure_Declaration, Make_Predicated_Call): Add a
412 warning about using return statements in Ghost management code.
413 * freeze.adb (Freeze_Entity): Add a warning about using return
414 statements in Ghost management code.
415 * sem.adb (Analyze, Do_Analyze): Add a warning about using return
416 statements in Ghost management code.
417 * sem_ch3.adb (Analyze_Object_Declaration, Process_Full_View): Add
418 a warning about using return statements in Ghost management code.
419 * sem_ch5.adb (Analyze_Assignment): Add a warning about using
420 return statements in Ghost management code.
421 * sem_ch6.adb (Analyze_Procedure_Call,
422 Analyze_Subprogram_Body_Helper): Add a warning about using return
423 statements in Ghost management code.
424 * sem_ch7.adb (Analyze_Package_Body_Helper): Add a warning about
425 using return statements in Ghost management code.
426 * sem_ch12.adb (Analyze_Package_Instantiation,
427 Analyze_Subprogram_Instantiation, Instantiate_Package_Body,
428 Instantiate_Subprogram_Body): Add a warning about using return
429 statements in Ghost management code.
430 * sem_ch13.adb (Build_Predicate_Functions,
431 Build_Predicate_Function_Declarations): Add a warning about
432 using return statements in Ghost management code.
433 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part,
434 Analyze_Initial_Condition_In_Decl_Part, Analyze_Pragma,
435 Analyze_Pre_Post_Condition_In_Decl_Part): Add a warning about
436 using return statements in Ghost management code.
438 2017-01-13 Tristan Gingold <gingold@adacore.com>
440 * s-mmosin-mingw.adb: Fix pragma import.
442 2017-01-13 Arnaud Charlet <charlet@adacore.com>
444 * gnat1drv.adb (Adjust_Global_Switches): Ignore -gnateE in
447 2017-01-13 Hristian Kirtchev <kirtchev@adacore.com>
449 * atree.adb (Allocate_Initialize_Node): A newly created node is
450 no longer marked as Ghost at this level.
451 (Mark_New_Ghost_Node): New routine.
452 (New_Copy): Mark the copy as Ghost.
453 (New_Entity): Mark the entity as Ghost.
454 (New_Node): Mark the node as Ghost.
455 * einfo.adb (Is_Checked_Ghost_Entity): This attribute can now
456 apply to unanalyzed entities.
457 (Is_Ignored_Ghost_Entity): This attribute can now apply to unanalyzed
459 (Set_Is_Checked_Ghost_Entity): This attribute now
460 applies to all entities as well as unanalyzed entities.
461 (Set_Is_Ignored_Ghost_Entity): This attribute now applies to
462 all entities as well as unanalyzed entities.
463 * expander.adb Add with and use clauses for Ghost.
464 (Expand): Install and revert the Ghost region associated with the node
466 * exp_ch3.adb (Expand_Freeze_Array_Type): Remove all Ghost-related code.
467 (Expand_Freeze_Class_Wide_Type): Remoe all Ghost-related code.
468 (Expand_Freeze_Enumeration_Type): Remove all Ghost-related code.
469 (Expand_Freeze_Record_Type): Remove all Ghost-related code.
470 (Freeze_Type): Install and revert the Ghost region associated
471 with the type being frozen.
472 * exp_ch5.adb Remove with and use clauses for Ghost.
473 (Expand_N_Assignment_Statement): Remove all Ghost-related code.
474 * exp_ch6.adb Remove with and use clauses for Ghost.
475 (Expand_N_Procedure_Call_Statement): Remove all Ghost-relatd code.
476 (Expand_N_Subprogram_Body): Remove all Ghost-related code.
477 * exp_ch7.adb (Build_Invariant_Procedure_Body): Install and revert the
478 Ghost region of the working type.
479 (Build_Invariant_Procedure_Declaration): Install and revert
480 the Ghost region of the working type.
481 (Expand_N_Package_Body): Remove all Ghost-related code.
482 * exp_ch8.adb Remove with and use clauses for Ghost.
483 (Expand_N_Exception_Renaming_Declaration): Remove all Ghost-related
485 (Expand_N_Object_Renaming_Declaration): Remove all Ghost-related code.
486 (Expand_N_Package_Renaming_Declaration): Remove all Ghost-related code.
487 (Expand_N_Subprogram_Renaming_Declaration): Remove all Ghost-related
489 * exp_ch13.adb Remove with and use clauses for Ghost.
490 (Expand_N_Freeze_Entity): Remove all Ghost-related code.
491 * exp_disp.adb (Make_DT): Install and revert the Ghost region of
492 the tagged type. Move the generation of various entities within
493 the Ghost region of the type.
494 * exp_prag.adb Remove with and use clauses for Ghost.
495 (Expand_Pragma_Check): Remove all Ghost-related code.
496 (Expand_Pragma_Contract_Cases): Remove all Ghost-related code.
497 (Expand_Pragma_Initial_Condition): Remove all Ghost-related code.
498 (Expand_Pragma_Loop_Variant): Remove all Ghost-related code.
499 * exp_util.adb (Build_DIC_Procedure_Body): Install
500 and revert the Ghost region of the working types.
501 (Build_DIC_Procedure_Declaration): Install and revert the
502 Ghost region of the working type.
503 (Make_Invariant_Call): Install and revert the Ghost region of the
505 (Make_Predicate_Call): Reimplemented. Install and revert the
506 Ghost region of the associated type.
507 * freeze.adb (Freeze_Entity): Install and revert the Ghost region
508 of the entity being frozen.
509 (New_Freeze_Node): Removed.
510 * ghost.adb Remove with and use clauses for Opt.
511 (Check_Ghost_Completion): Update the parameter profile
512 and all references to formal parameters.
513 (Ghost_Entity): Update the comment on usage.
514 (Install_Ghost_Mode): New routines.
515 (Is_Ghost_Assignment): New routine.
516 (Is_Ghost_Declaration): New routine.
517 (Is_Ghost_Pragma): New routine.
518 (Is_Ghost_Procedure_Call): New routine.
519 (Is_Ghost_Renaming): Removed.
520 (Is_OK_Declaration): Reimplemented.
521 (Is_OK_Pragma): Reimplemented.
522 (Is_OK_Statement): Reimplemented.
523 (Is_Subject_To_Ghost): Update the comment on usage.
524 (Mark_And_Set_Ghost_Assignment): New routine.
525 (Mark_And_Set_Ghost_Body): New routine.
526 (Mark_And_Set_Ghost_Completion): New routine.
527 (Mark_And_Set_Ghost_Declaration): New routine.
528 (Mark_And_Set_Ghost_Instantiation): New routine.
529 (Mark_And_Set_Ghost_Procedure_Call): New routine.
530 (Mark_Full_View_As_Ghost): Removed.
531 (Mark_Ghost_Declaration_Or_Body): New routine.
532 (Mark_Ghost_Pragma): New routine.
533 (Mark_Ghost_Renaming): New routine.
534 (Mark_Pragma_As_Ghost): Removed.
535 (Mark_Renaming_As_Ghost): Removed.
536 (Propagate_Ignored_Ghost_Code): Update the comment on usage.
537 (Prune_Node): Freeze nodes no longer need special pruning, they
538 are processed by the general ignored Ghost code mechanism.
539 (Restore_Ghost_Mode): New routine.
540 (Set_Ghost_Mode): Reimplemented.
541 (Set_Ghost_Mode_From_Entity): Removed.
542 * ghost.ads Add with and use clauses for Ghost.
543 (Check_Ghost_Completion): Update the parameter profile
544 along with the comment on usage.
545 (Install_Ghost_Mode): New routine.
546 (Is_Ghost_Assignment): New routine.
547 (Is_Ghost_Declaration): New routine.
548 (Is_Ghost_Pragma): New routine.
549 (Is_Ghost_Procedure_Call): New routine.
550 (Mark_And_Set_Ghost_Assignment): New routine.
551 (Mark_And_Set_Ghost_Body): New routine.
552 (Mark_And_Set_Ghost_Completion): New routine.
553 (Mark_And_Set_Ghost_Declaration): New routine.
554 (Mark_And_Set_Ghost_Instantiation): New routine.
555 (Mark_And_Set_Ghost_Procedure_Call): New routine.
556 (Mark_Full_View_As_Ghost): Removed.
557 (Mark_Ghost_Pragma): New routine.
558 (Mark_Ghost_Renaming): New routine.
559 (Mark_Pragma_As_Ghost): Removed.
560 (Mark_Renaming_As_Ghost): Removed.
561 (Restore_Ghost_Mode): New routine.
562 (Set_Ghost_Mode): Redefined.
563 (Set_Ghost_Mode_From_Entity): Removed.
564 * sem.adb (Analyze): Install and revert the Ghost region of the
566 (Do_Analyze): Change the way a clean Ghost
567 region is installed and reverted.
568 * sem_ch3.adb (Analyze_Full_Type_Declaration): Remove
569 all Ghost-related code.
570 (Analyze_Incomplete_Type_Decl): Remove all Ghost-related code.
571 (Analyze_Number_Declaration): Remove all Ghost-related code.
572 (Analyze_Object_Declaration): Install and revert the Ghost region of
573 a deferred object declaration's completion.
574 (Array_Type_Declaration): Remove all Ghost-related code.
575 (Build_Derived_Type): Update the comment on
576 the propagation of Ghost attributes from a parent to a derived type.
577 (Derive_Subprogram): Remove all Ghost-related code.
578 (Make_Class_Wide_Type): Remove all Ghost-related code.
579 (Make_Implicit_Base): Remove all Ghost-related code.
580 (Process_Full_View): Install and revert the Ghost region of
581 the partial view. There is no longer need to check the Ghost
583 * sem_ch5.adb (Analyze_Assignment): Install and revert the Ghost
584 region of the left hand side.
585 * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Remove
586 all Ghost-related code.
587 (Analyze_Expression_Function): Remove all Ghost-related code.
588 (Analyze_Generic_Subprogram_Body): Remove all Ghost-related code.
589 (Analyze_Procedure_Call): Install and revert the Ghost region of
590 the procedure being called.
591 (Analyze_Subprogram_Body_Helper): Install and revert the Ghost
592 region of the spec or body.
593 (Analyze_Subprogram_Declaration): Remove all Ghost-related code.
594 (Build_Subprogram_Declaration): Remove all Ghost-related code.
595 (Find_Corresponding_Spec): Remove all Ghost-related code.
596 (Process_Formals): Remove all Ghost-related code.
597 * sem_ch7.adb (Analyze_Package_Body_Helper): Install and revert
598 the Ghost region of the spec.
599 (Analyze_Package_Declaration): Remove all Ghost-related code.
600 * sem_ch8.adb (Analyze_Exception_Renaming): Mark a renaming as
601 Ghost when it aliases a Ghost entity.
602 (Analyze_Generic_Renaming): Mark a renaming as Ghost when it aliases
604 (Analyze_Object_Renaming): Mark a renaming as Ghost when
605 it aliases a Ghost entity.
606 (Analyze_Package_Renaming): Mark a renaming as Ghost when it aliases
608 (Analyze_Subprogram_Renaming): Mark a renaming as Ghost when it
609 aliases a Ghost entity.
610 * sem_ch11.adb Remove with and use clauses for Ghost.
611 (Analyze_Exception_Declaration): Remove all Ghost-related code.
612 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Remove all
614 (Analyze_Generic_Subprogram_Declaration): Remove all Ghost-related
616 (Analyze_Package_Instantiation): Install and revert the Ghost region
617 of the package instantiation.
618 (Analyze_Subprogram_Instantiation): Install
619 and revert the Ghost region of the subprogram instantiation.
620 (Instantiate_Package_Body): Code clean up. Install and revert the
621 Ghost region of the package body.
622 (Instantiate_Subprogram_Body): Code clean up. Install and revert the
623 Ghost region of the subprogram body.
624 * sem_ch13.adb (Build_Predicate_Functions): Install
625 and revert the Ghost region of the related type.
626 (Build_Predicate_Function_Declaration): Code clean up. Install
627 and rever the Ghost region of the related type.
628 * sem_prag.adb (Analyze_Contract_Cases_In_Decl_Part):
629 Install and revert the Ghost region of the pragma.
630 (Analyze_Initial_Condition_In_Decl_Part): Install and revert the
631 Ghost region of the pragma.
632 (Analyze_Pragma): Install and revert the Ghost region of various
633 pragmas. Mark a pragma as Ghost when it is related to a Ghost entity
634 or encloses a Ghost entity.
635 (Analyze_Pre_Post_Condition): Install and revert the Ghost
636 region of the pragma.
637 (Analyze_Pre_Post_Condition_In_Decl_Part): Install and revert the
638 Ghost region of the pragma.
639 * sem_res.adb (Resolve): Remove all Ghost-related code.
640 * sem_util.adb (Is_Declaration): Reimplemented.
641 (Is_Declaration_Other_Than_Renaming): New routine.
642 * sem_util.ads (Is_Declaration_Other_Than_Renaming): New routine.
643 * sinfo.adb (Is_Checked_Ghost_Pragma): New routine.
644 (Is_Ghost_Pragma): Removed.
645 (Is_Ignored_Ghost_Pragma): New routine.
646 (Set_Is_Checked_Ghost_Pragma): New routine.
647 (Set_Is_Ghost_Pragma): Removed.
648 (Set_Is_Ignored_Ghost_Pragma): New routine.
649 * sinfo.ads: Update the documentation on Ghost mode and
650 Ghost regions. New attributes Is_Checked_Ghost_Pragma
651 and Is_Ignored_Ghost_Pragma along with usages in nodes.
652 Remove attribute Is_Ghost_Pragma along with usages in nodes.
653 (Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
654 (Is_Ghost_Pragma): Removed along with pragma Inline.
655 (Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
656 (Set_Is_Checked_Ghost_Pragma): New routine along with pragma Inline.
657 (Set_Is_Ghost_Pragma): Removed along with pragma Inline.
658 (Set_Is_Ignored_Ghost_Pragma): New routine along with pragma Inline.
660 2017-01-12 Tristan Gingold <gingold@adacore.com>
662 * s-mmap.ads, s-mmap.adb, s-mmosin-unix.ads, s-mmosin-unix.adb,
663 s-mmauni-long.ads, s-mmosin-mingw.ads, s-mmosin-mingw.adb: New files.
665 2017-01-12 Yannick Moy <moy@adacore.com>
667 * errout.adb, errout.ads (Initialize): Factor common treatment
669 (Reset_Warnings): New procedure to reset counts related to warnings.
670 (Record_Compilation_Errors): New variable to store the presence of an
671 error, used in gnat2why to allow changing the Warning_Mode.
672 (Compilation_Errors): Use new variable Record_Compilation_Errors to
673 store the presence of an error.
675 2017-01-12 Javier Miranda <miranda@adacore.com>
677 * sem_ch13.adb (Analyze_Aspect_Specifications):
678 For Interrupt_Handler and Attach_ Handler aspects, decorate the
679 internally built reference to the protected procedure as coming
680 from sources and force its analysis.
682 2017-01-12 Ed Schonberg <schonberg@adacore.com>
684 * sem_ch3.adb (Build_Derived_Type): For a scalar derived type,
685 inherit predicates if any from the first_subtype of the parent,
686 not from the anonymous parent type.
687 * sem_eval.adb (Is_Static_Subtype): A type that inherits a dynamic
688 predicate is not a static subtype.
690 2017-01-12 Gary Dismukes <dismukes@adacore.com>
692 * freeze.adb (Check_Suspicious_Convention): New procedure
693 performing a warning check on discriminated record types with
694 convention C or C++. Factored out of procedure Freeze_Record_Type,
695 and changed to only apply to base types (to avoid spurious
696 warnings on subtypes). Minor improvement of warning messages
697 to refer to discriminated rather than variant record types.
698 (Freeze_Record_Type): Remove code for performing a suspicious
700 (Freeze_Entity): Only call Freeze_Record_Type
701 on types that aren't declared within any enclosing generic units
702 (rather than just excluding the type when the innermost scope
703 is generic). Call Check_Suspicious_Convention whether or not
704 the type is declared within a generic unit.
705 * sem_ch8.adb (In_Generic_Scope): Move this function to Sem_Util.
706 * sem_util.ads, sem_util.adb (In_Generic_Scope): New function (moved
709 2017-01-12 Tristan Gingold <gingold@adacore.com>
711 * sysdep.c, adaint.c, rtinit.c, ming32.h:
712 (__gnat_current_codepage): Renamed from CurrentCodePage
713 (__gnat_current_ccs_encoding): Renamed from CurrentCCSEncoding
715 2017-01-12 Ed Schonberg <schonberg@adacore.com>
717 * sem_ch6.adb (Fully_Conformant_Expressions): Handle properly
718 quantified expressions, following AI12-050: the loop parameters
719 of two quantified expressions are conformant if they have the
722 2017-01-12 Arnaud Charlet <charlet@adacore.com>
724 * gcc-interface/Makefile.in: Clean up VxWorks targets.
726 2017-01-12 Ed Schonberg <schonberg@adacore.com>
728 * sem_attr.adb (Analyze_Attribute_Reference, case Loop_Entry):
729 Hnadle properly the attribute reference when it appears as part
730 of an expression in another loop aspect.
732 2017-01-12 Ed Schonberg <schonberg@adacore.com>
734 * exp_ch3.adb (Check_Predicated_Discriminant): New procedure,
735 subsidiary of Build_Initialization_Call, to complete generation
736 of predicate checks on discriminants whose (sub)types have
737 predicates, and to add checks on variants that do not have an
739 * sem_util.adb (Gather_Components): A missing Others alternative is
740 not an error when the type of the discriminant is a static predicate
741 (and coverage has been checked when analyzing the case statement). A
742 runtime check is generated to verify that a given discriminant
743 satisfies the predicate (RM 3.8.1. (21.1/2)).
745 2017-01-12 Yannick Moy <moy@adacore.com>
747 * gnat1drv.adb (Adjust_Global_Switches): Only
748 perform checking of exception mechanism when generating code.
750 2017-01-12 Justin Squirek <squirek@adacore.com>
752 * exp_ch7.adb (Add_Type_Invariants, Process_Array_Component):
753 Remove handling of access component with invariant.
754 (Build_Invariant_Procedure_Declaration): Remove return on class
756 * freeze.adb (Freeze_Array_Type, Freeze_Record_Type): Remove
757 conditional exception for component or array so Has_Own_Invariants
758 flag is not falsly set.
759 * sem_ch3.adb (Make_Class_Wide_Type): Initialize copy of class
760 wide type to have no invariant flags.
762 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
764 * exp_ch9.adb, sem_prag.adb, s-tassta.adb, sem_util.adb, s-tarest.adb,
765 sem_ch13.adb: Minor reformatting.
767 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
769 * exp_aggr.adb (Build_Record_Aggr_Code): Guard against a missing
770 adjustment primitive when the ancestor type was not properly frozen.
771 (Gen_Assign): Guard against a missing initialization
772 primitive when the component type was not properly frozen.
773 (Initialize_Array_Component): Guard against a missing adjustment
774 primitive when the component type was not properly frozen.
775 (Initialize_Record_Component): Guard against a missing adjustment
776 primitive when the component type was not properly frozen.
777 (Process_Transient_Component_Completion): The transient object may
778 not be finalized when its associated type was not properly frozen.
779 * exp_ch3.adb (Build_Assignment): Guard against a missing
780 adjustment primitive when the component type was not properly frozen.
781 (Build_Initialization_Call): Guard against a missing
782 initialization primitive when the associated type was not properly
784 (Expand_N_Object_Declaration): Guard against a missing
785 adjustment primitive when the base type was not properly frozen.
786 (Predefined_Primitive_Bodies): Create an empty Deep_Adjust
787 body when there is no adjustment primitive available. Create an
788 empty Deep_Finalize body when there is no finalization primitive
790 * exp_ch4.adb (Apply_Accessibility_Check): Guard against a
791 missing finalization primitive when the designated type was
793 (Expand_N_Allocator): Guard against a missing initialization primitive
794 when the designated type was not properly frozen.
795 * exp_ch5.adb (Make_Tag_Ctrl_Assignment): Add the adjustment call
796 only when the corresponding adjustment primitive is available.
797 * exp_ch7.adb (Build_Adjust_Or_Finalize_Statements): Generate the
798 adjustment/finalization statements only when there is an available
799 primitive to carry out the action.
800 (Build_Initialize_Statements): Generate the initialization/finalization
801 statements only when there is an available primitive to carry out the
803 (Make_Adjust_Call): Do not generate a call when the underlying
804 type is not present due to a possible missing full view.
805 (Make_Final_Call): Do not generate a call when the underlying
806 type is not present due to a possible missing full view.
807 (Make_Finalize_Address_Stmts): Generate an empty body when the
808 designated type lacks a finalization primitive.
809 (Make_Init_Call): Do not generate a call when the underlying type is
810 not present due to a possible missing full view.
811 (Process_Component_For_Adjust): Add the adjustment call only when the
812 corresponding adjustment primitive is available.
813 (Process_Component_For_Finalize): Add the finalization call only when
814 the corresponding finalization primitive is available.
815 (Process_Object_Declaration): Use a null statement to emulate a
816 missing call to the finalization primitive of the object type.
817 * exp_ch7.ads (Make_Adjust_Call): Update the comment on usage.
818 (Make_Final_Call): Update the comment on usage.
819 (Make_Init_Call): Update the comment on usage.
820 * exp_util.adb (Build_Transient_Object_Statements): Code reformatting.
822 2017-01-12 Arnaud Charlet <charlet@adacore.com>
824 * einfo.ads: Update documentation of Address_Taken.
825 * sem_attr.adb (Analyze_Access_Attribute, Resolve_Attribute
826 [Access_Attribute]): Only consider 'Access/'Unchecked_Access
827 for subprograms when setting Address_Taken flag.
829 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
831 * sem_ch10.adb (Analyze_With_Clause): Removed code that turned
832 Configurable_Run_Time_Mode off when analysing with'ed predefined
835 2017-01-12 Gary Dismukes <dismukes@adacore.com>
837 * sem_prag.adb: Minor reformatting.
838 * sem_util.adb (Unique_Entity): fix result for
839 bodies of entry families.
841 2017-01-12 Justin Squirek <squirek@adacore.com>
843 * sem_prag.adb (Analyze_Pragma): Add appropriate calls to
844 Resolve_Suppressible in the pragma Assertion_Policy case.
845 (Resolve_Suppressible): Created this function to factor out
846 common code used to resolve Suppress to either Ignore or Check
847 * snames.ads-tmpl: Add name for Suppressible.
849 2017-01-12 Gary Dismukes <dismukes@adacore.com>
851 * exp_ch9.adb, s-secsta.adb, snames.ads-tmpl, exp_ch3.adb: Minor
853 * debug.adb: Minor comment fixes.
855 2017-01-12 Arnaud Charlet <charlet@adacore.com>
857 * sem_util.adb (Unique_Entity): For concurrent
858 bodies that are defined with stubs and complete a declaration
859 of a single concurrent object return the entity of an implicit
860 concurrent type, not the entity of the anonymous concurrent
862 * debug.adb: -gnatd.J is no longer used.
863 * make.adb (Globalize): Removed, no longer used.
864 * sem_ch9.adb: minor typo in comment for entry index
866 2017-01-12 Patrick Bernardi <bernardi@adacore.com>
868 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
869 * exp_ch3.adb (Build_Init_Statements): As part of initialising
870 the value record of a task, set its _Secondary_Stack_Size field
872 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
873 a _Secondary_Stack_Size field in the value record of
874 the task if a Secondary_Stack_Size rep item is present.
875 (Make_Task_Create_Call): Include secondary stack size
876 parameter. If No_Secondary_Stack restriction is in place, passes
878 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
879 Secondary_Stack_Size.
880 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
881 function to define the overhead of the secondary stack.
882 * s-tarest.adb (Create_Restricted_Task,
883 Create_Restricted_Task_Sequential): Functions now include
884 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
885 * s-tarest.adb (Create_Restricted_Task,
886 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB now
887 include Secondary_Stack_Size parameter.
888 (Task_Wrapper): Secondary stack now allocated to the size specified by
889 the Secondary_Stack_Size parameter in the task's ATCB.
890 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialize_ATCB): New
891 Secondary_Stack_Size component.
892 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
893 Create_Restricted_Task_Sequential): Function now include
894 Secondary_Stack_Size parameter.
895 (Task_Wrapper): Secondary stack now allocated to the size
896 specified by the Secondary_Stack_Size parameter in the task's
898 * s-tproft.adb (Register_Foreign_Thread): Amended Initialize_ATCB call
899 to include Secondary_Stack_Size parameter.
900 * sem_ch13.adb (Analyze_Aspect_Specification): Add support for
901 Secondary_Stack_Size aspect, turning the aspect into its corresponding
903 (Analyze_Attribute_Definition): Process Secondary_Stack_Size attribute.
904 * snames.adb-tmpl, snames.ads-tmpl: Added names
905 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
906 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
908 2017-01-12 Yannick Moy <moy@adacore.com>
910 * exp_spark.adb (Expand_SPARK_Potential_Renaming): Fix sloc of copied
913 2017-01-12 Justin Squirek <squirek@adacore.com>
915 * exp_attr.adb (Expand_N_Attribute_Reference):
916 Fix Finalization_Size case by properly resolving the type after
919 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
921 * exp_util.adb (Build_DIC_Procedure_Body): Semi-insert the body into
923 (Build_DIC_Procedure_Declaration): Semi-insert the body into the tree.
924 * binde.adb, exp_ch5.adb, sem_type.adb, sem.ads, sem_res.adb,
925 exp_sel.ads: Minor reformatting.
927 2017-01-12 Justin Squirek <squirek@adacore.com>
929 * exp_ch6.adb (Expand_Call): Add guard to prevent
930 invariant checks from being created for internally generated
933 2017-01-12 Bob Duff <duff@adacore.com>
935 * lib-writ.ads: Remove incorrect comment.
937 2017-01-12 Javier Miranda <miranda@adacore.com>
939 * debug.adb (-gnatd.K): Enable generation of contract-only
940 procedures in CodePeer mode.
941 * contracts.adb (Build_And_Analyze_Contract_Only_Subprograms):
943 (Analyze_Contracts): Generate contract-only procedures if -gnatdK is
945 * scil_ll.ads, scil_ll.adb (Get_Contract_Only_Body_Name): New
947 (Get_Contract_Only_Missing_Body_Name): New subprogram.
948 (Get_Contract_Only_Body): New subprogram.
949 (Set_Contract_Only_Body): New subprogram.
950 (Is_Contract_Only_Body): New subprogram.
951 (Set_Is_Contract_Only_Body): New subprogram.
952 (SCIL_Nodes): Replace table by hash-table.
954 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
956 * exp_ch6.adb: Minor reformatting.
957 * spark_xrefs.ads: minor cleanup of comments for SPARK xrefs
959 2017-01-12 Bob Duff <duff@adacore.com>
961 * binde.adb (Forced): New reason for a dependence.
962 (Force_Elab_Order): Implementation of the new switch.
963 * binde.ads: Minor comment fixes.
964 * bindusg.adb: Add -f switch. Apparently, there was an -f switch
965 long ago that is no longer supported; removed comment about that.
966 * opt.ads (Force_Elab_Order_File): Name of file specified for
968 * switch-b.adb: Parse -f switch.
970 2017-01-12 Justin Squirek <squirek@adacore.com>
972 * exp_ch6.adb (Check_View_Conversion): Created this function
973 to properly chain calls to check type invariants that may be
974 present in a subprogram call after the subprogram.
975 (Expand_Call): Add a conditional to identify when a view conversion
977 * nlists.adb, nlists.ads (Prepend_New): New routine.
978 (Prepend_New_To): New routine.
980 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
982 * sinfo.ads: Minor reformatting.
984 2017-01-12 Gary Dismukes <dismukes@adacore.com>
986 * exp_util.adb, exp_util.ads, einfo.ads: Minor typo fixes and
989 2017-01-12 Hristian Kirtchev <kirtchev@adacore.com>
991 * exp_ch6.adb (Make_Build_In_Place_Call_In_Anonymous_Context): Add new
992 variable Definite. Create a local object and pass its 'Access to the
993 BIP function when the result type is either definite or it does not
994 require any finalization or secondary stack management.
996 2017-01-12 Bob Duff <duff@adacore.com>
998 * contracts.adb, einfo.adb, errout.adb, exp_attr.adb,
999 exp_ch3.adb, exp_ch7.adb, exp_ch9.adb, exp_prag.adb, freeze.adb,
1000 frontend.adb, ghost.adb, inline.adb, lib-writ.adb, lib-xref.adb,
1001 par.adb, par-ch10.adb, par-ch2.adb, par-prag.adb, par_sco.adb,
1002 sem_attr.adb, sem_aux.adb, sem_ch10.adb, sem_ch12.adb,
1003 sem_ch13.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb, sem_elab.adb,
1004 sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1005 sem_warn.adb, sinfo.adb, sinfo.ads, sprint.adb (Pragma_Name):
1006 Change name to Pragma_Name_Unmapped.
1007 (Pragma_Name_Mapped): Change name to Pragma_Name.
1008 This is because the "mapped" version should be the usual case.
1010 2017-01-09 Hristian Kirtchev <kirtchev@adacore.com>
1012 * einfo.ads, einfo.adb: Remove uses of flags Has_Default_Init_Cond,
1013 Is_Default_Init_Cond_Procedure, and
1014 Has_Inherited_Default_Init_Cond. Add uses of flags
1015 Has_Own_DIC, Is_DIC_Procedure, and Has_Inherited_DIC.
1016 (Default_Init_Cond_Procedure): Removed.
1017 (DIC_Procedure): New routine.
1018 (Has_Default_Init_Cond): Removed.
1019 (Has_DIC): New routine.
1020 (Has_Inheritable_Invariants): The attribute applies to the base type.
1021 (Has_Inherited_Default_Init_Cond): Removed.
1022 (Has_Inherited_DIC): New routine.
1023 (Has_Inherited_Invariants): The attribute applies to the base type.
1024 (Has_Own_DIC): New routine.
1025 (Has_Own_Invariants): The attribute applies to the base type.
1026 (Is_Default_Init_Cond_Procedure): Removed.
1027 (Is_DIC_Procedure): New routine.
1028 (Set_Default_Init_Cond_Procedure): Removed.
1029 (Set_DIC_Procedure): New routine.
1030 (Set_Has_Default_Init_Cond): Removed.
1031 (Set_Has_Inheritable_Invariants): The attribute applies
1033 (Set_Has_Inherited_Default_Init_Cond): Removed.
1034 (Set_Has_Inherited_DIC): New routine.
1035 (Set_Has_Inherited_Invariants): The attribute applies to the base type.
1036 (Set_Has_Own_DIC): New routine.
1037 (Set_Has_Own_Invariants): The attribute applies to the base type.
1038 (Set_Is_Default_Init_Cond_Procedure): Removed.
1039 (Set_Is_DIC_Procedure): New routine.
1040 (Write_Entity_Flags): Update the output of all flags related to
1041 default initial condition.
1042 * exp_ch3.adb (Expand_N_Object_Declaration): Update the generation
1043 of the call to the DIC procedure.
1044 (Freeze_Type): Generate the body of the DIC procedure.
1045 * exp_ch7.adb (Build_Invariant_Procedure_Body): Replace
1046 all occurrences of Create_Append with Append_New_To. Do
1047 not generate an invariant procedure for a class-wide type.
1048 The generated body acts as a freeze action of the working type.
1049 (Build_Invariant_Procedure_Declaration): Do not generate an
1050 invariant procedure for a class-wide type.
1051 (Create_Append): Removed.
1052 * exp_util.adb: Add with and use clauses for Sem_Ch3, sem_ch6,
1053 sem_Ch12, Sem_Disp, and GNAT.HTable. Move the handling of
1054 class-wide pre/postcondition description and data structures from
1056 (Build_Class_Wide_Expression): Moved from Sem_Prag.
1057 (Build_DIC_Call): New routine.
1058 (Build_DIC_Procedure_Body): New routine.
1059 (Build_DIC_Procedure_Declaration): New routine.
1060 (Entity_Hash): Moved from Sem_Prag.
1061 (Find_DIC_Type): New routine.
1062 (Update_Primitives_Mapping): Reimplemented.
1063 (Update_Primitives_Mapping_Of_Types): New routine.
1064 * exp_util.ads (Build_Class_Wide_Expression): Moved from Sem_Prag.
1065 (Build_DIC_Call): New routine.
1066 (Build_DIC_Procedure_Body): New routine.
1067 (Build_DIC_Procedure_Declaration): New routine.
1068 (Update_Primitives_Mapping): Moved from Sem_Prag.
1069 (Update_Primitives_Mapping_Of_Types): New routine.
1070 * nlists.adb (Append_New): New routine.
1071 (Append_New_To): New routine.
1072 * nlists.ads (Append_New): New routine.
1073 (Append_New_To): New routine.
1074 * sem_ch3.adb (Analyze_Declarations): Do not generate the bodies
1075 of DIC procedures here. This is now done at the end of the
1076 visible declarations, private declarations, and at the freeze
1078 (Analyze_Private_Extension_Declaration):
1079 A private extension inherits the DIC pragma of a parent type.
1080 (Analyze_Subtype_Declaration): No need to propagate invariant
1081 attributes to a subtype as those apply to the base type.
1082 (Build_Derived_Record_Type): No need to inherit invariants here
1083 as this is now done in Build_Derived_Type.
1084 (Build_Derived_Type): Inherit both the DIC pragma and invariants from
1086 (Process_Full_View): Update the propagation of DIC attributes.
1087 (Propagate_Default_Init_Cond_Attributes): Removed.
1088 * sem_ch7.adb Add with and use clauses for Exp_Util.
1089 (Analyze_Package_Specification): Create the body of the DIC
1090 procedure at the end of the visible and private declarations.
1091 (Preserve_Full_Attributes): Propagate DIC attributes.
1092 * sem_ch9.adb (Analyze_Protected_Type_Declaration): Propagate
1094 (Analyze_Task_Type_Declaration): Propagate DIC attributes.
1095 * sem_elab.adb (Check_A_Call): Update the call to
1096 Is_Nontrivial_Default_Init_Cond_Procedure.
1097 * sem_prag.adb Remove the with and use clauses for
1098 GNAT.HTable. Move the handling of class- wide pre/postcondition
1099 description and data structures to Exp_Util.
1100 (Analyze_Pragma): Create the declaration of the DIC procedure. There
1101 is no need to propagate invariant-related attributes at this point
1102 as this is done in Build_Invariant_Procedure_Declaration.
1103 (Build_Class_Wide_Expression): Moved to Exp_Util.
1104 (Entity_Hash): Moved to Exp_Util.
1105 (Update_Primitives_Mapping): Moved to Exp_Util.
1106 * sem_prag.ads (Build_Class_Wide_Expression): Moved to Exp_Util.
1107 (Update_Primitives_Mapping): Moved to Exp_Util.
1108 * sem_util.adb: Remove with and use clauses for Ghost
1110 (Build_Default_Init_Cond_Call): Removed.
1111 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1112 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1113 (Get_Views): Reimplemented.
1114 (Has_Full_Default_Initialization): Reimplement the section on DIC.
1115 (Inherit_Default_Init_Cond_Procedure): Removed.
1116 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1117 (Is_Nontrivial_DIC_Procedure): New routine.
1118 (Is_Verifiable_DIC_Pragma): New routine.
1119 (Propagate_DIC_Attributes): New routine.
1120 * sem_util.ads (Build_Default_Init_Cond_Call): Removed.
1121 (Build_Default_Init_Cond_Procedure_Bodies): Removed.
1122 (Build_Default_Init_Cond_Procedure_Declaration): Removed.
1123 (Inherit_Default_Init_Cond_Procedure): Removed.
1124 (Is_Nontrivial_Default_Init_Cond_Procedure): Removed.
1125 (Is_Nontrivial_DIC_Procedure): New routine.
1126 (Is_Verifiable_DIC_Pragma): New routine.
1127 (Propagate_DIC_Attributes): New routine.
1128 * sem_warn.adb (Is_OK_Fully_Initialized): Reimplement the section
1130 * sinfo.ads, sinfo.adb: Add new attribute Expression_Copy along with
1132 (Expression_Copy): New routine along with pragma Inline.
1133 (Set_Expression_Copy): New routine along with pragma Inline.
1135 2017-01-06 Bob Duff <duff@adacore.com>
1137 * bindgen.adb (Gen_Adainit, Gen_Adafinal): Change
1138 "Bind_Main_Program" to "not Bind_For_Library", because otherwise
1139 we won't generate the call to s_stalib_adafinal when the main
1140 is not written in Ada.
1142 2017-01-06 Bob Duff <duff@adacore.com>
1144 * sem_prag.adb: Minor: remove pragma Warnings.
1146 2017-01-06 Tristan Gingold <gingold@adacore.com>
1148 * Makefile.rtl: Do not compile s-stchop by default.
1150 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
1152 * aspects.adb, aspects.ads, exp_ch3.adb, exp_ch9.adb, par-prag.adb,
1153 sem_ch13.adb, sem_prag.adb, sem_prag.ads, snames.adb-tmpl,
1154 snames.ads-tmpl, s-secsta.adb, s-secsta.ads, s-tarest.adb,
1155 s-tarest.ads, s-taskin.adb, s-taskin.ads, s-tassta.adb, s-tassta.ads:
1156 Reverted previous change for now.
1158 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1160 * exp_ch3.adb (Build_Initialization_Call): Apply predicate
1161 check to default discriminant value if checks are enabled.
1162 (Build_Assignment): If type of component has static predicate,
1163 apply check to its default value, if any.
1165 2017-01-06 Patrick Bernardi <bernardi@adacore.com>
1167 * aspect.adb, aspect.ads: Added new aspect Secondary_Stack_Size.
1168 * exp_ch3.adb (Build_Init_Statements): As part of initialising
1169 the value record of a task, set its _Secondary_Stack_Size field
1171 * exp_ch9.adb (Expand_N_Task_Type_Declaration): Create
1172 a _Secondary_Stack_Size field in the value record of
1173 the task if a Secondary_Stack_Size rep item is present.
1174 (Make_Task_Create_Call): Include secondary stack size
1175 parameter. If No_Secondary_Stack restriction is in place, passes
1177 * par-prag.adb, sem_prag.adb, sem_prag.ads: Added new pragma
1178 Secondary_Stack_Size.
1179 * s-secsta.adb, s-secsta.ads (Minimum_Secondary_Stack_Size): New
1180 function to define the overhead of the secondary stack.
1181 * s-tarest.adb (Create_Restricted_Task,
1182 Create_Restricted_Task_Sequential): Functions now include
1183 Secondary_Stack_Size parameter to pass to Initialize_ATCB.
1184 * s-tarest.adb (Create_Restricted_Task,
1185 Create_Restricted_Task_Sequential): Calls to Initialize_ATCB
1186 now include Secondary_Stack_Size parameter.
1188 Secondary stack now allocated to the size specified by the
1189 Secondary_Stack_Size parameter in the task's ATCB.
1190 * s-taskin.adb, s-taskin.adb (Common_ATCB, Initialise_ATCB): New
1191 Secondary_Stack_Size component.
1192 * s-tassta.adb, s-tassta.ads (Create_Restricted_Task,
1193 Create_Restricted_Task_Sequential): Function now include
1194 Secondary_Stack_Size parameter.
1195 (Task_Wrapper): Secondary stack
1196 now allocated to the size specified by the Secondary_Stack_Size
1197 parameter in the task's ATCB.
1198 * sem_ch13.adb (Analyze_Aspect_Specification): Add support
1199 for Secondary_Stack_Size aspect, turning the aspect into its
1200 corresponding internal attribute.
1201 (Analyze_Attribute_Definition):
1202 Process Secondary_Stack_Size attribute.
1203 * snames.adb-tmpl, snames.ads-tmpl: Added names
1204 Name_Secondary_Stack_Size, Name_uSecondary_Stack_Size,
1205 Attribute_Secondary_Stack_Size and Pragma_Secondary_Stack_Size.
1207 2017-01-06 Pascal Obry <obry@adacore.com>
1209 * a-direio.adb, a-direio.ads, a-sequio.adb, a-sequio.ads: Add Flush to
1210 Sequential_IO and Direct_IO.
1212 2017-01-06 Bob Duff <duff@adacore.com>
1214 * snames.ads-tmpl (Renamed): New name for the pragma argument.
1215 * par-ch2.adb: Allow the new pragma (with analysis deferred
1217 * sinfo.ads, sinfo.adb (Map_Pragma_Name, Pragma_Name_Mapped):
1218 Keep a mapping from new pragma names to old names.
1219 * sem_prag.adb: Check legality of pragma Rename_Pragma, and
1220 implement it by calling Map_Pragma_Name.
1221 * checks.adb, contracts.adb, einfo.adb, errout.adb,
1222 * exp_attr.adb, exp_ch3.adb, exp_ch6.adb, exp_ch7.adb, exp_ch9.adb,
1223 * exp_prag.adb, exp_util.adb, freeze.adb, frontend.adb, ghost.adb,
1224 * inline.adb, lib-writ.adb, scans.adb, scans.ads, sem_attr.adb,
1225 * sem_aux.adb, sem_ch10.adb, sem_ch13.adb, sem_ch6.adb, sem_ch9.adb,
1226 * sem_elab.adb, sem_res.adb, sem_util.adb, sem_util.ads,
1227 * sem_warn.adb: Call Pragma_Name_Mapped instead of Pragma_Name
1230 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1232 * exp_ch9.adb: Minor reformatting.
1234 2017-01-06 Tristan Gingold <gingold@adacore.com>
1236 * exp_ch9.ads, exp_ch9.adb (Build_Entry_Names): Remove (unused).
1237 * rtsfind.ads (RE_Task_Entry_Names_Array, RO_ST_Set_Entry_Names)
1238 (RE_Protected_Entry_Names_Array, RO_PE_Set_Entry_Names): Remove
1240 * s-taskin.ads, s-taskin.adb (Set_Entry_Names,
1241 Task_Entry_Names_Array, Task_Entry_Names_Access): Remove.
1242 * s-tpoben.ads, s-tpoben.adb (Set_Entry_Names,
1243 Protected_Entry_Names_Array, Protected_Entry_Names_Access): Remove.
1245 2017-01-06 Bob Duff <duff@adacore.com>
1247 * sinfo.ads, sinfo.adb (Map_Pragma_Name): Preparation work,
1248 dummy implementation of Map_Pragma_Name.
1250 2017-01-06 Tristan Gingold <gingold@adacore.com>
1252 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Make the
1253 entry_body variable constant.
1254 * s-taprob.ads (Entry_Body_Access): Move to s-tposen.
1255 * s-tpoben.ads (Protected_Entry_Body_Access): Now access
1257 * s-tposen.ads (Entry_Body_Access): Moved from s-taprob,
1258 now access to constant.
1260 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1262 * einfo.ads, sem_res.adb, sem_attr.adb, sem_ch6.adb: Minor
1263 reformatting and typo fixes.
1265 2017-01-06 Bob Duff <duff@adacore.com>
1267 * snames.ads-tmpl: New names for pragma renaming.
1268 * snames.adb-tmpl (Is_Configuration_Pragma_Name): Minor cleanup.
1269 * par-prag.adb: Add new pragma name to case statement.
1270 * sem_prag.adb (Rename_Pragma): Initial cut at semantic analysis
1272 * sinfo.ads, sinfo.adb (Pragma_Name_Mapped): Preparation work,
1273 Dummy implementation of Pragma_Name_Mapped.
1275 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1277 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Add guard to
1278 better detect call within an entry_wrapper.
1279 * sem_res.adb (Resolve_Call): A protected call within an
1280 entity_wrapper is analyzed in the context of the protected
1281 object but corresponds to a pre-analysis and is not an access
1283 * sem_attr.adb: Minor reformatting.
1285 2017-01-06 Justin Squirek <squirek@adacore.com>
1287 * sem_attr.adb (Analyze_Attribute): Modify semantic checks for
1288 Finalization_Size to allow a prefix of any non-class-wide type.
1289 * sem_attr.ads Modify comment for Finalization_Size to include
1290 definite type use case.
1292 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1294 * einfo.ads, einfo.adb (Is_Entry_Wrapper): New flag, defined
1295 on procedures that are wrappers created for entries that have
1297 * sem_ch6.adb (Analyze_Subrogram_Body_Helper): If the subprogram
1298 body is an entry_wrapper, compile it in the context of the
1299 synchronized type, because a precondition may refer to funtions
1301 * exp_ch9.adb (Build_Contract_Wrapper): Set Is_Entry_Wrapper on
1303 * exp_ch6.adb (Expand_Protected_Subprogram_Call): if the call is
1304 within an Entry_Wrapper this is an external call whose target
1305 is the synchronized object that is the actual in the call to
1308 2017-01-06 Yannick Moy <moy@adacore.com>
1310 * sem_attr.adb (Analyze_Attribute/Attribute_Loop_Entry): Analyze node
1311 in tree, which means not analyzing the previous prefix if the node has
1312 been rewritten into its prefix.
1314 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1316 * s-tpobop.adb: Minor reformatting.
1318 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1320 * checks.adb (Ensure_Valid): Do not generate a validity check
1321 within a generated predicate function, validity checks will have
1322 been applied earlier when required.
1324 2017-01-06 Tristan Gingold <gingold@adacore.com>
1326 * s-tpoben.ads (Protection_Entries): Add comment and reorder
1327 components for performances.
1328 * s-tpobop.adb (PO_Do_Or_Queue): Implement Max_Queue_Length runtime
1331 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1333 * sem_eval.adb (Check_Expression_Against_Static_Predicate):
1334 If expression is compile-time known and obeys a static predicate
1335 it must be labelled as static, to prevent spurious warnings and
1336 run-time errors, e.g. in case statements. This is relevant when
1337 the expression is the result of constant-folding a type conversion
1338 whose expression is a variable with a known static value.
1340 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1342 * exp_attr.adb, sem_attr.ads: Minor reformatting.
1344 2017-01-06 Justin Squirek <squirek@adacore.com>
1346 * exp_attr.adb (Expand_N_Attribute_Reference): Add entry for
1347 expansion of Finalization_Size attribute.
1348 * sem_attr.adb (Analyze_Attribute): Add entry to check the
1349 semantics of Finalization_Size.
1350 (Eval_Attribute): Add null entry for Finalization_Size.
1351 * sem_attr.ads: Add Finalization_Size to the implementation
1352 dependent attribute list.
1353 * snames.ads-tmpl: Add name entry for Finalization_Size attribute.
1355 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1357 * sem_ch5.adb (Analyze_Loop_Statement): If the loop includes an
1358 iterator specification with a serious syntactic error, transform
1359 construct into an infinite loop in order to continue analysis
1360 and prevent a compiler abort.
1362 2017-01-06 Tristan Gingold <gingold@adacore.com>
1364 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Do not generate
1365 max_queue_lengths_array if unused.
1367 2017-01-06 Bob Duff <duff@adacore.com>
1369 * errout.adb (Set_Msg_Text): Protect against out-of-bounds
1370 array access, in case "\" is at the end of Text.
1371 * stylesw.adb (Set_Style_Check_Options): Don't include input
1372 characters in the error message template, because they could
1373 be control characters such as "\", which Errout will try to
1376 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1378 * sem_ch4.adb (Find_Indexing_Operations, Inspect_Declarations):
1379 For a private type examine the visible declarations that follow
1380 the partial view, not just the private declarations that follow
1383 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1385 * exp_ch5.adb, sem_ch3.adb, checks.adb: Minor reformatting and
1388 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1390 * exp_ch5.adb (Get_Default_Iterator): For a derived type, the
1391 alias of the inherited op is the parent iterator, no need to
1392 examine dispatch table positions which might not be established
1393 yet if type is not frozen.
1394 * sem_disp.adb (Check_Controlling_Formals): The formal of a
1395 predicate function may be a subtype of a tagged type.
1396 * sem_ch3.adb (Complete_Private_Subtype): Adjust inheritance
1397 of representation items for the completion of a type extension
1398 where a predicate applies to the partial view.
1399 * checks.ads, checks.adb (Apply_Predicate_Check): Add optional
1400 parameter that designates function whose actual receives a
1401 predicate check, to improve warning message when the check will
1402 lead to infinite recursion.
1403 * sem_res.adb (Resolve_Actuals): Pass additional parameter to
1404 Apply_Predicate_Check.
1406 2017-01-06 Tristan Gingold <gingold@adacore.com>
1408 * s-rident.ads (Profile_Info): Remove No_Entry_Queue from
1409 Gnat_Extended_Ravenscar.
1410 * exp_ch9.adb, s-tpoben.adb, s-tpoben.ads: Fix spelling.
1412 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1414 * sem_util.ads: Minor typo fix and reformatting.
1416 2017-01-06 Yannick Moy <moy@adacore.com>
1418 * ghost.adb Minor fixing of references to SPARK RM.
1419 (Check_Ghost_Context): Check whether reference is to a lvalue
1420 before issuing an error about violation of SPARK RM 6.9(13)
1421 when declaration has Ghost policy Check and reference has Ghost
1423 * sem_util.adb Minor indentation.
1424 * sem_ch10.adb (Analyze_Package_Body_Stub, Analyze_Protected_Body_Stub,
1425 Analyze_Task_Body_Stub): Set Ekind of the defining identifier.
1426 * sem_util.ads (Unique_Defining_Entity): Document the result
1427 for package body stubs.
1429 2017-01-06 Tristan Gingold <gingold@adacore.com>
1431 * raise-gcc.c (abort): Macro to call Abort_Propagation.
1432 * s-tpoben.ads (Protected_Entry_Queue_Max_Access): Make it access
1434 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
1435 Do not generate the Entry_Max_Queue_Lengths_Array if all default
1437 * exp_util.adb (Corresponding_Runtime_Package): Consider
1438 Max_Queue_Length pragma.
1440 2017-01-06 Justin Squirek <squirek@adacore.com>
1442 * exp_ch9.adb (Expand_N_Protected_Type_Declaration):
1443 Remove declaration generation in the case of
1444 System_Tasking_Protected_Objects_Single_Entry being used,
1445 and add a warning message when this is detected to occur.
1446 (Make_Initialize_Protection): Remove reference pass in the case
1447 of System_Tasking_Protected_Objects_Single_Entry.
1448 * rtsfind.ads: Remove RE_Protected_Entry_Queue_Max
1449 * s-tposen.adb (Initialize_Protection_Entry): Remove
1450 Entry_Queue_Max parameter.
1451 * s-tposen.ads: Remove the types use to store the entry queue
1453 * sem_prag.adb (Analyze_Pragma): Remove entry families restriction
1455 2017-01-06 Yannick Moy <moy@adacore.com>
1457 * sem_util.adb, sem_util.ads (Get_Enum_Lit_From_Pos): Strengthen
1458 behavior of function, to also accept out of range positions
1459 and raise Constraint_Error in such case, and to copy sloc from
1460 literal if No_Location passed as location.
1461 * uintp.adb, uintp.ads (UI_To_Int, UI_To_CC): Strengthen behavior
1462 of functions to raise Constraint_Error in case of value not in
1465 2017-01-06 Tristan Gingold <gingold@adacore.com>
1467 * sem_util.adb, s-taprop-linux.adb (Finalize_TCB): Remove call to
1468 Invalidate_Stack_Cache.
1470 2017-01-06 Eric Botcazou <ebotcazou@adacore.com>
1472 * s-os_lib.adb: Minor fix to the signature of Readlink.
1474 2017-01-06 Javier Miranda <miranda@adacore.com>
1476 * sem_ch6.adb (Conforming_Types): Handle another
1477 confusion between views in a nested instance with an actual
1478 private type whose full view is not in scope.
1480 2017-01-06 Arnaud Charlet <charlet@adacore.com>
1482 * exp_ch5.adb (Expand_N_If_Statement): Obey existing comment and
1483 mark a rewritten if statement as explicit (Comes_From_Source).
1485 2017-01-06 Gary Dismukes <dismukes@adacore.com>
1487 * sem_prag.adb, rtsfind.adb, sem_util.adb: Minor typo fixes.
1489 2017-01-06 Tristan Gingold <gingold@adacore.com>
1491 * ada.ads, a-unccon.ads: Add pragma No_Elaboration_Code_All.
1493 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1495 * sem_case.adb: Minor reformatting.
1497 2017-01-06 Thomas Quinot <quinot@adacore.com>
1499 * g-socthi-mingw.adb: Remove now extraneous USE TYPE clause
1501 2017-01-06 Justin Squirek <squirek@adacore.com>
1503 * aspects.adb: Register aspect in Canonical_Aspect.
1504 * aspects.ads: Associate qualities of Aspect_Max_Queue_Length
1505 into respective tables.
1506 * einfo.ads, einfo.adb: Add a new attribute for
1507 handling the parameters for Pragma_Max_Entry_Queue
1508 (Entry_Max_Queue_Lengths_Array) in E_Protected_Type. Subprograms
1509 for accessing and setting were added as well.
1510 * par-prag.adb (Prag): Register Pramga_Max_Entry_Queue.
1511 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Emit
1512 declaration for pramga arguments and store them in the protected
1514 (Make_Initialize_Protection): Pass a reference to
1515 the Entry_Max_Queue_Lengths_Array in the protected type node to
1517 * rtsfind.adb: Minor grammar fix.
1518 * rtsfind.ads: Register new types taken from the
1519 runtime libraries RE_Protected_Entry_Queue_Max and
1520 RE_Protected_Entry_Queue_Max_Array
1521 * s-tposen.adb, s-tpoben.adb
1522 (Initialize_Protection_Entry/Initialize_Protection_Entries):
1523 Add extra parameter and add assignment to local object.
1524 * s-tposen.ads, s-tpoben.ads: Add new types to
1525 store entry queue maximums and a field to the entry object record.
1526 * sem_ch13.adb (Analyze_Aspect_Specifications): Add case statement
1527 for Aspect_Max_Queue_Length.
1528 (Check_Aspect_At_Freeze_Point):
1529 Add aspect to list of aspects that don't require delayed analysis.
1530 * sem_prag.adb (Analyze_Pragma): Add case statement for
1531 Pragma_Max_Queue_Length, check semantics, and register arugments
1532 in the respective entry nodes.
1533 * sem_util.adb, sem_util.ads Add functions Get_Max_Queue_Length
1534 and Has_Max_Queue_Length
1535 * snames.ads-tmpl: Add constant for the new aspect-name
1536 Name_Max_Queue_Length and corrasponding pragma.
1538 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1540 * exp_util.adb (Is_Controlled_Function_Call):
1541 Reimplemented. Consider any node which has an entity as the
1542 function call may appear in various ways.
1544 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1546 * exp_attr.adb (Rewrite_Stream_Proc_Call): Use
1547 an unchecked type conversion when performing a view conversion
1548 to/from a private type. In all other cases use a regular type
1549 conversion to ensure that any relevant checks are properly
1552 2017-01-06 Hristian Kirtchev <kirtchev@adacore.com>
1554 * sem_prag.adb, sem_ch8.adb: Minor reformatting.
1556 2017-01-06 Ed Schonberg <schonberg@adacore.com>
1558 * sem_case.adb (Explain_Non_Static_Bound): Suppress cascaded
1559 error on case expression that is an entity, when coverage is
1560 incomplete and entity has a static value obtained by local
1562 (Handle_Static_Predicate): New procedure, subsidiary of
1563 Check_Choices, to handle case alternatives that are either
1564 subtype names or subtype indications involving subtypes that
1565 have static predicates.
1567 2017-01-06 Thomas Quinot <quinot@adacore.com>
1569 * s-oscons-tmplt.c, g-socket.adb, g-socket.ads, g-sothco.ads:
1570 (GNAT.Socket): Add support for Busy_Polling and Generic_Option
1572 2017-01-06 Bob Duff <duff@adacore.com>
1574 * sem_elab.adb (Activate_Elaborate_All_Desirable): Don't add
1575 Elaborate_All(P) to P itself. That could happen in obscure cases,
1576 and always introduced a cycle (P body must be elaborated before
1578 * lib-writ.ads: Comment clarification.
1579 * ali-util.ads: Minor comment fix.
1580 * ali.adb: Minor reformatting.
1582 2017-01-06 Tristan Gingold <gingold@adacore.com>
1584 * a-exexpr-gcc.adb: Improve comment.
1586 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
1588 * s-linux-mips.ads: Use correct signal and errno constants.
1589 (sa_handler_pos, sa_mask_pos): Fix offsets for 64-bit MIPS.
1591 2017-01-03 James Cowgill <James.Cowgill@imgtec.com>
1593 * s-linux-mips.ads: Rename from s-linux-mipsel.ads.
1594 * gcc-interface/Makefile.in (MIPS/Linux): Merge mips and mipsel
1597 2017-01-01 Eric Botcazou <ebotcazou@adacore.com>
1599 * gnatvsn.ads: Bump copyright year.
1601 2017-01-01 Jakub Jelinek <jakub@redhat.com>
1603 * gnat_ugn.texi: Bump @copying's copyright year.
1604 * gnat_rm.texi: Likewise.
1606 Copyright (C) 2017 Free Software Foundation, Inc.
1608 Copying and distribution of this file, with or without modification,
1609 are permitted in any medium without royalty provided the copyright
1610 notice and this notice are preserved.