1 2014-01-23 Tristan Gingold <gingold@adacore.com>
3 * gnat_rm.texi: Minor editing.
5 2014-01-23 Robert Dewar <dewar@adacore.com>
7 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
8 with'ed internal units.
9 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
11 2014-01-23 Javier Miranda <miranda@adacore.com>
13 * lib-xref.adb (Generate_Reference): As part of processing the
14 "end-of-spec" reference generate an extra reference to the first
15 private entity of the package.
16 * xr_tabls.adb (Add_Reference): No action needed for the extra
17 'E' reference associated; similar to the processing of the
20 2014-01-23 Bob Duff <duff@adacore.com>
22 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
24 2014-01-23 Ed Schonberg <schonberg@adacore.com>
26 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
27 predicate to implement rule given in 6.1.1 (20/3).
28 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
29 'Old in a postcondition, if it is potentially unevaluated and
30 it is not an entity name.
32 2014-01-23 Bob Duff <duff@adacore.com>
34 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
36 2014-01-23 Robert Dewar <dewar@adacore.com>
38 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
41 2014-01-23 Bob Duff <duff@adacore.com>
43 * g-dynhta.ads: Minor comment fix.
45 2014-01-23 Yannick Moy <moy@adacore.com>
47 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
48 from spec on body only when not already inherited on spec. Set
49 SPARK_Mode from context on body without previous spec. *
50 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
51 library-level entities. Correct retrieval of entity from
52 declaration, for cases where the declaration is not a unit.
53 * sem_ch12.adb (Instantiate_Object): Avoid
54 calling Is_Volatile_Object on an empty node.
56 2014-01-23 Robert Dewar <dewar@adacore.com>
58 * gnatlink.adb (Gnatlink): Check for suspicious executable file
61 2014-01-23 Robert Dewar <dewar@adacore.com>
63 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
64 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
65 style errors in instances.
66 * g-dynhta.ads (Static_HTable): Comment updates.
68 2014-01-23 Vincent Celier <celier@adacore.com>
70 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
71 to find a configuration project file when Config_File_Name is
72 No_Configuration_File.
73 * prj-conf.ads (No_Configuration_File): New constant String.
74 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
75 with Config_File_Name set to No_Configuration_File, so that
76 no existing configuration project file will be used, and the
77 configuration project will be only created in memory when
78 Add_Default_GNAT_Naming_Scheme is called.
79 * projects.texi: Minor reformatting.
81 2014-01-23 Vincent Celier <celier@adacore.com>
83 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
84 a config project file if On_Load_Config is not null.
85 * prj-pars.adb: Minor comment changes.
87 2014-01-23 Ed Schonberg <schonberg@adacore.com>
89 * lib-xref.adb (Output_References): Output progenitors of
90 synchronized tagged types, for source navigation.
92 2014-01-23 Robert Dewar <dewar@adacore.com>
94 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
95 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
96 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
98 2014-01-23 Emmanuel Briot <briot@adacore.com>
100 * prj-conf.adb (Get_Or_Create_Configuration_File): call
101 On_Load_Config later.
103 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
105 * sem_ch3.adb (Analyze_Declarations): Do not
106 generate the spec of the late primitive in ASIS mode. Add two
107 comments to explain the special cases when the expansion is
110 2014-01-23 Robert Dewar <dewar@adacore.com>
112 * sem_util.adb (Note_Possible_Modification): Fix error of
113 misbehaving for implicit dereference cases in -gnatc mode.
115 2014-01-23 Emmanuel Briot <briot@adacore.com>
117 * prj-pars.adb: Minor reformatting.
119 2014-01-22 Ed Schonberg <schonberg@adacore.com>
121 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
122 body generated for an expression function within a protected body
123 needs a set of renaming declarations if the expression function
126 2014-01-22 Ed Schonberg <schonberg@adacore.com>
128 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
129 list interface progenitor of a tagged concurrent type, for better
132 2014-01-22 Robert Dewar <dewar@adacore.com>
134 * lib.adb (In_Extended_Main_Code_Unit): Return False for
136 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
137 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
138 treatment of Slocs No_Location and Standard_Location.
139 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
140 check for entity with Standard_Location Sloc, rather than relying
141 on Lib routines to do that.
142 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
143 that a call cannot occur before a later occuring body within
146 2014-01-22 Thomas Quinot <quinot@adacore.com>
148 * rtsfind.adb: Update comment.
150 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
152 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
153 * sem_ch3.adb (Analyze_Declarations): Add local variable
154 Body_Seen. Generate the spec of a late controlled
155 primitive body that is about to freeze its related type.
156 (Handle_Late_Controlled_Primitive): New routine.
158 2014-01-22 Robert Dewar <dewar@adacore.com>
160 * a-stream.adb: Minor reformatting.
162 2014-01-22 Ed Schonberg <schonberg@adacore.com>
164 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
165 sub-procedure Declared_In_Actual to handle properly the visibility
166 of actuals in actual packages, that are themselves actuals to a
167 actual package of the current instance. This mimics properly the
168 visibility of formals of formal packages declared with a box,
169 within the corresponding generic unit.
171 2014-01-22 Robert Dewar <dewar@adacore.com>
173 * checks.adb: Do not assume that a volatile variable is valid.
175 2014-01-22 Thomas Quinot <quinot@adacore.com>
177 * g-catiio.ads (Image, Value): Clarify that these functions
178 operate in the local time zone. Minor documentation update.
180 2014-01-22 Thomas Quinot <quinot@adacore.com>
182 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
184 2014-01-22 Robert Dewar <dewar@adacore.com>
186 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
187 Moved to sem_aux.adb.
189 2014-01-22 Robert Dewar <dewar@adacore.com>
191 * vms_data.ads: Minor reformatting.
193 2014-01-22 Robert Dewar <dewar@adacore.com>
195 * debug.adb: Document messages affected by -gnatd.E including
196 the new ones that relate to late definition of equality.
197 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
198 debug flag -gnatd.E is set, then generate warnings rather than
200 (Check_Untagged_Equality): In earlier versions of Ada,
201 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
203 2014-01-22 Robert Dewar <dewar@adacore.com>
205 * sem_prag.adb (Usage_Error): Output additional messages for
206 unconstrained OUT parameters lacking an input dependency.
208 2014-01-22 Robert Dewar <dewar@adacore.com>
210 * sem_ch4.adb: Minor reformatting.
212 2014-01-22 Robert Dewar <dewar@adacore.com>
214 * restrict.ads: Minor reformatting.
215 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
216 forbids a call from within a subprogram to the same subprogram.
218 2014-01-22 Thomas Quinot <quinot@adacore.com>
220 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
221 stream attributes for Stream_Element_Array.
222 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
223 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
224 defined in the current scope.
226 2014-01-22 Robert Dewar <dewar@adacore.com>
228 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
230 2014-01-22 Thomas Quinot <quinot@adacore.com>
232 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
234 2014-01-22 Thomas Quinot <quinot@adacore.com>
236 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
237 declaration initialized with a function call, whose type
238 has variable size, need to remove side effects so that the
239 initialization expression becomes a dereference of a temporary
240 reference to the function result.
242 2014-01-22 Yannick Moy <moy@adacore.com>
244 * errout.adb (Initialize): Remove trick to add dummy entry
246 * erroutc.adb (Set_Warnings_Mode_Off,
247 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
249 * opt.ads (Warning_Mode): Document behavior
250 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
252 2014-01-22 Robert Dewar <dewar@adacore.com>
254 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
256 2014-01-22 Robert Dewar <dewar@adacore.com>
258 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
259 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
260 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
261 case Storage_Size): call Check_Pool_Size_Clash.
263 2014-01-22 Robert Dewar <dewar@adacore.com>
265 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
266 sem_eval.ads: Minor reformatting.
268 2014-01-22 Thomas Quinot <quinot@adacore.com>
270 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
271 Any_Composite to prevent cascaded errors.
273 2014-01-22 Yannick Moy <moy@adacore.com>
275 * errout.adb (Initialize): Do not insert special entry in Warnings
276 table in GNATprove_Mode.
277 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
279 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
282 2014-01-22 Robert Dewar <dewar@adacore.com>
284 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
287 2014-01-22 Robert Dewar <dewar@adacore.com>
289 * snames.ads-tmpl: Update header.
291 2014-01-22 Thomas Quinot <quinot@adacore.com>
293 * exp_util.adb (Insert_Actions): When inserting actions on a
294 short circuit operator that has already been analyzed, do not park
295 actions in node; instead introduce an N_Expression_With_Actions
296 and insert actions immediately.
297 Add guard for unexpected case of climbing up through statement
298 in Actions list of an N_Expression_With_Actions.
299 * sem_elab.adb (Insert_Elab_Check): Remove complex
300 specialized circuitry for the case where the context is already
301 analyzed, as it is not needed and introduces irregularities in
302 finalization. Instead rely on the above change to Insert_Actions
303 to ensure that late insertion on short circuit operators works
306 2014-01-22 Ed Schonberg <schonberg@adacore.com>
308 * sem_ch4.adb (Operator_Check): Improve error message when an
309 operand of concatenation is an access type.
311 2014-01-22 Thomas Quinot <quinot@adacore.com>
313 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
316 2014-01-22 Ed Schonberg <schonberg@adacore.com>
318 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
319 of an expanded name in a proper body, whose prefix is a package
320 in the context of the proper body, when there is a homonym of
321 the package declared in the parent unit.
323 2014-01-22 Robert Dewar <dewar@adacore.com>
325 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
327 (Check_One_Unit): Same change.
329 2014-01-22 Robert Dewar <dewar@adacore.com>
331 * ug_words: Add missing/wrong entries for VMS warning switches.
332 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
334 2014-01-22 Jerome Guitton <guitton@adacore.com>
336 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
339 2014-01-22 Robert Dewar <dewar@adacore.com>
341 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
343 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
345 * gcc-interface/Makefile.in: Minor fixes.
347 2014-01-21 Robert Dewar <dewar@adacore.com>
349 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
350 * par-ch5.adb (P_Condition): New version with expression prescanned.
351 * par.adb (P_Condition): New version with expression prescanned.
353 2014-01-21 Robert Dewar <dewar@adacore.com>
355 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
356 if Address is not a private type.
357 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
358 Ignore pragma if System.Address is not a private type.
360 2014-01-21 Arnaud Charlet <charlet@adacore.com>
362 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
365 2014-01-21 Thomas Quinot <quinot@adacore.com>
367 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
369 2014-01-21 Ed Schonberg <schonberg@adacore.com>
371 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
372 the value of Assertions_Enabled flag when compiling an instance of
373 an internal unit. This facilitates the use of pre/postconditions
374 in generic internal units, such as the new elementary function
377 2014-01-21 Robert Dewar <dewar@adacore.com>
379 * exp_aggr.adb: Minor reformatting.
380 * sem_attr.adb: Minor reformatting.
381 * sem_res.adb: Minor comment addition.
382 * einfo.adb: Minor comment updates.
383 * freeze.adb: Minor reformatting and code reorganization.
385 2014-01-21 Ed Schonberg <schonberg@adacore.com>
387 * par-ch4.adb (P_If_Expression): Handle more gracefully an
388 elsif clause that does not have an else part.
390 2014-01-21 Robert Dewar <dewar@adacore.com>
392 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
393 * gcc-interface/Makefile.in: clean up target pairs.
395 2014-01-21 Pascal Obry <obry@adacore.com>
397 * projects.texi: Minor typo fix.
399 2014-01-21 Thomas Quinot <quinot@adacore.com>
401 * freeze.adb (Check_Component_Storage_Order): If a record type
402 has an explicit Scalar_Storage_Order attribute definition clause,
403 reject any component that itself is of a composite type and does
406 2014-01-21 Ed Schonberg <schonberg@adacore.com>
408 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
409 can be used to generate proper cross-reference information for
410 the parent units of proper bodies.
412 2014-01-21 Thomas Quinot <quinot@adacore.com>
414 * exp_pakd.adb (Expand_Packed_Element_Set,
415 Expand_Packed_Element_Reference): No byte swapping required in
416 the front-end for the case of a reverse storage order array,
417 as this is now handled uniformly in the back-end. However we
418 still need to swap back an extracted element if it is itself a
419 nested composite with reverse storage order.
421 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
423 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
424 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
427 2014-01-21 Arnaud Charlet <charlet@adacore.com>
429 * gnat_ugn.texi: Minor updates.
431 2014-01-21 Thomas Quinot <quinot@adacore.com>
433 * exp_pakd.adb: Update comment, minor reformatting.
435 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
437 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
438 object check when SPARK_Mode is on.
439 * sem_ch6.adb (Process_Formals): Trigger the volatile object
440 check when SPARK_Mode is on.
441 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
442 check when SPARK_Mode is on.
443 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
444 corresponding pragma of aspect SPARK_Mode in the visible
445 declarations of a package declaration.
446 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
447 check when SPARK_Mode is on.
448 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
449 check when SPARK_Mode is on.
450 (Resolve_Entity_Name): Trigger
451 the volatile object check when SPARK_Mode is on.
453 2014-01-21 Robert Dewar <dewar@adacore.com>
455 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
456 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
458 2014-01-21 Ed Schonberg <schonberg@adacore.com>
460 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
461 object is declared, it is rewritten as a renaming of an dynamic
462 expression that wraps the initial value. The renaming declaration
463 is first given an internal name, to prevent collisions with the
464 entity already declared, and then the name is modified to reflect
465 the original one. the modification of the name must preserve
466 the source location of the original, to prevent spurious errors
467 when compiling with style checks if the declaration involves
468 more than one entity.
470 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
472 * aspects.adb Add entries for Async_Readers, Async_Writers,
473 Effective_Reads and Effective_Writes in table Canonical_Aspect.
474 * aspects.ads Add entries for Async_Readers, Async_Writers,
475 Effective_Reads and Effective_Writes in tables Aspect_Id,
476 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
477 * atree.adb (Ekind_In): New version with 8 parameters.
478 (Node34): New routine.
479 (Set_Node34): New routine.
480 * atree.ads (Ekind_In): New version with 8 parameters.
481 (Node34): New routine.
482 (Set_Node34): New routine.
483 * einfo.adb Contract is now Node34.
484 (Contract): Update the assertion and node usage.
485 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
486 Effective_Reads and Effective_Writes.
487 (Set_Contract): Update the assertion and node usage.
488 (Write_Field24_Name): Remove the output for a contract.
489 (Write_Field34_Name): Add output for a contract.
490 * einfo.ads Contract is now Node34. Update the comment on
491 attribute usage and related node structures.
492 (Get_Pragma): Update the comment on usage.
493 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
494 Effective_Reads and Effective_Writes do not require special
495 processing by the parser.
496 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
497 (Analyze_Declarations): Analyze the contract of a variable at
498 the end of the declarative region.
499 (Analyze_Object_Declaration): Create a contract for a variable.
500 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
501 of classification pragmas.
502 (Process_Formals): Detect an illegal
503 use of a volatile object as a formal in a function.
504 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
505 a volatile object as an actual in generic instantiation.
506 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
507 Effective_Reads and Effective_Writes in table Sig_Flags.
508 (Analyze_External_State_In_Decl_Part): New routine.
509 (Analyze_Global_Item): Detect an illegal use of a volatile object
510 as a global item of a function.
511 (Analyze_Pragma): Reimplement
512 pragma Abstract_State. Add support for pragmas Async_Readers,
513 Async_Writers, Effective_Reads and Effective_Writes.
514 (Check_External_Properties): New routine.
515 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
516 (Check_External_Properties): New routine.
517 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
518 volatile object as an actual in a call.
519 (Resolve_Entity_Name):
520 Add local variables Par, Prev and Usage_OK. Detect illegal
521 contexts of volatile objects.
522 * sem_util.adb (Add_Contract_Item): Add support for
523 pragmas associated with the contract of a variable.
524 (Async_Readers_Enabled): New routine.
525 (Async_Writers_Enabled): New routine.
526 (Effective_Reads_Enabled): New routine.
527 (Effective_Writes_Enabled): New routine.
528 (Has_Enabled_Property):
530 (Is_Unchecked_Conversion_Instance): New routine.
531 (Is_Volatile_Object): Add support for entities that may denote
533 * sem_util.ads (Add_Contract_Item): Update the
535 (Async_Readers_Enabled): New routine.
536 (Async_Writers_Enabled): New routine.
537 (Effective_Reads_Enabled): New routine.
538 (Effective_Writes_Enabled): New routine.
539 (Is_Unchecked_Conversion_Instance): New routine.
540 * sinfo.ads Update the comment on the structure of N_Contract.
541 * snames.ads-tmpl Add predefined names for Async_Readers,
542 Async_Writers, Effective_Reads and Effective_Writes. Add
543 pragma ids for Async_Readers, Async_Writers, Effective_Reads
544 and Effective_Writes.
546 2014-01-21 Robert Dewar <dewar@adacore.com>
548 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
549 * sem_eval.adb (Compile_Time_Known_Value): Remove special
550 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
551 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
552 (Test_Foldable): Add CRT_Safe parameter
553 * sem_eval.ads (Compile_Time_Known_Value): Remove special
554 handling of CRT mode.
555 (CRT_Safe_Compile_Time_Known_Value): New function.
557 2014-01-21 Robert Dewar <dewar@adacore.com>
559 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
560 with pragma or aspect that applies to package spec or subprogram
563 2014-01-21 Robert Dewar <dewar@adacore.com>
565 * exp_aggr.adb: Minor reformatting.
567 2014-01-21 Johannes Kanig <kanig@adacore.com>
569 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
571 2014-01-21 Bob Duff <duff@adacore.com>
573 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
575 2014-01-21 Steve Baird <baird@adacore.com>
577 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
579 2014-01-21 Vincent Celier <celier@adacore.com>
581 * prj-part.adb (Parse_Single_Project): Accept to extend a project
582 if it has only be imported by an project being extended. When a
583 project that has only been imported by a project being extended
584 is imported by another project that is not being extended,
585 reset the previous indication, so that it will be an error if
586 this project is extended later.
587 * prj-tree.adb (Create_Project): Include component From_Extended
589 * prj-tree.ads (Project_Name_And_Node): New Boolean component
592 2014-01-21 Robert Dewar <dewar@adacore.com>
594 * atree.ads, atree.adb: Add Node33 and Set_Node33.
595 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
596 New field (SPARK_Pragma_Inherited): New flag
597 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
599 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
600 * opt.ads (SPARK_Mode_Pragma): New global variable.
601 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
602 * sem_ch3.adb: Use new SPARK_Mode data structures.
603 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
604 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
605 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
606 (Pop_Scope): Restore SPARK_Mode_Pragma.
607 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
610 2014-01-21 Arnaud Charlet <charlet@adacore.com>
612 * back_end.adb: Undo previous change, not needed. Minor reformatting.
614 2014-01-21 Thomas Quinot <quinot@adacore.com>
616 * exp_ch5.adb: Fix comment.
617 * switch-c.adb: Minor comment update.
618 * exp_ch3.adb: Minor reformatting.
620 2014-01-21 Arnaud Charlet <charlet@adacore.com>
622 * back_end.adb (Scan_Compiler_Arguments): Do not store object
623 filename in gnatprove mode.
625 2014-01-21 Thomas Quinot <quinot@adacore.com>
627 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
628 suppresses usage of primitive _assign for tagged types).
629 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
630 No_Ctrl_Actions for a tagged type that does not require
631 finalization, as we want to disable usage of _assign (which
632 may cause undesirable discriminant checks on an uninitialized,
635 2014-01-21 Ed Schonberg <schonberg@adacore.com>
637 * sem_prag.adb: Reject invariant'class on completion.
639 2014-01-21 Javier Miranda <miranda@adacore.com>
641 * exp_ch3.adb (Build_Init_Procedure): For
642 derivations of interfaces, do not move the the initialization
643 of the _parent field since such assignment is not generated.
645 2014-01-21 Ed Schonberg <schonberg@adacore.com>
647 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
648 with the operator it renames if we are within an expression of
649 a pre/postcondition, because the expression will be reanalyzed
650 at a later point, and the analysis of the renaming may affect
651 the visibility of the operator when in an instance.
653 2014-01-21 Robert Dewar <dewar@adacore.com>
655 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
656 Add this flag to type conversion nodes and assignment nodes.
657 * treepr.adb: Deal properly with Flag 1,2,3.
658 * treeprs.adt: Minor comment update.
660 2014-01-21 Robert Dewar <dewar@adacore.com>
662 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
664 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
665 parameter, completely rewrite spec.
667 2014-01-21 Ed Schonberg <schonberg@adacore.com>
669 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
670 instance that is inlined, it may have been rewritten as a wrapper
671 package. In that case the unit that must be made visible is the
672 related instance of the package.
674 2014-01-21 Arnaud Charlet <charlet@adacore.com>
676 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
677 previous change in codepeer mode.
679 2014-01-21 Arnaud Charlet <charlet@adacore.com>
681 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
682 call to Abort_Undefer, as expected by the runtime.
683 * s-tasren.adb (Local_Complete_Rendezvous): Replace
684 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
685 deferred at this point. Update comments.
687 2014-01-21 Thomas Quinot <quinot@adacore.com>
689 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
691 2014-01-21 Arnaud Charlet <charlet@adacore.com>
693 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
696 2014-01-21 Robert Dewar <dewar@adacore.com>
698 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
700 2014-01-21 Thomas Quinot <quinot@adacore.com>
702 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
703 this is value is used in Node_Id arithmetic operations.
704 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
705 instead of hard-coded unrolled code.
707 2014-01-21 Yannick Moy <moy@adacore.com>
709 * gnat1drv.adb: Minor code cleanup, removing useless code.
711 2014-01-21 Arnaud Charlet <charlet@adacore.com>
713 * opt.ads (SPARK_Switches_File_Name): New.
714 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
715 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
716 * gnat_ugn.texi: Document -gnates.
718 2014-01-21 Yannick Moy <moy@adacore.com>
720 * errout.adb (Special_Msg_Delete): Update comment. Remove
721 special case for GNATprove which should not ignore mismatch
722 in sizes for representation clauses.
723 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
724 which should not ignore pragma Pack.
726 2014-01-21 Ed Schonberg <schonberg@adacore.com>
728 * sem_ch4.adb: Code clean up.
730 2014-01-21 Steve Baird <baird@adacore.com>
732 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
734 2014-01-21 Robert Dewar <dewar@adacore.com>
736 * gcc-interface/gigi.h: Get Flags array address.
737 * gcc-interface/trans.c: Acquire Flags array address.
738 * atree.adb: Add support for Flags array and Flag0,1,2,3.
739 * atree.ads: Add support for Flags array and Flag0,1,2,3.
740 * atree.h: Add support for Flags array and Flag0,1,2,3.
741 * back_end.adb: Pass Flags array address to gigi.
743 2014-01-21 Ed Schonberg <schonberg@adacore.com>
745 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
746 reference to generated body so that legality checks on stream
747 attributes are properly applied. If type is tagged and already
748 frozen, insert generated body at the point of the renaming
751 2014-01-21 Ed Schonberg <schonberg@adacore.com>
753 * sem_ch12.adb: Code clean up.
754 * sem_ch8.adb: Minor reformatting
756 2014-01-20 Robert Dewar <dewar@adacore.com>
758 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
759 converting warnings on inevitable exceptions to errors.
760 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
761 converting warnings on inevitable exceptions to errors.
762 * opt.adb (SPARK_Mode_Config): Handled like other config flags
763 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
764 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
765 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
766 New flag (Config_Switches_Type): Add SPARK_Mode field
767 * sem.adb: Minor code reorganization (remove unnecessary with)
768 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
769 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
770 converting warnings on inevitable exceptions to errors.
771 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
772 converting warnings on inevitable exceptions to errors.
773 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
774 converting warnings on inevitable exceptions to errors.
775 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
776 converting warnings on inevitable exceptions to errors.
777 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
779 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
781 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
783 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
784 converting warnings on inevitable exceptions to errors.
785 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
786 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
788 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
789 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
790 converting warnings on inevitable exceptions to errors.
791 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
792 converting warnings on inevitable exceptions to errors.
793 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
796 2014-01-20 Ed Schonberg <schonberg@adacore.com>
798 * sem_ch13.adb: Add semantic information to rewritten type
801 2014-01-20 Ed Schonberg <schonberg@adacore.com>
803 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
804 are of a type with unknown discriminants, convert both to the
805 underlying view of the type, so that the proper constraint check
806 can be applied to the right-hand side.
808 2014-01-20 Robert Dewar <dewar@adacore.com>
810 * atree.adb (Copy_Node): Fix failure to copy last component
811 (Exchange_Entities): Fix failure to exchange last entity
813 2014-01-20 Ed Schonberg <schonberg@adacore.com>
815 * sem_ch12.adb: Code clean up.
817 2014-01-20 Robert Dewar <dewar@adacore.com>
819 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
821 2014-01-20 Ed Schonberg <schonberg@adacore.com>
823 * sem_ch4.adb (Analyze_Quantified_Expression): If after
824 pre-analysis the loop parameter specification has been
825 rewritten as a iterator specification, propagate the change to
826 the quantified expression, for ASIS navigtion needs.
828 2014-01-20 Vincent Celier <celier@adacore.com>
830 * par-ch10.adb: Minor error message change: escape [ and ].
832 2014-01-20 Robert Dewar <dewar@adacore.com>
834 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
835 * errout.adb: Implement [ and ] insertion characters.
836 * errout.ads: Document new [ and ] insertion characters.
837 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
838 addition of ??? comment.
839 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
840 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
841 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
842 Make warnings on exceptions into errors in GNATprove mode.
843 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
846 2014-01-20 Ed Schonberg <schonberg@adacore.com>
848 * sem_ch13.adb: Code clean up.
850 2014-01-20 Robert Dewar <dewar@adacore.com>
852 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
854 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
855 error in GNATprove mode.
857 2014-01-20 Ed Schonberg <schonberg@adacore.com>
859 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
860 reference 'Old takes no parameters, and thus can appear as a
863 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
865 * exp_aggr.adb: Fix minor typos.
867 2014-01-20 Ed Schonberg <schonberg@adacore.com>
869 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
870 instance the attribute is legal, and its value is determined
871 statically if the type has no discriminants. This choice is
872 more useful than rechecking the legality rule in the instance,
873 is consistent with older usage, and is also consistent with all
876 2014-01-20 Arnaud Charlet <charlet@adacore.com>
878 * sem_cat.adb (Validate_Static_Object_Name): Change error into
879 warning in Relaxed_Semantic_Mode.
881 2014-01-20 Ed Schonberg <schonberg@adacore.com>
883 * sem_attr.adb: Code and comments cleanup.
885 2014-01-20 Yannick Moy <moy@adacore.com>
887 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
888 * errout.adb (Compilation_Errors): Remove special handling in
890 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
892 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
893 Global, Initial_Condition, Initializes and Refined_State pragmas and
895 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
896 SPARK_Strict_Mode): Remove global flags.
897 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
898 always performed now, on packages declaring a null state.
899 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
900 at providing pedantic mode for bounds of integer types.
901 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
902 "some" quantified expression now issued under control of -gnatw.t,
903 like the other warning on unused bound variable.
904 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
906 (Analyze_Pragma): Remove tests for SPARK 2014
907 pragmas, not officially allowed by GNAT.
909 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
911 * sem_prag.adb (Analyze_Pragma): Ensure that
912 the sole argument of pragmas Abstract_State, Contract_Cases,
913 Depends, Global and Initializes in in aggregate form.
914 (Analyze_Refined_Pragma): Ensure that the sole argument of
915 pragmas Refined_Depends, Refined_Global and Refined_State is in
917 (Ensure_Aggregate_Form): New routine.
919 2014-01-20 Doug Rupp <rupp@adacore.com>
921 * sem_attr.adb (Analyze_Attribute): case
922 Attribute_Constrained => treat all prefixes as legal for Declib
925 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
927 * sem_prag.adb (Check_Mode): Reimplement the routine.
928 (Find_Mode): New routine.
930 2014-01-20 Robert Dewar <dewar@adacore.com>
932 * sem_ch4.adb (Operator_Check): Handle additional
933 Allow_Integer_Address cases.
935 2014-01-20 Robert Dewar <dewar@adacore.com>
937 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
938 allowed if address is non-private, no longer true.
939 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
940 Remove check for address being private, causes difficulty when
941 pragma used in gnat.adc file and is not needed, since we guard
942 this in Address_Integer_Convert_OK.
943 * exp_ch7.adb: Minor reformatting.
944 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
946 2014-01-20 Robert Dewar <dewar@adacore.com>
948 * checks.adb (Apply_Range_Check): Remove gnatprove special
949 casing of exponentiation.
950 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
951 operand for integer case to check range against Natural.
953 2014-01-20 Robert Dewar <dewar@adacore.com>
955 * s-tataat.adb: Minor reformatting.
957 2014-01-20 Robert Dewar <dewar@adacore.com>
959 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
960 entities, and also fix documentation to remove mention of visible
961 integer type, since this is not what the implementation does.
962 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
963 entities, and also fix documentation to remove mention of visible
964 integer type, since this is not what the implementation does.
965 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
967 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
968 case for parameter type check.
969 * sem_res.adb (Resolve): Use new function
970 Address_Integer_Convert_OK.
971 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
972 reformatting throughout.
973 * sem_util.adb (Address_Integer_Convert_OK): New function.
974 * sem_util.ads: Minor reformatting (put specs in alpha order)
975 (Address_Integer_Convert_OK): New function.
977 2014-01-20 Thomas Quinot <quinot@adacore.com>
979 * exp_ch7.adb (Wrap_Transient_Expression):
980 Insertion extra conditional expression only if
981 Opt.Suppress_Control_Flow_Optimizations is set.
983 2014-01-20 Arnaud Charlet <charlet@adacore.com>
985 * s-tataat.adb (Initialize_Attributes): Abort might already be
986 deferred in Create_Task.
988 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
990 * checks.adb (Apply_Scalar_Range_Check): Flag
991 the exponent as requiring a range check when the expression is
994 2014-01-20 Fedor Rybin <frybin@adacore.com>
996 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
998 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1000 * sem_util.adb (Default_Initialization): New routine.
1001 * sem_util.ads: Add new type Default_Initialization_Kind.
1002 (Default_Initialization): New routine.
1004 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1006 * sem_prag.adb (Check_Mode): Correct all error
1007 message logic dealing with in/in out parameters that may appear
1008 as inputs or have a self reference.
1010 2014-01-20 Robert Dewar <dewar@adacore.com>
1012 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
1013 * sem_res.adb (Resolve): Fix error causing infinite loop for
1014 integer used as address. Allow addresses as integers.
1016 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1018 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
1020 2014-01-20 Bob Duff <duff@adacore.com>
1022 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
1023 error when "use all" is not followed by "type".
1025 2014-01-20 Bob Duff <duff@adacore.com>
1027 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
1030 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1032 * checks.adb (Apply_Address_Clause_Check): If there is an
1033 alignment check on the expression in an address clause, and there
1034 is no local exception propagation, add an additional explanatory
1035 message to clarify the cause of previous warning.
1037 2014-01-20 Robert Dewar <dewar@adacore.com>
1039 * exp_ch7.adb: Minor reformatting.
1040 * opt.ads: Minor comment updates.
1041 * sem.adb: Minor name change Is_Main_Unit =>
1042 Is_Main_Unit_Or_Main_Unit_Spec.
1043 * sem_ch6.adb: Minor reformatting and code reorganization.
1045 2014-01-20 Bob Duff <duff@adacore.com>
1047 * gnat_ugn.texi: Update gnatpp switches.
1049 2014-01-20 Thomas Quinot <quinot@adacore.com>
1051 * exp_ch9.adb: Minor comment edit.
1053 2014-01-20 Robert Dewar <dewar@adacore.com>
1055 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
1056 only if System.Address is a private type.
1057 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
1058 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
1059 Allowed only if type System.Address is private, since otherwise
1061 * sem_res.adb: Fix failure to properly Analyze unchecked
1062 conversions that were introduced by Allow_Integer_Address.
1063 * switch-c.adb: Remove -gnates switch.
1064 * usage.adb: Remove -gnates switch.
1065 * gnat_ugn.texi: Remove documentation of -gnates flag.
1067 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1069 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
1070 resolve expression to perform proper name capture.
1072 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1074 * sem.adb (Semantics): When saving/restoring configuration
1075 switches, the spec of a pre- defined unit that is the main unit
1076 must be treated as a predefined unit as well.
1078 2014-01-20 Thomas Quinot <quinot@adacore.com>
1080 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
1081 expression, insert an extra conditional expression when saving
1082 the value of the expression, for the benefit of control flow
1083 graph based coverage analysis.
1084 * exp_ch3.adb: Minor reformatting.
1086 2014-01-20 Robert Dewar <dewar@adacore.com>
1088 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
1089 * gnat_rm.texi: Document pragma Allow_Integer_Address.
1090 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
1091 * opt.ads: New flag Allow_Integer_Address.
1092 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
1093 * sem_ch5.adb: Minor reformatting.
1094 * sem_prag.adb: Implement pragma Allow_Integer_Address.
1095 * sem_res.adb (Resolve): Allow integer address value if
1097 * sem_util.adb: Minor reformatting.
1098 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
1099 * switch-c.adb: Recognize flag -gnates.
1100 * usage.adb: Document flag -gnates.
1102 2014-01-20 Thomas Quinot <quinot@adacore.com>
1104 * s-tadeca.adb: Fix minor typos in comment.
1106 2014-01-20 Pascal Obry <obry@adacore.com>
1108 * s-win32.ads (FreeLibrary): New import.
1110 2014-01-20 Robert Dewar <dewar@adacore.com>
1112 * sem_res.adb, sem_cat.adb: Minor reformatting.
1113 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
1114 assigning to OUT parameters for the current subprogram scope.
1115 * exp_ch4.adb: Minor reformatting.
1117 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1119 * exp_ch4.adb (Process_Transient_Object,
1120 Find_Enclosing_Contexts): If the top-level if-expression that
1121 generated the transient object is an actual in a call, the proper
1122 Hook_Context is a construct enclosing the call.
1123 * einfo.ads: Indicate that Related_Expression is used to link a
1124 loop variable to the container expression over which the loop
1126 (Analyze_Iterator_Specification): Set the Related_Expression of
1127 the loop variable in a container element iterator.
1128 (Note_Possible_Modification): If the variable is the loop
1129 variable in a container element iterator, indicate that the
1130 enclosing container is also modified.
1132 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1134 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
1136 2014-01-20 Robert Dewar <dewar@adacore.com>
1138 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
1139 Minor reformatting and code clean up.
1141 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1143 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
1144 of objects of private type if Relaxed_RM_Semantics.
1146 2014-01-20 Claire Dross <dross@adacore.com>
1148 * a-cofove.ads (Vector): Capacity discriminant
1149 should be in range of the index.
1151 2014-01-20 Thomas Quinot <quinot@adacore.com>
1153 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
1154 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
1155 possible difference between epoch of Ada.Calendar clock and Ada
1156 real-time/tasking clock.
1157 * s-taprop-posix.adb: Minor comment fix.
1159 2014-01-20 Doug Rupp <rupp@adacore.com>
1161 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
1163 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1165 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
1166 checks on the prefix of attribute 'Old.
1167 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
1168 generation of validity checks on a range that belongs to the
1169 iteration scheme of a quantified expression.
1170 * sem_ch5.adb (One_Bound): Suppress the generation of validity
1171 checks on a bound that belongs to the iteration scheme of a
1172 quantified expression, generate the check in all other cases.
1174 2014-01-20 Bob Duff <duff@adacore.com>
1176 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
1178 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1180 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
1181 interpretations that do not come from other predefined units,
1182 to prevent spurious ambiguities in the presence of user-defined
1183 operators in the context of (an instance of) a predefined unit.
1185 2014-01-20 Robert Dewar <dewar@adacore.com>
1187 * gnat_rm.texi: Document that Loop_Variant is included in
1188 Statement_Assertions.
1189 * sem_prag.adb (Check_Kind): Add Loop_Variant to
1190 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
1191 to Statement_Assertions.
1193 2014-01-20 Doug Rupp <rupp@adacore.com>
1195 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
1196 for errno ENOENT from RTP on NFS mounted file system.
1198 2014-01-20 Ed Schonberg <schonberg@adacore.com>
1200 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
1201 examine code that does not come from source. The check does not
1202 apply to code generated for constraint checks, and such code may
1203 generate spurious error messages when compiled with expansion
1204 disabled (as in a generic unit) because side effects may not
1206 2) Make error messages more explicit: indicate the component
1207 of the construct whose value is indeterminate because of a
1208 call to a function with in-out parameter in another component,
1209 when there is no mandated order of execution between the two
1210 components (actuals, aggregate components, alternatives).
1212 2014-01-20 Robert Dewar <dewar@adacore.com>
1214 * gnat_rm.texi: Minor cleanup.
1216 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1218 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
1219 can now apply to a refined postcondition.
1220 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
1221 variable Result_Seen. Add variables Case_Prag, Post_Prag,
1222 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
1223 whether postconditions and/or constract-cases mention attribute
1224 'Result and introduce a post-state when applied to functions.
1225 (Check_Result_And_Post_State): Removed.
1226 * sem_prag.adb (Analyze_Pragma): Add local variable
1227 Result_Seen. Verify that the expression of pragma Refined_Post
1228 mentions attribute 'Result and introduces a post-state.
1229 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
1231 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1233 * exp_ch7.adb (Is_Subprogram_Call): New routine.
1234 (Process_Transient_Objects): Make variable Must_Hook global with
1235 respect to all locally declared subprograms. Search the context
1236 for at least one subprogram call.
1237 (Requires_Hooking): Removed.
1239 2014-01-20 Claire Dross <dross@adacore.com>
1241 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
1242 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
1243 External_Axiomatization);
1245 2014-01-20 Robert Dewar <dewar@adacore.com>
1247 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
1248 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
1249 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
1250 Allow Loop_Entry to be used in these pragmas if they appear in
1251 an appropriate context.
1252 (Placement_Error): Specialize error
1253 message for pragma Assert[_And_Cut] or pragma Assume containing
1254 Loop_Entry attribute.
1255 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
1256 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
1259 2014-01-20 Robert Dewar <dewar@adacore.com>
1261 * gnat1drv.adb: Minor comment update.
1263 2014-01-20 Tristan Gingold <gingold@adacore.com>
1265 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
1266 variables, comment out unused code.
1267 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
1268 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
1269 * s-excmac-arm.ads: New file.
1271 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1273 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
1274 Drange and Index_Typ. Remove the circuitry which creates a
1275 range check to compare the index type of the array against the
1277 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
1278 the circuitry which creates a range check to handle a
1279 discrete_range denoted by a subtype indication.
1281 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
1283 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
1284 nodes to get the original sloc range.
1286 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1288 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
1289 entity of a [library level] package.
1291 2014-01-20 Tristan Gingold <gingold@adacore.com>
1293 * raise-gcc.c (exception_class_eq): New function.
1294 (is_handled_by): Use it to compare exception classes.
1295 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
1296 be called to return URC_CONTINUE_UNWIND.
1297 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
1298 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
1300 2014-01-20 Robert Dewar <dewar@adacore.com>
1302 * opt.ads: Minor comment update.
1304 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1306 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
1307 constants to the "Local variables" area. Add new constant D. Add
1308 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
1309 to Pref_Typ and update all occurrences. Add circuitry to extract
1310 the discrete_range and the index type and build a range check.
1312 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1314 * gnat1drv.adb (Adjust_Global_Switches): Enable
1315 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
1318 2014-01-20 Thomas Quinot <quinot@adacore.com>
1320 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
1322 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1324 * sem_ch13.adb (Analyze_Aspect_Specifications):
1325 When aspect SPARK_Mode appears on a package body, insert the
1326 generated pragma at the top of the body declarations.
1328 2014-01-20 Robert Dewar <dewar@adacore.com>
1330 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
1331 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
1332 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
1333 sem_ch8.adb, exp_dist.adb: Minor reformatting.
1335 2014-01-20 Yannick Moy <moy@adacore.com>
1337 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
1340 2014-01-20 Pascal Obry <obry@adacore.com>
1342 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
1344 * g-arrspl.adb: Adapt all routine to this new implementation.
1345 (Set): Copy the Slice_Set definition before reusing it.
1347 2014-01-20 Arnaud Charlet <charlet@adacore.com>
1349 * sem_prag.adb (Process_Import_Or_Interface): In
1350 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
1351 (Analyze_Pragma): Ditto for pragma Export.
1352 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
1355 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1357 * einfo.ads: E_Abstract_State is now part of the entities that
1358 can be overloaded. Update type Overloadable_Kind to reflect the
1359 inclusion of abstract states.
1360 * sem_ch6.adb (New_Overloaded_Entity): A function can now
1361 overload an abstract state.
1362 * sem_prag.adb (Analyze_Constituent): Handle the overloading
1363 of states by functions. Use Entity_Of to obtain the entity of
1364 a constituent. (Analyze_Global_Item): Handle the overloading of
1365 states by functions.
1366 (Analyze_Initialization_Item): Handle the
1367 overloading of states by functions. Use Entity_Of to obtain the
1369 (Analyze_Input_Item): Handle the overloading
1370 of states by functions. Use Entity_Of to obtain the entity of an item.
1371 (Analyze_Input_Output): Handle the overloading of states by functions.
1372 (Analyze_Refinement_Clause): Handle the overloading
1373 of states by functions. Use Entity_Of to obtain the entity of an item.
1374 (Appears_In): Use Entity_Of to obtain the entity of an element.
1375 (Check_Usage): Use Entity_Of to obtain the entity of
1376 an item. Add a guard to prevent a crash due to a previous error.
1377 (Resolve_State): New routine.
1379 2014-01-20 Yannick Moy <moy@adacore.com>
1381 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
1382 opt.ads: Minor comments updates.
1384 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
1386 * einfo.adb (Non_Limited_View): Applies to abstract states.
1387 (Set_From_Limited_With): Applies to abstract states.
1388 (Set_Non_Limited_View): Applies to abstract states.
1389 (Write_Field17): Output the non-limited view of an abstract state.
1390 * einfo.ads: Update the comment on usage and occurrences in
1391 nodes for attributes From_Limited_With and Non_Limited_View.
1392 * sem_aux.adb (Available_View): This routine can now handle
1394 * sem_aux.ads (Available_View): This routine can now handle
1395 abstract states. Update the comment on usage.
1396 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
1397 of states and variables.
1398 (In_Pragmas_Depends_Or_Global): New routine.
1399 * sem_ch10.adb (Build_Limited_Views): Implement
1400 abstract (limited) views of variables and states.
1401 (Build_Shadow_Entity): This routine is now a procedure. Add
1402 formal parameter Shadow. Update the comment on usage. Add
1403 context-specific decoration for states and variables.
1404 (Decorate_State): New routine. (Decorate_Variable): New routine.
1405 (Find_And_Process_States): New routine.
1406 (Process_Declarations): Renamed to Process_Declarations_And_States.
1407 (Process_Declarations_And_States): Add formal parameters
1408 Pack and Create_Abstract_Views. Update the comment on usage.
1409 (Process_States): New routine.
1410 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
1411 views of states and variables. Match the abstract view of a state
1412 against its corresponding non-abstract view.
1413 (Is_Matching_Input):
1414 Handle abstract views of states and variables. Match the abstract
1415 view of a state against its corresponding non-abstract view.
1416 (Process_Global_Item): Handle abstract views of states and
1419 2014-01-20 Bob Duff <duff@adacore.com>
1421 * sem_ch10.adb (Expand_With_Clause): Don't
1422 recurse on the prefix if the current with-ed name refers to a
1423 package that renames its own parent, eg "package P.Q renames P;".
1425 2014-01-20 Yannick Moy <moy@adacore.com>
1427 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
1428 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
1429 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
1430 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
1431 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
1434 2014-01-20 Yannick Moy <moy@adacore.com>
1436 * sinfo.ads Update documentation of GNATprove mode.
1438 2014-01-20 Yannick Moy <moy@adacore.com>
1440 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
1441 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
1442 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
1443 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
1445 * sem_ch13.adb: Remove blank.
1446 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
1447 subprograms by alias for renamings, not for inherited primitive
1449 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
1451 (Remove_Side_Effects): Apply the removal in
1452 GNATprove mode, for the full analysis of expressions.
1453 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
1455 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
1456 save/restore actions for Expander_Active flag in GNATprove mode,
1457 similar to what is done in ASIS mode.
1458 * frontend.adb (Frontend): Generic bodies are instantiated in
1460 * gnat1drv.adb (Adjust_Global_Switches): Set operating
1461 mode to Check_Semantics in GNATprove mode, although a light
1462 expansion is still performed.
1463 (Gnat1drv): Set Back_End_Mode to
1464 Declarations_Only in GNATprove mode, and later on special case
1465 the GNATprove mode to continue analysis anyway.
1466 * lib-writ.adb (Write_ALI): Always generate ALI files in
1468 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
1470 (SPARK_Mode): Renamed as GNATprove_Mode.
1471 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
1472 tree in GNATprove_Mode.
1473 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
1474 body in GNATprove mode.
1475 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
1477 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
1478 Make sure side effects are removed in GNATprove mode.
1480 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1482 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
1483 for aliased objects with an unconstrained nominal subtype.
1484 * gcc-interface/trans.c (Call_to_gnu): Likewise.
1485 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
1486 <case N_Op_Minus>: Remove useless code.
1487 (Exception_Handler_to_gnu_zcx): Minor tweaks.
1489 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1491 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
1492 Tidy up. For a subtype with discriminants and variant part, if a
1493 variant is statically selected and the fields all have a constant
1494 position, put them in order of increasing position. Likewise if
1495 no variant part but representation clause is present.
1496 * gcc-interface/utils.c (make_packable_type): Robustify.
1497 (maybe_pad_type): Use local variable and tidy up condition. If no
1498 alignment is specified, use the original one.
1499 (create_type_stub_decl): Minor tweak.
1500 (convert) <case VECTOR_CST>: Fix typo.
1501 <case CONSTRUCTOR>: Deal with padding types around the same type.
1502 Do not punt on missing fields.
1503 (unchecked_convert): Call finish_record_type to lay out the special
1504 record types made for conversions from/to problematic integer types.
1505 Bump the alignment of CONSTRUCTORs before converting them to a more
1508 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
1510 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
1511 obsolete code for type_annotate_only mode, simplify code and slightly
1512 improve wording of comments.
1514 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
1517 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
1518 as intermediate type.
1519 (UI_To_gnu): Likewise.
1521 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
1523 * gnatvsn.ads (Current_Year): Bump to 2014.
1525 2014-01-02 Tobias Burnus <burnus@net-b.de>
1527 * gnat_ugn.texi: Bump @copying's copyright year.
1529 Copyright (C) 2014 Free Software Foundation, Inc.
1531 Copying and distribution of this file, with or without modification,
1532 are permitted in any medium without royalty provided the copyright
1533 notice and this notice are preserved.