1 2014-06-13 Yannick Moy <moy@adacore.com>
3 * sem_warn.adb (Check_Unset_References): Take
4 case of Refined_Post into account in Within_Postcondition check.
6 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
11 2014-06-13 Yannick Moy <moy@adacore.com>
13 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
14 Aspect_Export): Consider that variables may be set outside the program.
16 2014-06-13 Robert Dewar <dewar@adacore.com>
18 * back_end.adb (Make_Id): New function.
19 (Make_SC): New function.
20 (Set_RND): New procedure.
21 * back_end.ads (Make_Id): New function.
22 (Make_SC): New function.
23 (Set_RND): New procedure.
24 * einfo.ads: Minor comment updates.
25 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
26 * gnat1drv.adb (Gnat1drv): New calling sequence for
27 Get_Target_Parameters.
28 (Gnat1drv): Move Atree.Initialize here from Frontend.
29 * targparm.adb (Get_Target_Parameters): New calling
30 sequence (Get_Target_Parameters): Handle pragma Restriction
32 * targparm.ads (Get_Target_Parameters): New calling sequence.
34 2014-06-13 Gary Dismukes <dismukes@adacore.com>
36 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
37 loop if the pragma does not come from source, so that an implicit
38 pragma Import only applies to the first declaration, avoiding
39 possible conflicts with earlier explicit and implicit declarations
40 due to multiple Provide_Shift_Operators pragmas.
41 (Set_Imported): Remove previous fix that bypassed pragma duplication
43 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
44 of Provide_Shift_Operators.
46 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
48 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
49 string pointer directly to set_decl_section_name.
51 2014-06-11 Robert Dewar <dewar@adacore.com>
53 * sem_ch13.adb: Minor reformatting.
55 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
57 * sem_prag.adb (Check_Clause_Syntax): Add new
58 local variable Outputs. Account for the case where multiple
59 output items appear as an aggregate.
61 2014-06-11 Robert Dewar <dewar@adacore.com>
63 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
66 2014-06-11 Ed Schonberg <schonberg@adacore.com>
68 * einfo.ads: Minor reformatting.
70 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
72 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
73 new variable First_Node. Update the position after all insertions have
74 taken place to First_Node.
76 2014-06-11 Robert Dewar <dewar@adacore.com>
78 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
79 * layout.adb (Layout_Type): Remove test of -gnatd.1.
81 2014-06-11 Robert Dewar <dewar@adacore.com>
83 * sem_ch13.adb: Minor reformatting.
85 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
87 * sem_prag.adb (Check_Clause_Syntax): Add new
88 local variable Outputs. Account for the case where multiple
89 output items appear as an aggregate.
91 2014-06-11 Robert Dewar <dewar@adacore.com>
93 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
96 2014-06-11 Ed Schonberg <schonberg@adacore.com>
98 * einfo.ads: Minor reformatting.
100 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
102 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
103 new variable First_Node. Update the position after all insertions have
104 taken place to First_Node.
106 2014-06-11 Robert Dewar <dewar@adacore.com>
108 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
109 * layout.adb (Layout_Type): Remove test of -gnatd.1.
111 2014-06-11 Thomas Quinot <quinot@adacore.com>
113 * freeze.ads: Minor reformatting.
114 * checks.adb (Determine_Range): Do not attempt to determine
115 the range of a deferred constant whose full view has not been
117 * sem_res.adb (Resolve): Remove undesirable guard against
118 resolving expressions from expression functions.
120 2014-06-11 Robert Dewar <dewar@adacore.com>
122 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
124 * layout.adb (Layout_Type): Make anonymous access types for
125 subprogram formal types and return types always thin. For now
126 only enabled if -gnatd.1 set.
128 2014-06-11 Ed Schonberg <schonberg@adacore.com>
130 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
131 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
132 subprogram must be a null procedure.
134 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
136 * sem_prag.adb (Analyze_Input_Item): Allow formal
137 parameters to appear as input_items in an initialization_list
138 of pragma Initializes. Encapsulation now applies to states and
139 variables only (as it should). Add RM references to key errors.
140 * sem_prag.adb (Set_Imported): Suppress errors
141 about preceding Imports when the pragma does not come from source,
142 which can happen through use of pragma Provide_Shift_Operators.
144 2014-06-11 Thomas Quinot <quinot@adacore.com>
146 * sem_ch3.adb: Minor reformatting.
147 * einfo.ads (Full_View): Minor comment update.
149 2014-06-11 Robert Dewar <dewar@adacore.com>
151 * einfo.adb (Is_Independent): New flag.
152 * einfo.ads (Is_Independent): New flag.
153 (Has_Independent_Components): Clean up and fix comments.
154 * sem_prag.adb (Fix_Error): Deal with changing argument
155 [of] to entity [for].
156 (Analyze_Pragma, case Independent): Set Is_Independent flag
157 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
158 in all components of specified record.
160 2014-06-11 Thomas Quinot <quinot@adacore.com>
162 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
163 Set proper Etype on bounds of dummy type created for analysis
166 2014-06-11 Robert Dewar <dewar@adacore.com>
168 * debug.adb: Minor comment fix (add missing section of dot
171 2014-06-11 Robert Dewar <dewar@adacore.com>
173 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
174 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
175 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
176 * errout.adb (Output_Messages): Avoid duplicate output for
177 library level instance.
178 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
179 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
180 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
181 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
182 accomodate largest modulus value.
183 * gnat_ugn.texi: Minor updates.
185 2014-06-11 Ed Schonberg <schonberg@adacore.com>
187 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
188 load body of generic package or its parent, if body is optional
189 and the unit does not require a body.
191 2014-06-11 Robert Dewar <dewar@adacore.com>
193 * gnat_rm.texi: Document System.Unsigned_Types.
194 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
195 * s-unstyp.ads: Update comments (this is now user available unit).
197 2014-06-11 Robert Dewar <dewar@adacore.com>
199 * make.adb, sem_res.adb: Minor reformatting.
201 2014-06-11 Thomas Quinot <quinot@adacore.com>
203 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
204 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
205 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
206 Preelaborate_05 to just Preelaborate in runtime units, and similarly
207 change Pure_05 to just Pure.
209 2014-06-11 Ed Schonberg <schonberg@adacore.com>
211 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
212 analysis if error has been posted on subprogram body.
214 2014-06-11 Ed Schonberg <schonberg@adacore.com>
216 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
217 rule given in RM 13.1 (8/1) for operational attributes to stream
218 attributes: the attribute must apply to a first subtype. Fixes
219 missing errors in ACATS test bdd2004.
221 2014-06-11 Robert Dewar <dewar@adacore.com>
223 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
224 record type if restriction No_Implicit_Conditionals is active.
225 (Expand_N_Object_Declaration): Don't allow default initialization
226 for variant record type if restriction No_Implicit_Condition is active.
227 (Build_Variant_Record_Equality): Don't build for variant
228 record type if restriction No_Implicit_Conditionals is active.
229 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
230 No_Implicit_Conditionals.
231 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
233 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
235 * i-cstrin.ads: Update comments.
237 2014-06-11 Ed Schonberg <schonberg@adacore.com>
239 * sem_res.adb (Resolve_Selected_Component): Handle properly a
240 selected component whose prefix is overloaded, when none of the
241 interpretations matches the expected type.
243 2014-06-11 Bob Duff <duff@adacore.com>
245 * make.adb (Wait_For_Available_Slot): Give a more
246 informative error message; if the ALI file is not found, print
247 the full path of what it's looking for.
249 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
251 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
252 option to specify the result file encoding.
254 2014-06-11 Robert Dewar <dewar@adacore.com>
256 * errout.ads, sem_ch12.adb: Minor reformatting.
257 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
258 * lib-xref.adb: Minor reformatting.
259 * restrict.adb: Minor code reorganization (put routines in
262 2014-06-11 Yannick Moy <moy@adacore.com>
264 * einfo.ads: Minor typo in comment
266 2014-06-11 Ed Schonberg <schonberg@adacore.com>
268 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
269 formal private types and private type extensions, to indicate
270 variable in a generic unit whose uninitialized use suggest that
271 actual type should be fully initialized.
272 Needs_Initialized_Actual: removed, functionaity replaced by
274 * lib-xref.adb (Generate_Reference): Generate a reference for
275 variables of a formal type when the unit is not the main unit,
276 to enable appropriate warnings in an instance.
277 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
278 of variable in a generic unit that suggests that actual type
279 should be full initialized.
280 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
281 and do not emot warning, which now only appears in an instance.
283 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
285 * gnat_ugn.texi: Fix minor typo.
287 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
289 * sem_ch3.adb Add with and use clause for Sem_Ch10.
290 (Analyze_Declarations): Code reformatting. Analyze the contract
291 of a subprogram body stub at the end of the declarative region.
292 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
293 now a variable. Do not process the body if its contract is not
294 available. Account for subprogram body stubs when extracting
295 the corresponding spec.
296 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
298 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
300 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
301 Account for subprogram body stubs when extracting the
303 (Analyze_Global_In_Decl_List):
304 Account for subprogram body stubs when extracting the
306 (Analyze_Refined_Depends_In_Decl_Part):
307 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
308 of the related body. Spec_Is now a variable. Account for
309 subprogram body stubs when extracting the corresponding spec.
310 (Analyze_Refined_Global_In_Decl_Part): Use
311 Find_Related_Subprogram_Or_Body to retrieve the declaration
312 of the related body. Spec_Is now a variable. Account for
313 subprogram body stubs when extracting the corresponding spec.
314 (Collect_Subprogram_Inputs_Output): Account for subprogram body
315 stubs when extracting the corresponding spec.
317 2014-06-11 Vincent Celier <celier@adacore.com>
319 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
322 2014-06-11 Robert Dewar <dewar@adacore.com>
324 * debug.adb: Add debug flag -gnatd.q.
325 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
327 * styleg.adb (Check_Xtra_Parens): Message should be a style
329 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
330 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
331 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
332 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
334 2014-06-11 Ben Brosgol <brosgol@adacore.com>
336 * gnat_rm.texi: Revised chapter on Implementation Defined
339 2014-06-11 Geert Bosch <bosch@adacore.com>
341 * s-exctab.adb: avoid race conditions in exception registration.
343 2014-06-11 Robert Dewar <dewar@adacore.com>
345 * errout.adb (Warn_Insertion): New function.
346 (Error_Msg): Use Warn_Insertion and Prescan_Message.
347 (Error_Msg_Internal): Set Info field of error object.
348 (Error_Msg_NEL): Use Prescan_Message.
349 (Set_Msg_Text): Don't store info: at start of message.
350 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
351 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
352 * errout.ads: Document new ?$? and >$> insertion sequences
353 Document use of "(style)" and "info: "
354 * erroutc.adb (dmsg): Print several missing fields
355 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
356 Deal with new tagging of info messages
357 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
358 Add field Info (Prescan_Message): New procedure, this procedure
359 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
360 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
361 sem_elab.adb: Follow new rules for info message (info belongs
362 only at the start of a message, and only in the first message,
363 not in any of the continuations).
364 * gnat_ugn.texi: Document full set of warning tags.
366 2014-06-11 Gary Dismukes <dismukes@adacore.com>
368 * sem_util.adb: Minor typo fix.
370 2014-06-11 Ed Schonberg <schonberg@adacore.com>
372 * sem_warn.adb (Check_References): Do not emit spurious warnings
373 on uninitialzed variable of a formal private type if variable
376 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
378 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
379 set_decl_section_name accessor.
381 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
383 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
384 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
385 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
387 2014-05-21 Robert Dewar <dewar@adacore.com>
389 * layout.adb: Minor reformatting.
390 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
393 2014-05-21 Robert Dewar <dewar@adacore.com>
395 * restrict.ads (Implementation_Restriction): Add entry for
397 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
398 Ada.[Wide_[Wide_]Text_IO.
399 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
400 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
401 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
402 Wide_Wide_Value if restriction No_Fixed_IO is set.
403 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
405 2014-05-21 Robert Dewar <dewar@adacore.com>
407 * gnatcmd.adb: Minor error msg changes (no upper case letter
409 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
412 2014-05-21 Robert Dewar <dewar@adacore.com>
414 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
416 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
419 2014-05-21 Thomas Quinot <quinot@adacore.com>
421 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
422 more accurately describe that this subprogram needs to come into
423 play also in cases where no byte swapping is involved, because
424 it also takes care of some required shifts (left-justification
427 2014-05-21 Thomas Quinot <quinot@adacore.com>
429 * freeze.adb (Check_Component_Storage_Order): Indicate whether
430 a Scalar_Storage_Order attribute definition is present for the
432 (Freeze_Record_Type): Suppress junk warnings
433 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
436 2014-05-21 Robert Dewar <dewar@adacore.com>
438 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
439 to Kill_Elaboration_Checks.
441 2014-05-21 Gary Dismukes <dismukes@adacore.com>
443 * layout.adb (Assoc_Add): Suppress the optimization of the (E
444 - C1) + C2 case, when the expression type is unsigned and C1 <
445 C2, to avoid creating a negative literal when folding.
447 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
449 * freeze.adb (Freeze_Record_Type): Update the use of
451 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
453 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
454 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
455 of Is_SPARK_Volatile.
456 (Analyze_Loop_Parameter_Specification):
457 Update the use of Is_SPARK_Volatile.
458 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
459 formal parameter when its type is volatile.
460 * sem_prag.adb (Analyze_Global_Item): Update the use of
462 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
463 determines whether an entity is a volatile source SPARK object.
464 * sem_util.adb (Has_Enabled_Property): Accout for external
465 properties being set on objects other than abstract states
466 and variables. An example would be a formal parameter.
467 (Is_SPARK_Volatile): New routine.
468 (Is_SPARK_Volatile_Object):
469 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
470 when checking entities and/or types.
471 * sem_util.ads (Is_SPARK_Volatile): New routine.
473 2014-05-21 Robert Dewar <dewar@adacore.com>
475 * sem_warn.adb: Minor fix to warning messages (use ?? instead
478 2014-05-21 Vincent Celier <celier@adacore.com>
480 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
481 switch --version and --help.
483 2014-05-21 Robert Dewar <dewar@adacore.com>
485 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
487 2014-05-21 Ed Schonberg <schonberg@adacore.com>
489 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
490 iterator variable when the domain of iteration is a formal
491 container and this is an element iterator.
493 2014-05-21 Bob Duff <duff@adacore.com>
495 * sem_ch12.adb: Minor reformatting.
497 2014-05-21 Robert Dewar <dewar@adacore.com>
499 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
501 2014-05-21 Robert Dewar <dewar@adacore.com>
503 * sem_elab.adb: Minor reformatting.
504 * s-taprop.ads: Minor comment fix.
505 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
506 Kill_Elaboration_Checks.
507 * errout.adb, erroutc.adb: Minor reformatting.
509 2014-05-21 Thomas Quinot <quinot@adacore.com>
511 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
512 component. No byte swapping occurs, but this procedure also takes
513 care of appropriately justifying the argument.
515 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
517 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
519 (Analyze_Subprogram_Body_Helper): Move the
520 analysis of aspect specifications and the processing of the
521 subprogram body contract after inlining has taken place.
522 (Diagnose_Misplaced_Aspect_Specifications): Removed.
524 2014-05-21 Javier Miranda <miranda@adacore.com>
526 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
528 2014-05-21 Robert Dewar <dewar@adacore.com>
530 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
531 continuations any more.
533 2014-05-21 Ed Schonberg <schonberg@adacore.com>
535 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
536 present in formal_Private_Definitions and on private extension
537 declarations of a formal derived type. Set when the use of the
538 formal type in a generic suggests that the actual should be a
539 fully initialized type.
540 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
541 to indicate that an entity of a generic type has default
542 initialization, and that the corresponing actual type in any
543 subsequent instantiation should be fully initialized.
544 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
545 to emit a warning if the actual for a generic type on which
546 Needs_Initialized_Actual is set is not a fully initialized type.
548 2014-05-21 Robert Dewar <dewar@adacore.com>
550 * sem_elab.adb, prj-dect.adb: Minor reformatting.
552 2014-05-21 Robert Dewar <dewar@adacore.com>
554 * erroutc.ads: Minor comment addition.
556 2014-05-21 Robert Dewar <dewar@adacore.com>
558 * errout.ads: Add documentation for use of >*> tag.
559 * restrict.adb: Make sure we use >*> tag for restriction warnings.
561 2014-05-21 Gary Dismukes <dismukes@adacore.com>
563 * debug.adb: Add case of illegal overriding_indicator for a
564 protected subprogram body to description of -gnatd.E switch.
565 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
566 for cases of giving overriding_indicators on protected subprogram
567 bodies, but change this to a warning if -gnatd.E is enabled. No
568 longer give a style warning about missing indicators on protected
571 2014-05-21 Robert Dewar <dewar@adacore.com>
573 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
574 sem_elab.ads: Minor reformatting.
575 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
578 2014-05-21 Pascal Obry <obry@adacore.com>
580 * prj-dect.adb: Allow package Install in aggregate project.
582 2014-05-21 Robert Dewar <dewar@adacore.com>
584 * sem_ch13.adb (Analyze_Aspect_Specifications):
585 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
586 * sem_prag.adb: Minor comment improvements.
588 2014-05-21 Ed Schonberg <schonberg@adacore.com>
590 * sem_ch12.adb (Install_Body): When checking whether freezing of
591 instantiation must be delayed, verify that the common enclosing
592 subprogram to generic and instance is in fact an overloadable
595 2014-05-21 Vincent Celier <celier@adacore.com>
597 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
598 mains with the same name and fail if there is more than one.
599 * prj.ads, prj.adb (Find_All_Sources): New function
601 2014-05-21 Robert Dewar <dewar@adacore.com>
603 * sem_ch13.adb: Minor reformatting.
604 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
605 * sem_prag.adb: Minor error message improvement.
607 2014-05-21 Yannick Moy <moy@adacore.com>
609 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
610 (Enclosing_Subprogram_Or_Package): Only return a library-level
613 2014-05-21 Javier Miranda <miranda@adacore.com>
615 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
616 to the full view of the parent type when processing a derived type
617 which is the full view of a private type not defined in a generic
618 unit which is derived from a private type with discriminants
619 whose full view is a non-tagged record type.
621 2014-05-21 Javier Miranda <miranda@adacore.com>
623 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
624 Complete previous patch.
626 2014-05-21 Thomas Quinot <quinot@adacore.com>
629 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
630 Provide a behaviour more consistent with underlying datagram
631 socket: do not attempt to loop over Send_Socket/Receive_Socket
632 iterating along the buffer.
634 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
636 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
637 or a tagged type is not labelled as volatile. Ensure that a
638 non-volatile type has no volatile components.
639 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
640 Obj_Typ. Code reformatting. Ensure that a discriminated or
641 tagged object is not labelled as volatile.
642 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
643 pragma Volatile applies to a full type declaration or an object
644 declaration when SPARK mode is on.
646 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
648 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
649 providing options needed for compiling the argument source for
650 the situation when a project file can be used as a tool parameter.
652 2014-05-21 Gary Dismukes <dismukes@adacore.com>
654 * gnat_rm.texi: Minor typo fix.
656 2014-05-21 Robert Dewar <dewar@adacore.com>
658 * stand.adb (Tree_Read): Read missing entities.
659 (Tree_Write): Write missing entities.
661 2014-05-21 Ben Brosgol <brosgol@adacore.com>
663 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
664 section in gnatmetric chapter.
666 2014-05-21 Robert Dewar <dewar@adacore.com>
668 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
669 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
670 post-call copy write back (see detailed comment in code).
671 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
673 * tbuild.ads: Minor reformatting.
675 2014-05-21 Robert Dewar <dewar@adacore.com>
677 * stand.ads: Add warning about adding new entities and
678 Tree_Read/Tree_Write.
680 2014-05-21 Robert Dewar <dewar@adacore.com>
682 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
683 references to restricted entities within the units in which they
686 2014-05-21 Robert Dewar <dewar@adacore.com>
688 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
689 simplify the needed test, and also deal with failure to catch
690 situations with non-standard names.
691 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
692 (Source_File_Is_Subunit): Removed, no longer used.
694 2014-05-21 Javier Miranda <miranda@adacore.com>
697 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
698 renaming of an access to interface object there is no need to
699 generate extra code to reference the tag.
701 2014-05-21 Robert Dewar <dewar@adacore.com>
703 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
704 Warnings (Off, string).
706 2014-05-21 Robert Dewar <dewar@adacore.com>
708 * osint.adb: Fix three error messages to say invalid instead
710 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
711 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
712 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
714 2014-05-21 Ed Schonberg <schonberg@adacore.com>
716 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
717 sem_ch9.ads: Move discriminant manipulation routines for analysis of
718 aspect specifications from sem_ch9 to sem_ch13, where they belong.
720 2014-05-21 Robert Dewar <dewar@adacore.com>
722 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
723 Clearly document -gnatyg (GNAT style switches).
724 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
725 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
726 available for VMS after all.
727 * warnsw.adb: Reorganize to eliminate duplicated code
728 (Restore_Warnings): Add a couple of missing entries
729 (Save_Warnings): Add a couple of missing entries.
730 * warnsw.ads: Add missing entries to Warning_Record (not clear
733 2014-05-21 Robert Dewar <dewar@adacore.com>
735 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
737 * errout.ads: Document ?*? (restriction warning) insertion.
738 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
740 * erroutc.ads: Document use of * for restriction warning tag.
741 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
743 2014-05-21 Ed Schonberg <schonberg@adacore.com>
745 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
746 make discriminants immediately visible when analyzing an aspect
747 of a subtype declaration.
748 (Uninstall_Discriminants): Do not apply to the entity in a
751 2014-05-21 Ed Schonberg <schonberg@adacore.com>
753 * sem_util.adb: Code clean up.
755 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
757 * gnat_ugn.texi: Document -Werror.
759 2014-05-21 Bob Duff <duff@adacore.com>
761 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
762 This was returning False if the Object is a constant view. Fix
763 it to return True in that case, because it might be a view of
765 (Has_Discriminant_Dependent_Constraint): Fix latent
766 bug; this function was crashing when passed a discriminant.
768 2014-05-21 Robert Dewar <dewar@adacore.com>
770 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
771 * s-arit64.adb: Minor code reorganization.
772 * sem_prag.adb: Minor comment fix (remove erroneous use of the
775 2014-05-21 Robert Dewar <dewar@adacore.com>
777 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
778 computing new table size.
780 2014-05-21 Robert Dewar <dewar@adacore.com>
782 * einfo.ads: Minor reformatting.
783 * ceinfo.adb: Deal with slight format change of einfo.ads.
785 2014-05-21 Ed Schonberg <schonberg@adacore.com>
787 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
788 implementation of the SPARK 2014 rule concerning private child
791 2014-05-21 Vincent Celier <celier@adacore.com>
793 * makeusg.adb: Add switch -d to usage.
795 2014-05-21 Ed Schonberg <schonberg@adacore.com>
797 * sem_util.adb (Find_Actual): If an actual that is the prefix
798 of an enclosing prefixed call has been rewritten, use Nkind
799 and Sloc to identify the corresponding formal, when handling
802 2014-05-21 Robert Dewar <dewar@adacore.com>
804 * debug.adb: Document -gnatd.z switch.
805 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
807 2014-05-21 Robert Dewar <dewar@adacore.com>
809 * einfo.ads (Can_Never_Be_Null): Minor comment update.
810 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
811 error message change.
812 * s-arit64.adb ("abs"): New function. Use expression functions
813 for the simple conversions and arithmetic.
815 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
817 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
818 set function_start_locus.
820 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
822 * utils.c (gnat_write_global_declarations): Adjust the flags put on
825 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
827 * gcc-interface/decl.c (change_qualified_type): New static function.
828 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
829 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
830 <E_Array_Subtype>: Likewise.
831 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
832 (gnat_to_gnu_component_type): Likewise.
833 (gnat_to_gnu_param): Likewise.
835 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
837 * fe.h (Set_Present_Expr): Move around.
838 (End_Location): New macro.
839 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
841 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
843 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
844 lieu of more verbose construct.
845 * gcc-interface/trans.c (Call_to_gnu): Likewise.
846 (gnat_to_gnu): Likewise. Remove obsolete code.
848 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
850 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
851 consider that regular packed arrays can never be superflat.
853 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
855 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
857 * gcc-interface/decl.c (annotate_value): Adjust.
858 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
859 (push_range_check_info): Likewise.
860 (Loop_Statement_to_gnu): Likewise.
861 (Subprogram_Body_to_gnu): Likewise.
862 (Compilation_Unit_to_gnu): Likewise.
863 (start_stmt_group): Likewise.
864 * gcc-interface/utils.c (init_gnat_utils): Likewise.
865 (gnat_pushlevel): Likewise.
866 (maybe_pad_type): Likewise.
868 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
870 * seh_init.c: Fix copyright year.
872 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
874 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
875 are defined. Move include windows.h before system.h.
876 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
877 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
879 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
881 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
882 to the appropriate type.
883 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
884 (pos_to_constructor): Likewise.
886 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
888 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
890 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
891 Mike Stump <mikestump@comcast.net>
892 Richard Sandiford <rdsandiford@googlemail.com>
894 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
895 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
896 (annotate_value): Use wide-int interfaces.
897 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
899 2014-04-28 Richard Henderson <rth@redhat.com>
901 * gcc-interface/Makefile.in: Support aarch64-linux.
903 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
905 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
906 add 'Suffix' parameter and adjust comment.
907 (Get_External_Name_With_Suffix): Delete.
908 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
909 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
911 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
912 Call Get_External_Name instead of Get_External_Name_With_Suffix.
913 (Get_Secondary_DT_External_Name): Likewise.
914 * exp_cg.adb (Write_Call_Info): Likewise.
915 * exp_disp.adb (Export_DT): Likewise.
916 (Import_DT): Likewise.
917 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
918 parameter with False default.
919 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
920 * types.h (Fat_Pointer): Rename into...
921 (String_Pointer): ...this. Add comment on interfacing rules.
922 * fe.h (Compiler_Abort): Adjust for above renaming.
923 (Error_Msg_N): Likewise.
924 (Error_Msg_NE): Likewise.
925 (Get_External_Name): Likewise. Add third parameter.
926 (Get_External_Name_With_Suffix): Delete.
927 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
928 (create_concat_name): Adjust call to Get_External_Name, remove call to
929 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
930 * gcc-interface/trans.c (post_error): Likewise.
931 (post_error_ne): Likewise.
932 * gcc-interface/misc.c (internal_error_function): Likewise.
934 2014-04-28 Richard Biener <rguenther@suse.de>
937 * gcc-interface/utils.c: Define flag_isoc11.
939 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
941 * gnatvsn.ads (Library_Version): Bump to 4.10.
943 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
946 2014-04-22 Richard Henderson <rth@redhat.com>
948 * gcc-interface/Makefile.in: Support aarch64-linux.
950 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
952 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
953 (Error_Msg_N): Likewise.
954 (Error_Msg_NE): Likewise.
955 (Get_External_Name_With_Suffix): Likewise.
956 * types.h (Fat_Pointer): Delete.
957 (String_Pointer): New type.
958 (DECLARE_STRING_POINTER): New macro.
959 * gcc-interface/decl.c (create_concat_name): Adjust.
960 * gcc-interface/trans.c (post_error): Likewise.
961 (post_error_ne): Likewise.
962 * gcc-interface/misc.c (internal_error_function): Likewise.
964 2014-04-22 Richard Henderson <rth@redhat.com>
966 * gcc-interface/Makefile.in: Support aarch64-linux.
968 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
969 (__gnat_alternate_stack): Enable for all linux except ia64.
971 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
973 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
974 (Error_Msg_N): Likewise.
975 (Error_Msg_NE): Likewise.
976 (Get_External_Name_With_Suffix): Likewise.
977 * types.h (Fat_Pointer): Delete.
978 (String_Pointer): New type.
979 (DECLARE_STRING_POINTER): New macro.
980 * gcc-interface/decl.c (create_concat_name): Adjust.
981 * gcc-interface/trans.c (post_error): Likewise.
982 (post_error_ne): Likewise.
983 * gcc-interface/misc.c (internal_error_function): Likewise.
985 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
986 Pierre-Marie de Rodat <derodat@adacore.com>
988 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
989 scalar constant instead of a reference for renaming of scalar literal.
990 Do not create a new object for constant renaming except for a function
991 call. Make sure a VAR_DECL is created for the renaming pointer.
992 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
993 (fold_constant_decl_in_expr): New function.
994 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
995 For a constant renaming, try to fold a constant DECL in the result.
996 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
997 (Identifier_to_gnu): Reference the renamed object of constant renaming
999 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
1000 invalidate constant renaming pointers.
1002 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1004 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
1005 (build_vector_type_for_size): New function.
1006 (build_vector_type_for_array): Likewise.
1007 (unchecked_convert): Build an intermediate vector type to convert
1008 from a generic array type to a vector type.
1009 (handle_vector_size_attribute): Reimplement.
1010 (handle_vector_type_attribute): Likewise.
1012 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1014 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
1015 Is_OK_Static_Expression in lieu of Is_Static_Expression to
1016 detect valid arguments.
1018 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
1020 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
1022 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
1024 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
1025 (components_to_record): Likewise.
1026 * gcc-interface/utils.c (make_aligning_type): Likewise.
1027 (maybe_pad_type): Likewise.
1028 (finish_record_type): Likewise.
1029 (rest_of_record_type_compilation): Likewise.
1031 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
1033 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
1034 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
1036 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
1037 hint for Loop_Optimize.
1038 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
1039 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
1040 with new Ivdep hint.
1041 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
1042 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
1043 with new Ivdep hint.
1044 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
1046 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
1047 Robert Dewar <dewar@adacore.com>
1049 * opt.ads (Suppress_Back_Annotation): Remove as unused.
1050 * fe.h (Back_Annotate_Rep_Info): Likewise.
1051 (Global_Discard_Names): Likewise.
1052 (List_Representation_Info): Declare.
1053 * types.h (Uint_Minus_1): Likewise.
1054 * repinfo.ads: Document back-annotation change.
1055 * gcc-interface/gigi.h (init_gnat_decl): Declare.
1056 (destroy_gnat_decl): Likewise.
1057 * gcc-interface/decl.c (annotate_value): Do not create the cache of
1058 annotated values here but...
1059 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
1061 (init_gnat_decl): ...here instead. New function.
1062 (destroy_gnat_decl): Likewise.
1063 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
1064 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
1066 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
1068 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
1069 offset for the field, if any.
1071 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
1072 Svante Signell <svante.signell@gmail.com>
1076 * s-osinte-x32.adb: New file.
1077 * s-linux.ads (Time): New section.
1078 * s-linux-alpha.ads (Time): Likewise.
1079 * s-linux-android.ads (Time: Likewise.
1080 * s-linux-hppa.ads (Time): Likewise.
1081 * s-linux-mipsel.ads (Time): Likewise.
1082 * s-linux-sparc.ads (Time): Likewise.
1083 * s-linux-x32.ads (Time): Likewise.
1084 * s-osprim-x32.ads (timespec): Adjust.
1086 (To_Timespec): Likewise.
1087 * s-osinte-linux.ads (Time): Define local subtypes for those defined
1089 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
1090 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
1091 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
1092 * s-osinte-solaris-posix.ads (timespec): Likewise.
1093 * s-osinte-posix.adb (To_Timespec): Likewise.
1094 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
1096 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
1099 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
1100 * s-linux-android.ads: New file.
1101 * s-intman-android.adb: Likewise.
1102 * s-osinte-android.ads: Adjust.
1103 * sigtramp-armdroid.c: Likewise.
1104 * sigtramp.h: Add Android support.
1106 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
1108 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
1110 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
1113 * system-linux-alpha.ads: Adjust for Ada 2005.
1114 * system-linux-mips.ads: Likewise.
1115 * system-linux-mips64el.ads: Likewise.
1116 * system-linux-mipsel.ads: Likewise.
1117 * system-linux-s390.ads: Likewise.
1118 * system-linux-s390x.ads: Likewise.
1119 * system-linux-sparc.ads: Likewise.
1120 * system-linux-sparcv9.ads: Likewise.
1121 * system-rtems.ads: Likewise.
1122 * system-vxworks-arm.ads: Likewise.
1124 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
1127 * gcc-interface/Makefile.in (target_cpu_default): Revert
1130 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
1133 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
1134 it to set the RM size. Use directly 'size' for the Esize.
1135 (Create_Back_End_Float_Types): Adjust call to above.
1136 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
1137 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
1138 (Write_Target_Dependent_Values): Adjust comment.
1139 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
1141 (Write_Target_Dependent_Values): Write the precision in lieu of size.
1142 (Initialization): Read the precision in lieu of size and compute the
1143 size from the precision and the alignment.
1144 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
1145 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
1146 types for vector modes, pass the size in addition to the precision.
1148 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
1150 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
1152 2014-03-07 Doug Rupp <rupp@adacore.com>
1155 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
1156 (Support_64_Bit_Divides): Removed, no longer used.
1157 (ZCX_By_Default): Enabled.
1159 2014-02-25 Doug Rupp <rupp@adacore.com>
1161 * gcc-interface/Makefile.in (arm-linux):
1162 (EH_MECHANISM): Use ARM unwinder (-arm)
1163 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
1165 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
1166 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
1167 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
1168 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
1169 Add dependencies for sigtramp-armvxw.o.
1171 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
1173 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
1175 2014-02-25 Robert Dewar <dewar@adacore.com>
1177 * rtsfind.adb (Is_RTE): Protect against entity with no scope
1178 field (previously this call blew up on the Standard entity).
1179 * sem_attr.adb (Analyze_Attribute, case Access): Remove
1180 test for No_Abort_Statements, this is now handled in
1181 Set_Entity_With_Checks.
1182 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
1183 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
1184 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
1185 Set_Entity_With_Checks.
1186 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
1187 Add checks for No_Abort_Statements.
1189 2014-02-25 Robert Dewar <dewar@adacore.com>
1191 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
1192 Check_Restriction is OK.
1194 2014-02-25 Ed Schonberg <schonberg@adacore.com>
1196 * sem_ch3.adb (Process_Full_View): Better error message when
1197 the full view of a private type without discriminants is an
1199 * sem_ch7.adb (Uninstall_Declarations): Ditto.
1201 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
1203 * sigtramp-armvxw.c: Also restore r0.
1205 2014-02-25 Robert Dewar <dewar@adacore.com>
1207 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
1208 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
1209 set unconditionally.
1210 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
1211 any more (Output_Msg_Text): Rewritten with new convention on
1212 output of warnings that are treated as errors.
1213 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
1215 * gnat_rm.texi: Updates to documentation on pragma
1217 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
1218 set Warning_Doc_Switch.
1219 * lib-writ.ads: Add documentation note on ALI file generation
1221 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
1223 * sem_attr.adb (Resolve_Attribute, case Access):
1224 Abort_Task'Access violates the No_Abort_Statements restriction.
1225 * sem_res.adb (Resolve_Call): Check restriction
1226 No_Abort_Statements for call to Abort_Task or a renaming of it.
1228 2014-02-25 Robert Dewar <dewar@adacore.com>
1230 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
1232 * lib.ads: Minor reformatting.
1233 * einfo.ads: Minor reformatting.
1235 2014-02-25 Doug Rupp <rupp@adacore.com>
1237 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
1238 use Short_Descriptor(S) as the argument passing mechanism.
1240 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
1242 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
1244 2014-02-25 Robert Dewar <dewar@adacore.com>
1246 * atree.ads (Warnings_Treated_As_Errors): New variable.
1247 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
1248 error object (Initialize): Initialize Warnings_As_Errors_Count
1249 (Write_Error_Summary): Include count of warnings treated as errors.
1250 * erroutc.adb (Warning_Treated_As_Error): New function.
1251 (Matches): Function moved to outer level of package.
1252 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
1253 (Warning_Treated_As_Error): New function.
1254 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
1255 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
1256 * opt.ads (Config_Switches_Type): Add entry for
1257 Warnings_As_Errors_Count.
1258 (Warnings_As_Errors_Count): New variable.
1259 (Warnings_As_Errors): New array.
1260 * par-prag.adb: Add dummy entry for Warning_As_Error.
1261 * sem_prag.adb (Analyze_Pragma): Implement new pragma
1263 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
1265 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
1267 * sigtramp.h: Fix minor inaccuracy.
1269 2014-02-25 Ben Brosgol <brosgol@adacore.com>
1271 * gnat_ugn.texi: Added description of kill command.
1273 2014-02-25 Robert Dewar <dewar@adacore.com>
1275 * gnat_rm.texi (Address_Clauses): Add a section discussing the
1276 problem of address clauses causing unexpected initialization,
1277 including the effect of Initialize_Scalars.
1279 2014-02-25 Robert Dewar <dewar@adacore.com>
1281 * errout.adb: Various changes for better msgs for anonmous access
1283 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
1285 (Buffer_Remove): Version with character argument.
1286 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
1287 of mismatching conventions for access-to-subprogram case.
1288 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
1289 access types in record.
1290 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
1291 types, including in records.
1293 2014-02-25 Doug Rupp <rupp@adacore.com>
1295 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
1296 enhancements and corrections.
1298 2014-02-25 Robert Dewar <dewar@adacore.com>
1300 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
1302 2014-02-25 Robert Dewar <dewar@adacore.com>
1304 * gnat_rm.texi: First set of documentation additions for
1305 predefined RM units.
1306 * checks.adb: Minor reformatting.
1307 * sem_elab.adb (Check_Task_Activation): Minor fix to error
1309 * sem_util.adb: Minor reformatting.
1311 2014-02-25 Arnaud Charlet <charlet@adacore.com>
1313 * usage.adb (Usage): Add help on -gnateC.
1314 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
1315 * opt.ads (Generate_CodePeer_Messages): New flag.
1316 * gnat_ugn.texi: Document new switch -gnateC.
1318 2014-02-25 Ben Brosgol <brosgol@adacore.com>
1320 * gnat_rm.texi: Corrected minor typos in Implementation Defined
1322 * opt.ads: Minor reformatting.
1324 2014-02-25 Robert Dewar <dewar@adacore.com>
1326 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
1327 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
1329 * opt.ads (Warn_Info_Messages): New flag.
1330 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
1332 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
1334 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
1335 * usage.adb: Add documentation of -gnatel/-gnateL Update
1336 documentation of -gnatwl/-gnatwL.
1337 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
1338 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
1340 2014-02-25 Robert Dewar <dewar@adacore.com>
1342 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
1343 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
1344 * interfac.ads: Minor code reorganization (add pragma
1345 Compiler_Unit_Warning).
1346 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
1347 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
1348 Has_Shift_Operator flag.
1349 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
1350 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
1351 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
1352 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
1353 Add entry for Name_Amount.
1354 * checks.adb (Selected_Range_Checks): When checking for a null
1355 range, make sure we use the base type, and not the subtype for
1356 deciding a range is null.
1357 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
1358 for suspicious loop bound which is outside the range of the
1360 * gnat_ugn.texi: Add documentation section "Determining the
1361 Chosen Elaboration Order"
1362 * sem_ch13.adb (UC_Entry): Add field Act_Unit
1363 (Validate_Unchecked_Conversion): Store Act_Unit
1364 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
1365 * treepr.adb: Minor reformatting.
1367 2014-02-25 Arnaud Charlet <charlet@adacore.com>
1369 * usage.adb: Minor: fix typo.
1371 2014-02-25 Robert Dewar <dewar@adacore.com>
1373 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
1374 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
1375 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
1376 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
1377 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
1378 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
1379 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
1380 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
1381 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
1382 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
1383 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
1384 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
1385 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
1386 Compiler_Unit_Warning, change Compiler_Unit everywhere to
1387 Compiler_Unit_Warning.
1389 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
1391 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
1392 in ASIS mode aggregates that are used as aspect definitions.
1394 2014-02-25 Robert Dewar <dewar@adacore.com>
1396 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
1399 2014-02-25 Ed Schonberg <schonberg@adacore.com>
1401 * freeze.adb (Freeze_Entity): If the return type of a function
1402 is a limited view, and the non-limited view has not been seen yet,
1403 defer freezing to some later point.
1405 2014-02-25 Robert Dewar <dewar@adacore.com>
1407 * sem_ch3.adb: Minor reformatting.
1409 2014-02-25 Robert Dewar <dewar@adacore.com>
1411 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
1412 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
1413 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
1414 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
1415 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
1416 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
1417 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
1418 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
1419 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
1420 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
1421 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
1422 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
1423 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
1424 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
1425 snames.ads-tmpl: Change Compiler_Unit everywhere to
1426 Compiler_Unit_Warning.
1428 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
1430 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
1431 (Collect_Body_Postconditions_In_Decls): New routine.
1432 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
1433 postcondition aspects or pragmas that appear on a subprogram
1435 (Collect_Spec_Preconditions): Factor out code. Handle
1436 precondition aspects or pragmas that appear on a subprogram
1438 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
1439 aspects that apply to a subprogram body stub is no longer delayed,
1440 the aspects are analyzed on the spot.
1441 (SPARK_Aspect_Error):
1442 Aspects that apply to a subprogram declaration cannot appear in
1444 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
1445 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
1446 is now a local variable. Code cleanup. Analysis related to
1447 the aspects of a subprogram body stub is now carried out by
1448 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
1449 and/or pragmas of a subprogram body stub to the proper body
1450 as this is no longer needed. Do not analyze the aspects of a
1451 subprogram stub when the corresponding source unit is missing.
1452 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
1454 (Analyze_Task_Body_Stub): Flag the illegal use of
1456 (Optional_Subunit): Add local variable Unum.
1457 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
1458 pragma when it applies to a subprogram body stub.
1459 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
1460 Depends and Global can now apply to a subprogram body stub as
1461 long as it acts as its own spec.
1462 (Analyze_Refined_Pragma):
1463 Code reformatting. Refinement pragmas cannot apply to a subunit.
1465 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
1467 * einfo.ads Update the usage of flag
1468 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
1469 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
1470 now starts with the letter 'C'. This makes reading expanded
1472 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
1473 Iter_Loop. Signal that an Ada 2012 iterator loop requires
1474 secondary stack management when creating a transient scope for
1475 an element reference.
1476 * exp_util.adb (Process_Statements_For_Controlled_Objects):
1477 When wrapping the statements of a loop, pass the E_Loop entity
1478 to the wrapping machinery.
1479 (Wrap_Statements_In_Block): Add
1480 formal parameter Scop along with comment on usage. Add local
1481 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
1482 block as requiring secondary stack management when the block is
1483 created inside an Ada 2012 iterator loop. This ensures that any
1484 reference objects are reclaimed on each iteration of the loop.
1485 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
1486 tasked with the handling of container iterators as requiring
1487 secondary stack management. This ensures that iterators are
1488 reclaimed when the loop terminates or is exited in any fashion.
1489 * sem_util.adb (Add_Block_Identifier): New routine.
1490 (Find_Enclosing_Iterator_Loop): New routine.
1491 * sem_util.ads (Add_Block_Identifier): New routine.
1492 (Find_Enclosing_Iterator_Loop): New routine.
1494 2014-02-25 Robert Dewar <dewar@adacore.com>
1496 * sinfo.ads: Minor reformatting.
1498 2014-02-25 Tristan Gingold <gingold@adacore.com>
1500 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
1502 2014-02-25 Pascal Obry <obry@adacore.com>
1504 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
1506 2014-02-25 Tristan Gingold <gingold@adacore.com>
1508 * sem_ch10.adb: Minor comment fix.
1510 2014-02-25 Bob Duff <duff@adacore.com>
1512 * s-tasdeb.adb: Misc cleanup of this package,
1513 including printing addresses in hexadecimal.
1514 (Write): Fix minor bug when taking 'Address of an empty string.
1516 2014-02-25 Ed Schonberg <schonberg@adacore.com>
1518 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
1519 public child unit when it does not refer to the abstract state
1520 of a public ancestor.
1522 2014-02-25 Yannick Moy <moy@adacore.com>
1524 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
1525 Validity_Checks in GNATprove and CodePeer modes.
1527 2014-02-25 Pascal Obry <obry@adacore.com>
1529 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
1530 Artifacts attribute.
1532 2014-02-25 Yannick Moy <moy@adacore.com>
1534 * sem_prag.adb: Minor reformatting to get consistent messages.
1536 2014-02-25 Robert Dewar <dewar@adacore.com>
1538 * checks.adb: Minor reformatting.
1539 * sinfo.ads (Do_Range_Check): Document that this flag is never
1540 passed to the back end.
1542 2014-02-25 Yannick Moy <moy@adacore.com>
1544 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
1545 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
1547 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
1549 * sem_res.adb (Appears_In_Check): New routine.
1550 (Resolve_Entity_Name): Remove local variables Prev and
1551 Usage_OK. Par is now a constant. Remove the parent chain traversal
1552 as the placement of a volatile object with enabled property
1553 Async_Writers and/or Effective_Reads must appear immediately
1554 within a legal construct.
1556 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
1558 * checks.adb (Apply_Selected_Range_Checks):
1559 Alphabetize local constants and variables. Add comments.
1560 Always insert a range check that requires runtime evaluation into
1563 2014-02-25 Robert Dewar <dewar@adacore.com>
1565 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
1567 2014-02-25 Bob Duff <duff@adacore.com>
1569 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
1570 iterations while waiting for independent tasks to terminate;
1571 if an independent task does not terminate, we do not want to
1572 hang here. In that case, the thread will be terminated when the
1574 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
1576 2014-02-25 Ed Schonberg <schonberg@adacore.com>
1578 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
1579 used to perform pre-analysis of the expression for SPARK
1580 aspects that have a non-standard syntax, such as GLobal and
1581 Initializes. The procedure applies to the original expression
1582 in an aspect specification, prior to the analysis of the
1583 corresponding pragma, in order to provide semantic information
1584 for ASIS navigation purposes.
1585 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
1586 Call new subprogram.
1588 2014-02-25 Yannick Moy <moy@adacore.com>
1590 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
1592 2014-02-25 Doug Rupp <rupp@adacore.com>
1594 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
1595 (__gnat_adjust_context_for_raise): Bump the PC by 2.
1597 2014-02-25 Ed Schonberg <schonberg@adacore.com>
1599 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
1600 misplaced IS, add a statement sequence to improper body only if
1601 one has not been parsed already.
1603 2014-02-25 Ed Schonberg <schonberg@adacore.com>
1605 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
1606 mismatch when multidimensional array is updated with a single
1609 2014-02-25 Yannick Moy <moy@adacore.com>
1611 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
1612 sem_ch6.adb: Mark most references to SPARK RM in error messages
1615 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1617 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
1618 appears in a list of basic declarations, complete the tree with
1619 an empty statement list, to prevent cascaded errors and crashes
1620 if semantic analysis is attempted.
1622 2014-02-24 Thomas Quinot <quinot@adacore.com>
1624 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
1626 * erroutc.adb: Minor reformatting.
1628 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1630 * sem_prag.adb (Check_Clause_Syntax): Account
1631 for a solitary input item in a dependency list.
1633 2014-02-24 Yannick Moy <moy@adacore.com>
1635 * gnat1drv.adb (Adjust_Global_Switches): Do not
1636 use validity checks at all in GNATprove_Mode.
1638 2014-02-24 Robert Dewar <dewar@adacore.com>
1640 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
1641 atree.adb, atree.ads: Minor reformatting.
1643 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1645 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
1646 global and dependence refinement when SPARK_Mode is off.
1647 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
1648 state refinement when SPARK_Mode is off.
1649 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
1650 variable Decl. Insert the generated pragma for Refined_State
1651 after a potential pragma SPARK_Mode.
1652 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
1653 constant Deps. Remove local variable Expr. Check the syntax
1654 of pragma Depends when SPARK_Mode is off. Factor out the
1655 processing for extra parenthesis around individual clauses.
1656 (Analyze_Global_In_Decl_List): Items is now a constant. Check
1657 the syntax of pragma Global when SPARK_Mode is off.
1658 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
1659 Initializes when SPARK_Mode is off.
1660 (Analyze_Part_Of): Check
1661 the syntax of the encapsulating state when SPARK_Mode is off.
1662 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
1663 SPARK_Mode is off. Move the declaration order check with respect
1664 to pragma Initializes to the end of the processing. Do not verify
1665 the declaration order for pragma Initial_Condition when SPARK_Mode
1666 is off. Do not complain about a useless package refinement when
1668 (Analyze_Refined_Depends_In_Decl_Part): Refs
1669 is now a constant. Check the syntax of pragma Refined_Depends
1670 when SPARK_Mode is off.
1671 (Analyze_Refined_Global_In_Decl_Part):
1672 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
1673 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
1674 Refined_State when SPARK_Mode is off.
1675 (Check_Dependence_List_Syntax): New routine.
1676 (Check_Global_List_Syntax): New routine.
1677 (Check_Initialization_List_Syntax): New routine.
1678 (Check_Item_Syntax): New routine.
1679 (Check_State_Declaration_Syntax): New routine.
1680 (Check_Refinement_List_Syntax): New routine.
1681 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
1683 2014-02-24 Robert Dewar <dewar@adacore.com>
1685 * a-tags.adb, s-os_lib.adb: Minor reformatting.
1687 2014-02-24 Thomas Quinot <quinot@adacore.com>
1689 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
1690 strerror message, not just numeric errno value.
1692 2014-02-24 Doug Rupp <rupp@adacore.com>
1694 * raise-gcc.c (exception_class_eq): Make endian neutral.
1696 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1698 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
1699 flag, and reset Etype and Analyzed attributes unconditionally
1700 when copying a tree that may be partly analyzed.
1701 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
1702 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
1703 within a subprogram body and applies to it, remove it from the
1704 body before making a copy of it, to prevent spurious errors when
1705 analyzing the copied body.
1707 2014-02-24 Thomas Quinot <quinot@adacore.com>
1709 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
1710 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
1711 vxWorks.h has been included. Also ensure that file attributes
1712 related definitions are output even in cases where socket support
1714 * a-tags.adb: Code clean up.
1715 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
1716 instead of -I to add the main ada source directory to the header
1717 search path, in order to avoid conflict between our own "types.h"
1718 and VxWork's <types.h>.
1720 2014-02-24 Robert Dewar <dewar@adacore.com>
1722 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
1723 * debug.adb: Remove documentation of -gnatd.X, no longer used.
1724 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
1726 2014-02-24 Bob Duff <duff@adacore.com>
1728 * gnat_ugn.texi: Improve documentation of gnatpp.
1730 2014-02-24 Thomas Quinot <quinot@adacore.com>
1732 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
1733 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
1734 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
1735 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
1736 a chars_ptr, because on Windows this is a renaming of
1737 Socket_Error_Message.
1739 2014-02-24 Robert Dewar <dewar@adacore.com>
1741 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
1742 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
1743 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
1746 2014-02-24 Thomas Quinot <quinot@adacore.com>
1748 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
1749 that the source directory containing s-oscons-tmplt.c is on the
1750 include path, so that all internal header files are available.
1752 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1754 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
1755 domain of iteration is an attribute reference 'Old, this is an
1756 Ada 2012 iterator and the loop must be rewritten as such.
1758 2014-02-24 Thomas Quinot <quinot@adacore.com>
1760 * s-fileio.adb (Errno_Message): Remove, use shared version from
1762 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
1763 * g-stseme (Socket_Error_Message): Reimplement in terms of new
1765 * g-socthi.ads, g-socthi.adb: Change profile of
1766 Socket_Error_Message to return String to allow the above.
1767 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
1768 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
1769 * g-socthi-vxworks.ads: Update to account for the above profile
1771 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
1772 * s-crtl.ads (strncpy): New procedure.
1773 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
1774 Use import from s-crtl.
1775 * a-envvar.adb, osint.adb: Use imports of C runtime functions
1776 from s-crtl instead of re-importing locally.
1778 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1780 * sem_prag.adb (Analyze_Global_Item): Emit the
1781 variable related checks concerning volatile objects only when
1784 2014-02-24 Robert Dewar <dewar@adacore.com>
1786 * sem_ch5.adb (Analyze_Iterator_Specification): use
1787 Error_Msg_Ada_2012_Feature.
1789 2014-02-24 Jose Ruiz <ruiz@adacore.com>
1791 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
1792 No_Local_Timing_Events and No_Specific_Termination_Handlers
1793 must be set, according to the Ravenscar profile definition
1796 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1798 * sem_ch6.adb (Analyze_Expression_Function): If this is a
1799 completion, freeze return type and its designated type if needed.
1801 2014-02-24 Thomas Quinot <quinot@adacore.com>
1803 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1804 'Address): When moving initialization statements to a freeze
1805 entity, keep them under a single node (i.e. do not unwrap
1806 expressions with actions), and set the Initialization_Statements
1807 attribute again so that processing of a later pragma Import can
1810 2014-02-24 Claire Dross <dross@adacore.com>
1812 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
1813 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
1814 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
1815 Left/Right to First_To_Previous/Current_To_Last.
1817 2014-02-24 Thomas Quinot <quinot@adacore.com>
1819 * adaint.h (struct file_attributes): New component "error"
1820 (__gnat_error_attributes): Accessor for the above.
1821 * adaint.c (__gnat_error_attributes): New subprogram
1822 (__gnat_stat): Fix returned value (expect errno value)
1823 (__gnat_stat_to_attr): Add management of error component (set to
1824 stat errno value, except for missing files where it is set to 0,
1825 and exists is set to 0).
1826 * osint.ads (File_Attributes_Size): Update per change above,
1827 also clarify documentation.
1828 * s-filatt.ads: New file, binding to file attributes related
1830 * Makefile.rtl (s-filatt): New runtime unit.
1831 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
1832 to library function if not available on target).
1833 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
1834 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
1835 SIZEOF_struct_dirent_alloc): New constants.
1836 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
1837 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
1838 Perform appropriate error checking if stat fails (do not just
1839 ignore existing files if stat fails)
1840 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
1843 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1845 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
1846 the use of volatile objects as global items in a function to
1847 the variable related checks section.
1848 * sem_util.adb (Async_Readers_Enabled): Directly call
1849 Has_Enabled_Property.
1850 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
1851 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
1852 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
1853 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
1854 Update the comment on usage. State_Has_Enabled_Property how handles
1855 the original logic of the routine. Add processing for variables.
1856 (State_Has_Enabled_Property): New routine.
1857 (Variable_Has_Enabled_Property): New routine.
1859 2014-02-24 Robert Dewar <dewar@adacore.com>
1861 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
1863 * atree.ads, atree.adb (Node35): New function.
1864 (Set_Node35): New procedure.
1865 * debug.adb: Define new debug flag -gnatd.X.
1866 * einfo.ads, einfo.adb (Import_Pragma): New field.
1867 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
1868 really active yet, has to be activated with -gnatd.X.
1869 * sem_prag.adb (Set_Imported): Set new Import_Pragma
1870 field (Set_Imported): Don't set Is_Public (see
1871 Freeze.Wrap_Imported_Subprogram)
1872 * par-ch3.adb (P_Component_List): Handle unexpected null component.
1874 2014-02-24 Yannick Moy <moy@adacore.com>
1876 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
1877 * gnat_rm.texi: Correct documentation of attribute Update.
1879 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1881 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
1882 iterator in older versions of Ada.
1884 2014-02-24 Gary Dismukes <dismukes@adacore.com>
1886 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
1887 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
1889 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1891 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
1892 indexed_components that are instances of Ada 2012 container
1893 indexing operations. Analysis and resolution of such nodes
1894 is performed on the attribute, and the original source is
1895 preserved for ASIS operations. If expansion is enabled, the
1896 indexed component is replaced by the value of this attribute,
1897 which is in a call to an Indexing aspect, in most case wrapped
1898 in a dereference operation.
1899 * sem_ch4.adb (Analyze_Indexed_Component): Create
1900 Generalized_Indexing attribute when appropriate.
1901 (Analyze_Call): If prefix is not overloadable and has an indexing
1902 aspect, transform into an indexed component so it can be analyzed
1903 as a potential container indexing.
1904 (Analyze_Expression): If node is an indexed component with a
1905 Generalized_ Indexing, do not re-analyze.
1906 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
1907 of an indexed_component that has been transformed into a container
1909 (Resolve_Indexed_Component): Call the above when required.
1910 (Resolve): Do not insert an explicit dereference operation on
1911 an indexed_component whose type has an implicit dereference:
1912 the operation is inserted when resolving the related
1913 Generalized_Indexing.
1915 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
1917 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
1920 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1922 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
1924 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
1925 Merge the expected and available mode errors.
1926 (Report_Unused_Constituents): Remove leading spaces in error messages.
1927 (Report_Unused_States): Remove leading spaces in error messages.
1929 2014-02-24 Thomas Quinot <quinot@adacore.com>
1931 * par_sco.adb (Traverse_One): Refine categorization of statement
1934 2014-02-24 Robert Dewar <dewar@adacore.com>
1936 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
1937 Pure_05, Pure_12 and Preelaborate_05.
1938 * gnat_rm.texi: Update accordingly.
1939 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
1940 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
1941 Recognize one argument form of these pragmas only in GNAT mode
1944 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1946 * s-dimmks.ads: Replace symbol for temperature, previously the
1947 Greek letter Theta, by the ASCII @ sign.
1948 * s-diflio.ads: ditto.
1950 2014-02-24 Robert Dewar <dewar@adacore.com>
1952 * exp_ch4.adb: Minor code reorganization (use OR for boolean
1954 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
1956 2014-02-24 Ben Brosgol <brosgol@adacore.com>
1958 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
1959 so that references to gnatmem and ASIS tools do not appear in the FSF
1960 edition of the GNAT User's Guide.
1962 2014-02-24 Yannick Moy <moy@adacore.com>
1964 * freeze.adb (Freeze_Entity): Do not issue warning
1965 for pre/post being ignored on imported subprogram in GNATprove
1968 2014-02-24 Robert Dewar <dewar@adacore.com>
1970 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
1971 stand.ads, sem_eval.adb: Minor reformatting.
1973 2014-02-24 Yannick Moy <moy@adacore.com>
1975 * sem_prag.adb: Minor rewording in error message.
1977 2014-02-24 Johannes Kanig <kanig@adacore.com>
1979 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
1980 GNATprove_mode, gnat2why doesn't need nor use these types.
1982 2014-02-24 Gary Dismukes <dismukes@adacore.com>
1984 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
1985 target, in the case of signed integer exponentiation that uses a
1986 run-time routine, always select the Exp_* versions, since overflow
1987 checking is automatically done by AAMP arithmetic instructions.
1989 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
1991 * sem_ch13.adb (Analyze_Aspect_Specifications):
1992 When the related context is a package instace, insert pragma
1993 Abstract_State after all internally-generated renamings related
1994 to the instance "header".
1996 2014-02-24 Ed Schonberg <schonberg@adacore.com>
1998 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
2000 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
2001 call to an abstract subprogram is legal if it appears in a
2002 pre/postcondition of another abstract operation.
2004 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
2006 * gnat_ugn.texi: Misc updates.
2008 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
2010 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
2012 2014-02-24 Gary Dismukes <dismukes@adacore.com>
2014 * layout.adb (Layout_Variant_Record): Instantiate
2015 Generic_Check_Choices and call Check_Choices before calling
2016 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
2017 set to prevent generating incorrect discriminant-checking
2018 functions for 'others' variants (functions that unconditionally
2019 return True rather than accounting for the values covered by the
2021 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
2022 Formal_Derived_Matching.
2023 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
2024 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
2025 Formal_Derived_Matching formal to Subtypes_Statically_Match.
2026 (Subtypes_Statically_Match): Suppress the Object_Size matching
2027 test in the case where Formal_Derived_Matching is True.
2028 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
2029 True for Formal_Derived_Matching_Formal on the call to
2030 Subtypes_Statically_Compatible.
2032 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
2034 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
2036 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
2038 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
2039 Look through a conversion between original and packable version to get
2041 (build_component_ref): Rework comment and fix formatting.
2043 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
2045 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
2046 project-specific options.
2048 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2050 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
2051 not Constraint_Error.
2052 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
2053 * sem_ch5.adb: Code clean up.
2055 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
2057 * sem_prag.adb (Usage_Error): Remove local
2058 constant Typ. Remove the specialized diagnostics for unconstrained
2059 or tagged items as those are not part of the explicit input set
2060 of the related subprogram and should not be flagged.
2062 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2064 * sem_attr.adb: Add guard to preserve all errors.
2066 2014-02-20 Vincent Celier <celier@adacore.com>
2068 * switch-m.adb (Normalize_Compiler_Switches): Take into account
2069 switches that are recorded in ALI files: -gnateA, -gnateE,
2070 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
2072 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2074 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
2075 of an element iterator form over a formal container with an
2077 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
2078 to create declaration and loop statements for both forms of
2079 container iterators.
2080 (Expand_Formal_Container_Element_Iterator): New procedure
2081 to handle loops of the form "for E of C" when C is a formal
2083 (Expand_Formal_Container_Iterator): Code cleanup.
2085 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
2087 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
2088 (Analyze_Contract_Case): Remove the use of
2089 "may". Replace "aspect Contract_Cases" to avoid categorization
2090 of aspect vs pragma.
2091 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
2092 (Analyze_Global_Item): Remove
2093 the use of "formal", specify the subprogram. Split the
2094 error message about a state with visible refinement into
2095 two. Remove the use of "global" from "volatile global item".
2096 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
2098 (Analyze_Input_Output): Update the call to
2099 Check_Mode. Specify the duplicated item. Reword the error
2100 message concerning an input of a null output list. Use "\"
2101 for error message continuation.
2102 (Analyze_Part_Of): Remove
2103 the use of "may". Use "\" for error message continuation.
2104 (Analyze_Refined_Depends_In_Decl_Part): Update the error
2105 message concerning a useless refinement to match the format
2107 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
2108 concerning a useless refinement.
2109 (Analyze_Refinement_Clause): Use "\" for error message continuation.
2110 (Check_Constituent_Usage): Use "\" for error message continuation.
2111 (Check_Dependency_Clause): Use "\" for error message continuation.
2112 (Check_Matching_Constituent): Use "\" for error message continuation.
2113 (Check_Missing_Part_Of): Use "\" for error message continuation.
2114 (Check_Mode): Renamed to
2115 Check_Role. Update the comment on usage. Redo the error reporting
2117 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
2118 message continuation.
2119 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
2120 with comment on usage. Update all occurrences of Is_Input and Is_Output.
2121 (Inconsistent_Mode_Error): Use "\" for error message continuation.
2122 (Input_Match): Use "\" for error message continuation.
2123 (Role_Error): New routine.
2124 (Set_Convention_From_Pragma): Use "\" for error message continuation.
2125 (Usage_Error): Add local variable Error_Msg. Build specialized error
2126 message showcasing the offending item kind. Redo the diagnostics for
2127 unconstrained types.
2129 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2131 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
2132 to determine whether a type is a container type, rather than
2133 examining only its type declaration, so that subtypes and derived
2134 types are handled properly.
2136 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
2138 * gnat_ugn.texi: gnatmetric: add description of project-specific
2141 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2143 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
2144 all choices in an association for a record type have the same
2145 type, as is done for record aggregates.
2147 2014-02-20 Robert Dewar <dewar@adacore.com>
2149 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
2150 Unmodified rather than Warnings (Off). Make comments
2151 uniform in the four affected units.
2153 2014-02-20 Robert Dewar <dewar@adacore.com>
2155 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
2156 Object_Size): For non-scalar types allow any value that is a
2158 * gnat_rm.texi: Document Object_Size for composites more clearly.
2160 2014-02-20 Yannick Moy <moy@adacore.com>
2162 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
2164 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2166 * stand.ads: Raise_Type: new predefined entity, used as the type
2167 of a Raise_Expression prior to resolution.
2168 * cstand.adb: Build entity for Raise_Type.
2169 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
2170 initial type of the node.
2171 * sem_type.adb (Covers): Raise_Type is compatible with all
2173 * sem_res.adb (Resolve): Remove special handling of Any_Type on
2174 Raise_Expression nodes.
2175 (Resolve_Raise_Expression): Signal ambiguity if the type of the
2176 context is still Raise_Type.
2178 2014-02-20 Robert Dewar <dewar@adacore.com>
2180 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
2181 mismatching predicates.
2182 * sem_ch6.adb (Check_Conformance): Give better messages on
2184 * sem_eval.adb (Predicates_Match): Move to spec.
2185 * sem_eval.ads (Predicates_Match): Moved here from body.
2187 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2189 * a-cbmutr.adb: Use default value in Insert_Child.
2191 2014-02-20 Vincent Celier <celier@adacore.com>
2193 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
2194 Stringt.Initialize in all project aware tools.
2196 2014-02-20 Doug Rupp <rupp@adacore.com>
2198 * gnat_ugn.texi: Document gnatbind -X option.
2199 * vms_data.ads: Minor warnings documentation reformatting.
2201 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2203 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
2204 procedure for a base type.
2206 2014-02-20 Robert Dewar <dewar@adacore.com>
2208 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
2209 expression with type info.
2210 * sem_ch13.adb: Minor reformatting.
2211 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
2212 False if predicates do not match on the two types.
2214 2014-02-20 Arnaud Charlet <charlet@adacore.com>
2216 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
2217 In Relaxed_RM_Semantics mode, allow any static integer value,
2218 for compatibility with other compilers.
2220 2014-02-20 Vincent Celier <celier@adacore.com>
2222 * errutil.adb (Initialize): Properly initialize entry in table
2223 Warnings when warnings are suppressed.
2225 2014-02-20 Robert Dewar <dewar@adacore.com>
2227 * s-os_lib.ads: Add warning about non-portability of Rename_File.
2228 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
2229 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
2230 * gnat_ugn.texi: Document no warnings on junk variable names.
2231 * layout.adb: Minor code reorganization (use Ekind_In).
2232 * stringt.adb: Move initialization of Null_String_Id to Initialize
2235 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2237 * sem_ch13.adb: Initialize optional Element_Id.
2239 2014-02-20 Robert Dewar <dewar@adacore.com>
2241 * s-os_lib.ads (Rename_File): Minor commment addition.
2243 2014-02-20 Thomas Quinot <quinot@adacore.com>
2245 * einfo.ads: Minor reformatting.
2247 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
2249 * aspects.adb (Exchange_Aspects): New routine.
2250 * aspects.ads (Exchange_Aspects): New routine.
2251 * atree.adb (Rewrite): Do not check whether the save node has
2252 aspects as it never will, instead check the node about to be clobbered.
2253 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
2254 entities of generic packages.
2255 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
2256 pointer of an aspect specification list after rewriting takes place.
2257 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
2258 specifications of the generic template and the copy used for analysis.
2259 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
2260 the aspect specifications of the generic template and the
2261 copy used for analysis.
2262 (Analyze_Package_Instantiation): Propagate the aspect specifications
2263 from the generic template to the instantiation.
2264 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
2265 specifications from the generic template to the instantiation.
2266 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
2267 Abstract_State, Initializes and Initial_Condition when they
2268 apply to a package instantiation.
2270 2014-02-20 Robert Dewar <dewar@adacore.com>
2272 * stringt.adb: Add call to Initialize in package initialization.
2274 2014-02-20 Robert Dewar <dewar@adacore.com>
2276 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
2277 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
2278 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
2279 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
2282 2014-02-20 Bob Duff <duff@adacore.com>
2284 * s-os_lib.ads: Minor: Remove incorrect comment.
2286 2014-02-20 Robert Dewar <dewar@adacore.com>
2288 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
2290 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2292 * a-cborma.adb (Assign): When creating a node without a specified
2293 element, insert an uninitialized element in the map, because
2294 the instance may provide an element type with a default
2295 initialization, e.g a scalar with a Default_Value aspect.
2296 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
2297 (Insert): In the version without explicit element, provide an
2298 uninitialized element, as above.
2299 * a-cbdlli.adb (Append): In the version without explicit element,
2300 provide an uninitalized element, as above.
2301 (Allocate): Remove unused version.
2303 2014-02-20 Robert Dewar <dewar@adacore.com>
2305 * sem_elab.adb: Minor code reorganization (use Nkind_In).
2306 * stringt.adb: Remove temporary pragma Warnings (Off).
2307 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
2310 2014-02-20 Matthew Heaney <heaney@adacore.com>
2312 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
2315 2014-02-20 Ed Schonberg <schonberg@adacore.com>
2317 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
2318 properly the cursor type for subsequent volatile testing in SPARK
2319 mode, when domain is a formal container with an Iterabe aspect.
2321 2014-02-20 Robert Dewar <dewar@adacore.com>
2323 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
2324 (Set_Specific_Warning_Off): Add Reason argument.
2325 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
2326 (Set_Specific_Warning_Off): Add Reason argument.
2327 * erroutc.adb (Warnings_Entry): Add Reason field
2328 (Specific_Warning_Entry): Add Reason field.
2329 (Warnings_Suppressed): return String_Id for Reason.
2330 (Warning_Specifically_Suppressed): return String_Id for Reason.
2331 * erroutc.ads (Warnings_Entry): Add Reason field.
2332 (Specific_Warning_Entry): Add Reason field.
2333 (Set_Specific_Warning_Off): Add Reason argument.
2334 (Set_Warnings_Mode_Off): Add Reason argument.
2335 (Warnings_Suppressed): return String_Id for Reason.
2336 (Warning_Specifically_Suppressed): return String_Id for Reason.
2337 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
2338 (Warning_Specifically_Suppressed): returns String_Id for Reason
2339 * gnat_rm.texi: Document that Warning parameter is string literal
2340 or a concatenation of string literals.
2341 * par-prag.adb: New handling for Reason argument.
2342 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
2343 for Reason argument.
2344 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
2345 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
2346 * stringt.adb: Set Null_String_Id.
2347 * stringt.ads (Null_String_Id): New constant.
2349 2014-02-20 Robert Dewar <dewar@adacore.com>
2351 * einfo.ads: Minor comment addition: Etype of package is
2353 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
2354 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
2355 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
2356 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
2357 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
2358 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
2359 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
2360 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
2361 Replace all calls with calls to New_Occurrence_Of.
2363 2014-02-20 Robert Dewar <dewar@adacore.com>
2365 * par-util.adb (Ignore, case of right paren): Make this a
2368 2014-02-19 Robert Dewar <dewar@adacore.com>
2370 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
2371 * debug.adb: Remove -gnatd.X switch, no longer used.
2372 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
2375 2014-02-19 Bob Duff <duff@adacore.com>
2377 * g-socket.ads: Minor: Correct some comments.
2379 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2381 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
2383 2014-02-19 Arnaud Charlet <charlet@adacore.com>
2385 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
2386 an error on out of range priorities if Relaxed_RM_Semantics.
2387 * sem_prag.adb (Analyze_Pragma): Ditto.
2389 2014-02-19 Bob Duff <duff@adacore.com>
2391 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
2392 where F denotes the renaming of an enumeration literal, and
2393 issue a specialized error message.
2395 2014-02-19 Matthew Heaney <heaney@adacore.com>
2397 * a-chtgop.ads (Checked_Index): New operation.
2398 (Next): Changed mode of hash table.
2399 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
2400 (Generic_Read, Reserve_Capacity): Ditto.
2401 (Generic_Equal): Detect tampering.
2402 (Next): Changed mode of hash table, detect tampering.
2403 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
2405 (Find): Changed mode of hash table.
2406 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
2407 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
2409 (Find): Changed mode of hash table, check for tampering.
2410 (Generic_Replace_Element): Check for tampering.
2411 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
2412 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
2413 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
2415 (Find, Generic_Replace_Element): Check for tampering.
2416 * a-chtgbo.ads (Checked_Index): New operation.
2417 * a-chtgbo.adb (Checked_Index): New operation
2418 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
2419 (Generic_Read, Next): Ditto.
2420 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
2421 table (Difference, Intersection): Use variable view of
2422 source, detect tampering (Find, Is_Subset, Overlap): Use
2423 variable view of container (Symmetric_Difference, Union):
2424 Detect tampering (Vet): Use Checked_Index to detect tampering
2425 (Constant_Reference, Element, Find): Use variable view of
2427 (Update_Element_Preserving_Key): Detect tampering.
2428 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
2431 (Equivalent_Sets, Overlap): Use Node's Next component.
2432 (Vet): Use Checked_Index to detect tampering.
2433 (Constant_Reference, Element, Find): Use variable view of container.
2434 (Update_Element_Preserving_Key): Detect tampering.
2435 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
2436 Element, Find): Use variable view of container.
2437 (Reference): Rename hash table component.
2438 (Vet): Use Checked_Index to detect tampering.
2440 2014-02-19 Arnaud Charlet <charlet@adacore.com>
2442 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
2445 2014-02-19 Thomas Quinot <quinot@adacore.com>
2447 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
2448 against calls without Def_Id.
2450 2014-02-19 Claire Dross <dross@adacore.com>
2452 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
2453 a-cofove.ads: Add global annotations to subprograms.
2455 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2457 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
2458 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
2459 Initial_Condition no longer requires the presence of pragma
2460 Initialized. Do not try to diagnose whether all variables mentioned in
2461 pragma Initializes also appear in Initial_Condition.
2462 (Collect_Variables): Removed.
2463 (Match_Variable): Removed.
2464 (Match_Variables): Removed.
2465 (Report_Unused_Variables): Removed.
2467 2014-02-19 Thomas Quinot <quinot@adacore.com>
2469 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
2471 2014-02-19 Robert Dewar <dewar@adacore.com>
2473 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
2476 2014-02-19 Vincent Celier <celier@adacore.com>
2478 * prj-part.adb (Parse_Single_Project): Use the fully resolved
2479 project path, with all symbolic links resolved, to check if the
2480 same project is imported with a different unresolved path.
2481 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
2482 changed to Resolved_Path to reflect that all symbolic links
2485 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2487 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
2488 from sem_ch13, for use elsewhere.
2489 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
2490 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
2491 cursor type on the loop variable when the iteration is over o
2494 2014-02-19 Vincent Celier <celier@adacore.com>
2496 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
2497 for an empty Target (Check_Target): Never fail when an empty
2498 target is declared in the configuration project.
2500 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2502 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
2503 the pragma comes fron a predicate aspect and the context is a
2504 record declaration within the scope that declares the type.
2506 2014-02-19 Robert Dewar <dewar@adacore.com>
2508 * gnat_rm.texi: Minor clarifications.
2509 * expander.adb, sem_aggr.adb: Add comments.
2511 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2513 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
2514 applies to a subprogram body, the name is the current scope,
2515 rather than being declared in the current scope.
2516 (Analyze_Pragma, case No_Return): Handle properly a No_Return
2517 aspect applied to a subprogram body.
2519 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2521 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
2522 of overloaded subprograms, and fix bug in handling of primitive
2525 2014-02-19 Pascal Obry <obry@adacore.com>
2527 * s-os_lib.adb: Minor reformatting.
2529 2014-02-19 Yannick Moy <moy@adacore.com>
2531 * expander.adb (Expand): Do nothing inside generics.
2532 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
2535 2014-02-19 Yannick Moy <moy@adacore.com>
2537 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
2539 2014-02-19 Robert Dewar <dewar@adacore.com>
2541 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
2542 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
2545 2014-02-19 Claire Dross <dross@adacore.com>
2547 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
2548 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
2550 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2552 * sem_ch3.adb (Analyze_Declarations): Analyze
2553 a package contract at the end of the private declarations (if
2554 applicable), otherwise analyze it and the end of the visible
2557 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2559 * style.adb (Missing_Overriding): If subprogram is an
2560 instantiation, place warning on the instance node itself,
2561 without mention of the original generic. Do not emit message
2562 if explicit Ada version is older than the introduction of the
2563 overriding indicator.
2565 2014-02-19 Yannick Moy <moy@adacore.com>
2567 * gnat_rm.texi: Doc clarifications.
2569 2014-02-19 Yannick Moy <moy@adacore.com>
2571 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
2574 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2576 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
2577 specified First primitive, rather than by name.
2578 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
2579 and extend error checking for missing primitives and incorrect
2582 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2584 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
2585 errors when a Synchronization aspect on an overriding protected
2586 operation does not match the given aspect on the overridden
2587 operation of an ancestor interface.
2589 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2591 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
2592 (Check_Loop_Pragma_Placement): Update
2593 comment on usage. Remove local variables Orig_Stmt and
2594 Within_Same_Sequence. Check that the current Loop_Invariant or
2595 Loop_Variant pragma is grouped together with other such pragmas.
2596 (Is_Loop_Pragma): New routine.
2597 (Prev_In_Loop): Removed.
2599 2014-02-19 Robert Dewar <dewar@adacore.com>
2601 * par-ch6.adb (P_Return): For extended return, end column lines
2603 * par.adb: Minor documentation clarification.
2605 2014-02-19 Yannick Moy <moy@adacore.com>
2607 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
2608 that Loop_Invariant and Loop_Variant appear consecutively.
2609 * gnat_rm.texi Update documentation of Loop_Invariant and
2610 Loop_Variant pragmas.
2612 2014-02-19 Robert Dewar <dewar@adacore.com>
2614 * debug.adb: Document -gnatd.X.
2615 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
2617 (Check_Then_Column): Ditto.
2618 * styleg.adb (Check_Then): Allow THEN on line after IF.
2619 (Check_Then): Check THEN placement under control of -gnatd.X
2620 * styleg.ads (Check_Then): Now called even if THEN is not first
2622 * stylesw.ads (Style_Check_If_Then_Layout): Document new
2624 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
2626 2014-02-19 Robert Dewar <dewar@adacore.com>
2628 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
2629 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
2630 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
2631 vms_conv.adb: Fix bad layout of IF statements
2633 2014-02-19 Robert Dewar <dewar@adacore.com>
2635 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
2637 2014-02-19 Robert Dewar <dewar@adacore.com>
2639 * exp_util.adb: Update comments.
2641 2014-02-19 Doug Rupp <rupp@adacore.com>
2643 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
2644 * init.c (__gl_float_format): [VMS] New global.
2645 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
2646 representation in effect.
2648 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2650 * exp_ch6.adb Add with and use clause for Exp_Prag.
2651 (Expand_Contract_Cases): Relocated to Exp_Prag.
2652 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
2653 * exp_prag.adb Add with and use clauses for Checks and Validsw.
2654 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
2655 structure of the expanded code to showcase the evaluation of
2656 attribute 'Old prefixes. Add local variable Old_Evals. Expand
2657 any attribute 'Old references found within a consequence. Add
2658 circuitry to evaluate the prefixes of attribute 'Old that
2659 belong to a selected consequence.
2660 (Expand_Old_In_Consequence): New routine.
2661 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
2662 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
2663 potentially unevaluated prefix is always evaluated.
2665 2014-02-19 Robert Dewar <dewar@adacore.com>
2667 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
2668 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
2669 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
2670 handling for the case of Modify_Tree_For_C, this approach did
2672 * exp_util.adb (Matching_Standard_Type): New function
2673 (Side_Effect_Free): New top level functions (from
2674 Remove_Side_Effects).
2675 * exp_util.ads (Side_Effect_Free): New top level functions
2677 * sinfo.ads: Minor comment updates.
2679 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2681 * exp_ch6.adb (Expand_Simple_Function_Return): If return
2682 type is unconstrained and uses the secondary stack, mark the
2683 enclosing function accordingly, to ensure that the value is not
2684 prematurely removed.
2686 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2688 * par.adb Alphabetize the routines in Par.Sync.
2689 (Resync_Past_Malformed_Aspect): New routine.
2690 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
2691 variables. Code and comment reformatting. Detect missing
2692 parentheses on aspects [Refined_]Global and [Refined_]Depends
2693 with a non-null definition.
2694 * par-sync.adb: Alphabetize all routines in this separate unit.
2695 (Resync_Past_Malformed_Aspect): New routine.
2697 2014-02-19 Robert Dewar <dewar@adacore.com>
2699 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
2700 if Esize values do not match.
2702 2014-02-19 Yannick Moy <moy@adacore.com>
2704 * sinfo.ads: Minor comment update.
2706 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2708 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
2710 2014-02-19 Thomas Quinot <quinot@adacore.com>
2712 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
2713 that has the No_Ctrl_Actions flag is a suitable node to be
2714 wrapped if the assigned expression has no finalization actions.
2715 * sem_eval.adb (Eval_Entity_Name): For a compile time known
2716 boolean value, mark the corresponding condition SCO as constant.
2718 2014-02-19 Robert Dewar <dewar@adacore.com>
2720 * exp_util.adb: Minor reformatting.
2721 * exp_util.ads (Matching_Standard_Type): New function.
2722 * exp_ch7.adb: Minor reformatting.
2724 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2726 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
2727 to find declaration for Cursor, to handle properly the case of
2728 a discriminated iterable type.
2730 2014-02-19 Vincent Celier <celier@adacore.com>
2732 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
2733 imported library projects with the library ALI dirs, when setting
2735 * prj-env.ads (Ada_Objects_Path): Correct comments about
2736 argument Including_Libraries.
2738 2014-02-19 Gary Dismukes <dismukes@adacore.com>
2740 * gnat_rm.texi: Minor spelling fixes.
2742 2014-02-19 Doug Rupp <rupp@adacore.com>
2744 * init.c: Remove unneeded code.
2745 * fe.h (Float_Format): New macro
2746 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
2748 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2750 * sem_prag.adb (Check_Refined_Global_Item):
2751 A state or variable acts as a constituent only it is part of an
2752 encapsulating state and the state has visible refinement.
2754 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2756 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
2757 postcondition for a function when the expression does not mention
2758 'Result but the function has in-out parameters.
2760 2014-02-19 Robert Dewar <dewar@adacore.com>
2762 * gnat_rm.texi: Add documentation on Value_Size forcing biased
2765 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2767 * lib-xref.ads Remove the small table of letter and symbol usage as we
2770 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2772 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
2773 messages depending on the offending misplaced aspect specifications.
2774 (Diagnose_Misplaced_Aspect_Specifications): New routine.
2776 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2778 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
2779 for iterable aspect primitives.
2780 (Resolve_Iterable_Operation): Use expected signature of iterable
2781 aspect to resolve primitive when overloading is present.
2782 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
2783 (Check_Signature): Removed.
2785 2014-02-19 Yannick Moy <moy@adacore.com>
2787 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
2788 subunit in GNATprove_Mode.
2789 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
2791 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2793 * lib-xref.ads Alphabetize the contents of table
2794 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
2795 for E_Abstract_State. List all letters and symbols in use.
2796 * sem_prag.adb (Analyze_Abstract_State): Update all calls
2797 to Create_Abstract_State to reflect the new signature.
2798 (Create_Abstract_State): Change subprogram profile and update
2799 the comment on usage. Use the proper location of the state
2800 declaration when creating a new abstract state entity. Do not
2801 generate an external name, but simply reuse the name coming from
2802 the state declaration.
2804 2014-02-19 Robert Dewar <dewar@adacore.com>
2806 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
2807 declarations get properly inserted in Modify_Tree_For_C mode.
2808 * sinfo.ads: Minor comment addition.
2810 2014-02-19 Robert Dewar <dewar@adacore.com>
2812 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
2813 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
2815 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2817 * style.adb (Missing_Overriding): Warning does not apply in
2818 language versions prior to Ada 2005.
2819 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
2820 * sem_attr.adb: Add Attribute_Iterable where needed.
2821 * exp_attr.adb: ditto.
2822 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
2823 handle loops and quantified expressions over types that have an
2824 iterable aspect. Called from Expand_Iterator_Loop.
2825 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
2826 with Iterable aspect.
2827 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
2828 subprograms specified in the Iterable aspect have the proper
2829 signature involving container and cursor.
2830 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
2831 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
2832 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
2833 New procedure to retrieve one of the primitives First, Last,
2834 or Has_Element, from the value of the iterable aspect of a
2836 (Is_Container_Element): Predicate to recognize expressions
2837 that denote an element of one of the predefined containers,
2838 for possible optimization. This subprogram is not currently
2839 used, pending ARG discussions on the legality of the proposed
2840 optimization. Worth preserving for eventual use.
2841 (Is_Iterator): Recognize formal container types.
2842 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
2844 2014-02-19 Robert Dewar <dewar@adacore.com>
2846 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
2847 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
2848 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
2849 declarations from list of actions.
2850 * output.ads, output.adb (Delete_Last_Char): New procedure.
2851 * sinfo.ads: Document handling of Mod and expression with actions
2852 in Modify_Tree_For_C mode.
2854 2014-02-19 Ed Schonberg <schonberg@adacore.com>
2856 * par-ch9.adb (P_Task): Add a null statement to produce a
2857 well-formed task body when due to a previous syntax error the
2858 statement list is empty.
2860 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
2862 * sem_prag.adb (Check_Dependency_Clause): Account
2863 for the case where a state with a non-null refinement matches a
2864 null output list. Comment reformatting.
2865 (Inputs_Match): Copy a solitary input to avoid an assertion failure
2866 when trying to match the same input in multiple clauses.
2868 2014-02-19 Gary Dismukes <dismukes@adacore.com>
2870 * sem_attr.adb: Minor typo fix.
2872 2014-02-18 Robert Dewar <dewar@adacore.com>
2874 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
2875 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
2876 (Create_Standard): Create new unsigned types.
2877 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
2878 mode (Expand_N_Reference): Removed, problematic and not needed
2880 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
2882 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
2883 * expander.adb: Remove call to Expand_N_Reference (problematic,
2884 and not needed now).
2885 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
2886 * stand.adb: Read and write unsigned type entities.
2887 * stand.ads: Add new unsigned types.
2889 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
2891 * sem_ch4.adb (Analyze_Call): Do not mark a function call
2892 as being inside an assertion expression as the flag is now removed.
2893 (Check_Ghost_Subprogram_Call): Do not query the
2894 In_Assertion_Expression flag as it is now removed, instead use
2895 a predicate function.
2896 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
2897 In_Assertion_Expression flag as it is now removed, instead use
2898 a predicate function.
2899 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
2900 * sem_util.adb Add with and use clause for Sem_Prag.
2901 (In_Assertion_Expression_Pragma): New routine.
2902 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
2903 * sinfo.adb (In_Assertion_Expression): Removed.
2904 (Set_In_Assertion_Expression): Removed.
2905 * sinfo.ads Remove flag In_Assertion_Expression along with its
2907 (In_Assertion_Expression): Removed along with
2908 pragma Inline. (Set_In_Assertion_Expression): Removed along
2911 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
2913 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
2914 used together with '-r', '-rf' or '-rnb' options.
2916 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
2918 * sem_attr.adb (Analyze_Attribute): Comment
2919 and code reformatting. Use separate routines to check the
2920 legality of attribute 'Old in certain pragmas. Verify
2921 the use of 'Old, 'Result and locally declared entities
2922 within the prefix of 'Old.
2923 (Check_References_In_Prefix): New routine.
2924 (Check_Use_In_Contract_Cases): New routine.
2925 (Check_Use_In_Test_Case): New routine.
2927 2014-02-18 Vincent Celier <celier@adacore.com>
2929 * sem_aux.adb (Is_By_Reference_Type): For each components of
2930 a record type, check also if the component is volatile as it
2931 may have an aspect that makes it volatile. If it is, then the
2932 record type is a by reference type.
2934 2014-02-18 Robert Dewar <dewar@adacore.com>
2936 * exp_attr.adb: Minor reformatting.
2937 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
2938 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
2939 as another case where we don't generate N_Reference nodes for
2941 * expander.adb (Expand): Add call to Expand_N_Reference.
2943 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2945 * sem_prag.adb (Analyze_Refined_Pragma): Remove
2946 local variable Pack_Spec. Refinement pragmas may now apply to
2947 bodies of both visible and private subprograms.
2949 2014-02-06 Robert Dewar <dewar@adacore.com>
2951 * exp_attr.adb (Expand_Loop_Entry_Attribute):
2952 Minor change (Attr => N) (Expand_Pred_Succ): New name
2953 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
2954 Max): Expand into if expression if Modify_Tree_For_C mode.
2955 (Expand_N_Attribute_Reference, case Min): ditto
2956 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
2959 2014-02-06 Ed Schonberg <schonberg@adacore.com>
2961 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
2962 predicate check if this is an internal declaration with
2963 No_Initialization set, as for an expanded aggregate component.
2965 2014-02-06 Doug Rupp <rupp@adacore.com>
2967 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
2968 conditions with severity of "SUCCESS" or "INFORMATIONAL".
2970 2014-02-06 Yannick Moy <moy@adacore.com>
2972 * sem_prag.adb (Analyze_Pragma): Analyze pragma
2973 Debug rewritten node before rewriting it as a null statement in
2976 2014-02-06 Robert Dewar <dewar@adacore.com>
2978 * sem_attr.adb (Min_Max): New procedure.
2979 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
2982 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
2984 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
2987 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
2989 * sem_prag.adb (Analyze_Abstract_State): Update
2990 all calls to Create_Abstract_State to pass the proper state
2992 (Create_Abstract_State): Add new formal parameter
2993 State_Decl along with comment on usage. Establish a link between
2994 the abstract state entity and the state declaration.
2996 2014-02-06 Robert Dewar <dewar@adacore.com>
2998 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
2999 comparison of unordered enumeration type.
3000 (Analyze_Attribute, case Max): Check for improper comparison of
3001 unordered enumeration type.
3002 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
3004 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
3005 Moved here from Sem_Res.
3007 2014-02-06 Robert Dewar <dewar@adacore.com>
3009 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
3012 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3014 * sem_ch6.adb (Process_Formals): Error message reformatting.
3016 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3018 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
3019 variable Spec. Do not inherit the null indicator from the
3020 subprogram body when generating the spec.
3022 2014-02-06 Robert Dewar <dewar@adacore.com>
3024 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
3027 2014-02-06 Ed Schonberg <schonberg@adacore.com>
3029 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
3030 when the function has a foreign convention, but not if only the
3031 limited return type has such a convention.
3033 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3035 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
3036 variable Spec. Comment reformatting. Use Copy_Separate_Tree
3037 rather than New_Copy_Tree when building the corresponding
3038 subprogram declaration.
3040 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3042 * sem_prag.adb (Analyze_Global_Item): Remove
3043 the mode-related checks on abstract states with enabled external
3045 (Property_Error): Removed.
3047 2014-02-06 Javier Miranda <miranda@adacore.com>
3049 * lib-xref.adb (Generate_Reference): When
3050 generating the reference to the first private entity take care
3051 of handling swapped entities.
3053 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
3055 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
3058 2014-02-06 Robert Dewar <dewar@adacore.com>
3060 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
3061 than the word size when operating in Modify_Tree_For_C mode.
3062 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
3064 2014-02-06 Robert Dewar <dewar@adacore.com>
3066 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
3067 compare is case insensitive.
3068 * gnat_rm.texi: Document that string compare for Warnings Off
3069 is now case insensitive.
3071 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
3073 * gnat_rm.texi: Small wording tweak.
3075 2014-02-06 Pascal Obry <obry@adacore.com>
3077 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
3078 and Included_Artifact_Patterns attribute definitions.
3080 2014-02-06 Yannick Moy <moy@adacore.com>
3082 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
3083 SPARK_Mode pragma component for all subprograms, including stubs.
3085 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3087 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
3088 the configuration options of the enclosing context in a
3090 (Analyze_Subprogram_Body_Stub): Maintain the
3091 configuration options of the enclosing context in a stack-like
3094 2014-02-06 Robert Dewar <dewar@adacore.com>
3096 * debug.adb: -gnatd.u sets Modify_Tree_For C
3097 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
3098 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
3099 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
3100 * exp_intr.adb (Expand_Shift): Call expander so we do
3101 Modify_Tree_For_C expansions.
3102 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
3105 2014-02-06 Fedor Rybin <frybin@adacore.com>
3107 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
3108 after the phase 1 of the processing of each aggregated project
3109 to get access to project trees of aggregated projects.
3110 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
3111 If specified, On_New_Tree_Loaded is called after each aggregated
3112 project has been processed succesfully.
3113 (Process): new parameter On_New_Tree_Loaded.
3114 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
3115 callback added after processing of each aggregated project.
3116 (Recursive_Process): new parameter On_New_Tree_Loaded.
3117 (Process): new parameter On_New_Tree_Loaded.
3118 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
3119 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
3121 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
3124 2014-02-06 Bob Duff <duff@adacore.com>
3126 * gnat_ugn.texi: Implement --insert-blank-lines and
3127 --preserve-blank-lines switches.
3129 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
3131 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
3134 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
3136 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
3137 of the pragma on individual objects.
3139 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3141 * einfo.adb Node29 is now used as BIP_Initialization_Call.
3142 (BIP_Initialization_Call): New routine.
3143 (Set_BIP_Initialization_Call): New routine.
3144 (Write_Field29_Name): Add an entry for constants and variables.
3145 * einfo.ads Add new attribute BIP_Initialization_Call and update
3147 (BIP_Initialization_Call): New routine along with pragma Inline.
3148 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
3149 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
3150 Add local declaration Res_Decl. Capture the build-in-place
3151 initialization call when the related object declaration has
3152 created a transient block.
3153 * exp_ch7.adb (Process_Transient_Objects): Add local variable
3154 Fin_Insrt. Recognize a scenario where an object declaration acts
3155 as a transient context and is initialized by a build-in-place
3158 2014-02-06 Pascal Obry <obry@adacore.com>
3160 * prj-util.adb (For_Interface_Sources): Fix handling of required
3161 bodies for aggregate libs.
3163 2014-02-06 Robert Dewar <dewar@adacore.com>
3165 * nlists.ads: Minor comment clarifications.
3167 2014-02-06 Robert Dewar <dewar@adacore.com>
3169 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
3171 * opt.ads (Modify_Tree_For_C): New flag.
3172 * output.ads, output.adb (Last_Char): New function.
3174 2014-02-06 Pascal Obry <obry@adacore.com>
3176 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
3177 share/gpr for cross-builds.
3179 2014-02-06 Robert Dewar <dewar@adacore.com>
3181 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
3182 Minor reformatting and code clean ups.
3184 2014-02-06 Pascal Obry <obry@adacore.com>
3186 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
3187 * prj.ads: Minor typo fix in comment.
3189 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3191 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
3192 local variable Expr. Flag clauses with extra parenthesis as this
3193 is not allowed by the syntax of the pragma. Code reformatting.
3195 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3197 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
3198 variables. Rename variabme Tnn to Temp. Do not create a temporary
3199 if assertions are disabled. Find enclosing routine _Postconditions
3200 and insert the temporary that captures the value of the prefix
3202 * exp_ch6.adb (Build_Postconditions_Procedure):
3203 Insert the generated _Postconditions routine
3204 before the first source declaration of the related
3206 (Insert_After_Last_Declaration): Removed.
3207 (Insert_Before_First_Source_Declaration): New routine.
3209 2014-02-06 Ed Schonberg <schonberg@adacore.com>
3211 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
3212 Utility to determine whether current expansion is for the body
3213 of a predefined primitive operation.
3214 (Make_Predicate_Check): Use Within_Internal_Subpgram
3215 * checks.adb (Apply_Predicate_Check): Use
3216 Within_Internal_Subprogram
3217 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
3219 2014-02-06 Pascal Obry <obry@adacore.com>
3221 * prj.ads, prj-util.adb: Minor reformatting.
3223 2014-02-06 Ed Schonberg <schonberg@adacore.com>
3225 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
3226 Take into account the Split_PPC flag to ensure that conjuncts
3227 in a composite postcondition aspect are tested in source order.
3229 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3231 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
3233 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
3234 illegal use of SPARK_Mode.
3235 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
3236 * sem_prag.adb (Analyze_Pragma): Code reformatting.
3237 * sem_util.adb Add with and use clause for Aspects.
3238 (Check_SPARK_Mode_In_Generic): New routine.
3239 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
3241 2014-02-06 Thomas Quinot <quinot@adacore.com>
3243 * a-calend.adb (Formatting_Operations.Split): Ensure that
3244 Time_Error is raised for invalid time values.
3246 2014-02-06 Arnaud Charlet <charlet@adacore.com>
3248 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
3251 2014-02-06 Robert Dewar <dewar@adacore.com>
3253 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
3254 * exp_ch3.adb (Build_Dcheck_Function): Set
3255 Is_Discriminant_Check_Function.
3257 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3259 * exp_ch7.adb (Is_Subprogram_Call): Inspect
3260 the original tree in certain cases where a construct has been
3261 factored out and replaced by a reference to a temporary.
3263 2014-02-06 Ed Schonberg <schonberg@adacore.com>
3265 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
3266 parameters when propagating predicate function to full view.
3267 (Find_Type_Of_Object): Freeze base type of object type to catch
3268 premature use of discriminated private type without a full view.
3270 2014-02-06 Robert Dewar <dewar@adacore.com>
3272 * sprint.adb: Minor reformatting.
3274 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3276 * exp_ch4.adb (Process_Transient_Object): Add local variable
3277 Temp_Ins. When the transient object is initialized by an
3278 aggregate, the hook must capture the object after the last
3279 component assignment takes place.
3280 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
3281 routine Is_Subprogram_Call.
3282 (Is_Subprogram_Call): Inspect an
3283 aggregate that has been heavily expanded for subprogram calls.
3284 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
3285 and Temp_Ins. Remove the nested declare block and adjust the
3286 indentation. When the transient object is initialized by an
3287 aggregate, the hook must capture the object after the last
3288 component assignment takes place.
3290 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3292 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
3293 external states with enabled properties that do not match the
3295 (Property_Error): New routine.
3296 * sem_res.adb (Property_Error): New routine.
3297 (Resolve_Actuals): Detect illegal uses of external variables with
3298 enabled properties in procedure calls that do not match the mode of
3299 the corresponding formal parameter.
3301 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
3303 * sem_util.adb (Has_Enabled_Property): Rename
3304 formal parameter Prop_Nam to Property. Update the comment on usage
3305 and all occurrences in the body. Add local variable Prop_Nam. When
3306 inspecting a property with an expression, the property name
3307 appears as the first choice of the component association.
3309 2014-02-04 Robert Dewar <dewar@adacore.com>
3311 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
3313 2014-02-04 Gary Dismukes <dismukes@adacore.com>
3315 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
3316 for consistency with other messages.
3318 2014-02-04 Ed Schonberg <schonberg@adacore.com>
3320 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
3321 iterator, indicate that the element is a constant if the container
3322 type does not have a variable indexing aspect.
3323 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
3324 marked as constant, do not reset its Ekind, to ensure that
3325 container elements in an element loop are not modified if the
3326 container (e.g. a hashed set) only has a constant indexing aspect.
3328 2014-02-04 Arnaud Charlet <charlet@adacore.com>
3330 * g-souinf.ads: Subprograms in this unit are actually not pure.
3331 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
3332 * einfo.ads (Is_Pure): Update doc to match implementation.
3334 2014-02-04 Gary Dismukes <dismukes@adacore.com>
3336 * exp_ch13.adb: Minor spelling fix.
3338 2014-02-04 Robert Dewar <dewar@adacore.com>
3340 * opt.ads: Minor comment update.
3342 2014-02-04 Robert Dewar <dewar@adacore.com>
3344 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
3347 2014-02-04 Ed Schonberg <schonberg@adacore.com>
3349 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
3350 on null expressions if component type is non-null, when the
3351 corresponding association covers an empty range of index values.
3353 2014-02-04 Robert Dewar <dewar@adacore.com>
3355 * sinfo.ads: Further comments on N_Expression_With_Actions node.
3357 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
3359 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
3360 variables Out_Items and Ref_Global. Remove local constant
3361 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
3362 and D8. Remove the useless collection of global items as this
3363 was a leftover from an earlier version of the routine. Move
3364 several routines out to avoid deep nesting and indentation.
3365 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
3366 parameter Do_Checks to Post_Errors. Update the comment on usage.
3367 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
3368 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
3369 to Post_Errors. Update the comment on usage. Account for the
3370 case where a self referential state may have a null input_list.
3371 (Is_Self_Referential): New routine.
3373 2014-02-04 Ed Schonberg <schonberg@adacore.com>
3375 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
3376 entity renames an expression, as in the case of an object of
3377 an unconstrained type initialized by a function call, defer the
3378 rewriting of the expression to the expander.
3379 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
3380 'Alignment): If the entity renames an expression, introduce
3381 temporary to capture value, and rewrite original declaration to
3384 2014-02-04 Gary Dismukes <dismukes@adacore.com>
3386 * g-comlin.adb: Minor typo fix.
3388 2014-02-04 Ed Schonberg <schonberg@adacore.com>
3390 * freeze.adb (Freeze_All): Types derived from a formal
3391 access_to_classwide type do not have a finalization master.
3393 2014-02-04 Robert Dewar <dewar@adacore.com>
3395 * sprint.adb: Minor reformatting.
3397 2014-02-04 Robert Dewar <dewar@adacore.com>
3399 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
3400 cases where Actions is a null list.
3401 * sinfo.ads (N_Expression_With_Actions): Actions can be
3402 temporarily empty during semantic analysis, but must be non-empty
3403 in the final expanded tree.
3405 2014-01-31 Robert Dewar <dewar@adacore.com>
3407 * exp_ch9.adb: Minor reformatting.
3409 2014-01-31 Emmanuel Briot <briot@adacore.com>
3411 * g-comlin.adb (Set_Command_Line): Take the switches
3412 configuration from the Command_Line_Config.
3414 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
3416 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
3419 2014-01-31 Vincent Celier <celier@adacore.com>
3421 * projects.texi: Add more documentation about others used as an
3422 index in indexed attributes.
3424 2014-01-31 Robert Dewar <dewar@adacore.com>
3426 * gnat_ugn.texi: Minor update.
3427 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
3428 * exp_util.adb: Minor reformatting.
3430 2014-01-31 Ed Schonberg <schonberg@adacore.com>
3432 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
3433 depends on data that is not private to the protected object,
3434 and potentially modifiable in unsynchronized fashion.
3436 2014-01-31 Yannick Moy <moy@adacore.com>
3438 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
3441 2014-01-31 Robert Dewar <dewar@adacore.com>
3443 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
3444 for Unknown_Package.
3445 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
3447 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
3449 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
3450 the logic that generates a runtime check to determine the
3451 controlled status of the object about to be allocated or
3452 deallocated. Class-wide types now always use a runtime check
3453 even if they appear as generic actuals.
3454 (Find_Object): Detect
3455 a special case that involves interface class-wide types because
3456 the object appears as a complex expression.
3458 2014-01-31 Ed Schonberg <schonberg@adacore.com>
3460 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
3461 subprogram with an incomplete untagged formals on the list of
3462 private dependents, to verify that the type is properly completed
3463 in the private part.
3464 * sem_attr.adb: Code clean up.
3466 2014-01-31 Robert Dewar <dewar@adacore.com>
3468 * exp_ch6.adb: Minor reformatting.
3470 2014-01-31 Vincent Celier <celier@adacore.com>
3472 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
3473 when Pkg is unknown.
3475 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
3477 * sem_res.adb (Resolve_Entity_Name): Comment
3478 reformatting. Allow volatile objects in various generated checks.
3480 2014-01-31 Ed Schonberg <schonberg@adacore.com>
3482 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
3483 component association, set the etype of the identifier, for
3486 2014-01-31 Ed Schonberg <schonberg@adacore.com>
3488 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
3489 declared in a package, not checks can apply to the subprogram.
3491 2014-01-31 Robert Dewar <dewar@adacore.com>
3493 * erroutc.adb (Validate_Specific_Warnings): Warnings are
3494 controlled -gnatw.W.
3495 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
3496 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
3498 2014-01-31 Arnaud Charlet <charlet@adacore.com>
3500 * exp_disp.adb: Update comments.
3502 2014-01-31 Yannick Moy <moy@adacore.com>
3504 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
3505 Save_Global_References): Guard access to expression in aspect.
3507 2014-01-31 Yannick Moy <moy@adacore.com>
3509 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
3510 Issue an error when the pragma is applied to a generic unit,
3511 a generic declaration, or inside a generic.
3513 2014-01-31 Yannick Moy <moy@adacore.com>
3515 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
3518 2014-01-31 Robert Dewar <dewar@adacore.com>
3520 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
3523 2014-01-31 Tristan Gingold <gingold@adacore.com>
3525 * exp_disp.adb: Add a historic note.
3527 2014-01-31 Robert Dewar <dewar@adacore.com>
3529 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
3530 Process_Deferred_References.
3532 2014-01-31 Yannick Moy <moy@adacore.com>
3534 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
3535 ineffective pragma Warnings(Off) in GNATprove_Mode.
3537 2014-01-31 Bob Duff <duff@adacore.com>
3539 * s-taskin.ads: Minor comment fix.
3540 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
3541 just direct dependents. If this is actually an abort, each task
3542 will take care of aborting its dependents, so all dependents will
3543 get aborted, as before. However, when this is called the second
3544 time from Vulnerable_Complete_Master "for convenience" (i.e. to
3545 kill off tasks waiting at terminate alternatives), aborting
3546 indirect dependents is wrong, because it causes some unrelated
3547 tasks to get aborted.
3549 2014-01-31 Robert Dewar <dewar@adacore.com>
3551 * sem_ch4.adb: Minor reformatting.
3553 2014-01-31 Robert Dewar <dewar@adacore.com>
3555 * exp_ch2.adb: New calling sequence for Is_LHS.
3556 * frontend.adb: Add call to Process_Deferred_References.
3557 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
3558 (Deferred_References): New table.
3559 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
3561 (Find_Expanded_Name): Ditto.
3562 * sem_res.adb: New calling sequence for Is_LHS.
3563 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
3564 * sem_warn.adb: Call Process_Deferred_References before issuing
3567 2014-01-31 Tristan Gingold <gingold@adacore.com>
3569 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
3570 use of System_Tasking_Protected_Objects_Single_Entry.
3571 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
3572 of Protected_Single_Entry_Call.
3573 (Expand_N_Timed_Entry_Call): Remove single_entry case.
3574 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
3576 (Make_Disp_Timed_Select_Body): Likewise.
3577 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
3578 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
3580 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
3581 (Wait_For_Completion_With_Timeout): Remove.
3582 (Protected_Single_Entry_Call): Remove Mode parameter
3583 (always Simple_Call).
3584 (Service_Entry): Remove Self_Id constant (not used anymore).
3585 (Timed_Protected_Single_Entry_Call): Remove.
3586 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
3587 (Protected_Single_Entry_Call): Remove Mode parameter.
3589 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3591 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
3592 * einfo.ads (Get_Pragma): Update the comment on special pragmas
3593 handled by this routine.
3594 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
3595 to the contract of the related subprogram body.
3596 * sem_util.adb (Add_Contract_Item): Handle the insertion of
3597 pragma Refined_Post into the contract of a subprogram body.
3598 * sinfo.ads Update the documentation of node N_Contract.
3599 * sem_res.adb (Resolve_Entity_Name): Add a guard
3600 to detect abstract states and variables only when checking the
3601 SPARK 2014 rules concerning volatile object placement.
3603 2014-01-29 Ed Schonberg <schonberg@adacore.com>
3605 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
3606 null is compatible with any access type.
3608 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3610 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
3611 placement is not in a package.
3613 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3615 * sem_util.adb (Has_Enabled_Property): Compare the character field of
3618 2014-01-29 Robert Dewar <dewar@adacore.com>
3620 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
3621 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
3622 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
3624 2014-01-29 Robert Dewar <dewar@adacore.com>
3626 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
3627 * sem_warn.adb (Check_References): Suppress warnings if inside
3628 Initial_Condition pragma.
3630 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3632 * sem_prag.adb (Check_Missing_Part_Of): List all values of
3633 State_Space_Kind for readability reasons. Do not emit an error on
3634 a private item when the enclosing package lacks aspect/pragma
3635 Abstract_State. Do not emit an error on a private package
3636 instantiation when the corresponding generic template lacks
3638 (Has_Visible_State): New routine.
3639 * sem_util.adb (Find_Placement_In_State_Space): The visible
3640 declarations of any kind of child units in general act as proper
3643 2014-01-29 Robert Dewar <dewar@adacore.com>
3645 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
3646 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
3647 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
3648 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
3649 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
3650 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
3651 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
3652 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
3653 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
3654 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
3655 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
3656 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
3657 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
3658 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
3659 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
3660 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
3661 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
3662 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
3663 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
3664 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
3665 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
3666 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
3667 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
3668 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
3669 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
3670 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
3671 s-regpat.adb, s-secsta.adb, s-stalib.ads,
3672 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
3673 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
3674 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
3675 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
3676 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
3678 2014-01-29 Robert Dewar <dewar@adacore.com>
3680 * expander.adb: Minor reformatting.
3682 2014-01-29 Javier Miranda <miranda@adacore.com>
3684 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
3687 2014-01-29 Javier Miranda <miranda@adacore.com>
3689 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
3690 that checks if an interface types defines the predefined "="
3691 function because the compiler was erroneously not generating the
3692 predefined "=" primitive as soon as the name of some interface
3693 primitive is "=" (formals were not checked).
3695 2014-01-29 Ed Schonberg <schonberg@adacore.com>
3697 * expander.adb (Expander): In GNATprove mode, do not process
3698 transient scopes: they are in general not created in this mode,
3699 and an attempt to examine them will lead to constraint errors when
3700 processing configuration pragmas that have analyzable expressions.
3702 2014-01-29 Vincent Celier <celier@adacore.com>
3704 * clean.adb (Gnatclean): Fail if main project is an aggregate
3705 project or if there is an aggregate library project in the
3707 * gnatcmd.adb: Fail if the main project is an aggregate project
3708 or if there is an aggegate library project in the project tree.
3709 * make.adb (Initialize): : Fail if main project is an aggregate
3710 project or if there is an aggregate library project in the
3712 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
3713 * prj-makr.adb (Initialize): Fail if the main project is an
3714 aggregate project or an aggregate library project.
3716 2014-01-29 Vincent Celier <celier@adacore.com>
3718 * prj-part.adb (Check_Import_Aggregate): New procedure
3719 to check if an imported project is an aggregate project.
3720 (Parse_Single_Project): Call Check_Import_Aggregate
3721 * projects.texi: Document that aggregate projects cannot be
3722 extended or imported.
3724 2014-01-29 Robert Dewar <dewar@adacore.com>
3726 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
3727 reformatting and code clean up.
3728 * gnat_ugn.texi: Add documentation section on Atomic Variables
3731 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3733 * einfo.adb Flag264 is now unused.
3734 (Has_Body_References): Removed.
3735 (Set_Has_Body_References): Removed.
3736 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
3737 * einfo.ads Update the comment on usage of attribute
3738 Body_References. Remove attribute Has_Body_References and its
3740 (Has_Body_References): Removed along with pragma Inline.
3741 (Set_Has_Body_References): Removed along with pragma Inline.
3742 * sem_prag.adb (Analyze_Global_Item): Move the call to
3743 Record_Possible_Body_Reference in the state related checks
3744 section. Add a comment intended function.
3745 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
3746 in the state related checks section. Add a comment intended function.
3747 (Analyze_Refinement_Clause): Cleanup the illegal body reference
3748 reporting. Add a comment on timing of error reporting.
3749 (Record_Possible_Body_Reference): Reimplement the routine.
3751 2014-01-29 Vincent Celier <celier@adacore.com>
3753 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
3754 unit-based languages.
3755 (Mains.Complete_Mains.Do_Complete): Use the source file project
3756 tree when calling Find_File_Add_Extension. Use the correct
3757 project name when reporting an error.
3759 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
3761 * aspects.adb Add an entry for aspect Part_Of in table
3763 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
3764 Aspect_Argument, Aspect_Names and Aspect_Delay.
3765 * atree.h Define Elist9.
3766 * atree.adb (Elist9): New routine.
3767 (Set_Elist9): New routine.
3768 * atree.ads (Elist9): New routine.
3769 (Set_Elist9): New routine.
3770 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
3771 the list of node usage. Remove Refined_State from the list of
3773 (Encapsulating_State): New routine.
3775 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
3776 (Refined_State): Removed.
3777 (Set_Encapsulating_State): New routine.
3778 (Set_Part_Of_Constituents): New routine.
3779 (Set_Refined_State): Removed.
3780 (Write_Field9_Name): Add an entry
3781 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
3782 Encapsulating_State. Remove the entry for Refined_State.
3783 * einfo.ads Add new attributes Encapsulating_State
3784 and Part_Of_Constituents alond with their usage in
3785 entities. Remove attribute Refined_State along with its
3787 (Encapsulating_State): New routine and
3788 pragma Inline. (Get_Pragma): Update the comment on usage.
3789 (Part_Of_Constituents): New routine and pragma Inline.
3790 (Refined_State): Removed along with pragma Inline.
3791 (Set_Encapsulating_State): New routine and pragma Inline.
3792 (Set_Part_Of_Constituents): New routine and pragma Inline.
3793 (Set_Refined_State): Removed along with pragma Inline.
3794 * par-prag.adb Pragma Part_Of does not need any special processing
3796 * sem_ch3.adb (Analyze_Declarations): Remove local variables
3797 Body_Id and Prag. Call separate routines to analyze the
3798 contract of a package [body].
3799 (Analyze_Object_Contract):
3800 Update the comment on usage. Remove local variables
3801 Items and Nam. Use Get_Pragma rather than traversing the
3802 classification list. Verify whether the lack of indicator
3803 Part_Of agrees with the placement of the variable in state space.
3804 (Analyze_Object_Declaration): Initialize the encapsulating state
3805 of a variable. (Requires_State_Refinement): Moved to sem_util.
3806 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
3807 (Analyze_Package_Contract): New routine.
3808 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
3809 (Analyze_Package_Contract): New routine.
3810 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
3811 state and Part_Of constituents.
3812 * sem_ch13.adb (Analyze_Aspect_Specifications):
3813 Add processing for aspect Part_Of. Update all
3814 calls to Decorate_Delayed_Aspect_And_Pragma.
3815 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
3816 not need any special processing at freeze time.
3817 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
3818 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
3819 update the associated comment.
3820 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
3821 (Analyze_Abstract_State): Add new global variable State_Id. Remove
3822 local constants Errors and Loc. Remove local variables Is_Null
3823 and State_Nam. Create the entity of the abstract state on the
3824 spot, before all remaining checks are performed. Verify that a
3825 missing Part_Of option agrees with the placement of the abstract
3826 state within the state space.
3827 (Analyze_Depends_In_Decl_Part):
3828 Add new global variables Constits_Seen and States_Seen. Check
3829 that a state and a corresponding constituent do not appear
3830 in pragma [Refined_]Depends.
3831 (Analyze_Global_In_Decl_Part):
3832 Add new global variables Constits_Seen and States_Seen. Check
3833 that a state and a corresponding constituent do not appear
3834 in pragma [Refined_]Global.
3835 (Analyze_Global_Item):
3836 Remove the now obsolete code that deals with Part_Of.
3837 Add the entity of the global item to the list of processed
3838 items. (Analyze_Initializes_In_Decl_Part): Add new global
3839 variables Constits_Seen and States_Seen. Check that a state
3840 and a corresponding constituent do not appear in pragma
3842 (Analyze_Initialization_Item): Add the entity
3843 of the initialization item to the list of processed items.
3844 (Analyze_Input_Item): Add the entity of the initialization
3845 item to the list of processed items.
3846 (Analyze_Input_Output):
3847 Remove the now obsolete code that deals with Part_Of. Add the
3848 entity of the input/output to the list of processed items.
3849 (Analyze_Part_Of): New routine.
3850 (Analyze_Part_Of_Option): Remove
3851 local constant Par_State. Add local constant Encaps and local
3852 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
3853 the option. Turn the related state into a Part_Of constituent
3854 if the option is legal.
3855 (Analyze_Pragma): Add processing
3857 (Analyze_Refined_State_In_Decl_Part):
3858 Remove global constants Pack_Body and Spec_Id. Remove
3859 global variables Abstr_States and Hidden_States. Add new
3860 global variables Available_States, Body_Id, Body_States and
3861 Spec_Id. Add new local constant Body_Decl. Reimplement the
3862 logic that extracts the states available for refinement from
3863 the related package and the body hidden states of the said
3865 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
3866 (Check_Applicable_Policy): Alphabetize body.
3867 (Check_Dependency_Clause): Replace Refined_State
3868 with Encapsulating_State.
3869 (Check_Matching_Constituent):
3870 Reimplement the logic that determines whether an item is a valid
3871 / invalid constituent of the current refined state. Return when
3872 a construct does not denote a valid abstract state. Extract the
3873 list of Part_Of constituents for further analysis. Check that all
3874 Part_Of constituents of a state have been used in its refinement.
3875 (Check_Matching_State): Update the comment on usage. Operate
3876 on the list of available states.
3877 (Check_Missing_Part_Of): New routine.
3878 (Check_Refined_Global_Item): Replace Refined_State
3879 with Encapsulating_State.
3880 (Check_State_And_Constituent_Use): New routine.
3881 (Create_Abstract_State): New routine.
3882 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
3883 (Is_Part_Of): Removed.
3884 (Collect_Body_States): New routine.
3885 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
3886 (Collect_Hidden_States): Removed.
3887 (Report_Unrefined_States): Change the profile of the procedure along
3888 with the comment on usage.
3889 (Report_Unused_Constituents): New routine.
3890 (Report_Unused_Hidden_States): Removed.
3891 (Report_Unused_States): New routine.
3892 * sem_prag.ads (Check_Missing_Part_Of): New routine.
3893 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
3894 appear in the classification pragmas of a package instantiation
3896 (Find_Placement_In_State_Space): New routine.
3897 (Is_Child): Removed.
3898 (Is_Child_Or_Sibling): Remove formal
3899 parameter Private_Child. Remove the private child checks.
3900 (Requires_State_Refinement): Moved from sem_ch3.
3901 * sem_util.ads Add new type State_Space_Kind along with
3902 comment on its usage and values.
3903 (Add_Contract_Item): Update the comment on usage.
3904 (Find_Body_Discriminal): Alphabetize spec.
3905 (Find_Placement_In_State_Space): New routine.
3906 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
3907 and update the comment on usage.
3908 (Requires_State_Refinement): Moved from sem_ch3.
3909 * sinfo.ads: Update the documentation of N_Contract.
3910 * snames.ads-tmpl The predefined name for Part_Of is now used
3911 to denote a pragma. Add Pragma_Id for Part_Of.
3913 2014-01-29 Emmanuel Briot <briot@adacore.com>
3915 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
3917 (Dump): New subprogram.
3919 2014-01-29 Tristan Gingold <gingold@adacore.com>
3921 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
3922 Expand_Entry_Declaration to factorize code.
3924 2014-01-29 Ed Schonberg <schonberg@adacore.com>
3926 * checks.adb: minor clarification.
3927 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
3928 search for primitive operations to the entities that immediately
3929 follow the type declaration.
3931 2014-01-29 Tristan Gingold <gingold@adacore.com>
3933 * exp_ch9.adb (Build_Protected_Entry): Do not call
3934 Complete_Entry_Body anymore.
3935 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
3936 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
3938 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
3940 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
3941 string when the Name input bigger than allowed. Adapt the function
3944 2014-01-29 Ed Schonberg <schonberg@adacore.com>
3946 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
3947 if expression is within a case_expression of if_expression.
3949 2014-01-29 Robert Dewar <dewar@adacore.com>
3951 * exp_ch9.adb, inline.ads: Minor reformatting.
3953 2014-01-29 Tristan Gingold <gingold@adacore.com>
3955 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
3957 2014-01-29 Yannick Moy <moy@adacore.com>
3959 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
3960 SPARK_Mode_Pragma components to be able to analyze generic
3962 * sem_ch12.adb (Analyze_Package_Instantiation,
3963 Inline_Instance_Body, Need_Subprogram_Instance_Body,
3964 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
3965 for future analysis of the instance.
3966 (Instantiate_Package_Body,
3967 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
3968 from instantiation to analyze the instance.
3970 2014-01-29 Robert Dewar <dewar@adacore.com>
3972 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
3975 2014-01-29 Yannick Moy <moy@adacore.com>
3977 * gnat_rm.texi: Update description of SPARK_Mode pragma.
3979 2014-01-29 Tristan Gingold <gingold@adacore.com>
3981 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
3983 2014-01-29 Thomas Quinot <quinot@adacore.com>
3985 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
3987 2014-01-29 Ed Schonberg <schonberg@adacore.com>
3989 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
3990 resulting string is an internal entity. and thus requires no
3991 initialization. This is relevant when Initialize_ Scalars is
3992 enabled, because the resultant spurious initialization may lead to
3993 secondary stack anomalies that produce a mangled name for a task.
3995 2014-01-29 Yannick Moy <moy@adacore.com>
3997 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
3998 not inherited from spec anymore. Check consistency
3999 rules after processing of declarations.
4000 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
4001 from spec anymore. Check consistency rules after processing of
4003 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
4005 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
4008 2014-01-27 Robert Dewar <dewar@adacore.com>
4010 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
4012 (Resolve_Range): Add type name/location to unordered msg.
4014 2014-01-27 Claire Dross <dross@adacore.com>
4016 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
4017 Capacity) is only called with Capacity >= Length (Source) and
4018 Capacity in Capacity_Range.
4019 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
4020 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
4021 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
4022 in the code is this is not the case.
4024 2014-01-27 Thomas Quinot <quinot@adacore.com>
4026 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
4027 selected component in an instance where the component of the
4028 actual is not visibile at instantiation.
4030 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4032 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
4033 has a dynamic predicate, generate freeze node for Actual_Subtype
4034 at once, because the declaration of the corresponding predicate
4035 function will make reference to it.
4037 2014-01-27 Tristan Gingold <gingold@adacore.com>
4039 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
4041 2014-01-27 Robert Dewar <dewar@adacore.com>
4043 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
4044 for 2**X optimization.
4046 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4048 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
4049 explicitly whether value is in range of Character, because the
4050 library is typically compiled with range checks disabled, and
4051 we cannot rely on the implicit check on the argument of 'Val.
4053 2014-01-27 Vincent Celier <celier@adacore.com>
4055 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
4056 not the Target to itself.
4058 2014-01-27 Robert Dewar <dewar@adacore.com>
4060 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
4061 changes to avoid incorrect use of unordered enum types.
4063 2014-01-27 Thomas Quinot <quinot@adacore.com>
4065 * sem_ch4.adb: Minor reformatting.
4067 2014-01-27 Robert Dewar <dewar@adacore.com>
4069 * scn.adb (Check_End_Of_Line): Removed.
4070 (Error_Long_Line): Removed.
4071 (Determine_License): Use versions of above routines from Scanner.
4072 * scng.adb (Check_End_Of_Line): Moved to spec.
4073 (Error_Long_Line): Removed, no longer used.
4074 * scng.ads (Check_End_Of_Line): Moved here from body.
4076 2014-01-27 Tristan Gingold <gingold@adacore.com>
4078 * exp_ch7.adb (Build_Cleanup_Statements): Call
4079 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
4081 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
4082 Remove Service_Name variable.
4083 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
4084 factorize code from the above subprograms.
4085 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
4087 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
4089 * einfo.adb (Has_Option): Reimplemented.
4090 * sem_prag.adb (Analyze_Refinement_Clause): Add global
4091 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
4092 External_Constit_Seen and State. Add local variables Body_Ref,
4093 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
4094 avoid a cumbersome while pool. Verify the legality of an external
4095 state and relevant properties.
4096 (Check_External_Property): New routine.
4097 (Check_Matching_State): Remove parameter profile
4098 and update comment on usage.
4099 (Collect_Constituent): Store the
4100 relevant external property of a constituent.
4101 * sem_util.adb (Async_Readers_Enabled): Update the call to
4102 Has_Enabled_Property.
4103 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
4104 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
4105 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
4106 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
4107 Update comment on usage. Reimplement the logic to recognize the various
4108 formats of properties.
4110 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4112 * par-ch5.adb: Minor reformatting.
4114 2014-01-27 Tristan Gingold <gingold@adacore.com>
4116 * s-tposen.ads: Harmonize style and comments.
4118 2014-01-27 Vincent Celier <celier@adacore.com>
4120 * projects.texi: Document that shared library projects, by
4121 default, cannot import projects that are not shared library
4124 2014-01-27 Robert Dewar <dewar@adacore.com>
4126 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
4129 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4131 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
4132 any other exception is raised.
4133 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
4134 still necessary to perform a conversion in order to remove overlong
4137 2014-01-27 Robert Dewar <dewar@adacore.com>
4139 * exp_smem.adb: Minor reformatting.
4141 2014-01-27 Thomas Quinot <quinot@adacore.com>
4143 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
4145 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4147 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
4148 nodes for operands to the original node for the call, to preserve
4149 Original_Node pointers within the resolved operands, given that
4150 they may have been rewritten as well. Previous approach copied
4151 the operands into a new tree and lost those pointers.
4153 2014-01-27 Claire Dross <dross@adacore.com>
4156 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
4158 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4160 * sem_util.adb (Check_Internal_Protected_Use): A call through
4161 an anonymous access parameter of the current protected function
4162 is not a potential modification of the current object.
4164 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4166 * a-cobove.adb (Reserve_Capacity): Procedure raises
4167 Capacity_Error, not Constraint_Error, when request cannot be
4170 2014-01-27 Vincent Celier <celier@adacore.com>
4172 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
4173 not the Target to itself.
4175 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4177 * exp_ch4.adb (Expand_Concatenate): If the target of the
4178 concatenation is a library-level entity, always use the off-line
4179 version of concatenation, regardless of optimization level. This
4180 is space-efficient, and prevents linking problems when some
4181 units are compiled with different optimization levels.
4183 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4185 * sem_ch5.adb: Code clean up.
4187 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4189 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
4190 when an array or container iterator includes a subtype indication,
4191 which is only legal in an element iterator.
4193 2014-01-27 Thomas Quinot <quinot@adacore.com>
4195 * exp_ch7.adb: Minor reformatting.
4197 2014-01-27 Robert Dewar <dewar@adacore.com>
4199 * opt.adb (SPARK_Mode): Default for library units is None rather
4201 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
4203 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
4205 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
4207 2014-01-27 Robert Dewar <dewar@adacore.com>
4209 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
4210 Suspicious_Labels table if we have identifier; followed by loop
4212 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
4213 * par.adb (Suspicious_Labels): New table.
4215 2014-01-27 Robert Dewar <dewar@adacore.com>
4217 * exp_aggr.adb (Check_Bounds): Reason is range check, not
4220 2014-01-27 Yannick Moy <moy@adacore.com>
4222 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
4224 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
4226 (Add_SPARK_Xrefs): Include references to constants.
4227 * spark_xrefs.ads Document new character 'c' for references to
4230 2014-01-27 Thomas Quinot <quinot@adacore.com>
4232 * exp_smem.adb (Add_Write_After): For a function call, insert write as
4233 an after action in a transient scope.
4235 2014-01-27 Thomas Quinot <quinot@adacore.com>
4237 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
4238 to a shared variable as an OUT formal in a call to an init proc,
4239 the 'Read call must be emitted after, not before, the call.
4241 2014-01-27 Robert Dewar <dewar@adacore.com>
4243 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
4245 2014-01-27 Robert Dewar <dewar@adacore.com>
4247 * a-wichha.adb (Character_Set_Version): Change to output proper
4250 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
4252 * einfo.adb (Is_Input_Only_State): Removed.
4253 (Is_Non_Volatile_State): Removed.
4254 (Is_Output_State): Removed.
4255 * einfo.ads (Is_Input_Only_State): Remove attribute and
4256 subprogram. Update related entity.
4257 (Is_Non_Volatile_State):
4258 Remove attribute and subprogram. Update related entity.
4259 (Is_Output_State): Removed attribute and subprogram. Update
4261 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
4263 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
4264 an object, not just variables.
4265 (Analyze_Object_Contract): New routine.
4266 (Analyze_Variable_Contract): Removed.
4267 (Process_Discriminants): Detect an illegal use of volatile
4268 discriminant in SPARK mode.
4269 * sem_ch5.adb (Analyze_Iterator_Specification):
4270 Detect an illegal use of volatile loop variable.
4271 (Analyze_Loop_Parameter_Specification): Detect an illegal use
4272 of volatile loop variable.
4273 * sem_ch6.adb (Process_Formals): Update the volatile object
4274 detection. Detect an illegal formal of mode IN OUT or OUT in
4275 SPARK mode. Enhance the error messages with references.
4276 * sem_ch12.adb (Instantiate_Object): Update the volatile object
4277 detection. Enhance the error messages with references.
4278 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
4279 messages with references.
4280 (Analyze_Contract_Case): Enhance the error messages with references.
4281 (Analyze_External_Property): Call Check_Duplicate_Property to process
4282 an external property.
4283 (Analyze_External_Property_In_Decl_Part): New routine.
4284 (Analyze_External_State_In_Decl_Part): Removed.
4285 (Analyze_Global_Item): Detect an illegal
4286 use of a volatile constant. Detect an illegal use
4287 of a variable with enabled Effective_Reads. Enhance
4288 the error messages with references. Remove obsolete
4289 checks concerning Input_Only and Output_Only states.
4290 (Analyze_Initialization_Item): Enhance the error messages
4292 (Analyze_Initializes_In_Decl_Part): Do not
4293 collect the states and variables when the initialization list
4295 (Analyze_Input_Item): Enhance the error messages with references.
4296 (Analyze_Input_Output): Enhance the error messages with references.
4297 (Analyze_Pragma): Enhance the error messages with references.
4298 (Analyze_Refinement_Clause): Code reformatting.
4299 (Analyze_Refined_Depends_In_Decl_Part):
4300 Rename global variable Global to Reg_Global and update all
4301 occurrences. Add local variables D7 and D8. Update the error
4302 messages with references. Update the call to Collect_Global_Items.
4303 (Analyze_Refined_Global_In_Decl_Part): Add local variables
4304 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
4305 the call to Collect_Global_Items. Account for a Proof_In state
4306 in null / useless refinement checks. Verify the coverage of
4308 (Check_Dependency_Clause): Remove local variable
4309 Out_Constits. Remove the retrieval and removal of constituents
4310 for an Output_Only state. Remove the reporting of unused
4311 Output_Only state constituents.
4312 (Check_Duplicate_Mode): Enhance
4313 the error message with a reference.
4314 (Check_Duplicate_Property): New routine.
4315 (Check_Duplicate_Option): Enhance the error message with a reference.
4316 (Check_External_Properties): Enhance the error message with a reference.
4317 (Check_Function_Return): Enhance the error message with a reference.
4318 (Check_In_Out_States): Update
4319 comment on usage. Add a specialized error message for Proof_In
4320 constituents. Enhance the error message with a reference.
4321 (Check_Input_States): Update comment on usage. Account for
4322 possible Proof_In constituents. Enhance the error message
4324 (Check_Matching_Constituent): Enhance the error message with a
4326 (Check_Matching_State): Enchance the error message with a reference.
4327 (Check_Mode): Add local variable From_Global. Update the call to
4328 Find_Mode. Emit more precise error messages concerning extra items
4329 (Check_Mode_Restriction_In_Enclosing_Context): Consider
4330 pragma Refined_Global. Enhance the error message with a
4332 (Check_Mode_Restriction_In_Function): Enhance the error message with
4334 (Check_Output_States): Update comment on usage. Add local variable
4335 Posted. Account for possible Proof_In constituents. Produce a detailed
4336 list of missing constituents.
4337 (Check_Proof_In_States): New routine.
4338 (Check_Refined_Global_Item): Handle Proof_In
4339 constituents. Enchance the error message with a reference.
4340 (Collect_Global_Items): Add formal parameters Proof_In_Items
4341 and Has_Proof_In_State. Update the comment on usage. Account
4343 (Create_Or_Modify_Clause): Enchance
4344 the error message with a reference.
4346 formal parameter From_Global. Update the comment on usage.
4347 Detect when the mode is governed by pragma [Refined_]Global.
4348 (Output_Constituents): Removed.
4349 (Report_Extra_Constituents):
4350 Report extra Proof_In constituents.
4351 (Report_Unused_Constituents): Removed.
4352 (Usage_Error): Code reformatting. Enhance the error
4353 messages with reference.
4354 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
4355 (Analyze_External_State_In_Decl_Part): Removed.
4356 * sem_res.adb (Resolve_Actuals): Update the volatile object
4357 detection. Enhance the error message with a reference.
4358 (Resolve_Entity_Name): Update the volatile object
4359 detection. Enhance the error message with a reference.
4360 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
4361 (Is_SPARK_Volatile_Object): New routine.
4362 (Has_Volatile_Component): New routine.
4363 * sem_util.ads (Is_Delegate): Alphabetized.
4364 (Is_SPARK_Volatile_Object): New routine.
4365 (Has_Volatile_Component): New routine.
4366 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
4368 2014-01-27 Ed Schonberg <schonberg@adacore.com>
4370 * sem_attr.adb: Resolve fully prefix of 'Update.
4372 2014-01-27 Ben Brosgol <brosgol@adacore.com>
4374 * gnat_rm.texi: Minor clarifications.
4376 2014-01-27 Robert Dewar <dewar@adacore.com>
4378 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
4379 about call that is generated as part of an Initial_Condition
4381 * sem_prag.adb: Minor spelling correction.
4383 2014-01-27 Robert Dewar <dewar@adacore.com>
4385 * sem_prag.adb (Set_Convention_From_Pragma): Check that
4386 convention Ghost can only apply to functions.
4387 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
4389 2014-01-27 Robert Dewar <dewar@adacore.com>
4391 * gnat_ugn.texi: Add Short_Enums to documentation of
4394 2014-01-27 Robert Dewar <dewar@adacore.com>
4396 * sem_prag.adb (Analyze_Input_Item): Correct check for input
4397 item in same package.
4398 * sem_util.ads, sem_util.adb (Within_Scope): New function.
4400 2014-01-26 Arnaud Charlet <charlet@adacore.com>
4402 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
4403 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
4404 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
4405 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
4408 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
4410 * gcc-interface/Makefile.in: Fix oversight.
4412 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
4414 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
4415 conversion from a thin pointer with a shifted value.
4416 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
4417 read-only flag from the values onto the result.
4418 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
4420 2014-01-25 Tristan Gingold <gingold@adacore.com>
4422 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
4423 for E_Variable with a pragma Linker_Section.
4425 2014-01-25 Robert Dewar <dewar@adacore.com>
4427 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
4428 with Default_Value aspect is passed in by copy.
4430 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
4432 * set_targ.adb: Set Short_Enums.
4433 * gcc-interface/lang.opt (fshort-enums): New option.
4434 * gcc-interface/misc.c (gnat_handle_option): Handle it.
4435 (gnat_post_options): Do not modify the global settings.
4437 2014-01-24 Robert Dewar <dewar@adacore.com>
4439 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
4441 (Random_Decimal_Fixed): New generic function.
4442 * s-rannum.ads: Minor comment clarifications.
4444 2014-01-24 Robert Dewar <dewar@adacore.com>
4446 * back_end.adb: Remove Short_Enums handling (handled in
4447 Ttypes/Get_Targ now) Minor added comments.
4448 * freeze.adb: Change name Short_Enums_On_Target to
4450 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
4451 * opt.ads: Minor comment updates.
4452 * sem_ch13.adb: Change name Short_Enums_On_Target to
4454 * set_targ.adb: Set Short_Enums from gcc back end.
4455 * set_targ.ads (Short_Enums): New variable.
4456 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
4457 Ttypes/Get_Targ now).
4458 * ttypes.ads (Target_Short_Enums): New constant boolean switch
4460 2014-01-24 Pascal Obry <obry@adacore.com>
4462 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
4464 2014-01-24 Gary Dismukes <dismukes@adacore.com>
4466 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
4467 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
4470 2014-01-24 Robert Dewar <dewar@adacore.com>
4472 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
4474 2014-01-24 Vincent Celier <celier@adacore.com>
4476 * prj.adb (Add_Aggregated_Project): Do not add a project in
4477 the list if it is already there.
4479 2014-01-24 Yannick Moy <moy@adacore.com>
4481 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
4482 Correct the search for a subrogram declaration to which a pragma is
4485 2014-01-24 Bob Duff <duff@adacore.com>
4487 * gnat_ugn.texi: Document --decimal-grouping and
4488 --based-grouping switches in gnatpp.
4490 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4492 * sinfo.ads: Documentation update.
4494 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4496 * sem_ch3.adb (Constant_Redeclaration): New declaration is
4497 illegal if previous one has an initial expression that is an
4498 aggregate expanded into assignments.
4500 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4502 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
4503 code reorganization to remove spurious warning on a loop with
4504 an array element iterator that has a null range.
4506 2014-01-24 Vincent Celier <celier@adacore.com>
4508 * make.adb (Binding_Phase): When setting the Ada paths, use
4509 the library ALI dir, not the object dir in libraries.
4511 2014-01-24 Yannick Moy <moy@adacore.com>
4513 * sinfo.ads: Add documentation of check flag fields.
4515 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4517 * sem_res.adb (Resolve_Actuals): If an actual is a view
4518 conversion of a discriminated object, and the formal type is
4519 discriminated and constrained, apply a discriminant check to
4522 2014-01-24 Robert Dewar <dewar@adacore.com>
4524 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
4526 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4528 * sem_ch3.adb (Analyze_Declarations): At the end of an
4529 appropriate declarative part, call Freeze_All from the first
4530 declaration in the scope, not from the first unfrozen one. This
4531 is necessary to apply visibility checks to entities with delayed
4532 aspects. Otherwise, in the presence of instantiations and cleanups
4533 that they may generate, the delayed aspects may be analyzed too
4534 late and produce spurious visibility errors.
4535 * sem_attr.adb: Place etype on range.
4536 * sem_ch6.adb: Documentation expression functions.
4538 2014-01-24 Robert Dewar <dewar@adacore.com>
4540 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
4541 terminology in compiler).
4543 2014-01-24 Robert Dewar <dewar@adacore.com>
4545 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
4546 categories, now that Ada 95 supports raise expressions.
4548 2014-01-24 Robert Dewar <dewar@adacore.com>
4550 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
4551 Short_Enums_On_Target.
4552 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
4554 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
4556 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4558 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
4559 indication is given explicity, check that it matches the array
4560 component type or the container element type of the domain
4563 2014-01-24 Tristan Gingold <gingold@adacore.com>
4565 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
4566 * gcc-interface/misc.c (flag_short_enums): Declare.
4567 (gnat_post_options): Set it.
4569 2014-01-24 Vincent Celier <celier@adacore.com>
4571 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
4572 to cache the result when Including_Libraries is False.
4573 * prj-env.ads (Ada_Objects_Path): Update documentation
4574 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
4575 (Get_Object_Directory): Return the Library_Ali_Dir only when
4576 when Including_Libraries is True.
4577 * prj.ads (Get_Object_Directory): Fix and complete documentation
4578 (Project_Data): New component Ada_Objects_Path_No_Libs
4580 2014-01-24 Robert Dewar <dewar@adacore.com>
4582 * checks.adb (Expr_Known_Valid): Result of fpt operator never
4585 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
4587 * back_end.adb: Minor fix in comment.
4589 2014-01-24 Javier Miranda <miranda@adacore.com>
4591 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
4592 required to report the error in case of task types.
4594 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4596 * sem_attr.adb: Additional index checking.
4598 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4600 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
4601 expressions in each component association, and for records note
4602 the entity in each association choice, for subsequent resolution.
4603 (Resolve_Attribute, case 'Update): Complete resolution of
4604 expressions in each component association.
4606 2014-01-24 Robert Dewar <dewar@adacore.com>
4608 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
4609 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
4610 leading to wrong handling of SPARK_Mode for library units).
4612 2014-01-24 Robert Dewar <dewar@adacore.com>
4614 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
4615 on generic instances (do not consider them to be internally
4618 2014-01-24 Doug Rupp <rupp@adacore.com>
4620 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
4621 vice pthread_sigmask.
4623 2014-01-24 Vincent Celier <celier@adacore.com>
4625 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
4628 2014-01-24 Vincent Celier <celier@adacore.com>
4630 * prj-ext.adb (Add): Do not output anything when Silent is True,
4631 whatever the verbosity. When Source is From_External_Attribute,
4632 set the corresponding environment variable if it is not already set.
4633 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
4635 * prj-proc.adb (Process_Expression_For_Associative_Array):
4636 For attribute External, call Prj.Ext.Add with Silent set to
4637 True for the child environment, to avoid useless output in non
4640 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4642 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
4643 range given by a subtype indication, and force evaluation of
4644 the bounds, as for a simple range.
4645 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
4646 of bounds of slice for various kinds of discrete ranges.
4647 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
4648 Evaluate_Slice_Bounds.
4650 2014-01-24 Bob Duff <duff@adacore.com>
4652 * s-taskin.ads (Activator): Make this Atomic, because
4653 Activation_Is_Complete reads it, and that can be called
4654 from any task. Previously, this component was only
4655 modified by the activator before activation, and by
4656 Self after activation.
4657 * a-taside.ads, a-taside.adb (Environment_Task,
4658 Activation_Is_Complete): Implement these missing functions.
4660 2014-01-24 Doug Rupp <rupp@adacore.com>
4662 * init.c: Add a handler section for Android.
4664 2014-01-24 Arnaud Charlet <charlet@adacore.com>
4666 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
4668 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4670 * sem_ch4.adb (Operator_Check): If one operand is a
4671 Raise_Expression, set its type to that of the other operand.
4672 * sem_res.adb (Resolve_Raise_Expression): new procedure.
4673 (Resolve_Actuals): For an actual that is a Raise_Expression,
4674 set the type to that of the formal.
4675 * sem_type.adb (Find_Unique_Type): If one of the operands is a
4676 Raise_Expression, return type of the other operand.
4678 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4680 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
4681 component of the record has a type with a default aspect, and
4682 the corresponding aggregate component is initiaized with a box,
4683 use the default value in the rewritten aggregate.
4685 2014-01-24 Tristan Gingold <gingold@adacore.com>
4687 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
4688 s-interr-sigaction.adb,
4689 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
4690 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
4691 to the call to Install_Restricted_Handlers.
4693 2014-01-24 Emmanuel Briot <briot@adacore.com>
4695 * prj-nmsc.adb (Check_File): Add protection when the source is
4696 not fully initialized.
4698 2014-01-24 Ed Schonberg <schonberg@adacore.com>
4700 * sem_util.adb (Is_Post_State): In a postcondition, a selected
4701 component that denotes an implicit dereference is a reference
4702 to the post state of the subprogram.
4704 2014-01-24 Robert Dewar <dewar@adacore.com>
4706 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
4707 for generated subprograms.
4708 (Analyze_Subprogram_Specification): Ditto.
4710 2014-01-24 Vincent Celier <celier@adacore.com>
4712 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
4713 attributes in package Builder of aggregate and aggregate library
4715 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
4716 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
4717 Remove parameters. Change error message from "... externally
4718 build library ..." to "... externally built project ...".
4719 (Process_Naming_Scheme.Check): Do not do any check in aggregate
4720 project, as attribute Library_Dir and Library_Name have already
4721 been detected as forbidden.
4723 2014-01-24 Vincent Celier <celier@adacore.com>
4725 * prj-env.adb (Find_Project): If cached project path is not in
4726 project directory, look in current directory first and use cached
4727 project path only if project is not found in project directory.
4729 2014-01-24 Robert Dewar <dewar@adacore.com>
4731 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
4733 2014-01-24 Vincent Celier <celier@adacore.com>
4735 * projects.texi: Document that aggregate projects are only
4736 supported by gprbuild, but not by gnatmake. Document that the
4737 only attribute Switches in package Binder of aggregate projects
4738 will be ignored if its index is not others. Document that
4739 attribute Global_Config_File is allowed in package Binder of
4742 2014-01-24 Robert Dewar <dewar@adacore.com>
4744 * sem_prag.adb: Minor code reorganization.
4745 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
4747 2014-01-24 Pascal Obry <obry@adacore.com>
4749 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
4750 attribute definition.
4752 2014-01-24 Vincent Celier <celier@adacore.com>
4754 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
4755 in the Queue the same source (same path, same multi-source index)
4756 from the same project file, to avoid compiling several times
4759 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
4761 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
4762 (Has_Gigi_Rep_Item): Likewise.
4763 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
4764 Has_Gigi_Rep_Item for objects.
4765 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
4766 (prepend_one_attribute): ...this.
4767 (prepend_one_attribute_pragma): New function extracted from...
4768 (prepend_attributes): ...here. Swap the parameters for consistency.
4769 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
4771 <object>: Deal with a pragma Linker_Section on a constant
4772 or variable. <E_Function>: Deal with a pragma Linker_Section
4774 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
4776 2014-01-24 Vincent Celier <celier@adacore.com>
4778 * opt.ads: Minor comment update.
4780 2014-01-24 Robert Dewar <dewar@adacore.com>
4782 * sem_prag.adb (Analyze_Input_Output): Add missing error check
4784 * sem_util.adb (Is_Refined_State): Add defense against junk
4787 2014-01-24 Pascal Obry <obry@adacore.com>
4789 * projects.texi: Removes Build_Slaves attribute documentation.
4791 2014-01-23 Robert Dewar <dewar@adacore.com>
4793 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
4796 2014-01-23 Ed Schonberg <schonberg@adacore.com>
4798 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
4799 applies to expressions that come from source.
4800 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
4802 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
4803 rule regarding potentially unevaluated expressions, to prefix
4806 2014-01-23 Ed Schonberg <schonberg@adacore.com>
4808 * exp_util.adb (Make_Invqriant_Call): If type of expression is
4809 a private extension, get invariant from base type.
4811 2014-01-23 Robert Dewar <dewar@adacore.com>
4813 * sem_util.adb, sem_attr.adb: Minor reformatting.
4815 2014-01-23 Robert Dewar <dewar@adacore.com>
4817 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
4818 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
4819 * sem.adb (Semantics): Remove save/restore of
4820 SPARK_Mode[_Pragma]. Not needed since already done in
4821 Save/Restore_Opt_Config_Switches.
4823 2014-01-23 Robert Dewar <dewar@adacore.com>
4825 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
4826 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
4827 Linker_Section enhancements.
4829 2014-01-23 Tristan Gingold <gingold@adacore.com>
4831 * gnat_rm.texi: Minor editing.
4833 2014-01-23 Robert Dewar <dewar@adacore.com>
4835 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
4836 with'ed internal units.
4837 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
4839 2014-01-23 Javier Miranda <miranda@adacore.com>
4841 * lib-xref.adb (Generate_Reference): As part of processing the
4842 "end-of-spec" reference generate an extra reference to the first
4843 private entity of the package.
4844 * xr_tabls.adb (Add_Reference): No action needed for the extra
4845 'E' reference associated; similar to the processing of the
4848 2014-01-23 Bob Duff <duff@adacore.com>
4850 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
4852 2014-01-23 Ed Schonberg <schonberg@adacore.com>
4854 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
4855 predicate to implement rule given in 6.1.1 (20/3).
4856 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
4857 'Old in a postcondition, if it is potentially unevaluated and
4858 it is not an entity name.
4860 2014-01-23 Bob Duff <duff@adacore.com>
4862 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
4864 2014-01-23 Robert Dewar <dewar@adacore.com>
4866 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
4869 2014-01-23 Bob Duff <duff@adacore.com>
4871 * g-dynhta.ads: Minor comment fix.
4873 2014-01-23 Yannick Moy <moy@adacore.com>
4875 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
4876 from spec on body only when not already inherited on spec. Set
4877 SPARK_Mode from context on body without previous spec. *
4878 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
4879 library-level entities. Correct retrieval of entity from
4880 declaration, for cases where the declaration is not a unit.
4881 * sem_ch12.adb (Instantiate_Object): Avoid
4882 calling Is_Volatile_Object on an empty node.
4884 2014-01-23 Robert Dewar <dewar@adacore.com>
4886 * gnatlink.adb (Gnatlink): Check for suspicious executable file
4889 2014-01-23 Robert Dewar <dewar@adacore.com>
4891 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
4892 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
4893 style errors in instances.
4894 * g-dynhta.ads (Static_HTable): Comment updates.
4896 2014-01-23 Vincent Celier <celier@adacore.com>
4898 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
4899 to find a configuration project file when Config_File_Name is
4900 No_Configuration_File.
4901 * prj-conf.ads (No_Configuration_File): New constant String.
4902 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
4903 with Config_File_Name set to No_Configuration_File, so that
4904 no existing configuration project file will be used, and the
4905 configuration project will be only created in memory when
4906 Add_Default_GNAT_Naming_Scheme is called.
4907 * projects.texi: Minor reformatting.
4909 2014-01-23 Vincent Celier <celier@adacore.com>
4911 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
4912 a config project file if On_Load_Config is not null.
4913 * prj-pars.adb: Minor comment changes.
4915 2014-01-23 Ed Schonberg <schonberg@adacore.com>
4917 * lib-xref.adb (Output_References): Output progenitors of
4918 synchronized tagged types, for source navigation.
4920 2014-01-23 Robert Dewar <dewar@adacore.com>
4922 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
4923 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
4924 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
4926 2014-01-23 Emmanuel Briot <briot@adacore.com>
4928 * prj-conf.adb (Get_Or_Create_Configuration_File): call
4929 On_Load_Config later.
4931 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
4933 * sem_ch3.adb (Analyze_Declarations): Do not
4934 generate the spec of the late primitive in ASIS mode. Add two
4935 comments to explain the special cases when the expansion is
4938 2014-01-23 Robert Dewar <dewar@adacore.com>
4940 * sem_util.adb (Note_Possible_Modification): Fix error of
4941 misbehaving for implicit dereference cases in -gnatc mode.
4943 2014-01-23 Emmanuel Briot <briot@adacore.com>
4945 * prj-pars.adb: Minor reformatting.
4947 2014-01-22 Ed Schonberg <schonberg@adacore.com>
4949 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
4950 body generated for an expression function within a protected body
4951 needs a set of renaming declarations if the expression function
4954 2014-01-22 Ed Schonberg <schonberg@adacore.com>
4956 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
4957 list interface progenitor of a tagged concurrent type, for better
4960 2014-01-22 Robert Dewar <dewar@adacore.com>
4962 * lib.adb (In_Extended_Main_Code_Unit): Return False for
4964 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
4965 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
4966 treatment of Slocs No_Location and Standard_Location.
4967 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
4968 check for entity with Standard_Location Sloc, rather than relying
4969 on Lib routines to do that.
4970 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
4971 that a call cannot occur before a later occuring body within
4974 2014-01-22 Thomas Quinot <quinot@adacore.com>
4976 * rtsfind.adb: Update comment.
4978 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
4980 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
4981 * sem_ch3.adb (Analyze_Declarations): Add local variable
4982 Body_Seen. Generate the spec of a late controlled
4983 primitive body that is about to freeze its related type.
4984 (Handle_Late_Controlled_Primitive): New routine.
4986 2014-01-22 Robert Dewar <dewar@adacore.com>
4988 * a-stream.adb: Minor reformatting.
4990 2014-01-22 Ed Schonberg <schonberg@adacore.com>
4992 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
4993 sub-procedure Declared_In_Actual to handle properly the visibility
4994 of actuals in actual packages, that are themselves actuals to a
4995 actual package of the current instance. This mimics properly the
4996 visibility of formals of formal packages declared with a box,
4997 within the corresponding generic unit.
4999 2014-01-22 Robert Dewar <dewar@adacore.com>
5001 * checks.adb: Do not assume that a volatile variable is valid.
5003 2014-01-22 Thomas Quinot <quinot@adacore.com>
5005 * g-catiio.ads (Image, Value): Clarify that these functions
5006 operate in the local time zone. Minor documentation update.
5008 2014-01-22 Thomas Quinot <quinot@adacore.com>
5010 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
5012 2014-01-22 Robert Dewar <dewar@adacore.com>
5014 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
5015 Moved to sem_aux.adb.
5017 2014-01-22 Robert Dewar <dewar@adacore.com>
5019 * vms_data.ads: Minor reformatting.
5021 2014-01-22 Robert Dewar <dewar@adacore.com>
5023 * debug.adb: Document messages affected by -gnatd.E including
5024 the new ones that relate to late definition of equality.
5025 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
5026 debug flag -gnatd.E is set, then generate warnings rather than
5028 (Check_Untagged_Equality): In earlier versions of Ada,
5029 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
5031 2014-01-22 Robert Dewar <dewar@adacore.com>
5033 * sem_prag.adb (Usage_Error): Output additional messages for
5034 unconstrained OUT parameters lacking an input dependency.
5036 2014-01-22 Robert Dewar <dewar@adacore.com>
5038 * sem_ch4.adb: Minor reformatting.
5040 2014-01-22 Robert Dewar <dewar@adacore.com>
5042 * restrict.ads: Minor reformatting.
5043 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
5044 forbids a call from within a subprogram to the same subprogram.
5046 2014-01-22 Thomas Quinot <quinot@adacore.com>
5048 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
5049 stream attributes for Stream_Element_Array.
5050 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
5051 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
5052 defined in the current scope.
5054 2014-01-22 Robert Dewar <dewar@adacore.com>
5056 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
5058 2014-01-22 Thomas Quinot <quinot@adacore.com>
5060 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
5062 2014-01-22 Thomas Quinot <quinot@adacore.com>
5064 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
5065 declaration initialized with a function call, whose type
5066 has variable size, need to remove side effects so that the
5067 initialization expression becomes a dereference of a temporary
5068 reference to the function result.
5070 2014-01-22 Yannick Moy <moy@adacore.com>
5072 * errout.adb (Initialize): Remove trick to add dummy entry
5074 * erroutc.adb (Set_Warnings_Mode_Off,
5075 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
5076 command line switch.
5077 * opt.ads (Warning_Mode): Document behavior
5078 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
5080 2014-01-22 Robert Dewar <dewar@adacore.com>
5082 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
5084 2014-01-22 Robert Dewar <dewar@adacore.com>
5086 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
5087 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
5088 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
5089 case Storage_Size): call Check_Pool_Size_Clash.
5091 2014-01-22 Robert Dewar <dewar@adacore.com>
5093 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
5094 sem_eval.ads: Minor reformatting.
5096 2014-01-22 Thomas Quinot <quinot@adacore.com>
5098 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
5099 Any_Composite to prevent cascaded errors.
5101 2014-01-22 Yannick Moy <moy@adacore.com>
5103 * errout.adb (Initialize): Do not insert special entry in Warnings
5104 table in GNATprove_Mode.
5105 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
5107 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
5110 2014-01-22 Robert Dewar <dewar@adacore.com>
5112 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
5115 2014-01-22 Robert Dewar <dewar@adacore.com>
5117 * snames.ads-tmpl: Update header.
5119 2014-01-22 Thomas Quinot <quinot@adacore.com>
5121 * exp_util.adb (Insert_Actions): When inserting actions on a
5122 short circuit operator that has already been analyzed, do not park
5123 actions in node; instead introduce an N_Expression_With_Actions
5124 and insert actions immediately.
5125 Add guard for unexpected case of climbing up through statement
5126 in Actions list of an N_Expression_With_Actions.
5127 * sem_elab.adb (Insert_Elab_Check): Remove complex
5128 specialized circuitry for the case where the context is already
5129 analyzed, as it is not needed and introduces irregularities in
5130 finalization. Instead rely on the above change to Insert_Actions
5131 to ensure that late insertion on short circuit operators works
5134 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5136 * sem_ch4.adb (Operator_Check): Improve error message when an
5137 operand of concatenation is an access type.
5139 2014-01-22 Thomas Quinot <quinot@adacore.com>
5141 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
5144 2014-01-22 Ed Schonberg <schonberg@adacore.com>
5146 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
5147 of an expanded name in a proper body, whose prefix is a package
5148 in the context of the proper body, when there is a homonym of
5149 the package declared in the parent unit.
5151 2014-01-22 Robert Dewar <dewar@adacore.com>
5153 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
5154 msg if errors found.
5155 (Check_One_Unit): Same change.
5157 2014-01-22 Robert Dewar <dewar@adacore.com>
5159 * ug_words: Add missing/wrong entries for VMS warning switches.
5160 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
5162 2014-01-22 Jerome Guitton <guitton@adacore.com>
5164 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
5167 2014-01-22 Robert Dewar <dewar@adacore.com>
5169 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
5171 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
5173 * gcc-interface/Makefile.in: Minor fixes.
5175 2014-01-21 Robert Dewar <dewar@adacore.com>
5177 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
5178 * par-ch5.adb (P_Condition): New version with expression prescanned.
5179 * par.adb (P_Condition): New version with expression prescanned.
5181 2014-01-21 Robert Dewar <dewar@adacore.com>
5183 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
5184 if Address is not a private type.
5185 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5186 Ignore pragma if System.Address is not a private type.
5188 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5190 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
5191 uninitialized value.
5193 2014-01-21 Thomas Quinot <quinot@adacore.com>
5195 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
5197 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5199 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
5200 the value of Assertions_Enabled flag when compiling an instance of
5201 an internal unit. This facilitates the use of pre/postconditions
5202 in generic internal units, such as the new elementary function
5205 2014-01-21 Robert Dewar <dewar@adacore.com>
5207 * exp_aggr.adb: Minor reformatting.
5208 * sem_attr.adb: Minor reformatting.
5209 * sem_res.adb: Minor comment addition.
5210 * einfo.adb: Minor comment updates.
5211 * freeze.adb: Minor reformatting and code reorganization.
5213 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5215 * par-ch4.adb (P_If_Expression): Handle more gracefully an
5216 elsif clause that does not have an else part.
5218 2014-01-21 Robert Dewar <dewar@adacore.com>
5220 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
5221 * gcc-interface/Makefile.in: clean up target pairs.
5223 2014-01-21 Pascal Obry <obry@adacore.com>
5225 * projects.texi: Minor typo fix.
5227 2014-01-21 Thomas Quinot <quinot@adacore.com>
5229 * freeze.adb (Check_Component_Storage_Order): If a record type
5230 has an explicit Scalar_Storage_Order attribute definition clause,
5231 reject any component that itself is of a composite type and does
5234 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5236 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
5237 can be used to generate proper cross-reference information for
5238 the parent units of proper bodies.
5240 2014-01-21 Thomas Quinot <quinot@adacore.com>
5242 * exp_pakd.adb (Expand_Packed_Element_Set,
5243 Expand_Packed_Element_Reference): No byte swapping required in
5244 the front-end for the case of a reverse storage order array,
5245 as this is now handled uniformly in the back-end. However we
5246 still need to swap back an extracted element if it is itself a
5247 nested composite with reverse storage order.
5249 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
5251 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
5252 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
5255 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5257 * gnat_ugn.texi: Minor updates.
5259 2014-01-21 Thomas Quinot <quinot@adacore.com>
5261 * exp_pakd.adb: Update comment, minor reformatting.
5263 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
5265 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
5266 object check when SPARK_Mode is on.
5267 * sem_ch6.adb (Process_Formals): Trigger the volatile object
5268 check when SPARK_Mode is on.
5269 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
5270 check when SPARK_Mode is on.
5271 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
5272 corresponding pragma of aspect SPARK_Mode in the visible
5273 declarations of a package declaration.
5274 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
5275 check when SPARK_Mode is on.
5276 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
5277 check when SPARK_Mode is on.
5278 (Resolve_Entity_Name): Trigger
5279 the volatile object check when SPARK_Mode is on.
5281 2014-01-21 Robert Dewar <dewar@adacore.com>
5283 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
5284 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
5286 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5288 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
5289 object is declared, it is rewritten as a renaming of an dynamic
5290 expression that wraps the initial value. The renaming declaration
5291 is first given an internal name, to prevent collisions with the
5292 entity already declared, and then the name is modified to reflect
5293 the original one. the modification of the name must preserve
5294 the source location of the original, to prevent spurious errors
5295 when compiling with style checks if the declaration involves
5296 more than one entity.
5298 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
5300 * aspects.adb Add entries for Async_Readers, Async_Writers,
5301 Effective_Reads and Effective_Writes in table Canonical_Aspect.
5302 * aspects.ads Add entries for Async_Readers, Async_Writers,
5303 Effective_Reads and Effective_Writes in tables Aspect_Id,
5304 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
5305 * atree.adb (Ekind_In): New version with 8 parameters.
5306 (Node34): New routine.
5307 (Set_Node34): New routine.
5308 * atree.ads (Ekind_In): New version with 8 parameters.
5309 (Node34): New routine.
5310 (Set_Node34): New routine.
5311 * einfo.adb Contract is now Node34.
5312 (Contract): Update the assertion and node usage.
5313 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
5314 Effective_Reads and Effective_Writes.
5315 (Set_Contract): Update the assertion and node usage.
5316 (Write_Field24_Name): Remove the output for a contract.
5317 (Write_Field34_Name): Add output for a contract.
5318 * einfo.ads Contract is now Node34. Update the comment on
5319 attribute usage and related node structures.
5320 (Get_Pragma): Update the comment on usage.
5321 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
5322 Effective_Reads and Effective_Writes do not require special
5323 processing by the parser.
5324 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
5325 (Analyze_Declarations): Analyze the contract of a variable at
5326 the end of the declarative region.
5327 (Analyze_Object_Declaration): Create a contract for a variable.
5328 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
5329 of classification pragmas.
5330 (Process_Formals): Detect an illegal
5331 use of a volatile object as a formal in a function.
5332 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
5333 a volatile object as an actual in generic instantiation.
5334 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
5335 Effective_Reads and Effective_Writes in table Sig_Flags.
5336 (Analyze_External_State_In_Decl_Part): New routine.
5337 (Analyze_Global_Item): Detect an illegal use of a volatile object
5338 as a global item of a function.
5339 (Analyze_Pragma): Reimplement
5340 pragma Abstract_State. Add support for pragmas Async_Readers,
5341 Async_Writers, Effective_Reads and Effective_Writes.
5342 (Check_External_Properties): New routine.
5343 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
5344 (Check_External_Properties): New routine.
5345 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
5346 volatile object as an actual in a call.
5347 (Resolve_Entity_Name):
5348 Add local variables Par, Prev and Usage_OK. Detect illegal
5349 contexts of volatile objects.
5350 * sem_util.adb (Add_Contract_Item): Add support for
5351 pragmas associated with the contract of a variable.
5352 (Async_Readers_Enabled): New routine.
5353 (Async_Writers_Enabled): New routine.
5354 (Effective_Reads_Enabled): New routine.
5355 (Effective_Writes_Enabled): New routine.
5356 (Has_Enabled_Property):
5358 (Is_Unchecked_Conversion_Instance): New routine.
5359 (Is_Volatile_Object): Add support for entities that may denote
5361 * sem_util.ads (Add_Contract_Item): Update the
5363 (Async_Readers_Enabled): New routine.
5364 (Async_Writers_Enabled): New routine.
5365 (Effective_Reads_Enabled): New routine.
5366 (Effective_Writes_Enabled): New routine.
5367 (Is_Unchecked_Conversion_Instance): New routine.
5368 * sinfo.ads Update the comment on the structure of N_Contract.
5369 * snames.ads-tmpl Add predefined names for Async_Readers,
5370 Async_Writers, Effective_Reads and Effective_Writes. Add
5371 pragma ids for Async_Readers, Async_Writers, Effective_Reads
5372 and Effective_Writes.
5374 2014-01-21 Robert Dewar <dewar@adacore.com>
5376 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
5377 * sem_eval.adb (Compile_Time_Known_Value): Remove special
5378 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
5379 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
5380 (Test_Foldable): Add CRT_Safe parameter
5381 * sem_eval.ads (Compile_Time_Known_Value): Remove special
5382 handling of CRT mode.
5383 (CRT_Safe_Compile_Time_Known_Value): New function.
5385 2014-01-21 Robert Dewar <dewar@adacore.com>
5387 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
5388 with pragma or aspect that applies to package spec or subprogram
5391 2014-01-21 Robert Dewar <dewar@adacore.com>
5393 * exp_aggr.adb: Minor reformatting.
5395 2014-01-21 Johannes Kanig <kanig@adacore.com>
5397 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
5399 2014-01-21 Bob Duff <duff@adacore.com>
5401 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
5403 2014-01-21 Steve Baird <baird@adacore.com>
5405 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
5407 2014-01-21 Vincent Celier <celier@adacore.com>
5409 * prj-part.adb (Parse_Single_Project): Accept to extend a project
5410 if it has only be imported by an project being extended. When a
5411 project that has only been imported by a project being extended
5412 is imported by another project that is not being extended,
5413 reset the previous indication, so that it will be an error if
5414 this project is extended later.
5415 * prj-tree.adb (Create_Project): Include component From_Extended
5416 in table Projects_HT
5417 * prj-tree.ads (Project_Name_And_Node): New Boolean component
5420 2014-01-21 Robert Dewar <dewar@adacore.com>
5422 * atree.ads, atree.adb: Add Node33 and Set_Node33.
5423 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
5424 New field (SPARK_Pragma_Inherited): New flag
5425 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
5427 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
5428 * opt.ads (SPARK_Mode_Pragma): New global variable.
5429 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
5430 * sem_ch3.adb: Use new SPARK_Mode data structures.
5431 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
5432 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
5433 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
5434 (Pop_Scope): Restore SPARK_Mode_Pragma.
5435 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
5436 new data structures.
5438 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5440 * back_end.adb: Undo previous change, not needed. Minor reformatting.
5442 2014-01-21 Thomas Quinot <quinot@adacore.com>
5444 * exp_ch5.adb: Fix comment.
5445 * switch-c.adb: Minor comment update.
5446 * exp_ch3.adb: Minor reformatting.
5448 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5450 * back_end.adb (Scan_Compiler_Arguments): Do not store object
5451 filename in gnatprove mode.
5453 2014-01-21 Thomas Quinot <quinot@adacore.com>
5455 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
5456 suppresses usage of primitive _assign for tagged types).
5457 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
5458 No_Ctrl_Actions for a tagged type that does not require
5459 finalization, as we want to disable usage of _assign (which
5460 may cause undesirable discriminant checks on an uninitialized,
5463 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5465 * sem_prag.adb: Reject invariant'class on completion.
5467 2014-01-21 Javier Miranda <miranda@adacore.com>
5469 * exp_ch3.adb (Build_Init_Procedure): For
5470 derivations of interfaces, do not move the the initialization
5471 of the _parent field since such assignment is not generated.
5473 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5475 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
5476 with the operator it renames if we are within an expression of
5477 a pre/postcondition, because the expression will be reanalyzed
5478 at a later point, and the analysis of the renaming may affect
5479 the visibility of the operator when in an instance.
5481 2014-01-21 Robert Dewar <dewar@adacore.com>
5483 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
5484 Add this flag to type conversion nodes and assignment nodes.
5485 * treepr.adb: Deal properly with Flag 1,2,3.
5486 * treeprs.adt: Minor comment update.
5488 2014-01-21 Robert Dewar <dewar@adacore.com>
5490 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
5492 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
5493 parameter, completely rewrite spec.
5495 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5497 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
5498 instance that is inlined, it may have been rewritten as a wrapper
5499 package. In that case the unit that must be made visible is the
5500 related instance of the package.
5502 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5504 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
5505 previous change in codepeer mode.
5507 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5509 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
5510 call to Abort_Undefer, as expected by the runtime.
5511 * s-tasren.adb (Local_Complete_Rendezvous): Replace
5512 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
5513 deferred at this point. Update comments.
5515 2014-01-21 Thomas Quinot <quinot@adacore.com>
5517 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
5519 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5521 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
5524 2014-01-21 Robert Dewar <dewar@adacore.com>
5526 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
5528 2014-01-21 Thomas Quinot <quinot@adacore.com>
5530 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
5531 this is value is used in Node_Id arithmetic operations.
5532 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
5533 instead of hard-coded unrolled code.
5535 2014-01-21 Yannick Moy <moy@adacore.com>
5537 * gnat1drv.adb: Minor code cleanup, removing useless code.
5539 2014-01-21 Arnaud Charlet <charlet@adacore.com>
5541 * opt.ads (SPARK_Switches_File_Name): New.
5542 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
5543 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
5544 * gnat_ugn.texi: Document -gnates.
5546 2014-01-21 Yannick Moy <moy@adacore.com>
5548 * errout.adb (Special_Msg_Delete): Update comment. Remove
5549 special case for GNATprove which should not ignore mismatch
5550 in sizes for representation clauses.
5551 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
5552 which should not ignore pragma Pack.
5554 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5556 * sem_ch4.adb: Code clean up.
5558 2014-01-21 Steve Baird <baird@adacore.com>
5560 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
5562 2014-01-21 Robert Dewar <dewar@adacore.com>
5564 * gcc-interface/gigi.h: Get Flags array address.
5565 * gcc-interface/trans.c: Acquire Flags array address.
5566 * atree.adb: Add support for Flags array and Flag0,1,2,3.
5567 * atree.ads: Add support for Flags array and Flag0,1,2,3.
5568 * atree.h: Add support for Flags array and Flag0,1,2,3.
5569 * back_end.adb: Pass Flags array address to gigi.
5571 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5573 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
5574 reference to generated body so that legality checks on stream
5575 attributes are properly applied. If type is tagged and already
5576 frozen, insert generated body at the point of the renaming
5579 2014-01-21 Ed Schonberg <schonberg@adacore.com>
5581 * sem_ch12.adb: Code clean up.
5582 * sem_ch8.adb: Minor reformatting
5584 2014-01-20 Robert Dewar <dewar@adacore.com>
5586 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
5587 converting warnings on inevitable exceptions to errors.
5588 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
5589 converting warnings on inevitable exceptions to errors.
5590 * opt.adb (SPARK_Mode_Config): Handled like other config flags
5591 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
5592 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
5593 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
5594 New flag (Config_Switches_Type): Add SPARK_Mode field
5595 * sem.adb: Minor code reorganization (remove unnecessary with)
5596 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
5597 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
5598 converting warnings on inevitable exceptions to errors.
5599 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
5600 converting warnings on inevitable exceptions to errors.
5601 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
5602 converting warnings on inevitable exceptions to errors.
5603 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
5604 converting warnings on inevitable exceptions to errors.
5605 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
5607 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
5609 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
5611 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
5612 converting warnings on inevitable exceptions to errors.
5613 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
5614 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
5615 of Get_SPARK_Mode_Id
5616 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
5617 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
5618 converting warnings on inevitable exceptions to errors.
5619 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
5620 converting warnings on inevitable exceptions to errors.
5621 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
5624 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5626 * sem_ch13.adb: Add semantic information to rewritten type
5629 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5631 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
5632 are of a type with unknown discriminants, convert both to the
5633 underlying view of the type, so that the proper constraint check
5634 can be applied to the right-hand side.
5636 2014-01-20 Robert Dewar <dewar@adacore.com>
5638 * atree.adb (Copy_Node): Fix failure to copy last component
5639 (Exchange_Entities): Fix failure to exchange last entity
5641 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5643 * sem_ch12.adb: Code clean up.
5645 2014-01-20 Robert Dewar <dewar@adacore.com>
5647 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
5649 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5651 * sem_ch4.adb (Analyze_Quantified_Expression): If after
5652 pre-analysis the loop parameter specification has been
5653 rewritten as a iterator specification, propagate the change to
5654 the quantified expression, for ASIS navigtion needs.
5656 2014-01-20 Vincent Celier <celier@adacore.com>
5658 * par-ch10.adb: Minor error message change: escape [ and ].
5660 2014-01-20 Robert Dewar <dewar@adacore.com>
5662 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
5663 * errout.adb: Implement [ and ] insertion characters.
5664 * errout.ads: Document new [ and ] insertion characters.
5665 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
5666 addition of ??? comment.
5667 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
5668 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
5669 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
5670 Make warnings on exceptions into errors in GNATprove mode.
5671 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
5674 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5676 * sem_ch13.adb: Code clean up.
5678 2014-01-20 Robert Dewar <dewar@adacore.com>
5680 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
5682 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
5683 error in GNATprove mode.
5685 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5687 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
5688 reference 'Old takes no parameters, and thus can appear as a
5691 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
5693 * exp_aggr.adb: Fix minor typos.
5695 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5697 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
5698 instance the attribute is legal, and its value is determined
5699 statically if the type has no discriminants. This choice is
5700 more useful than rechecking the legality rule in the instance,
5701 is consistent with older usage, and is also consistent with all
5704 2014-01-20 Arnaud Charlet <charlet@adacore.com>
5706 * sem_cat.adb (Validate_Static_Object_Name): Change error into
5707 warning in Relaxed_Semantic_Mode.
5709 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5711 * sem_attr.adb: Code and comments cleanup.
5713 2014-01-20 Yannick Moy <moy@adacore.com>
5715 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
5716 * errout.adb (Compilation_Errors): Remove special handling in
5718 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
5719 removed debug flags.
5720 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
5721 Global, Initial_Condition, Initializes and Refined_State pragmas and
5723 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
5724 SPARK_Strict_Mode): Remove global flags.
5725 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
5726 always performed now, on packages declaring a null state.
5727 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
5728 at providing pedantic mode for bounds of integer types.
5729 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
5730 "some" quantified expression now issued under control of -gnatw.t,
5731 like the other warning on unused bound variable.
5732 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
5734 (Analyze_Pragma): Remove tests for SPARK 2014
5735 pragmas, not officially allowed by GNAT.
5737 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5739 * sem_prag.adb (Analyze_Pragma): Ensure that
5740 the sole argument of pragmas Abstract_State, Contract_Cases,
5741 Depends, Global and Initializes in in aggregate form.
5742 (Analyze_Refined_Pragma): Ensure that the sole argument of
5743 pragmas Refined_Depends, Refined_Global and Refined_State is in
5745 (Ensure_Aggregate_Form): New routine.
5747 2014-01-20 Doug Rupp <rupp@adacore.com>
5749 * sem_attr.adb (Analyze_Attribute): case
5750 Attribute_Constrained => treat all prefixes as legal for Declib
5753 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5755 * sem_prag.adb (Check_Mode): Reimplement the routine.
5756 (Find_Mode): New routine.
5758 2014-01-20 Robert Dewar <dewar@adacore.com>
5760 * sem_ch4.adb (Operator_Check): Handle additional
5761 Allow_Integer_Address cases.
5763 2014-01-20 Robert Dewar <dewar@adacore.com>
5765 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
5766 allowed if address is non-private, no longer true.
5767 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5768 Remove check for address being private, causes difficulty when
5769 pragma used in gnat.adc file and is not needed, since we guard
5770 this in Address_Integer_Convert_OK.
5771 * exp_ch7.adb: Minor reformatting.
5772 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
5774 2014-01-20 Robert Dewar <dewar@adacore.com>
5776 * checks.adb (Apply_Range_Check): Remove gnatprove special
5777 casing of exponentiation.
5778 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
5779 operand for integer case to check range against Natural.
5781 2014-01-20 Robert Dewar <dewar@adacore.com>
5783 * s-tataat.adb: Minor reformatting.
5785 2014-01-20 Robert Dewar <dewar@adacore.com>
5787 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
5788 entities, and also fix documentation to remove mention of visible
5789 integer type, since this is not what the implementation does.
5790 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
5791 entities, and also fix documentation to remove mention of visible
5792 integer type, since this is not what the implementation does.
5793 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
5795 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
5796 case for parameter type check.
5797 * sem_res.adb (Resolve): Use new function
5798 Address_Integer_Convert_OK.
5799 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
5800 reformatting throughout.
5801 * sem_util.adb (Address_Integer_Convert_OK): New function.
5802 * sem_util.ads: Minor reformatting (put specs in alpha order)
5803 (Address_Integer_Convert_OK): New function.
5805 2014-01-20 Thomas Quinot <quinot@adacore.com>
5807 * exp_ch7.adb (Wrap_Transient_Expression):
5808 Insertion extra conditional expression only if
5809 Opt.Suppress_Control_Flow_Optimizations is set.
5811 2014-01-20 Arnaud Charlet <charlet@adacore.com>
5813 * s-tataat.adb (Initialize_Attributes): Abort might already be
5814 deferred in Create_Task.
5816 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5818 * checks.adb (Apply_Scalar_Range_Check): Flag
5819 the exponent as requiring a range check when the expression is
5822 2014-01-20 Fedor Rybin <frybin@adacore.com>
5824 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
5826 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5828 * sem_util.adb (Default_Initialization): New routine.
5829 * sem_util.ads: Add new type Default_Initialization_Kind.
5830 (Default_Initialization): New routine.
5832 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5834 * sem_prag.adb (Check_Mode): Correct all error
5835 message logic dealing with in/in out parameters that may appear
5836 as inputs or have a self reference.
5838 2014-01-20 Robert Dewar <dewar@adacore.com>
5840 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
5841 * sem_res.adb (Resolve): Fix error causing infinite loop for
5842 integer used as address. Allow addresses as integers.
5844 2014-01-20 Arnaud Charlet <charlet@adacore.com>
5846 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
5848 2014-01-20 Bob Duff <duff@adacore.com>
5850 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
5851 error when "use all" is not followed by "type".
5853 2014-01-20 Bob Duff <duff@adacore.com>
5855 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
5858 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5860 * checks.adb (Apply_Address_Clause_Check): If there is an
5861 alignment check on the expression in an address clause, and there
5862 is no local exception propagation, add an additional explanatory
5863 message to clarify the cause of previous warning.
5865 2014-01-20 Robert Dewar <dewar@adacore.com>
5867 * exp_ch7.adb: Minor reformatting.
5868 * opt.ads: Minor comment updates.
5869 * sem.adb: Minor name change Is_Main_Unit =>
5870 Is_Main_Unit_Or_Main_Unit_Spec.
5871 * sem_ch6.adb: Minor reformatting and code reorganization.
5873 2014-01-20 Bob Duff <duff@adacore.com>
5875 * gnat_ugn.texi: Update gnatpp switches.
5877 2014-01-20 Thomas Quinot <quinot@adacore.com>
5879 * exp_ch9.adb: Minor comment edit.
5881 2014-01-20 Robert Dewar <dewar@adacore.com>
5883 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
5884 only if System.Address is a private type.
5885 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
5886 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5887 Allowed only if type System.Address is private, since otherwise
5889 * sem_res.adb: Fix failure to properly Analyze unchecked
5890 conversions that were introduced by Allow_Integer_Address.
5891 * switch-c.adb: Remove -gnates switch.
5892 * usage.adb: Remove -gnates switch.
5893 * gnat_ugn.texi: Remove documentation of -gnates flag.
5895 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5897 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
5898 resolve expression to perform proper name capture.
5900 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5902 * sem.adb (Semantics): When saving/restoring configuration
5903 switches, the spec of a pre- defined unit that is the main unit
5904 must be treated as a predefined unit as well.
5906 2014-01-20 Thomas Quinot <quinot@adacore.com>
5908 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
5909 expression, insert an extra conditional expression when saving
5910 the value of the expression, for the benefit of control flow
5911 graph based coverage analysis.
5912 * exp_ch3.adb: Minor reformatting.
5914 2014-01-20 Robert Dewar <dewar@adacore.com>
5916 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
5917 * gnat_rm.texi: Document pragma Allow_Integer_Address.
5918 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
5919 * opt.ads: New flag Allow_Integer_Address.
5920 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
5921 * sem_ch5.adb: Minor reformatting.
5922 * sem_prag.adb: Implement pragma Allow_Integer_Address.
5923 * sem_res.adb (Resolve): Allow integer address value if
5925 * sem_util.adb: Minor reformatting.
5926 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
5927 * switch-c.adb: Recognize flag -gnates.
5928 * usage.adb: Document flag -gnates.
5930 2014-01-20 Thomas Quinot <quinot@adacore.com>
5932 * s-tadeca.adb: Fix minor typos in comment.
5934 2014-01-20 Pascal Obry <obry@adacore.com>
5936 * s-win32.ads (FreeLibrary): New import.
5938 2014-01-20 Robert Dewar <dewar@adacore.com>
5940 * sem_res.adb, sem_cat.adb: Minor reformatting.
5941 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
5942 assigning to OUT parameters for the current subprogram scope.
5943 * exp_ch4.adb: Minor reformatting.
5945 2014-01-20 Ed Schonberg <schonberg@adacore.com>
5947 * exp_ch4.adb (Process_Transient_Object,
5948 Find_Enclosing_Contexts): If the top-level if-expression that
5949 generated the transient object is an actual in a call, the proper
5950 Hook_Context is a construct enclosing the call.
5951 * einfo.ads: Indicate that Related_Expression is used to link a
5952 loop variable to the container expression over which the loop
5954 (Analyze_Iterator_Specification): Set the Related_Expression of
5955 the loop variable in a container element iterator.
5956 (Note_Possible_Modification): If the variable is the loop
5957 variable in a container element iterator, indicate that the
5958 enclosing container is also modified.
5960 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5962 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
5964 2014-01-20 Robert Dewar <dewar@adacore.com>
5966 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
5967 Minor reformatting and code clean up.
5969 2014-01-20 Arnaud Charlet <charlet@adacore.com>
5971 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
5972 of objects of private type if Relaxed_RM_Semantics.
5974 2014-01-20 Claire Dross <dross@adacore.com>
5976 * a-cofove.ads (Vector): Capacity discriminant
5977 should be in range of the index.
5979 2014-01-20 Thomas Quinot <quinot@adacore.com>
5981 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
5982 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
5983 possible difference between epoch of Ada.Calendar clock and Ada
5984 real-time/tasking clock.
5985 * s-taprop-posix.adb: Minor comment fix.
5987 2014-01-20 Doug Rupp <rupp@adacore.com>
5989 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
5991 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
5993 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
5994 checks on the prefix of attribute 'Old.
5995 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
5996 generation of validity checks on a range that belongs to the
5997 iteration scheme of a quantified expression.
5998 * sem_ch5.adb (One_Bound): Suppress the generation of validity
5999 checks on a bound that belongs to the iteration scheme of a
6000 quantified expression, generate the check in all other cases.
6002 2014-01-20 Bob Duff <duff@adacore.com>
6004 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
6006 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6008 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
6009 interpretations that do not come from other predefined units,
6010 to prevent spurious ambiguities in the presence of user-defined
6011 operators in the context of (an instance of) a predefined unit.
6013 2014-01-20 Robert Dewar <dewar@adacore.com>
6015 * gnat_rm.texi: Document that Loop_Variant is included in
6016 Statement_Assertions.
6017 * sem_prag.adb (Check_Kind): Add Loop_Variant to
6018 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
6019 to Statement_Assertions.
6021 2014-01-20 Doug Rupp <rupp@adacore.com>
6023 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
6024 for errno ENOENT from RTP on NFS mounted file system.
6026 2014-01-20 Ed Schonberg <schonberg@adacore.com>
6028 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
6029 examine code that does not come from source. The check does not
6030 apply to code generated for constraint checks, and such code may
6031 generate spurious error messages when compiled with expansion
6032 disabled (as in a generic unit) because side effects may not
6034 2) Make error messages more explicit: indicate the component
6035 of the construct whose value is indeterminate because of a
6036 call to a function with in-out parameter in another component,
6037 when there is no mandated order of execution between the two
6038 components (actuals, aggregate components, alternatives).
6040 2014-01-20 Robert Dewar <dewar@adacore.com>
6042 * gnat_rm.texi: Minor cleanup.
6044 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6046 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
6047 can now apply to a refined postcondition.
6048 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
6049 variable Result_Seen. Add variables Case_Prag, Post_Prag,
6050 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
6051 whether postconditions and/or constract-cases mention attribute
6052 'Result and introduce a post-state when applied to functions.
6053 (Check_Result_And_Post_State): Removed.
6054 * sem_prag.adb (Analyze_Pragma): Add local variable
6055 Result_Seen. Verify that the expression of pragma Refined_Post
6056 mentions attribute 'Result and introduces a post-state.
6057 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
6059 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6061 * exp_ch7.adb (Is_Subprogram_Call): New routine.
6062 (Process_Transient_Objects): Make variable Must_Hook global with
6063 respect to all locally declared subprograms. Search the context
6064 for at least one subprogram call.
6065 (Requires_Hooking): Removed.
6067 2014-01-20 Claire Dross <dross@adacore.com>
6069 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
6070 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
6071 External_Axiomatization);
6073 2014-01-20 Robert Dewar <dewar@adacore.com>
6075 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
6076 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
6077 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
6078 Allow Loop_Entry to be used in these pragmas if they appear in
6079 an appropriate context.
6080 (Placement_Error): Specialize error
6081 message for pragma Assert[_And_Cut] or pragma Assume containing
6082 Loop_Entry attribute.
6083 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
6084 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
6087 2014-01-20 Robert Dewar <dewar@adacore.com>
6089 * gnat1drv.adb: Minor comment update.
6091 2014-01-20 Tristan Gingold <gingold@adacore.com>
6093 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
6094 variables, comment out unused code.
6095 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
6096 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
6097 * s-excmac-arm.ads: New file.
6099 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6101 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
6102 Drange and Index_Typ. Remove the circuitry which creates a
6103 range check to compare the index type of the array against the
6105 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
6106 the circuitry which creates a range check to handle a
6107 discrete_range denoted by a subtype indication.
6109 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
6111 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
6112 nodes to get the original sloc range.
6114 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6116 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
6117 entity of a [library level] package.
6119 2014-01-20 Tristan Gingold <gingold@adacore.com>
6121 * raise-gcc.c (exception_class_eq): New function.
6122 (is_handled_by): Use it to compare exception classes.
6123 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
6124 be called to return URC_CONTINUE_UNWIND.
6125 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
6126 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
6128 2014-01-20 Robert Dewar <dewar@adacore.com>
6130 * opt.ads: Minor comment update.
6132 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6134 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
6135 constants to the "Local variables" area. Add new constant D. Add
6136 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
6137 to Pref_Typ and update all occurrences. Add circuitry to extract
6138 the discrete_range and the index type and build a range check.
6140 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6142 * gnat1drv.adb (Adjust_Global_Switches): Enable
6143 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
6146 2014-01-20 Thomas Quinot <quinot@adacore.com>
6148 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
6150 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6152 * sem_ch13.adb (Analyze_Aspect_Specifications):
6153 When aspect SPARK_Mode appears on a package body, insert the
6154 generated pragma at the top of the body declarations.
6156 2014-01-20 Robert Dewar <dewar@adacore.com>
6158 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
6159 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
6160 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
6161 sem_ch8.adb, exp_dist.adb: Minor reformatting.
6163 2014-01-20 Yannick Moy <moy@adacore.com>
6165 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
6168 2014-01-20 Pascal Obry <obry@adacore.com>
6170 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
6172 * g-arrspl.adb: Adapt all routine to this new implementation.
6173 (Set): Copy the Slice_Set definition before reusing it.
6175 2014-01-20 Arnaud Charlet <charlet@adacore.com>
6177 * sem_prag.adb (Process_Import_Or_Interface): In
6178 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
6179 (Analyze_Pragma): Ditto for pragma Export.
6180 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
6183 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6185 * einfo.ads: E_Abstract_State is now part of the entities that
6186 can be overloaded. Update type Overloadable_Kind to reflect the
6187 inclusion of abstract states.
6188 * sem_ch6.adb (New_Overloaded_Entity): A function can now
6189 overload an abstract state.
6190 * sem_prag.adb (Analyze_Constituent): Handle the overloading
6191 of states by functions. Use Entity_Of to obtain the entity of
6192 a constituent. (Analyze_Global_Item): Handle the overloading of
6193 states by functions.
6194 (Analyze_Initialization_Item): Handle the
6195 overloading of states by functions. Use Entity_Of to obtain the
6197 (Analyze_Input_Item): Handle the overloading
6198 of states by functions. Use Entity_Of to obtain the entity of an item.
6199 (Analyze_Input_Output): Handle the overloading of states by functions.
6200 (Analyze_Refinement_Clause): Handle the overloading
6201 of states by functions. Use Entity_Of to obtain the entity of an item.
6202 (Appears_In): Use Entity_Of to obtain the entity of an element.
6203 (Check_Usage): Use Entity_Of to obtain the entity of
6204 an item. Add a guard to prevent a crash due to a previous error.
6205 (Resolve_State): New routine.
6207 2014-01-20 Yannick Moy <moy@adacore.com>
6209 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
6210 opt.ads: Minor comments updates.
6212 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
6214 * einfo.adb (Non_Limited_View): Applies to abstract states.
6215 (Set_From_Limited_With): Applies to abstract states.
6216 (Set_Non_Limited_View): Applies to abstract states.
6217 (Write_Field17): Output the non-limited view of an abstract state.
6218 * einfo.ads: Update the comment on usage and occurrences in
6219 nodes for attributes From_Limited_With and Non_Limited_View.
6220 * sem_aux.adb (Available_View): This routine can now handle
6222 * sem_aux.ads (Available_View): This routine can now handle
6223 abstract states. Update the comment on usage.
6224 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
6225 of states and variables.
6226 (In_Pragmas_Depends_Or_Global): New routine.
6227 * sem_ch10.adb (Build_Limited_Views): Implement
6228 abstract (limited) views of variables and states.
6229 (Build_Shadow_Entity): This routine is now a procedure. Add
6230 formal parameter Shadow. Update the comment on usage. Add
6231 context-specific decoration for states and variables.
6232 (Decorate_State): New routine. (Decorate_Variable): New routine.
6233 (Find_And_Process_States): New routine.
6234 (Process_Declarations): Renamed to Process_Declarations_And_States.
6235 (Process_Declarations_And_States): Add formal parameters
6236 Pack and Create_Abstract_Views. Update the comment on usage.
6237 (Process_States): New routine.
6238 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
6239 views of states and variables. Match the abstract view of a state
6240 against its corresponding non-abstract view.
6241 (Is_Matching_Input):
6242 Handle abstract views of states and variables. Match the abstract
6243 view of a state against its corresponding non-abstract view.
6244 (Process_Global_Item): Handle abstract views of states and
6247 2014-01-20 Bob Duff <duff@adacore.com>
6249 * sem_ch10.adb (Expand_With_Clause): Don't
6250 recurse on the prefix if the current with-ed name refers to a
6251 package that renames its own parent, eg "package P.Q renames P;".
6253 2014-01-20 Yannick Moy <moy@adacore.com>
6255 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
6256 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
6257 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
6258 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
6259 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
6262 2014-01-20 Yannick Moy <moy@adacore.com>
6264 * sinfo.ads Update documentation of GNATprove mode.
6266 2014-01-20 Yannick Moy <moy@adacore.com>
6268 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
6269 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
6270 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
6271 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
6273 * sem_ch13.adb: Remove blank.
6274 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
6275 subprograms by alias for renamings, not for inherited primitive
6277 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
6279 (Remove_Side_Effects): Apply the removal in
6280 GNATprove mode, for the full analysis of expressions.
6281 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
6283 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
6284 save/restore actions for Expander_Active flag in GNATprove mode,
6285 similar to what is done in ASIS mode.
6286 * frontend.adb (Frontend): Generic bodies are instantiated in
6288 * gnat1drv.adb (Adjust_Global_Switches): Set operating
6289 mode to Check_Semantics in GNATprove mode, although a light
6290 expansion is still performed.
6291 (Gnat1drv): Set Back_End_Mode to
6292 Declarations_Only in GNATprove mode, and later on special case
6293 the GNATprove mode to continue analysis anyway.
6294 * lib-writ.adb (Write_ALI): Always generate ALI files in
6296 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
6298 (SPARK_Mode): Renamed as GNATprove_Mode.
6299 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
6300 tree in GNATprove_Mode.
6301 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
6302 body in GNATprove mode.
6303 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
6305 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
6306 Make sure side effects are removed in GNATprove mode.
6308 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6310 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
6311 for aliased objects with an unconstrained nominal subtype.
6312 * gcc-interface/trans.c (Call_to_gnu): Likewise.
6313 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
6314 <case N_Op_Minus>: Remove useless code.
6315 (Exception_Handler_to_gnu_zcx): Minor tweaks.
6317 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6319 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
6320 Tidy up. For a subtype with discriminants and variant part, if a
6321 variant is statically selected and the fields all have a constant
6322 position, put them in order of increasing position. Likewise if
6323 no variant part but representation clause is present.
6324 * gcc-interface/utils.c (make_packable_type): Robustify.
6325 (maybe_pad_type): Use local variable and tidy up condition. If no
6326 alignment is specified, use the original one.
6327 (create_type_stub_decl): Minor tweak.
6328 (convert) <case VECTOR_CST>: Fix typo.
6329 <case CONSTRUCTOR>: Deal with padding types around the same type.
6330 Do not punt on missing fields.
6331 (unchecked_convert): Call finish_record_type to lay out the special
6332 record types made for conversions from/to problematic integer types.
6333 Bump the alignment of CONSTRUCTORs before converting them to a more
6336 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
6338 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
6339 obsolete code for type_annotate_only mode, simplify code and slightly
6340 improve wording of comments.
6342 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
6345 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
6346 as intermediate type.
6347 (UI_To_gnu): Likewise.
6349 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
6351 * gnatvsn.ads (Current_Year): Bump to 2014.
6353 2014-01-02 Tobias Burnus <burnus@net-b.de>
6355 * gnat_ugn.texi: Bump @copying's copyright year.
6357 Copyright (C) 2014 Free Software Foundation, Inc.
6359 Copying and distribution of this file, with or without modification,
6360 are permitted in any medium without royalty provided the copyright
6361 notice and this notice are preserved.