1 2014-10-31 Olivier Hainque <hainque@adacore.com>
3 * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
5 2014-10-31 Vincent Celier <celier@adacore.com>
7 * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
8 * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
9 get the project Display_Name.
10 * prj-tree.adb (Display_Name_Of): New function
11 (Set_Display_Name_Of): New procedure.
12 (Create_Project): Call Set_Display_Name_Of.
13 * prj-tree.ads (Display_Name_Of): New function.
14 (Set_Display_Name_Of): New procedure.
15 (Project_Node_Record): New component Display_Name.
16 (Project_Name_And_Node): Remove component Display_Name.
17 * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
18 Config_File_Path as the Config_File_Name, not just its simple
21 2014-10-31 Thomas Quinot <quinot@adacore.com>
23 * get_scos.adb: Minor reformatting.
25 2014-10-31 Ed Schonberg <schonberg@adacore.com>
27 * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
28 capture declaration for cursor to prevent spurious errors when
29 several formal iterators that use the same cursoe name appear
32 2014-10-31 Vincent Celier <celier@adacore.com>
34 * prj-proc.adb (Recursive_Process): Make sure that the project
35 display name is never No_Name.
37 2014-10-31 Ed Schonberg <schonberg@adacore.com>
39 * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
40 message if reference does not come from source, as in the case
41 for the controlling argument of a dispatching call. Error is
42 diagnosed when call is resolved.
43 * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
44 reference in error message.
45 * sem_res.adb (Check_Prefixed_Call): ditto.
47 2014-10-31 Yannick Moy <moy@adacore.com>
49 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
50 suppress checks when pragma Restrictions (No_Exception) is used in
51 CodePeer or GNATprove mode.
53 2014-10-31 Yannick Moy <moy@adacore.com>
55 * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
56 checks as not suppressed in GNATprove mode.
58 2014-10-31 Ed Schonberg <schonberg@adacore.com>
60 * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
62 * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
63 view are those of the base, use rep_item chain of partial view,
64 which may include aspects.
65 * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
66 of base type, to handle properly declared subtypes.
68 2014-10-31 Ed Schonberg <schonberg@adacore.com>
70 * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
71 is a default storage pool, add a corresponding aspect to the
72 generic unit, to be used at the point of instantiation.
73 (Analyze_Package_Instantiation): If generic unit has aspect
74 specifications, propagate them to instance. If instance has a
75 Default_Storage_Pool aspect, make sure that it overrides the
76 one that may be inherited from the generic.
78 2014-10-31 Vincent Celier <celier@adacore.com>
80 * prj-attr.adb: Minor removal of attributes of package Linker
81 that have never been used and never been documented.
82 * projects.texi: Add documentation for attribute Runtime.
83 * prj-nmsc.adb (Check_Configuration): Do not report a warning
84 for unknown compilers when the project is externally built.
86 2014-10-31 Vasiliy Fofanov <fofanov@adacore.com>
88 * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
89 Normalized_Pathname doesn't inhibit the custom Selected_Target
91 * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
92 Automatically_Generated is correctly set after the first call
93 to Process_Project_And_Apply_Config and not modified after the
96 2014-10-31 Yannick Moy <moy@adacore.com>
98 * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
100 * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
101 vectors, suitable for use in client SPARK code, also more
102 efficient than the standard vectors.
103 * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
104 are used to define formal indefinite vectors in terms of formal
106 * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
107 definite vectors, similar to the API of the new indefinite ones. A
108 new formal parameter of the generic unit called Bounded allows
109 to define growable vectors that use dynamic allocation.
111 2014-10-31 Vincent Celier <celier@adacore.com>
113 * prj-conf.adb (Look_For_Project_Paths): New procedure
114 (Parse_Project_And_Apply_Config): Initially, parse the project
115 files ignoring missing withs. If there are missing withs, extend
116 the project path with directories rooted at the compiler roots,
117 including directories rooted at the runtime roots, if there are
118 non default runtimes, in the PATH orser.
119 * prj-env.adb (Initialize_Default_Project_Path): Do not add
120 any directory from the prefix if the target is "-".
121 * prj-part.adb (Parse): Initialize the tables, as Parse may be
122 call several times by gprbuild.
123 * prj.adb (Update_Ignore_Missing_With): New procedure.
125 2014-10-31 Ed Schonberg <schonberg@adacore.com>
127 * sem_aux.adb (First_Stored_Discriminant,
128 Has_Completely_Hidden_Discriminant): When scanning the list of
129 discriminants to locate possibly hidden (inherited) discriminants,
130 ignore itypes that may appear in the entity list, when an access
131 discriminants is constrained by an access attribute reference.
133 2014-10-31 Javier Miranda <miranda@adacore.com>
135 * freeze.adb (Freeze_Record_Type): Add missing
136 check to verify that all the primitives of an interface type
137 are abstract or null procedures.
139 2014-10-31 Vincent Celier <celier@adacore.com>
141 * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
142 redirects standard output and standard error to two different files.
144 2014-10-31 Bob Duff <duff@adacore.com>
146 * makeutl.ads: Minor comment fix.
148 2014-10-31 Arnaud Charlet <charlet@adacore.com>
150 * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
151 Memory_Size): Use Standard'Word_Size so that the value can be changed
152 via a target configuration file.
154 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
156 * exp_ch4.adb: Minor tweak.
158 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
160 * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
162 (Must_Inline_Subp): Delete.
163 * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
165 2014-10-31 Ed Schonberg <schonberg@adacore.com>
167 * freeze.adb (Freeze_Entity): A default_pool does not apply to
168 internal access types generated for 'access references.
169 * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
170 not null it must designate a variable.
172 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
174 * inline.adb: Minor reformatting.
176 2014-10-31 Ed Schonberg <schonberg@adacore.com>
178 * sem_ch3.adb (Build_Derived_Private_Type): If the derived
179 type has access discriminants, create itype references for their
180 anonymous types, so that they are elaborated before the generated
181 bodies for the primitive operations of the type.
183 2014-10-31 Tristan Gingold <gingold@adacore.com>
185 * prj-conf.adb (Locate_Runtime): Remove procedure.
187 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
189 * inline.adb (Has_Excluded_Declaration): With back-end inlining,
190 only return true for nested packages.
191 (Cannot_Inline): Issue errors/warnings whatever the optimization level
192 for back-end inlining and remove assertion.
194 2014-10-31 Sergey Rybin <rybin@adacore.com frybin>
196 * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
197 the desired order of '*' and '/' operations to avoid overflow.
199 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
201 * exp_ch6.adb (Do_Inline): Remove unreachable code.
202 (Do_Inline_Always): Likewise.
204 2014-10-31 Vincent Celier <celier@adacore.com>
206 * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
207 when library has no Ada interfaces and Library_Standalone is
210 2014-10-31 Arnaud Charlet <charlet@adacore.com>
212 * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
213 on address clauses in CodePeer mode.
215 2014-10-31 Javier Miranda <miranda@adacore.com>
217 * inline.adb (Expand_Inlined_Call): Do not skip
218 inlining of calls to subprogram renamings.
220 2014-10-31 Hristian Kirtchev <kirtchev@adacore.com>
222 * sem_res.adb (Resolve_Entity_Name): Account for
223 the case where the immediate parent of a reference to an entity
224 is a parameter association.
226 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
228 * inline.adb (Check_And_Split_Unconstrained_Function): Do not
229 test for the presence of nested subprograms.
231 2014-10-31 Ed Schonberg <schonberg@adacore.com>
233 * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
234 * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
235 Default_Storage_Pool.
237 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
239 * sem_ch6.adb: Remove obsolete comment.
241 2014-10-31 Olivier Hainque <hainque@adacore.com>
243 * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
244 of 4si, as pixels are short.
246 2014-10-31 Ed Schonberg <schonberg@adacore.com>
248 * sem_res.adb (Resolve_Call): Do not reject a call to a protected
249 operation in the spec of a protected type, when the call appears
250 in a pre/postcondition for another protected operation.
252 2014-10-31 Tristan Gingold <gingold@adacore.com>
254 * prj-conf.adb: Locate_Runtime: Always search the runtime in
257 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
259 * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
260 change to use correct idiom for back-end inlining.
262 2014-10-31 Ed Schonberg <schonberg@adacore.com>
264 * freeze.adb (Freeze_Record_Type): Do not check component size
265 if its type is generic.
267 2014-10-31 Bob Duff <duff@adacore.com>
269 * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
271 2014-10-31 Ed Schonberg <schonberg@adacore.com>
273 * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
274 * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
275 indexing as well as function calls. b) If the context is a
276 selected component and whe are in an instance, remove entity from
277 selector name to force resolution of the node, so that explicit
278 dereferences can be generated in the instance if they were in
281 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
283 * inline.adb (Back_End_Cannot_Inline): Delete.
284 (Add_Inlined_Subprogram): Do not call it.
286 2014-10-31 Ed Schonberg <schonberg@adacore.com>
288 * exp_ch3.ads (Make_Tag_Assignment): New function, used to
289 re-initialize the tag in a tagged object declaration with
291 * exp_ch3.adb (Expand_N_Object_Declaration): Use
292 Make_Tag_Assignment to simplify code for a tagged object
294 * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
295 for the freeze node of an object.
296 * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
297 needed to extend Freeze_Actions for a tagged object declaration.
299 2014-10-31 Eric Botcazou <ebotcazou@adacore.com>
301 * gnat_ugn.texi: Further minor improvement to -flto entry.
303 2014-10-31 Gary Dismukes <dismukes@adacore.com>
305 * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
307 2014-10-30 Ed Schonberg <schonberg@adacore.com>
309 * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
311 2014-10-30 Ed Schonberg <schonberg@adacore.com>
313 * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
314 indication is provided, check properly that it covers the element
315 type of of the container type.
317 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
319 * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
322 2014-10-30 Ed Schonberg <schonberg@adacore.com>
324 * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
325 Has_Following_Address_Clause so that it returns the address
326 clause if present, rather than a boolean value.
327 * sem_ch3.adb (Analyze_Object_Declaration): use
328 Following_Address_Clause.
329 * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
330 is initialized, insert tag assignment after object is frozen,
331 which may be after an address clause that follows the declaration.
333 2014-10-30 Tristan Gingold <gingold@adacore.com>
335 * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
336 system-vxworks-arm.ads, system-freebsd-x86_64.ads,
337 system-linux-hppa.ads, system-linux-s390.ads,
338 system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
339 system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
340 system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
341 system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
342 system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
343 system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
344 system-solaris-x86_64.ads, system-mingw-x86_64.ads,
345 system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
346 system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
347 pragma No_Elaboration_Code_All.
349 2014-10-30 Eric Botcazou <ebotcazou@adacore.com>
351 * gnat_ugn.texi: Minor improvement to -flto entry.
353 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
355 * sem_util.adb (Inherit_Subprogram_Contract):
356 Add a guard to protect against enumeration literal overriding.
357 * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
358 Minor reformatting (add SPARK RM references).
360 2014-10-30 Robert Dewar <dewar@adacore.com>
362 * exp_dbug.adb, opt.ads: Minor reformatting.
364 2014-10-30 Yannick Moy <moy@adacore.com>
366 * inline.adb (Has_Single_Return_In_GNATprove_Mode):
367 Return False when return statement is inside one or more blocks.
369 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
371 * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
372 object declaration initialized by a function call that returns
373 an unconstrained result may be rewritted as a renaming of the
374 secondary stack result.
376 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
378 * aspects.adb: Add an entry for aspect Extensions_Visible in
379 table Canonical_Aspect.
380 * aspects.ads: Add entry for aspect Extensions_Visible in
381 tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
382 Implementation_Defined_Aspect.
383 * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
384 the list of contract pragmas.
385 * par-prag.adb Pragma Extensions_Visible does not require special
386 processing from the parser.
387 * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
388 implicit class-wide conversion of a formal parameter
389 of a specific tagged type whose related subprogram is
390 subject to pragma Extensions_Visible with value "False".
391 (Check_Abstract_Overriding): Add various overriding checks
392 related to pragma Extensions_Visible.
394 A subprogram subject to pragma Extensions_Visible with value
395 False requires overriding if the subprogram has at least one
396 controlling OUT parameter.
397 (Is_EVF_Procedure): New routine.
398 * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
399 a specific tagged type whose related subprogram is subject to
400 pragma Extensions_Visible with value "False" cannot appear in
401 a class-wide conversion.
402 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
403 the assertion to account for pragma Extensions_Visible.
404 (Check_Overriding_Indicator): An overriding subprogram
405 inherits the contact of the overridden subprogram.
406 (New_Overloaded_Entity): An overriding subprogram inherits the
407 contact of the overridden subprogram.
408 * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
409 for aspect Extensions_Visible.
410 (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
411 require special processing at the freeze point.
412 * sem_prag.adb Add an entry for pragma Extensions_Visible in
414 (Analyze_Pragma): Ensure that various SPARK
415 pragmas lack identifiers in their arguments. Add processing for
416 pragma Extensions_Visible.
417 (Chain_CTC): Code reformatting.
418 * sem_res.adb (Resolve_Actuals): A formal parameter of a
419 specific tagged type whose related subprogram is subject to
420 pragma Extensions_Visible with value "False" cannot act as an
421 actual in a subprogram with value "True".
422 * sem_util.adb (Add_Classification): New routine.
423 (Add_Contract_Item): Account for pragma Extensions_Visible. Code
425 (Add_Contract_Test_Case): New routine.
426 (Add_Pre_Post_Condition): New routine.
427 (Extensions_Visible_Status): New routine.
428 (Inherit_Subprogram_Contract): New routine.
429 (Is_EVF_Expression): New routine.
430 (Is_Specific_Tagged_Type): New routine.
431 * sem_util.ads Add type Extensions_Visible_Mode and document all values.
432 (Add_Contract_Item): Add pragma Extensions_Visible to the
434 (Inherit_Subprogram_Contract): New routine.
435 (Is_EVF_Expression): New routine.
436 (Is_Specific_Tagged_Type): New routine.
437 * sinfo.adb (Is_Inherited): New routine.
438 (Set_Is_Inherited): New routine.
439 * sinfo.ads Add flag Is_Inherited along with its usage in
441 (Is_Inherited): New routine along with pragma Inline.
442 (Set_Is_Inherited): New routine along with pragma Inline.
443 * snames.ads-tmpl: Add predefined name "Extensions_Visible"
444 and a new Pragma_Id for the pragma.
446 2014-10-30 Vincent Celier <celier@adacore.com>
448 * prj-proc.adb (Process_Case_Construction): Do not look for
449 the ultimate extending project for a case variable.
451 2014-10-30 Pierre-Marie Derodat <derodat@adacore.com>
453 * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
455 (gnat_encodings): Define a dummy variable for the AAMP back-end.
456 (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
457 for all discrete types whose bounds do not match size and do so
458 only for biased types when -fgnat-encodings=minimal.
459 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
460 parallel types when array bounds are constant while the lower bound is
461 not 1. Also stop generating them because the bound type is
462 larger than sizetype.
463 * gcc-interface/misc.c (gnat_encodings): New.
465 2014-10-30 Thomas Quinot <quinot@adacore.com>
467 * opt.adb (Set_Opt_Config_Switches): For an internal unit,
468 always reset Default_SSO to ' '.
470 2014-10-30 Thomas Quinot <quinot@adacore.com>
472 * freeze.adb (Freeze_Record_Type): Set SSO from default before
473 checking SSO consistency.
475 2014-10-30 Javier Miranda <miranda@adacore.com>
477 * inline.adb (Check_Package_Body_For_Inlining):
478 Cleanup this subprogram to implement exactly the behavior
479 documented in the spec.
481 2014-10-30 Hristian Kirtchev <kirtchev@adacore.com>
483 * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
484 Update the position after all insertions have taken place.
486 2014-10-30 Ed Schonberg <schonberg@adacore.com>
488 * sem_prag.adb (Analyze_Pragma, case License): Do not perform
489 analysis of pragma arguments when in CodePeer mode, pragma has
490 different format on other compilers.
492 2014-10-30 Thomas Quinot <quinot@adacore.com>
494 * s-os_lib.adb: Minor reformatting.
496 2014-10-29 Richard Sandiford <richard.sandiford@arm.com>
498 * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
499 gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
500 Remove redundant enum from machine_mode.
502 2014-10-28 Andrew MacLeod <amacleod@redhat.com>
504 * gcc-interface/trans.c: Adjust include files.
505 * gcc-interface/utils.c: Ditto.
507 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
509 * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
511 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
513 * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
514 support here instead of...
515 Do not set flag_delete_dead_exceptions to 1 unconditionally.
516 (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
517 (gnat_init_gcc_fp): ...here.
519 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
521 * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
523 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
525 * gcc-interface/utils.c (create_var_decl_1): For a variable declared
526 in the unit, set TREE_PUBLIC only if it has static storage duration.
528 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
530 * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
531 of derived packed array types to constrained subtypes only.
533 2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
535 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
536 superfluous computation for the max size.
537 <E_Array_Subtype>: Likewise. Make sure that the max size calculation
538 does not overflow at compile time.
540 2014-10-23 Ed Schonberg <schonberg@adacore.com>
542 * sem_eval.adb (Check_Non_Static_Context): Do not set
543 Is_Machine_Number on a literal of a fixed-point type.
545 2014-10-23 Robert Dewar <dewar@adacore.com>
547 * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
549 2014-10-23 Pierre-Marie Derodat <derodat@adacore.com>
551 * exp_dbug.ads: Update ___XA parallel type specification.
553 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
555 * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
556 chain of the source type.
557 * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
558 reformatting of an error message.
559 * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
560 chain that has been inherited already.
562 2014-10-23 Ed Schonberg <schonberg@adacore.com>
564 * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
565 in generic context, and generate body in this case as well,
566 to simplify ASIS traversals on the construct.
568 2014-10-23 Ed Schonberg <schonberg@adacore.com>
570 * sem_ch4.adb (Complete_Object_Operation): Indicate that the
571 scope of the operation (s) is referenced, to prevent spurious
572 warnings about unused units.
574 2014-10-23 Johannes Kanig <kanig@adacore.com>
576 * errout.adb (Error_Msg_Internal): Copy check flag, increment
578 * erroutc.adb (Delete_Msg) adjust check msg count.
579 (Output_Msg_Text) handle check msg case (do nothing).
580 (Prescan_Message) recognize check messages with severity prefixes.
581 * errutil.adb (Error_Msg) handle check flag, adjust counter.
583 2014-10-23 Ed Schonberg <schonberg@adacore.com>
585 * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
586 type, check for the presence of discriminants in its parent type,
587 against the presence of discriminants in the context type.
589 2014-10-23 Tristan Gingold <gingold@adacore.com>
591 * adaint.c: __gnat_get_file_names_case_sensitive: Default is
594 2014-10-23 Arnaud Charlet <charlet@adacore.com>
596 * pprint.adb (Expression_Image): Add handling of quantifiers.
598 2014-10-23 Ed Schonberg <schonberg@adacore.com>
600 * exp_pakd.adb (Expand_Packed_Element_Reference): If the
601 prefix is a source entity, generate a reference to it before
602 transformation, because rewritten node might not generate a
603 proper reference, leading to spurious warnings.
605 2014-10-23 Tristan Gingold <gingold@adacore.com>
607 * init.c: Fix thinko in previous patch.
609 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
611 * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
612 Inherit the rep chain of the implicit base type.
613 (Floating_Point_Type_Declaration): Inherit the rep chain of the
615 (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
617 (Signed_Integer_Type_Declaration): Inherit the rep chain of the
619 * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
621 2014-10-23 Pascal Obry <obry@adacore.com>
623 * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
624 view of the registry.
626 2014-10-23 Ed Schonberg <schonberg@adacore.com>
628 * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
629 return without expanding expression, to prevent subsequent crash.
630 * freeze.adb: better error message for illegal declaration.
632 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
634 * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
635 substring which represents the time zone on VxWorks.
637 2014-10-23 Vincent Celier <celier@adacore.com>
639 * gnatls.adb: If --RTS= was not used, check if there is a default
640 runtime. If there is none, in verbose mode, indicate that the
641 default runtime is not available and show only the current
642 directory in the source and the object search paths.
644 2014-10-23 Ed Schonberg <schonberg@adacore.com>
646 * sem_ch6.adb (Process_Formals): A thunk procedure with a
647 parameter of a limited view does not need a freeze node.
649 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
651 * sem_ch7.adb (Analyze_Package_Body_Helper):
652 The logic which hides local entities from external
653 visibility is now contained in routine Hide_Public_Entities.
654 (Hide_Public_Entities): New routine. Object and subprogram
655 renamings are now hidden from external visibility the same way
658 2014-10-23 Ed Schonberg <schonberg@adacore.com>
660 * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
661 does not require freezing, in particular if it denotes a generic
664 2014-10-23 Yannick Moy <moy@adacore.com>
666 * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
667 Disable analysis in GNATprove mode.
669 2014-10-23 Arnaud Charlet <charlet@adacore.com>
671 * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
673 2014-10-23 Arnaud Charlet <charlet@adacore.com>
675 * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
676 pragmas in codepeer mode.
678 2014-10-23 Gary Dismukes <dismukes@adacore.com>
680 * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
682 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
684 * sem_ch12.adb (Inline_Instance_Body): Alphabetize
685 local variables and constants. Add constants Save_SM and Save_SMP
686 to capture SPARK_Mode-related attributes. Compile the inlined
687 body with the SPARK_Mode of the enclosing context.
689 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
691 * sinfo.adb (Elaboration_Boolean): Removed.
692 (Set_Elaboration_Boolean): Removed.
693 * sinfo.ads Remove attribute Elaboration_Boolean along with its
695 (Elaboration_Boolean): Removed along with pragma Inline.
696 (Set_Elaboration_Boolean): Removed along with pragma Inline.
698 2014-10-23 Ed Schonberg <schonberg@adacore.com>
700 * sem_ch3.adb (Constant_Redeclaration): Make error message more
701 explicit on a deferred constant whose object_definition is an
704 2014-10-23 Vincent Celier <celier@adacore.com>
706 * gnatls.adb: Never call Targparm.Get_Target_Parameters.
708 2014-10-23 Ed Schonberg <schonberg@adacore.com>
710 * sem_ch6.adb (Analyze_Expression_Function): In a generic
711 context do not create a body, and only pre-analyze the expression,
712 which may include incomplete views.
714 2014-10-23 Robert Dewar <dewar@adacore.com>
716 * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
717 * sem_ch3.adb: Minor reformatting.
719 2014-10-23 Ed Schonberg <schonberg@adacore.com>
721 * sem_ch12.adb (Analyze_Associations): If an actual for a formal
722 object is a call to a parameterless expression function, add
723 the function to the list of actuals to freeze.
724 * freeze.adb (Check_Expression_Function): Create freeze nodes of
725 outer types that may be references in the body of the expression.
727 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
729 * exp_util.ads, checks.ads: Minor comment reformatting.
731 2014-10-23 Javier Miranda <miranda@adacore.com>
733 * sem_eval (Test_In_Range): Disable removal of range_check for
736 2014-10-23 Robert Dewar <dewar@adacore.com>
738 * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
739 messages, which got disabled when we unconditionally added an
740 asterisk at the start of the string.
742 2014-10-23 Vincent Celier <celier@adacore.com>
744 * gnatls.adb: Ensure that "gnatls -l" works even when there is
747 2014-10-23 Eric Botcazou <ebotcazou@adacore.com>
749 * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
750 untagged and has discriminants, build the implicit full view after
751 building the derived type. Capture original declaration and type
753 (Copy_And_Build): ...here.
754 * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
756 2014-10-23 Hristian Kirtchev <kirtchev@adacore.com>
758 * checks.adb (Ensure_Valid): Update the subprogram
759 profile. Propagate the contex attributes to Insert_Valid_Check.
760 (Insert_Valid_Check): Update the subprogram profile. Propagate
761 the attributes of the context to Duplicate_Subexpr_No_Checks.
762 (Validity_Check_Range): Update the subprogram profile. Propagate
763 the context attribute to Ensure_Valid.
764 * checks.ads (Ensure_Valid): Update the subprogram profile
765 along with the comment on usage.
766 (Insert_Valid_Check): Update the subprogram profile along with the
768 (Validity_Check_Range): Update the subprogram profile along with
769 the comment on usage.
770 * exp_util.adb (Build_Temporary): New routine.
771 (Duplicate_Subexpr_No_Checks): Update the subprogram
772 profile. Propagate the attributes of the context to Remove_Side_Effects.
773 (Remove_Side_Effects): Update the subprogram profile. Update all calls
774 to Make_Temporary to invoke Build_Temporary.
775 * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
776 the subprogram profile along with the comment on usage.
777 (Remove_Side_Effects): Update the subprogram profile along with
778 the comment on usage.
779 * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
780 to the validity check machinery. Explain the reason for this
783 2014-10-23 Robert Dewar <dewar@adacore.com>
785 * a-strsea.adb: Minor reformatting.
787 2014-10-23 Thomas Quinot <quinot@adacore.com>
789 * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
790 units from consistency check.
791 * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
792 consistency check excludes run-time units.
794 2014-10-23 Ed Schonberg <schonberg@adacore.com>
796 * a-strsea.adb (Find_Token): Enable constraint checking in this
797 procedure, so that even when compiling with checks suppressed, as is
798 the case for the run-time, an exception is raised in this routine when
799 the input meets the conditions described in RM 2005 A.4.3 (68/1).
801 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
803 * sem_ch3.adb (Build_Derived_Private_Type): When the parent
804 is untagged and has discriminants, build the implicit full
805 view even if the derived type is a completion, and make it
806 the Underlying_Full_View of the type.
807 (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
809 (Build_Derived_Record_Type): Likewise.
811 2014-10-20 Ed Schonberg <schonberg@adacore.com>
813 * sem_ch13.adb: Add guard to convention setting.
815 2014-10-20 Robert Dewar <dewar@adacore.com>
817 * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
820 2014-10-20 Robert Dewar <dewar@adacore.com>
822 * par-prag.adb (Add_List_Pragma_Entry): New procedure.
823 * par.adb (P_Pragma): Document requirement to handle multiple calls.
825 2014-10-20 Robert Dewar <dewar@adacore.com>
827 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
828 Fix error of bad inheritance of this pragma from with'ed unit.
830 2014-10-20 Ed Schonberg <schonberg@adacore.com>
832 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
833 inherit convention from parent type, because the subtype may
834 have been declared on a partial view, prior to the pragma on
837 2014-10-20 Olivier Hainque <hainque@adacore.com>
838 Tristan Gingold <gingold@adacore.com>
840 * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
843 2014-10-20 Nicolas Roche <roche@adacore.com>
845 * gcc-interface/Make-lang.in: ensure that automatically generated
846 dependency are referencing generated gnatvsn rather than original
849 2014-10-20 Gary Dismukes <dismukes@adacore.com>
851 * gnat_ugn.texi: Minor reformatting.
852 * sem_ch3.adb: Minor reformatting.
854 2014-10-20 Vincent Celier <celier@adacore.com>
856 * prj-attr.adb: New project level attribute Runtime.
857 * prj-conf.adb (Get_Project_Runtimes): New procedure to get
858 the attributes Runtime declared in the main project, to use
859 in auto-configuration.
860 (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
861 * prj-proc.adb (Runtime_Defaults): New table to store
862 the default values of attributes Runtime (<language>).
863 (Set_Default_Runtime_For): New procedure to store the default
864 value of a Runtime (<language>) in table Runtime_Defaults.
865 (Expression): Use the value stored in table Runtime_Defaults as
866 the default for Runtime (<language>).
867 * prj-proc.ads (Set_Default_Runtime_For): New procedure.
868 * prj.ads (Attribute_Default_Value): New enumerated value
871 2014-10-20 Ed Schonberg <schonberg@adacore.com>
873 * sem_ch3.adb (Analyze_Object_Declaration): If the type is
874 an unconstrained unchecked_union type, rewrite declaration
875 as a renaming to prevent attempt to retrieve non- existent
876 discriminants from expression.
878 2014-10-20 Ed Schonberg <schonberg@adacore.com>
880 * gnat_ugn.texi: Minor reformatting.
882 2014-10-20 Tristan Gingold <gingold@adacore.com>
884 * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
886 * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
889 2014-10-20 Hristian Kirtchev <kirtchev@adacore.com>
891 * sem_attr.adb (Analyze_Attribute): Replace
892 variables CS and PS with Proc_Id and Subp_Id to better illustrate
893 their purpose. Account for the case where _Postconditions
894 has not been generated yet and the context is aspect/pragma
895 Refined_Post. In that scenario the expected prefix of attribute
896 'Result is the current scope.
898 2014-10-20 Robert Dewar <dewar@adacore.com>
900 * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
901 in middle of expression with logical operators.
903 2014-10-20 Robert Dewar <dewar@adacore.com>
905 * par-ch13.adb (Possible_Misspelled_Aspect): New function.
907 2014-10-20 Steve Baird <baird@adacore.com>
909 * pprint.adb: Improve Expression_Image function.
911 2014-10-20 Robert Dewar <dewar@adacore.com>
913 * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
914 * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
915 * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
916 * einfo.adb (No_Tagged_Streams_Pragma): New field.
917 * einfo.ads: Minor reformatting (reorder entries).
918 (No_Tagged_Streams_Pragma): New field.
919 * exp_ch3.adb: Minor comment update.
920 * opt.ads (No_Tagged_Streams): New variable.
921 * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
922 * sem.ads (Save_No_Tagged_Streams): New field in scope record.
923 * sem_attr.adb (Check_Stream_Attribute): Check stream ops
924 prohibited by No_Tagged_Streams.
925 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
926 No_Tagged_Streams_Pragma.
927 (Analyze_Subtype_Declaration): ditto.
928 (Build_Derived_Record_Type): ditto.
929 (Record_Type_Declaration): ditto.
930 * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
931 (Push_Scope): Save No_Tagged_Streams.
932 * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
935 2014-10-20 Robert Dewar <dewar@adacore.com>
937 * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
938 sem_ch13.adb: Minor reformatting.
940 2014-10-20 Javier Miranda <miranda@adacore.com>
942 * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
943 declaration of a class-wide limited object containing an
944 initializing expression into a renaming declaration. Required to
945 avoid passing such declaration to the backend and also to avoid
946 generating an extra copy.
948 2014-10-20 Eric Botcazou <ebotcazou@adacore.com>
950 * inline.adb (List_Inlining_Info): Minor tweaks.
951 (Add_Inlined_Body): Inline the enclosing package
952 if it is not internally generated, even if it doesn't come
955 2014-10-20 Ed Schonberg <schonberg@adacore.com>
957 * sem_ch4.adb (Process_Function_Call): If the first actual
958 denotes a discrete type, the mode must be interpreted as a slice
959 of an array returned by a parameterless call.
961 2014-10-20 Vasiliy Fofanov <fofanov@adacore.com>
963 * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
964 searching for runtime referenced by a simple name on a project path.
966 2014-10-20 Olivier Hainque <hainque@adacore.com>
968 * vxworks-x86-link.spec: New file.
969 * system-vxworks-x86.ads: Add pragma Linker_Options to link with
970 vxworks-x86-link.spec.
972 2014-10-20 Vincent Celier <celier@adacore.com>
974 * opt.ads (Origin_Of_Target): New type.
975 (Target_Origin): New variable.
976 * prj-conf.adb (Parse_Project_And_Apply_Config): Record
977 Target_Value and Target_Origin. If target was not specified
978 on the command line with --target=, check if attribute Target
979 is declared in the main project. If it is and it is not the
980 native target, parse again the projects so that 'Target get
981 the new value. Fail if the target has changed again. Invoke
982 Process_Project_And_Apply_Config with Do_Phase_1 set to False
983 is Process_Project_Tree_Phase_1 has already been invoked.
984 * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
985 parameter Do_Phase_1, defaulted to True.
986 * prj-proc.adb (Expression): Check the special values and
987 defaults for attribute Target.
989 2014-10-20 Ed Schonberg <schonberg@adacore.com>
991 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
992 the subprogram spec of the body in full, because it will be
993 reanalyzed when the declaration itself is analyzed; otherwise. a
994 formal may end up duplicated in the list of formals leading to
995 spurious conformance errors with an existing declaration.
997 2014-10-20 Ed Schonberg <schonberg@adacore.com>
999 * sem_ch13.adb: Improve error recovery on illegal aspect.
1001 2014-10-20 Arnaud Charlet <charlet@adacore.com>
1003 * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
1004 Fix calling C APIs with no trailing NUL char by calling better
1007 2014-10-20 Tristan Gingold <gingold@adacore.com>
1009 * gnat_ugn.texi: Document that gdb users must be in group
1010 _developer on mac os.
1012 2014-10-20 Arnaud Charlet <charlet@adacore.com>
1014 * a-tgdico.ads: Fix typo.
1016 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1018 * exp_aggr.adb (Convert_To_Assignments): Do not create a
1019 transient scope for a component whose type requires it, if the
1020 context is an initialization procedure, because the target of
1021 the assignment must be visible outside of the block.
1023 2014-10-20 Tristan Gingold <gingold@adacore.com>
1025 * tracebak.c: Define PC_ADJUST for arm-darwin.
1026 * env.c: Remove darwin specific code.
1027 * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
1029 2014-10-20 Ed Schonberg <schonberg@adacore.com>
1031 * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
1032 is incomplete rather than private, and full type declaration
1033 has aspects, analyze aspects on the full view rather than
1034 the incomplete view, to prevent freezing anomalies with the
1037 2014-10-17 Robert Dewar <dewar@adacore.com>
1039 * exp_ch9.adb (Expand_N_Task_Body): Add defense against
1041 * freeze.adb (Freeze_Entity): Add defense against checking null
1043 * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
1044 * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
1046 * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
1047 in No_Run_Time mode.
1049 2014-10-17 Robert Dewar <dewar@adacore.com>
1051 * prj-makr.adb: Minor reformatting.
1053 2014-10-17 Robert Dewar <dewar@adacore.com>
1055 * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
1056 prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
1058 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1060 * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
1061 is enabled, code will be generated for some composite types
1062 to initialize an object after its declaration. If there is
1063 a subsequent Import pragma for the object, that code must be
1064 removed as specified byw the semantics of the pragma, and to
1065 prevent out-of-order elaboration issues in the back-end.
1067 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1069 * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
1070 wrapping mechanism under debug flag -gnatd.h.
1071 * debug.adb: Claim debug switch -gnatd.h.
1073 2014-10-17 Doug Rupp <rupp@adacore.com>
1075 * gcc-interface/Makefile.in: Enable the socket runtime bits
1078 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1080 * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
1081 not perform the replacement on the expression for an inherited
1082 class-wide invariant if in ASIS_Mode and the type reference is
1083 already the prefix of a 'Class attribute reference: the expression
1084 has already been preanalyzed and the replacement performed when
1085 first encountered on the declaration of the parent type.
1087 2014-10-17 Robert Dewar <dewar@adacore.com>
1089 * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
1092 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1094 * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
1095 subprogram from base type.
1096 * sem_ch7.adb (Analyze_Package_Specification): Build invariant
1097 subprogram for private type, not any of its subtypes.
1098 * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
1099 of procedure entity, because a call to it may be generated in
1100 a client unit before the corresponding subprogram declaration
1103 2014-10-17 Vincent Celier <celier@adacore.com>
1105 * prj-nmsc.adb (Get_Directories): Do not create directories
1106 when a project is abstract.
1108 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1110 * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1111 of iteration is given by an expression that is not an array type,
1112 verify that its type implements an iterator iterface.
1114 2014-10-17 Robert Dewar <dewar@adacore.com>
1116 * sem_attr.adb (Eval_Attribute): Ensure that attribute
1117 reference is not marked as being a static expression if the
1118 prefix evaluation raises CE.
1120 2014-10-17 Robert Dewar <dewar@adacore.com>
1122 * exp_pakd.adb: Move bit packed entity tables to spec.
1123 * exp_pakd.ads: Move bit packed entity tables here from body.
1124 * freeze.adb (Freeze_Array_Type): Check that packed array type
1126 * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
1127 Specialize messages using PRE_Id_Table.
1128 * uintp.ads, uintp.adb (UI_Image): New functional form.
1130 2014-10-17 Robert Dewar <dewar@adacore.com>
1132 * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
1133 * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
1135 * exp_ch3.adb (Default_Initialize_Object): Handle
1136 Suppress_Initialization.
1137 * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
1138 procedure (Expand_N_Pragma): Handle Suppress_Initialization
1139 (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
1140 (Undo_Initialization): New procedure.
1141 * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
1142 This is now allowed for E_Variable case.
1143 * gnat_rm.texi: Document new aspect Suppress_Initialization
1144 Suppress_Initialization aspect/pragma can apply to variable.
1145 * einfo.ads: Minor reformatting.
1147 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1149 * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
1151 2014-10-17 Robert Dewar <dewar@adacore.com>
1153 * cstand.adb (Create_Standard): Mark Short_Integer as
1154 implementation defined.
1155 * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
1156 compiler built with assertions for No_Implementation_Identifiers test.
1158 2014-10-17 Robert Dewar <dewar@adacore.com>
1160 * aspects.ads: Documentation fix, aspect Lock_Free does have a
1161 corresponding pragma.
1162 * gnat_rm.texi: Document implementation defined boolean aspects
1165 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1167 * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
1168 preserve semantic information on the invariant expression
1169 (typically a function call) because it may be inherited by a
1170 type extension in a different unit, and it cannot be resolved
1171 by visibility elsewhere because it may refer to local entities.
1173 2014-10-17 Robert Dewar <dewar@adacore.com>
1175 * gnat_rm.texi: Document that string literal can be used for
1176 pragma Warnings when operating in Ada 83 mode.
1178 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1180 * freeze.adb (Find_Aggregate_Component_Desig_Type): New
1181 subsidiary function to Freeze_ Expression, used to determine
1182 whether an aggregate for an array of access types also freezes the
1183 designated type, when some aggregate components are allocators.
1185 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1187 * a-strsea.adb (Find_Token): AI05-031 indicates that the
1188 procedure must raise Index_Error when Source is not empty and
1189 the From parameter is not within the range of the Source string.
1191 2014-10-17 Robert Dewar <dewar@adacore.com>
1193 * sem_prag.adb (Is_Static_String_Expression): Allow string
1194 literal in Ada 83 mode.
1196 2014-10-17 Vincent Celier <celier@adacore.com>
1198 * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
1199 not take into account any compiler command from package IDE.
1201 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1203 * sem_ch12.adb (Build_Function_Wrapper): The formals of the
1204 wrapper must have the same identifiers as those of the formal
1205 subprogram, because calls within the generic may use named
1208 2014-10-17 Robert Dewar <dewar@adacore.com>
1210 * sem_ch3.adb, a-strsea.adb: Minor reformatting.
1211 * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
1213 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1215 * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
1216 specfications from original type declaration to declaration of
1217 implicit base, because original node is rewritten as a subtype
1218 declaration on which type aspects do not belong.
1220 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1222 * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
1223 inherits the attributes related to pragma Default_Initial_Condition
1224 from its parent type.
1226 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1228 * a-strsea.adb (Index - versions with a From parameter):
1229 According to AI05-056, the Index functions with a From parameter
1230 return 0 if the source is an empty string.
1232 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1234 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
1235 the consistency checks in ASIS mode.
1237 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1239 * s-expmod.ads: Minor typo fix.
1241 2014-10-17 Robert Dewar <dewar@adacore.com>
1243 * sem_util.adb: Minor reformatting.
1245 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1247 * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
1248 actuals that are defaulted subprograms of the formal subprogram
1251 2014-10-17 Robert Dewar <dewar@adacore.com>
1253 * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
1254 implementation base type.
1255 * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
1256 operands are always expanded out into component comparisons.
1258 2014-10-17 Robert Dewar <dewar@adacore.com>
1260 * s-vallli.adb: Minor comment correction.
1261 * s-valuti.ads: Minor comment reformatting.
1263 2014-10-17 Robert Dewar <dewar@adacore.com>
1265 * gnat_rm.texi: Document System.Atomic_Counters.
1266 * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
1267 list of user- accessible units added as children of System.
1268 * s-atocou.ads: Update comment.
1270 2014-10-17 Arnaud Charlet <charlet@adacore.com>
1272 * s-expmod.ads: Add comments.
1274 2014-10-17 Hristian Kirtchev <kirtchev@adacore.com>
1276 * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
1277 of all attributes related to pragma Default_Initial_Condition.
1278 (Build_Derived_Type): Propagation of all attributes related
1279 to pragma Default_Initial_Condition.
1280 (Process_Full_View): Account for the case where the full view derives
1281 from another private type and propagate the attributes related
1282 to pragma Default_Initial_Condition to the private view.
1283 (Propagate_Default_Init_Cond_Attributes): New routine.
1284 * sem_util.adb: Alphabetize various routines.
1285 (Build_Default_Init_Cond_Call): Use an unchecked type conversion
1286 when calling the default initial condition procedure of a private type.
1287 (Build_Default_Init_Cond_Procedure_Declaration): Prevent
1288 the generation of multiple default initial condition procedures.
1290 2014-10-17 Robert Dewar <dewar@adacore.com>
1292 * prj-conf.adb: Revert previous change.
1294 2014-10-17 Robert Dewar <dewar@adacore.com>
1296 * lib-writ.ads, s-valdec.ads: Minor reformatting.
1298 2014-10-17 Ed Schonberg <schonberg@adacore.com>
1300 * sem_ch12.adb: Additional work on function wrappers.
1302 2014-10-17 Eric Botcazou <ebotcazou@adacore.com>
1304 * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
1305 on the renamed object of renamings.
1307 2014-10-17 Vincent Celier <celier@adacore.com>
1309 * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
1310 mode, always use the native target.
1312 2014-10-16 Andrew MacLeod <amacleod@redhat.com>
1314 * gcc-interface/misc.c: Adjust include files.
1316 2014-10-13 Eric Botcazou <ebotcazou@adacore.com>
1317 Alan Modra <amodra@gmail.com>
1320 * uintp.adb (Vector_To_Uint): Move from here to...
1321 * uintp.ads (UI_Vector): Make public.
1322 (Vector_To_Uint): ...here.
1324 2014-10-10 Robert Dewar <dewar@adacore.com>
1326 * freeze.adb, sem_attr.adb: Minor reformatting.
1328 2014-10-10 Johannes Kanig <kanig@adacore.com>
1330 * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1331 a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
1334 2014-10-10 Vincent Celier <celier@adacore.com>
1336 * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
1337 any configuration switches from the project file.
1339 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1341 * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
1342 (Build_Function_Wrapper): New function, to construct a wrapper
1343 function for actuals that are functions with an arbitrary
1344 number of parameters. Used in GNATProve mode to simplify proof
1345 propagation in instantiations.
1347 2014-10-10 Robert Dewar <dewar@adacore.com>
1349 * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
1352 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1354 * sem_res.adb (Is_OK_Volatile_Context): Allow
1355 a volatile object reference to appear as the expression of a
1358 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1360 * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
1361 Aspect specification is legal on a local instantiation of a
1362 library-level generic unit.
1364 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1366 * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
1367 if inlining has been enabled via -gnatn and the target is not GCC.
1369 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1371 * freeze.adb (Freeze_Entity): Freezing a subprogram does
1372 not always freeze its profile. In particular, an attribute
1373 reference that takes the access type does not freeze the types
1376 2014-10-10 Robert Dewar <dewar@adacore.com>
1378 * errout.adb (Adjust_Name_Case): New procedure.
1379 (Set_Msg_Node): Use Adjust_Name_Case.
1380 * errout.ads (Adjust_Name_Case): New procedure.
1381 * exp_intr.adb (Add_Source_Info): Minor code reorganization
1383 (Write_Entity_Name): Use Errout.Adjust_Name_Case.
1384 * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
1385 and fix up entries in Sig_Flags, and correct logical errors in
1387 * sprint.adb (Sprint_Node_Actual): Properly print string for
1390 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1392 * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
1393 anonymous array type with delayed aspects, defer freezing of
1394 type until object itself is frozen.
1395 * freeze.adb (Freeze_Entity): When freezing an object of an
1396 anonymous array type with delayed aspects, remove freeze node of
1397 object after freezing type, to prevent out-of-order elaboration
1398 in the back-end. The initialization call for the object has
1399 already been constructed when expanding the object declaration.
1401 2014-10-10 Robert Dewar <dewar@adacore.com>
1403 * exp_intr.adb (Write_Entity_Name): Moved to outer level
1404 (Write_Entity_Name): Properly handle operator names
1405 (Expand_Source_Info): New procedure.
1406 * exp_intr.ads (Add_Source_Info): New procedure.
1408 2014-10-10 Robert Dewar <dewar@adacore.com>
1410 * butil.ads: Minor reformatting.
1411 * sem_ch5.adb: Code clean up.
1413 2014-10-10 Robert Dewar <dewar@adacore.com>
1415 * exp_ch11.adb (Expand_N_Raise_Statement): Handle
1416 Prefix_Exception_Messages.
1417 * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
1418 * opt.ads: New flags Prefix_Exception_Message[_Config].
1419 * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
1420 * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
1421 * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
1422 * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
1424 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1426 * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
1427 raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
1429 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1431 * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
1432 contain pragmas generated for loop invariants and type predicates.
1433 Clarify use of this subprogram.
1435 2014-10-10 Yannick Moy <moy@adacore.com>
1437 * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
1439 * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
1442 2014-10-10 Vadim Godunko <godunko@adacore.com>
1444 * a-stwima.adb (To_Sequence): Compute size of result array.
1446 2014-10-10 Javier Miranda <miranda@adacore.com>
1448 * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
1449 sources of the example to avoid a warning when the Ada files are
1450 automatically generated by the binding generator.
1452 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1454 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
1455 Do_Range_Check on the expression of a record component
1456 association when needed, as is done for array components, when
1457 the corresponding type is a scalar type.
1459 2014-10-10 Gary Dismukes <dismukes@adacore.com>
1461 * a-coinho-shared.adb: Minor typo fix.
1462 * prj-env.ads: Minor reformatting.
1464 2014-10-10 Hristian Kirtchev <kirtchev@adacore.com>
1466 * sem_res.adb (Resolve_String_Literal): Do not
1467 generate a string literal subtype for the default expression of
1468 a formal parameter in GNATprove mode.
1470 2014-10-10 Yannick Moy <moy@adacore.com>
1472 * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
1474 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1476 * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
1477 declaration for loop parameter before rest of loop, and set
1478 entity kind to prevent assignments to it in the user code.
1479 * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
1480 loop parameter in an element iteration over o formal container.
1482 2014-10-10 Robert Dewar <dewar@adacore.com>
1484 * gnat_ugn.texi: Document use of user-level routines to handle
1485 e.g. col major arrays.
1487 2014-10-10 Doug Rupp <rupp@adacore.com>
1489 * s-osinte-android.adb: Fix misspelling.
1490 * gsocket.h: Tweak the Android quirks.
1492 2014-10-10 Robert Dewar <dewar@adacore.com>
1494 * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
1496 2014-10-10 Robert Dewar <dewar@adacore.com>
1498 * sem_ch13.adb: Minor code reorganization.
1500 2014-10-10 Pat Rogers <rogers@adacore.com>
1502 * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
1505 2014-10-10 Vadim Godunko <godunko@adacore.com>
1507 * a-coinho-shared.adb: Add minor comment.
1508 * a-stzmap.adb (To_Sequence): Compute size of result array.
1510 2014-10-10 Javier Miranda <miranda@adacore.com>
1512 * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
1513 if-stmt to match its current documentation.
1515 2014-10-10 Robert Dewar <dewar@adacore.com>
1517 * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
1518 freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
1519 sem_ch6.adb, sem_cat.adb, sem_disp.adb
1520 (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
1521 throughout where appropriate.
1523 2014-10-10 Bob Duff <duff@adacore.com>
1525 * a-coinho-shared.ads: Minor reformatting.
1526 * s-traceb.adb: Minor clean up.
1528 2014-10-10 Robert Dewar <dewar@adacore.com>
1530 * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
1531 * ali.ads (GNATprove_Mode): New component in ALI table.
1532 (GNATprove_Mode_Specified): New global.
1533 * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
1535 * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
1538 2014-10-10 Javier Miranda <miranda@adacore.com>
1540 * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
1541 (Build_Init_Statement): Ensure that statements
1542 associated with the parent components are located at the beginning
1543 of the returned list of statements.
1545 2014-10-10 Ed Schonberg <schonberg@adacore.com>
1547 * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
1548 view of a private type T that has a type invariant is a scalar
1549 or constrained array type, the base type created for the full
1550 view has the same type invariant.
1552 2014-10-10 Robert Dewar <dewar@adacore.com>
1554 * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
1557 2014-09-22 Eric Botcazou <ebotcazou@adacore.com>
1559 * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
1560 * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
1562 2014-09-15 Jakub Jelinek <jakub@redhat.com>
1564 * gcc-interface/Make-lang.in (check_acats_numbers0,
1565 check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
1566 check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
1567 check_acats_numbers, check_acats_subdirs): New variables.
1568 (check_acats_targets): Use $(check_acats_subdirs).
1569 (check-acats, check-acats%): Rewritten so that for parallelized
1570 testing each job runs all the chapters files, with
1571 GCC_RUNTEST_PARALLELIZE_DIR set in environment. Prepare the support
1572 directory sequentially and share it.
1573 (check-acats-subtargets): Always print just check-acats.
1575 2014-08-25 Martin Liska <mliska@suse.cz>
1577 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
1578 new cgraph interface.
1579 (gnat_write_global_declarations): Likewise.
1581 2014-08-13 Sylvestre Ledru <sylvestre@debian.org>
1583 * 9drpc.adb: Fix a typo
1584 * s-interr.ads: Likewise
1585 * s-taskin.ads: Likewise
1586 * s-traces.ads: Likewise
1587 * sysdep.c: Likewise
1589 2014-08-12 Joel Sherrill <joel.sherrill@oarcorp.com>
1591 * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
1592 * gsocket.h Add include of <unistd.h> on RTEMS.
1594 2014-08-11 Joel Sherrill <joel.sherrill@oarcorp.com>
1596 * s-osinte-rtems.adb: Correct formatting of line in license block.
1598 2014-08-04 Claire Dross <dross@adacore.com>
1600 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1601 For an instance, look at the scope before the generic parent.
1603 2014-08-04 Yannick Moy <moy@adacore.com>
1605 * lib-writ.ads: Update comments.
1606 * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
1607 parameters to filter inherited subprograms.
1609 2014-08-04 Robert Dewar <dewar@adacore.com>
1611 * gnat_rm.texi: Add section on use of address clause for memory
1614 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1616 * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
1617 particular the subtype created for a generic actual, inherits
1618 invariant information from the base type.
1620 2014-08-04 Robert Dewar <dewar@adacore.com>
1622 * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
1623 * gnat_rm.texi: Add documentation for aspect Obsolescent.
1624 * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
1626 (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
1627 * s-osprim-mingw.adb: Minor reformatting.
1628 * sem_res.adb (Is_Atomic_Ref_With_Address): New function
1629 (Resolve_Indexed_Component): Rework warnings for non-atomic access
1630 (Resolve_Selected_Component): Add warnings for non-atomic access.
1632 2014-08-04 Doug Rupp <rupp@adacore.com>
1634 * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
1635 formal to long_long.
1636 * g-calend.ads (timeval): Bump up size to accomodate sec type.
1637 * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
1639 * s-osprim-posix.adb (timeval): Bump up size to accomodate
1641 (timeval_to_duration): Change sec formal to Long_Long_Integer
1642 * s-osinte-darwin.adb (timeval): Bump up
1643 size to accomodate new sec type.
1644 (timeval_to_duration): Change sec formal to long_long
1645 * s-osinte-android.adb: Likewise.
1646 * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
1647 sec formal from long to long long.
1649 2014-08-04 Robert Dewar <dewar@adacore.com>
1651 * sem_res.adb (Resolve_Qualified_Expression): Make sure
1652 Do_Range_Check flag gets set.
1654 2014-08-04 Robert Dewar <dewar@adacore.com>
1656 * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
1657 * exp_ch3.adb (Build_Array_Init_Proc): Use
1658 Is_Standard_String_Type.
1659 (Expand_Freeze_Array_Type): ditto.
1660 (Get_Simple_Init_Val): ditto.
1661 (Needs_Simple_Initialization): ditto.
1662 * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
1663 * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
1665 2014-08-04 Pascal Obry <obry@adacore.com>
1667 * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
1668 _stprintf which insert garbage into the wfull_path buffer.
1670 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1672 * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
1674 * fe.h: Minor reformatting.
1676 2014-08-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1678 * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
1680 2014-08-04 Robert Dewar <dewar@adacore.com>
1682 * par-ch13.adb (Get_Aspect_Specifications): Improve error
1683 recovery, fixing a -gnatQ bomb.
1685 2014-08-04 Yannick Moy <moy@adacore.com>
1687 * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
1688 do not generate two Itypes with the same name for an array
1690 * sinfo.ads: Expand doc on GNATprove mode.
1692 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1694 * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
1695 master and storage pool attributes on the root type of an
1696 anonymous access type.
1697 * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
1698 and storage pool attributes on the root type of an anonymous
1701 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1703 * exp_ch3.adb: Minor reformatting.
1704 * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
1705 * tracebak.c: Remove use of above files.
1706 * gcc-interface/Makefile.in: Update dependencies.
1708 2014-08-04 Pierre-Marie Derodat <derodat@adacore.com>
1710 * gcc-interface/utils.c (gnat_set_type_context): Also set the
1711 context for parallel types' TYPE_STUB_DECL. Do not change
1712 anything if the context is already set for them.
1713 (gnat_pushdecl): Update the comment for calls to
1714 gnat_set_type_context to mention parallel types.
1715 (add_parallel_type): When adding a context-less parallel type to
1716 a type that has a context, propagate the context from the latter
1718 (process_deferred_decl_context): Call gnat_set_type_context
1719 rather than manually setting the type context.
1720 (build_unc_object_type): Call gnat_set_type_context on the
1723 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1725 * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
1726 subtype indication and the case statement has only two choices,
1727 replace subtype indication with its range, because the resulting
1728 membership test cannot have a subtype indication as an operand.
1730 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1732 * exp_ch3.adb: Update comments, minor reformatting.
1734 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1736 * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
1737 the default initial condition procedures are build here.
1738 * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
1739 analyzed argument of pragma Default_Initial_Condition in some
1740 dummy code as GNATprove mode disables assertions, but still
1741 needs to see the argument.
1743 2014-08-04 Robert Dewar <dewar@adacore.com>
1745 * exp_ch6.adb, sem_util.adb: Minor reformatting.
1747 2014-08-04 Olivier Hainque <hainque@adacore.com>
1749 * a-comutr.ads: Set Root_Node_Type'Alignment to
1750 Standard'Maximum_Alignment, so that it is at least as large as
1751 the max default for Tree_Node_Type'Alignment.
1753 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1755 * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
1756 of the default initial condition procedure [body].
1757 * sem_ch3.adb (Analyze_Declarations): Create the bodies of
1758 all default initial condition procedures at the end of private
1759 declaration analysis.
1760 * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
1762 (Build_Default_Init_Cond_Procedure_Body): Merged in the
1763 processing of routine Build_Default_Init_Cond_Procedure_Bodies.
1764 * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
1766 (Build_Default_Init_Cond_Procedure_Body): Removed.
1768 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1770 * sem_elab.adb (Check_Elab_Call): Do not check a call to a
1772 * exp_ch6.adb (Expand_Call): Clarify handling of inserted
1775 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1777 * sem_prag.adb (Analyze_Pragma): Ensure that an
1778 internally generated spec for a stand alone body is recognized
1779 as a proper context for pragma SPARK_Mode.
1781 2014-08-04 Robert Dewar <dewar@adacore.com>
1783 * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
1785 2014-08-04 Arnaud Charlet <charlet@adacore.com>
1787 * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
1788 when -gnatO has already been specified, for compatibility
1790 (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
1792 * g-expect.ads: Fix typo.
1794 2014-08-04 Thomas Quinot <quinot@adacore.com>
1796 * exp_ch4.adb (Insert_Dereference_Action): the actual Size
1797 must account for the bounds template if the designated type is
1798 an unconstrained array.
1800 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1802 * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
1803 SPARK_Mode in the body.
1804 * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
1805 way to verify the consistency of SPARK_Mode between a spec and
1807 * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
1808 to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1810 (Analyze_Subprogram_Instantiation): Remove the call to
1811 Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1813 * sem_prag.adb (Analyze_Pragma): Remove local variable
1814 Inst_Id. SPARK_Mode can no longer be applied to a package or
1815 subprogram instantiation.
1816 * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
1819 2014-08-04 Robert Dewar <dewar@adacore.com>
1821 * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
1823 2014-08-04 Yannick Moy <moy@adacore.com>
1825 * sem_ch3.adb (Derive_Type_Declaration,
1826 Process_Discriminants): Remove SPARK-specific legality checks.
1828 2014-08-04 Thomas Quinot <quinot@adacore.com>
1830 * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
1831 * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
1834 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1836 * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
1837 compatibility of SPARK_Mode between a spec and a body, use the
1838 SPARK_Mode of the public part.
1839 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
1840 the already available routine to exchange the aspects between
1841 the template and its copy. Analyze the aspects of copy to
1842 ensure that the corresponding pragmas perform their semantic
1843 effects. The partial analysis of aspects is no longer needed.
1844 (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
1846 (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
1848 * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
1849 instantiation which does not come from source.
1851 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1853 * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
1854 SPARK_Mode pragmas to the public and private part of the unit.
1855 * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
1856 type cannot have discriminants if the parent type already has
1858 (Process_Discriminants): Ensure that the type of a discriminant is
1860 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
1861 SPARK_Mode compatibility between a spec and a body can now be
1862 safely performed while processing a generic.
1863 * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
1864 SPARK_Mode compatibility between a spec and a body can now be
1865 safely performed while processing a generic.
1866 * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
1867 safely analyzed when processing a generic.
1869 2014-08-04 Nicolas Roche <roche@adacore.com>
1871 * g-dirope.adb: Minor reformating.
1873 2014-08-04 Robert Dewar <dewar@adacore.com>
1875 * sem_ch6.adb: Minor reformatting.
1877 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1879 * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
1880 Before normalizing these pragmas into a pragma Check, preanalyze
1881 the optional Message argument, (which is subsequently copied)
1882 so that it has the proper semantic information for ASIS use.
1883 * sem_case.adb: Initialize flag earlier.
1884 * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
1885 the full source path of a configuration file is requested.
1886 (Read_Source_File): Use Full_Name parameter..
1888 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1890 * opt.ads Alphabetize various global flags. New flag
1891 Ignore_Pragma_SPARK_Mode along with a comment on usage.
1892 * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1893 Pragma SPARK_Mode is now allowed in generic units.
1894 (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
1895 between the SPARK_Mode of a spec and that of a body when inside
1897 * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
1898 compatibility between the SPARK_Mode of a spec and that of a
1899 body when inside a generic.
1900 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1901 Pragma SPARK_Mode is now allowed in generic units.
1902 (Analyze_Package_Instantiation): Save and restore the value of
1903 flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
1904 the governing SPARK_Mode before analyzing the instance.
1905 (Analyze_Subprogram_Instantiation): Save and restore the value
1906 of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
1907 the governing SPARK_Mode before analyzing the instance.
1908 * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
1909 placement of a source pragma when inserting the generated pragma
1910 for aspect SPARK_Mode.
1911 * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
1912 pragma SPARK_Mode to allow for generics and their respective
1914 * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
1915 (Set_Ignore_Pragma_SPARK_Mode): New routine.
1917 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
1919 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
1920 renaming discriminants in tagged types first.
1921 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
1922 the underlying type of the prefix.
1923 (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
1924 (process_freeze_entity): Reset the nodes of all the view of a type,
1927 2014-08-04 Doug Rupp <rupp@adacore.com>
1928 Olivier Hainque <hainque@adacore.com>
1930 * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
1931 and remove incorrect EH_MECHANISM macros.
1932 Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
1935 2014-08-04 Robert Dewar <dewar@adacore.com>
1937 * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
1938 of constructed 'Valid attribute in -gnatVa mode does not appear
1939 to come from source.
1940 * sem_attr.adb (Analyze_Access_Attribute): Don't set
1941 Never_Set_In_Source for non-source reference.
1942 * sem_util.adb: Minor reformatting.
1943 * sem_warn.adb (Check_References): Don't check Address_Taken,
1944 not necessary, see comment.
1946 2014-08-04 Robert Dewar <dewar@adacore.com>
1948 * sem_util.adb, sem_case.adb: Minor reformatting.
1950 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1952 * exp_ch9.adb (Extract_Entry): If the synchronized object is a
1953 limited view, replace with non-limited view, which is available
1954 at the point of an entry call.
1956 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1958 * exp_ch6.adb (Expand_Call): If the call is to a function in
1959 a run-time unit that is marked Inline_Always, we must suppress
1960 debugging information on it, so that the code that is eventually
1961 inlined will not affect debugging of the user program.
1963 2014-08-04 Robert Dewar <dewar@adacore.com>
1965 * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
1968 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1970 * sem_prag.adb (Process_Import_Or_Interface): Handle properly
1971 an aspect Import that specifies a False value.
1973 2014-08-04 Robert Dewar <dewar@adacore.com>
1975 * gnat_rm.texi: Add section on aspect Invariant'Class.
1977 2014-08-04 Ed Schonberg <schonberg@adacore.com>
1979 * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
1980 for better control of cascaded error messages when some choice
1981 in a case statement over a predicated type violates the given
1984 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
1986 * sem_ch3.adb (Build_Derived_Type): Modify the
1987 inheritance of the rep chain to ensure that a non-tagged type's
1988 items are not clobbered during the inheritance.
1990 2014-08-04 Robert Dewar <dewar@adacore.com>
1992 * sem_ch3.adb, einfo.ads: Minor reformatting.
1994 2014-08-04 Yannick Moy <moy@adacore.com>
1996 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
1997 detection of subprograms that cannot be inlined in GNATprove mode.
1999 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2001 * einfo.adb: Add guard to Returns_Limited_View.
2003 2014-08-04 Jose Ruiz <ruiz@adacore.com>
2005 * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
2006 the secondary stack to respect the alignments of the returned objects.
2008 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2010 * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
2011 on function entities whose return type is a limited view.
2012 * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
2013 where to place the freeze node for a function that returns the
2014 limited view of a type, when the function is called and frozen
2015 in a different unit.
2017 2014-08-04 Eric Botcazou <ebotcazou@adacore.com>
2019 * sem_ch3.adb (Build_Derived_Private_Type): Minor code
2022 2014-08-04 Robert Dewar <dewar@adacore.com>
2024 * gnat_ugn.texi: Clarify documentation on assertions.
2026 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2028 * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
2029 if a component association has a box initialization when the
2030 component type has no default initialization, either through an
2031 initial value, an aspect, or an implicit initialization procedure.
2033 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2035 * freeze.adb: Code clean up.
2037 2014-08-04 Thomas Quinot <quinot@adacore.com>
2039 * sem_ch5.adb: Minor reformatting.
2041 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2043 * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
2044 a function can return a limited view of a type declared
2045 elsewhere. In that case the function cannot be frozen at the end
2046 of its enclosing package. If its first use is in a different unit,
2047 it cannot be frozen there, but if the call is legal the full view
2048 of the return type is available and the subprogram can now be
2049 frozen. However the freeze node cannot be inserted at the point
2050 of call, but rather must go in the package holding the function,
2051 so that the backend can process it in the proper context.
2053 2014-08-04 Robert Dewar <dewar@adacore.com>
2055 * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
2057 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2059 * sem_ch4.adb (Operator_Check): Refine previous change.
2061 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2063 * sem_scil.ads: Improve comments.
2064 * sem_ch4.adb (Analyze_Equality_Op): Add support for
2065 Allow_Integer_Address (equality between Address and Integer).
2067 2014-08-04 Yannick Moy <moy@adacore.com>
2069 * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
2070 notation on untagged objects.
2071 * sem.ads: Update comment.
2072 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
2073 not inline subprograms declared in the visible part of a package.
2075 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2077 * exp_ch5.adb: minor reformatting.
2078 * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
2081 2014-08-04 Thomas Quinot <quinot@adacore.com>
2083 * s-fatgen.adb: Minor reformatting.
2085 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2087 * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
2090 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2092 * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
2093 the loop parameter for element iterators over containers and
2094 arrays, so that improper uses of it are detected in the loop
2095 body when expansion is disabled.
2096 * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
2097 generated cursor is that of the analyzed loop parameter.
2099 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2101 * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
2102 Flag_Decl. Do not analyze the declaration of the flag as it is
2103 not part of the tree yet, instead add it to the freeze actions
2106 2014-08-04 Robert Dewar <dewar@adacore.com>
2108 * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
2109 case of OUT and IN OUT parameter correctly (where Source_Typ is
2110 set), we were missing one case where a check must be applied.
2112 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2114 * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
2115 the generated code. Instead of hiding the renaming and using the
2116 wrapper as the proper association, have the subprogram renaming
2118 (Build_Spec): The entity of the wrapper is
2119 now derived from the entity of the related primitive.
2121 2014-08-04 Emmanuel Briot <briot@adacore.com>
2123 * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
2124 using non-capturing groups.
2126 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2128 * inline.adb (Build_Body_To_Inline): Remove Unmodified and
2129 related pragmas before copying the original body, to prevent
2130 spurious errors when the pragmas apply to formals that will not
2131 appear in the inlined body.
2133 2014-08-04 Robert Dewar <dewar@adacore.com>
2135 * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
2136 exp_ch3.adb: Minor reformatting.
2138 2014-08-04 Robert Dewar <dewar@adacore.com>
2140 * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
2142 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2144 * aspects.adb Add an entry in table Canonical_Aspect for
2145 Default_Initial_Condition.
2146 * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
2147 Aspect_Names and Aspect_Delay for Default_Initial_Condition.
2148 * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
2149 is now Is_Default_Init_Cond_ Procedure. Flag133 is now
2150 Has_Inherited_Default_Init_Cond.
2151 (Default_Init_Cond_Procedure): New routine.
2152 (Has_Default_Init_Cond): New routine.
2153 (Has_Inherited_Default_Init_Cond): New routine.
2154 (Is_Default_Init_Cond_Procedure): New routine.
2155 (Set_Default_Init_Cond_Procedure): New routine.
2156 (Set_Has_Default_Init_Cond): New routine.
2157 (Set_Has_Inherited_Default_Init_Cond): New routine.
2158 (Set_Is_Default_Init_Cond_Procedure): New routine.
2159 (Write_Entity_Flags): Output all the new flags.
2160 * einfo.ads New attributes Default_Init_Cond_Procedure,
2161 Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
2162 along with usage in nodes.
2163 (Default_Init_Cond_Procedure): New routine.
2164 (Has_Default_Init_Cond): New routine and pragma Inline.
2165 (Has_Inherited_Default_Init_Cond): New routine and
2167 (Is_Default_Init_Cond_Procedure): New routine and
2169 (Set_Default_Init_Cond_Procedure): New routine.
2170 (Set_Has_Default_Init_Cond): New routine and pragma Inline.
2171 (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
2172 (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
2173 * exp_ch3.adb (Expand_N_Object_Declaration): New constant
2174 Next_N. Generate a call to the default initial condition procedure
2175 if the object's type is subject to the pragma. (Freeze_Type):
2176 Generate the body of the default initial condition procedure or
2177 inherit the spec from a parent type.
2178 * exp_ch7.adb Add with and use clause for Exp_Prag.
2179 (Expand_Pragma_Initial_Condition): Removed.
2180 * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
2182 * par-prag.adb (Prag): Pragma Default_Initial_Condition does
2183 not need special treatment by the parser.
2184 * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
2185 attributes related to pragma Default_Initial_Condition to the
2187 (Process_Full_View): Propagate the attributes
2188 related to pragma Default_Initial_Condition to the full view.
2189 * sem_ch7.adb (Analyze_Package_Specification): Build the
2190 declaration of the default initial condition procedure for all
2191 types that qualify or inherit the one from the parent type.
2192 * sem_ch13.adb (Analyze_Aspect_Specifications):
2193 Add processing for aspect Default_Initial_Condition.
2194 (Check_Aspect_At_Freeze_Point): Aspect
2195 Default_Initial_Condition does not require delayed analysis.
2196 (Replace_Type_References_Generic): Moved to spec.
2197 * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
2198 * sem_prag.adb Add an entry in table Sif_Glags for
2199 Default_Initial_Condition.
2200 (Analyze_Pragma): Pragma
2201 Default_Initial_Condition is now part of assertion
2202 policy. Add processing for pragma Default_Initial_Condition.
2203 (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
2204 now recognized as a proper assertion policy.
2205 * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
2207 (Build_Default_Init_Cond_Procedure_Body): New routine.
2208 (Build_Default_Init_Cond_Procedure_Declaration): New routine.
2209 (Inherit_Default_Init_Cond_Procedure): New routine.
2210 * snames.ads-tmpl Add new predefined name and pragma id for
2211 Default_Initial_Condition.
2213 2014-08-04 Vincent Celier <celier@adacore.com>
2215 * prj-dect.adb (Parse_Case_Construction): It is no longer
2216 an error if the variable for a case construction is not
2217 typed, only if the variable value is not a single string. Call
2218 Parse_Choice_List and End_Case_Construction with the new parameter
2219 to indicate that the variable is typed.
2220 * prj-strt.adb (End_Case_Construction): Only check the labels
2221 if the variable is typed. If the variable is not typed,
2222 issue a warning when there is no "when others" allternative.
2223 (Parse_Choice_List): Manage the labels only if the variable
2225 * prj-strt.ads (End_Case_Construction): New Boolean parameter
2227 (Parse_Choice_List): Ditto.
2229 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2231 * sem_ch5.adb: Additional fix to Check_Predicate_Use.
2233 2014-08-04 Vincent Celier <celier@adacore.com>
2235 * projects.texi: Update documentation of case constructions with
2236 variables that are not typed.
2238 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2240 * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
2241 an Eliminated pragma, indicate that the wrapper is also to be
2242 eliminated, to prevent spurious errors when using gnatelim on
2243 programs that include box-initialization of equality operators
2244 (consequence of AI05-071)..
2246 2014-08-04 Robert Dewar <dewar@adacore.com>
2248 * checks.adb (Activate_Overflow_Check): Handle floating-point
2250 * checks.ads (Activate_Overflow_Check): Clarify handling of
2251 floating-point cases.
2252 * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
2253 flag if we generate an explicit overflow check (for
2254 Check_Float_Overflow mode).
2256 2014-08-04 Robert Dewar <dewar@adacore.com>
2258 * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
2259 prj-attr.adb, prj-attr.ads: Minor reformatting.
2261 2014-08-04 Yannick Moy <moy@adacore.com>
2263 * expander.adb (Expand): Always perform special
2264 expansion in GNATprove mode, even when doing pre-analysis.
2266 2014-08-04 Thomas Quinot <quinot@adacore.com>
2268 * repinfo.adb (List_Scalar_Storage_Order): List bit order if
2269 not default. Also list bit order if SSO is specified. Do not
2270 assume that bit order is always equal to scalar storage order.
2272 2014-08-04 Thomas Quinot <quinot@adacore.com>
2274 * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
2275 order to reverse SSO for a type that has an explicit native
2278 2014-08-04 Doug Rupp <rupp@adacore.com>
2280 * cal.c: Macro check for VxWorks7.
2281 * init.c (getpid): Likewise.
2282 * mkdir.c (__gnat_mkdir): Likewise.
2283 * sysdep.c (__gnat_is_file_not_found_error): Likewise.
2285 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2287 * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
2288 of an invariant check in the case where No_Initialization is set,
2289 since the object is uninitialized.
2291 2014-08-04 Thomas Quinot <quinot@adacore.com>
2293 * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
2294 name, in addition to a pragma name.
2295 * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
2296 Is_Pragma_Name): Adjust accordingly.
2297 * sem_attr.ads, sem_attr.adb, exp_attr.adb
2298 (Attribute_Default_Scalar_Storage_Order): Add handling of new
2300 * gnat_rm.texi: Document the above.
2302 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2304 * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
2305 mode for now, to revert to previous behavior.
2306 * checks.adb: Revert previous change, no longer needed.
2308 2014-08-04 Robert Dewar <dewar@adacore.com>
2310 * gnat1drv.adb (Adjust_Global_Switches): Don't set
2311 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2312 * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
2313 set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2314 * switch-c.adb (Scan_Front_End_Switches): Don't set
2315 Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2317 2014-08-04 Vincent Celier <celier@adacore.com>
2319 * prj-attr.adb: Add new default indications for
2320 attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
2321 (Attribute_Default_Of): New function (Initialize): Set the
2322 default for those attributes that have one specified.
2323 * prj-attr.ads (Attribute_Data): New component Default.
2324 * prj-proc.adb (Expression): Take into account the new defaults
2325 for attributes Object_Dir, Exec_Dir and Source_Dirs.
2326 * prj-strt.adb (Attribute_Reference): Set the default for
2328 * prj-tree.ads, prj-tree.adb (Default_Of): New function.
2329 (Set_Default_Of): New procedure.
2330 * prj.adb (The_Dot_String): New global Name_Id variable,
2331 initialized in procedure Initialize.
2332 (Dot_String): New function
2333 (Initialize): Initialize The_Dot_String.
2334 (Reset): Create the string list Shared.Dot_String_List.
2335 * prj.ads (Attribute_Default_Value): New enumeration type.
2336 (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
2337 (Dot_String): New function.
2338 (Shared_Project_Tree_Data): New string list component Dot_String_List.
2339 * projects.texi: Document new defaults for attribute Object_Dir,
2340 Exec_Dir and Source_Dirs.
2342 2014-08-04 Robert Dewar <dewar@adacore.com>
2344 * sem_ch12.adb: Minor reformatting.
2346 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2348 * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
2349 expansion in CodePeer_Mode.
2350 (Selected_Range_Checks): Add handling of overflow checks in
2353 2014-08-04 Robert Dewar <dewar@adacore.com>
2355 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2356 Remove special test for Float'First, no longer required.
2357 (Expand_N_Attribute_Reference, case Succ): Remove special test
2358 for Float'First, no longer required.
2359 * s-fatgen.adb (Pred): return infinity unchanged.
2362 2014-08-04 Claire Dross <dross@adacore.com>
2364 * sem_ch12.adb (Analyze_Associations): Defaults should only be
2365 used if there is no explicit match.
2366 * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2367 Also check for pragma external_axiomatization on generic units.
2369 2014-08-04 Robert Dewar <dewar@adacore.com>
2371 * checks.adb (Activate_Overflow_Check): Remove
2372 Check_Float_Overflow processing.
2373 (Apply_Scalar_Range_Check): Ditto.
2374 (Generate_Range_Check): Ditto.
2375 * exp_ch4.adb (Expand_N_Op_Add): Add call to
2376 Check_Float_Op_Overflow.
2377 (Expand_N_Op_Divide): ditto.
2378 (Expand_N_Op_Multiply): ditto.
2379 (Expand_N_Op_Subtract): ditto.
2380 * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
2381 * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
2382 Do_Range_Check is set for floating-point case in -gnatc or
2384 (Analyze_Attribute, case Succ): Make sure
2385 Do_Range_Check is set for floating-point case in -gnatc or
2387 * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
2388 flag is set for real to integer conversion in GNATprove or
2391 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2393 * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
2394 the expression of an Import or Export aspect as type Boolean
2395 and require it to be static. Add ??? comment. Also, set the
2396 Is_Exported flag when appropriate.
2398 2014-08-04 Robert Dewar <dewar@adacore.com>
2400 * exp_ch4.adb: Minor reformatting.
2401 * exp_attr.adb: Minor reformatting.
2403 2014-08-04 Thomas Quinot <quinot@adacore.com>
2405 * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
2406 (Unaligned_Valid): Remove now unused subprogram.
2407 * exp_attr.adb (Expand_N_Attribute_Reference, case
2408 Attribute_Valid): If the prefix is in reverse SSO or potentially
2409 unaligned, copy it using a byte copy operation to a temporary
2411 * einfo.adb: Minor comment fix.
2413 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2415 * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
2417 2014-08-04 Robert Dewar <dewar@adacore.com>
2419 * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
2420 * s-fatgen.adb (Pred): Handle Float'First.
2421 (Succ): Handle Float'Last.
2423 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2425 * sem_util.adb (Is_Potentially_Unevaluated): If the original
2426 node of a parent node in the tree is a short-circuit operation,
2427 the node is potentially unevaluated.
2429 2014-08-04 Robert Dewar <dewar@adacore.com>
2431 * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
2432 conversion from a real type to an integer type.
2434 2014-08-04 Yannick Moy <moy@adacore.com>
2436 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
2437 sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
2438 exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
2439 sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
2440 SPARK_05 instead of SPARK.
2442 2014-08-04 Robert Dewar <dewar@adacore.com>
2444 * sem.ads: Minor reformatting.
2445 * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
2447 (Analyze_Aspect_Specifications, case Convention): Put External_Name
2448 before Link_Name when constructing pragma.
2450 2014-08-04 Yannick Moy <moy@adacore.com>
2452 * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
2453 to True during analysis of a default component expression.
2454 (Semantics): Save and restore In_Default_Expr around analysis.
2455 * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
2456 Call new wrapper Preanalyze_Default_Expression.
2457 (Preanalyze_Default_Expression): New wrapper on
2458 Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
2459 * sem_res.adb (Resolve_Call): Mark calls inside default
2460 expressions as not inlined in GNATprove mode.
2462 2014-08-04 Robert Dewar <dewar@adacore.com>
2464 * exp_ch4.adb: Minor reformatting.
2466 2014-08-04 Olivier Hainque <hainque@adacore.com>
2468 * link.c: remove const on __gnat_objlist_file_supported for AIX
2470 2014-08-04 Robert Dewar <dewar@adacore.com>
2472 * sem_util.ads: Minor addition of comment.
2474 2014-08-04 Vincent Celier <celier@adacore.com>
2476 * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
2477 all projects, including aggregate and aggregate library projects.
2479 2014-08-04 Yannick Moy <moy@adacore.com>
2481 * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
2483 2014-08-04 Robert Dewar <dewar@adacore.com>
2485 * sem_eval.adb (Test_In_Range): Always in range for
2486 Is_Known_Valid target type, where input type has smaller or
2487 equal size and does not have biased rep.
2489 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2491 * sem_attr.adb (Eval_Attribute): Constrained is not treated as
2492 a static attribute, and the Static flag must not be set on it
2493 during resolution. It may be constant-folded during expansion,
2494 but if expansion is disabled it is not a static expression.
2496 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2498 * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
2499 referenced once resolution has taken place.
2501 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2503 * exp_ch4.adb (Expand_N_Type_Conversion): Don't
2504 compare access levels in the case where the target type is the
2505 anonymous type of an access discriminant, since the level of
2506 such types is defined based on context. Add comment.
2508 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2510 * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
2511 cases related to equality. Remove the special processing
2512 for dispatching abstract subprograms as it is not needed.
2513 (Interpretation_Error): Add a specialized error message for
2514 predefined operators.
2515 (Is_Intrinsic_Equality): New routine.
2516 (Is_Suitable_Candidate): New routine.
2518 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2520 * checks.adb: Minor comment reformatting.
2522 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2524 * restrict.adb (Check_Restriction): For checked max_parameter
2525 restrictions reset Violated flag, so that subsequent violations
2526 are properly detected.
2528 2014-08-04 Robert Dewar <dewar@adacore.com>
2530 * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
2532 (Process_Discriminants): Fix bad test of GNATprove mode
2534 2014-08-04 Hristian Kirtchev <kirtchev@adacore.com>
2536 * sem_ch12.adb (Instantiate_Formal_Subprogram):
2537 Move variable to their own section. Propagate the source
2538 location of a formal parameter to the corresponding formal of
2539 the subprogram renaming declaration. Code reformatting.
2541 2014-08-04 Arnaud Charlet <charlet@adacore.com>
2543 * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
2545 2014-08-04 Ed Schonberg <schonberg@adacore.com>
2547 * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
2548 if error already detected. We may reach this point in spite of
2549 previous errors when compiling with -gnatq, to force all possible
2550 errors (this is the usual ACATS mode).
2552 2014-08-04 Gary Dismukes <dismukes@adacore.com>
2554 * checks.adb (Generate_Range_Check): For the case of converting
2555 a base type with a larger range to a smaller target subtype, only
2556 use unchecked conversions of bounds in the range check followed
2557 by conversion in the case where both types are discrete. In other
2558 cases, convert to the target base type and save in a temporary
2559 followed by the range check.
2560 (Convert_And_Check_Range): New procedure factoring code to save
2561 conversion to a temporary followed by a range check (called two
2562 places in Generate_Range_Check).
2563 * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
2564 check-in, to generate range checks for conversions between
2565 any floating-point types rather than limiting it to matching
2568 2014-08-02 Trevor Saunders <tsaunders@mozilla.com>
2570 * gcc-interface/trans.c: Use hash_set instead of pointer_set.
2572 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2574 * restrict.adb (Update_Restrictions): For restrictions with a
2575 maximum parameter (e.g. number of protected entries in Ravenscar)
2576 do not compute the maximum of the violation over several objects,
2577 because the restriction is per-object.
2578 (Check_Restriction): After possible message, reset the value
2579 of of a checked max_parameter restriction to zero, to prevent
2581 * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
2582 (sub)type to determine whether derived type should be on the
2583 list of private dependents of a type whose full view may become
2584 visible subsequently.
2586 2014-08-01 Olivier Hainque <hainque@adacore.com>
2588 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
2589 $(CXX) instead of ../../xg++ to feed CXX.
2590 (CXX_LFLAGS): Remove. Now unused as the proper flags
2591 are expected to be included in the CXX variable.
2593 2014-08-01 Pierre-Marie Derodat <derodat@adacore.com>
2595 * gcc-interface/decl.c (elaborate_expression_1): Return the new
2596 variable when debug info is needed and the expression is not
2597 constant. Tag as external only new variables that are global.
2598 (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
2599 * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
2600 attributes for IN array parameters when their actual subtype
2602 (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
2603 * gcc-interface/gigi.h (process_deferred_decl_context): New.
2604 * gcc-interface/utils.c (gnat_write_global_declarations): Do not
2605 emit debug info for ignored global declarations.
2606 (struct deferred_decl_context_node,
2607 add_deferred_decl_context, add_deferred_type_context,
2608 compute_deferred_decl_context, defer_or_set_type_context,
2609 deferred_decl_context_queue, get_debug_scope,
2610 get_global_context, process_deferred_decl_context): New.
2611 (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
2612 computation machinery to rely on the GNAT Scope attribute.
2614 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2616 * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
2618 2014-08-01 Robert Dewar <dewar@adacore.com>
2620 * sem_ch8.adb, opt.ads Minor comment updates.
2622 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2624 * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
2625 from the side effects removal machinery.
2626 * exp_util.adb (Duplicate_Subexpr): Add formal parameter
2627 Renaming_Req. Update the nested call to Remove_Side_Effects.
2628 (Duplicate_Subexpr_No_Checks): Add formal parameter
2629 Renaming_Req. Update the nested call to Remove_Side_Effects.
2630 (Duplicate_Subexpr_Move_Checks): Add formal parameter
2631 Renaming_Req. Update the nested call to Remove_Side_Effects.
2632 (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
2633 an object renaming declaration when the caller requests it.
2634 * exp_util.ads (Duplicate_Subexpr): Add formal
2635 parameter Renaming_Req. Update comment on usage.
2636 (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
2637 (Duplicate_Subexpr_Move_Checks): Add formal parameter
2640 2014-08-01 Bob Duff <duff@adacore.com>
2642 * gnat_ugn.texi: Minor updates.
2644 2014-08-01 Robert Dewar <dewar@adacore.com>
2646 * atree.adb: Minor reformatting.
2648 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2650 * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
2651 private extension, get stored constraint, if any, from full view.
2653 2014-08-01 Robert Dewar <dewar@adacore.com>
2655 * opt.ads (No_Elab_Code_All_Pragma): New global variable.
2656 * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
2657 (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
2658 (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
2659 * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2660 Remove code for checking with's, now in sem_ch10.adb, set
2661 Opt.No_Elab_Code_All_Pragma.
2663 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2665 * sem_ch3.adb (Copy_And_Build): Copy the declaration for
2666 access types as well and adjust the subtype mark if there are
2669 2014-08-01 Robert Dewar <dewar@adacore.com>
2671 * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
2673 2014-08-01 Robert Dewar <dewar@adacore.com>
2675 * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
2677 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2679 * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
2680 * exp_ch4.adb (Expand_Composite_Equality): Add conversion
2681 of the actuals in the case of untagged record types too.
2682 * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
2683 full derivation of a derived private type, extracted from...
2684 (Copy_And_Build): In the case of record types and most
2685 enumeration types, copy the original declaration. Build the
2686 full derivation according to the approach extracted from...
2687 (Build_Derived_Private_Type): ...here. Call Build_Full_Derivation
2688 to create the full derivation in all existing cases and also
2689 create it in the no-discriminants/discriminants case instead of
2690 deriving directly from the full view.
2691 (Is_Visible_Component): Remove obsolete code.
2692 * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
2694 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2696 * fe.h (GNAT_Mode): New.
2697 * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
2698 reverse SSO in GNAT mode.
2700 2014-08-01 Thomas Quinot <quinot@adacore.com>
2702 * freeze.adb: Minor reformatting.
2704 2014-08-01 Thomas Quinot <quinot@adacore.com>
2706 * exp_ch3.adb (Default_Initialize_Object): Do not generate
2707 default initialization for an imported object.
2709 2014-08-01 Olivier Hainque <hainque@adacore.com>
2711 * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
2712 to the expected FARPROC type instead of void *.
2713 * adaint.c (f2t): Expect __time64_t * as second argument, in line with
2714 other datastructures.
2715 (__gnat_file_time_name_attr): Adjust accordingly.
2716 (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
2718 (__gnat_check_OWNER_ACL): Declare AccessMode
2719 parameter as ACCESS_MODE instead of DWORD, in line with callers
2721 (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
2722 unused on win32. Correct cast of "args" on call to spawnvp.
2723 (add_handle): Cast realloc calls into their destination types.
2724 (win32_wait): Remove declaration and initialization of unused variable.
2725 (__gnat_locate_exec_on_path): Cast alloca calls
2726 into their destination types.
2727 * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
2728 their destination types.
2730 2014-08-01 Gary Dismukes <dismukes@adacore.com>
2732 * exp_ch4.adb (Expand_N_Type_Conversion): Expand
2733 range checks for conversions between floating-point subtypes
2734 when the target and source types are the same.
2736 2014-08-01 Robert Dewar <dewar@adacore.com>
2738 * exp_aggr.adb: Minor reformatting.
2740 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2742 * sem_ch13.adb (Check_Indexing_Functions): Initialize
2745 2014-08-01 Arnaud Charlet <charlet@adacore.com>
2747 * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
2748 ALI file before we call the backend (so that gnat2why can append
2751 2014-08-01 Thomas Quinot <quinot@adacore.com>
2753 * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
2754 Expand_Packed_Element_Reference): Pass additional Rev_SSO
2755 parameter indicating whether the packed array type has reverse
2756 scalar storage order to the s-pack* Set/Get routines.
2757 * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
2758 indicating reverse scalar storage order.
2760 2014-08-01 Robert Dewar <dewar@adacore.com>
2762 * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
2763 for initial component value in -gnatc or GNATprove mode.
2764 (Process_Discriminants): Same fix for default discriminant values.
2765 * sem_eval.adb (Test_In_Range): Improve accuracy of results by
2768 2014-08-01 Robert Dewar <dewar@adacore.com>
2770 * sinfo.ads: Minor comment clarification.
2772 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2774 * sem_ch13.adb (Analyze_Aspect_Specifications): Code
2775 reformatting. Store the generated pragma Import in the related
2776 subprogram as routine Wrap_Imported_Subprogram will need it later.
2777 * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
2778 a private type with discriminants is considered to fall in the
2779 category of unconstrained or tagged items.
2781 2014-08-01 Arnaud charlet <charlet@adacore.com>
2783 * s-os_lib.adb (Open_Append): New functions to open a file for
2784 appending. This binds to the already existing (but not used)
2786 * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
2787 to open a file for appending.
2788 * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
2789 to open the ALI file for appending.
2791 2014-08-01 Robert Dewar <dewar@adacore.com>
2793 * sem_ch8.adb: Minor reformatting.
2795 2014-08-01 Yannick Moy <moy@adacore.com>
2797 * sem_ch13.adb (Insert_Pragma): Add special case for precondition
2798 pragmas from aspects, which need to be inserted in proper order.
2800 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2802 * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
2803 Handle properly a type extension that constrains a discriminated
2804 derived type that renames other discriminants of an ancestor.
2806 2014-08-01 Thomas Quinot <quinot@adacore.com>
2808 * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
2809 s-pack25.adb: Fix minor inconsistencies and typos.
2811 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2813 * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
2814 globals and move certain variables to the "local
2815 variable" section. Call Build_Class_Wide_Wrapper when
2816 renaming a default actual subprogram with a class-wide actual.
2817 (Build_Class_Wide_Wrapper): New routine.
2818 (Check_Class_Wide_Actual): Removed.
2819 (Find_Renamed_Entity): Code reformatting.
2820 (Has_Class_Wide_Actual): Alphabetize. Change the
2821 logic of the predicate as the renamed name may not necessarely
2822 denote the correct subprogram.
2824 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2826 * sem_ch7.adb: Fix minor oversight in condition.
2828 2014-08-01 Bob Duff <duff@adacore.com>
2830 * projects.texi: Minor documentation improvements.
2832 2014-08-01 Robert Dewar <dewar@adacore.com>
2834 * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
2835 * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
2836 * lib-load.adb: Initialize No_Elab_Code_All field.
2837 * lib-writ.adb: Initialize No_Elab_Code_All.
2838 * lib.ads, lib.adb: New field No_Elab_Code_All.
2839 * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
2840 * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
2842 * sem_ch10.adb (Analyze_Context): Processing for
2843 No_Elaboration_Code_All removed.
2844 (Generate_Parent_References): Moved to Sem_Util.
2845 * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
2846 * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
2848 * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
2849 * targparm.adb: Minor comment updates Add comments on ignoring
2850 pragma No_Elaboration_Code_All.
2852 2014-08-01 Nicolas Roche <roche@adacore.com>
2854 * adaint.c (__gnat_set_close_on_exec): Ensure that
2855 we can unset "close_on_exec" flag.
2857 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2859 * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
2860 the parameter specs of the wrapper program for a primitive operation
2861 of a synchronized type that implements an interface, copy the
2862 null_exclusion indicator as well.
2864 2014-08-01 Robert Dewar <dewar@adacore.com>
2866 * sem_eval.ads: Minor reformatting.
2868 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2870 * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
2871 to go down the chain of private derivations.
2872 * freeze.adb (Freeze_Entity): Fix typo in comment.
2874 2014-08-01 Ed Schonberg <schonberg@adacore.com>
2876 * sem_ch3.adb (Access_Type_Declaration): If designated type is
2877 a limited view, create a master entity (as is already done for
2878 class-wide types) in case the full view designates a type that
2880 * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
2881 and the designated type is a limited view, use the non-limited
2884 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2886 * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
2887 (DECL_FUNCTION_STUB): Likewise.
2888 (SET_DECL_FUNCTION_STUB): Likewise.
2889 (DECL_PARM_ALT_TYPE): Likewise.
2890 (SET_DECL_PARM_ALT_TYPE): Likewise.
2891 (TYPE_VAX_FLOATING_POINT_P): Delete.
2892 (TYPE_DIGITS_VALUE): Likewise.
2893 (SET_TYPE_DIGITS_VALUE): Likewise.
2894 * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
2895 (malloc32_decl): Delete.
2896 (build_vms_descriptor): Likewise.
2897 (build_vms_descriptor32): Likewise.
2898 (fill_vms_descriptor): Likewise.
2899 (convert_vms_descriptor): Likewise.
2900 (TARGET_ABI_OPEN_VMS): Likewise.
2901 (TARGET_MALLOC64): Likewise.
2902 * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
2903 (gnat_to_gnu_entity): Call it to add the original type as a parallel
2904 type to the implementation type of a packed array type.
2905 <E_Procedure>: Remove now obsolete kludge.
2906 <E_Exception>: Delete obsolete comment.
2907 <object>: Small tweak.
2908 <E_Subprogram_Type>: Remove support for stub subprograms, as well as
2909 for the descriptor passing mechanism.
2910 (gnat_to_gnu_param): Likewise.
2911 * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
2912 (gnat_print_type): Adjust.
2913 * gcc-interface/trans.c (gigi): Remove obsolete initializations.
2914 (vms_builtin_establish_handler_decl): Delete.
2915 (gnat_vms_condition_handler_decl): Likewise.
2916 (establish_gnat_vms_condition_handler): Likewise.
2917 (build_function_stub): Likewise.
2918 (Subprogram_Body_to_gnu): Do not call above functions.
2919 (Call_to_gnu): Remove support for the descriptor passing mechanism.
2920 * gcc-interface/utils.c (make_descriptor_field): Delete.
2921 (build_vms_descriptor32): Likewise.
2922 (build_vms_descriptor): Likewise.
2923 (fill_vms_descriptor): Likewise.
2924 (convert_vms_descriptor64): Likewise.
2925 (convert_vms_descriptor32): Likewise.
2926 (convert_vms_descriptor): Likewise.
2927 * gcc-interface/utils.c (unchecked_convert): Likewise.
2928 * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
2930 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2932 * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
2933 type and get_unpadded_type for the longest FP type.
2934 (Attribute_to_gnu) <Machine>: Compare the precision of the types.
2935 (convert_with_check): Adjust formatting and remove FIXME.
2937 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2939 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2940 Do not convert the RM bounds to the base type.
2941 (E_Floating_Point_Subtype): Likewise.
2942 (E_Array_Subtype): Convert the bounds to the base type.
2943 * gcc-interface/trans.c (get_type_length): New function.
2944 (Attribute_to_gnu) <Range_Length>: Call it.
2946 (Loop_Statement_to_gnu): Convert the bounds to the base type.
2947 (gnat_to_gnu) <N_In>: Likewise.
2948 * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
2949 bounds to the base type.
2950 (create_range_type): Likewise.
2951 (convert): Convert the bounds to the base type for biased types.
2952 * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
2955 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2957 * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
2958 incorrect implicit type derivation.
2959 * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
2962 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
2964 * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
2965 prefix of attribute Loop_Entry.
2966 * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
2967 Loop_Variant with respect to an enclosing loop (if any).
2968 (Contains_Loop_Entry): Update the parameter profile and all
2969 calls to this routine.
2970 * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
2971 for the corresponding body before determining the nature of the
2972 ultimate alias's declarative node.
2974 2014-08-01 Robert Dewar <dewar@adacore.com>
2976 * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
2978 2014-08-01 Robert Dewar <dewar@adacore.com>
2980 * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
2981 constraint error node since it is a list member.
2983 2014-08-01 Robert Dewar <dewar@adacore.com>
2985 * sem_warn.adb: Minor reformatting.
2987 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
2989 * einfo.adb (Underlying_Type): Return the underlying full view
2990 of a private type if present.
2991 * freeze.adb (Freeze_Entity):
2992 Build a single freeze node for partial, full and underlying full
2994 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
2995 missing guard before the access to the Underlying_Full_View.
2996 * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
2997 full view if present.
2998 * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
3000 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3002 * sem_res.adb (Resolve_Entry_Call): When an entry has
3003 preconditions, the entry call is wrapped in a procedure call
3004 that incorporates the precondition checks. To prevent a double
3005 expansion, with possible duplication of extra formals, that
3006 procedure call must only be pre-analyzed and resolved. Expansion
3007 takes place upon return to the caller Resolve_Call.
3009 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3011 * sem_res.adb (Resolve_Call): Do not perform
3012 GNATprove-specific inlining while within a generic.
3014 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3016 * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
3017 case expression with incompatible alternatives, when the first
3018 alternative is overloaded.
3020 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3022 * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
3023 to create the name of the parameterless call, rather than
3024 New_Copy, to preserve the tree structure when the name is a
3025 complex expression, e.g. a selected component that denotes a
3026 protected operation, whose prefix is itself a selected component.
3028 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3030 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
3031 Unit_Declaration_Node to retrieve body when inlining, to handle
3032 properly subprogram child units.
3034 2014-08-01 Robert Dewar <dewar@adacore.com>
3036 * sem_attr.adb: Minor reformatting.
3038 2014-08-01 Vincent Celier <celier@adacore.com>
3040 * debug.adb: Minor documentation addition for -dn switch.
3042 2014-08-01 Robert Dewar <dewar@adacore.com>
3044 * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
3045 sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
3046 documentation of Is_Static_Expression vs Is_OK_Static_Expression.
3047 In several places, use the Is_OK version as suggested by the spec.
3049 2014-08-01 Vincent Celier <celier@adacore.com>
3051 * gnatcmd.adb: Revert last change which was not correct.
3053 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3055 * freeze.adb (Find_Constant): Ensure that the constant being
3056 inspected is still an object declaration (i.e. not a renaming).
3058 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3060 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
3061 An attribute_reference to Loop_Entry denotes an iterator
3062 specification: its prefix is an object, as is the case for 'Old.
3063 b) If the domain of iteration is an expression whose type has
3064 the Iterable aspect defined, this is an iterator specification.
3066 2014-08-01 Robert Dewar <dewar@adacore.com>
3068 * gnatcmd.adb: Minor reformatting.
3070 2014-08-01 Robert Dewar <dewar@adacore.com>
3072 * atree.ads (Info_Messages): New counter.
3073 * err_vars.ads: Minor comment update.
3074 * errout.adb (Delete_Warning_And_Continuations): Deal
3075 with new Info_Messages counter.
3076 (Error_Msg_Internal): ditto.
3077 (Delete_Warning): ditto.
3078 (Initialize): ditto.
3079 (Write_Error_Summary): ditto.
3080 (Output_Messages): ditto.
3081 (To_Be_Removed): ditto.
3082 * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
3083 (Compilation_Errors): ditto.
3084 * errutil.adb (Error_Msg): Deal with Info_Messages counter.
3086 (Initialize): ditto.
3087 * sem_prag.adb (Analyze_Pragma): Minor comment addition.
3088 * gnat_ugn.texi: Document that -gnatwe does not affect info
3091 2014-08-01 Robert Dewar <dewar@adacore.com>
3093 * debug.adb: Document debug switch -gnatd.Z.
3094 * sem.adb (Semantics): Force expansion on in no or configurable
3097 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3099 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
3100 unchecked conversion denotes an iterator specification. Such a
3101 conversion will be inserted in the context of an inlined call
3102 when needed, and its argument is always an object.
3104 2014-08-01 Robert Dewar <dewar@adacore.com>
3106 * make.adb, makeutl.ads: Minor reformatting.
3107 * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
3110 2014-08-01 Tristan Gingold <gingold@adacore.com>
3112 * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
3114 2014-08-01 Javier Miranda <miranda@adacore.com>
3116 * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
3118 * debug.adb: Updating documentation.
3119 * exp_ch6.adb (Expand_Call): Remove assertion.
3121 2014-08-01 Robert Dewar <dewar@adacore.com>
3123 * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
3124 sem_res.adb: Minor reformatting.
3126 2014-08-01 Vincent Celier <celier@adacore.com>
3128 * make.adb (Initialize): Set Keep_Temporary_Files to True when
3130 * makeusg.adb: Add line for new switch --keep-temp-files.
3131 * makeutl.ads (Keep_Temp_Files_Option): New constant String.
3132 * opt.ads (Keep_Temporary_Files): Document that it is also used
3133 by gnatmake and gprbuild.
3134 * switch-m.adb: Recognize new switch --keep-temp-files.
3136 2014-08-01 Tristan Gingold <gingold@adacore.com>
3138 * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
3139 * exp_ch9.adb (Make_Task_Create_Call): ... here.
3141 2014-08-01 Vincent Celier <celier@adacore.com>
3143 * gnat1drv.adb: Do not try to get the target parameters when
3144 invoked with -gnats.
3146 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3148 * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
3149 declaration subject to No_Initialization.
3151 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3153 * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
3154 is a subtype with dynamic predicates, or a non-static subtype
3156 * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
3157 expression if subtype has a dynamic predicate.
3158 (Constrain_Index): Reject subtype indication if subtype mark
3160 (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
3161 (Make_Index): If index is a subtype indication, itype inhereits
3162 predicate flags for subsequent testing.
3163 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
3164 procedure Check_Predicate_Use, to reject illegal uses of domains
3165 of iteration that have dynamic predicates.
3166 * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
3167 indication to which a predicate applies.
3168 * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
3169 prevent cascaded errors when subtype is invalid.
3171 2014-08-01 Robert Dewar <dewar@adacore.com>
3173 * sem_ch10.adb: Minor reformatting.
3175 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3177 * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
3178 because either type may be a subtype of the other.
3180 2014-08-01 Vincent Celier <celier@adacore.com>
3182 * makeusg.adb: Add documentation for debug switch -dn.
3184 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3186 * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
3187 expression with standard operator and type, for pretty-printing
3188 use, when in ASIS_Mode. When generating code dimensional analysis
3189 is not involved and dimension expressions are handled statically,
3190 and other operators are resolved in the usual way.
3192 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3194 * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
3195 Parent_Subtype in ASIS mode, leads to several failures.
3196 * sem_ch4.adb (Analyze_Selected_Component): In an instance,
3197 if the prefix is a type extension, check whether component is
3198 declared in the parent type, possibly in a parent unit. Needed
3199 in ASIS mode when Parent_Subtype is not set.
3201 2014-08-01 Robert Dewar <dewar@adacore.com>
3203 * sem_prag.adb: Minor reformatting.
3204 * s-regpat.adb: Minor reformatting.
3205 * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3206 Treat_As_Volatile on constants.
3208 2014-08-01 Tristan Gingold <gingold@adacore.com>
3210 * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
3212 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3214 * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
3215 warning on a with_clause created for the renaming of a parent
3216 unit in an explicit with_clause.
3218 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3220 * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
3221 Set Is_Imported flag at once, to simplify subsequent legality
3222 checks. Reject the aspect on an object whose declaration has an
3223 explicit initial value.
3224 * sem_prag.adb (Process_Import_Or_Interface): Use original node
3225 to check legality of an initial value for an imported entity.
3226 Set Is_Imported flag in case of error to prevent cascaded errors.
3227 Do not set the Is_Imported flag if the pragma comes from an
3228 aspect, because it is already done when analyzing the aspect.
3230 2014-08-01 Emmanuel Briot <briot@adacore.com>
3232 * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
3234 2014-08-01 Robert Dewar <dewar@adacore.com>
3236 * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
3239 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3241 * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
3242 checks when the related variable comes from source.
3243 * sem_res.adb (Resolve_Actuals): Enable the volatility checks
3244 when the related actual parameter comes from source. Update comment.
3245 * freeze.adb (Freeze_Record_Type): Do not freeze the designated
3246 type of an array of pointers when the designated type is
3247 class-wide and its root type is the record being currently frozen.
3249 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3251 * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
3252 of renaming declaration created for domain of iteration.
3253 * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
3254 for error messages on aggregates whose index subtypes have
3255 predicates. The new placement avoids posting messages on previous
3256 subtype declarations rather than on the aggregate itself.
3257 * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
3258 Add_Dispatching_Operation, to handle properly the overriding of
3259 the predefined operations on controlled types, when the partial
3260 view of a type is not visibly controlled.
3262 2014-08-01 Ben Brosgol <brosgol@adacore.com>
3264 * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
3267 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3269 * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
3270 assertion check as the attribute is defined for all entities.
3271 (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
3272 check as the attribute is defined for all entities.
3273 * einfo.ads Update the documentation of attribute
3274 Is_Hidden_Non_Overridden_Subprogram.
3275 * sem_ch7.adb (Install_Package_Entity): No need to check the
3276 entity kind of the Id.
3277 * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
3278 usage. Ensure that the homographs are of the same entity kind
3279 and not fully conformant.
3280 (Hide_Non_Overridden_Subprograms): Update the comment on usage.
3282 2014-08-01 Robert Dewar <dewar@adacore.com>
3284 * inline.adb: Minor code reorganization.
3285 * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
3287 2014-08-01 Robert Dewar <dewar@adacore.com>
3289 * inline.adb, s-os_lib.ads: Minor reformatting.
3291 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3293 * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
3294 * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
3297 2014-08-01 Yannick Moy <moy@adacore.com>
3299 * inline.adb (Cannot_Inline): Issue info message instead of
3300 warning for subprograms not inlined in GNATprove mode.
3301 * sem_res.adb (Resolve_Call): Take body into account for deciding
3302 whether subprogram can be inlined in GNATprove mode or not.
3304 2014-08-01 Claire Dross <dross@adacore.com>
3306 * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
3307 of Get_First_Parent_With_External_Axiomatization_For_Entity for
3309 * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
3310 for parameters of packages with external axiomatization.
3312 2014-08-01 Robert Dewar <dewar@adacore.com>
3314 * sem_res.adb: Minor comment addition.
3316 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3318 * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
3319 s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
3321 * s-os_lib.ads: Minor reformatting.
3323 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3325 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
3326 completely previous code since only GCC back-ends are prepared
3327 to handle e.g. 'Machine attribute.
3328 * targparm.adb, targparm.ads: Remove remaining refs and
3329 handling of OpenVMS_On_Target, VAX_Float_On_Target and
3330 RTX_RTSS_Kernel_Module_On_Target.
3331 * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
3334 2014-08-01 Robert Dewar <dewar@adacore.com>
3336 * exp_dist.adb, exp_attr.adb: Minor reformatting.
3337 * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
3338 a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
3339 sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
3340 g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
3341 improper use of shall.
3343 2014-08-01 Robert Dewar <dewar@adacore.com>
3345 * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
3346 exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
3347 exp_ch3.adb: Minor reformatting & code reorganization.
3349 2014-08-01 Robert Dewar <dewar@adacore.com>
3351 * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
3352 * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
3353 s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
3354 s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
3355 s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
3357 * gcc-interface/decl.c, gcc-interface/Makefile.in,
3358 gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
3360 2014-08-01 Pascal Obry <obry@adacore.com>
3362 * s-os_lib.ads: Rename File_Size to Large_File_Size.
3364 2014-08-01 Robert Dewar <dewar@adacore.com>
3366 * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
3367 a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
3368 a-numaux-libc-x86.ads: Fix bad package header comments.
3369 * elists.ads, elists.adb (Append_New_Elmt): New procedure.
3370 * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
3371 checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
3372 sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
3373 targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
3374 stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
3375 s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
3376 s-os_lib.adb: Remove VMS-specific code.
3378 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3380 * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
3381 previous state in CodePeer_Mode.
3383 2014-08-01 Robert Dewar <dewar@adacore.com>
3385 * hostparm.ads: Put back definition of OpenVMS as False to aid
3386 the transition process.
3387 * sem_ch7.adb: Minor reformatting.
3388 * prj-env.adb: Minor code fix.
3389 * gnat_rm.texi: Complete previous change.
3390 * sem_ch3.adb: Minor reformatting.
3391 * sem_ch6.adb: Minor reformatting.
3392 * sem_elab.adb: Minor reformatting.
3393 * exp_strm.adb: Complete previous change.
3395 2014-08-01 Vincent Celier <celier@adacore.com>
3397 * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
3398 warning when a constant is unreferenced and its type has pragma
3399 Unreferenced_Objects.
3401 2014-08-01 Hristian Kirtchev <kirtchev@adacore.com>
3403 * einfo.adb: Flag2 is now known as
3404 Is_Hidden_Non_Overridden_Subprogram.
3405 (Is_Hidden_Non_Overridden_Subprogram): New routine.
3406 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
3407 (Write_Entity_Fields): Output Flag2.
3408 * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
3409 along with occurrences in entities.
3410 (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
3411 (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
3413 * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
3414 declared non-overriden homographs into visibility.
3415 * sem_ch13.adb (Freeze_Entity_Checks): Hide all
3416 implicitly declared non-overriden homographs.
3417 (Hide_Non_Overridden_Subprograms): New routine.
3419 2014-08-01 Robert Dewar <dewar@adacore.com>
3421 * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
3423 * prj-conf.adb: Minor reformatting.
3424 * xr_tabls.adb (Read_File): Restore code which was enabled on
3425 non VMS platforms before.
3426 * prj-env.adb (Initialize_Default_Project_Path): Ditto.
3427 * sem_ch5.adb: Minor reformatting.
3428 * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
3429 sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
3430 Remove VMS-specific code.
3432 2014-08-01 Vincent Celier <celier@adacore.com>
3434 * make.adb (Await_Compile): Remove loop that was only needed
3437 2014-08-01 Robert Dewar <dewar@adacore.com>
3439 * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
3440 a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
3441 a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
3442 einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
3443 exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
3444 fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
3445 g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
3446 g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
3447 krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
3448 mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
3449 osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
3450 prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
3451 rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
3452 s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
3453 s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
3454 s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
3455 s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
3456 s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
3457 sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
3458 sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3459 sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
3460 treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
3461 specific code and comments.
3463 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3465 * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
3466 Check_Reverse_Iteration, to verify the legality of the Reverse
3467 indicator on various container types, and to detect illegal
3468 reverse iterations on containers that only supoort forward
3471 2014-08-01 Vincent Celier <celier@adacore.com>
3473 * gnatcmd.adb: Remove the VMS specific stuff. Integrate in
3474 procedure GNATCmd the relevant declarations from packages VMS_Cmds
3476 * gnatcmd.ads: Update comments to remove any trace of VMS
3478 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3480 * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
3481 defaulted actual that is an operator, before building wrapper
3482 for it in GNATprove mode. Restrict construction of wrapper to
3483 actuals that are operators.
3485 2014-08-01 Vincent Celier <celier@adacore.com>
3487 * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
3488 specific packages no longer needed.
3490 2014-08-01 Pascal Obry <obry@adacore.com>
3492 * s-os_lib.ads (System.CRTL): Move with clause to body.
3493 (File_Size): New type.
3494 (File_Length64): Use it.
3495 (File_Length): Restore previous spec returning a Long_Integer.
3496 * s-os_lib.adb (System.CRTL): Move with clause here.
3498 2014-08-01 Vincent Celier <celier@adacore.com>
3500 * mlib-prj.adb: Update comments to remove any mention of VMS.
3502 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3504 * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
3505 xgnatugn.adb and ug_words.
3507 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3509 * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
3510 expansion can be avoid for Machine, Model and Rounding.
3511 (Is_Inline_Floating_Point_Attribute): Return true for Machine
3512 & Model, as well as Rounding if wrapped in a conversion to an
3514 * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
3515 * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
3516 * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
3517 * gcc-interface/misc.c (enumerate_modes): Compute it.
3518 * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
3519 (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
3521 (Attribute_to_gnu) <Attr_Model>: New case.
3522 <Attr_Machine>): Likewise.
3523 (convert_with_check): Test
3524 fp_arith_may_widen variable.
3526 2014-08-01 Pascal Obry <obry@adacore.com>
3528 * adaint.h (GNAT_FOPEN): New definition for Windows.
3529 (GNAT_OPEN): Likewise.
3530 (GNAT_STAT): Likewise.
3531 (GNAT_FSTAT): Likewise.
3532 (GNAT_LSTAT): Likewise.
3533 (GNAT_STRUCT_STAT): Likewise.
3534 * adaint.c (__gnat_stat): Fix computation of file size for
3537 2014-08-01 Vincent Celier <celier@adacore.com>
3539 * Makefile.rtl: Minor comment update.
3541 2014-08-01 Vincent Celier <celier@adacore.com>
3543 * Make-generated.in: Remove dependencies for vms-help.
3545 2014-08-01 Gary Dismukes <dismukes@adacore.com>
3547 * makeutl.ads, opt.ads: Minor grammar fixes.
3548 * makeutl.adb: Minor code reorganization.
3550 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3552 * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
3553 gnatsym.adb: Remove gnatsym (VMS only tool).
3555 2014-08-01 Ben Brosgol <brosgol@adacore.com>
3557 * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
3558 conditionalization from gnat_ugn.texi and projects.texi, and updated
3559 (considerably simplified) xgnatugn.adb, to be removed soon.
3561 2014-08-01 Vincent Celier <celier@adacore.com>
3563 * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
3564 * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
3565 instead of Debug.Debug_Flag_S.
3566 * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
3567 No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
3569 * makeutl.ads (No_Exit_Message_Option): New constant string
3570 for switch --no-exit-message.
3571 * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
3572 * switch-m.adb (Scan_Make_Switches): Recognize new switch
3575 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3577 * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
3578 * gcc-interface/Make-lang.in: Remove exp_vfpt.o
3580 2014-08-01 Javier Miranda <miranda@adacore.com>
3582 * inline.ads (Inlined_Calls, Backend_Calls,
3583 Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
3584 moved to inline.adb (Cannot_Inline): Update documentation.
3585 (Check_And_Build_Body_To_Inline): Renamed.
3586 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3587 * inline.adb (Check_Inlining_Restrictions): New local variable.
3588 (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
3589 Backend_Not_Inlined_Subps): Declarations moved here
3590 from inline.ads (Number_Of_Statements): Removed.
3591 (Remove_Pragmas): Avoid duplicated version of this subprogram.
3592 (Build_Body_To_Inline): Code cleanup.
3593 (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
3594 (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
3595 (Check_Body_To_Inline): Removed.
3596 (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
3597 (Has_Excluded_Declaration): No action if not
3598 Check_Inlining_Restrictions.
3599 (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
3600 (Initialize): Initialize the lists of inlined calls and subprograms.
3601 (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3602 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
3603 to Check_And_Build_Body_To_Inline since it has been renamed as
3604 Check_And_Split_Unconstrained_Function
3605 * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
3607 * gnat1drv.adb Update call to Inline.List_Inlining_Info.
3609 2014-08-01 Vincent Celier <celier@adacore.com>
3611 * debug.adb: Add documentation for new debug switch -ds.
3612 * make.adb (List_Bad_Compilations): Do not issue any message
3613 when switch -ds is specified.
3614 * makeutl.adb (Fail_Program): Do not issue any message when
3616 (Finish_Program): Ditto.
3618 2014-08-01 Robert Dewar <dewar@adacore.com>
3620 * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
3621 s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
3622 s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
3623 indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
3624 indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
3625 s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
3626 s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
3627 s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
3628 s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
3629 s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
3630 s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
3631 s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
3632 g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
3633 s-tratas.ads: Minor fix to copyright notices.
3635 2014-08-01 Eric Botcazou <ebotcazou@adacore.com>
3637 * sinfo.ads: Remove long obsolete comment.
3638 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3640 * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
3641 * sem_ch3.adb: Minor reformatting.
3643 2014-08-01 Pascal Obry <obry@adacore.com>
3645 * cstreams.c: Only enable large file support on know supported
3646 platforms. Add missing defines/includes.
3648 2014-08-01 Ed Schonberg <schonberg@adacore.com>
3650 * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
3651 No_Dynamic_Predicate_On_Actual, to enforce the generic contract
3652 on generic units that contain constructs that forbid subtypes
3654 * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
3655 Inherit flags indicating the presence of predicates in subtype
3656 declarations with and without constraints.
3657 (Inherit_Predicate_Flags): Utility for the above.
3658 * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
3659 indicate that the actual cannot have predicates, and preserve
3660 warning. In an instance, report error if actual has predicates
3661 and the construct appears in a package declaration.
3662 * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
3663 for an actual with predicates, if the corresponding formal
3664 carries No_Predicate_On_Actual or (in the case of a loop)
3665 No_Dynamic_Predicate_On_Actual.
3666 * sem_ch13.adb (Build_Predicate_Functions); Do not build a
3667 Static_Predicate function if the type is non-static (in the
3668 presence of previous errors),
3669 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
3670 No_Dynamic_Predicate_On_Actual in a generic context, to enforce
3671 generic contract on actuals that cannot have predicates.
3673 2014-08-01 Pascal Obry <obry@adacore.com>
3675 * a-direct.adb (C_Size): Returns an int64.
3676 * osint.adb (System.CRTL): New with clause.
3677 (File_Length.Internal): Returns an int64.
3678 * s-os_lib.ads (File_Length): Returns an int64.
3680 2014-08-01 Robert Dewar <dewar@adacore.com>
3682 * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
3683 mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
3684 osint.adb, krunch.adb: Minor reformatting.
3686 2014-08-01 Robert Dewar <dewar@adacore.com>
3688 * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
3689 sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
3690 sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
3691 Remove VMS-specific code.
3692 * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
3694 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3696 * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
3697 gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
3698 make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
3699 mlib.ads, tempdir.adb: Remove VMS handling.
3701 2014-08-01 Pascal Obry <obry@adacore.com>
3703 * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
3704 (__gnat_named_file_length): Likewise.
3705 (__gnat_file_length_attr): Likewise.
3706 * a-direct.adb (C_Size): Use size_t as returned type.
3707 * osint.adb (File_Length): Adjust spec for Internal routine
3709 * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
3710 (System.CRTL): With claused moved to spec.
3711 * s-os_lib.ads (System.CRTL): With clause moved to here.
3713 2014-08-01 Pascal Obry <obry@adacore.com>
3715 * adaint.h, adaint.c (__gnat_open): Added.
3716 * s-crtl.ads (open): Import __gnat_open for large file support.
3718 2014-08-01 Robert Dewar <dewar@adacore.com>
3720 * sem_case.adb (Dup_Choice): Improve message for integer constants.
3722 2014-08-01 Arnaud Charlet <charlet@adacore.com>
3724 * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
3726 2014-08-01 Pascal Obry <obry@adacore.com>
3728 * adaint.h (GNAT_OPEN): Defines as open64 where supported.
3729 * adaint.c (GNAT_OPEN): Uses new macro where needed.
3731 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
3733 * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
3735 (maybe_pad_type): ...here. Call it to canonicalize the pad type.
3736 * gcc-interface/gigi.h: Update comment.
3738 2014-07-31 Javier Miranda <miranda@adacore.com>
3740 * debug.adb Remove documentation of -gnatd.k (no longer needed).
3741 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
3742 * inline.ads (Backend_Inlined_Subps): New
3743 Elist. (Backend_Not_Inlined_Subps): New Elist.
3744 (Has_Excluded_Declaration): Declaration previously located in
3745 * inline.adb (Has_Excluded_Statement): Declaration previously
3746 located in inline.adb
3747 * inline.adb (Has_Single_Return): Moved out of
3748 Build_Body_To_Inline to avoid having duplicated code.
3749 (Number_Of_Statements): New subprogram.
3750 (Register_Backend_Inlined_Subprogram): New subprogram.
3751 (Register_Backend_Not_Inlined_Subprogram): New subprogram.
3752 (Add_Inlined_Subprogram): Register backend inlined subprograms and
3753 also register subprograms that cannot be inlined by the backend.
3754 (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
3755 to avoid having duplicated code. Replace occurrences of
3756 Debug_Flag_Dot_K by Back_End_Inlining.
3757 * sem_res.adb (Resolve_Call): Code cleanup.
3758 * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
3759 occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
3760 (List_Inlining_Info): Add listing of subprograms passed to the
3761 backend and listing of subprograms that cannot be inlined by
3763 * sem_ch12.adb, sem_ch3.adb Replace occurrences of
3764 Debug_Flag_Dot_K by Back_End_Inlining.
3766 2014-07-31 Robert Dewar <dewar@adacore.com>
3768 * nlists.ads: Minor code fix (remove unwise Inline for
3771 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3773 * einfo.adb: Remove VMS specific code.
3774 * exp_attr.adb: Remove VAX specific code.
3775 * set_targ.adb: Remove handling of VAX_Float.
3776 * sem_vfpt.adb: Remove references to Vax_Native.
3777 * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
3779 2014-07-31 Robert Dewar <dewar@adacore.com>
3781 * sem_ch4.adb: Minor reformatting.
3783 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3785 * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
3786 to VMS. Misc clean ups.
3787 * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
3789 2014-07-31 Robert Dewar <dewar@adacore.com>
3791 * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
3792 exp_prag.adb, frontend.adb, interfac.ads,
3793 par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
3794 s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
3795 sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
3796 snames.ads-tmpl: Remove obsolete VMS-specific code.
3798 2014-07-31 Robert Dewar <dewar@adacore.com>
3800 * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
3802 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3804 * a-intnam-linux.ads: Minor: update obsolete comments.
3805 * s-taasde.adb: Minor: fix comment header.
3807 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3809 * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
3810 s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
3811 mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
3812 g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
3813 s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
3814 s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
3815 s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
3816 a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
3817 symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
3818 symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
3819 s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
3820 symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
3821 s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
3822 s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
3823 s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
3824 a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
3825 * namet.h (Is_Non_Ada_Error): Remove.
3827 2014-07-31 Robert Dewar <dewar@adacore.com>
3829 * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
3832 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3834 * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
3835 which demonstrates the expansion of while loops subject to
3836 attribute 'Loop_Entry. The condition of a while loop along with
3837 related condition actions is now wrapped in a function. Instead
3838 of repeating the condition, the expansion now calls the function.
3840 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3842 * sem_case.adb (Check_Against_Predicate): Correct off-by-one
3843 error when reporting of missing values in a case statement for
3844 a type with a static predicate.
3845 (Check_Choices): Reject a choice given by a subtype to which a
3846 Dynamic_Predicate applies.
3847 * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
3848 Has_Dynamic_Predicate_Aspect flag from parent.
3850 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3852 * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
3853 cannot apply to a subtype of an incomplete type.
3854 (Is_Static_Choice): Treat an Others_Clause as static. The
3855 staticness of the expression and of the range are checked
3858 2014-07-31 Pascal Obry <obry@adacore.com>
3860 * adaint.h (__gnat_ftell64): Added.
3861 (__gnat_fseek64): Added.
3863 * cstreams.c (__int64): Removed.
3865 2014-07-31 Pascal Obry <obry@adacore.com>
3867 * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
3868 * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
3869 (ftell64): Always returns a 64bit value.
3870 * cstreams.c (int64): New definition.
3871 (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
3872 (__gnat_ftell64): Always returns a 64bit value. The implemenation now
3873 uses ftello() on UNIX.
3874 (__gnat_fseek64): Offset is always a 64bit value. The
3875 implementation now uses fseeko() on UNIX.
3876 * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
3877 always use fseek64 to set the offset.
3878 (Size): Simplify code, always use fseek64/ftell64.
3879 * s-direio.ads (Count): Now an int64.
3880 * g-socket.ads (Vector_Element): Adjust definition for Length
3881 to be a size_t. This matches the C definition and avoid using
3882 a 64bit integer on 32bit platforms now that Count is always 64bit.
3883 * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
3884 (C_Recvmsg): Change some conversion to account for change in
3886 (C_Sendmsg): Likewise.
3888 2014-07-31 Robert Dewar <dewar@adacore.com>
3890 * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
3891 * debug.adb: Remove documentation of -gnatdm flag.
3892 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
3895 2014-07-31 Arnaud Charlet <charlet@adacore.com>
3897 * lib-writ.adb (Write_Unit_Information): Fix case where U =
3900 2014-07-31 Claire Dross <dross@adacore.com>
3902 * exp_util.adb, exp_util.ads
3903 (Get_First_Parent_With_External_Axiomatization_For_Entity):
3904 New routine to find the first parent of an entity with
3905 a pragma Annotate (GNATprove, External_Axiomatization).
3906 (Has_Annotate_Pragma_For_External_Axiomatization): New function
3907 to check if a package has a pragma Annotate (GNATprove,
3908 External_Axiomatization).
3909 * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
3910 flag on the entity for the declaration created for a formal
3911 subprogram in an instance. This is a renaming declaration,
3912 or in GNATprove_Mode the declaration of an expression function
3913 that captures the axiomatization of the actual.
3914 * sem_ch6.adb (Analyze_Expression_Function): For a
3915 Generic_Actual_Subprogram, place body immediately after the
3916 declaration because it may be used in a subsequent declaration
3918 * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
3919 the actual is a function, not an operator. Handle functions with
3920 one and two parameters and binary and unary operators.
3922 2014-07-31 Pascal Obry <obry@adacore.com>
3924 * cstreams.c (__gnat_is_regular_file_fd): Removed.
3925 * adaint.c (__gnat_is_regular_file_fd): Added.
3927 2014-07-31 Robert Dewar <dewar@adacore.com>
3929 * exp_strm.adb: Minor reformatting.
3931 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3933 * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
3934 Analyze_Associations, to create a wrapper around operators that
3935 are actuals to formal subprograms. This is done in GNATProve
3936 mode in order to propagate the contracts of the operators to
3937 the body of the instance.
3939 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3941 * sem_attr.adb (Analyze_Attribute, case 'Old): The reference is
3942 legal if within an aspect specification for a generic subprogram.
3944 2014-07-31 Javier Miranda <miranda@adacore.com>
3946 * gnat1drv.adb (Back_End_Inlining): Set to false if
3947 Suppress_All_Inlining is set.
3948 * debug.adb: Adding documentation for -gnatd.z.
3949 * inline.adb (Add_Inlined_Body): Extend the -gnatn2
3950 processing to -gnatn1 for calls to Inline_Always routines.
3951 (Add_Inlined_Subprogram): Remove previous patch.
3953 2014-07-31 Ed Schonberg <schonberg@adacore.com>
3955 * sem_ch13.adb (Check_One_Function): Apply properly the static
3956 semantic rules for indexing aspects and the functions they denote.
3958 2014-07-31 Javier Miranda <miranda@adacore.com>
3960 * debug.adb: Complete documentation of -gnatd.z.
3962 2014-07-31 Bob Duff <duff@adacore.com>
3964 * gnat_ugn.texi: Minor doc fixes.
3966 2014-07-31 Robert Dewar <dewar@adacore.com>
3968 * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
3971 2014-07-31 Tristan Gingold <gingold@adacore.com>
3973 * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
3974 (Packed_Bytes1): Make component aliased.
3976 2014-07-31 Robert Dewar <dewar@adacore.com>
3978 * s-unstyp.ads, s-fileio.adb: Minor reformatting.
3980 2014-07-31 Robert Dewar <dewar@adacore.com>
3982 * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
3985 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
3987 * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
3988 on array references here, now done more selectively in trans.c.
3990 2014-07-31 Doug Rupp <rupp@adacore.com>
3992 * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
3994 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
3996 * sem_util.adb (Is_Effectively_Volatile): New routine.
3998 2014-07-31 Fedor Rybin <frybin@adacore.com>
4000 * gnat_ugn.texi: Document --test-duration option for gnattest.
4002 2014-07-31 Javier Miranda <miranda@adacore.com>
4003 Eric Botcazou <ebotcazou@adacore.com>
4005 * opt.ads (Back_End_Inlining): New variable which controls
4006 activation of inlining by back-end expansion.
4007 * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
4008 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
4009 the body to be inlined by the frontend if Back_End_Inlining
4011 * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
4012 (Expand_Call): If backend inlining is enabled let the backend to
4013 handle inlined subprograms.
4014 * inline.ads (Register_Backend_Call): Moved here from exp_ch6
4015 * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
4016 (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
4017 (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
4019 * debug.adb Document -gnatd.z
4020 * fe.h Import Back_End_Inlining variable.
4021 * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
4022 enabled then declare attribute "always inline"
4023 * gcc-interface/decl.c, gcc-interface/trans.c,
4024 gcc-interface/gigi.h: Add handling of Inline_Always pragma.
4026 2014-07-31 Robert Dewar <dewar@adacore.com>
4028 * a-ngelfu.ads: Minor comment fix.
4030 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4032 * freeze.adb (Freeze_Record_Type): Replace all calls to
4033 Is_SPARK_Volatile with Is_Effectively_Volatile and update
4035 * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
4036 Replace all calls to Is_SPARK_Volatile with
4037 Is_Effectively_Volatile and update related comments.
4038 * sem_ch5.adb (Analyze_Iterator_Specification,
4039 Analyze_Loop_Parameter_Specification): Replace all calls to
4040 Is_SPARK_Volatile with Is_Effectively_Volatile and update
4042 * sem_ch6.adb (Process_Formals): Replace all calls to
4043 Is_SPARK_Volatile with Is_Effectively_Volatile and update
4045 * sem_ch12.adb (Instantiate_Object): Replace the call to
4046 Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
4047 and update related comment.
4048 * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
4049 Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
4050 with Is_Effectively_Volatile and update related comments.
4051 * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
4052 all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
4053 update related comments.
4054 * sem_util.adb (Has_Enabled_Property,
4055 Variable_Has_Enabled_Property): Replace all calls
4056 to Is_SPARK_Volatile with Is_Effectively_Volatile and
4057 update related comments.
4058 (Is_Effectively_Volatile): New routine.
4059 (Is_Effectively_Volatile_Object): New routine.
4060 (Is_SPARK_Volatile): Removed.
4061 (Is_SPARK_Volatile_Object): Removed.
4062 * sem_util.ads (Is_Effectively_Volatile): New routine.
4063 (Is_Effectively_Volatile_Object): New routine.
4064 (Is_SPARK_Volatile): Removed.
4065 (Is_SPARK_Volatile_Object): Removed.
4067 2014-07-31 Pascal Obry <obry@adacore.com>
4069 * s-fileio.adb (Open): Make sure a shared file gets inserted into
4070 the global list atomically. This ensures that the file descriptor
4071 won't be freed because another tasks is closing the file.
4073 2014-07-31 Robert Dewar <dewar@adacore.com>
4075 * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
4076 generation of _FIRST and _LAST variables even in GNATprove_Mode.
4077 * gnat_ugn.texi: Minor editing.
4078 * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
4079 aggregate is marked Comes_From_Source if argument is CFS.
4081 2014-07-31 Pascal Obry <obry@adacore.com>
4083 * s-fileio.adb: Remove obsolete comment.
4085 2014-07-31 Vincent Celier <celier@adacore.com>
4087 * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
4088 overriding keyword before function to avoid error when compiler
4089 is called with -gnatyO (check overriding indicators).
4091 2014-07-31 Tucker Taft <taft@adacore.com>
4093 * gnat_ugn.texi: Add a paragraph pointing the reader
4094 to the "plugins" example.
4096 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4098 * freeze.adb (Freeze_Expression): Document the
4099 purpose of the parent chain traversal.
4101 2014-07-31 Robert Dewar <dewar@adacore.com>
4103 * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
4104 unconstrained fpt ops.
4106 2014-07-31 Pascal Obry <obry@adacore.com>
4108 * s-fileio.adb (Open): Make sure a shared file gets inserted into
4109 the global list atomically. This ensures that the file descriptor
4110 won't be freed because another tasks is closing the file.
4112 2014-07-31 Vincent Celier <celier@adacore.com>
4114 * projects.texi: Minor spelling error fix.
4116 2014-07-31 Robert Dewar <dewar@adacore.com>
4118 * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
4119 * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
4121 * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
4122 * restrict.adb (Process_Restriction_Synonyms): Add handling
4123 of No_Elaboration_Code_All.
4124 * restrict.ads (Process_Restriction_Synonyms): Now handles
4125 No_Elaboration_Code_All.
4126 * sem_ch10.adb (Analyze_Context): Enforce transitive with for
4127 No_Elaboration_Code_All.
4128 * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4129 Handle setting of No_Elab_Code in unit information. Handle
4130 No_Elaboration_Code_All.
4131 * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
4133 (Name_No_Elaboration_Code_All): New name for pragma processing.
4135 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4137 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4138 types with a null range and use the Esize of the component
4139 instead of its RM_Size to identify appropriate values.
4141 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4143 * freeze.adb Add with and use clause for Aspects.
4144 (Freeze_Expression): Emit an error when a volatile constant lacks
4145 Boolean aspect Import.
4146 (Has_Boolean_Aspect_Import): New routine.
4148 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4150 * exp_util.adb: Minor reformatting.
4152 2014-07-31 Vincent Celier <celier@adacore.com>
4154 * errutil.adb (Error_Msg): Make sure that all components of
4155 the error message object are initialized.
4157 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4159 * sem_ch4.adb (Try_Container_Indexing): If the container type is
4160 class-wide, use specific type to locate iteration primitives.
4161 * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
4162 rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
4163 Minor error message reformating.
4164 * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
4165 aspect for a derived type.
4167 2014-07-31 Robert Dewar <dewar@adacore.com>
4169 * debug.adb: Document debug flag d.X.
4171 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4173 * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
4174 * sem_util.adb (Find_Specific_Type): If type is untagged private,
4175 retrieve full view so that primitive operations can be located.
4176 * exp_disp.adb Move Find_Specific_Type to sem_util.
4177 * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
4178 Find_Specific_Type to locate primitive equality.
4179 * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
4180 type does not require initialization.
4181 * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
4182 body all visibility is established, and the enclosing package
4183 declarations must not be installed.
4185 2014-07-31 Yannick Moy <moy@adacore.com>
4187 * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
4188 Make subprogram public.
4190 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4192 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
4193 predicate Discriminated_Size, to distinguish between private
4194 components that depend on discriminants from those whose size
4195 depends on some other non-static expression.
4197 2014-07-31 Nicolas Setton <setton@adacore.com>
4199 * g-exptty.adb (Close): Fix binding to Waitpid: use the
4202 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4204 * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
4205 in a discrete range, when 'range was probably intended.
4207 2014-07-31 Robert Dewar <dewar@adacore.com>
4209 * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
4211 2014-07-31 Robert Dewar <dewar@adacore.com>
4213 * frontend.adb: Minor reformatting.
4214 * sem.adb: Minor reformatting.
4215 * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
4216 identifiers on rewrite.
4217 * par.adb: Minor comment updates.
4218 * a-ngelfu.adb (Cos): Minor simplification.
4219 * par-ch13.adb (Get_Aspect_Specifications): Improve messages
4220 and recovery for bad aspect.
4221 * exp_ch3.adb: Code clean up.
4222 * sem_util.ads: Minor comment correction.
4223 * sem_ch13.adb (Check_Array_Type): Properly handle large types.
4224 * sem_ch3.adb: Code clean up.
4225 * binderr.ads: Minor comment correction.
4227 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4229 * exp_disp.adb (Expand_Interface_Conversion): A call whose
4230 prefix is a static conversion to an interface type that is not
4231 class-wide is not dispatching.
4233 2014-07-31 Robert Dewar <dewar@adacore.com>
4235 * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
4236 s-traceb-mastop.adb: Minor reformatting.
4238 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4240 * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
4241 expansion, to handle properly visibility of selected components
4244 2014-07-31 Robert Dewar <dewar@adacore.com>
4246 * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
4247 * par-ch2.adb (P_Pragma): Set Inside_Depends.
4248 * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
4249 Check_Unary_Plus_Or_Minus.
4250 * scans.ads (Inside_Depends): New flag.
4251 * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
4252 * style.ads: Add Inside_Depends parameter to Check_Arrow Add
4253 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4254 * styleg.adb (Check_Arrow): Handle Inside_Depends case.
4255 (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
4256 * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
4257 Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4259 2014-07-31 Javier Miranda <miranda@adacore.com>
4261 * s-vaflop.adb Move the body of function T_To_G before
4262 T_To_D. Required for frontend inlining.
4263 * inline.adb (Has_Excluded_Contract): New subprogram used to
4264 check if a subprogram inlined by the frontend has contracts
4265 which cannot be inlined.
4267 2014-07-31 Bob Duff <duff@adacore.com>
4269 * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
4270 (Call_Chain): Add 1 to number of frames to skip, to account for
4271 the fact that there's one more frame on the stack.
4272 * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
4274 2014-07-31 Robert Dewar <dewar@adacore.com>
4276 * checks.adb (Enable_Overflow_Check): More precise setting of
4277 Do_Overflow_Check flag for division.
4279 2014-07-31 Eric Botcazou <ebotcazou@adacore.com>
4281 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
4282 array types with implementation type.
4284 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4286 * sem_ch10.adb (Process_State): Remove local variable Name. Add
4287 local variable Decl. Partially declare an abstract state by
4288 generating an entity and storing it in the state declaration.
4289 * sem_prag.adb (Create_Abstract_State): Fully declare a
4290 semi-declared abstract state.
4292 2014-07-31 Robert Dewar <dewar@adacore.com>
4294 * prj-nmsc.adb: Minor reformatting.
4296 2014-07-31 Bob Duff <duff@adacore.com>
4298 * s-tasdeb.adb (System.Tasking.Debug): Remove
4299 all usage of the secondary stack from this package.
4301 2014-07-31 Hristian Kirtchev <kirtchev@adacore.com>
4303 * freeze.adb (Freeze_Expression): Update the loop in charge
4304 of finding a proper insertion place for freeze nodes to handle
4305 N_Expression_With_Actions nodes.
4307 2014-07-31 Robert Dewar <dewar@adacore.com>
4309 * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
4312 2014-07-31 Pascal Obry <obry@adacore.com>
4314 * prj-nmsc.adb: Minor reformatting.
4316 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4318 * sem_util.adb (Has_Preelaborable_Initialization): Check that
4319 type is tagged before checking whether a user-defined Initialize
4320 procedure is present.
4322 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4324 * a-ngelfu.ads (Sqrt): Augment postcondition.
4326 2014-07-31 Pascal Obry <obry@adacore.com>
4328 * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
4329 directory and ALI directory must be different than all object
4330 and library directories of aggregated projects.
4332 2014-07-31 Vincent Celier <celier@adacore.com>
4334 * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
4335 to package body, as it is not called from outside. Remove argument
4336 Project_Tree, no longer used. When runtime cannot be found,
4337 call Raise_Invalid_Config instead of failing the program.
4339 2014-07-31 Robert Dewar <dewar@adacore.com>
4341 * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
4343 * gnatlink.adb (Process_Args): Remove generation of -gnato0,
4346 2014-07-31 Robert Dewar <dewar@adacore.com>
4348 * gnat_ugn.texi: Document new switch -gnato0.
4349 * sem_ch3.ads: Minor reformatting.
4350 * gnatlink.adb (Process_Args): Compile bind file with -gnato0
4351 (we do not want overflow checks when incrementing elaboration
4353 * einfo.ads: Minor reformatting.
4355 2014-07-31 Robert Dewar <dewar@adacore.com>
4357 * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
4358 * s-arit64.adb: Minor reformatting.
4360 2014-07-31 Robert Dewar <dewar@adacore.com>
4362 * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
4363 checking is enabled except in GNAT_Mode.
4364 * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
4365 (suppress overflow checks).
4367 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4369 * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
4370 invariant procedure for an internally generated subtype that is
4371 created for an object of a class-wide type.
4373 2014-07-31 Vincent Celier <celier@adacore.com>
4375 * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
4377 2014-07-31 Gary Dismukes <dismukes@adacore.com>
4379 * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
4380 exp_disp.adb: Minor reformatting.
4382 2014-07-31 Robert Dewar <dewar@adacore.com>
4384 * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
4385 sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
4386 exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
4389 2014-07-31 Robert Dewar <dewar@adacore.com>
4391 * sem_ch13.adb: Minor reformatting.
4393 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4395 * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
4396 is an unchecked_union, warn that invariants will not be checked
4397 on components that have them.
4399 2014-07-31 Robert Dewar <dewar@adacore.com>
4401 * freeze.adb (Freeze_Entity): Check for error of
4402 Type_Invariant'Class applied to a untagged type.
4403 * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
4404 as null body, so that we perform error checks even if expansion
4407 2014-07-31 Ed Schonberg <schonberg@adacore.com>
4409 * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
4410 is already present, nothing to do.
4411 * exp_ch3.adb (Build_Component_Invariant_Call): For an access
4412 component, check whether the access type has an invariant before
4413 checking the designated type.
4414 (Build_Record_Invariant_Proc): Change suffix of generated
4415 name to prevent ambiguity when record type has invariants
4416 in addition to those of components, and two subprograms are
4417 constructed. Consistent with handling of array types.
4418 (Insert_Component_Invariant_Checks): Build invariant procedure
4419 body when one has not been created yet, in the case of composite
4420 types that are completions and whose full declarations carry
4423 2014-07-30 Thomas Quinot <quinot@adacore.com>
4425 * gnat_rm.texi: Minor doc fixes.
4427 2014-07-30 Robert Dewar <dewar@adacore.com>
4429 * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
4431 2014-07-30 Vincent Celier <celier@adacore.com>
4433 * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
4435 * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
4436 message to report that a directory cannot be created, to avoid
4437 processing of the directory path that may contains special
4438 insertion characters.
4440 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4442 * a-crdlli.ads: Place declaration of Empty_List after full type
4443 declaration for Curosr, to prevent freezing error.
4445 2014-07-30 Robert Dewar <dewar@adacore.com>
4447 * get_targ.adb: Minor code reorganization.
4448 * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
4451 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4453 * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
4454 not Program_Error, when attempting to remove an element not in
4455 the set. This is the given semantics for all set containers.
4457 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4459 * a-rbtgbo.adb (Delete_Node_Sans_Free): If
4460 element is not present in tree return rather than violating
4461 an assertion. Constraint_Error will be raised in the caller if
4462 element is not in the container.
4464 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4466 * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
4467 (elab body): Add provision for default target config file.
4468 * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
4470 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4472 * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
4473 when attempting to remove an element not in the set. This is
4474 the given semantics for all set containers.
4475 * a-cborse.adb (Delete): Attempt removal first, to check for
4476 tampering, before checking whether this is an attempt to
4477 delete a non-existing element, and in fthe latter case raise
4480 2014-07-30 Vincent Celier <celier@adacore.com>
4482 * prj-proc.adb (Recursive_Process): Do not create a new
4483 Project_Id if the project is already in the list of projects of
4486 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4488 * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
4489 whose type is an incomplete formal type.
4490 (Analyze_Return_Type): Reject a return type that is an untagged
4491 imcomplete formal type.
4492 (Process_Formals): Reject a formal parameter whose type is an
4493 untagged formal incomplete type.
4494 * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
4495 an untagged formal incomplete type.
4497 2014-07-30 Robert Dewar <dewar@adacore.com>
4499 * gnat_ugn.texi: Minor spelling correction.
4500 * makeutl.adb: Minor code reorganization.
4501 * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4503 2014-07-30 Robert Dewar <dewar@adacore.com>
4505 * einfo.ads (Has_Unchecked_Union): Document that this is used
4506 to check for illegal Valid_Scalars attribute references.
4507 * exp_attr.adb (Build_Record_VS_Func): New function
4508 (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
4510 * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
4511 Unchecked_Union Add note on 'Valid_Scalars generating a lot
4513 * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
4514 error on attempt to apply Valid_Scalars to Unchecked_Union type.
4516 2014-07-30 Steve Baird <baird@adacore.com>
4518 * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
4519 of A(I..J)(K) in CodePeer_Mode.
4521 2014-07-30 Ben Brosgol <brosgol@adacore.com>
4523 * gnat_ugn.texi: Fix typo.
4525 2014-07-30 Thomas Quinot <quinot@adacore.com>
4527 * lib-writ.ads: document format change.
4529 2014-07-30 Pascal Obry <obry@adacore.com>
4531 * prj-util.adb (For_Interface_Sources): Do not
4532 include sources from withed externally built projects.
4534 2014-07-30 Robert Dewar <dewar@adacore.com>
4536 * lib.adb: Minor reformatting.
4537 * prj-util.adb: Minor reformatting.
4539 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4541 * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
4542 that depends on discriminants, and which is given by an others
4543 clause, create an explicit subtype with the discriminant values
4544 of the enclosing aggregate, because the backend cannot otherwise
4545 retrieve the actual bounds of the array.
4547 2014-07-30 Fedor Rybin <frybin@adacore.com>
4549 * gnat_ugn.texi: Improve gnattest documentation.
4551 2014-07-30 Pascal Obry <obry@adacore.com>
4553 * makeutl.adb (Insert_Project_Sources): Properly handle sources
4554 that are aggregated. We want to include sources not only part
4555 of libraries but also if part of an aggregated project from an
4557 * prj.adb (For_Project_And_Aggregated_Context): Properly check
4558 state of root project.
4560 2014-07-30 Thomas Quinot <quinot@adacore.com>
4562 * lib-load.ads: Minor reformatting.
4563 * sinfo.ads (Library_Unit): Update comment.
4564 * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
4565 is redundant. Instead used the pragma Node_Id directly as the
4568 2014-07-30 Thomas Quinot <quinot@adacore.com>
4570 * lib.adb (Store_Note): Store only notes that do not come from
4571 an instance, and that are in the extended main source unit.
4572 * lib-writ (Write_Unit_Information): Annotations from subunits
4573 must be emitted along with those for the main unit, and they
4574 must carry a specific file name.
4575 * ali.ads (Notes_Record): Use a File_Name_Type instead of a
4576 Unit_Id for the source file containing the pragma, as in the
4577 case of annotations from subunits we might not have a readily
4579 * ali.adb (Scan_ALI): Account for above change in data structure.
4581 2014-07-30 Vincent Celier <celier@adacore.com>
4583 * makeutl.adb (Insert_Project_Sources): When the library project
4584 is an aggregate Stand-Alone Library, insert in the queue the
4585 Ada interface units, with Closure set to True;
4587 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4589 * sem_util.adb: Fix minor typo.
4590 * makeutl.adb: Minor reformatting.
4592 2014-07-30 Robert Dewar <dewar@adacore.com>
4594 * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
4596 2014-07-30 Yannick Moy <moy@adacore.com>
4598 * checks.ads: Fix typo in comment.
4600 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
4602 * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
4603 entities that materialize range bounds, if any.
4605 2014-07-30 Vincent Celier <celier@adacore.com>
4607 * projects.texi: Minor spelling fix.
4609 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4611 * checks.adb (Make_Bignum_Block): Use the new secondary stack
4612 build routines to manage the mark.
4613 * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
4614 Use the new secodary stack build routines to manage the mark.
4615 (Insert_Actions_In_Scope_Around): Add new formal parameter
4616 Manage_SS along with comment on its usage. Code and comment
4617 reformatting. Mark and release the secondary stack when the
4618 context warrants it.
4619 (Make_Transient_Block): Update the call
4620 to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
4621 (Wrap_Transient_Declaration): Remove local variable
4622 Uses_SS. Ensure that the secondary stack is marked and released
4623 when the related object declaration appears in a library level
4624 package or package body. Code and comment reformatting.
4625 * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
4626 (Build_SS_Release_Call): New routine.
4628 2014-07-30 Steve Baird <baird@adacore.com>
4630 * exp_attr.adb: Revert previous change, not needed after all.
4632 2014-07-30 Vincent Celier <celier@adacore.com>
4634 * makeutl.adb (Queue.Insert_Project_Sources): Insert with
4635 Closure => True for interfaces of Stand-Alone Libraries.
4636 * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
4637 Boolean component Closure, defaulted to False.
4639 2014-07-30 Yannick Moy <moy@adacore.com>
4641 * sem_res.adb: Fix typo in error message.
4643 2014-07-30 Robert Dewar <dewar@adacore.com>
4645 * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
4646 as name suffixes rather than L/H for subtype bounds.
4647 * tbuild.ads: Minor comment improvements and fixes
4648 (Make_External_Name): Document that suffix can start with an
4651 2014-07-30 Bob Duff <duff@adacore.com>
4653 * gnat_ugn.texi: Document --rep-clauses switch.
4655 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4657 * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
4658 Default_Component_Value can only be specified for scalar type or
4659 arrays of scalar types respectively. This legality check must
4660 be performed at the point the aspect is analyzed, in order to
4661 reject aspect specifications that apply to a partial view.
4663 2014-07-30 Thomas Quinot <quinot@adacore.com>
4665 * freeze.adb: Minor reformatting.
4667 2014-07-30 Robert Dewar <dewar@adacore.com>
4669 * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
4672 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4674 * freeze.adb (Check_Expression_Function): At the freeze point
4675 of an expression function, verify that the expression in the
4676 function does not contain references to any deferred constants
4677 that have no completion yet.
4678 (Freeze_Expression, Freeze_Before): call
4679 Check_Expression_Function.
4680 * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
4681 * a-ciorse.adb: Add Adjust and Finalize routines for
4682 Reference_Control_Type. Use it in the construction of Reference
4683 and Constant_Reference values.
4685 2014-07-30 Robert Dewar <dewar@adacore.com>
4687 * exp_aggr.adb: Update comments.
4688 * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
4691 2014-07-30 Robert Dewar <dewar@adacore.com>
4693 * cstand.adb (New_Standard_Entity): New version takes name
4694 string to call Make_Name.
4695 (Create_Standard): Use this routine to set name before setting other
4698 2014-07-30 Robert Dewar <dewar@adacore.com>
4700 * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
4702 (Expand_Attribute, case Last): Ditto.
4703 * exp_ch3.adb (Constrain_Index): New calling sequence for
4704 Process_Range_Expr_In_Decl.
4705 (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
4707 * sem_ch3.adb (Constrain_Index): New calling sequence for
4708 Process_Range_Expr_In_Decl.
4709 (Set_Scalar_Range_For_Subtype): ditto.
4710 (Process_Range_Expr_In_Decl): Create constants to hold bounds for
4712 * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
4713 * sem_eval.adb (Compile_Time_Compare): Make sure we use base
4714 types if we are not assuming no invalid values.
4716 2014-07-30 Robert Dewar <dewar@adacore.com>
4718 * clean.adb: Minor reformatting.
4719 * opt.ads: Minor fix to incorrect comment.
4721 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4723 * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
4724 subprogram, used by bounded hashed sets, to delete a node at
4725 a given index, whose element may have been improperly updated
4726 through a Reference_Preserving key.
4727 * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
4728 * a-cbhase.adb: Add Adjust and Finalize routines for
4729 Reference_Control_Type.
4730 (Delete, Insert): Raise Program_Error, not Constraint_Error,
4731 when operation is illegal.
4732 (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
4733 * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
4734 private with_clause for Ada.Finalization.
4735 * a-cbmutr.adb: Add Adjust and Finalize routines for
4736 Reference_Control_Type. Use it in the construction of Reference
4737 and Constant_Reference values.
4739 2014-07-30 Robert Dewar <dewar@adacore.com>
4741 * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
4743 2014-07-30 Pascal Obry <obry@adacore.com>
4745 * clean.adb (Clean_Project): Properly check for directory
4746 existence before trying to enter it.
4748 2014-07-30 Robert Dewar <dewar@adacore.com>
4750 * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
4752 2014-07-30 Robert Dewar <dewar@adacore.com>
4754 * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
4755 missing semicolon after name.
4757 2014-07-30 Pascal Obry <obry@adacore.com>
4759 * prj.ads (Gprinstall_Flags): New constant.
4760 * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
4761 missing library dir if Directories_Must_Exist_In_Projects
4764 2014-07-30 Bob Duff <duff@adacore.com>
4766 * a-except-2005.adb, a-except.adb: Remove obsolete comments.
4767 * s-traceb.ads: Updagte comments.
4769 2014-07-30 Robert Dewar <dewar@adacore.com>
4771 * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
4772 a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
4773 a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
4776 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4778 * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
4779 subprogram, used by all versions of hashed sets, to delete a node
4780 whose element has been improperly updated through a Reference_
4782 * a-cohase.adb: Remove Delete_Node, use new common procedure
4783 Delete_Node_At_Index.
4784 * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
4785 * a-cihase.adb: Add Adjust and Finalize routines for
4786 Reference_Control_Type.
4787 (Reference_Preserving_Key): Build aggregate for
4788 Reference_Control_Type
4790 2014-07-30 Yannick Moy <moy@adacore.com>
4792 * checks.adb, checks.ads (Determine_Range_R): New procedure to
4793 determine the possible range of a floating-point expression.
4795 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4797 * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
4798 * a-cborse.adb: Add Adjust and Finalize routines for
4799 Reference_Control_Type.
4800 (Reference_Preserving_Key): Build aggregate for
4801 Reference_Control_Type.
4802 (Delete): Check for tampering, and raise Program_Error (not
4803 Constraint_Error) when attempting to delete an element not in
4807 2014-07-30 Bob Duff <duff@adacore.com>
4809 * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
4810 * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
4811 Exception_Information is used to produce useful debugging
4812 information for the programmer. However, it was also used to
4813 implement the stream attributes for type Exception_Occurrence. The
4814 latter requires a stable and portable interface, which meant
4815 that we couldn't include a symbolic traceback. A separate set of
4816 routines was used to provide symbolic tracebacks under program
4817 control (i.e. not automatically). The goal of this ticket is
4818 to provide such automatic tracebacks, so the change here is to
4819 split the two functionalities: Exception_Information gives the
4820 maximally useful information for debugging (i.e. it now includes
4821 a symbolic traceback when a decorator is set, and it can be
4822 improved freely in the future without disturbing streaming).
4823 Untailored_Exception_Information always uses hexadecimal addresses
4824 in the traceback, has a stable and portable output, and is now
4827 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
4829 * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
4830 on the target of the assignment to find out whether it
4831 can be directly done by the back-end.
4832 * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
4834 2014-07-30 Robert Dewar <dewar@adacore.com>
4836 * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
4837 a-tasatt.adb: Minor reformatting.
4839 2014-07-30 Robert Dewar <dewar@adacore.com>
4841 * exp_ch4.adb: Minor reformatting.
4843 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4845 * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
4846 Reference_Control_Type to generic package, to keep additional
4847 information for Reference_Types that manipulate keys. Add Adjust and
4848 Finalize procedures for this type.
4849 (Finalize): When finalizing a reference_preserving_key, verify
4850 that the key of the new value is equivalent to the key of the
4851 original element, raise Program_Error otherwise.
4852 (Insert): Detect tampering.
4853 (Reference_Preserving_Key): Build proper Reference_Control_Type,
4854 and update Busy and Lock bits to detect tampering.
4855 * a-cohase.ads: Keep with-clause private.
4857 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
4859 * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
4860 of an equality are of an Unchecked_Union type and lack inferable
4863 2014-07-30 Bob Duff <duff@adacore.com>
4865 * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
4866 g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
4867 GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
4868 hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
4869 we can call them from the runtimes. Leave renamings in place under GNAT.
4871 2014-07-30 Yannick Moy <moy@adacore.com>
4873 * inline.adb (Check_And_Build_Body_To_Inline): Include code for
4874 inlining in GNATprove mode.
4876 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4878 * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
4879 Reference_Control_Type to generic package, to keep additional
4880 information for Reference_Types that manipulate keys. Add Adjust and
4881 Finalize procedures for this type.
4882 (Delete_Node): New procedure called when finalizing a
4883 Reference_Control_Type, to remove a node whose element has been
4884 improperly updated through a Reference.
4885 (Insert): Detect tampering.
4886 (Reference_Preserving_Key): Build proper Reference_Control_Type,
4887 and update Busy and Lock bits to detect tampering.
4889 2014-07-30 Bob Duff <duff@adacore.com>
4891 * exp_intr.ads: Minor comment fix.
4893 2014-07-30 Gary Dismukes <dismukes@adacore.com>
4895 * exp_prag.adb, a-tags.ads: Minor typo fixes.
4897 2014-07-30 Bob Duff <duff@adacore.com>
4899 * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
4900 a-except.ads, g-traceb.adb, memtrack.adb,
4901 s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
4902 Cleanup: Make the three versions of System.Traceback.Call_Chain
4903 have the same interface. Use an array for the Traceback parameter
4904 instead of an Address. This will enable reduction in code
4907 2014-07-30 Pat Rogers <rogers@adacore.com>
4909 * gnat_ugn.texi: Corrected minor textual error in description
4912 2014-07-30 Bob Duff <duff@adacore.com>
4914 * Makefile.rtl: Sort file names.
4916 2014-07-30 Arnaud Charlet <charlet@adacore.com>
4918 * a-tasatt.adb: Complete previous change: kill spurious warning
4919 on e.g. sparc, and make sure we only use the fast path when the
4920 alignment is compatible.
4922 2014-07-30 Yannick Moy <moy@adacore.com>
4924 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
4927 2014-07-30 Yannick Moy <moy@adacore.com>
4929 * inline.adb (Build_Body_To_Inline): Issue more precise messages
4930 for declarations that prevent inlining.
4931 (Cannot_Inline): Change usual start of message to refer to contextual
4932 analysis in GNATprove mode.
4933 * sem_res.adb (Resolve_Call): Change usual start of message to
4934 refer to contextual analysis in GNATprove mode, when inlining
4937 2014-07-30 Robert Dewar <dewar@adacore.com>
4939 * sem_res.adb, sem_ch6.adb: Minor code reorganization.
4940 * inline.adb: Minor reformatting.
4942 2014-07-30 Javier Miranda <miranda@adacore.com>
4944 * a-tags.ads: Add comments.
4946 2014-07-30 Pat Rogers <rogers@adacore.com>
4948 * gnat_rm.texi: Minor word error.
4950 2014-07-30 Ed Schonberg <schonberg@adacore.com>
4952 * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
4953 created to capture the value of the prefix of 'Old at the
4954 beginning of the current declarative part, to prevent data flow
4955 anomalies in the postcondition procedure that will follow.
4957 2014-07-30 Yannick Moy <moy@adacore.com>
4959 * debug.adb: Retire debug flag -gnatdQ.
4960 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
4961 on decl, not on body. Ignore predicate functions.
4962 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
4963 debug flag -gnatdQ. Correctly analyze SPARK_Mode on decl and
4964 body when generating a decl for a body on which SPARK_Mode aspect
4966 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
4967 attaching pragma to entity, to account for declaration not coming
4969 * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
4970 as not always inlined in GNATprove mode, when called in an
4973 2014-07-30 Vincent Celier <celier@adacore.com>
4975 * debug.adb: Minor comment update.
4977 2014-07-30 Robert Dewar <dewar@adacore.com>
4979 * s-tasuti.adb, s-tassta.adb: Minor reformatting.
4980 * sprint.adb (Sprint_Node): Handle N_Contract case.
4981 * exp_prag.adb: Minor reformatting.
4982 * freeze.adb (Freeze_Entity): Check useless postcondition for
4983 No_Return subprogram.
4984 * sem_prag.adb: Minor reformatting.
4986 2014-07-30 Javier Miranda <miranda@adacore.com>
4988 * a-tags.ads: Complete comments about performance.
4990 2014-07-30 Fedor Rybin <frybin@adacore.com>
4992 * gnat_ugn.texi: Adding description for --exit-status option to
4993 gnattest section. Fixing index entry of --passed-tests option
4994 in gnattest section.
4996 2014-07-30 Javier Miranda <miranda@adacore.com>
4998 * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
4999 rtsfind.ads: Remove references to package Interfaces.CPP since this
5000 package is no longer needed.
5002 2014-07-30 Bob Duff <duff@adacore.com>
5004 * s-taasde.adb (Timer_Queue): Don't use a
5005 build-in-place function call to initialize the Timer_Queue.
5006 * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
5007 Turn off polling in these units, because otherwise we get
5008 elaboration circularities with Ada.Exceptions when the -gnatP
5010 * s-tassta.adb (Create_Task): Make sure independent tasks
5011 are created with Parent = Environment_Task. This was not true,
5012 for example, in s-interr.adb, when Interrupt_Manager does "new
5013 Server_Task"; the Server_Task had Parent = Interrupt_Manager,
5014 which is wrong because the master is determined by the access
5015 type, which is at library level.
5016 * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
5017 now set correctly by Create_Task.
5018 (Make_Passive): Remove the workaround for the race condition in
5020 * frontend.adb (Frontend): Revert to previous method of detecting
5021 temporary configuration pragma files, recognizing such files by
5022 ".tmp" in the name. This is more general than detecting pragmas
5023 Source_File_Name_Project, because it allows any tool to use
5024 this naming convention, no matter the content of the file.
5025 * gnat_ugn.texi: Document this naming convention.
5027 2014-07-30 Robert Dewar <dewar@adacore.com>
5029 * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
5030 inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
5031 s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
5032 s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
5033 * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
5036 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5038 * sem_ch5.adb: Improve error recovery.
5039 * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
5040 before analyzing the body, so that in GNATprove mode there is
5041 no light expansion. Whatever expansion is required by SPARK will
5042 be performed when analysing the inlined code.
5044 2014-07-30 Bob Duff <duff@adacore.com>
5046 * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
5048 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5050 * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
5051 verify that it is not hidden by an inner implicit declaration.
5053 2014-07-30 Thomas Quinot <quinot@adacore.com>
5055 * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
5056 * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
5057 * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
5058 the call returns an unconstrained type: in this case there is
5059 already a transient scope, and we should not establish a new one.
5060 * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
5061 True, also insert cleanup actions in the tree.
5062 (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
5063 with Clean set True.
5065 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5067 * s-taskin.ads (Direct_Index, Direct_Index_Range,
5068 Direct_Attribute_Element, Direct_Attribute_Array,
5069 Direct_Index_Vector, Direct_Attributes, Is_Defined,
5070 Indirect_Attributes): Removed. (Atomic_Address,
5071 Attribute_Array, Attributes): New.
5072 * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
5073 Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
5074 (Finalize_Attributes): Reimplement.
5075 * s-tassta.adb (Create_Task): Remove call to
5076 Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
5077 Replace Finalize_Attributes_Link by Finalize_Attributes.
5078 * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
5079 Reimplement from scratch, using a simpler and more efficient
5081 * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
5082 * s-parame.ads, s-parame-hpux.ads,
5083 * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
5084 * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
5085 Default_Attribute_Count.
5087 2014-07-30 Olivier Hainque <hainque@adacore.com>
5089 * vxworks-ppc-link.spec: New file. Extra link
5090 instructions for ppc-vxworks.
5091 * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
5092 * system-vxworks-ppc.ads: Adjust linker options to use spec files.
5093 * system-vxworks-arm.ads: Likewise.
5094 * gcc-interface/Makefile.in: Enable .spec files.
5096 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5098 * sem_aggr.adb: Minor comment reformatting.
5100 2014-07-30 Robert Dewar <dewar@adacore.com>
5102 * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
5103 * sem_warn.adb (Has_Junk_Name): New function
5104 (Check_References): Use Has_Junk_Name to delete junk warnings
5105 (Check_Unset_Reference): ditto.
5106 (Warn_On_Unreferenced_Entity): ditto.
5107 (Warn_On_Useless_Assignment): ditto.
5109 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5111 * checks.adb (Insert_Valid_Check): Do not check for the packed
5112 array type of a prefix that is an access type.
5114 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5116 * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
5117 Unconstrained_Array even if prefix is not frozen yet, as can
5118 occur with a private subtype used as a generic actual.
5120 2014-07-30 Gary Dismukes <dismukes@adacore.com>
5122 * sem_attr.adb: Minor reformatting.
5124 2014-07-30 Pat Rogers <rogers@adacore.com>
5126 * gnat_rm.texi: Corrected minor wording error in description
5127 of No_Exception_Registration.
5129 2014-07-30 Yannick Moy <moy@adacore.com>
5131 * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
5132 mode. Realphabetize two subprograms.
5133 * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
5134 (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
5135 (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
5137 (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
5138 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
5139 Is_Inline in GNATprove mode.
5140 (Analyze_Subprogram_Specification):
5141 Set Is_Inlined_Always at subprogram entity creation.
5142 * sem_res.adb (Resolve_Call): Do not deal with inlining during
5143 pre-analysis. Issue warning on call to possibly inlined
5144 subprogram when body not seen.
5146 2014-07-30 Yannick Moy <moy@adacore.com>
5148 * lib-xref.adb (Generate_Reference): Add special
5149 case for compiler-generated formals in GNATprove mode.
5151 2014-07-30 Yannick Moy <moy@adacore.com>
5153 * sem_ch6.adb: Add comments.
5155 2014-07-30 Thomas Quinot <quinot@adacore.com>
5157 * s-os_lib.ads (GM_Time_Of): Clarify documentation.
5159 2014-07-30 Robert Dewar <dewar@adacore.com>
5161 * sem_aggr.adb, sem_res.adb: Minor reformatting.
5163 2014-07-30 Thomas Quinot <quinot@adacore.com>
5165 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5166 Bit_Order): Set Reverse_Bit_Order on the base type of the
5167 specified first subtype.
5169 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5171 * inline.adb (Expand_Inlined_Call): Use a renaming declaration
5172 to capture the value of actuals of a limited type rather than
5173 an object declaration, to prevent spurious errors when analyzing
5176 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5178 * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
5179 as an instance, and inhibit semantic checks on already analyzed
5180 code to prevent spurious errors.
5182 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5184 * a-exctra.ads ("="): New function, to restore compatibility.
5186 2014-07-30 Pascal Obry <obry@adacore.com>
5188 * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
5189 routine to use the OS dst setting.
5191 2014-07-30 Pat Rogers <rogers@adacore.com>
5193 * gnat_ugn.texi: Minor correction to description of -gnatw.K.
5195 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5197 * sem_util.adb (Wrong_Type): Disable some checks equally within
5198 instances and within inlined bodies, to suppress spurious type
5199 errors on already analyzed code.
5200 * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
5201 is legal in an inlined body, juts as it is in an instance body.
5203 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5205 * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
5206 body the operand of an unchecked conversion may be a literal, in
5207 which case its type is the target type of the conversion. This
5208 is in contrast to conversions in other contexts, where the
5209 operand cannot be a literal and must be resolvable independent
5212 2014-07-30 Pierre-Marie Derodat <derodat@adacore.com>
5214 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
5215 mere scalar constant instead of a reference for a renaming of
5217 * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
5218 * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
5220 2014-07-30 Robert Dewar <dewar@adacore.com>
5222 * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
5223 g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
5224 g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
5225 s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
5226 g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
5227 s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
5228 & code reorganization.
5230 2014-07-30 Bob Duff <duff@adacore.com>
5232 * s-tassta.adb, sem_util.ads: Minor reformatting.
5234 2014-07-30 Yannick Moy <moy@adacore.com>
5236 * inline.adb (Build_Body_To_Inline): Detect when
5237 subprogram has multiple returns, or not a single last return
5238 statement, in GNATprove mode.
5239 (Cannot_Inline): Simplify logic to handle case of GNATprove
5242 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5244 * sem_ch6.adb: Stubs are not subject to inlining.
5246 2014-07-30 Bob Duff <duff@adacore.com>
5248 * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
5249 from a procedure to a function, so that it can more easily be
5250 called before the "begin" of a task.
5251 * s-taasde.ads (Delay_Block): Make this type immutably limited,
5252 so we can use a build-in-place function call to initialize
5253 Timer_Queue in the body.
5254 * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
5255 * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
5256 * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
5257 Make_Independent before reaching its "begin", to avoid race
5258 conditions. This causes the activating task to wait until after
5259 Make_Independent is complete before proceeding. In addition,
5260 we initialize data structures used by independent tasks before
5261 activating those tasks, to avoid possible use of uninitialized data.
5262 * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
5263 Minor comment fixes.
5265 2014-07-30 Bob Duff <duff@adacore.com>
5267 * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
5268 the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
5269 System.Traceback_Entries (s-traent.ads and s-traent-vms.ads). Add
5270 subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
5271 * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
5273 2014-07-30 Arnaud Charlet <charlet@adacore.com>
5275 * a-tasatt.adb: Remove old comments.
5277 2014-07-30 Yannick Moy <moy@adacore.com>
5279 * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
5280 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
5281 to explain rationale for inlining or not in GNATprove mode.
5282 (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
5283 to False when inlining is not possible.
5284 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
5285 flag to indicate that subprogram is fully inlined. To be reversed
5286 if inlining problem is found.
5287 * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
5288 call in potentially unevaluated context.
5290 2014-07-30 Jose Ruiz <ruiz@adacore.com>
5292 * s-tarest.adb, s-tarest.ads: Fix comments.
5294 2014-07-30 Robert Dewar <dewar@adacore.com>
5296 * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
5297 Change No_Scalar_Parts predicate to Scalar_Part_Present and
5298 invert sense of test. This avoids the "not No_xxx" situation
5299 which is always ugly.
5301 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5303 * inline.adb (Expand_Inlined_Call): When generating code for
5304 an internal subprogram the expansion uses the location of the
5305 call, so that gdb can skip over it. In GNATprove mode we want to
5306 preserve slocs of original subprogram when expanding an inlined
5307 call, to obtain better warnings, even though subprogram appears
5308 not to come from source if it is the inlining of a subprogram
5309 body without a previous spec.
5311 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5313 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5314 types with atomic components.
5316 2014-07-30 Thomas Quinot <quinot@adacore.com>
5318 * Make-generated.in: Remove now unnecessary targets after s-oscons
5321 2014-07-30 Yannick Moy <moy@adacore.com>
5323 * sem_res.adb (Resolve_Call): Use ultimate alias
5324 of callee when available.
5326 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5328 * sem_ch6.adb (Analyze_Expression_Function): To check whether
5329 an expression function is a completion, use the specification of
5330 the previous declaration, not its entity, which may be internally
5331 generated in an inlined context.
5333 2014-07-30 Doug Rupp <rupp@adacore.com>
5335 * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
5336 temp files in /cache directory unless overridden by TMPDIR.
5338 2014-07-30 Jose Ruiz <ruiz@adacore.com>
5340 * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
5341 Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
5342 type CPU, so it can never be greater than CPU_Range'Last.
5344 2014-07-30 Bob Duff <duff@adacore.com>
5346 * s-taskin.ads: Minor comment fix.
5348 2014-07-30 Thomas Quinot <quinot@adacore.com>
5350 * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
5353 2014-07-30 Yannick Moy <moy@adacore.com>
5355 * debug.adb: Free debug flag dQ used for frontend inlining in
5357 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
5360 2014-07-30 Thomas Quinot <quinot@adacore.com>
5362 * Make-generated.in: Remove generation of s-oscons.ads, only
5363 generate the xoscons utility, in runtime-agnostic rules.
5364 * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
5365 no longer supported.
5367 2014-07-30 Bob Duff <duff@adacore.com>
5369 * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
5370 parameter Chain to be used in the allocator case.
5371 (Make_Build_In_Place_Call_In_Allocator): If the allocated object
5372 has tasks, wrap the code in a block that will activate them,
5373 including the usual finalization code to kill them off in case
5374 of exception or abort.
5376 2014-07-30 Robert Dewar <dewar@adacore.com>
5378 * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
5379 Remove renamings (don't work for gdb).
5380 (par): New synonym for p (avoid gdb ambiguities).
5381 * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
5383 2014-07-30 Bob Duff <duff@adacore.com>
5385 * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
5387 * treepr.ads, treepr.adb (ppp): Make this debugging routine
5388 accept any type covered by Union_Id.
5390 2014-07-30 Robert Dewar <dewar@adacore.com>
5392 * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
5394 * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
5397 2014-07-30 Robert Dewar <dewar@adacore.com>
5399 * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
5400 of predicate aspect on entity other than a type.
5402 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5404 * sem_ch6.adb (Body_Has_Contract): New predicate to determine
5405 when a subprogram body without a previous spec cannot be inlined
5406 in GNATprove mode, because it includes aspects or pragmas that
5407 generate a SPARK contract clause.
5408 * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
5409 instance cannot be inlined.
5411 2014-07-30 Robert Dewar <dewar@adacore.com>
5413 * debug.adb: Document that d7 suppresses compilation time output.
5414 * errout.adb (Write_Header): Include compilation time in
5416 * exp_intr.adb (Expand_Intrinsic_Call): Add
5417 Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
5418 Compilation_Date/Compilation_Time.
5419 * g-souinf.ads (Compilation_Date): New function
5420 (Compilation_Time): New function.
5421 * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
5422 * gnat_rm.texi (Compilation_Date): New function
5423 (Compilation_Time): New function.
5424 * opt.ads (Compilation_Time): New variable.
5425 * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
5426 * sem_intr.adb (Compilation_Date): New function.
5427 (Compilation_Time): New function.
5428 * snames.ads-tmpl (Name_Compilation_Date): New entry.
5429 (Name_Compilation_Time): New entry.
5431 2014-07-30 Yannick Moy <moy@adacore.com>
5433 * inline.adb: Add comment.
5435 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5437 * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
5438 parameterless attribute, and a postondition can mention an
5439 indexed component or a slice whose prefix is an attribute
5442 2014-07-30 Robert Dewar <dewar@adacore.com>
5444 * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
5445 Avoid bomb when printing package Standard.
5447 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5449 * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
5450 entity is created at this point, ensure that the name of the
5451 flag is unique, because the subprogram may be overloaded and
5452 other homonyms may also have elaboration flags created on the fly.
5454 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5456 * sem_attr.adb (Analyze_Array_Component_Update): New routine.
5457 (Analyze_Attribute): Major cleanup of attribute
5458 'Update. The logic is now split into two distinct routines
5459 depending on the type of the prefix. The use of <> is now illegal
5460 in attribute 'Update.
5461 (Analyze_Record_Component_Update): New routine.
5462 (Check_Component_Reference): Removed.
5463 (Resolve_Attribute): Remove the return statement and ??? comment
5464 following the processing for attribute 'Update. As a result,
5465 the attribute now freezes its prefix.
5467 2014-07-30 Javier Miranda <miranda@adacore.com>
5469 * exp_ch4.adb (Apply_Accessibility_Check): Do
5470 not call Base_Address() in VM targets.
5472 2014-07-30 Yannick Moy <moy@adacore.com>
5474 * gnat1drv.adb (Adjust_Global_Switches): Set
5475 Ineffective_Inline_Warnings to True in GNATprove mode.
5476 * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
5478 * opt.ads (Ineffective_Inline_Warnings): Add comment that
5479 describes use in GNATprove mode.
5480 * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
5481 pragma when applied to the special body created for inlining.
5483 2014-07-30 Robert Dewar <dewar@adacore.com>
5485 * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
5488 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5490 * aspects.ads Add a comment explaining why SPARK 2014 aspects are
5491 not delayed. Update the delay status of most SPARK 2014 aspects.
5492 * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
5493 to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
5494 to Decorate and Insert_Pragma. Add various comments concerning
5495 the delay status of several SPARK 2014 aspects. The insertion
5496 of Refined_State now uses routine Insert_After_SPARK_Mode.
5497 (Decorate): New routine.
5498 (Decorate_Aspect_And_Pragma): Removed.
5499 (Insert_Delayed_Pragma): Removed.
5500 (Insert_Pragma): New routine.
5502 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5504 * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
5505 only a warning, not an error on an attempt to inline a recursive
5508 2014-07-30 Robert Dewar <dewar@adacore.com>
5510 * g-forstr.adb: Minor code reorganization (use J rather than I
5511 as a variable name).
5512 * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
5513 g-forstr.ads: Minor reformatting.
5515 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5517 * sprint.adb (Set_Debug_Sloc): Also reset the end location if
5518 we are debugging the generated code.
5520 2014-07-30 Yannick Moy <moy@adacore.com>
5522 * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
5523 returns True for source pointer for an inlined body.
5525 2014-07-30 Javier Miranda <miranda@adacore.com>
5527 * exp_ch4.adb (Apply_Accessibility_Check): Add
5528 missing calls to Base_Address().
5530 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5532 * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
5533 mode, subprogram bodies without a previous declaration are also
5534 candidates for front-end inlining.
5536 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5538 * aspects.ads Aspects Async_Readers, Async_Writers,
5539 Effective_Reads and Effective_Writes do not need to be delayed.
5540 * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
5541 optional Boolean expression when generating the corresponding
5542 pragma for an external property aspect.
5543 * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
5544 local constant Obj. Add local constant Obj_Id. Reimplement the
5545 check which ensures that the related variable is in fact volatile.
5546 (Analyze_Pragma): Reimplement the analysis of external property pragmas.
5547 * sem_util.adb (Is_Enabled): New routine.
5548 (Variable_Has_Enabled_Property): Reimplement the detection of
5549 an enabled external property.
5551 2014-07-30 Sergey Rybin <rybin@adacore.com frybin>
5553 * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
5556 2014-07-30 Pascal Obry <obry@adacore.com>
5558 * g-forstr.adb, g-forstr.ads: New.
5559 * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
5560 GNAT.Formatted_String.
5562 2014-07-30 Eric Botcazou <ebotcazou@adacore.com>
5564 * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
5565 (Expand_Array_Aggregate): Also enable in-place expansion for
5566 code generated by the compiler. For an object declaration,
5567 set the kind of the object in addition to its type. If an
5568 in-place assignment is to be generated and it can be directly
5569 done by the back-end, do not expand the aggregate.
5570 * fe.h (Is_Others_Aggregate): Declare.
5571 * gcc-interface/trans.c
5572 (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
5573 aggregate with a single Others choice on the RHS by means of
5574 __builtin_memset. Tidy up.
5576 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5578 * gnat_rm.texi: minor reformatting.
5580 2014-07-30 Yannick Moy <moy@adacore.com>
5582 * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
5585 2014-07-30 Robert Dewar <dewar@adacore.com>
5587 * gnat_rm.texi: Document additional implementation-defined use
5590 2014-07-30 Robert Dewar <dewar@adacore.com>
5592 * prj-proc.adb, prj-strt.adb: Update comments.
5594 2014-07-30 Gary Dismukes <dismukes@adacore.com>
5596 * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
5598 2014-07-30 Vincent Celier <celier@adacore.com>
5600 * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
5601 parameter No_Extending, defaulted to False. When No_Extending
5602 is True, do not look for an extending project.
5603 (Expression): For a variable reference that is not for the current
5604 project, get its Id calling Imported_Or_Extended_Project_From
5605 with No_Extending set to True.
5606 * prj-strt.adb (Parse_Variable_Reference): If a referenced
5607 variable is not found in the current project, check if it is
5608 defined in one of the projects it extends.
5610 2014-07-30 Robert Dewar <dewar@adacore.com>
5612 * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
5613 some additional cases of internally generated routines.
5615 2014-07-30 Ed Schonberg <schonberg@adacore.com>
5617 * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
5618 if the compilation unit is a subunit, extend optional processing
5619 to all subunits of the current one. This allows gnatstub to
5620 supress generation of spurious bodies.
5622 2014-07-30 Hristian Kirtchev <kirtchev@adacore.com>
5624 * a-cbmutr.adb (Insert_Child): Use local variable First to keep
5625 track of the initial element's index within the tree.
5627 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5629 * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
5630 (Insert_Child): Add local variable First. Capture the index of the
5631 first node being created to ensure correct cursor construction
5632 later on. Use the three parameter version of Allocate_Node
5633 when creating multiple children as this method allows aspect
5634 Default_Value to take effect (if applicable).
5636 2014-07-29 Eric Botcazou <ebotcazou@adacore.com>
5638 * exp_aggr.adb (Safe_Slice_Assignment): Remove.
5639 (Expand_Array_Aggregate): For a safe slice assignment, just set
5640 the target and use the common code path.
5642 2014-07-29 Robert Dewar <dewar@adacore.com>
5644 * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
5645 predicate No_Predicate_Test_On_Arguments, new name is
5646 Predicate_Tests_On_Arguments (with the opposite sense).
5648 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5650 * sem_attr.adb (Resolve_Attribute): Clean up the code for
5651 attribute 'Access. Do not generate an elaboration flag for a
5652 stand alone expression function. The expression of an expression
5653 function is now frozen when the expression function appears as
5654 the prefix of attribute 'Access.
5655 * sem_ch6.adb (Analyze_Expression_Function): Remove local
5656 variable New_Decl and update all references to it after the
5657 rewriting has taken place. Establish the linkages between the
5658 generated spec and body.
5660 2014-07-29 Robert Dewar <dewar@adacore.com>
5662 * sem_prag.adb (ip, rv): Prevent from being optimized away.
5663 * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
5664 * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
5667 2014-07-29 Vincent Celier <celier@adacore.com>
5669 * prj-pp.adb: Minor comment update.
5670 * frontend.adb: If a target dependency info file has been read
5671 through switch -gnateT= add it to the dependencies of the source
5674 2014-07-29 Robert Dewar <dewar@adacore.com>
5676 * sem_ch3.adb, prj.adb: Minor reformatting.
5678 2014-07-29 Vincent Celier <celier@adacore.com>
5680 * prj-pp.adb (Pretty_Print.Output_Project_File): New
5681 procedure to output project file names between quotes without
5682 concatenation, even if the line is too long.
5683 (Pretty_Print): Use Output_Project_File for project being extended and
5686 2014-07-29 Vincent Celier <celier@adacore.com>
5688 * gnat_ugn.texi: Document that configuration pragmas files are
5689 added to the dependencies, unless they contain only pragmas
5690 Source_File_Name_Project.
5692 2014-07-29 Robert Dewar <dewar@adacore.com>
5694 * frontend.adb: Minor reformatting.
5696 2014-07-29 Robert Dewar <dewar@adacore.com>
5698 * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
5699 (Expand_Actuals): Make sure predicate checks are properly applied
5700 for the case of OUT or IN OUT parameters.
5701 * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
5702 predicate tests on arguments for Finalize
5703 * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
5704 if predicate tests on subprogram arguments should be skipped.
5705 * sem_util.ads (No_Predicate_Test_On_Arguments): New function
5707 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5709 * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
5710 clause for the object and the expression is an aggregate, defer
5711 resolution and expansion of the aggregate until the freeze point
5713 * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
5714 the parent node is an N_Reference generated during expansion.
5716 2014-07-29 Vincent Celier <celier@adacore.com>
5718 * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
5720 2014-07-29 Robert Dewar <dewar@adacore.com>
5722 * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
5723 prepcomp.ads: Minor reformatting and code clean up.
5724 * exp_ch6.adb (Expand_Actuals): Generate predicate test
5725 unconditionally for case of OUT or IN OUT actual (before this
5726 was generated only for certain subcases, which is wrong, the
5727 test is always needed).
5729 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5731 * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
5732 * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
5733 until context type is available.
5734 * sem_res.adb (Resolve_Allocator): In the case of a qualified
5735 expression, complete resolution of expression.
5736 (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
5737 to apply Ada2012 checks on aliased formals, as well as
5738 accesibility checks when the context of the call is an allocator
5739 or a qualified expression.
5740 * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
5741 Moved here from sem_ch3.
5742 (Object_Access_Level): Handle properly aliased formals and
5744 * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
5745 now properly performed in sem_res (Resolve_Actuals,
5746 Check_Aliased_Parameter).
5748 2014-07-29 Yannick Moy <moy@adacore.com>
5750 * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
5751 * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
5752 function to decide when a subprogram can be inlined in GNATprove mode.
5753 (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
5754 condition for possible inlining.
5755 * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
5756 for Inline_Always in GNATprove mode.
5757 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
5758 body for subprograms in GNATprove mode, under debug flag -gnatdQ.
5759 * sem_prag.adb Minor change in comments.
5760 * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
5761 inside subprograms marked as SPARK_Mode On.
5762 * sinfo.ads: Minor typo fix.
5764 2014-07-29 Vincent Celier <celier@adacore.com>
5766 * frontend.adb: Add dependency on gnat.adc when taken into account
5767 and on non-temporary configuration pragmas files specified in
5769 * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
5770 dependencies on configuration pragmas files.
5772 2014-07-29 Pat Rogers <rogers@adacore.com>
5774 * gnat_ugn.texi: Minor clarification to the explanation for the
5777 2014-07-29 Robert Dewar <dewar@adacore.com>
5779 * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
5780 documentation that explains the need for this extended range
5781 (use by C_Pass_By_Copy).
5783 2014-07-29 Robert Dewar <dewar@adacore.com>
5785 * gnat_rm.texi, sem_prag.adb: Minor reformatting.
5787 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
5789 * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
5792 2014-07-29 Thomas Quinot <quinot@adacore.com>
5795 * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
5796 CRTSCTS to be visible.
5798 2014-07-29 Bob Duff <duff@adacore.com>
5800 * g-trasym.adb, g-trasym.ads: Code cleanup.
5802 2014-07-29 Doug Rupp <rupp@adacore.com>
5804 * sigtramp-vxworks.c: Minor reformatting.
5806 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5808 * gnat_rm.texi: No doc needed for Ada2012 aspect
5809 Implicit_dereference.
5811 2014-07-29 Robert Dewar <dewar@adacore.com>
5813 * sem_attr.adb (Attribute_12): New array
5814 (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
5815 (Check_Ada_2012_Attribute): Removed.
5817 2014-07-29 Doug Rupp <rupp@adacore.com>
5819 * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
5821 * sigtramp-vxworks.c: New file.
5822 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
5824 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5826 * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
5827 derived array type, add information about component type, which
5828 was previously missing in ali file.
5829 * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
5831 2014-07-29 Thomas Quinot <quinot@adacore.com>
5833 * sem_ch3.adb (Constrain_Corresponding_Record): For the case
5834 of the subtype created for a record component, do not mark
5835 the subtype as frozen. For one thing, this is anomalous (in
5836 particular, the base type might not itself be frozen yet);
5837 furthermore, proper freezing of the subtype must happen in any
5838 case. So, we just mark the subtype as requiring delayed freezing
5839 (and we'll actually freeze it when generating the init_proc of
5840 the enclosing record).
5841 Also change the name of the constrained record subtype (append a
5842 'C' so that it is clearly different from the unconstrained record
5843 type, "related_idV") to make debugging easier.
5844 (Process_Full_View): When creating a full subtype for a pending
5845 private subtype, re-establish the scope of the private subtype
5846 so that we get proper visibility on outer discriminants.
5847 * exp_ch3.adb (Build_Init_Statements): Freeze any component
5848 subtype that is not frozen yet.
5850 2014-07-29 Vincent Celier <celier@adacore.com>
5852 * prj-proc.adb (Recursive_Process): Always initialize the
5853 environment when the project is an aggregate project, even when
5854 it is not the root tree.
5855 2014-07-29 Robert Dewar <dewar@adacore.com>
5857 * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
5858 * gnat_rm.texi: Complete list of implementation aspects.
5859 * aspects.ads: Minor comment clarification.
5861 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5863 * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
5864 is a null-excluding access type, do not generate a constraint
5865 check if Suppress_Assignment_Checks is set on assignment node.
5866 * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
5867 parameter of a null-excluding access type, there is access check
5868 on entry, so set Suppress_Assignment_Checks on generated statement
5869 that assigns actual to parameter block.
5870 * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
5872 2014-07-29 Robert Dewar <dewar@adacore.com>
5874 * gnat_rm.texi: Change theta to @ in documentation of aspect
5877 2014-07-29 Robert Dewar <dewar@adacore.com>
5879 * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
5881 * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
5883 * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
5884 * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
5886 2014-07-29 Javier Miranda <miranda@adacore.com>
5888 * types.ads Update documentation on how to add new reason codes
5890 (RT_Exception_Code): Keep values ordered by their
5891 reason code. Required by the .NET backend.
5892 (RT_CE_Exceptions): Subtype declaration removed.
5893 (RT_PE_Exceptions): Subtype declaration removed.
5894 (RT_SE_Exceptions): Subtype declaration removed.
5895 (Kind): New mapping table of RT_Exception_Codes.
5896 * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
5898 * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
5899 mapping table. (Make_Raise_Program_Error): Updated to use the
5901 (Make_Raise_Storage_Error): Updated to use the new mapping table.
5902 * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
5905 2014-07-29 Thomas Quinot <quinot@adacore.com>
5907 * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
5908 distributed stubs generation.
5909 * exp_ch3.adb: Minor reformatting.
5911 2014-07-29 Yannick Moy <moy@adacore.com>
5913 * sinfo.ads: Document constraint between frontend and GNATprove.
5915 2014-07-29 Robert Dewar <dewar@adacore.com>
5917 * a-except.adb: Minor comment clarification.
5919 2014-07-29 Robert Dewar <dewar@adacore.com>
5921 * gnat_rm.texi: Complete list of implementation attributes.
5922 * snames.ads-tmpl: Clean up list of impl-defined attributes.
5924 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
5926 * freeze.adb (Freeze_Record_Type): Perform various
5927 volatility-related checks.
5929 2014-07-29 Robert Dewar <dewar@adacore.com>
5931 * sem_ch3.adb, sem_eval.adb: Minor reformatting.
5933 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5935 * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
5936 the case where the attribute reference appears in a nested scope
5937 from that of the subprogram prefix.
5938 * sem_attr.adb: Minor reformatting.
5940 2014-07-29 Robert Dewar <dewar@adacore.com>
5942 * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
5943 initialization options.
5945 2014-07-29 Robert Dewar <dewar@adacore.com>
5947 * sinfo.ads: Minor comment addition.
5949 2014-07-29 Bob Duff <duff@adacore.com>
5951 * sem_eval.adb, sem_ch13.adb: Minor reformatting.
5953 2014-07-29 Doug Rupp <rupp@adacore.com>
5955 * init.c: Complete previous change.
5957 2014-07-29 Robert Dewar <dewar@adacore.com>
5959 * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
5962 2014-07-29 Ed Schonberg <schonberg@adacore.com>
5964 * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
5965 and the completion will appear in the same declarative part,
5966 create elaboration flag.
5967 * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
5968 is a completion of a declaration in the same declarative part,
5969 and the subprogram has had its address taken, add elaboration
5970 check inside the subprogram body, to detect elaboration errors
5971 that may occur through indirect calls.
5973 2014-07-29 Doug Rupp <rupp@adacore.com>
5975 * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
5976 * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
5978 2014-07-29 Vincent Celier <celier@adacore.com>
5980 * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
5981 runtime directorie specified with two switches --RTS= designate
5982 the same directory, even when there are no literarily the same.
5984 2014-07-29 Robert Dewar <dewar@adacore.com>
5986 * gnat_ugn.texi: Minor documentation clarification.
5987 * switch-c.adb: Minor reformatting.
5989 2014-07-29 Robert Dewar <dewar@adacore.com>
5991 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5992 Fix incorrect RTE call which caused bomb if pragma was in
5993 configuration pragma file.
5995 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
5997 * expect.c (__gnat_expect_poll): Fix typo in previous change.
5998 * g-expect.adb: Update comments.
6000 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6002 * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
6003 (Default_Attribute_Count): Bump to 16 on native platforms.
6005 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6007 * sem_res.adb: Add guard to front-end inlining for SPARK.
6009 2014-07-29 Robert Dewar <dewar@adacore.com>
6011 * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
6014 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6016 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
6017 inline in GNATprove mode when subprogran is marked Inline_Always.
6018 * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
6019 mode if body to inline is available.
6020 * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
6021 effective in GNATprove mode.
6022 * sem_ch10.adb (Analyze_Compilation_Unit): Call
6023 Check_Package_Body_For_Inlining in GNATprove mode, so that body
6024 containing subprograms with Inline_Always can be available before
6027 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6029 * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
6030 to Check_Package_Body_For_Inlining, to prevent confusion with other
6031 inlining subprograms.
6033 2014-07-29 Robert Dewar <dewar@adacore.com>
6035 * opt.ads: Minor comment update.
6036 * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
6037 we want setting of Uneval_Old at time of encountering the aspect.
6038 * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
6040 * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
6041 New function (Set_Uneval_Old_Accept): New procedure.
6042 (Set_Uneval_Old_Warn): New procedure.
6043 * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
6045 2014-07-29 Robert Dewar <dewar@adacore.com>
6047 * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
6048 * snames.ads-tmpl: Minor reformatting.
6049 * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
6050 to give <Error>. Not clear why this was there, but the compiler
6051 sources do not reference Name_Error, and this interfered with
6052 the circuits for pragma Unevaluated_Use_Of_Old.
6054 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6056 * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
6057 types in SPARK 2014 (again).
6058 * sem_res.adb (Is_OK_Volatile_Context): New routine.
6059 (Resolve_Entity_Name): Ensure that a volatile object with
6060 enabled properties Async_Writers or Effectire_Reads appears in
6061 a non-interfering context.
6063 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6065 * sem_ch6.adb: Move Build_Body_To_Inline,
6066 Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
6067 * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
6068 * inline.ads, inline.adb: Package now contains subprograms that
6069 implement front-end inlining. No functional changes, no test
6072 2014-07-29 Robert Dewar <dewar@adacore.com>
6074 * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
6076 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6078 * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
6079 is a limited view when the context is a package body, because
6080 there is no subsequent place at which the non-limited view may
6082 (Process_Formals): Ditto.
6083 * sinfo.ads, par-ch3.adb: Minor reformatting.
6085 2014-07-29 Jerome Lambourg <lambourg@adacore.com>
6087 * expect.c (__gnat_expect_poll): New parameter dead_process
6088 used to return the dead process among the array of file
6089 descriptors. The Windows, VMS and HPUX implementations now
6090 properly report the dead process via this parameter. Other unixes
6092 * g-expect.adb (Poll): Adapt to the C profile.
6093 (Expect_Internal): Use the new parameter to properly close the
6094 File Descriptor. This then can be properly reported by the
6095 function First_Dead_Process as is expected.
6097 2014-07-29 Robert Dewar <dewar@adacore.com>
6099 * gnat_ugn.texi: Minor clarification of -gnatQ switch.
6101 2014-07-29 Robert Dewar <dewar@adacore.com>
6103 * einfo.adb (Derived_Type_Link): New function
6104 (Set_Derived_Type_Link): New procedure.
6105 (Write_Field31_Name): Output Derived_Type_Link.
6106 * einfo.ads: New field Derived_Type_Link.
6107 * exp_ch6.adb (Expand_Call): Warn if change of representation
6109 * sem_ch13.adb: Minor addition of ??? comment.
6110 (Rep_Item_Too_Late): Warn on case that is legal but could cause an
6111 expensive implicit conversion.
6112 * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
6114 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6116 * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
6117 to DF_Id. Add new local variable DF_Call. Do not perform any
6118 elaboration-related checks on the call to the partial finalization
6119 routine within an init proc to avoid generating bogus elaboration
6120 warnings on expansion-related code.
6121 * sem_elab.adb (Check_A_Call): Move constant Access_Case to
6122 the top level of the routine. Ensure that Output_Calls takes
6123 into account flags -gnatel and -gnatwl when emitting warnings
6125 (Check_Internal_Call_Continue): Update the call to Output_Calls.
6126 (Elab_Warning): Moved to the top level of routine Check_A_Call.
6127 (Emit): New routines.
6128 (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
6129 comment on usage. Output all warnings or info messages only when the
6130 caller context demands it and the proper elaboration flag is set.
6132 2014-07-29 Yannick Moy <moy@adacore.com>
6134 * sem_attr.adb (Analyze_Attribute/Attribute_Old):
6135 Check rule about Old appearing in potentially unevaluated
6136 expression everywhere, not only in Post.
6138 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6140 * sem_prag.adb: Update comment.
6141 * a-except.adb, a-except-2005.adb: Minor editing.
6143 2014-07-29 Pierre-Marie Derodat <derodat@adacore.com>
6145 * exp_dbug.adb (Debug_Renaming_Declaration):
6146 Do not create renaming entities for renamings of non-packed
6147 objects and for exceptions.
6149 2014-07-29 Robert Dewar <dewar@adacore.com>
6151 * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
6152 sem_ch6.adb, par-ch3.adb: Minor reformatting.
6154 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6156 * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
6157 subtype indication in an extended return statement when the
6158 return value is an ancestor of the return type of the function,
6159 and that return type is a null record extension.
6161 2014-07-29 Thomas Quinot <quinot@adacore.com>
6163 * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
6164 message produced for the case of a type-related representation
6165 item that is made illegal by 13.10(1).
6166 * gnat_rm.texi (Scalar_Storage_Order): Minor change in
6169 2014-07-29 Robert Dewar <dewar@adacore.com>
6171 * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
6172 * erroutc.adb (Output_Error_Msgs): Take wide characters into
6173 account in computing position of error flags.
6174 * sinput.adb (Get_Column_Number): Take wide characters into
6177 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6179 * par-ch3.adb (P_Access_Type_Definition): The subtype indication
6180 in an access type definition can carry a null_exclusion indicator.
6181 * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
6182 carries a null_exclusion indicator, verify that the subtype
6183 indication denotes an access type, and create a null-excluding
6185 * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
6186 defined on N_Access_To_Object_Definition to indicate that the
6187 subtype indication carries a null_exclusion indicator.
6189 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6191 * exp_ch6.adb (Add_Extra_Actual): Do not construct
6192 the extra actual by name, generate a reference instead.
6194 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6196 * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
6197 Allow_Integer_Address if already set.
6198 * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
6199 Fix order, for consistency with Rmsg_xx declarations.
6201 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6203 * sem_ch4.adb (Complete_Object_Operation): If the type of the
6204 candidate subprogram is a limited view, use non-limited view
6207 2014-07-29 Robert Dewar <dewar@adacore.com>
6209 * sem_ch13.adb: Minor change in RM reference.
6210 * sem_mech.ads: Minor reformatting.
6211 * einfo.ads: Minor comment fix.
6212 * types.ads: Minor correction to range given for Mechanism_Type.
6213 * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
6214 check predicate on way out for OUT or IN OUT parameters.
6215 * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
6216 better (P_Range_Constraint): Corresponding fix.
6217 * checks.ads: Minor comment clarification.
6219 2014-07-29 Gary Dismukes <dismukes@adacore.com>
6221 * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
6222 and Treat_As_Volatile flags based on whether the renamed object
6223 is a volatile object.
6225 2014-07-29 Olivier Hainque <hainque@adacore.com>
6228 (Default_Alignment): Rename as Storage_Alignment. This is not
6229 a "default" that can be overriden. Augment comment to clarify
6230 intent and document why we need to manage alignment padding.
6231 (Header_Offset): Set to Header'Object_Size instead of 'Size
6232 rounded up to Storage_Alignment. Storage_Alignment on the
6233 allocation header is not required by our internals so was
6234 overkill. 'Object_Size is enough to ensure proper alignment
6235 of the header address when substracted from a storage address
6236 aligned on Storage_Alignment.
6237 (Minimum_Allocation): Rename as Extra_Allocation, conveying that
6238 this is always added on top of the incoming allocation requests.
6239 (Align): New function, to perform alignment rounding operations.
6240 (Allocate): Add comments on the Storage_Address computation
6241 scheme and adjust so that the alignment padding applies to that
6242 (Storage_Address) only.
6244 2014-07-29 Robert Dewar <dewar@adacore.com>
6246 * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
6247 pragma Unreferenced.
6248 * cstand.adb (Create_Standard): Use E_Array_Type for standard
6249 string types. Make sure index of Any_String/Any_Array is in a list.
6250 * errout.adb: Minor reformatting.
6252 2014-07-29 Robert Dewar <dewar@adacore.com>
6254 * gnat_ugn.texi: Clean up and correct documentation of warnings.
6255 * usage.adb: Minor corrections to make sure warnings are properly
6257 * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
6258 (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
6260 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6262 * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
6263 created to match internal sequence numbers between compilations
6264 with/without abort must have its type properly set.
6266 2014-07-29 Robert Dewar <dewar@adacore.com>
6268 * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
6269 (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
6270 SSO_Default_Specified.
6271 * ali.ads (ALIs_Record): Add field SSO_Default
6272 (SSO_Default_Specified): New global switch.
6273 * bcheck.adb (Check_Consistent_SSO_Default): New procedure
6274 (Check_Configuration_Consistency): Call this procedure
6275 * einfo.adb (SSO_Set_High_By_Default): New
6276 function (SSO_Set_Low_By_Default): New function
6277 (Set_SSO_Set_High_By_Default): New procedure
6278 (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
6280 * einfo.ads (SSO_Set_Low_By_Default): New flag
6281 (SSO_Set_High_By_Default): New flag
6282 * freeze.adb (Set_SSO_From_Default): New procedure
6283 (Freeze_Array_Type): Call Set_SSO_From_Default
6284 (Freeze_Record_Type): Call Set_SSO_From_Default
6285 * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
6286 * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
6287 * lib-writ.ads: Add OL/OH parameters to P line
6288 * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
6289 * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
6291 * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
6292 set by default using pragma Default_Scalar_Storage_Order.
6293 * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
6294 * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
6295 Clear SSO defaults when explicit SSO is inherited.
6296 (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
6297 explicit SSO is specified.
6298 (Inherit_Aspects_At_Freeze_Point):
6299 Clear SSO default when inheriting SSO.
6300 * sem_ch3.adb (Set_Default_SSO): New procedure
6301 (Analyze_Private_Extension_Declaration): Set defualt SSO
6302 (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
6303 (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
6304 ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
6305 (Record_Type_Declaration): ditto
6306 * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
6308 * sem_prag.adb (Analyze_Pragma, case
6309 Default_Scalar_Storage_Order): Set Default_SSO
6311 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6313 * sem_ch6.adb (Valid_Operator_Definition): Verify that
6314 all parameter have mode IN. This check must be done here for
6315 subprogram instantiations that have operator names, because their
6316 analysis does not follow the same path as that for subprogram
6319 2014-07-29 Robert Dewar <dewar@adacore.com>
6321 * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
6322 to make sure that the Etype of a component of the corresponding
6323 record type is present before trying to freeze it.
6324 * sem_ch5.adb: Minor reformatting.
6326 2014-07-29 Robert Dewar <dewar@adacore.com>
6328 * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
6329 a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
6330 and then use it when a stream operation is used from a library generic
6331 when the restriction (No_Streams) is active.
6333 2014-07-29 Thomas Quinot <quinot@adacore.com>
6335 * projects.texi: Fix minor typo.
6337 2014-07-29 Yannick Moy <moy@adacore.com>
6339 * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
6341 2014-07-29 Arnaud Charlet <charlet@adacore.com>
6343 * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
6346 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6348 * exp_ch7.adb (Find_Last_Init): Add local variable
6349 Deep_Init_Found. Check the statement immediately following the
6350 declaration if [Deep_]Initialization was not found.
6352 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6354 * exp_util.adb (Is_Aliased): It appears that
6355 'reference-d and renamed objects still play some role in Boolean
6356 expression with actions and cannot be finalized immediately.
6358 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6360 * exp_dbug.adb (Qualify_Needed): For debugging purposes,
6361 Loop names are not part of the full qualification of entity names.
6363 2014-07-29 Robert Dewar <dewar@adacore.com>
6365 * einfo.adb (Has_Protected): Test base type.
6366 * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
6367 that we always properly check No_Protected_Type_Allocators.
6369 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6371 * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
6372 loop declarations as well.
6373 * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
6374 to an iterator loop, because it may contain local renaming
6375 declarations that require debugging information.
6377 2014-07-29 Robert Dewar <dewar@adacore.com>
6379 * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
6381 2014-07-29 Robert Dewar <dewar@adacore.com>
6383 * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
6384 (Set_Static_Real_Or_String_Predicate): New procedure
6385 * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
6386 string predicates (Is_Predicate_Static): Handle static string
6388 * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
6389 New procedure (Check_Expression_Against_Static_Predicate):
6390 Deal with static string predicates, now fully implemented
6391 (Eval_Relational_Op): Allow string equality/inequality as static
6392 if not comes from source.
6394 2014-07-29 Robert Dewar <dewar@adacore.com>
6396 * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
6397 einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
6398 sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
6399 handling. Change name of Discrete_Predicate to
6400 Discrete_Static_Predicate, and replace testing of the presence of this
6401 field by testing the flag Has_Static_Expression.
6403 2014-07-29 Robert Dewar <dewar@adacore.com>
6405 * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
6406 * opt.adb: Handle Uneval_Old.
6407 * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
6408 * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
6409 * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
6410 * sem_attr.adb (Uneval_Old_Msg): New procedure.
6411 * sem_ch8.adb (Push_Scope): Save Uneval_Old.
6412 (Pop_Scope): Restore Uneval_Old.
6413 * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
6415 * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
6416 Add entries for Name_Warn, Name_Allow.
6418 2014-07-29 Robert Dewar <dewar@adacore.com>
6420 * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
6421 to Is_OK_Static_Range.
6422 * sem_attr.adb (Eval_Attribute): Make sure we properly flag
6423 static attributes (Eval_Attribute, case Size): Handle size of
6424 zero properly (Eval_Attribute, case Value_Size): Handle size of
6426 * sem_ch13.adb: Minor reformatting.
6427 * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
6428 Is_Static_Range to Is_OK_Static_Range.
6429 * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
6430 wrong in several ways (Is_Static_Range): Moved here from spec
6431 (Is_Static_Subtype): Moved here from spec Change some incorrect
6432 Is_Static_Subtype calls to Is_OK_Static_Subtype.
6433 * sem_eval.ads: Add comments to section on
6434 Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
6435 Add clarifying comments (Is_Static_Range): Moved to body
6436 (Is_Statically_Unevaluated): New function.
6437 * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
6438 Is_Static_Range to Is_OK_Static_Range.
6439 * sinfo.ads: Additional commments for Is_Static_Expression noting
6440 that clients should almost always use Is_OK_Static_Expression
6441 instead. Many other changes throughout front end units to obey
6443 * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
6444 for enumeration literal.
6445 * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
6446 lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
6447 sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
6448 exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
6449 Replace all occurrences of Is_Static_Expression by
6450 Is_OK_Static_Expression.
6452 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6454 * exp_ch4.adb (Process_Transient_Object): Remove constant
6455 In_Cond_Expr, use its initialization expression in place.
6456 * exp_ch7.adb (Process_Declarations): There is no need to check
6457 that a transient object being hooked is controlled as it would
6458 not have been hooked in the first place.
6459 * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
6460 objects are not considered aliased when the related context is
6461 a Boolean expression_with_actions.
6462 (Requires_Cleanup_Actions): There is no need to check that a transient
6463 object being hooked is controlled as it would not have been hooked in
6466 2014-07-29 Robert Dewar <dewar@adacore.com>
6468 * errout.adb: Minor reformatting.
6470 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6472 * exp_ch3.adb (Default_Initialize_Object): Add new variables
6473 Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
6474 not allowed to ensure the symmetrical generation of symbols.
6475 * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
6476 and E_Decl. Add new variables Decl and Dummy. Generate a dummy
6477 temporary when aborts are not allowed to ensure symmertrical
6478 generation of symbols.
6479 * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
6480 Dummy. Generate a dummy temporary when aborts are not allowed
6481 to ensure symmertrical generation of symbols.
6483 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6485 * exp_dbug.adb (Debug_Renaming_Declaration): For an object
6486 renaming, indicate that the renamed entity itself needs debug
6487 information. This is necessary if that entity is a temporary,
6488 e.g. part of the expansion of an explicit dereference in an
6491 2014-07-29 Thomas Quinot <quinot@adacore.com>
6493 * errout.adb (Set_Error_Posted): When propagating flag to
6494 an enclosing named association, also propagate to the parent
6495 of that node, so that named and positional associations are
6496 treated consistently.
6498 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6500 * sem_attr.adb (Resolve_Attribute, case 'Update): Set
6501 Do_Range_Check properly on array component expressions that
6502 have a scalar type. In GNATprove mode, only checks on scalar
6503 components must be marked by the front-end.
6505 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6507 * sem_res.adb (Resolve_Type_Conversion): If the type of the
6508 expression is a limited view, use the non-limited view when
6511 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6513 * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
6514 case statement as coming from a conditional expression.
6515 (Expand_N_If_Expression): Mark the generated if statement as
6516 coming from a conditional expression.
6517 * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
6518 objects found in case statement alternatives when the case
6519 statement is actually a case expression.
6520 (Expand_N_If_Statement):
6521 Do not process controlled objects found in an if statement when
6522 the if statement is actually an if expression.
6523 * sinfo.adb (From_Conditional_Expression): New routine.
6524 (Set_From_Conditional_Expression): New routine.
6525 * sinfo.ads Add new semantic flag From_Conditional_Expression and
6526 update related nodes.
6527 (From_Conditional_Expression): New routine along with pragma Inline.
6528 (Set_From_Conditional_Expression): New routine along with pragma Inline.
6530 2014-07-29 Hristian Kirtchev <kirtchev@adacore.com>
6532 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
6533 formal parameter Obj_Id and update the comment on usage. Renamed
6534 Obj_Typ to Func_Typ and update all occurrences.
6535 (Find_Last_Init): Remove formal parameter Decl and update the comment
6537 Remove local constants Obj_Id and Obj_Typ. Remove local variables
6538 Init_Typ and Is_Conc. Remove the extraction of the initialization type.
6539 (Find_Last_Init_In_Block): Remove formal parameter
6540 Init_Typ and update the comment on usage.
6541 (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
6542 on usage. Check whether the procedure call is an initialization
6543 procedure of either the object type or the initialization type.
6544 (Is_Init_Proc_Of): New routine.
6545 (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
6546 routine. Add new variable Init_Typ. Add circuitry to extract the object
6547 type as well as the initialization type.
6549 2014-07-29 Robert Dewar <dewar@adacore.com>
6551 * sem_case.adb: Minor reformatting.
6552 * sem_aux.ads: Minor reformatting.
6554 2014-07-29 Ed Schonberg <schonberg@adacore.com>
6556 * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
6557 pointer on these fields, even though they are semantic, because
6558 subsequent analysis and expansion of action nades may require
6559 exploring the tree, for example to locate a node to be wrapped
6560 when a function with controlled result is called.
6562 2014-07-29 Claire Dross <dross@adacore.com>
6564 * sem_aux.adb (Get_Binary_Nkind): Use case on
6565 Name_Id instead of an intermediate string.
6566 (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
6569 2014-07-29 Sergey Rybin <rybin@adacore.com frybin>
6571 * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
6572 about processing sources with preprocessor directives.
6574 2014-07-24 Martin Liska <mliska@suse.cz>
6576 * gcc-interface/trans.c (finalize_nrv): Adjust function call.
6577 * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
6578 (gnat_write_global_declarations): Likewise.
6580 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
6582 * gnat_rm.texi: Clean up for makeinfo 5.2.
6584 2014-07-19 David Wohlferd <dw@LimeGreenSocks.com>
6586 * gnat_rm.texi (Machine Code Insertions): Clean up.
6588 2014-07-18 Robert Dewar <dewar@adacore.com>
6590 * exp_ch7.adb: Minor reformatting.
6592 2014-07-18 Claire Dross <dross@adacore.com>
6594 * sem_aux.ads (Get_Binary_Nkind): New function that returns
6595 the Node_Kind value of an entity defining a binary operator.
6596 (Get_Unary_Nkind): New function that returns the Node_Kind value
6597 of an entity defining a unary operator.
6599 2014-07-18 Pascal Obry <obry@adacore.com>
6601 * sysdep.c: comment update.
6602 * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
6603 platforms where it is known to be supported.
6605 2014-07-18 Thomas Quinot <quinot@adacore.com>
6607 * sem_dist.adb (Process_Remote_AST_Declaration): Need
6608 to set Fat_Type's Ekind in order to be able to use its
6609 Corresponding_Remote_Type attribute.
6611 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6613 * einfo.adb Last_Aggregate_Assignment is now Node 30.
6614 (Last_Aggregate_Assignment): Include
6615 constants in the assertion. Update the underlying node.
6616 (Set_Last_Aggregate_Assignment): Include constants in the
6617 assertion. Update the underlying node. (Write_Field11_Name):
6618 Remove the entry for Last_Aggregate_Assignment.
6619 (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
6620 * einfo.ads Update the node designation and usage of attribute
6621 Last_Aggregate_Assignment.
6622 * exp_aggr.adb (Expand_Array_Aggregate): Store the last
6623 assignment statement used to initialize a controlled object.
6624 (Late_Expansion): Store the last assignment statement used to
6625 initialize a controlled record or an array of controlled objects.
6626 * exp_ch3.adb (Expand_N_Object_Declaration): Default
6627 initialization of objects is now performed in a separate routine.
6628 (Default_Initialize_Object): New routine.
6629 * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
6630 Obj_Id. Update the comment on usage.
6631 (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
6632 Reimplement the logic. (Find_Last_Init_In_Block): New routine.
6633 (Is_Init_Call): Add formal parameter Init_Typ. Update the
6634 comment on usage. Account for the type init proc when trying
6635 to determine whether a statement is an initialization call.
6636 (Make_Adjust_Call): Rename formal parameter For_Parent to
6637 Skip_Self. Update all occurrences of For_Parent. Account for
6638 non-tagged types. Update the call to Make_Call.
6639 (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
6640 comment on usage. Update all occurrences of For_Parent.
6641 (Make_Final_Call): Rename formal parameter For_Parent to
6642 Skip_Self. Update all occurrences of For_Parent. Account
6643 for non-tagged types. Update the call to Make_Call.
6644 (Process_Object_Declaration): Most variables and constants are
6645 now local to the routine.
6646 * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
6647 For_Parent to Skip_Self. Update the comment on usage.
6648 (Make_Final_Call): Rename formal parameter For_Parent to
6649 Skip_Self. Update the comment on usage.
6651 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6653 * sem_ch9.adb (Analyze_Requeue): The entry being referenced
6654 can be a procedure that is implemented by entry, and have a
6655 formal that is a synchronized interface. It does not have to
6656 be declared as a protected operation.
6658 2014-07-18 Robert Dewar <dewar@adacore.com>
6660 * gnat_rm.texi: Remove mention of obsolete attributes
6661 Max[_Interrupt]_Priority, which have never been implemented
6662 (or at the very least were removed long ago if they ever were
6663 implemented. Add documentation of Max[_Interrupt]_Priority
6664 constants in package System.
6665 * ttypes.ads: Document actual handling of package System,
6666 rather than a historical fantasy version. Remove mention of
6667 non-existent attributes Max[_Interrupt]_Priority.
6669 2014-07-18 Pascal Obry <obry@adacore.com>
6671 * a-witeio.adb (Put): No 16-bit character output when text
6672 translation is disabled.
6673 * i-cstrea.ads: Code clean up.
6675 2014-07-18 Robert Dewar <dewar@adacore.com>
6677 * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
6680 2014-07-18 Arnaud Charlet <charlet@adacore.com>
6682 * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
6684 2014-07-18 Pascal Obry <obry@adacore.com>
6686 * adaint.c: Do not include wchar.h on VxWorks.
6687 * mingw32.h: Remove obsolete definition.
6689 2014-07-18 Pascal Obry <obry@adacore.com>
6691 * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
6692 * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
6693 * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
6694 * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
6696 2014-07-18 Pascal Obry <obry@adacore.com>
6698 * a-textio.adb: Rename Is_Text_File to Text_Encoding.
6699 * a-ztexio.adb: Likewise.
6700 * a-witeio.adb: Likewise.
6701 (Open): Pass file's translation mode to set_text_mode.
6702 * s-ficobl.ads (Content_Encoding): New type.
6703 (Text_Content_Encoding): New subtype.
6704 (AFCB): Rename Is_Text_File to Text_Encoding.
6705 * s-fileio.adb (Open): Handles new text_translation
6706 values. Remove Is_Text_File which is equivalent to Text_Encoding
6707 in Text_Content_Encoding.
6708 * adaint.h (__gnat_set_mode): New routine.
6709 * sysdep.c (__gnat_set_wide_text_mode): Removed.
6710 (__gnat_set_mode): New routine.
6712 2014-07-18 Arnaud Charlet <charlet@adacore.com>
6714 * gcc-interface/decl.c, gcc-interface/trans.c,
6715 gcc-interface/utils.c (Is_Packed_Array_Type): Renamed
6716 Is_Packed_Array_Impl_Type.
6718 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6720 * sem_util.adb: Minor typo correction.
6722 2014-07-18 Ben Brosgol <brosgol@adacore.com>
6724 * gnat_rm.texi: Complete previous change.
6726 2014-07-18 Pascal Obry <obry@adacore.com>
6728 * s-fileio.adb: Minor style fix.
6730 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6732 * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
6733 specification of stream attributes for subtypes that are not
6734 first subtypes, to prevent malformed rep_item chains in the case
6735 of such illegal specifications for discriminated private subtypes.
6736 (Check_Overloaded_Name): Verify that the name is an entity name
6737 before other checks.
6739 2014-07-18 Pascal Obry <obry@adacore.com>
6741 * adaint.c (__gnat_fputwc) Do not disable on cross-build.
6743 2014-07-18 Robert Dewar <dewar@adacore.com>
6745 * sem_prag.adb, sem_attr.adb,
6746 sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
6748 2014-07-18 Pascal Obry <obry@adacore.com>
6750 * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
6751 * initialize.c (__gnat_wide_text_translation_required): Defined here.
6753 2014-07-18 Pascal Obry <obry@adacore.com>
6755 * adaint.c (__gnat_fputwc): New routine.
6756 * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
6758 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6760 * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
6761 (Set_Stores_Attribute_Old_Prefix): New routine.
6762 (Stores_Attribute_Old_Prefix): New routine.
6763 (Write_Entity_Flags):
6764 Output flag Stores_Attribute_Old_Prefix.
6765 * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
6767 (Set_Stores_Attribute_Old_Prefix): New routine
6768 along with pragma Inline.
6769 (Stores_Attribute_Old_Prefix): New
6770 routine along with pragma Inline.
6771 * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
6772 constant which captures the result of attribute 'Old's prefix.
6773 * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
6774 relocated expression which acted as a prefix of attribute 'Old.
6776 2014-07-18 Bob Duff <duff@adacore.com>
6778 * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
6779 null before dispatching to Deallocate_Subpool.
6780 * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
6781 parameter of Default_Subpool_For_Pool to 'in out'.
6782 * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
6783 a message to the raise.
6784 * sem_util.adb: Minor reformatting.
6786 2014-07-18 Robert Dewar <dewar@adacore.com>
6788 * sem_util.adb (Check_Expression_Against_Static_Predicate):
6789 Mark expression as non-static if it fails static predicate check,
6790 and issue additional warning.
6792 2014-07-18 Pascal Obry <obry@adacore.com>
6794 * a-witeio.adb (Put): Control translation based on
6795 wide_text_translation_required.
6796 * adaint.c (CurrentCCSEncoding): New variable.
6797 * initialize.c (__gnat_initialize): On Windows initialize
6798 CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
6799 environment variable.
6800 * mingw32.h (CurrentCCSEncoding): New external.
6801 (__gnat_wide_text_translation_required): Likewise.
6802 * sysdep.c (wide_text_translation_required): New variable.
6803 (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
6805 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6807 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
6808 variable Refined_States. Add global variable Matched_Items.
6809 (Check_Dependency_Clause): Account for dependency
6810 clauses utilizing states with visible null refinements.
6811 (Is_Null_Refined_State): New routine.
6812 (Match_Items): Record each successfully matched item of pragma Depends.
6813 (Record_Item): New routine.
6815 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6817 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6818 Do_Range_Check flag on a dynamic index expression used in a
6819 component association in the argument of Update.
6821 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6823 * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
6825 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6827 * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
6828 of enclosing blocks, loops and the enclosing function using a
6829 parent-based traversal.
6830 * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
6831 stack reclamation if the iterator loop contains a return statement
6832 that uses the stack.
6833 * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
6834 patch up the scope stack as the secondary stack management now
6835 takes into account the enclosing function of the iterator loop.
6837 2014-07-18 Robert Dewar <dewar@adacore.com>
6839 * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
6841 2014-07-18 Robert Dewar <dewar@adacore.com>
6843 * einfo.adb (Has_Static_Predicate): New function.
6844 (Set_Has_Static_Predicate): New procedure.
6845 * einfo.ads (Has_Static_Predicate): New flag.
6846 * sem_ch13.adb (Is_Predicate_Static): New function
6847 (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
6848 (Add_Call): Minor change in Sloc of generated expression
6849 (Add_Predicates): Remove setting of Static_Pred, no longer used.
6850 * sem_ch4.adb (Has_Static_Predicate): Removed this function,
6851 replace by use of the entity flag Has_Static_Predicate_Aspect.
6852 * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
6853 and issue warning that predicate is not checked for now.
6854 * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
6856 * sem_util.adb (Check_Expression_Against_Static_Predicate):
6857 Carry out check for any case where there is a static predicate,
6858 and output appropriate message.
6859 * sinfo.ads: Minor comment corrections.
6861 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6863 * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
6864 from an untagged private type whose full view is tagged, the type
6865 is marked tagged for layout reasons, but it has no dispatch table,
6866 so Set_All_DT_Position must not be called.
6867 * exp_ch13.adb: If the freeze node is for a type internal to a
6868 record declaration, as is the case for a class-wide subtype
6869 of a parent component, the relevant scope is the scope of the
6872 2014-07-18 Thomas Quinot <quinot@adacore.com>
6874 * g-memdum.adb, g-memdum.ads: Code clean ups.
6876 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6878 * sem_prag.adb (Check_Dependency_Clause):
6879 Update the comment on usage. Reimplement the mechanism which
6880 attempts to match a single clause of Depends against one or
6881 more clauses of Refined_Depends.
6882 (Input_Match): Removed.
6883 (Inputs_Match): Removed.
6884 (Is_Self_Referential): Removed.
6885 (Normalize_Clause): Update the call to Split_Multiple_Outputs.
6886 (Normalize_Outputs): Rename variable Split to New_Claue and update
6887 all its occurrences.
6888 (Report_Extra_Clauses): Update the comment on usage.
6889 (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
6891 2014-07-18 Gary Dismukes <dismukes@adacore.com>
6893 * i-cstrea.ads: Minor reformatting.
6895 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
6897 * exp_util.adb (Wrap_Statements_In_Block): Propagate both
6898 secondary stack-related flags to the generated block.
6899 * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
6900 once the loop is relocated in a block.
6902 2014-07-18 Robert Dewar <dewar@adacore.com>
6904 * repinfo.ads: Add documentation on handling of back annotation
6907 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6909 * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
6910 of full type declaration, denotes previous declaration for
6911 incomplete view of the type.
6912 * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
6913 of declaration if one is present.
6914 (Replace_Type): When constructing the signature of an inherited
6915 operation, handle properly the case where the operation has a
6916 formal whose type is an incomplete view.
6917 * sem_util.adb (Collect_Primitive_Operations): Handle properly
6918 the case of an operation declared after an incomplete declaration
6919 for a type T and before the full declaration of T.
6921 2014-07-18 Pascal Obry <obry@adacore.com>
6923 * i-cstrea.ads: Add documentation for set_wide_text_mode.
6925 2014-07-18 Robert Dewar <dewar@adacore.com>
6927 * a-witeio.adb: Minor code reorganization.
6928 * i-cstrea.ads: Add comment.
6930 2014-07-18 Thomas Quinot <quinot@adacore.com>
6932 * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
6935 2014-07-18 Robert Dewar <dewar@adacore.com>
6937 * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
6939 2014-07-18 Pascal Obry <obry@adacore.com>
6941 * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
6942 * a-witeio.adb (Put): On platforms where there is translation
6943 done by the OS output the raw text.
6944 (New_Line): Use Put above to properly handle the LM wide characters.
6946 2014-07-18 Thomas Quinot <quinot@adacore.com>
6948 * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
6949 to Absolute_Address.
6951 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
6953 * opt.ads (Suppress_Back_Annotation): Remove as unused.
6954 * fe.h (Back_Annotate_Rep_Info): Likewise.
6955 (Global_Discard_Names): Likewise.
6957 2014-07-18 Robert Dewar <dewar@adacore.com>
6959 * sem_ch13.adb (Is_Type_Ref): Check that type name is not
6962 2014-07-18 Vincent Celier <celier@adacore.com>
6964 * s-osinte-vms.ads: Fix style errors.
6966 2014-07-18 Thomas Quinot <quinot@adacore.com>
6968 * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
6969 NAME_MAX and PATH_MAX.
6971 2014-07-18 Bob Duff <duff@adacore.com>
6973 * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
6974 Build_Record_Or_Elementary_Output_Procedure): For Input and
6975 Output attributes, do not read/write the discriminants if they
6976 have default values; that will be done by Read/Write.
6978 2014-07-18 Robert Dewar <dewar@adacore.com>
6980 * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
6981 exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
6982 checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
6983 exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
6984 sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
6986 2014-07-18 Robert Dewar <dewar@adacore.com>
6988 * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
6990 2014-07-18 Vincent Celier <celier@adacore.com>
6992 * lib-writ.ads: Update documentation about the D lines.
6994 2014-07-18 Ed Schonberg <schonberg@adacore.com>
6996 * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
6997 as a parameter, rather than its Chars field, in order to locate
6998 freeze node of type. If the predicate or invariant has references
6999 to types other than the one to which the contract applies, these
7000 types must be frozen, and the corresponding predicate functions
7001 created, before that freeze node.
7003 2014-07-18 Robert Dewar <dewar@adacore.com>
7005 * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
7006 * par_sco.adb: Minor reformatting.
7008 2014-07-18 Gary Dismukes <dismukes@adacore.com>
7010 * exp_ch4.adb (Real_Range_Check): Turn off
7011 the Do_Range_Check flag on the conversion's current Expression
7012 argument rather than on the originally captured Operand node,
7013 as Expression may reflect a rewriting (as in conversions to a
7016 2014-07-18 Vincent Celier <celier@adacore.com>
7018 * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
7020 * ali.ads (Sdep_Record): New component Unit_Name.
7021 * lib-writ.adb (Write_ALI): Write the unit name in D lines.
7022 * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
7023 dependent unit is in a project and the source file name is not
7026 2014-07-18 Bob Duff <duff@adacore.com>
7028 * s-addima.ads: Minor: add comment.
7030 2014-07-18 Thomas Quinot <quinot@adacore.com>
7032 * freeze.adb (Check_Component_Storage_Order): Fix enforcement
7033 of nesting rules for composites with different SSOs.
7035 2014-07-18 Thomas Quinot <quinot@adacore.com>
7037 * par_sco.adb (Is_Logical_Operator): An If_Expression is not
7038 a proper logical operator.
7039 (Has_Decision): An If_Expression indicates the presence of a decision
7040 although it is not a logical operator.
7042 2014-07-18 Robert Dewar <dewar@adacore.com>
7044 * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
7045 * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
7047 2014-07-18 Eric Botcazou <ebotcazou@adacore.com>
7049 * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
7050 on the null statement.
7052 2014-07-18 Thomas Quinot <quinot@adacore.com>
7054 * adaint.c: Minor comment rewording.
7055 * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
7056 use of errno in this file is thread safe.
7058 2014-07-18 Arnaud Charlet <charlet@adacore.com>
7060 * gnat_ugn.texi: Doc clarification.
7061 * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
7062 * sem_ch13.ads: Minor comment update.
7064 2014-07-18 Robert Dewar <dewar@adacore.com>
7066 * repinfo.ads: Minor comment fix.
7068 2014-07-18 Robert Dewar <dewar@adacore.com>
7070 * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
7071 * sem_prag.adb: Add dummy implementation of
7072 Default_Scalar_Storage_Order.
7073 * snames.ads-tmpl: Add dummy entry for
7074 Default_Scalar_Storage_Order pragma.
7076 2014-07-18 Robert Dewar <dewar@adacore.com>
7078 * opt.adb (Tree_Read): Read Address_Is_Private,
7079 Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
7080 (Tree_Write): Corresponding writes
7081 * opt.ads: Minor comment reformatting and fixes.
7082 * tree_io.ads: Increment ASIS_Version_Number.
7084 2014-07-18 Robert Dewar <dewar@adacore.com>
7086 * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
7087 * types.h: Fix typo.
7089 2014-07-18 Robert Dewar <dewar@adacore.com>
7091 * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
7093 * gnat_ugn.texi: Document that -gnatI removes rep clauses from
7095 * sem_ch13.adb (Kill_Rep_Clause): New procedure
7096 (Analyze_Attribute_Definition_Clause): Use
7097 Kill_Rep_Clause. This is just a cleanup, no functional effect.
7098 (Analyze_Enumeration_Representation_Clause):
7099 Use Kill_Rep_Clause. This means that enum rep
7100 clauses are now properly removed from -gnatct trees.
7101 (Analyze_Record_Representation_Clause): Same change.
7102 * sem_ch13.ads (Kill_Rep_Clause): New procedure.
7104 2014-07-18 Pascal Obry <obry@adacore.com>
7106 * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
7107 OS_Time from time parts.
7108 * adaint.h, adaint.c (__gnat_to_os_time): New routine.
7110 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7112 * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
7113 indexing over containers that are derived types: check whether
7114 signature of found operation has the correct first parameter
7115 before retrieving directly a primitive operation.
7117 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7119 * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7120 Do_Range_Check flag on dynamic bounds of a range used in a
7121 component association in the argument of Update.
7123 2014-07-18 Thomas Quinot <quinot@adacore.com>
7125 * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
7126 accesses to errno(3) to be thread safe.
7128 2014-07-18 Vincent Celier <celier@adacore.com>
7130 * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
7131 limited imported project that is an extending project, return
7132 a project being extended if it has the expected name.
7134 2014-07-18 Pascal Obry <obry@adacore.com>
7136 * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
7137 routine to set the last modification time stamp for the given file.
7138 * gnatchop.adb (File_Time_Stamp): Removed.
7140 Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
7142 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7144 * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
7145 * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
7146 Moved here, so it can be shared with the resolution of 'Update,
7147 whose argument shares some features with aggregates.
7148 * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
7149 Aggregate_Constraint_Checks with the expression of each
7150 association, so that the Do_Range_Check flag is set when needed.
7152 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7154 * sem_ch4.adb (Try_Container_Indexing): If the container
7155 type is a derived type, the value of the inherited aspect is
7156 the Reference operation declared for the parent type. However,
7157 Reference is also a primitive operation of the new type, and
7158 the inherited operation has a different signature. We retrieve
7159 the right one from the list of primitive operations of the
7162 2014-07-18 Vincent Celier <celier@adacore.com>
7164 * debug.adb: Update comment.
7166 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7168 * exp_util.adb (Needs_Finalization): There is no reason why a
7169 C type should not benefit from finalization actions.
7171 2014-07-18 Thomas Quinot <quinot@adacore.com>
7173 * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
7174 (FILENAME_MAX): Remove unneeded definition.
7176 2014-07-18 Robert Dewar <dewar@adacore.com>
7178 * exp_attr.adb, debug.adb: Update comments.
7180 2014-07-18 Vincent Celier <celier@adacore.com>
7182 * par-ch4.adb (Simple_Expression): Add missing style check
7183 for binary adding operators.
7184 (Term): Add missing style check for multiplying operators.
7186 2014-07-18 Robert Dewar <dewar@adacore.com>
7188 * impunit.adb: Minor comment correction.
7189 * widechar.adb, s-wchcon.ads: Minor comment corrections.
7191 2014-07-18 Robert Dewar <dewar@adacore.com>
7193 * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
7194 for Build_Static_Predicate (Build_Predicate_Functions):
7195 Don't try to build discrete predicate for real type.
7196 (Build_Predicate_Functions): Report attempt to use
7197 Static_Predicate function on real type as unimplemented.
7198 * sem_util.adb (Check_Expression_Against_Static_Predicate):
7199 Add guard to prevent blow up on predicate for real type.
7201 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7203 * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
7204 properly static predicate on enumeration types and modular types
7207 2014-07-18 Pierre-Marie Derodat <derodat@adacore.com>
7209 * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
7210 the corresponding source file index.
7211 * get_scos.ads (Get_SCOs): Add a default value for it.
7212 * par_sco.adb (SCO_Record): Fill the corresponding value.
7215 2014-07-18 Vincent Celier <celier@adacore.com>
7217 * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
7218 urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
7220 * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
7222 2014-07-18 Thomas Quinot <quinot@adacore.com>
7224 * g-sercom.ads (Set): document possible data loss.
7226 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7228 * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
7229 Output, Read, Write): If the restriction No_Streams is active,
7230 replace each occurrence of a stream attribute by an explicit
7233 2014-07-18 Robert Dewar <dewar@adacore.com>
7235 * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
7238 2014-07-18 Robert Dewar <dewar@adacore.com>
7240 * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
7242 (Set_Has_Out_Or_In_Out_Parameter): New procedure.
7243 * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
7244 * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
7245 with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
7247 2014-07-18 Robert Dewar <dewar@adacore.com>
7249 * bcheck.adb (Check_Consistent_Restrictions):
7250 Remove obsolete code checking for violation of
7251 No_Standard_Allocators_After_Elaboration (main program)
7252 * bindgen.adb (Gen_Adainit): Handle
7253 No_Standard_Allocators_After_Elaboration
7254 (Gen_Output_File_Ada): ditto.
7255 * exp_ch4.adb (Expand_N_Allocator): Handle
7256 No_Standard_Allocators_After_Elaboration.
7257 * Makefile.rtl: Add entry for s-elaall
7258 * rtsfind.ads: Add entry for Check_Standard_Allocator.
7259 * s-elaall.ads, s-elaall.adb: New files.
7260 * sem_ch4.adb (Analyze_Allocator): Handle
7261 No_Standard_Allocators_After_Elaboration.
7263 2014-07-18 Robert Dewar <dewar@adacore.com>
7265 * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
7266 ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
7267 Remove AB parameter from ali files and all uses.
7268 Remove Allocator_In_Body and all uses.
7270 2014-07-18 Robert Dewar <dewar@adacore.com>
7272 * g-expect-vms.adb: Add comment.
7274 2014-07-18 Thomas Quinot <quinot@adacore.com>
7276 * par_sco.adb (Is_Logical_Operation): return True for
7279 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7281 * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
7282 analysis and resolution of each choice in the associations within
7283 the argument of Update, because they may be variable names.
7285 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7287 * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
7288 actions before the generated if statement.
7290 2014-07-18 Hristian Kirtchev <kirtchev@adacore.com>
7292 * gnat_ugn.texi Enhance the documentation of
7293 switches -gnateA and -gnateV.
7295 2014-07-18 Ed Schonberg <schonberg@adacore.com>
7297 * sem_util.adb (Build_Default_Subtype): Add missing condition
7298 so that code matches description: use the full view of the base
7299 only if the base is private and the subtype is not.
7301 2014-07-17 Gary Dismukes <dismukes@adacore.com>
7303 * exp_disp.adb: Minor reformatting.
7304 * exp_disp.adb: Minor code reorganization.
7306 2014-07-17 Thomas Quinot <quinot@adacore.com>
7308 * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
7309 require an explicit SSO attribute definition clause on a composite type
7310 just because one of its components has one.
7312 2014-07-17 Robert Dewar <dewar@adacore.com>
7314 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
7315 attribute out of existence if the enclosing pragma is ignored.
7316 * sem_util.adb: Minor reformatting.
7318 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7320 * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
7321 array aggregate expanded into assignments when it appears as a
7322 local declaration in an inlined body.
7324 2014-07-17 Doug Rupp <rupp@adacore.com>
7326 * init.c [__ANDROID__]: Modify for ZCX.
7327 * exp_aggr.adb: Minor reformatting
7328 * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
7330 2014-07-17 Robert Dewar <dewar@adacore.com>
7332 * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
7333 exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
7334 scng.adb: Remove incorrect usage "allow to" and "allows to".
7336 2014-07-17 Robert Dewar <dewar@adacore.com>
7338 * exp_dist.adb: Minor reformatting.
7340 2014-07-17 Bob Duff <duff@adacore.com>
7342 * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
7344 2014-07-17 Robert Dewar <dewar@adacore.com>
7346 * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
7347 (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
7349 2014-07-17 Thomas Quinot <quinot@adacore.com>
7351 * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
7352 non-bit-packed array, propagate Reverse_Storage_Order to the
7355 2014-07-17 Javier Miranda <miranda@adacore.com>
7357 * exp_disp.adb: Fix comment.
7358 * exp_pakd.adb: Minor reformatting.
7360 2014-07-17 Robert Dewar <dewar@adacore.com>
7362 * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
7363 entity if none exists (Gen_Elab_Calls): Complain if clash with
7364 No_Multiple_Elaboration.
7365 * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
7366 * sem_util.adb (Build_Elaboration_Entity): Skip building entity
7368 * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
7369 * sem_ch4.adb: Minor comment updates.
7371 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7373 * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
7374 of function call for later use when shared passive objects
7377 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7379 * par-ch13.adb (Get_Aspect_Specifications):
7380 Catch a case where the argument of SPARK aspect Refined_State
7381 is not properly parenthesized.
7383 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7385 * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
7386 the lifetime of a reference to an Ada 2012 container element.
7387 (Is_Element_Reference): New routine.
7389 2014-07-17 Robert Dewar <dewar@adacore.com>
7391 * ali.ads: Minor comment fix.
7392 * lib-writ.adb: Minor reformatting.
7394 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7396 * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
7397 in ASIS mode, load another subunit only if it a subunit of the
7398 current one, not a sibling that has been reached through the
7399 analysis of an ancestor. This allows the construction of the
7400 ASIS tree for the subunit even when sibling subunits have errors.
7402 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7404 * sem_ch3.adb (Analyze_Declarations): Remove the guard which
7405 prevents the analysis of various contracts when the associated
7406 construct is erroneous.
7407 * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
7408 SPARK_Pragma of an illegal or a partially decorated construct.
7410 2014-07-17 Robert Dewar <dewar@adacore.com>
7412 * s-imguns.ads: Minor reformatting.
7414 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7416 * exp_ch7.adb (Build_Finalization_Master): Move all local
7417 variables to the proper code section. When looking for an existing
7418 finalization master, inspect the ultimate ancestor type of the
7420 * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
7422 2014-07-17 Robert Dewar <dewar@adacore.com>
7424 * aspects.ads, aspects.adb: Add entries for aspect Annotate.
7425 * gnat_rm.texi: Document Entity argument for pragma Annotate and
7427 * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
7428 for Annotate aspect.
7429 * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
7430 Entity argument at end.
7431 * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
7433 2014-07-17 Tristan Gingold <gingold@adacore.com>
7435 * s-imguns.ads: Fix minor typo.
7437 2014-07-17 Thomas Quinot <quinot@adacore.com>
7439 * sprint.adb: Minor reformatting.
7441 2014-07-17 Robert Dewar <dewar@adacore.com>
7443 * sprint.adb (Write_Itype): Print proper header for string
7446 2014-07-17 Steve Baird <baird@adacore.com>
7448 * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
7450 2014-07-17 Vincent Celier <celier@adacore.com>
7452 * gnatbind.adb: Change in message "try ... for more information".
7454 2014-07-17 Robert Dewar <dewar@adacore.com>
7456 * sprint.adb: Code clean up.
7458 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7460 * exp_ch7.adb (Find_Last_Init): Relocate local variables to
7461 the relevant code section. Add new local constant Obj_Id. When
7462 a limited controlled object is initialized by a function call,
7463 the build-in-place object access function call acts as the last
7464 initialization statement.
7465 * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
7466 (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
7467 * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
7469 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7471 * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
7472 propagate intrinsic flag to renamed entity, to allow e.g. renaming
7473 of Unchecked_Conversion.
7474 * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
7475 if the declaration has errors.
7477 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7479 * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
7480 container is busy before checking whether capacity allows for
7481 a further insertion. Insertion in a busy container that is full
7482 raises Program_Error rather than Capacity_Error. Previous to that
7483 patch which exception was raised varied among container types.
7485 2014-07-17 Robert Dewar <dewar@adacore.com>
7487 * g-comlin.ads, g-comlin.adb: Minor clean up.
7489 2014-07-17 Bob Duff <duff@adacore.com>
7491 * gnat_ugn.texi: Update gnatpp doc.
7493 2014-07-17 Robert Dewar <dewar@adacore.com>
7495 * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
7496 * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
7497 could do this by actually expanding a real generic.
7498 * a-tags.ads: Add comments about performance.
7499 * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
7500 Print Etype of defining identifier, rather than the object
7501 definition. More information.
7503 2014-07-17 Thomas Quinot <quinot@adacore.com>
7505 * exp_dist.adb: Minor documentation clarification.
7507 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7509 * exp_util.adb (Is_Aliased): Revert previous change.
7511 2014-07-17 Vincent Celier <celier@adacore.com>
7513 * g-comlin.adb (Try_Help): New procedure.
7514 (Getopt): Use new procedure Try_Help.
7515 * g-comlin.ads (Try_Help): New procedure.
7517 2014-07-17 Bob Duff <duff@adacore.com>
7519 * gnat_ugn.texi: Minor update.
7521 2014-07-17 Robert Dewar <dewar@adacore.com>
7523 * gnat_rm.texi: Improve documentation of Unrestricted_Access.
7524 * sinfo.ads: Document restriction on aggregates (must expand to
7525 assignments if one or more assignments needs expansion, e.g. for
7527 * sem_ch13.adb: All warning messages regarding bit order should
7529 * gnat_ugn.texi: Minor correction of missing @ on @code
7531 2014-07-17 Robert Dewar <dewar@adacore.com>
7533 * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
7534 * s-rident.ads (Partition_Boolean_Restrictions): Add
7535 No_Long_Long_Integer.
7536 * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
7537 Long_Integer'Size if restriction No_Long_Long_Integer is active.
7538 (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
7539 as the implicit base type for a signed integer type declaration
7540 if restriction No_Long_Long_Integer is active.
7541 * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
7542 No_Long_Long_Integer.
7544 2014-07-17 Robert Dewar <dewar@adacore.com>
7546 * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
7547 einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
7548 repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
7549 sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
7550 treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
7552 2014-07-17 Robert Dewar <dewar@adacore.com>
7554 * debug.adb: Remove -gnatdQ.
7555 * exp_disp.adb: Remove -gnatdQ.
7556 * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
7557 a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
7558 rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
7559 a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
7560 sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
7561 a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
7563 2014-07-17 Robert Dewar <dewar@adacore.com>
7565 * back_end.adb: Minor reformatting and comment additions.
7566 * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
7568 * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
7569 (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
7570 * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
7571 * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
7572 * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
7573 * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
7575 2014-07-17 Robert Dewar <dewar@adacore.com>
7577 * gnat_rm.texi: Minor comment updates.
7579 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7581 * sem_util.adb (Make_Explicit_Dereference): If the expression
7582 being dereferenced is a generalized indexing, reset the overloaded
7583 flag on the generalized indexing call, consistent with the
7584 resetting of the flag on the original indexed component.
7586 2014-07-17 Robert Dewar <dewar@adacore.com>
7588 * gnat_ugn.texi: Document advise not to mix -gnatV? and
7591 2014-07-17 Robert Dewar <dewar@adacore.com>
7593 * checks.adb (Insert_Valid_Check): Don't insist on a name
7594 for the prefix when we make calls to Force_Evaluation and
7595 Duplicate_Subexpr_No_Checks.
7596 * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
7597 (Remove_Side_Effects): Handle all volatile references right
7598 (Side_Effect_Free): Volatile reference is never side effect free
7599 * sinfo.ads (N_Attribute_Reference): Add comments explaining
7600 that in the tree, the prefix can be a general expression.
7602 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7604 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7605 Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
7606 * sem_ch7.adb (Analyze_Package_Body_Contract,
7607 Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
7609 2014-07-17 Robert Dewar <dewar@adacore.com>
7611 * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
7612 Store_After_Actions_In_Scope.
7614 2014-07-17 Robert Dewar <dewar@adacore.com>
7616 * sem_aux.ads: Minor comment addition.
7618 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7620 * sem_res.adb (Make_Call_Into_Operator): If the call is already
7621 a rewriting of an operator node, there are no actuals to be
7622 propagated from original node to rewritten node when in ASIS mode.
7624 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7626 * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7627 Analyze_Subprogram_Contract): Add new local variable Mode. Save
7628 and restore the SPARK mode of the related construct in a
7630 * sem_ch7.adb (Analyze_Package_Body_Contract,
7631 Analyze_Package_Contract): Add new local variable Mode. Save and
7632 restore the SPARK mode of the related construct in a stack-like fashion.
7633 * sem_util.adb Remove with and use clause for Opt.
7634 (Restore_SPARK_Mode): New routine.
7635 (Save_SPARK_Mode_And_Set): New routine.
7636 * sem_util.ads Add with and use clause for Opt.
7637 (Restore_SPARK_Mode): New routine.
7638 (Save_SPARK_Mode_And_Set): New routine.
7640 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7642 * exp_util.adb (Is_Aliased): Transient objects
7643 within an expression with actions cannot be considered aliased.
7645 2014-07-17 Thomas Quinot <quinot@adacore.com>
7647 * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
7648 introduce a new list (cleanup actions) for each (transient) scope.
7649 * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
7651 * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
7652 * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
7653 processing for Store_xxx_Actions_In_Scope.
7654 (Build_Cleanup_Statements): Allow for a list of additional
7655 cleanup statements to be passed by the caller.
7656 (Expand_Cleanup_Actions): Take custom cleanup actions associated
7657 with an N_Block_Statement into account.
7658 (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
7659 reorganization (refactoring only, no behaviour change).
7660 (Make_Transient_Block): Add assertion to ensure that the current
7661 scope is indeed a block (namely, the entity for the transient
7662 block being constructed syntactically, which has already been
7663 established as a scope). If cleanup actions are present in the
7664 transient scope, transfer them now to the transient block.
7665 * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
7666 called function while it is still present as the name in a call
7667 in the tree. This may not be the case later on if the call is
7668 rewritten into a transient block.
7669 * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
7670 inserted after calling a protected operation on a shared passive
7671 protected must be performed in a block finalizer, not just
7672 inserted in the tree, so that they are executed even in case of
7673 a normal (RETURN) or abnormal (exception) transfer of control
7674 outside of the current scope.
7675 * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
7676 * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
7677 Scope_Stack_Entry reorganization.
7679 2014-07-17 Thomas Quinot <quinot@adacore.com>
7681 * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
7682 call for types that do not have an explicit attribute definition
7683 clause for External_Tag, as their default tag may clash with an
7684 explicit tag defined for some other type.
7686 2014-07-17 Hristian Kirtchev <kirtchev@adacore.com>
7688 * exp_util.adb (Is_Controlled_Function_Call): Recognize a
7689 controlled function call with multiple actual parameters that
7690 appears in Object.Operation form.
7692 2014-07-17 Thomas Quinot <quinot@adacore.com>
7694 * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
7696 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7697 External_Tag): No need to set entity flag.
7698 * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
7699 Reimplement correctly in terms of Has_Rep_Item.
7701 2014-07-17 Thomas Quinot <quinot@adacore.com>
7703 * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
7704 Start examining the tree at the node passed to
7705 Establish_Transient_Scope (not its parent).
7706 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7707 The access type for the variable storing the reference to
7708 the call must be declared and frozen prior to establishing a
7710 * exp_ch9.adb: Minor reformatting.
7712 2014-07-17 Pascal Obry <obry@adacore.com>
7714 * s-os_lib.ads: Minor comment update.
7716 2014-07-17 Tristan Gingold <gingold@adacore.com>
7718 * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings. Fix some
7720 * socket.c: Remove #warning to avoid warning.
7721 * expect.c: Indent some preprocessor directives to clarify
7722 nested if. Do not use wait.h on PikeOS. Add ATTRIBUTE_UNUSED
7724 * env.c: Fix indentation. Port to PikeOS.
7725 * gsocket.h: Port to PikeOS. Remove #warning.
7726 * terminals.c: Port to PikeOS. Fix indentation of the stubs.
7727 Add ATTRIBUTE_UNUSED to stubs arguments. Fix return statement
7728 of stubbed __gnat_setup_parent_communication.
7729 * adaint.c: Port to PikeOS. Reindent some preprocessor
7730 directives to clarify nested if. Fix indentation. Add missing
7733 2014-07-17 Robert Dewar <dewar@adacore.com>
7735 * sem_attr.adb: Minor reformatting.
7737 2014-07-17 Robert Dewar <dewar@adacore.com>
7739 * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
7741 2014-07-17 Ed Schonberg <schonberg@adacore.com>
7743 * sem_case.adb (Check_Choice_Set): If the case expression is the
7744 expression in a predicate, do not recheck coverage against itself,
7745 to prevent spurious errors.
7746 * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
7747 expression comes from an aspect specification, to prevent spurious
7748 errors when expression is a case expression in a predicate.
7750 2014-07-17 Pascal Obry <obry@adacore.com>
7752 * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
7753 * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
7755 2014-07-17 Vincent Celier <celier@adacore.com>
7757 * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
7758 gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
7759 the usage for an erroneous invocation of a gnat tool.
7761 2014-07-16 Vincent Celier <celier@adacore.com>
7763 * gnatls.adb: Get the target parameters only if -nostdinc was
7766 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7768 * checks.adb (Insert_Valid_Check): If the expression is a packed
7769 component of a modular type of the right size the data is always
7770 valid. This os particularly useful if the component is part of
7771 a volatile variable.
7773 2014-07-16 Robert Dewar <dewar@adacore.com>
7775 * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
7777 2014-07-16 Thomas Quinot <quinot@adacore.com>
7779 * exp_ch7.ads: Minor documentation fix.
7781 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7783 * sem_ch3.adb (Find_Type_Name): Diagnose properly
7784 a private extension completion that is an interface definition
7785 with an interface list.
7787 2014-07-16 Arnaud Charlet <charlet@adacore.com>
7789 * gnatls.adb (Gnatls): Code clean ups.
7791 2014-07-16 Thomas Quinot <quinot@adacore.com>
7793 * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
7794 * sem.adb (Analyze): Handle N_Compound_Statement.
7795 * sprint.adb (Sprint_Node_Actual): Ditto.
7796 * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
7797 procedure to handle N_Compound_Statement.
7798 * exp_aggr.adb (Collect_Initialization_Statements):
7799 Use a proper compound statement node, instead of a bogus
7800 expression-with-actions with a NULL statement as its expression,
7801 to wrap collected initialization statements.
7802 * freeze.ads, freeze.adb
7803 (Explode_Initialization_Compound_Statement): New public procedure,
7804 lifted from Freeze_Entity.
7805 (Freeze_Entity): When freezing
7806 an object with captured initialization statements and without
7807 delayed freezing, explode compount statement.
7808 * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
7809 case that used to handle bogus EWAs with NULL statement as
7811 * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
7812 delayed freezing and captured initialization statements, explode
7815 2014-07-16 Gary Dismukes <dismukes@adacore.com>
7817 * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
7819 2014-07-16 Doug Rupp <rupp@adacore.com>
7821 * s-interr-hwint.adb: Casing error on parameter.
7823 2014-07-16 Pascal Obry <obry@adacore.com>
7825 * Makefile.rtl: Add g-rewdat.o dependencies in
7826 GNATRTL_NONTASKING_OBJS.
7828 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7830 * sem_case.adb: Code clean up.
7832 2014-07-16 Vincent Celier <celier@adacore.com>
7834 * make.adb: Do not read gnat.adc when gnatmake is invoked
7837 2014-07-16 Pascal Obry <obry@adacore.com>
7839 * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
7840 implementation of GNAT.Rewrite_Data.
7842 2014-07-16 Vincent Celier <celier@adacore.com>
7844 * gnatls.adb (Normalize): New function.
7845 (Gnatls): Get the target parameters. On targets other than VMS,
7846 normalize the path names in the source search path, the object search
7847 path and the project search path.
7849 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7851 * sem_case.adb: Avoid self-checking of case expressions in
7854 2014-07-16 Robert Dewar <dewar@adacore.com>
7856 * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
7859 2014-07-16 Eric Botcazou <ebotcazou@adacore.com>
7861 * switch-b.adb (Scan_Binder_Switches): Add missing guard.
7863 2014-07-16 Ben Brosgol <brosgol@adacore.com>
7865 * gnat_ugn.texi: Fix typo.
7867 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7869 * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
7870 expression if it is the specification of a subtype predicate:
7871 it will be expanded when the return statement is analyzed, or
7872 when a static predicate is transformed into a static expression
7873 for evaluation by the front-end.
7874 * sem_ch13.adb (Get_RList): If the expression for a static
7875 predicate is a case expression, extract the alternatives of the
7876 branches with a True value to create the required statically
7877 evaluable expression.
7879 2014-07-16 Thomas Quinot <quinot@adacore.com>
7881 * exp_prag.adb (Expand_Pragma_Check): Use the location of the
7882 expression, not the location of the aspect, for all generated
7883 code, so that in particular the call to raise_assert_failure
7884 gets the sloc of the associated condition.
7886 (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
7887 Set an explicit End_Label on the handled sequence of statements
7888 for the _Postconditions procedure so that the implicit return
7889 statement does not erroneously get associated with code generated
7890 for the last condition in postconditions.
7892 2014-07-16 Thomas Quinot <quinot@adacore.com>
7894 * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
7895 not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
7896 * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
7899 2014-07-16 Robert Dewar <dewar@adacore.com>
7901 * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
7902 Minor code reorganization (use Is_Access_Type, not in Access_Kind).
7903 * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
7905 * par-ch4.adb (At_Start_Of_Attribute): New function
7906 (P_Simple_Expression): Better msg for bad attribute prefix.
7907 * scans.ads: Minor reformatting.
7909 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7911 * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
7912 static constant, check that in belongs to the corresponding index
7913 subtype, to produce the proer warning when expansion is disabled.
7915 2014-07-16 Robert Dewar <dewar@adacore.com>
7917 * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
7918 * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
7919 * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
7920 * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
7921 * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
7923 * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
7924 * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
7927 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
7929 * exp_ch7.adb (Process_Declarations): Reinstate the check on
7930 a hook object to ensure that the related transient declaration
7932 * exp_util.adb (Is_Aliased): Do not consider expresison with
7933 actions as a special context.
7934 (Requires_Cleanup_Actions): Reinstate the check on a hook object to
7935 ensure that the related transient declaration is finalizable.
7937 2014-07-16 Robert Dewar <dewar@adacore.com>
7939 * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
7940 * snames.ads-tmpl: Add Allocation_Check to list of check names.
7941 * types.ads: Add Allocation_Check to list of check names.
7943 2014-07-16 Thomas Quinot <quinot@adacore.com>
7945 * sem_util.adb (Enter_Name): replace bogus test for presence of
7946 Corresponding_Remote_Type with correct test on Ekind.
7947 * sem_res.adb (Valid_Conversion): ditto; also clarify validity
7948 of calls to Corresponding_ Remote_Type (documentation fix).
7950 2014-07-16 Robert Dewar <dewar@adacore.com>
7952 * gnat_rm.texi: Document illegal case of Unrestricted_Access.
7953 * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
7955 (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
7956 * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
7958 2014-07-16 Robert Dewar <dewar@adacore.com>
7960 * gnat_ugn.texi: Document binder switch -Ra.
7961 * gnatbind.adb (List_Closure_Display): Implement -Ra switch
7963 * opt.ads (List_Closure_All): New switch.
7964 * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
7967 2014-07-16 Ben Brosgol <brosgol@adacore.com>
7969 * gnat_rm.texi: Minor edits, to make case consistent in names
7970 of types and fields.
7972 2014-07-16 Robert Dewar <dewar@adacore.com>
7974 * gnat_rm.texi: Document erroneous mixing of thin pointers and
7976 * gnat_ugn.texi: Add note on size of access types about thin
7977 pointers and the use of attribute Unrestricted_Access.
7979 2014-07-16 Ed Schonberg <schonberg@adacore.com>
7981 * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
7982 * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
7983 * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
7984 machinery to detect tampering on bounded vectors.
7986 2014-07-16 Robert Dewar <dewar@adacore.com>
7988 * gnat_rm.texi: Document that leading/trailing asterisks are
7989 now implied for the pattern match string for pragma Warnings
7990 and Warning_As_Error.
7991 * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
7992 (Analyze_Pragma, case Warning_As_Error): Call
7993 Acquire_Warning_Match_String.
7994 (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
7996 2014-07-16 Bob Duff <duff@adacore.com>
7998 * gnat_ugn.texi: Document need for project file
7999 for --incremental switch for gnat2xml.
8001 2014-07-16 Robert Dewar <dewar@adacore.com>
8003 * gnat_rm.texi: Fix example of non-packable components in packed
8006 2014-07-16 Robert Dewar <dewar@adacore.com>
8008 * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
8009 s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
8010 upper case in exception messages.
8012 2014-07-16 Robert Dewar <dewar@adacore.com>
8014 * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
8015 is renamed Has_Same_Storage.
8016 * gnat_rm.texi: Document missing SPARK pragmas and attributes.
8017 * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
8020 2014-07-16 Robert Dewar <dewar@adacore.com>
8022 * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
8023 a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
8025 2014-07-16 Robert Dewar <dewar@adacore.com>
8027 * gnat_ugn.texi: Add note that integrated
8028 preprocessing cannot be applied to configuration pragma files.
8030 2014-07-16 Yannick Moy <moy@adacore.com>
8032 * sem_attr.adb (Analyze_Attribute/cases Pred
8033 and Succ): Always enable range check on fixed-point types if
8034 not suppressed for the type.
8036 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8038 * sem_util.adb (State_Has_Enabled_Property):
8039 Account for an external property denoted by an others choice.
8041 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8043 * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
8044 * exp_ch7.adb (Process_Declarations): There is no need to check
8045 that a transient object being hooked is controlled as it would
8046 not have been hooked in the first place.
8047 * exp_ch9.adb Remove with and use clause for Exp_Ch4.
8048 * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
8049 (Is_Aliased): A renaming of a transient controlled object is
8050 not considered aliasing when it occurs within an expression
8052 (Requires_Cleanup_Actions): There is no need to
8053 check that a transient object being hooked is controlled as it
8054 would not have been hooked in the first place.
8055 * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
8057 2014-07-16 Hristian Kirtchev <kirtchev@adacore.com>
8059 * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
8060 the outer level of routine Analyze_Aspect_Specifications. Ensure
8061 that the corresponding pragmas of aspects Initial_Condition and
8062 Initializes are inserted after pragma SPARK_Mode.
8064 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8066 * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
8067 properly a choice list with more than one choice, where each
8068 is an aggregate denoting a sequence of array indices for a
8069 multidimentional array. For SPARK use.
8071 2014-07-16 Vadim Godunko <godunko@adacore.com>
8073 * a-coinho-shared.adb (Adjust): Create
8074 copy of internal shared object and element when source container
8077 (Query_Element): Likewise.
8078 (Update_Element): Likewise.
8079 (Constant_Reference): Likewise. Raise Constraint_Error on attempt
8080 to get reference for empty holder.
8081 (Reference): Likewise.
8083 2014-07-16 Thomas Quinot <quinot@adacore.com>
8085 * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
8086 from Process_Transient_Oject.
8087 * exp_ch4.ads: Ditto.
8088 * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
8089 declaration as an action on the topmost enclosing expression,
8090 not on a possibly conditional subexpreession.
8092 2014-07-16 Vadim Godunko <godunko@adacore.com>
8094 * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
8095 Fix parameter mode of Update_Element.
8097 2014-07-16 Robert Dewar <dewar@adacore.com>
8099 * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
8102 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8104 * a-cohase.ads: Type Iterator must be controlled, so that the
8105 tampering bit is properly set through an iteration.
8106 * a-cohase.adb: Add Finalize operation for type Iterator.
8108 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8110 * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
8113 2014-07-16 Ed Schonberg <schonberg@adacore.com>
8115 * a-coinho-shared.adb: Fix spurious accessibility check.
8117 2014-06-15 Jan Hubicka <hubicka@ucw.cz>
8119 * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
8121 2014-06-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
8124 * gnat_rm.texi: Fix errors with makeinfo 5.1.
8126 2014-06-14 Arnaud Charlet <charlet@adacore.com>
8129 * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
8131 2014-06-13 Yannick Moy <moy@adacore.com>
8133 * exp_attr.adb: Fix typo in comment.
8134 * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
8135 checking in GNATprove_Mode.
8137 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8139 * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
8141 2014-06-13 Robert Dewar <dewar@adacore.com>
8143 * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
8146 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8148 * sem_prag.adb (Analyze_Pragma): Add local
8149 variable Missing_Parentheses. Emit an error when a state
8150 declaration with options appears without parentheses. Add a
8151 guard to prevent a bogus error when a state declaration may be
8152 interpreted as an option if a previous declaration with options
8153 was not parenthesized.
8155 2014-06-13 Robert Dewar <dewar@adacore.com>
8157 * checks.adb: Validate_Alignment_Check_Warnings: New procedure
8158 (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
8159 * checks.ads (Alignment_Warnings_Record): New type.
8160 (Alignment_Warnings): New table
8161 (Validate_Alignment_Check_Warnings): New procedure.
8162 * errout.adb (Delete_Warning_And_Continuations): New procedure
8163 (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
8164 Warnings_Treated_As_Errors (Finalize): Minor reformatting
8165 * errout.ads (Warning_Msg): New variable
8166 (Delete_Warning_And_Continuations): New procedure
8167 * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
8168 * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
8170 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8172 * a-coinho.adb, a-coinho.ads: Add Reference machinery.
8174 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8176 * errout.adb (SPARK_Msg_N): New routine.
8177 (SPARK_Msg_NE): New routine.
8178 * errout.ads Add a section on SPARK-related error routines.
8179 (SPARK_Msg_N): New routine.
8180 (SPARK_Msg_NE): New routine.
8181 * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
8182 pragma Abstract_State is always inserted after SPARK_Mode.
8183 (Insert_After_SPARK_Mode): New routine.
8184 * sem_prag.adb (Analyze_Abstract_State,
8185 Analyze_Constituent, Analyze_External_Property,
8186 Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
8187 Analyze_Global_List, Analyze_Initialization_Item,
8188 Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
8189 Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
8190 Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
8191 Analyze_Refined_Global_In_Decl_Part,
8192 Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
8193 Check_Aspect_Specification_Order, Check_Constituent_Usage,
8194 Check_Declaration_Order, Check_Dependency_Clause,
8195 Check_Duplicate_Mode, Check_Duplicate_Option,
8196 Check_Duplicate_Property, Check_External_Properties,
8197 Check_External_Property, Check_Function_Return,
8198 Check_Matching_Constituent, Check_Matching_State,
8199 Check_Mode_Restriction_In_Enclosing_Context,
8200 Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
8201 Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
8202 Has_Extra_Parentheses, Inconsistent_Mode_Error,
8203 Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
8204 Report_Extra_Constituents_In_List, Report_Extra_Inputs,
8205 Report_Unrefined_States, Report_Unused_Constituents,
8206 Report_Unused_States, Role_Error, Usage_Error):
8207 Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
8208 to report semantic errors only when SPARK_Mode is on.
8209 (Analyze_Depends_In_Decl_Part): Do not check the syntax of
8210 pragma Depends explicitly, this is now done by the analysis.
8211 (Analyze_Global_In_Decl_List): Do not check the syntax of
8212 pragma Global explicitly, this is now done by the analysis.
8213 (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
8214 pragma Initializes explicitly, this is now done by the analysis.
8215 (Analyze_Part_Of): Do not check the syntax of the encapsulating
8216 state, this is now done by the analysis.
8217 (Analyze_Pragma): Do
8218 not check the syntax of a state declaration, this is now done
8220 (Analyze_Refined_Depends_In_Decl_Part): Do not
8221 check the syntax of pragma Refined_Depends explicitly, this is now
8222 done by the analysis.
8223 (Analyze_Refined_Global_In_Decl_Part): Do
8224 not check the syntax of pragma Refined_Global explicitly, this is
8225 now done by the analysis.
8226 (Analyze_Refined_State_In_Decl_Part):
8227 Do not check the syntax of pragma Refined_State explicitly, this
8228 is now done by the analysis.
8229 (Check_Dependence_List_Syntax): Removed.
8230 (Check_Global_List_Syntax): Removed.
8231 (Check_Initialization_List_Syntax): Removed.
8232 (Check_Item_Syntax): Removed.
8233 (Check_Missing_Part_Of): Do not consider items from an instance.
8234 (Check_Refinement_List_Syntax): Removed.
8235 (Check_State_Declaration_Syntax): Removed.
8236 (Collect_Global_List): Do not raise Program_Error when the input is
8238 (Process_Global_List): Do not raise Program_Error when the input
8240 * sem_ch13.adb: Minor reformatting.
8242 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8244 * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
8245 that is an interface definition with an interface list.
8246 (Process_Full_View): Move error message on missmatched interfaces
8247 between views to the declaration of full view, for clarity.
8248 * sem_ch9.adb (Check_Interfaces): Move error message to full view,
8251 2014-06-13 Robert Dewar <dewar@adacore.com>
8253 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
8256 2014-06-13 Robert Dewar <dewar@adacore.com>
8258 * makeutl.adb: Minor reformatting.
8260 2014-06-13 Gail Schenker <schenker@adacore.com>
8262 * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
8263 associated flag (d.z), no longer needed.
8265 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8267 * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
8268 Export aspects, do not check whether a corresponding Convention
8269 aspect has been specified. Convention is optional in Ada2012,
8270 and defaults to Convention_Ada.
8272 2014-06-13 Eric Botcazou <ebotcazou@adacore.com>
8274 * checks.adb (Apply_Address_Clause_Check): Only issue the new
8275 warning if the propagation warning is issued.
8277 2014-06-13 Thomas Quinot <quinot@adacore.com>
8279 * exp_ch4.adb: Minor reformatting.
8281 2014-06-13 Robert Dewar <dewar@adacore.com>
8283 * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
8284 Handle float range check case (Expand_N_Attribute_Reference,
8285 case Succ): Handle float range check case.
8286 * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
8289 2014-06-13 Vincent Celier <celier@adacore.com>
8291 * makeutl.ads (Compute_Builder_Switches): Change name of
8292 parameter Root_Environment to Env.
8293 * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
8294 Env parameter of procedure Get_Or_Create_Configuration_File.
8295 (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
8296 of new parameter Env.
8297 * prj-conf.ads (Locate_Runtime): New parameter Env of type
8298 Prj.Tree.Environment.
8300 2014-06-13 Robert Dewar <dewar@adacore.com>
8302 * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
8304 2014-06-13 Robert Dewar <dewar@adacore.com>
8306 * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
8308 * sem_attr.adb: Minor code reformatting and simplification.
8309 * checks.adb: Fix minor typo.
8311 2014-06-13 Emmanuel Briot <briot@adacore.com>
8313 * g-comlin.adb (Get_Argument): fix expansion
8314 of command line arguments (e.g. "*.adb") when using a custom
8315 parser. The parser was not passed to the recursive call, and
8316 thus we were trying to do the expansion on the default command
8319 2014-06-13 Thomas Quinot <quinot@adacore.com>
8321 * exp_ch9.adb: Minor reformatting.
8323 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8325 * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
8326 To determine whether the attribute should be expanded, examine
8327 whether the enclosing postcondition pragma is to be checked,
8328 rather than using the internal flag Assertions_Enabled.
8330 2014-06-13 Ben Brosgol <brosgol@adacore.com>
8332 * gnat_rm.texi: Minor fixes.
8333 * gnat_ugn.texi: Added a missing "@itemize".
8335 2014-06-13 Robert Dewar <dewar@adacore.com>
8337 * debug.adb: Remove -gnatd.1 flag documentation.
8338 * layout.adb (Layout_Type): Remove special handling of size
8339 for anonymous access type.
8340 * sem_ch3.adb (Replace_Type): Remove special handling of size
8341 for anonymous access type.
8343 2014-06-13 Robert Dewar <dewar@adacore.com>
8345 * debug.adb: Document debug flag -gnatd.1.
8346 * layout.adb (Layout_Type): Size change for anonymous access
8347 types under -gnatd.1.
8348 * sem_ch3.adb (Replace_Type): Size change for anonymous access
8349 types under -gnatd.1.
8351 2014-06-13 Robert Dewar <dewar@adacore.com>
8353 * layout.adb (Layout_Type): Anonymous access types designating
8354 unconstrained arrays are always thin pointers.
8355 * sem_ch3.adb (Replace_Type): Anonymous access types designating
8356 unconstrained arrays are always thin pointers.
8358 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8360 * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
8361 to resolve the prefix of an attribute that is an entity name
8362 and may be a parameterless call. Minor code reorganization.
8364 2014-06-13 Robert Dewar <dewar@adacore.com>
8366 * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
8368 * opt.ads (Compiler_Unit): New flag.
8369 * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
8370 for null statement sequence (not allowed in compiler unit).
8371 * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
8373 * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
8375 * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
8376 Check_Compiler_Unit.
8377 * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
8378 Check_Compiler_Unit (this construct is not allowed in compiler
8380 * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
8381 Set Opt.Compiler_Unit.
8383 2014-06-13 Geert Bosch <bosch@adacore.com>
8385 * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
8386 s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
8387 s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
8389 2014-06-13 Robert Dewar <dewar@adacore.com>
8391 * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
8393 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8395 * freeze.adb (Freeze_Entity): Remove the check concerning volatile
8396 types in SPARK as it is poorly placed and poorly formulated. The
8397 check was flagging ALL volatile entities as illegal in SPARK.
8398 * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
8399 types as illegal in SPARK.
8401 2014-06-13 Robert Dewar <dewar@adacore.com>
8403 * sem_cat.adb: Minor reformatting.
8405 2014-06-13 Yannick Moy <moy@adacore.com>
8407 * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
8409 2014-06-13 Arnaud Charlet <charlet@adacore.com>
8411 * gnat_rm.texi: Add detail on SPARK_05 restriction.
8413 2014-06-13 Bob Duff <duff@adacore.com>
8415 * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
8416 Add assertions requiring the secondary stack to be initialized.
8417 * s-solita.ads (Init_Tasking_Soft_Links): Comment.
8418 * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
8419 secondary stack is initialized before calling Init_Tasking_Soft_Links,
8420 by adding pragmas Elaborate_Body.
8422 2014-06-13 Thomas Quinot <quinot@adacore.com>
8424 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
8425 kludge disabling new legality check.
8427 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8429 * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
8431 (Freeze_Type): Volatile types are now illegal in SPARK.
8433 2014-06-13 Robert Dewar <dewar@adacore.com>
8435 * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
8436 * gnat_rm.texi: Document aspect Thread_Local_Storage.
8438 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8440 * sem_cat.adb (Validate_Static_Object_Name): A constant whose
8441 value is a temporary that renames an aggregate is legal in a
8442 preelaborated unit. Illegalities, if any will be detected in
8443 the aggregate components.
8445 2014-06-13 Ed Schonberg <schonberg@adacore.com>
8447 * einfo.ads: Minor reformatting an comment expansion.
8449 2014-06-13 Robert Dewar <dewar@adacore.com>
8451 * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
8453 * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
8455 * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
8456 * sem_warn.adb: Minor reformatting.
8458 2014-06-13 Doug Rupp <rupp@adacore.com>
8460 * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
8463 2014-06-13 Yannick Moy <moy@adacore.com>
8465 * sem_warn.adb (Check_Unset_References): Take
8466 case of Refined_Post into account in Within_Postcondition check.
8468 2014-06-13 Hristian Kirtchev <kirtchev@adacore.com>
8470 * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
8473 2014-06-13 Yannick Moy <moy@adacore.com>
8475 * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
8476 Aspect_Export): Consider that variables may be set outside the program.
8478 2014-06-13 Robert Dewar <dewar@adacore.com>
8480 * back_end.adb (Make_Id): New function.
8481 (Make_SC): New function.
8482 (Set_RND): New procedure.
8483 * back_end.ads (Make_Id): New function.
8484 (Make_SC): New function.
8485 (Set_RND): New procedure.
8486 * einfo.ads: Minor comment updates.
8487 * frontend.adb: Move Atree.Initialize call to Gnat1drv.
8488 * gnat1drv.adb (Gnat1drv): New calling sequence for
8489 Get_Target_Parameters.
8490 (Gnat1drv): Move Atree.Initialize here from Frontend.
8491 * targparm.adb (Get_Target_Parameters): New calling
8492 sequence (Get_Target_Parameters): Handle pragma Restriction
8494 * targparm.ads (Get_Target_Parameters): New calling sequence.
8496 2014-06-13 Gary Dismukes <dismukes@adacore.com>
8498 * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
8499 loop if the pragma does not come from source, so that an implicit
8500 pragma Import only applies to the first declaration, avoiding
8501 possible conflicts with earlier explicit and implicit declarations
8502 due to multiple Provide_Shift_Operators pragmas.
8503 (Set_Imported): Remove previous fix that bypassed pragma duplication
8505 * gnat_rm.texi: Change 'equivalent' to 'similar' in description
8506 of Provide_Shift_Operators.
8508 2014-06-12 Jan Hubicka <hubicka@ucw.cz>
8510 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
8511 string pointer directly to set_decl_section_name.
8513 2014-06-11 Robert Dewar <dewar@adacore.com>
8515 * sem_ch13.adb: Minor reformatting.
8517 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8519 * sem_prag.adb (Check_Clause_Syntax): Add new
8520 local variable Outputs. Account for the case where multiple
8521 output items appear as an aggregate.
8523 2014-06-11 Robert Dewar <dewar@adacore.com>
8525 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8528 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8530 * einfo.ads: Minor reformatting.
8532 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8534 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8535 new variable First_Node. Update the position after all insertions have
8536 taken place to First_Node.
8538 2014-06-11 Robert Dewar <dewar@adacore.com>
8540 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8541 * layout.adb (Layout_Type): Remove test of -gnatd.1.
8543 2014-06-11 Robert Dewar <dewar@adacore.com>
8545 * sem_ch13.adb: Minor reformatting.
8547 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8549 * sem_prag.adb (Check_Clause_Syntax): Add new
8550 local variable Outputs. Account for the case where multiple
8551 output items appear as an aggregate.
8553 2014-06-11 Robert Dewar <dewar@adacore.com>
8555 * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8558 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8560 * einfo.ads: Minor reformatting.
8562 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8564 * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8565 new variable First_Node. Update the position after all insertions have
8566 taken place to First_Node.
8568 2014-06-11 Robert Dewar <dewar@adacore.com>
8570 * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8571 * layout.adb (Layout_Type): Remove test of -gnatd.1.
8573 2014-06-11 Thomas Quinot <quinot@adacore.com>
8575 * freeze.ads: Minor reformatting.
8576 * checks.adb (Determine_Range): Do not attempt to determine
8577 the range of a deferred constant whose full view has not been
8579 * sem_res.adb (Resolve): Remove undesirable guard against
8580 resolving expressions from expression functions.
8582 2014-06-11 Robert Dewar <dewar@adacore.com>
8584 * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
8586 * layout.adb (Layout_Type): Make anonymous access types for
8587 subprogram formal types and return types always thin. For now
8588 only enabled if -gnatd.1 set.
8590 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8592 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8593 rule for stream attributes of interface types (RM 13.13.2 (38/3)):
8594 subprogram must be a null procedure.
8596 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8598 * sem_prag.adb (Analyze_Input_Item): Allow formal
8599 parameters to appear as input_items in an initialization_list
8600 of pragma Initializes. Encapsulation now applies to states and
8601 variables only (as it should). Add RM references to key errors.
8602 * sem_prag.adb (Set_Imported): Suppress errors
8603 about preceding Imports when the pragma does not come from source,
8604 which can happen through use of pragma Provide_Shift_Operators.
8606 2014-06-11 Thomas Quinot <quinot@adacore.com>
8608 * sem_ch3.adb: Minor reformatting.
8609 * einfo.ads (Full_View): Minor comment update.
8611 2014-06-11 Robert Dewar <dewar@adacore.com>
8613 * einfo.adb (Is_Independent): New flag.
8614 * einfo.ads (Is_Independent): New flag.
8615 (Has_Independent_Components): Clean up and fix comments.
8616 * sem_prag.adb (Fix_Error): Deal with changing argument
8617 [of] to entity [for].
8618 (Analyze_Pragma, case Independent): Set Is_Independent flag
8619 (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
8620 in all components of specified record.
8622 2014-06-11 Thomas Quinot <quinot@adacore.com>
8624 * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
8625 Set proper Etype on bounds of dummy type created for analysis
8628 2014-06-11 Robert Dewar <dewar@adacore.com>
8630 * debug.adb: Minor comment fix (add missing section of dot
8633 2014-06-11 Robert Dewar <dewar@adacore.com>
8635 * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
8636 opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
8637 pragma/aspects Pure_05 Pure_12 Preelaborate_05.
8638 * errout.adb (Output_Messages): Avoid duplicate output for
8639 library level instance.
8640 * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
8641 (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
8642 * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
8643 * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
8644 accomodate largest modulus value.
8645 * gnat_ugn.texi: Minor updates.
8647 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8649 * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
8650 load body of generic package or its parent, if body is optional
8651 and the unit does not require a body.
8653 2014-06-11 Robert Dewar <dewar@adacore.com>
8655 * gnat_rm.texi: Document System.Unsigned_Types.
8656 * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
8657 * s-unstyp.ads: Update comments (this is now user available unit).
8659 2014-06-11 Robert Dewar <dewar@adacore.com>
8661 * make.adb, sem_res.adb: Minor reformatting.
8663 2014-06-11 Thomas Quinot <quinot@adacore.com>
8665 * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
8666 a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
8667 a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
8668 Preelaborate_05 to just Preelaborate in runtime units, and similarly
8669 change Pure_05 to just Pure.
8671 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8673 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
8674 analysis if error has been posted on subprogram body.
8676 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8678 * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8679 rule given in RM 13.1 (8/1) for operational attributes to stream
8680 attributes: the attribute must apply to a first subtype. Fixes
8681 missing errors in ACATS test bdd2004.
8683 2014-06-11 Robert Dewar <dewar@adacore.com>
8685 * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
8686 record type if restriction No_Implicit_Conditionals is active.
8687 (Expand_N_Object_Declaration): Don't allow default initialization
8688 for variant record type if restriction No_Implicit_Condition is active.
8689 (Build_Variant_Record_Equality): Don't build for variant
8690 record type if restriction No_Implicit_Conditionals is active.
8691 * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
8692 No_Implicit_Conditionals.
8693 * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
8695 2014-06-11 Ramon Fernandez <fernandez@adacore.com>
8697 * i-cstrin.ads: Update comments.
8699 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8701 * sem_res.adb (Resolve_Selected_Component): Handle properly a
8702 selected component whose prefix is overloaded, when none of the
8703 interpretations matches the expected type.
8705 2014-06-11 Bob Duff <duff@adacore.com>
8707 * make.adb (Wait_For_Available_Slot): Give a more
8708 informative error message; if the ALI file is not found, print
8709 the full path of what it's looking for.
8711 2014-06-11 Sergey Rybin <rybin@adacore.com frybin>
8713 * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
8714 option to specify the result file encoding.
8716 2014-06-11 Robert Dewar <dewar@adacore.com>
8718 * errout.ads, sem_ch12.adb: Minor reformatting.
8719 * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
8720 * lib-xref.adb: Minor reformatting.
8721 * restrict.adb: Minor code reorganization (put routines in
8724 2014-06-11 Yannick Moy <moy@adacore.com>
8726 * einfo.ads: Minor typo in comment
8728 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8730 * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
8731 formal private types and private type extensions, to indicate
8732 variable in a generic unit whose uninitialized use suggest that
8733 actual type should be fully initialized.
8734 Needs_Initialized_Actual: removed, functionaity replaced by
8736 * lib-xref.adb (Generate_Reference): Generate a reference for
8737 variables of a formal type when the unit is not the main unit,
8738 to enable appropriate warnings in an instance.
8739 * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
8740 of variable in a generic unit that suggests that actual type
8741 should be full initialized.
8742 * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
8743 and do not emot warning, which now only appears in an instance.
8745 2014-06-11 Eric Botcazou <ebotcazou@adacore.com>
8747 * gnat_ugn.texi: Fix minor typo.
8749 2014-06-11 Hristian Kirtchev <kirtchev@adacore.com>
8751 * sem_ch3.adb Add with and use clause for Sem_Ch10.
8752 (Analyze_Declarations): Code reformatting. Analyze the contract
8753 of a subprogram body stub at the end of the declarative region.
8754 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
8755 now a variable. Do not process the body if its contract is not
8756 available. Account for subprogram body stubs when extracting
8757 the corresponding spec.
8758 * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
8760 * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
8762 * sem_prag.adb (Analyze_Depends_In_Decl_Part):
8763 Account for subprogram body stubs when extracting the
8765 (Analyze_Global_In_Decl_List):
8766 Account for subprogram body stubs when extracting the
8768 (Analyze_Refined_Depends_In_Decl_Part):
8769 Use Find_Related_Subprogram_Or_Body to retrieve the declaration
8770 of the related body. Spec_Is now a variable. Account for
8771 subprogram body stubs when extracting the corresponding spec.
8772 (Analyze_Refined_Global_In_Decl_Part): Use
8773 Find_Related_Subprogram_Or_Body to retrieve the declaration
8774 of the related body. Spec_Is now a variable. Account for
8775 subprogram body stubs when extracting the corresponding spec.
8776 (Collect_Subprogram_Inputs_Output): Account for subprogram body
8777 stubs when extracting the corresponding spec.
8779 2014-06-11 Vincent Celier <celier@adacore.com>
8781 * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
8784 2014-06-11 Robert Dewar <dewar@adacore.com>
8786 * debug.adb: Add debug flag -gnatd.q.
8787 * erroutc.adb (Prescan_Message): Bomb if untagged warning with
8789 * styleg.adb (Check_Xtra_Parens): Message should be a style
8791 * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
8792 par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
8793 sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
8794 sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
8796 2014-06-11 Ben Brosgol <brosgol@adacore.com>
8798 * gnat_rm.texi: Revised chapter on Implementation Defined
8801 2014-06-11 Geert Bosch <bosch@adacore.com>
8803 * s-exctab.adb: avoid race conditions in exception registration.
8805 2014-06-11 Robert Dewar <dewar@adacore.com>
8807 * errout.adb (Warn_Insertion): New function.
8808 (Error_Msg): Use Warn_Insertion and Prescan_Message.
8809 (Error_Msg_Internal): Set Info field of error object.
8810 (Error_Msg_NEL): Use Prescan_Message.
8811 (Set_Msg_Text): Don't store info: at start of message.
8812 (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
8813 (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
8814 * errout.ads: Document new ?$? and >$> insertion sequences
8815 Document use of "(style)" and "info: "
8816 * erroutc.adb (dmsg): Print several missing fields
8817 (Get_Warning_Tag): Handle -gnatel case (?$?) (Output_Msg_Text):
8818 Deal with new tagging of info messages
8819 * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
8820 Add field Info (Prescan_Message): New procedure, this procedure
8821 replaces the old Test_Style_Warning_Serious_Unconditional_Msg
8822 * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
8823 sem_elab.adb: Follow new rules for info message (info belongs
8824 only at the start of a message, and only in the first message,
8825 not in any of the continuations).
8826 * gnat_ugn.texi: Document full set of warning tags.
8828 2014-06-11 Gary Dismukes <dismukes@adacore.com>
8830 * sem_util.adb: Minor typo fix.
8832 2014-06-11 Ed Schonberg <schonberg@adacore.com>
8834 * sem_warn.adb (Check_References): Do not emit spurious warnings
8835 on uninitialzed variable of a formal private type if variable
8838 2014-06-09 Jan Hubicka <hubicka@ucw.cz>
8840 * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
8841 set_decl_section_name accessor.
8843 2014-05-22 Thomas Schwinge <thomas@codesourcery.com>
8845 * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8846 (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8847 (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8849 2014-05-21 Robert Dewar <dewar@adacore.com>
8851 * layout.adb: Minor reformatting.
8852 * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
8855 2014-05-21 Robert Dewar <dewar@adacore.com>
8857 * restrict.ads (Implementation_Restriction): Add entry for
8859 * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
8860 Ada.[Wide_[Wide_]Text_IO.
8861 * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
8862 * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
8863 for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
8864 Wide_Wide_Value if restriction No_Fixed_IO is set.
8865 * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
8867 2014-05-21 Robert Dewar <dewar@adacore.com>
8869 * gnatcmd.adb: Minor error msg changes (no upper case letter
8871 * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
8874 2014-05-21 Robert Dewar <dewar@adacore.com>
8876 * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
8877 via generic formals.
8878 * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
8881 2014-05-21 Thomas Quinot <quinot@adacore.com>
8883 * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
8884 more accurately describe that this subprogram needs to come into
8885 play also in cases where no byte swapping is involved, because
8886 it also takes care of some required shifts (left-justification
8889 2014-05-21 Thomas Quinot <quinot@adacore.com>
8891 * freeze.adb (Check_Component_Storage_Order): Indicate whether
8892 a Scalar_Storage_Order attribute definition is present for the
8894 (Freeze_Record_Type): Suppress junk warnings
8895 about purportedly junk Bit_Order / Scalar_Storage_Order attribute
8898 2014-05-21 Robert Dewar <dewar@adacore.com>
8900 * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
8901 to Kill_Elaboration_Checks.
8903 2014-05-21 Gary Dismukes <dismukes@adacore.com>
8905 * layout.adb (Assoc_Add): Suppress the optimization of the (E
8906 - C1) + C2 case, when the expression type is unsigned and C1 <
8907 C2, to avoid creating a negative literal when folding.
8909 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
8911 * freeze.adb (Freeze_Record_Type): Update the use of
8913 * sem_ch3.adb (Analyze_Object_Contract): Update the use of
8915 (Process_Discriminants): Update the use of Is_SPARK_Volatile.
8916 * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
8917 of Is_SPARK_Volatile.
8918 (Analyze_Loop_Parameter_Specification):
8919 Update the use of Is_SPARK_Volatile.
8920 * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
8921 formal parameter when its type is volatile.
8922 * sem_prag.adb (Analyze_Global_Item): Update the use of
8924 * sem_res.adb (Resolve_Entity_Name): Correct the guard which
8925 determines whether an entity is a volatile source SPARK object.
8926 * sem_util.adb (Has_Enabled_Property): Accout for external
8927 properties being set on objects other than abstract states
8928 and variables. An example would be a formal parameter.
8929 (Is_SPARK_Volatile): New routine.
8930 (Is_SPARK_Volatile_Object):
8931 Remove the entity-specific tests. Call routine Is_SPARK_Volatile
8932 when checking entities and/or types.
8933 * sem_util.ads (Is_SPARK_Volatile): New routine.
8935 2014-05-21 Robert Dewar <dewar@adacore.com>
8937 * sem_warn.adb: Minor fix to warning messages (use ?? instead
8940 2014-05-21 Vincent Celier <celier@adacore.com>
8942 * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
8943 switch --version and --help.
8945 2014-05-21 Robert Dewar <dewar@adacore.com>
8947 * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
8949 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8951 * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
8952 iterator variable when the domain of iteration is a formal
8953 container and this is an element iterator.
8955 2014-05-21 Bob Duff <duff@adacore.com>
8957 * sem_ch12.adb: Minor reformatting.
8959 2014-05-21 Robert Dewar <dewar@adacore.com>
8961 * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
8963 2014-05-21 Robert Dewar <dewar@adacore.com>
8965 * sem_elab.adb: Minor reformatting.
8966 * s-taprop.ads: Minor comment fix.
8967 * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
8968 Kill_Elaboration_Checks.
8969 * errout.adb, erroutc.adb: Minor reformatting.
8971 2014-05-21 Thomas Quinot <quinot@adacore.com>
8973 * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
8974 component. No byte swapping occurs, but this procedure also takes
8975 care of appropriately justifying the argument.
8977 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
8979 * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
8981 (Analyze_Subprogram_Body_Helper): Move the
8982 analysis of aspect specifications and the processing of the
8983 subprogram body contract after inlining has taken place.
8984 (Diagnose_Misplaced_Aspect_Specifications): Removed.
8986 2014-05-21 Javier Miranda <miranda@adacore.com>
8988 * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
8990 2014-05-21 Robert Dewar <dewar@adacore.com>
8992 * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
8993 continuations any more.
8995 2014-05-21 Ed Schonberg <schonberg@adacore.com>
8997 * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
8998 present in formal_Private_Definitions and on private extension
8999 declarations of a formal derived type. Set when the use of the
9000 formal type in a generic suggests that the actual should be a
9001 fully initialized type.
9002 * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
9003 to indicate that an entity of a generic type has default
9004 initialization, and that the corresponing actual type in any
9005 subsequent instantiation should be fully initialized.
9006 * sem_ch12.adb (Check_Initialized_Type): new subprogram,
9007 to emit a warning if the actual for a generic type on which
9008 Needs_Initialized_Actual is set is not a fully initialized type.
9010 2014-05-21 Robert Dewar <dewar@adacore.com>
9012 * sem_elab.adb, prj-dect.adb: Minor reformatting.
9014 2014-05-21 Robert Dewar <dewar@adacore.com>
9016 * erroutc.ads: Minor comment addition.
9018 2014-05-21 Robert Dewar <dewar@adacore.com>
9020 * errout.ads: Add documentation for use of >*> tag.
9021 * restrict.adb: Make sure we use >*> tag for restriction warnings.
9023 2014-05-21 Gary Dismukes <dismukes@adacore.com>
9025 * debug.adb: Add case of illegal overriding_indicator for a
9026 protected subprogram body to description of -gnatd.E switch.
9027 * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
9028 for cases of giving overriding_indicators on protected subprogram
9029 bodies, but change this to a warning if -gnatd.E is enabled. No
9030 longer give a style warning about missing indicators on protected
9033 2014-05-21 Robert Dewar <dewar@adacore.com>
9035 * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
9036 sem_elab.ads: Minor reformatting.
9037 * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
9040 2014-05-21 Pascal Obry <obry@adacore.com>
9042 * prj-dect.adb: Allow package Install in aggregate project.
9044 2014-05-21 Robert Dewar <dewar@adacore.com>
9046 * sem_ch13.adb (Analyze_Aspect_Specifications):
9047 Insert_Delayed_Pragma is now used for the case of Attach_Handler.
9048 * sem_prag.adb: Minor comment improvements.
9050 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9052 * sem_ch12.adb (Install_Body): When checking whether freezing of
9053 instantiation must be delayed, verify that the common enclosing
9054 subprogram to generic and instance is in fact an overloadable
9057 2014-05-21 Vincent Celier <celier@adacore.com>
9059 * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
9060 mains with the same name and fail if there is more than one.
9061 * prj.ads, prj.adb (Find_All_Sources): New function
9063 2014-05-21 Robert Dewar <dewar@adacore.com>
9065 * sem_ch13.adb: Minor reformatting.
9066 * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
9067 * sem_prag.adb: Minor error message improvement.
9069 2014-05-21 Yannick Moy <moy@adacore.com>
9071 * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
9072 (Enclosing_Subprogram_Or_Package): Only return a library-level
9075 2014-05-21 Javier Miranda <miranda@adacore.com>
9077 * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
9078 to the full view of the parent type when processing a derived type
9079 which is the full view of a private type not defined in a generic
9080 unit which is derived from a private type with discriminants
9081 whose full view is a non-tagged record type.
9083 2014-05-21 Javier Miranda <miranda@adacore.com>
9085 * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
9086 Complete previous patch.
9088 2014-05-21 Thomas Quinot <quinot@adacore.com>
9091 * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
9092 Provide a behaviour more consistent with underlying datagram
9093 socket: do not attempt to loop over Send_Socket/Receive_Socket
9094 iterating along the buffer.
9096 2014-05-21 Hristian Kirtchev <kirtchev@adacore.com>
9098 * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
9099 or a tagged type is not labelled as volatile. Ensure that a
9100 non-volatile type has no volatile components.
9101 * sem_ch3.adb (Analyze_Object_Contract): Add local constant
9102 Obj_Typ. Code reformatting. Ensure that a discriminated or
9103 tagged object is not labelled as volatile.
9104 * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
9105 pragma Volatile applies to a full type declaration or an object
9106 declaration when SPARK mode is on.
9108 2014-05-21 Sergey Rybin <rybin@adacore.com frybin>
9110 * gnat_ugn.texi: For ASIS tools, reword the paragraph about
9111 providing options needed for compiling the argument source for
9112 the situation when a project file can be used as a tool parameter.
9114 2014-05-21 Gary Dismukes <dismukes@adacore.com>
9116 * gnat_rm.texi: Minor typo fix.
9118 2014-05-21 Robert Dewar <dewar@adacore.com>
9120 * stand.adb (Tree_Read): Read missing entities.
9121 (Tree_Write): Write missing entities.
9123 2014-05-21 Ben Brosgol <brosgol@adacore.com>
9125 * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
9126 section in gnatmetric chapter.
9128 2014-05-21 Robert Dewar <dewar@adacore.com>
9130 * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
9131 outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
9132 post-call copy write back (see detailed comment in code).
9133 * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
9135 * tbuild.ads: Minor reformatting.
9137 2014-05-21 Robert Dewar <dewar@adacore.com>
9139 * stand.ads: Add warning about adding new entities and
9140 Tree_Read/Tree_Write.
9142 2014-05-21 Robert Dewar <dewar@adacore.com>
9144 * sem_util.adb (Set_Entity_With_Checks): Don't complain about
9145 references to restricted entities within the units in which they
9148 2014-05-21 Robert Dewar <dewar@adacore.com>
9150 * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
9151 simplify the needed test, and also deal with failure to catch
9152 situations with non-standard names.
9153 * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
9154 (Source_File_Is_Subunit): Removed, no longer used.
9156 2014-05-21 Javier Miranda <miranda@adacore.com>
9159 (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
9160 renaming of an access to interface object there is no need to
9161 generate extra code to reference the tag.
9163 2014-05-21 Robert Dewar <dewar@adacore.com>
9165 * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
9166 Warnings (Off, string).
9168 2014-05-21 Robert Dewar <dewar@adacore.com>
9170 * osint.adb: Fix three error messages to say invalid instead
9172 * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
9173 sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
9174 sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
9176 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9178 * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
9179 sem_ch9.ads: Move discriminant manipulation routines for analysis of
9180 aspect specifications from sem_ch9 to sem_ch13, where they belong.
9182 2014-05-21 Robert Dewar <dewar@adacore.com>
9184 * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
9185 Clearly document -gnatyg (GNAT style switches).
9186 * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
9187 detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
9188 available for VMS after all.
9189 * warnsw.adb: Reorganize to eliminate duplicated code
9190 (Restore_Warnings): Add a couple of missing entries
9191 (Save_Warnings): Add a couple of missing entries.
9192 * warnsw.ads: Add missing entries to Warning_Record (not clear
9193 what the impact is).
9195 2014-05-21 Robert Dewar <dewar@adacore.com>
9197 * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
9199 * errout.ads: Document ?*? (restriction warning) insertion.
9200 * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
9202 * erroutc.ads: Document use of * for restriction warning tag.
9203 * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
9205 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9207 * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
9208 make discriminants immediately visible when analyzing an aspect
9209 of a subtype declaration.
9210 (Uninstall_Discriminants): Do not apply to the entity in a
9211 subtype declaration.
9213 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9215 * sem_util.adb: Code clean up.
9217 2014-05-21 Eric Botcazou <ebotcazou@adacore.com>
9219 * gnat_ugn.texi: Document -Werror.
9221 2014-05-21 Bob Duff <duff@adacore.com>
9223 * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
9224 This was returning False if the Object is a constant view. Fix
9225 it to return True in that case, because it might be a view of
9227 (Has_Discriminant_Dependent_Constraint): Fix latent
9228 bug; this function was crashing when passed a discriminant.
9230 2014-05-21 Robert Dewar <dewar@adacore.com>
9232 * gnat_ugn.texi: Remove misplaced section that is now obsolete.
9233 * s-arit64.adb: Minor code reorganization.
9234 * sem_prag.adb: Minor comment fix (remove erroneous use of the
9237 2014-05-21 Robert Dewar <dewar@adacore.com>
9239 * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
9240 computing new table size.
9242 2014-05-21 Robert Dewar <dewar@adacore.com>
9244 * einfo.ads: Minor reformatting.
9245 * ceinfo.adb: Deal with slight format change of einfo.ads.
9247 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9249 * sem_prag.adb (Analyze_Part_Of): Further work on the proper
9250 implementation of the SPARK 2014 rule concerning private child
9253 2014-05-21 Vincent Celier <celier@adacore.com>
9255 * makeusg.adb: Add switch -d to usage.
9257 2014-05-21 Ed Schonberg <schonberg@adacore.com>
9259 * sem_util.adb (Find_Actual): If an actual that is the prefix
9260 of an enclosing prefixed call has been rewritten, use Nkind
9261 and Sloc to identify the corresponding formal, when handling
9262 deferred references.
9264 2014-05-21 Robert Dewar <dewar@adacore.com>
9266 * debug.adb: Document -gnatd.z switch.
9267 * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
9269 2014-05-21 Robert Dewar <dewar@adacore.com>
9271 * einfo.ads (Can_Never_Be_Null): Minor comment update.
9272 * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
9273 error message change.
9274 * s-arit64.adb ("abs"): New function. Use expression functions
9275 for the simple conversions and arithmetic.
9277 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9279 * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
9280 set function_start_locus.
9282 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9284 * utils.c (gnat_write_global_declarations): Adjust the flags put on
9287 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9289 * gcc-interface/decl.c (change_qualified_type): New static function.
9290 (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
9291 <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
9292 <E_Array_Subtype>: Likewise.
9293 Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
9294 (gnat_to_gnu_component_type): Likewise.
9295 (gnat_to_gnu_param): Likewise.
9297 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9299 * fe.h (Set_Present_Expr): Move around.
9300 (End_Location): New macro.
9301 * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
9303 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9305 * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
9306 lieu of more verbose construct.
9307 * gcc-interface/trans.c (Call_to_gnu): Likewise.
9308 (gnat_to_gnu): Likewise. Remove obsolete code.
9310 2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
9312 * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
9313 consider that regular packed arrays can never be superflat.
9315 2014-05-17 Trevor Saunders <tsaunders@mozilla.com>
9317 * gcc-interface/ada-tree.h: Remove usage of variable_size gty
9319 * gcc-interface/decl.c (annotate_value): Adjust.
9320 * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
9321 (push_range_check_info): Likewise.
9322 (Loop_Statement_to_gnu): Likewise.
9323 (Subprogram_Body_to_gnu): Likewise.
9324 (Compilation_Unit_to_gnu): Likewise.
9325 (start_stmt_group): Likewise.
9326 * gcc-interface/utils.c (init_gnat_utils): Likewise.
9327 (gnat_pushlevel): Likewise.
9328 (maybe_pad_type): Likewise.
9330 2014-05-14 Eric Botcazou <ebotcazou@adacore.com>
9332 * seh_init.c: Fix copyright year.
9334 2014-05-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
9336 * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
9337 are defined. Move include windows.h before system.h.
9338 * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
9339 also when __CYGWIN__ is defined. Include windef.h before winbase.h.
9341 2014-05-14 Richard Sandiford <r.sandiford@uk.ibm.com>
9343 * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
9344 to the appropriate type.
9345 * gcc-interface/trans.c (gnat_to_gnu): Likewise.
9346 (pos_to_constructor): Likewise.
9348 2014-05-13 Eric Botcazou <ebotcazou@adacore.com>
9350 * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
9352 2014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
9353 Mike Stump <mikestump@comcast.net>
9354 Richard Sandiford <rdsandiford@googlemail.com>
9356 * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
9357 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
9358 (annotate_value): Use wide-int interfaces.
9359 * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
9361 2014-04-28 Richard Henderson <rth@redhat.com>
9363 * gcc-interface/Makefile.in: Support aarch64-linux.
9365 2014-04-28 Eric Botcazou <ebotcazou@adacore.com>
9367 * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
9368 add 'Suffix' parameter and adjust comment.
9369 (Get_External_Name_With_Suffix): Delete.
9370 * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
9371 (Get_External_Name): ...here. Add 'False' default to Has_Suffix, add
9373 (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
9374 Call Get_External_Name instead of Get_External_Name_With_Suffix.
9375 (Get_Secondary_DT_External_Name): Likewise.
9376 * exp_cg.adb (Write_Call_Info): Likewise.
9377 * exp_disp.adb (Export_DT): Likewise.
9378 (Import_DT): Likewise.
9379 * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
9380 parameter with False default.
9381 * comperr.adb (Compiler_Abort): Likewise. Adjust accordingly.
9382 * types.h (Fat_Pointer): Rename into...
9383 (String_Pointer): ...this. Add comment on interfacing rules.
9384 * fe.h (Compiler_Abort): Adjust for above renaming.
9385 (Error_Msg_N): Likewise.
9386 (Error_Msg_NE): Likewise.
9387 (Get_External_Name): Likewise. Add third parameter.
9388 (Get_External_Name_With_Suffix): Delete.
9389 * gcc-interface/decl.c (STDCALL_PREFIX): Define.
9390 (create_concat_name): Adjust call to Get_External_Name, remove call to
9391 Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
9392 * gcc-interface/trans.c (post_error): Likewise.
9393 (post_error_ne): Likewise.
9394 * gcc-interface/misc.c (internal_error_function): Likewise.
9396 2014-04-28 Richard Biener <rguenther@suse.de>
9399 * gcc-interface/utils.c: Define flag_isoc11.
9401 2014-04-26 Eric Botcazou <ebotcazou@adacore.com>
9403 * gnatvsn.ads (Library_Version): Bump to 4.10.
9405 2014-04-23 Eric Botcazou <ebotcazou@adacore.com>
9408 2014-04-22 Richard Henderson <rth@redhat.com>
9410 * gcc-interface/Makefile.in: Support aarch64-linux.
9412 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
9414 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9415 (Error_Msg_N): Likewise.
9416 (Error_Msg_NE): Likewise.
9417 (Get_External_Name_With_Suffix): Likewise.
9418 * types.h (Fat_Pointer): Delete.
9419 (String_Pointer): New type.
9420 (DECLARE_STRING_POINTER): New macro.
9421 * gcc-interface/decl.c (create_concat_name): Adjust.
9422 * gcc-interface/trans.c (post_error): Likewise.
9423 (post_error_ne): Likewise.
9424 * gcc-interface/misc.c (internal_error_function): Likewise.
9426 2014-04-22 Richard Henderson <rth@redhat.com>
9428 * gcc-interface/Makefile.in: Support aarch64-linux.
9430 * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
9431 (__gnat_alternate_stack): Enable for all linux except ia64.
9433 2014-04-22 Eric Botcazou <ebotcazou@adacore.com>
9435 * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9436 (Error_Msg_N): Likewise.
9437 (Error_Msg_NE): Likewise.
9438 (Get_External_Name_With_Suffix): Likewise.
9439 * types.h (Fat_Pointer): Delete.
9440 (String_Pointer): New type.
9441 (DECLARE_STRING_POINTER): New macro.
9442 * gcc-interface/decl.c (create_concat_name): Adjust.
9443 * gcc-interface/trans.c (post_error): Likewise.
9444 (post_error_ne): Likewise.
9445 * gcc-interface/misc.c (internal_error_function): Likewise.
9447 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9448 Pierre-Marie de Rodat <derodat@adacore.com>
9450 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
9451 scalar constant instead of a reference for renaming of scalar literal.
9452 Do not create a new object for constant renaming except for a function
9453 call. Make sure a VAR_DECL is created for the renaming pointer.
9454 * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
9455 (fold_constant_decl_in_expr): New function.
9456 (Identifier_to_gnu): Use constant_decl_with_initializer_p.
9457 For a constant renaming, try to fold a constant DECL in the result.
9458 (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
9459 (Identifier_to_gnu): Reference the renamed object of constant renaming
9461 * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
9462 invalidate constant renaming pointers.
9464 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9466 * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
9467 (build_vector_type_for_size): New function.
9468 (build_vector_type_for_array): Likewise.
9469 (unchecked_convert): Build an intermediate vector type to convert
9470 from a generic array type to a vector type.
9471 (handle_vector_size_attribute): Reimplement.
9472 (handle_vector_type_attribute): Likewise.
9474 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9476 * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
9477 Is_OK_Static_Expression in lieu of Is_Static_Expression to
9478 detect valid arguments.
9480 2014-04-15 Eric Botcazou <ebotcazou@adacore.com>
9482 * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
9484 2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
9486 * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
9487 (components_to_record): Likewise.
9488 * gcc-interface/utils.c (make_aligning_type): Likewise.
9489 (maybe_pad_type): Likewise.
9490 (finish_record_type): Likewise.
9491 (rest_of_record_type_compilation): Likewise.
9493 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
9495 * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
9496 * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
9498 * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
9499 hint for Loop_Optimize.
9500 * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
9501 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9502 with new Ivdep hint.
9503 * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
9504 * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9505 with new Ivdep hint.
9506 (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
9508 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
9509 Robert Dewar <dewar@adacore.com>
9511 * opt.ads (Suppress_Back_Annotation): Remove as unused.
9512 * fe.h (Back_Annotate_Rep_Info): Likewise.
9513 (Global_Discard_Names): Likewise.
9514 (List_Representation_Info): Declare.
9515 * types.h (Uint_Minus_1): Likewise.
9516 * repinfo.ads: Document back-annotation change.
9517 * gcc-interface/gigi.h (init_gnat_decl): Declare.
9518 (destroy_gnat_decl): Likewise.
9519 * gcc-interface/decl.c (annotate_value): Do not create the cache of
9520 annotated values here but...
9521 <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
9523 (init_gnat_decl): ...here instead. New function.
9524 (destroy_gnat_decl): Likewise.
9525 * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
9526 * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
9528 2014-04-14 Eric Botcazou <ebotcazou@adacore.com>
9530 * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
9531 offset for the field, if any.
9533 2014-04-09 Eric Botcazou <ebotcazou@adacore.com>
9534 Svante Signell <svante.signell@gmail.com>
9538 * s-osinte-x32.adb: New file.
9539 * s-linux.ads (Time): New section.
9540 * s-linux-alpha.ads (Time): Likewise.
9541 * s-linux-android.ads (Time: Likewise.
9542 * s-linux-hppa.ads (Time): Likewise.
9543 * s-linux-mipsel.ads (Time): Likewise.
9544 * s-linux-sparc.ads (Time): Likewise.
9545 * s-linux-x32.ads (Time): Likewise.
9546 * s-osprim-x32.ads (timespec): Adjust.
9548 (To_Timespec): Likewise.
9549 * s-osinte-linux.ads (Time): Define local subtypes for those defined
9551 * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
9552 * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
9553 * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
9554 * s-osinte-solaris-posix.ads (timespec): Likewise.
9555 * s-osinte-posix.adb (To_Timespec): Likewise.
9556 * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
9558 2014-04-08 Eric Botcazou <ebotcazou@adacore.com>
9561 * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
9562 * s-linux-android.ads: New file.
9563 * s-intman-android.adb: Likewise.
9564 * s-osinte-android.ads: Adjust.
9565 * sigtramp-armdroid.c: Likewise.
9566 * sigtramp.h: Add Android support.
9568 2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
9570 * gcc-interface/Makefile.in (alpha-vms): Add missing line.
9572 2014-03-30 Eric Botcazou <ebotcazou@adacore.com>
9575 * system-linux-alpha.ads: Adjust for Ada 2005.
9576 * system-linux-mips.ads: Likewise.
9577 * system-linux-mips64el.ads: Likewise.
9578 * system-linux-mipsel.ads: Likewise.
9579 * system-linux-s390.ads: Likewise.
9580 * system-linux-s390x.ads: Likewise.
9581 * system-linux-sparc.ads: Likewise.
9582 * system-linux-sparcv9.ads: Likewise.
9583 * system-rtems.ads: Likewise.
9584 * system-vxworks-arm.ads: Likewise.
9586 2014-03-16 Andreas Schwab <schwab@linux-m68k.org>
9589 * gcc-interface/Makefile.in (target_cpu_default): Revert
9592 2014-03-13 Eric Botcazou <ebotcazou@adacore.com>
9595 * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
9596 it to set the RM size. Use directly 'size' for the Esize.
9597 (Create_Back_End_Float_Types): Adjust call to above.
9598 * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
9599 * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
9600 (Write_Target_Dependent_Values): Adjust comment.
9601 * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
9603 (Write_Target_Dependent_Values): Write the precision in lieu of size.
9604 (Initialization): Read the precision in lieu of size and compute the
9605 size from the precision and the alignment.
9606 * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
9607 * gcc-interface/misc.c (enumerate_modes): Likewise. Do not register
9608 types for vector modes, pass the size in addition to the precision.
9610 2014-03-10 Eric Botcazou <ebotcazou@adacore.com>
9612 * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
9614 2014-03-07 Doug Rupp <rupp@adacore.com>
9617 * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
9618 (Support_64_Bit_Divides): Removed, no longer used.
9619 (ZCX_By_Default): Enabled.
9621 2014-02-25 Doug Rupp <rupp@adacore.com>
9623 * gcc-interface/Makefile.in (arm-linux):
9624 (EH_MECHANISM): Use ARM unwinder (-arm)
9625 (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
9627 (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
9628 (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
9629 (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
9630 (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
9631 Add dependencies for sigtramp-armvxw.o.
9633 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9635 * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
9637 2014-02-25 Robert Dewar <dewar@adacore.com>
9639 * rtsfind.adb (Is_RTE): Protect against entity with no scope
9640 field (previously this call blew up on the Standard entity).
9641 * sem_attr.adb (Analyze_Attribute, case Access): Remove
9642 test for No_Abort_Statements, this is now handled in
9643 Set_Entity_With_Checks.
9644 * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
9645 Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
9646 * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
9647 Set_Entity_With_Checks.
9648 (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
9649 Add checks for No_Abort_Statements.
9651 2014-02-25 Robert Dewar <dewar@adacore.com>
9653 * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
9654 Check_Restriction is OK.
9656 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9658 * sem_ch3.adb (Process_Full_View): Better error message when
9659 the full view of a private type without discriminants is an
9661 * sem_ch7.adb (Uninstall_Declarations): Ditto.
9663 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9665 * sigtramp-armvxw.c: Also restore r0.
9667 2014-02-25 Robert Dewar <dewar@adacore.com>
9669 * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
9670 unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
9671 set unconditionally.
9672 * erroutc.adb (Get_Warning_Tag): Does not give a leading space
9673 any more (Output_Msg_Text): Rewritten with new convention on
9674 output of warnings that are treated as errors.
9675 * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
9677 * gnat_rm.texi: Updates to documentation on pragma
9679 * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
9680 set Warning_Doc_Switch.
9681 * lib-writ.ads: Add documentation note on ALI file generation
9683 * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
9685 * sem_attr.adb (Resolve_Attribute, case Access):
9686 Abort_Task'Access violates the No_Abort_Statements restriction.
9687 * sem_res.adb (Resolve_Call): Check restriction
9688 No_Abort_Statements for call to Abort_Task or a renaming of it.
9690 2014-02-25 Robert Dewar <dewar@adacore.com>
9692 * sem_ch3.adb (Array_Type_Declaration): Check for case of using
9694 * lib.ads: Minor reformatting.
9695 * einfo.ads: Minor reformatting.
9697 2014-02-25 Doug Rupp <rupp@adacore.com>
9699 * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
9700 use Short_Descriptor(S) as the argument passing mechanism.
9702 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9704 * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
9706 2014-02-25 Robert Dewar <dewar@adacore.com>
9708 * atree.ads (Warnings_Treated_As_Errors): New variable.
9709 * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
9710 error object (Initialize): Initialize Warnings_As_Errors_Count
9711 (Write_Error_Summary): Include count of warnings treated as errors.
9712 * erroutc.adb (Warning_Treated_As_Error): New function.
9713 (Matches): Function moved to outer level of package.
9714 * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
9715 (Warning_Treated_As_Error): New function.
9716 * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
9717 * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
9718 * opt.ads (Config_Switches_Type): Add entry for
9719 Warnings_As_Errors_Count.
9720 (Warnings_As_Errors_Count): New variable.
9721 (Warnings_As_Errors): New array.
9722 * par-prag.adb: Add dummy entry for Warning_As_Error.
9723 * sem_prag.adb (Analyze_Pragma): Implement new pragma
9725 * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
9727 2014-02-25 Eric Botcazou <ebotcazou@adacore.com>
9729 * sigtramp.h: Fix minor inaccuracy.
9731 2014-02-25 Ben Brosgol <brosgol@adacore.com>
9733 * gnat_ugn.texi: Added description of kill command.
9735 2014-02-25 Robert Dewar <dewar@adacore.com>
9737 * gnat_rm.texi (Address_Clauses): Add a section discussing the
9738 problem of address clauses causing unexpected initialization,
9739 including the effect of Initialize_Scalars.
9741 2014-02-25 Robert Dewar <dewar@adacore.com>
9743 * errout.adb: Various changes for better msgs for anonmous access
9745 * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
9747 (Buffer_Remove): Version with character argument.
9748 * sem_attr.adb (Resolve_Attribute, case Access): Better handling
9749 of mismatching conventions for access-to-subprogram case.
9750 * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
9751 access types in record.
9752 * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
9753 types, including in records.
9755 2014-02-25 Doug Rupp <rupp@adacore.com>
9757 * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
9758 enhancements and corrections.
9760 2014-02-25 Robert Dewar <dewar@adacore.com>
9762 * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
9764 2014-02-25 Robert Dewar <dewar@adacore.com>
9766 * gnat_rm.texi: First set of documentation additions for
9767 predefined RM units.
9768 * checks.adb: Minor reformatting.
9769 * sem_elab.adb (Check_Task_Activation): Minor fix to error
9771 * sem_util.adb: Minor reformatting.
9773 2014-02-25 Arnaud Charlet <charlet@adacore.com>
9775 * usage.adb (Usage): Add help on -gnateC.
9776 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
9777 * opt.ads (Generate_CodePeer_Messages): New flag.
9778 * gnat_ugn.texi: Document new switch -gnateC.
9780 2014-02-25 Ben Brosgol <brosgol@adacore.com>
9782 * gnat_rm.texi: Corrected minor typos in Implementation Defined
9784 * opt.ads: Minor reformatting.
9786 2014-02-25 Robert Dewar <dewar@adacore.com>
9788 * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
9789 * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
9791 * opt.ads (Warn_Info_Messages): New flag.
9792 * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
9794 * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
9796 * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
9797 * usage.adb: Add documentation of -gnatel/-gnateL Update
9798 documentation of -gnatwl/-gnatwL.
9799 * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
9800 * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
9802 2014-02-25 Robert Dewar <dewar@adacore.com>
9804 * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
9805 * gnat_rm.texi: Document pragma Provide_Shift_Operators.
9806 * interfac.ads: Minor code reorganization (add pragma
9807 Compiler_Unit_Warning).
9808 * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
9809 * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
9810 Has_Shift_Operator flag.
9811 * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
9812 Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
9813 * sem_prag.adb: Implement pragma Provide_Shift_Operators.
9814 * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
9815 Add entry for Name_Amount.
9816 * checks.adb (Selected_Range_Checks): When checking for a null
9817 range, make sure we use the base type, and not the subtype for
9818 deciding a range is null.
9819 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
9820 for suspicious loop bound which is outside the range of the
9822 * gnat_ugn.texi: Add documentation section "Determining the
9823 Chosen Elaboration Order"
9824 * sem_ch13.adb (UC_Entry): Add field Act_Unit
9825 (Validate_Unchecked_Conversion): Store Act_Unit
9826 (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
9827 * treepr.adb: Minor reformatting.
9829 2014-02-25 Arnaud Charlet <charlet@adacore.com>
9831 * usage.adb: Minor: fix typo.
9833 2014-02-25 Robert Dewar <dewar@adacore.com>
9835 * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
9836 s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
9837 s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
9838 s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
9839 g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
9840 s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
9841 a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
9842 s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
9843 a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
9844 s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
9845 a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
9846 s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
9847 s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
9848 Compiler_Unit_Warning, change Compiler_Unit everywhere to
9849 Compiler_Unit_Warning.
9851 2014-02-25 Sergey Rybin <rybin@adacore.com frybin>
9853 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
9854 in ASIS mode aggregates that are used as aspect definitions.
9856 2014-02-25 Robert Dewar <dewar@adacore.com>
9858 * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
9861 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9863 * freeze.adb (Freeze_Entity): If the return type of a function
9864 is a limited view, and the non-limited view has not been seen yet,
9865 defer freezing to some later point.
9867 2014-02-25 Robert Dewar <dewar@adacore.com>
9869 * sem_ch3.adb: Minor reformatting.
9871 2014-02-25 Robert Dewar <dewar@adacore.com>
9873 * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
9874 s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
9875 s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
9876 s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
9877 s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
9878 s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
9879 s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
9880 s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
9881 s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
9882 s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
9883 s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
9884 s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
9885 s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
9886 s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
9887 snames.ads-tmpl: Change Compiler_Unit everywhere to
9888 Compiler_Unit_Warning.
9890 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
9892 * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
9893 (Collect_Body_Postconditions_In_Decls): New routine.
9894 (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
9895 postcondition aspects or pragmas that appear on a subprogram
9897 (Collect_Spec_Preconditions): Factor out code. Handle
9898 precondition aspects or pragmas that appear on a subprogram
9900 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
9901 aspects that apply to a subprogram body stub is no longer delayed,
9902 the aspects are analyzed on the spot.
9903 (SPARK_Aspect_Error):
9904 Aspects that apply to a subprogram declaration cannot appear in
9906 * sem_ch10.adb Remove with and use clause for Sem_Ch13.
9907 (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
9908 is now a local variable. Code cleanup. Analysis related to
9909 the aspects of a subprogram body stub is now carried out by
9910 Analyze_Subprogram_Body_Helper. Do not propagate the aspects
9911 and/or pragmas of a subprogram body stub to the proper body
9912 as this is no longer needed. Do not analyze the aspects of a
9913 subprogram stub when the corresponding source unit is missing.
9914 (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
9916 (Analyze_Task_Body_Stub): Flag the illegal use of
9918 (Optional_Subunit): Add local variable Unum.
9919 * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
9920 pragma when it applies to a subprogram body stub.
9921 * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
9922 Depends and Global can now apply to a subprogram body stub as
9923 long as it acts as its own spec.
9924 (Analyze_Refined_Pragma):
9925 Code reformatting. Refinement pragmas cannot apply to a subunit.
9927 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
9929 * einfo.ads Update the usage of flag
9930 Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
9931 * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
9932 now starts with the letter 'C'. This makes reading expanded
9934 * exp_ch7.adb (Establish_Transient_Scope): Add local variable
9935 Iter_Loop. Signal that an Ada 2012 iterator loop requires
9936 secondary stack management when creating a transient scope for
9937 an element reference.
9938 * exp_util.adb (Process_Statements_For_Controlled_Objects):
9939 When wrapping the statements of a loop, pass the E_Loop entity
9940 to the wrapping machinery.
9941 (Wrap_Statements_In_Block): Add
9942 formal parameter Scop along with comment on usage. Add local
9943 variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
9944 block as requiring secondary stack management when the block is
9945 created inside an Ada 2012 iterator loop. This ensures that any
9946 reference objects are reclaimed on each iteration of the loop.
9947 * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
9948 tasked with the handling of container iterators as requiring
9949 secondary stack management. This ensures that iterators are
9950 reclaimed when the loop terminates or is exited in any fashion.
9951 * sem_util.adb (Add_Block_Identifier): New routine.
9952 (Find_Enclosing_Iterator_Loop): New routine.
9953 * sem_util.ads (Add_Block_Identifier): New routine.
9954 (Find_Enclosing_Iterator_Loop): New routine.
9956 2014-02-25 Robert Dewar <dewar@adacore.com>
9958 * sinfo.ads: Minor reformatting.
9960 2014-02-25 Tristan Gingold <gingold@adacore.com>
9962 * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
9964 2014-02-25 Pascal Obry <obry@adacore.com>
9966 * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
9968 2014-02-25 Tristan Gingold <gingold@adacore.com>
9970 * sem_ch10.adb: Minor comment fix.
9972 2014-02-25 Bob Duff <duff@adacore.com>
9974 * s-tasdeb.adb: Misc cleanup of this package,
9975 including printing addresses in hexadecimal.
9976 (Write): Fix minor bug when taking 'Address of an empty string.
9978 2014-02-25 Ed Schonberg <schonberg@adacore.com>
9980 * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
9981 public child unit when it does not refer to the abstract state
9982 of a public ancestor.
9984 2014-02-25 Yannick Moy <moy@adacore.com>
9986 * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
9987 Validity_Checks in GNATprove and CodePeer modes.
9989 2014-02-25 Pascal Obry <obry@adacore.com>
9991 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
9992 Artifacts attribute.
9994 2014-02-25 Yannick Moy <moy@adacore.com>
9996 * sem_prag.adb: Minor reformatting to get consistent messages.
9998 2014-02-25 Robert Dewar <dewar@adacore.com>
10000 * checks.adb: Minor reformatting.
10001 * sinfo.ads (Do_Range_Check): Document that this flag is never
10002 passed to the back end.
10004 2014-02-25 Yannick Moy <moy@adacore.com>
10006 * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
10007 sem_ch6.adb: Remove useless references to SPARK RM in error messages.
10009 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
10011 * sem_res.adb (Appears_In_Check): New routine.
10012 (Resolve_Entity_Name): Remove local variables Prev and
10013 Usage_OK. Par is now a constant. Remove the parent chain traversal
10014 as the placement of a volatile object with enabled property
10015 Async_Writers and/or Effective_Reads must appear immediately
10016 within a legal construct.
10018 2014-02-25 Hristian Kirtchev <kirtchev@adacore.com>
10020 * checks.adb (Apply_Selected_Range_Checks):
10021 Alphabetize local constants and variables. Add comments.
10022 Always insert a range check that requires runtime evaluation into
10025 2014-02-25 Robert Dewar <dewar@adacore.com>
10027 * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
10029 2014-02-25 Bob Duff <duff@adacore.com>
10031 * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
10032 iterations while waiting for independent tasks to terminate;
10033 if an independent task does not terminate, we do not want to
10034 hang here. In that case, the thread will be terminated when the
10036 * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
10038 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10040 * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
10041 used to perform pre-analysis of the expression for SPARK
10042 aspects that have a non-standard syntax, such as GLobal and
10043 Initializes. The procedure applies to the original expression
10044 in an aspect specification, prior to the analysis of the
10045 corresponding pragma, in order to provide semantic information
10046 for ASIS navigation purposes.
10047 (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
10048 Call new subprogram.
10050 2014-02-25 Yannick Moy <moy@adacore.com>
10052 * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
10054 2014-02-25 Doug Rupp <rupp@adacore.com>
10056 * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
10057 (__gnat_adjust_context_for_raise): Bump the PC by 2.
10059 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10061 * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
10062 misplaced IS, add a statement sequence to improper body only if
10063 one has not been parsed already.
10065 2014-02-25 Ed Schonberg <schonberg@adacore.com>
10067 * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
10068 mismatch when multidimensional array is updated with a single
10071 2014-02-25 Yannick Moy <moy@adacore.com>
10073 * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
10074 sem_ch6.adb: Mark most references to SPARK RM in error messages
10077 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10079 * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
10080 appears in a list of basic declarations, complete the tree with
10081 an empty statement list, to prevent cascaded errors and crashes
10082 if semantic analysis is attempted.
10084 2014-02-24 Thomas Quinot <quinot@adacore.com>
10086 * g-sercom-mingw.adb (Open): Fix incorrect test for error return
10088 * erroutc.adb: Minor reformatting.
10090 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10092 * sem_prag.adb (Check_Clause_Syntax): Account
10093 for a solitary input item in a dependency list.
10095 2014-02-24 Yannick Moy <moy@adacore.com>
10097 * gnat1drv.adb (Adjust_Global_Switches): Do not
10098 use validity checks at all in GNATprove_Mode.
10100 2014-02-24 Robert Dewar <dewar@adacore.com>
10102 * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
10103 atree.adb, atree.ads: Minor reformatting.
10105 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10107 * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
10108 global and dependence refinement when SPARK_Mode is off.
10109 * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
10110 state refinement when SPARK_Mode is off.
10111 * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
10112 variable Decl. Insert the generated pragma for Refined_State
10113 after a potential pragma SPARK_Mode.
10114 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
10115 constant Deps. Remove local variable Expr. Check the syntax
10116 of pragma Depends when SPARK_Mode is off. Factor out the
10117 processing for extra parenthesis around individual clauses.
10118 (Analyze_Global_In_Decl_List): Items is now a constant. Check
10119 the syntax of pragma Global when SPARK_Mode is off.
10120 (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
10121 Initializes when SPARK_Mode is off.
10122 (Analyze_Part_Of): Check
10123 the syntax of the encapsulating state when SPARK_Mode is off.
10124 (Analyze_Pragma): Check the syntax of pragma Abstract_State when
10125 SPARK_Mode is off. Move the declaration order check with respect
10126 to pragma Initializes to the end of the processing. Do not verify
10127 the declaration order for pragma Initial_Condition when SPARK_Mode
10128 is off. Do not complain about a useless package refinement when
10130 (Analyze_Refined_Depends_In_Decl_Part): Refs
10131 is now a constant. Check the syntax of pragma Refined_Depends
10132 when SPARK_Mode is off.
10133 (Analyze_Refined_Global_In_Decl_Part):
10134 Check the syntax of pragma Refined_Global when SPARK_Mode is off.
10135 (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
10136 Refined_State when SPARK_Mode is off.
10137 (Check_Dependence_List_Syntax): New routine.
10138 (Check_Global_List_Syntax): New routine.
10139 (Check_Initialization_List_Syntax): New routine.
10140 (Check_Item_Syntax): New routine.
10141 (Check_State_Declaration_Syntax): New routine.
10142 (Check_Refinement_List_Syntax): New routine.
10143 (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
10145 2014-02-24 Robert Dewar <dewar@adacore.com>
10147 * a-tags.adb, s-os_lib.adb: Minor reformatting.
10149 2014-02-24 Thomas Quinot <quinot@adacore.com>
10151 * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
10152 strerror message, not just numeric errno value.
10154 2014-02-24 Doug Rupp <rupp@adacore.com>
10156 * raise-gcc.c (exception_class_eq): Make endian neutral.
10158 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10160 * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
10161 flag, and reset Etype and Analyzed attributes unconditionally
10162 when copying a tree that may be partly analyzed.
10163 * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
10164 * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
10165 within a subprogram body and applies to it, remove it from the
10166 body before making a copy of it, to prevent spurious errors when
10167 analyzing the copied body.
10169 2014-02-24 Thomas Quinot <quinot@adacore.com>
10171 * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
10172 * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
10173 vxWorks.h has been included. Also ensure that file attributes
10174 related definitions are output even in cases where socket support
10176 * a-tags.adb: Code clean up.
10177 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
10178 instead of -I to add the main ada source directory to the header
10179 search path, in order to avoid conflict between our own "types.h"
10180 and VxWork's <types.h>.
10182 2014-02-24 Robert Dewar <dewar@adacore.com>
10184 * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
10185 * debug.adb: Remove documentation of -gnatd.X, no longer used.
10186 * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
10188 2014-02-24 Bob Duff <duff@adacore.com>
10190 * gnat_ugn.texi: Improve documentation of gnatpp.
10192 2014-02-24 Thomas Quinot <quinot@adacore.com>
10194 * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
10195 g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
10196 g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
10197 g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
10198 a chars_ptr, because on Windows this is a renaming of
10199 Socket_Error_Message.
10201 2014-02-24 Robert Dewar <dewar@adacore.com>
10203 * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
10204 s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
10205 a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
10208 2014-02-24 Thomas Quinot <quinot@adacore.com>
10210 * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
10211 that the source directory containing s-oscons-tmplt.c is on the
10212 include path, so that all internal header files are available.
10214 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10216 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
10217 domain of iteration is an attribute reference 'Old, this is an
10218 Ada 2012 iterator and the loop must be rewritten as such.
10220 2014-02-24 Thomas Quinot <quinot@adacore.com>
10222 * s-fileio.adb (Errno_Message): Remove, use shared version from
10224 * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
10225 * g-stseme (Socket_Error_Message): Reimplement in terms of new
10227 * g-socthi.ads, g-socthi.adb: Change profile of
10228 Socket_Error_Message to return String to allow the above.
10229 * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
10230 * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
10231 * g-socthi-vxworks.ads: Update to account for the above profile
10233 * a-tags.adb: Use strlen builtin binding provided by s-crtl.
10234 * s-crtl.ads (strncpy): New procedure.
10235 * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
10236 Use import from s-crtl.
10237 * a-envvar.adb, osint.adb: Use imports of C runtime functions
10238 from s-crtl instead of re-importing locally.
10240 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10242 * sem_prag.adb (Analyze_Global_Item): Emit the
10243 variable related checks concerning volatile objects only when
10246 2014-02-24 Robert Dewar <dewar@adacore.com>
10248 * sem_ch5.adb (Analyze_Iterator_Specification): use
10249 Error_Msg_Ada_2012_Feature.
10251 2014-02-24 Jose Ruiz <ruiz@adacore.com>
10253 * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
10254 No_Local_Timing_Events and No_Specific_Termination_Handlers
10255 must be set, according to the Ravenscar profile definition
10258 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10260 * sem_ch6.adb (Analyze_Expression_Function): If this is a
10261 completion, freeze return type and its designated type if needed.
10263 2014-02-24 Thomas Quinot <quinot@adacore.com>
10265 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10266 'Address): When moving initialization statements to a freeze
10267 entity, keep them under a single node (i.e. do not unwrap
10268 expressions with actions), and set the Initialization_Statements
10269 attribute again so that processing of a later pragma Import can
10272 2014-02-24 Claire Dross <dross@adacore.com>
10274 * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
10275 a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
10276 a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
10277 Left/Right to First_To_Previous/Current_To_Last.
10279 2014-02-24 Thomas Quinot <quinot@adacore.com>
10281 * adaint.h (struct file_attributes): New component "error"
10282 (__gnat_error_attributes): Accessor for the above.
10283 * adaint.c (__gnat_error_attributes): New subprogram
10284 (__gnat_stat): Fix returned value (expect errno value)
10285 (__gnat_stat_to_attr): Add management of error component (set to
10286 stat errno value, except for missing files where it is set to 0,
10287 and exists is set to 0).
10288 * osint.ads (File_Attributes_Size): Update per change above,
10289 also clarify documentation.
10290 * s-filatt.ads: New file, binding to file attributes related
10292 * Makefile.rtl (s-filatt): New runtime unit.
10293 * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
10294 to library function if not available on target).
10295 * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
10296 * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
10297 SIZEOF_struct_dirent_alloc): New constants.
10298 * Make-generated.in (s-oscons.ads): Now requires adaint.h.
10299 * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
10300 Perform appropriate error checking if stat fails (do not just
10301 ignore existing files if stat fails)
10302 * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
10305 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10307 * sem_prag.adb (Analyze_Global_Item): Move the check concerning
10308 the use of volatile objects as global items in a function to
10309 the variable related checks section.
10310 * sem_util.adb (Async_Readers_Enabled): Directly call
10311 Has_Enabled_Property.
10312 (Async_Writers_Enabled): Directly call Has_Enabled_Property.
10313 (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
10314 (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
10315 (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
10316 Update the comment on usage. State_Has_Enabled_Property how handles
10317 the original logic of the routine. Add processing for variables.
10318 (State_Has_Enabled_Property): New routine.
10319 (Variable_Has_Enabled_Property): New routine.
10321 2014-02-24 Robert Dewar <dewar@adacore.com>
10323 * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
10324 Minor reformatting.
10325 * atree.ads, atree.adb (Node35): New function.
10326 (Set_Node35): New procedure.
10327 * debug.adb: Define new debug flag -gnatd.X.
10328 * einfo.ads, einfo.adb (Import_Pragma): New field.
10329 * freeze.adb (Wrap_Imported_Procedure): New procedure (not
10330 really active yet, has to be activated with -gnatd.X.
10331 * sem_prag.adb (Set_Imported): Set new Import_Pragma
10332 field (Set_Imported): Don't set Is_Public (see
10333 Freeze.Wrap_Imported_Subprogram)
10334 * par-ch3.adb (P_Component_List): Handle unexpected null component.
10336 2014-02-24 Yannick Moy <moy@adacore.com>
10338 * sem_ch3.adb: Correct reference to SPARK RM in error messages.
10339 * gnat_rm.texi: Correct documentation of attribute Update.
10341 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10343 * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
10344 iterator in older versions of Ada.
10346 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10348 * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
10349 par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
10351 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10353 * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
10354 indexed_components that are instances of Ada 2012 container
10355 indexing operations. Analysis and resolution of such nodes
10356 is performed on the attribute, and the original source is
10357 preserved for ASIS operations. If expansion is enabled, the
10358 indexed component is replaced by the value of this attribute,
10359 which is in a call to an Indexing aspect, in most case wrapped
10360 in a dereference operation.
10361 * sem_ch4.adb (Analyze_Indexed_Component): Create
10362 Generalized_Indexing attribute when appropriate.
10363 (Analyze_Call): If prefix is not overloadable and has an indexing
10364 aspect, transform into an indexed component so it can be analyzed
10365 as a potential container indexing.
10366 (Analyze_Expression): If node is an indexed component with a
10367 Generalized_ Indexing, do not re-analyze.
10368 * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
10369 of an indexed_component that has been transformed into a container
10370 indexing operation.
10371 (Resolve_Indexed_Component): Call the above when required.
10372 (Resolve): Do not insert an explicit dereference operation on
10373 an indexed_component whose type has an implicit dereference:
10374 the operation is inserted when resolving the related
10375 Generalized_Indexing.
10377 2014-02-24 Olivier Ramonat <ramonat@adacore.com>
10379 * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
10382 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10384 * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
10386 (Inconsistent_Mode_Error): Remove leading spaces in error messages.
10387 Merge the expected and available mode errors.
10388 (Report_Unused_Constituents): Remove leading spaces in error messages.
10389 (Report_Unused_States): Remove leading spaces in error messages.
10391 2014-02-24 Thomas Quinot <quinot@adacore.com>
10393 * par_sco.adb (Traverse_One): Refine categorization of statement
10396 2014-02-24 Robert Dewar <dewar@adacore.com>
10398 * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
10399 Pure_05, Pure_12 and Preelaborate_05.
10400 * gnat_rm.texi: Update accordingly.
10401 * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
10402 pragmas Document one argument form of Ada_12/Ada_2012 pragmas
10403 Recognize one argument form of these pragmas only in GNAT mode
10406 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10408 * s-dimmks.ads: Replace symbol for temperature, previously the
10409 Greek letter Theta, by the ASCII @ sign.
10410 * s-diflio.ads: ditto.
10412 2014-02-24 Robert Dewar <dewar@adacore.com>
10414 * exp_ch4.adb: Minor code reorganization (use OR for boolean
10416 * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
10418 2014-02-24 Ben Brosgol <brosgol@adacore.com>
10420 * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
10421 so that references to gnatmem and ASIS tools do not appear in the FSF
10422 edition of the GNAT User's Guide.
10424 2014-02-24 Yannick Moy <moy@adacore.com>
10426 * freeze.adb (Freeze_Entity): Do not issue warning
10427 for pre/post being ignored on imported subprogram in GNATprove
10430 2014-02-24 Robert Dewar <dewar@adacore.com>
10432 * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
10433 stand.ads, sem_eval.adb: Minor reformatting.
10435 2014-02-24 Yannick Moy <moy@adacore.com>
10437 * sem_prag.adb: Minor rewording in error message.
10439 2014-02-24 Johannes Kanig <kanig@adacore.com>
10441 * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
10442 GNATprove_mode, gnat2why doesn't need nor use these types.
10444 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10446 * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
10447 target, in the case of signed integer exponentiation that uses a
10448 run-time routine, always select the Exp_* versions, since overflow
10449 checking is automatically done by AAMP arithmetic instructions.
10451 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10453 * sem_ch13.adb (Analyze_Aspect_Specifications):
10454 When the related context is a package instace, insert pragma
10455 Abstract_State after all internally-generated renamings related
10456 to the instance "header".
10458 2014-02-24 Ed Schonberg <schonberg@adacore.com>
10460 * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
10462 * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
10463 call to an abstract subprogram is legal if it appears in a
10464 pre/postcondition of another abstract operation.
10466 2014-02-24 Sergey Rybin <rybin@adacore.com frybin>
10468 * gnat_ugn.texi: Misc updates.
10470 2014-02-24 Hristian Kirtchev <kirtchev@adacore.com>
10472 * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
10474 2014-02-24 Gary Dismukes <dismukes@adacore.com>
10476 * layout.adb (Layout_Variant_Record): Instantiate
10477 Generic_Check_Choices and call Check_Choices before calling
10478 Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
10479 set to prevent generating incorrect discriminant-checking
10480 functions for 'others' variants (functions that unconditionally
10481 return True rather than accounting for the values covered by the
10483 * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
10484 Formal_Derived_Matching.
10485 (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
10486 * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
10487 Formal_Derived_Matching formal to Subtypes_Statically_Match.
10488 (Subtypes_Statically_Match): Suppress the Object_Size matching
10489 test in the case where Formal_Derived_Matching is True.
10490 * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
10491 True for Formal_Derived_Matching_Formal on the call to
10492 Subtypes_Statically_Compatible.
10494 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
10496 * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
10498 2014-02-23 Eric Botcazou <ebotcazou@adacore.com>
10500 * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
10501 Look through a conversion between original and packable version to get
10503 (build_component_ref): Rework comment and fix formatting.
10505 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
10507 * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
10508 project-specific options.
10510 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10512 * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
10513 not Constraint_Error.
10514 * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
10515 * sem_ch5.adb: Code clean up.
10517 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
10519 * sem_prag.adb (Usage_Error): Remove local
10520 constant Typ. Remove the specialized diagnostics for unconstrained
10521 or tagged items as those are not part of the explicit input set
10522 of the related subprogram and should not be flagged.
10524 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10526 * sem_attr.adb: Add guard to preserve all errors.
10528 2014-02-20 Vincent Celier <celier@adacore.com>
10530 * switch-m.adb (Normalize_Compiler_Switches): Take into account
10531 switches that are recorded in ALI files: -gnateA, -gnateE,
10532 -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
10534 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10536 * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
10537 of an element iterator form over a formal container with an
10539 * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
10540 to create declaration and loop statements for both forms of
10541 container iterators.
10542 (Expand_Formal_Container_Element_Iterator): New procedure
10543 to handle loops of the form "for E of C" when C is a formal
10545 (Expand_Formal_Container_Iterator): Code cleanup.
10547 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
10549 * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
10550 (Analyze_Contract_Case): Remove the use of
10551 "may". Replace "aspect Contract_Cases" to avoid categorization
10552 of aspect vs pragma.
10553 (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
10554 (Analyze_Global_Item): Remove
10555 the use of "formal", specify the subprogram. Split the
10556 error message about a state with visible refinement into
10557 two. Remove the use of "global" from "volatile global item".
10558 (Analyze_Initialization_Item): Ensure that the SPARK RM reference
10560 (Analyze_Input_Output): Update the call to
10561 Check_Mode. Specify the duplicated item. Reword the error
10562 message concerning an input of a null output list. Use "\"
10563 for error message continuation.
10564 (Analyze_Part_Of): Remove
10565 the use of "may". Use "\" for error message continuation.
10566 (Analyze_Refined_Depends_In_Decl_Part): Update the error
10567 message concerning a useless refinement to match the format
10569 (Analyze_Refined_Global_In_Decl_Part): Reword the error message
10570 concerning a useless refinement.
10571 (Analyze_Refinement_Clause): Use "\" for error message continuation.
10572 (Check_Constituent_Usage): Use "\" for error message continuation.
10573 (Check_Dependency_Clause): Use "\" for error message continuation.
10574 (Check_Matching_Constituent): Use "\" for error message continuation.
10575 (Check_Missing_Part_Of): Use "\" for error message continuation.
10576 (Check_Mode): Renamed to
10577 Check_Role. Update the comment on usage. Redo the error reporting
10579 (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
10580 message continuation.
10581 (Find_Mode): Renamed to Find_Role. Update the parameter profile along
10582 with comment on usage. Update all occurrences of Is_Input and Is_Output.
10583 (Inconsistent_Mode_Error): Use "\" for error message continuation.
10584 (Input_Match): Use "\" for error message continuation.
10585 (Role_Error): New routine.
10586 (Set_Convention_From_Pragma): Use "\" for error message continuation.
10587 (Usage_Error): Add local variable Error_Msg. Build specialized error
10588 message showcasing the offending item kind. Redo the diagnostics for
10589 unconstrained types.
10591 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10593 * exp_util.adb (Is_Iterated_Container): Use high-level primitives
10594 to determine whether a type is a container type, rather than
10595 examining only its type declaration, so that subtypes and derived
10596 types are handled properly.
10598 2014-02-20 Sergey Rybin <rybin@adacore.com frybin>
10600 * gnat_ugn.texi: gnatmetric: add description of project-specific
10603 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10605 * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
10606 all choices in an association for a record type have the same
10607 type, as is done for record aggregates.
10609 2014-02-20 Robert Dewar <dewar@adacore.com>
10611 * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
10612 Unmodified rather than Warnings (Off). Make comments
10613 uniform in the four affected units.
10615 2014-02-20 Robert Dewar <dewar@adacore.com>
10617 * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10618 Object_Size): For non-scalar types allow any value that is a
10620 * gnat_rm.texi: Document Object_Size for composites more clearly.
10622 2014-02-20 Yannick Moy <moy@adacore.com>
10624 * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
10626 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10628 * stand.ads: Raise_Type: new predefined entity, used as the type
10629 of a Raise_Expression prior to resolution.
10630 * cstand.adb: Build entity for Raise_Type.
10631 * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
10632 initial type of the node.
10633 * sem_type.adb (Covers): Raise_Type is compatible with all
10635 * sem_res.adb (Resolve): Remove special handling of Any_Type on
10636 Raise_Expression nodes.
10637 (Resolve_Raise_Expression): Signal ambiguity if the type of the
10638 context is still Raise_Type.
10640 2014-02-20 Robert Dewar <dewar@adacore.com>
10642 * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
10643 mismatching predicates.
10644 * sem_ch6.adb (Check_Conformance): Give better messages on
10645 predicate mismatch.
10646 * sem_eval.adb (Predicates_Match): Move to spec.
10647 * sem_eval.ads (Predicates_Match): Moved here from body.
10649 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10651 * a-cbmutr.adb: Use default value in Insert_Child.
10653 2014-02-20 Vincent Celier <celier@adacore.com>
10655 * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
10656 Stringt.Initialize in all project aware tools.
10658 2014-02-20 Doug Rupp <rupp@adacore.com>
10660 * gnat_ugn.texi: Document gnatbind -X option.
10661 * vms_data.ads: Minor warnings documentation reformatting.
10663 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10665 * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
10666 procedure for a base type.
10668 2014-02-20 Robert Dewar <dewar@adacore.com>
10670 * sem_ch4.adb (Analyze_Case_Expression): Get type from first
10671 expression with type info.
10672 * sem_ch13.adb: Minor reformatting.
10673 * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
10674 False if predicates do not match on the two types.
10676 2014-02-20 Arnaud Charlet <charlet@adacore.com>
10678 * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
10679 In Relaxed_RM_Semantics mode, allow any static integer value,
10680 for compatibility with other compilers.
10682 2014-02-20 Vincent Celier <celier@adacore.com>
10684 * errutil.adb (Initialize): Properly initialize entry in table
10685 Warnings when warnings are suppressed.
10687 2014-02-20 Robert Dewar <dewar@adacore.com>
10689 * s-os_lib.ads: Add warning about non-portability of Rename_File.
10690 * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
10691 * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
10692 * gnat_ugn.texi: Document no warnings on junk variable names.
10693 * layout.adb: Minor code reorganization (use Ekind_In).
10694 * stringt.adb: Move initialization of Null_String_Id to Initialize
10697 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10699 * sem_ch13.adb: Initialize optional Element_Id.
10701 2014-02-20 Robert Dewar <dewar@adacore.com>
10703 * s-os_lib.ads (Rename_File): Minor commment addition.
10705 2014-02-20 Thomas Quinot <quinot@adacore.com>
10707 * einfo.ads: Minor reformatting.
10709 2014-02-20 Hristian Kirtchev <kirtchev@adacore.com>
10711 * aspects.adb (Exchange_Aspects): New routine.
10712 * aspects.ads (Exchange_Aspects): New routine.
10713 * atree.adb (Rewrite): Do not check whether the save node has
10714 aspects as it never will, instead check the node about to be clobbered.
10715 * einfo.adb (Write_Field25_Name): Abstract_States can appear in
10716 entities of generic packages.
10717 * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
10718 pointer of an aspect specification list after rewriting takes place.
10719 * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
10720 specifications of the generic template and the copy used for analysis.
10721 * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
10722 the aspect specifications of the generic template and the
10723 copy used for analysis.
10724 (Analyze_Package_Instantiation): Propagate the aspect specifications
10725 from the generic template to the instantiation.
10726 (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
10727 specifications from the generic template to the instantiation.
10728 * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
10729 Abstract_State, Initializes and Initial_Condition when they
10730 apply to a package instantiation.
10732 2014-02-20 Robert Dewar <dewar@adacore.com>
10734 * stringt.adb: Add call to Initialize in package initialization.
10736 2014-02-20 Robert Dewar <dewar@adacore.com>
10738 * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
10739 a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
10740 a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
10741 a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
10744 2014-02-20 Bob Duff <duff@adacore.com>
10746 * s-os_lib.ads: Minor: Remove incorrect comment.
10748 2014-02-20 Robert Dewar <dewar@adacore.com>
10750 * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
10752 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10754 * a-cborma.adb (Assign): When creating a node without a specified
10755 element, insert an uninitialized element in the map, because
10756 the instance may provide an element type with a default
10757 initialization, e.g a scalar with a Default_Value aspect.
10758 * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
10759 (Insert): In the version without explicit element, provide an
10760 uninitialized element, as above.
10761 * a-cbdlli.adb (Append): In the version without explicit element,
10762 provide an uninitalized element, as above.
10763 (Allocate): Remove unused version.
10765 2014-02-20 Robert Dewar <dewar@adacore.com>
10767 * sem_elab.adb: Minor code reorganization (use Nkind_In).
10768 * stringt.adb: Remove temporary pragma Warnings (Off).
10769 * stringt.ads: Add pragma Elaborate_Body to ensure initialization
10772 2014-02-20 Matthew Heaney <heaney@adacore.com>
10774 * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
10777 2014-02-20 Ed Schonberg <schonberg@adacore.com>
10779 * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
10780 properly the cursor type for subsequent volatile testing in SPARK
10781 mode, when domain is a formal container with an Iterabe aspect.
10783 2014-02-20 Robert Dewar <dewar@adacore.com>
10785 * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
10786 (Set_Specific_Warning_Off): Add Reason argument.
10787 * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
10788 (Set_Specific_Warning_Off): Add Reason argument.
10789 * erroutc.adb (Warnings_Entry): Add Reason field
10790 (Specific_Warning_Entry): Add Reason field.
10791 (Warnings_Suppressed): return String_Id for Reason.
10792 (Warning_Specifically_Suppressed): return String_Id for Reason.
10793 * erroutc.ads (Warnings_Entry): Add Reason field.
10794 (Specific_Warning_Entry): Add Reason field.
10795 (Set_Specific_Warning_Off): Add Reason argument.
10796 (Set_Warnings_Mode_Off): Add Reason argument.
10797 (Warnings_Suppressed): return String_Id for Reason.
10798 (Warning_Specifically_Suppressed): return String_Id for Reason.
10799 * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
10800 (Warning_Specifically_Suppressed): returns String_Id for Reason
10801 * gnat_rm.texi: Document that Warning parameter is string literal
10802 or a concatenation of string literals.
10803 * par-prag.adb: New handling for Reason argument.
10804 * sem_prag.adb (Analyze_Pragma, case Warning): New handling
10805 for Reason argument.
10806 * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
10807 * sem_warn.ads (Warnings_Off_Entry): Add reason field.
10808 * stringt.adb: Set Null_String_Id.
10809 * stringt.ads (Null_String_Id): New constant.
10811 2014-02-20 Robert Dewar <dewar@adacore.com>
10813 * einfo.ads: Minor comment addition: Etype of package is
10814 Standard_Void_Type.
10815 * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
10816 exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
10817 exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
10818 exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
10819 freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
10820 sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10821 sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
10822 sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
10823 Replace all calls with calls to New_Occurrence_Of.
10825 2014-02-20 Robert Dewar <dewar@adacore.com>
10827 * par-util.adb (Ignore, case of right paren): Make this a
10830 2014-02-19 Robert Dewar <dewar@adacore.com>
10832 * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
10833 * debug.adb: Remove -gnatd.X switch, no longer used.
10834 * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
10837 2014-02-19 Bob Duff <duff@adacore.com>
10839 * g-socket.ads: Minor: Correct some comments.
10841 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10843 * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
10845 2014-02-19 Arnaud Charlet <charlet@adacore.com>
10847 * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
10848 an error on out of range priorities if Relaxed_RM_Semantics.
10849 * sem_prag.adb (Analyze_Pragma): Ditto.
10851 2014-02-19 Bob Duff <duff@adacore.com>
10853 * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
10854 where F denotes the renaming of an enumeration literal, and
10855 issue a specialized error message.
10857 2014-02-19 Matthew Heaney <heaney@adacore.com>
10859 * a-chtgop.ads (Checked_Index): New operation.
10860 (Next): Changed mode of hash table.
10861 * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
10862 (Generic_Read, Reserve_Capacity): Ditto.
10863 (Generic_Equal): Detect tampering.
10864 (Next): Changed mode of hash table, detect tampering.
10865 * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
10867 (Find): Changed mode of hash table.
10868 * a-chtgke.adb (Checked_Equivalent_Keys): New operation
10869 (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
10871 (Find): Changed mode of hash table, check for tampering.
10872 (Generic_Replace_Element): Check for tampering.
10873 * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
10874 * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
10875 operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
10877 (Find, Generic_Replace_Element): Check for tampering.
10878 * a-chtgbo.ads (Checked_Index): New operation.
10879 * a-chtgbo.adb (Checked_Index): New operation
10880 (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
10881 (Generic_Read, Next): Ditto.
10882 * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
10883 table (Difference, Intersection): Use variable view of
10884 source, detect tampering (Find, Is_Subset, Overlap): Use
10885 variable view of container (Symmetric_Difference, Union):
10886 Detect tampering (Vet): Use Checked_Index to detect tampering
10887 (Constant_Reference, Element, Find): Use variable view of
10889 (Update_Element_Preserving_Key): Detect tampering.
10890 * a-cbhase.adb (Difference, Find, Is_In): Use variable view
10892 (Is_Subset): Ditto.
10893 (Equivalent_Sets, Overlap): Use Node's Next component.
10894 (Vet): Use Checked_Index to detect tampering.
10895 (Constant_Reference, Element, Find): Use variable view of container.
10896 (Update_Element_Preserving_Key): Detect tampering.
10897 * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
10898 Element, Find): Use variable view of container.
10899 (Reference): Rename hash table component.
10900 (Vet): Use Checked_Index to detect tampering.
10902 2014-02-19 Arnaud Charlet <charlet@adacore.com>
10904 * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
10907 2014-02-19 Thomas Quinot <quinot@adacore.com>
10909 * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
10910 against calls without Def_Id.
10912 2014-02-19 Claire Dross <dross@adacore.com>
10914 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10915 a-cofove.ads: Add global annotations to subprograms.
10917 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
10919 * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
10920 constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
10921 Initial_Condition no longer requires the presence of pragma
10922 Initialized. Do not try to diagnose whether all variables mentioned in
10923 pragma Initializes also appear in Initial_Condition.
10924 (Collect_Variables): Removed.
10925 (Match_Variable): Removed.
10926 (Match_Variables): Removed.
10927 (Report_Unused_Variables): Removed.
10929 2014-02-19 Thomas Quinot <quinot@adacore.com>
10931 * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
10933 2014-02-19 Robert Dewar <dewar@adacore.com>
10935 * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
10938 2014-02-19 Vincent Celier <celier@adacore.com>
10940 * prj-part.adb (Parse_Single_Project): Use the fully resolved
10941 project path, with all symbolic links resolved, to check if the
10942 same project is imported with a different unresolved path.
10943 * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
10944 changed to Resolved_Path to reflect that all symbolic links
10947 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10949 * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
10950 from sem_ch13, for use elsewhere.
10951 * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
10952 * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
10953 cursor type on the loop variable when the iteration is over o
10956 2014-02-19 Vincent Celier <celier@adacore.com>
10958 * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
10959 for an empty Target (Check_Target): Never fail when an empty
10960 target is declared in the configuration project.
10962 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10964 * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
10965 the pragma comes fron a predicate aspect and the context is a
10966 record declaration within the scope that declares the type.
10968 2014-02-19 Robert Dewar <dewar@adacore.com>
10970 * gnat_rm.texi: Minor clarifications.
10971 * expander.adb, sem_aggr.adb: Add comments.
10973 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10975 * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
10976 applies to a subprogram body, the name is the current scope,
10977 rather than being declared in the current scope.
10978 (Analyze_Pragma, case No_Return): Handle properly a No_Return
10979 aspect applied to a subprogram body.
10981 2014-02-19 Ed Schonberg <schonberg@adacore.com>
10983 * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
10984 of overloaded subprograms, and fix bug in handling of primitive
10987 2014-02-19 Pascal Obry <obry@adacore.com>
10989 * s-os_lib.adb: Minor reformatting.
10991 2014-02-19 Yannick Moy <moy@adacore.com>
10993 * expander.adb (Expand): Do nothing inside generics.
10994 * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
10997 2014-02-19 Yannick Moy <moy@adacore.com>
10999 * exp_ch2.adb: Remove useless 'with' of unit Uintp.
11001 2014-02-19 Robert Dewar <dewar@adacore.com>
11003 * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
11004 * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
11007 2014-02-19 Claire Dross <dross@adacore.com>
11009 * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11010 a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
11012 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11014 * sem_ch3.adb (Analyze_Declarations): Analyze
11015 a package contract at the end of the private declarations (if
11016 applicable), otherwise analyze it and the end of the visible
11019 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11021 * style.adb (Missing_Overriding): If subprogram is an
11022 instantiation, place warning on the instance node itself,
11023 without mention of the original generic. Do not emit message
11024 if explicit Ada version is older than the introduction of the
11025 overriding indicator.
11027 2014-02-19 Yannick Moy <moy@adacore.com>
11029 * gnat_rm.texi: Doc clarifications.
11031 2014-02-19 Yannick Moy <moy@adacore.com>
11033 * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
11036 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11038 * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
11039 specified First primitive, rather than by name.
11040 (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
11041 and extend error checking for missing primitives and incorrect
11044 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11046 * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
11047 errors when a Synchronization aspect on an overriding protected
11048 operation does not match the given aspect on the overridden
11049 operation of an ancestor interface.
11051 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11053 * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
11054 (Check_Loop_Pragma_Placement): Update
11055 comment on usage. Remove local variables Orig_Stmt and
11056 Within_Same_Sequence. Check that the current Loop_Invariant or
11057 Loop_Variant pragma is grouped together with other such pragmas.
11058 (Is_Loop_Pragma): New routine.
11059 (Prev_In_Loop): Removed.
11061 2014-02-19 Robert Dewar <dewar@adacore.com>
11063 * par-ch6.adb (P_Return): For extended return, end column lines
11065 * par.adb: Minor documentation clarification.
11067 2014-02-19 Yannick Moy <moy@adacore.com>
11069 * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
11070 that Loop_Invariant and Loop_Variant appear consecutively.
11071 * gnat_rm.texi Update documentation of Loop_Invariant and
11072 Loop_Variant pragmas.
11074 2014-02-19 Robert Dewar <dewar@adacore.com>
11076 * debug.adb: Document -gnatd.X.
11077 * par-ch5.adb (P_If_Statement): Always check THEN, even if not
11079 (Check_Then_Column): Ditto.
11080 * styleg.adb (Check_Then): Allow THEN on line after IF.
11081 (Check_Then): Check THEN placement under control of -gnatd.X
11082 * styleg.ads (Check_Then): Now called even if THEN is not first
11084 * stylesw.ads (Style_Check_If_Then_Layout): Document new
11086 * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
11088 2014-02-19 Robert Dewar <dewar@adacore.com>
11090 * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
11091 a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
11092 prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
11093 vms_conv.adb: Fix bad layout of IF statements
11095 2014-02-19 Robert Dewar <dewar@adacore.com>
11097 * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
11099 2014-02-19 Robert Dewar <dewar@adacore.com>
11101 * exp_util.adb: Update comments.
11103 2014-02-19 Doug Rupp <rupp@adacore.com>
11105 * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
11106 * init.c (__gl_float_format): [VMS] New global.
11107 (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
11108 representation in effect.
11110 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11112 * exp_ch6.adb Add with and use clause for Exp_Prag.
11113 (Expand_Contract_Cases): Relocated to Exp_Prag.
11114 * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
11115 * exp_prag.adb Add with and use clauses for Checks and Validsw.
11116 (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
11117 structure of the expanded code to showcase the evaluation of
11118 attribute 'Old prefixes. Add local variable Old_Evals. Expand
11119 any attribute 'Old references found within a consequence. Add
11120 circuitry to evaluate the prefixes of attribute 'Old that
11121 belong to a selected consequence.
11122 (Expand_Old_In_Consequence): New routine.
11123 * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
11124 * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
11125 potentially unevaluated prefix is always evaluated.
11127 2014-02-19 Robert Dewar <dewar@adacore.com>
11129 * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
11130 (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
11131 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
11132 handling for the case of Modify_Tree_For_C, this approach did
11134 * exp_util.adb (Matching_Standard_Type): New function
11135 (Side_Effect_Free): New top level functions (from
11136 Remove_Side_Effects).
11137 * exp_util.ads (Side_Effect_Free): New top level functions
11139 * sinfo.ads: Minor comment updates.
11141 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11143 * exp_ch6.adb (Expand_Simple_Function_Return): If return
11144 type is unconstrained and uses the secondary stack, mark the
11145 enclosing function accordingly, to ensure that the value is not
11146 prematurely removed.
11148 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11150 * par.adb Alphabetize the routines in Par.Sync.
11151 (Resync_Past_Malformed_Aspect): New routine.
11152 * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
11153 variables. Code and comment reformatting. Detect missing
11154 parentheses on aspects [Refined_]Global and [Refined_]Depends
11155 with a non-null definition.
11156 * par-sync.adb: Alphabetize all routines in this separate unit.
11157 (Resync_Past_Malformed_Aspect): New routine.
11159 2014-02-19 Robert Dewar <dewar@adacore.com>
11161 * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
11162 if Esize values do not match.
11164 2014-02-19 Yannick Moy <moy@adacore.com>
11166 * sinfo.ads: Minor comment update.
11168 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11170 * atree.ads: Minor reformatting (change Entity_Info to Einfo).
11172 2014-02-19 Thomas Quinot <quinot@adacore.com>
11174 * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
11175 that has the No_Ctrl_Actions flag is a suitable node to be
11176 wrapped if the assigned expression has no finalization actions.
11177 * sem_eval.adb (Eval_Entity_Name): For a compile time known
11178 boolean value, mark the corresponding condition SCO as constant.
11180 2014-02-19 Robert Dewar <dewar@adacore.com>
11182 * exp_util.adb: Minor reformatting.
11183 * exp_util.ads (Matching_Standard_Type): New function.
11184 * exp_ch7.adb: Minor reformatting.
11186 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11188 * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
11189 to find declaration for Cursor, to handle properly the case of
11190 a discriminated iterable type.
11192 2014-02-19 Vincent Celier <celier@adacore.com>
11194 * gnatcmd.adb (GNATCmd): Always replace the object dirs of
11195 imported library projects with the library ALI dirs, when setting
11197 * prj-env.ads (Ada_Objects_Path): Correct comments about
11198 argument Including_Libraries.
11200 2014-02-19 Gary Dismukes <dismukes@adacore.com>
11202 * gnat_rm.texi: Minor spelling fixes.
11204 2014-02-19 Doug Rupp <rupp@adacore.com>
11206 * init.c: Remove unneeded code.
11207 * fe.h (Float_Format): New macro
11208 * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
11210 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11212 * sem_prag.adb (Check_Refined_Global_Item):
11213 A state or variable acts as a constituent only it is part of an
11214 encapsulating state and the state has visible refinement.
11216 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11218 * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
11219 postcondition for a function when the expression does not mention
11220 'Result but the function has in-out parameters.
11222 2014-02-19 Robert Dewar <dewar@adacore.com>
11224 * gnat_rm.texi: Add documentation on Value_Size forcing biased
11227 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11229 * lib-xref.ads Remove the small table of letter and symbol usage as we
11232 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11234 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
11235 messages depending on the offending misplaced aspect specifications.
11236 (Diagnose_Misplaced_Aspect_Specifications): New routine.
11238 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11240 * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
11241 for iterable aspect primitives.
11242 (Resolve_Iterable_Operation): Use expected signature of iterable
11243 aspect to resolve primitive when overloading is present.
11244 (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
11245 (Check_Signature): Removed.
11247 2014-02-19 Yannick Moy <moy@adacore.com>
11249 * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
11250 subunit in GNATprove_Mode.
11251 * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
11253 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11255 * lib-xref.ads Alphabetize the contents of table
11256 Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
11257 for E_Abstract_State. List all letters and symbols in use.
11258 * sem_prag.adb (Analyze_Abstract_State): Update all calls
11259 to Create_Abstract_State to reflect the new signature.
11260 (Create_Abstract_State): Change subprogram profile and update
11261 the comment on usage. Use the proper location of the state
11262 declaration when creating a new abstract state entity. Do not
11263 generate an external name, but simply reuse the name coming from
11264 the state declaration.
11266 2014-02-19 Robert Dewar <dewar@adacore.com>
11268 * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
11269 declarations get properly inserted in Modify_Tree_For_C mode.
11270 * sinfo.ads: Minor comment addition.
11272 2014-02-19 Robert Dewar <dewar@adacore.com>
11274 * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
11275 sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
11277 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11279 * style.adb (Missing_Overriding): Warning does not apply in
11280 language versions prior to Ada 2005.
11281 * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
11282 * sem_attr.adb: Add Attribute_Iterable where needed.
11283 * exp_attr.adb: ditto.
11284 * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
11285 handle loops and quantified expressions over types that have an
11286 iterable aspect. Called from Expand_Iterator_Loop.
11287 * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
11288 with Iterable aspect.
11289 * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
11290 subprograms specified in the Iterable aspect have the proper
11291 signature involving container and cursor.
11292 (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
11293 * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
11294 * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
11295 New procedure to retrieve one of the primitives First, Last,
11296 or Has_Element, from the value of the iterable aspect of a
11298 (Is_Container_Element): Predicate to recognize expressions
11299 that denote an element of one of the predefined containers,
11300 for possible optimization. This subprogram is not currently
11301 used, pending ARG discussions on the legality of the proposed
11302 optimization. Worth preserving for eventual use.
11303 (Is_Iterator): Recognize formal container types.
11304 * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
11306 2014-02-19 Robert Dewar <dewar@adacore.com>
11308 * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
11309 (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
11310 * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
11311 declarations from list of actions.
11312 * output.ads, output.adb (Delete_Last_Char): New procedure.
11313 * sinfo.ads: Document handling of Mod and expression with actions
11314 in Modify_Tree_For_C mode.
11316 2014-02-19 Ed Schonberg <schonberg@adacore.com>
11318 * par-ch9.adb (P_Task): Add a null statement to produce a
11319 well-formed task body when due to a previous syntax error the
11320 statement list is empty.
11322 2014-02-19 Hristian Kirtchev <kirtchev@adacore.com>
11324 * sem_prag.adb (Check_Dependency_Clause): Account
11325 for the case where a state with a non-null refinement matches a
11326 null output list. Comment reformatting.
11327 (Inputs_Match): Copy a solitary input to avoid an assertion failure
11328 when trying to match the same input in multiple clauses.
11330 2014-02-19 Gary Dismukes <dismukes@adacore.com>
11332 * sem_attr.adb: Minor typo fix.
11334 2014-02-18 Robert Dewar <dewar@adacore.com>
11336 * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
11337 from Int to Nat (Build_Unsigned_Integer_Type): New procedure
11338 (Create_Standard): Create new unsigned types.
11339 * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
11340 mode (Expand_N_Reference): Removed, problematic and not needed
11342 * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
11343 not needed for now.
11344 * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
11345 * expander.adb: Remove call to Expand_N_Reference (problematic,
11346 and not needed now).
11347 * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
11348 * stand.adb: Read and write unsigned type entities.
11349 * stand.ads: Add new unsigned types.
11351 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
11353 * sem_ch4.adb (Analyze_Call): Do not mark a function call
11354 as being inside an assertion expression as the flag is now removed.
11355 (Check_Ghost_Subprogram_Call): Do not query the
11356 In_Assertion_Expression flag as it is now removed, instead use
11357 a predicate function.
11358 * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
11359 In_Assertion_Expression flag as it is now removed, instead use
11360 a predicate function.
11361 * sem_prag.ads: Add new table Assertion_Expression_Pragma.
11362 * sem_util.adb Add with and use clause for Sem_Prag.
11363 (In_Assertion_Expression_Pragma): New routine.
11364 * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
11365 * sinfo.adb (In_Assertion_Expression): Removed.
11366 (Set_In_Assertion_Expression): Removed.
11367 * sinfo.ads Remove flag In_Assertion_Expression along with its
11369 (In_Assertion_Expression): Removed along with
11370 pragma Inline. (Set_In_Assertion_Expression): Removed along
11371 with pragma Inline.
11373 2014-02-18 Sergey Rybin <rybin@adacore.com frybin>
11375 * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
11376 used together with '-r', '-rf' or '-rnb' options.
11378 2014-02-18 Hristian Kirtchev <kirtchev@adacore.com>
11380 * sem_attr.adb (Analyze_Attribute): Comment
11381 and code reformatting. Use separate routines to check the
11382 legality of attribute 'Old in certain pragmas. Verify
11383 the use of 'Old, 'Result and locally declared entities
11384 within the prefix of 'Old.
11385 (Check_References_In_Prefix): New routine.
11386 (Check_Use_In_Contract_Cases): New routine.
11387 (Check_Use_In_Test_Case): New routine.
11389 2014-02-18 Vincent Celier <celier@adacore.com>
11391 * sem_aux.adb (Is_By_Reference_Type): For each components of
11392 a record type, check also if the component is volatile as it
11393 may have an aspect that makes it volatile. If it is, then the
11394 record type is a by reference type.
11396 2014-02-18 Robert Dewar <dewar@adacore.com>
11398 * exp_attr.adb: Minor reformatting.
11399 * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
11400 * exp_util.adb (Remove_Side_Effects): Add conditional expressions
11401 as another case where we don't generate N_Reference nodes for
11403 * expander.adb (Expand): Add call to Expand_N_Reference.
11405 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11407 * sem_prag.adb (Analyze_Refined_Pragma): Remove
11408 local variable Pack_Spec. Refinement pragmas may now apply to
11409 bodies of both visible and private subprograms.
11411 2014-02-06 Robert Dewar <dewar@adacore.com>
11413 * exp_attr.adb (Expand_Loop_Entry_Attribute):
11414 Minor change (Attr => N) (Expand_Pred_Succ): New name
11415 Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
11416 Max): Expand into if expression if Modify_Tree_For_C mode.
11417 (Expand_N_Attribute_Reference, case Min): ditto
11418 * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
11421 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11423 * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
11424 predicate check if this is an internal declaration with
11425 No_Initialization set, as for an expanded aggregate component.
11427 2014-02-06 Doug Rupp <rupp@adacore.com>
11429 * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
11430 conditions with severity of "SUCCESS" or "INFORMATIONAL".
11432 2014-02-06 Yannick Moy <moy@adacore.com>
11434 * sem_prag.adb (Analyze_Pragma): Analyze pragma
11435 Debug rewritten node before rewriting it as a null statement in
11438 2014-02-06 Robert Dewar <dewar@adacore.com>
11440 * sem_attr.adb (Min_Max): New procedure.
11441 (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
11444 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11446 * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
11449 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11451 * sem_prag.adb (Analyze_Abstract_State): Update
11452 all calls to Create_Abstract_State to pass the proper state
11454 (Create_Abstract_State): Add new formal parameter
11455 State_Decl along with comment on usage. Establish a link between
11456 the abstract state entity and the state declaration.
11458 2014-02-06 Robert Dewar <dewar@adacore.com>
11460 * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
11461 comparison of unordered enumeration type.
11462 (Analyze_Attribute, case Max): Check for improper comparison of
11463 unordered enumeration type.
11464 * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
11466 * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
11467 Moved here from Sem_Res.
11469 2014-02-06 Robert Dewar <dewar@adacore.com>
11471 * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
11474 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11476 * sem_ch6.adb (Process_Formals): Error message reformatting.
11478 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11480 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
11481 variable Spec. Do not inherit the null indicator from the
11482 subprogram body when generating the spec.
11484 2014-02-06 Robert Dewar <dewar@adacore.com>
11486 * casing.adb (Determine_Casing): Consider SPARK_Mode to be
11489 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11491 * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
11492 when the function has a foreign convention, but not if only the
11493 limited return type has such a convention.
11495 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11497 * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
11498 variable Spec. Comment reformatting. Use Copy_Separate_Tree
11499 rather than New_Copy_Tree when building the corresponding
11500 subprogram declaration.
11502 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11504 * sem_prag.adb (Analyze_Global_Item): Remove
11505 the mode-related checks on abstract states with enabled external
11507 (Property_Error): Removed.
11509 2014-02-06 Javier Miranda <miranda@adacore.com>
11511 * lib-xref.adb (Generate_Reference): When
11512 generating the reference to the first private entity take care
11513 of handling swapped entities.
11515 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11517 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11520 2014-02-06 Robert Dewar <dewar@adacore.com>
11522 * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
11523 than the word size when operating in Modify_Tree_For_C mode.
11524 * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
11526 2014-02-06 Robert Dewar <dewar@adacore.com>
11528 * erroutc.adb (Warning_Specifically_Suppressed.Matches):
11529 compare is case insensitive.
11530 * gnat_rm.texi: Document that string compare for Warnings Off
11531 is now case insensitive.
11533 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
11535 * gnat_rm.texi: Small wording tweak.
11537 2014-02-06 Pascal Obry <obry@adacore.com>
11539 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
11540 and Included_Artifact_Patterns attribute definitions.
11542 2014-02-06 Yannick Moy <moy@adacore.com>
11544 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
11545 SPARK_Mode pragma component for all subprograms, including stubs.
11547 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11549 * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
11550 the configuration options of the enclosing context in a
11552 (Analyze_Subprogram_Body_Stub): Maintain the
11553 configuration options of the enclosing context in a stack-like
11556 2014-02-06 Robert Dewar <dewar@adacore.com>
11558 * debug.adb: -gnatd.u sets Modify_Tree_For C
11559 * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
11560 if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
11561 (Expand_N_Op_Arithmetic_Right_Shift): ditto.
11562 * exp_intr.adb (Expand_Shift): Call expander so we do
11563 Modify_Tree_For_C expansions.
11564 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11567 2014-02-06 Fedor Rybin <frybin@adacore.com>
11569 * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
11570 after the phase 1 of the processing of each aggregated project
11571 to get access to project trees of aggregated projects.
11572 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
11573 If specified, On_New_Tree_Loaded is called after each aggregated
11574 project has been processed succesfully.
11575 (Process): new parameter On_New_Tree_Loaded.
11576 * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
11577 callback added after processing of each aggregated project.
11578 (Recursive_Process): new parameter On_New_Tree_Loaded.
11579 (Process): new parameter On_New_Tree_Loaded.
11580 (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
11581 * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
11582 On_New_Tree_Loaded.
11583 * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
11584 On_New_Tree_Loaded.
11586 2014-02-06 Bob Duff <duff@adacore.com>
11588 * gnat_ugn.texi: Implement --insert-blank-lines and
11589 --preserve-blank-lines switches.
11591 2014-02-06 Sergey Rybin <rybin@adacore.com frybin>
11593 * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11596 2014-02-06 Eric Botcazou <ebotcazou@adacore.com>
11598 * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
11599 of the pragma on individual objects.
11601 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11603 * einfo.adb Node29 is now used as BIP_Initialization_Call.
11604 (BIP_Initialization_Call): New routine.
11605 (Set_BIP_Initialization_Call): New routine.
11606 (Write_Field29_Name): Add an entry for constants and variables.
11607 * einfo.ads Add new attribute BIP_Initialization_Call and update
11608 its usage in nodes.
11609 (BIP_Initialization_Call): New routine along with pragma Inline.
11610 (Set_BIP_Initialization_Call): New routine along with pragma Inline.
11611 * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
11612 Add local declaration Res_Decl. Capture the build-in-place
11613 initialization call when the related object declaration has
11614 created a transient block.
11615 * exp_ch7.adb (Process_Transient_Objects): Add local variable
11616 Fin_Insrt. Recognize a scenario where an object declaration acts
11617 as a transient context and is initialized by a build-in-place
11620 2014-02-06 Pascal Obry <obry@adacore.com>
11622 * prj-util.adb (For_Interface_Sources): Fix handling of required
11623 bodies for aggregate libs.
11625 2014-02-06 Robert Dewar <dewar@adacore.com>
11627 * nlists.ads: Minor comment clarifications.
11629 2014-02-06 Robert Dewar <dewar@adacore.com>
11631 * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11633 * opt.ads (Modify_Tree_For_C): New flag.
11634 * output.ads, output.adb (Last_Char): New function.
11636 2014-02-06 Pascal Obry <obry@adacore.com>
11638 * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
11639 share/gpr for cross-builds.
11641 2014-02-06 Robert Dewar <dewar@adacore.com>
11643 * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
11644 Minor reformatting and code clean ups.
11646 2014-02-06 Pascal Obry <obry@adacore.com>
11648 * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
11649 * prj.ads: Minor typo fix in comment.
11651 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11653 * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
11654 local variable Expr. Flag clauses with extra parenthesis as this
11655 is not allowed by the syntax of the pragma. Code reformatting.
11657 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11659 * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
11660 variables. Rename variabme Tnn to Temp. Do not create a temporary
11661 if assertions are disabled. Find enclosing routine _Postconditions
11662 and insert the temporary that captures the value of the prefix
11663 before the routine.
11664 * exp_ch6.adb (Build_Postconditions_Procedure):
11665 Insert the generated _Postconditions routine
11666 before the first source declaration of the related
11668 (Insert_After_Last_Declaration): Removed.
11669 (Insert_Before_First_Source_Declaration): New routine.
11671 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11673 * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
11674 Utility to determine whether current expansion is for the body
11675 of a predefined primitive operation.
11676 (Make_Predicate_Check): Use Within_Internal_Subpgram
11677 * checks.adb (Apply_Predicate_Check): Use
11678 Within_Internal_Subprogram
11679 * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
11681 2014-02-06 Pascal Obry <obry@adacore.com>
11683 * prj.ads, prj-util.adb: Minor reformatting.
11685 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11687 * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
11688 Take into account the Split_PPC flag to ensure that conjuncts
11689 in a composite postcondition aspect are tested in source order.
11691 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11693 * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
11695 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
11696 illegal use of SPARK_Mode.
11697 (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
11698 * sem_prag.adb (Analyze_Pragma): Code reformatting.
11699 * sem_util.adb Add with and use clause for Aspects.
11700 (Check_SPARK_Mode_In_Generic): New routine.
11701 * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
11703 2014-02-06 Thomas Quinot <quinot@adacore.com>
11705 * a-calend.adb (Formatting_Operations.Split): Ensure that
11706 Time_Error is raised for invalid time values.
11708 2014-02-06 Arnaud Charlet <charlet@adacore.com>
11710 * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
11713 2014-02-06 Robert Dewar <dewar@adacore.com>
11715 * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
11716 * exp_ch3.adb (Build_Dcheck_Function): Set
11717 Is_Discriminant_Check_Function.
11719 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11721 * exp_ch7.adb (Is_Subprogram_Call): Inspect
11722 the original tree in certain cases where a construct has been
11723 factored out and replaced by a reference to a temporary.
11725 2014-02-06 Ed Schonberg <schonberg@adacore.com>
11727 * sem_ch3.adb (Process_Full_View): Fix typo in the order of
11728 parameters when propagating predicate function to full view.
11729 (Find_Type_Of_Object): Freeze base type of object type to catch
11730 premature use of discriminated private type without a full view.
11732 2014-02-06 Robert Dewar <dewar@adacore.com>
11734 * sprint.adb: Minor reformatting.
11736 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11738 * exp_ch4.adb (Process_Transient_Object): Add local variable
11739 Temp_Ins. When the transient object is initialized by an
11740 aggregate, the hook must capture the object after the last
11741 component assignment takes place.
11742 * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
11743 routine Is_Subprogram_Call.
11744 (Is_Subprogram_Call): Inspect an
11745 aggregate that has been heavily expanded for subprogram calls.
11746 (Process_Transient_Objects): Add local variables Expr, Ptr_Id
11747 and Temp_Ins. Remove the nested declare block and adjust the
11748 indentation. When the transient object is initialized by an
11749 aggregate, the hook must capture the object after the last
11750 component assignment takes place.
11752 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11754 * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
11755 external states with enabled properties that do not match the
11757 (Property_Error): New routine.
11758 * sem_res.adb (Property_Error): New routine.
11759 (Resolve_Actuals): Detect illegal uses of external variables with
11760 enabled properties in procedure calls that do not match the mode of
11761 the corresponding formal parameter.
11763 2014-02-06 Hristian Kirtchev <kirtchev@adacore.com>
11765 * sem_util.adb (Has_Enabled_Property): Rename
11766 formal parameter Prop_Nam to Property. Update the comment on usage
11767 and all occurrences in the body. Add local variable Prop_Nam. When
11768 inspecting a property with an expression, the property name
11769 appears as the first choice of the component association.
11771 2014-02-04 Robert Dewar <dewar@adacore.com>
11773 * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
11775 2014-02-04 Gary Dismukes <dismukes@adacore.com>
11777 * sem_aggr.adb: Change "runtime" to "run time" in warning message,
11778 for consistency with other messages.
11780 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11782 * exp_ch5.adb (Expand_Iterator_Loop): For a container element
11783 iterator, indicate that the element is a constant if the container
11784 type does not have a variable indexing aspect.
11785 * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
11786 marked as constant, do not reset its Ekind, to ensure that
11787 container elements in an element loop are not modified if the
11788 container (e.g. a hashed set) only has a constant indexing aspect.
11790 2014-02-04 Arnaud Charlet <charlet@adacore.com>
11792 * g-souinf.ads: Subprograms in this unit are actually not pure.
11793 * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
11794 * einfo.ads (Is_Pure): Update doc to match implementation.
11796 2014-02-04 Gary Dismukes <dismukes@adacore.com>
11798 * exp_ch13.adb: Minor spelling fix.
11800 2014-02-04 Robert Dewar <dewar@adacore.com>
11802 * opt.ads: Minor comment update.
11804 2014-02-04 Robert Dewar <dewar@adacore.com>
11806 * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
11807 instead of Replace.
11809 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11811 * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
11812 on null expressions if component type is non-null, when the
11813 corresponding association covers an empty range of index values.
11815 2014-02-04 Robert Dewar <dewar@adacore.com>
11817 * sinfo.ads: Further comments on N_Expression_With_Actions node.
11819 2014-02-04 Hristian Kirtchev <kirtchev@adacore.com>
11821 * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
11822 variables Out_Items and Ref_Global. Remove local constant
11823 Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
11824 and D8. Remove the useless collection of global items as this
11825 was a leftover from an earlier version of the routine. Move
11826 several routines out to avoid deep nesting and indentation.
11827 (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
11828 parameter Do_Checks to Post_Errors. Update the comment on usage.
11829 (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
11830 Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
11831 to Post_Errors. Update the comment on usage. Account for the
11832 case where a self referential state may have a null input_list.
11833 (Is_Self_Referential): New routine.
11835 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11837 * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
11838 entity renames an expression, as in the case of an object of
11839 an unconstrained type initialized by a function call, defer the
11840 rewriting of the expression to the expander.
11841 * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
11842 'Alignment): If the entity renames an expression, introduce
11843 temporary to capture value, and rewrite original declaration to
11846 2014-02-04 Gary Dismukes <dismukes@adacore.com>
11848 * g-comlin.adb: Minor typo fix.
11850 2014-02-04 Ed Schonberg <schonberg@adacore.com>
11852 * freeze.adb (Freeze_All): Types derived from a formal
11853 access_to_classwide type do not have a finalization master.
11855 2014-02-04 Robert Dewar <dewar@adacore.com>
11857 * sprint.adb: Minor reformatting.
11859 2014-02-04 Robert Dewar <dewar@adacore.com>
11861 * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
11862 cases where Actions is a null list.
11863 * sinfo.ads (N_Expression_With_Actions): Actions can be
11864 temporarily empty during semantic analysis, but must be non-empty
11865 in the final expanded tree.
11867 2014-01-31 Robert Dewar <dewar@adacore.com>
11869 * exp_ch9.adb: Minor reformatting.
11871 2014-01-31 Emmanuel Briot <briot@adacore.com>
11873 * g-comlin.adb (Set_Command_Line): Take the switches
11874 configuration from the Command_Line_Config.
11876 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
11878 * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
11881 2014-01-31 Vincent Celier <celier@adacore.com>
11883 * projects.texi: Add more documentation about others used as an
11884 index in indexed attributes.
11886 2014-01-31 Robert Dewar <dewar@adacore.com>
11888 * gnat_ugn.texi: Minor update.
11889 * gnat_rm.texi: Add example to Restriction_Warnings documentation.
11890 * exp_util.adb: Minor reformatting.
11892 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11894 * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
11895 depends on data that is not private to the protected object,
11896 and potentially modifiable in unsynchronized fashion.
11898 2014-01-31 Yannick Moy <moy@adacore.com>
11900 * erroutc.adb (Validate_Specific_Warnings): Remove special case for
11903 2014-01-31 Robert Dewar <dewar@adacore.com>
11905 * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
11906 for Unknown_Package.
11907 * sem_ch6.adb, sem_attr.adb: Minor comment addition.
11909 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
11911 * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
11912 the logic that generates a runtime check to determine the
11913 controlled status of the object about to be allocated or
11914 deallocated. Class-wide types now always use a runtime check
11915 even if they appear as generic actuals.
11916 (Find_Object): Detect
11917 a special case that involves interface class-wide types because
11918 the object appears as a complex expression.
11920 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11922 * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
11923 subprogram with an incomplete untagged formals on the list of
11924 private dependents, to verify that the type is properly completed
11925 in the private part.
11926 * sem_attr.adb: Code clean up.
11928 2014-01-31 Robert Dewar <dewar@adacore.com>
11930 * exp_ch6.adb: Minor reformatting.
11932 2014-01-31 Vincent Celier <celier@adacore.com>
11934 * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
11935 when Pkg is unknown.
11937 2014-01-31 Hristian Kirtchev <kirtchev@adacore.com>
11939 * sem_res.adb (Resolve_Entity_Name): Comment
11940 reformatting. Allow volatile objects in various generated checks.
11942 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11944 * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
11945 component association, set the etype of the identifier, for
11948 2014-01-31 Ed Schonberg <schonberg@adacore.com>
11950 * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
11951 declared in a package, not checks can apply to the subprogram.
11953 2014-01-31 Robert Dewar <dewar@adacore.com>
11955 * erroutc.adb (Validate_Specific_Warnings): Warnings are
11956 controlled -gnatw.W.
11957 * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
11958 * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
11960 2014-01-31 Arnaud Charlet <charlet@adacore.com>
11962 * exp_disp.adb: Update comments.
11964 2014-01-31 Yannick Moy <moy@adacore.com>
11966 * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
11967 Save_Global_References): Guard access to expression in aspect.
11969 2014-01-31 Yannick Moy <moy@adacore.com>
11971 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
11972 Issue an error when the pragma is applied to a generic unit,
11973 a generic declaration, or inside a generic.
11975 2014-01-31 Yannick Moy <moy@adacore.com>
11977 * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
11980 2014-01-31 Robert Dewar <dewar@adacore.com>
11982 * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
11985 2014-01-31 Tristan Gingold <gingold@adacore.com>
11987 * exp_disp.adb: Add a historic note.
11989 2014-01-31 Robert Dewar <dewar@adacore.com>
11991 * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
11992 Process_Deferred_References.
11994 2014-01-31 Yannick Moy <moy@adacore.com>
11996 * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
11997 ineffective pragma Warnings(Off) in GNATprove_Mode.
11999 2014-01-31 Bob Duff <duff@adacore.com>
12001 * s-taskin.ads: Minor comment fix.
12002 * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
12003 just direct dependents. If this is actually an abort, each task
12004 will take care of aborting its dependents, so all dependents will
12005 get aborted, as before. However, when this is called the second
12006 time from Vulnerable_Complete_Master "for convenience" (i.e. to
12007 kill off tasks waiting at terminate alternatives), aborting
12008 indirect dependents is wrong, because it causes some unrelated
12009 tasks to get aborted.
12011 2014-01-31 Robert Dewar <dewar@adacore.com>
12013 * sem_ch4.adb: Minor reformatting.
12015 2014-01-31 Robert Dewar <dewar@adacore.com>
12017 * exp_ch2.adb: New calling sequence for Is_LHS.
12018 * frontend.adb: Add call to Process_Deferred_References.
12019 * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
12020 (Deferred_References): New table.
12021 * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
12023 (Find_Expanded_Name): Ditto.
12024 * sem_res.adb: New calling sequence for Is_LHS.
12025 * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
12026 * sem_warn.adb: Call Process_Deferred_References before issuing
12029 2014-01-31 Tristan Gingold <gingold@adacore.com>
12031 * exp_util.adb (Corresponding_Runtime_Package): Restrict the
12032 use of System_Tasking_Protected_Objects_Single_Entry.
12033 * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
12034 of Protected_Single_Entry_Call.
12035 (Expand_N_Timed_Entry_Call): Remove single_entry case.
12036 * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
12038 (Make_Disp_Timed_Select_Body): Likewise.
12039 * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
12040 * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
12042 (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
12043 (Wait_For_Completion_With_Timeout): Remove.
12044 (Protected_Single_Entry_Call): Remove Mode parameter
12045 (always Simple_Call).
12046 (Service_Entry): Remove Self_Id constant (not used anymore).
12047 (Timed_Protected_Single_Entry_Call): Remove.
12048 * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
12049 (Protected_Single_Entry_Call): Remove Mode parameter.
12051 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12053 * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
12054 * einfo.ads (Get_Pragma): Update the comment on special pragmas
12055 handled by this routine.
12056 * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
12057 to the contract of the related subprogram body.
12058 * sem_util.adb (Add_Contract_Item): Handle the insertion of
12059 pragma Refined_Post into the contract of a subprogram body.
12060 * sinfo.ads Update the documentation of node N_Contract.
12061 * sem_res.adb (Resolve_Entity_Name): Add a guard
12062 to detect abstract states and variables only when checking the
12063 SPARK 2014 rules concerning volatile object placement.
12065 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12067 * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
12068 null is compatible with any access type.
12070 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12072 * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
12073 placement is not in a package.
12075 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12077 * sem_util.adb (Has_Enabled_Property): Compare the character field of
12080 2014-01-29 Robert Dewar <dewar@adacore.com>
12082 * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
12083 vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
12084 sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
12086 2014-01-29 Robert Dewar <dewar@adacore.com>
12088 * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
12089 * sem_warn.adb (Check_References): Suppress warnings if inside
12090 Initial_Condition pragma.
12092 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12094 * sem_prag.adb (Check_Missing_Part_Of): List all values of
12095 State_Space_Kind for readability reasons. Do not emit an error on
12096 a private item when the enclosing package lacks aspect/pragma
12097 Abstract_State. Do not emit an error on a private package
12098 instantiation when the corresponding generic template lacks
12100 (Has_Visible_State): New routine.
12101 * sem_util.adb (Find_Placement_In_State_Space): The visible
12102 declarations of any kind of child units in general act as proper
12103 placement location.
12105 2014-01-29 Robert Dewar <dewar@adacore.com>
12107 * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
12108 ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
12109 a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
12110 a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
12111 atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
12112 a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
12113 cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
12114 eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
12115 exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
12116 exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
12117 freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
12118 gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
12119 krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
12120 live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
12121 par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
12122 par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
12123 par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
12124 rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
12125 s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
12126 sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
12127 sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
12128 sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
12129 sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
12130 sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
12131 s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
12132 sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
12133 s-regpat.adb, s-secsta.adb, s-stalib.ads,
12134 s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
12135 s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
12136 s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
12137 system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
12138 urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
12140 2014-01-29 Robert Dewar <dewar@adacore.com>
12142 * expander.adb: Minor reformatting.
12144 2014-01-29 Javier Miranda <miranda@adacore.com>
12146 * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
12149 2014-01-29 Javier Miranda <miranda@adacore.com>
12151 * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
12152 that checks if an interface types defines the predefined "="
12153 function because the compiler was erroneously not generating the
12154 predefined "=" primitive as soon as the name of some interface
12155 primitive is "=" (formals were not checked).
12157 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12159 * expander.adb (Expander): In GNATprove mode, do not process
12160 transient scopes: they are in general not created in this mode,
12161 and an attempt to examine them will lead to constraint errors when
12162 processing configuration pragmas that have analyzable expressions.
12164 2014-01-29 Vincent Celier <celier@adacore.com>
12166 * clean.adb (Gnatclean): Fail if main project is an aggregate
12167 project or if there is an aggregate library project in the
12169 * gnatcmd.adb: Fail if the main project is an aggregate project
12170 or if there is an aggegate library project in the project tree.
12171 * make.adb (Initialize): : Fail if main project is an aggregate
12172 project or if there is an aggregate library project in the
12174 * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
12175 * prj-makr.adb (Initialize): Fail if the main project is an
12176 aggregate project or an aggregate library project.
12178 2014-01-29 Vincent Celier <celier@adacore.com>
12180 * prj-part.adb (Check_Import_Aggregate): New procedure
12181 to check if an imported project is an aggregate project.
12182 (Parse_Single_Project): Call Check_Import_Aggregate
12183 * projects.texi: Document that aggregate projects cannot be
12184 extended or imported.
12186 2014-01-29 Robert Dewar <dewar@adacore.com>
12188 * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
12189 reformatting and code clean up.
12190 * gnat_ugn.texi: Add documentation section on Atomic Variables
12193 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12195 * einfo.adb Flag264 is now unused.
12196 (Has_Body_References): Removed.
12197 (Set_Has_Body_References): Removed.
12198 (Write_Entity_Flags): Remove the output for flag Has_Body_References.
12199 * einfo.ads Update the comment on usage of attribute
12200 Body_References. Remove attribute Has_Body_References and its
12202 (Has_Body_References): Removed along with pragma Inline.
12203 (Set_Has_Body_References): Removed along with pragma Inline.
12204 * sem_prag.adb (Analyze_Global_Item): Move the call to
12205 Record_Possible_Body_Reference in the state related checks
12206 section. Add a comment intended function.
12207 (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
12208 in the state related checks section. Add a comment intended function.
12209 (Analyze_Refinement_Clause): Cleanup the illegal body reference
12210 reporting. Add a comment on timing of error reporting.
12211 (Record_Possible_Body_Reference): Reimplement the routine.
12213 2014-01-29 Vincent Celier <celier@adacore.com>
12215 * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
12216 unit-based languages.
12217 (Mains.Complete_Mains.Do_Complete): Use the source file project
12218 tree when calling Find_File_Add_Extension. Use the correct
12219 project name when reporting an error.
12221 2014-01-29 Hristian Kirtchev <kirtchev@adacore.com>
12223 * aspects.adb Add an entry for aspect Part_Of in table
12225 * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
12226 Aspect_Argument, Aspect_Names and Aspect_Delay.
12227 * atree.h Define Elist9.
12228 * atree.adb (Elist9): New routine.
12229 (Set_Elist9): New routine.
12230 * atree.ads (Elist9): New routine.
12231 (Set_Elist9): New routine.
12232 * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
12233 the list of node usage. Remove Refined_State from the list of
12235 (Encapsulating_State): New routine.
12237 Handle pragma Part_Of; (Part_Of_Constituents): New routine.
12238 (Refined_State): Removed.
12239 (Set_Encapsulating_State): New routine.
12240 (Set_Part_Of_Constituents): New routine.
12241 (Set_Refined_State): Removed.
12242 (Write_Field9_Name): Add an entry
12243 for Part_Of_Constituents (Write_Field10_Name): Add an entry for
12244 Encapsulating_State. Remove the entry for Refined_State.
12245 * einfo.ads Add new attributes Encapsulating_State
12246 and Part_Of_Constituents alond with their usage in
12247 entities. Remove attribute Refined_State along with its
12249 (Encapsulating_State): New routine and
12250 pragma Inline. (Get_Pragma): Update the comment on usage.
12251 (Part_Of_Constituents): New routine and pragma Inline.
12252 (Refined_State): Removed along with pragma Inline.
12253 (Set_Encapsulating_State): New routine and pragma Inline.
12254 (Set_Part_Of_Constituents): New routine and pragma Inline.
12255 (Set_Refined_State): Removed along with pragma Inline.
12256 * par-prag.adb Pragma Part_Of does not need any special processing
12258 * sem_ch3.adb (Analyze_Declarations): Remove local variables
12259 Body_Id and Prag. Call separate routines to analyze the
12260 contract of a package [body].
12261 (Analyze_Object_Contract):
12262 Update the comment on usage. Remove local variables
12263 Items and Nam. Use Get_Pragma rather than traversing the
12264 classification list. Verify whether the lack of indicator
12265 Part_Of agrees with the placement of the variable in state space.
12266 (Analyze_Object_Declaration): Initialize the encapsulating state
12267 of a variable. (Requires_State_Refinement): Moved to sem_util.
12268 * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
12269 (Analyze_Package_Contract): New routine.
12270 * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
12271 (Analyze_Package_Contract): New routine.
12272 * sem_ch10.adb (Decorate_State): Initialize the encapsulating
12273 state and Part_Of constituents.
12274 * sem_ch13.adb (Analyze_Aspect_Specifications):
12275 Add processing for aspect Part_Of. Update all
12276 calls to Decorate_Delayed_Aspect_And_Pragma.
12277 (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
12278 not need any special processing at freeze time.
12279 (Decorate_Delayed_Aspect_And_Pragma): Renamed to
12280 Decorate_Aspect_And_Pragma. Add formal parameter Delayed and
12281 update the associated comment.
12282 * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
12283 (Analyze_Abstract_State): Add new global variable State_Id. Remove
12284 local constants Errors and Loc. Remove local variables Is_Null
12285 and State_Nam. Create the entity of the abstract state on the
12286 spot, before all remaining checks are performed. Verify that a
12287 missing Part_Of option agrees with the placement of the abstract
12288 state within the state space.
12289 (Analyze_Depends_In_Decl_Part):
12290 Add new global variables Constits_Seen and States_Seen. Check
12291 that a state and a corresponding constituent do not appear
12292 in pragma [Refined_]Depends.
12293 (Analyze_Global_In_Decl_Part):
12294 Add new global variables Constits_Seen and States_Seen. Check
12295 that a state and a corresponding constituent do not appear
12296 in pragma [Refined_]Global.
12297 (Analyze_Global_Item):
12298 Remove the now obsolete code that deals with Part_Of.
12299 Add the entity of the global item to the list of processed
12300 items. (Analyze_Initializes_In_Decl_Part): Add new global
12301 variables Constits_Seen and States_Seen. Check that a state
12302 and a corresponding constituent do not appear in pragma
12304 (Analyze_Initialization_Item): Add the entity
12305 of the initialization item to the list of processed items.
12306 (Analyze_Input_Item): Add the entity of the initialization
12307 item to the list of processed items.
12308 (Analyze_Input_Output):
12309 Remove the now obsolete code that deals with Part_Of. Add the
12310 entity of the input/output to the list of processed items.
12311 (Analyze_Part_Of): New routine.
12312 (Analyze_Part_Of_Option): Remove
12313 local constant Par_State. Add local constant Encaps and local
12314 variables Encaps_Id and Legal. Use Analyze_Part of to analyze
12315 the option. Turn the related state into a Part_Of constituent
12316 if the option is legal.
12317 (Analyze_Pragma): Add processing
12318 for pragma Part_Of.
12319 (Analyze_Refined_State_In_Decl_Part):
12320 Remove global constants Pack_Body and Spec_Id. Remove
12321 global variables Abstr_States and Hidden_States. Add new
12322 global variables Available_States, Body_Id, Body_States and
12323 Spec_Id. Add new local constant Body_Decl. Reimplement the
12324 logic that extracts the states available for refinement from
12325 the related package and the body hidden states of the said
12327 (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
12328 (Check_Applicable_Policy): Alphabetize body.
12329 (Check_Dependency_Clause): Replace Refined_State
12330 with Encapsulating_State.
12331 (Check_Matching_Constituent):
12332 Reimplement the logic that determines whether an item is a valid
12333 / invalid constituent of the current refined state. Return when
12334 a construct does not denote a valid abstract state. Extract the
12335 list of Part_Of constituents for further analysis. Check that all
12336 Part_Of constituents of a state have been used in its refinement.
12337 (Check_Matching_State): Update the comment on usage. Operate
12338 on the list of available states.
12339 (Check_Missing_Part_Of): New routine.
12340 (Check_Refined_Global_Item): Replace Refined_State
12341 with Encapsulating_State.
12342 (Check_State_And_Constituent_Use): New routine.
12343 (Create_Abstract_State): New routine.
12344 (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
12345 (Is_Part_Of): Removed.
12346 (Collect_Body_States): New routine.
12347 (Collect_Constituent): Replace Refined_State with Encapsulating_State.
12348 (Collect_Hidden_States): Removed.
12349 (Report_Unrefined_States): Change the profile of the procedure along
12350 with the comment on usage.
12351 (Report_Unused_Constituents): New routine.
12352 (Report_Unused_Hidden_States): Removed.
12353 (Report_Unused_States): New routine.
12354 * sem_prag.ads (Check_Missing_Part_Of): New routine.
12355 * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
12356 appear in the classification pragmas of a package instantiation
12358 (Find_Placement_In_State_Space): New routine.
12359 (Is_Child): Removed.
12360 (Is_Child_Or_Sibling): Remove formal
12361 parameter Private_Child. Remove the private child checks.
12362 (Requires_State_Refinement): Moved from sem_ch3.
12363 * sem_util.ads Add new type State_Space_Kind along with
12364 comment on its usage and values.
12365 (Add_Contract_Item): Update the comment on usage.
12366 (Find_Body_Discriminal): Alphabetize spec.
12367 (Find_Placement_In_State_Space): New routine.
12368 (Is_Child_Or_Sibling): Remove formal parameter Private_Child
12369 and update the comment on usage.
12370 (Requires_State_Refinement): Moved from sem_ch3.
12371 * sinfo.ads: Update the documentation of N_Contract.
12372 * snames.ads-tmpl The predefined name for Part_Of is now used
12373 to denote a pragma. Add Pragma_Id for Part_Of.
12375 2014-01-29 Emmanuel Briot <briot@adacore.com>
12377 * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
12379 (Dump): New subprogram.
12381 2014-01-29 Tristan Gingold <gingold@adacore.com>
12383 * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
12384 Expand_Entry_Declaration to factorize code.
12386 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12388 * checks.adb: minor clarification.
12389 * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
12390 search for primitive operations to the entities that immediately
12391 follow the type declaration.
12393 2014-01-29 Tristan Gingold <gingold@adacore.com>
12395 * exp_ch9.adb (Build_Protected_Entry): Do not call
12396 Complete_Entry_Body anymore.
12397 * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
12398 * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
12400 2014-01-29 Pierre-Marie Derodat <derodat@adacore.com>
12402 * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
12403 string when the Name input bigger than allowed. Adapt the function
12406 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12408 * checks.adb (Install_Null_Excluding_Check): Do not emit warning
12409 if expression is within a case_expression of if_expression.
12411 2014-01-29 Robert Dewar <dewar@adacore.com>
12413 * exp_ch9.adb, inline.ads: Minor reformatting.
12415 2014-01-29 Tristan Gingold <gingold@adacore.com>
12417 * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
12419 2014-01-29 Yannick Moy <moy@adacore.com>
12421 * inline.ads (Pending_Body_Info): Add SPARK_Mode and
12422 SPARK_Mode_Pragma components to be able to analyze generic
12424 * sem_ch12.adb (Analyze_Package_Instantiation,
12425 Inline_Instance_Body, Need_Subprogram_Instance_Body,
12426 Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
12427 for future analysis of the instance.
12428 (Instantiate_Package_Body,
12429 Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
12430 from instantiation to analyze the instance.
12432 2014-01-29 Robert Dewar <dewar@adacore.com>
12434 * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
12437 2014-01-29 Yannick Moy <moy@adacore.com>
12439 * gnat_rm.texi: Update description of SPARK_Mode pragma.
12441 2014-01-29 Tristan Gingold <gingold@adacore.com>
12443 * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
12445 2014-01-29 Thomas Quinot <quinot@adacore.com>
12447 * sem_ch4.adb (Find_Component_In_Instance): Update comment.
12449 2014-01-29 Ed Schonberg <schonberg@adacore.com>
12451 * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
12452 resulting string is an internal entity. and thus requires no
12453 initialization. This is relevant when Initialize_ Scalars is
12454 enabled, because the resultant spurious initialization may lead to
12455 secondary stack anomalies that produce a mangled name for a task.
12457 2014-01-29 Yannick Moy <moy@adacore.com>
12459 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
12460 not inherited from spec anymore. Check consistency
12461 rules after processing of declarations.
12462 * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
12463 from spec anymore. Check consistency rules after processing of
12465 (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
12467 * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
12470 2014-01-27 Robert Dewar <dewar@adacore.com>
12472 * sem_res.adb (Resolve_Comparison_Op): Add type name/location
12474 (Resolve_Range): Add type name/location to unordered msg.
12476 2014-01-27 Claire Dross <dross@adacore.com>
12478 * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
12479 Capacity) is only called with Capacity >= Length (Source) and
12480 Capacity in Capacity_Range.
12481 * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
12482 a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
12483 is only called with Capacity >= Source.Capacity. Raise Capacity_Error
12484 in the code is this is not the case.
12486 2014-01-27 Thomas Quinot <quinot@adacore.com>
12488 * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
12489 selected component in an instance where the component of the
12490 actual is not visibile at instantiation.
12492 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12494 * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
12495 has a dynamic predicate, generate freeze node for Actual_Subtype
12496 at once, because the declaration of the corresponding predicate
12497 function will make reference to it.
12499 2014-01-27 Tristan Gingold <gingold@adacore.com>
12501 * exp_ch7.adb, exp_ch9.adb: Adjust comments.
12503 2014-01-27 Robert Dewar <dewar@adacore.com>
12505 * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
12506 for 2**X optimization.
12508 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12510 * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
12511 explicitly whether value is in range of Character, because the
12512 library is typically compiled with range checks disabled, and
12513 we cannot rely on the implicit check on the argument of 'Val.
12515 2014-01-27 Vincent Celier <celier@adacore.com>
12517 * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
12518 not the Target to itself.
12520 2014-01-27 Robert Dewar <dewar@adacore.com>
12522 * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
12523 changes to avoid incorrect use of unordered enum types.
12525 2014-01-27 Thomas Quinot <quinot@adacore.com>
12527 * sem_ch4.adb: Minor reformatting.
12529 2014-01-27 Robert Dewar <dewar@adacore.com>
12531 * scn.adb (Check_End_Of_Line): Removed.
12532 (Error_Long_Line): Removed.
12533 (Determine_License): Use versions of above routines from Scanner.
12534 * scng.adb (Check_End_Of_Line): Moved to spec.
12535 (Error_Long_Line): Removed, no longer used.
12536 * scng.ads (Check_End_Of_Line): Moved here from body.
12538 2014-01-27 Tristan Gingold <gingold@adacore.com>
12540 * exp_ch7.adb (Build_Cleanup_Statements): Call
12541 Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
12542 for protected body.
12543 * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
12544 Remove Service_Name variable.
12545 (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
12546 factorize code from the above subprograms.
12547 * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
12549 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
12551 * einfo.adb (Has_Option): Reimplemented.
12552 * sem_prag.adb (Analyze_Refinement_Clause): Add global
12553 variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
12554 External_Constit_Seen and State. Add local variables Body_Ref,
12555 Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
12556 avoid a cumbersome while pool. Verify the legality of an external
12557 state and relevant properties.
12558 (Check_External_Property): New routine.
12559 (Check_Matching_State): Remove parameter profile
12560 and update comment on usage.
12561 (Collect_Constituent): Store the
12562 relevant external property of a constituent.
12563 * sem_util.adb (Async_Readers_Enabled): Update the call to
12564 Has_Enabled_Property.
12565 (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
12566 (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
12567 (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
12568 (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
12569 Update comment on usage. Reimplement the logic to recognize the various
12570 formats of properties.
12572 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12574 * par-ch5.adb: Minor reformatting.
12576 2014-01-27 Tristan Gingold <gingold@adacore.com>
12578 * s-tposen.ads: Harmonize style and comments.
12580 2014-01-27 Vincent Celier <celier@adacore.com>
12582 * projects.texi: Document that shared library projects, by
12583 default, cannot import projects that are not shared library
12586 2014-01-27 Robert Dewar <dewar@adacore.com>
12588 * sem_ch8.adb (Find_Selected_Component): Use Replace instead
12591 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12593 * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
12594 any other exception is raised.
12595 (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
12596 still necessary to perform a conversion in order to remove overlong
12599 2014-01-27 Robert Dewar <dewar@adacore.com>
12601 * exp_smem.adb: Minor reformatting.
12603 2014-01-27 Thomas Quinot <quinot@adacore.com>
12605 * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
12607 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12609 * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
12610 nodes for operands to the original node for the call, to preserve
12611 Original_Node pointers within the resolved operands, given that
12612 they may have been rewritten as well. Previous approach copied
12613 the operands into a new tree and lost those pointers.
12615 2014-01-27 Claire Dross <dross@adacore.com>
12618 * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
12620 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12622 * sem_util.adb (Check_Internal_Protected_Use): A call through
12623 an anonymous access parameter of the current protected function
12624 is not a potential modification of the current object.
12626 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12628 * a-cobove.adb (Reserve_Capacity): Procedure raises
12629 Capacity_Error, not Constraint_Error, when request cannot be
12632 2014-01-27 Vincent Celier <celier@adacore.com>
12634 * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
12635 not the Target to itself.
12637 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12639 * exp_ch4.adb (Expand_Concatenate): If the target of the
12640 concatenation is a library-level entity, always use the off-line
12641 version of concatenation, regardless of optimization level. This
12642 is space-efficient, and prevents linking problems when some
12643 units are compiled with different optimization levels.
12645 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12647 * sem_ch5.adb: Code clean up.
12649 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12651 * par-ch5.adb (P_Iterator_Specification): Improve error recovery
12652 when an array or container iterator includes a subtype indication,
12653 which is only legal in an element iterator.
12655 2014-01-27 Thomas Quinot <quinot@adacore.com>
12657 * exp_ch7.adb: Minor reformatting.
12659 2014-01-27 Robert Dewar <dewar@adacore.com>
12661 * opt.adb (SPARK_Mode): Default for library units is None rather
12663 * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
12665 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
12667 * snames.ads-tmpl (Name_Auto): Removed, no longer used.
12669 2014-01-27 Robert Dewar <dewar@adacore.com>
12671 * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
12672 Suspicious_Labels table if we have identifier; followed by loop
12674 * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
12675 * par.adb (Suspicious_Labels): New table.
12677 2014-01-27 Robert Dewar <dewar@adacore.com>
12679 * exp_aggr.adb (Check_Bounds): Reason is range check, not
12682 2014-01-27 Yannick Moy <moy@adacore.com>
12684 * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
12686 * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
12688 (Add_SPARK_Xrefs): Include references to constants.
12689 * spark_xrefs.ads Document new character 'c' for references to
12692 2014-01-27 Thomas Quinot <quinot@adacore.com>
12694 * exp_smem.adb (Add_Write_After): For a function call, insert write as
12695 an after action in a transient scope.
12697 2014-01-27 Thomas Quinot <quinot@adacore.com>
12699 * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
12700 to a shared variable as an OUT formal in a call to an init proc,
12701 the 'Read call must be emitted after, not before, the call.
12703 2014-01-27 Robert Dewar <dewar@adacore.com>
12705 * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
12707 2014-01-27 Robert Dewar <dewar@adacore.com>
12709 * a-wichha.adb (Character_Set_Version): Change to output proper
12712 2014-01-27 Hristian Kirtchev <kirtchev@adacore.com>
12714 * einfo.adb (Is_Input_Only_State): Removed.
12715 (Is_Non_Volatile_State): Removed.
12716 (Is_Output_State): Removed.
12717 * einfo.ads (Is_Input_Only_State): Remove attribute and
12718 subprogram. Update related entity.
12719 (Is_Non_Volatile_State):
12720 Remove attribute and subprogram. Update related entity.
12721 (Is_Output_State): Removed attribute and subprogram. Update
12723 * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
12725 * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
12726 an object, not just variables.
12727 (Analyze_Object_Contract): New routine.
12728 (Analyze_Variable_Contract): Removed.
12729 (Process_Discriminants): Detect an illegal use of volatile
12730 discriminant in SPARK mode.
12731 * sem_ch5.adb (Analyze_Iterator_Specification):
12732 Detect an illegal use of volatile loop variable.
12733 (Analyze_Loop_Parameter_Specification): Detect an illegal use
12734 of volatile loop variable.
12735 * sem_ch6.adb (Process_Formals): Update the volatile object
12736 detection. Detect an illegal formal of mode IN OUT or OUT in
12737 SPARK mode. Enhance the error messages with references.
12738 * sem_ch12.adb (Instantiate_Object): Update the volatile object
12739 detection. Enhance the error messages with references.
12740 * sem_prag.adb (Analyze_Abstract_State): Enhance the error
12741 messages with references.
12742 (Analyze_Contract_Case): Enhance the error messages with references.
12743 (Analyze_External_Property): Call Check_Duplicate_Property to process
12744 an external property.
12745 (Analyze_External_Property_In_Decl_Part): New routine.
12746 (Analyze_External_State_In_Decl_Part): Removed.
12747 (Analyze_Global_Item): Detect an illegal
12748 use of a volatile constant. Detect an illegal use
12749 of a variable with enabled Effective_Reads. Enhance
12750 the error messages with references. Remove obsolete
12751 checks concerning Input_Only and Output_Only states.
12752 (Analyze_Initialization_Item): Enhance the error messages
12754 (Analyze_Initializes_In_Decl_Part): Do not
12755 collect the states and variables when the initialization list
12757 (Analyze_Input_Item): Enhance the error messages with references.
12758 (Analyze_Input_Output): Enhance the error messages with references.
12759 (Analyze_Pragma): Enhance the error messages with references.
12760 (Analyze_Refinement_Clause): Code reformatting.
12761 (Analyze_Refined_Depends_In_Decl_Part):
12762 Rename global variable Global to Reg_Global and update all
12763 occurrences. Add local variables D7 and D8. Update the error
12764 messages with references. Update the call to Collect_Global_Items.
12765 (Analyze_Refined_Global_In_Decl_Part): Add local variables
12766 Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
12767 the call to Collect_Global_Items. Account for a Proof_In state
12768 in null / useless refinement checks. Verify the coverage of
12770 (Check_Dependency_Clause): Remove local variable
12771 Out_Constits. Remove the retrieval and removal of constituents
12772 for an Output_Only state. Remove the reporting of unused
12773 Output_Only state constituents.
12774 (Check_Duplicate_Mode): Enhance
12775 the error message with a reference.
12776 (Check_Duplicate_Property): New routine.
12777 (Check_Duplicate_Option): Enhance the error message with a reference.
12778 (Check_External_Properties): Enhance the error message with a reference.
12779 (Check_Function_Return): Enhance the error message with a reference.
12780 (Check_In_Out_States): Update
12781 comment on usage. Add a specialized error message for Proof_In
12782 constituents. Enhance the error message with a reference.
12783 (Check_Input_States): Update comment on usage. Account for
12784 possible Proof_In constituents. Enhance the error message
12786 (Check_Matching_Constituent): Enhance the error message with a
12788 (Check_Matching_State): Enchance the error message with a reference.
12789 (Check_Mode): Add local variable From_Global. Update the call to
12790 Find_Mode. Emit more precise error messages concerning extra items
12791 (Check_Mode_Restriction_In_Enclosing_Context): Consider
12792 pragma Refined_Global. Enhance the error message with a
12794 (Check_Mode_Restriction_In_Function): Enhance the error message with
12796 (Check_Output_States): Update comment on usage. Add local variable
12797 Posted. Account for possible Proof_In constituents. Produce a detailed
12798 list of missing constituents.
12799 (Check_Proof_In_States): New routine.
12800 (Check_Refined_Global_Item): Handle Proof_In
12801 constituents. Enchance the error message with a reference.
12802 (Collect_Global_Items): Add formal parameters Proof_In_Items
12803 and Has_Proof_In_State. Update the comment on usage. Account
12804 for Proof_In items.
12805 (Create_Or_Modify_Clause): Enchance
12806 the error message with a reference.
12808 formal parameter From_Global. Update the comment on usage.
12809 Detect when the mode is governed by pragma [Refined_]Global.
12810 (Output_Constituents): Removed.
12811 (Report_Extra_Constituents):
12812 Report extra Proof_In constituents.
12813 (Report_Unused_Constituents): Removed.
12814 (Usage_Error): Code reformatting. Enhance the error
12815 messages with reference.
12816 * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
12817 (Analyze_External_State_In_Decl_Part): Removed.
12818 * sem_res.adb (Resolve_Actuals): Update the volatile object
12819 detection. Enhance the error message with a reference.
12820 (Resolve_Entity_Name): Update the volatile object
12821 detection. Enhance the error message with a reference.
12822 * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
12823 (Is_SPARK_Volatile_Object): New routine.
12824 (Has_Volatile_Component): New routine.
12825 * sem_util.ads (Is_Delegate): Alphabetized.
12826 (Is_SPARK_Volatile_Object): New routine.
12827 (Has_Volatile_Component): New routine.
12828 * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
12830 2014-01-27 Ed Schonberg <schonberg@adacore.com>
12832 * sem_attr.adb: Resolve fully prefix of 'Update.
12834 2014-01-27 Ben Brosgol <brosgol@adacore.com>
12836 * gnat_rm.texi: Minor clarifications.
12838 2014-01-27 Robert Dewar <dewar@adacore.com>
12840 * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
12841 about call that is generated as part of an Initial_Condition
12843 * sem_prag.adb: Minor spelling correction.
12845 2014-01-27 Robert Dewar <dewar@adacore.com>
12847 * sem_prag.adb (Set_Convention_From_Pragma): Check that
12848 convention Ghost can only apply to functions.
12849 * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
12851 2014-01-27 Robert Dewar <dewar@adacore.com>
12853 * gnat_ugn.texi: Add Short_Enums to documentation of
12856 2014-01-27 Robert Dewar <dewar@adacore.com>
12858 * sem_prag.adb (Analyze_Input_Item): Correct check for input
12859 item in same package.
12860 * sem_util.ads, sem_util.adb (Within_Scope): New function.
12862 2014-01-26 Arnaud Charlet <charlet@adacore.com>
12864 * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
12865 s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
12866 s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
12867 system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
12870 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
12872 * gcc-interface/Makefile.in: Fix oversight.
12874 2014-01-25 Eric Botcazou <ebotcazou@adacore.com>
12876 * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
12877 conversion from a thin pointer with a shifted value.
12878 * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
12879 read-only flag from the values onto the result.
12880 (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
12882 2014-01-25 Tristan Gingold <gingold@adacore.com>
12884 * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
12885 for E_Variable with a pragma Linker_Section.
12887 2014-01-25 Robert Dewar <dewar@adacore.com>
12889 * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
12890 with Default_Value aspect is passed in by copy.
12892 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
12894 * set_targ.adb: Set Short_Enums.
12895 * gcc-interface/lang.opt (fshort-enums): New option.
12896 * gcc-interface/misc.c (gnat_handle_option): Handle it.
12897 (gnat_post_options): Do not modify the global settings.
12899 2014-01-24 Robert Dewar <dewar@adacore.com>
12901 * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
12903 (Random_Decimal_Fixed): New generic function.
12904 * s-rannum.ads: Minor comment clarifications.
12906 2014-01-24 Robert Dewar <dewar@adacore.com>
12908 * back_end.adb: Remove Short_Enums handling (handled in
12909 Ttypes/Get_Targ now) Minor added comments.
12910 * freeze.adb: Change name Short_Enums_On_Target to
12911 Target_Short_Enums.
12912 * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
12913 * opt.ads: Minor comment updates.
12914 * sem_ch13.adb: Change name Short_Enums_On_Target to
12915 Target_Short_Enums.
12916 * set_targ.adb: Set Short_Enums from gcc back end.
12917 * set_targ.ads (Short_Enums): New variable.
12918 * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
12919 Ttypes/Get_Targ now).
12920 * ttypes.ads (Target_Short_Enums): New constant boolean switch
12922 2014-01-24 Pascal Obry <obry@adacore.com>
12924 * g-sercom-mingw.adb: Fix serial port name for port number > 10.
12926 2014-01-24 Gary Dismukes <dismukes@adacore.com>
12928 * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
12929 comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
12932 2014-01-24 Robert Dewar <dewar@adacore.com>
12934 * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
12936 2014-01-24 Vincent Celier <celier@adacore.com>
12938 * prj.adb (Add_Aggregated_Project): Do not add a project in
12939 the list if it is already there.
12941 2014-01-24 Yannick Moy <moy@adacore.com>
12943 * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
12944 Correct the search for a subrogram declaration to which a pragma is
12947 2014-01-24 Bob Duff <duff@adacore.com>
12949 * gnat_ugn.texi: Document --decimal-grouping and
12950 --based-grouping switches in gnatpp.
12952 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12954 * sinfo.ads: Documentation update.
12956 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12958 * sem_ch3.adb (Constant_Redeclaration): New declaration is
12959 illegal if previous one has an initial expression that is an
12960 aggregate expanded into assignments.
12962 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12964 * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
12965 code reorganization to remove spurious warning on a loop with
12966 an array element iterator that has a null range.
12968 2014-01-24 Vincent Celier <celier@adacore.com>
12970 * make.adb (Binding_Phase): When setting the Ada paths, use
12971 the library ALI dir, not the object dir in libraries.
12973 2014-01-24 Yannick Moy <moy@adacore.com>
12975 * sinfo.ads: Add documentation of check flag fields.
12977 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12979 * sem_res.adb (Resolve_Actuals): If an actual is a view
12980 conversion of a discriminated object, and the formal type is
12981 discriminated and constrained, apply a discriminant check to
12984 2014-01-24 Robert Dewar <dewar@adacore.com>
12986 * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
12988 2014-01-24 Ed Schonberg <schonberg@adacore.com>
12990 * sem_ch3.adb (Analyze_Declarations): At the end of an
12991 appropriate declarative part, call Freeze_All from the first
12992 declaration in the scope, not from the first unfrozen one. This
12993 is necessary to apply visibility checks to entities with delayed
12994 aspects. Otherwise, in the presence of instantiations and cleanups
12995 that they may generate, the delayed aspects may be analyzed too
12996 late and produce spurious visibility errors.
12997 * sem_attr.adb: Place etype on range.
12998 * sem_ch6.adb: Documentation expression functions.
13000 2014-01-24 Robert Dewar <dewar@adacore.com>
13002 * exp_ch7.adb: Minor change of Indices to Indexes (preferred
13003 terminology in compiler).
13005 2014-01-24 Robert Dewar <dewar@adacore.com>
13007 * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
13008 categories, now that Ada 95 supports raise expressions.
13010 2014-01-24 Robert Dewar <dewar@adacore.com>
13012 * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
13013 Short_Enums_On_Target.
13014 * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
13016 * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
13018 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13020 * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
13021 indication is given explicity, check that it matches the array
13022 component type or the container element type of the domain
13025 2014-01-24 Tristan Gingold <gingold@adacore.com>
13027 * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
13028 * gcc-interface/misc.c (flag_short_enums): Declare.
13029 (gnat_post_options): Set it.
13031 2014-01-24 Vincent Celier <celier@adacore.com>
13033 * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
13034 to cache the result when Including_Libraries is False.
13035 * prj-env.ads (Ada_Objects_Path): Update documentation
13036 * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
13037 (Get_Object_Directory): Return the Library_Ali_Dir only when
13038 when Including_Libraries is True.
13039 * prj.ads (Get_Object_Directory): Fix and complete documentation
13040 (Project_Data): New component Ada_Objects_Path_No_Libs
13042 2014-01-24 Robert Dewar <dewar@adacore.com>
13044 * checks.adb (Expr_Known_Valid): Result of fpt operator never
13047 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
13049 * back_end.adb: Minor fix in comment.
13051 2014-01-24 Javier Miranda <miranda@adacore.com>
13053 * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
13054 required to report the error in case of task types.
13056 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13058 * sem_attr.adb: Additional index checking.
13060 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13062 * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
13063 expressions in each component association, and for records note
13064 the entity in each association choice, for subsequent resolution.
13065 (Resolve_Attribute, case 'Update): Complete resolution of
13066 expressions in each component association.
13068 2014-01-24 Robert Dewar <dewar@adacore.com>
13070 * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
13071 (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
13072 leading to wrong handling of SPARK_Mode for library units).
13074 2014-01-24 Robert Dewar <dewar@adacore.com>
13076 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
13077 on generic instances (do not consider them to be internally
13080 2014-01-24 Doug Rupp <rupp@adacore.com>
13082 * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
13083 vice pthread_sigmask.
13085 2014-01-24 Vincent Celier <celier@adacore.com>
13087 * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
13090 2014-01-24 Vincent Celier <celier@adacore.com>
13092 * prj-ext.adb (Add): Do not output anything when Silent is True,
13093 whatever the verbosity. When Source is From_External_Attribute,
13094 set the corresponding environment variable if it is not already set.
13095 * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
13097 * prj-proc.adb (Process_Expression_For_Associative_Array):
13098 For attribute External, call Prj.Ext.Add with Silent set to
13099 True for the child environment, to avoid useless output in non
13102 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13104 * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
13105 range given by a subtype indication, and force evaluation of
13106 the bounds, as for a simple range.
13107 * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
13108 of bounds of slice for various kinds of discrete ranges.
13109 (Evaluate_Name, Evaluate_Subtype_From_Expr): use
13110 Evaluate_Slice_Bounds.
13112 2014-01-24 Bob Duff <duff@adacore.com>
13114 * s-taskin.ads (Activator): Make this Atomic, because
13115 Activation_Is_Complete reads it, and that can be called
13116 from any task. Previously, this component was only
13117 modified by the activator before activation, and by
13118 Self after activation.
13119 * a-taside.ads, a-taside.adb (Environment_Task,
13120 Activation_Is_Complete): Implement these missing functions.
13122 2014-01-24 Doug Rupp <rupp@adacore.com>
13124 * init.c: Add a handler section for Android.
13126 2014-01-24 Arnaud Charlet <charlet@adacore.com>
13128 * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
13130 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13132 * sem_ch4.adb (Operator_Check): If one operand is a
13133 Raise_Expression, set its type to that of the other operand.
13134 * sem_res.adb (Resolve_Raise_Expression): new procedure.
13135 (Resolve_Actuals): For an actual that is a Raise_Expression,
13136 set the type to that of the formal.
13137 * sem_type.adb (Find_Unique_Type): If one of the operands is a
13138 Raise_Expression, return type of the other operand.
13140 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13142 * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
13143 component of the record has a type with a default aspect, and
13144 the corresponding aggregate component is initiaized with a box,
13145 use the default value in the rewritten aggregate.
13147 2014-01-24 Tristan Gingold <gingold@adacore.com>
13149 * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
13150 s-interr-sigaction.adb,
13151 s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
13152 * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
13153 to the call to Install_Restricted_Handlers.
13155 2014-01-24 Emmanuel Briot <briot@adacore.com>
13157 * prj-nmsc.adb (Check_File): Add protection when the source is
13158 not fully initialized.
13160 2014-01-24 Ed Schonberg <schonberg@adacore.com>
13162 * sem_util.adb (Is_Post_State): In a postcondition, a selected
13163 component that denotes an implicit dereference is a reference
13164 to the post state of the subprogram.
13166 2014-01-24 Robert Dewar <dewar@adacore.com>
13168 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
13169 for generated subprograms.
13170 (Analyze_Subprogram_Specification): Ditto.
13172 2014-01-24 Vincent Celier <celier@adacore.com>
13174 * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
13175 attributes in package Builder of aggregate and aggregate library
13177 * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
13178 Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
13179 Remove parameters. Change error message from "... externally
13180 build library ..." to "... externally built project ...".
13181 (Process_Naming_Scheme.Check): Do not do any check in aggregate
13182 project, as attribute Library_Dir and Library_Name have already
13183 been detected as forbidden.
13185 2014-01-24 Vincent Celier <celier@adacore.com>
13187 * prj-env.adb (Find_Project): If cached project path is not in
13188 project directory, look in current directory first and use cached
13189 project path only if project is not found in project directory.
13191 2014-01-24 Robert Dewar <dewar@adacore.com>
13193 * sem_util.adb, lib-xref.adb: Correct false positive warnings.
13195 2014-01-24 Vincent Celier <celier@adacore.com>
13197 * projects.texi: Document that aggregate projects are only
13198 supported by gprbuild, but not by gnatmake. Document that the
13199 only attribute Switches in package Binder of aggregate projects
13200 will be ignored if its index is not others. Document that
13201 attribute Global_Config_File is allowed in package Binder of
13202 aggregate projects.
13204 2014-01-24 Robert Dewar <dewar@adacore.com>
13206 * sem_prag.adb: Minor code reorganization.
13207 * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
13209 2014-01-24 Pascal Obry <obry@adacore.com>
13211 * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
13212 attribute definition.
13214 2014-01-24 Vincent Celier <celier@adacore.com>
13216 * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
13217 in the Queue the same source (same path, same multi-source index)
13218 from the same project file, to avoid compiling several times
13221 2014-01-24 Eric Botcazou <ebotcazou@adacore.com>
13223 * einfo.ads (First_Rep_Item): Remove obsolete stuff.
13224 (Has_Gigi_Rep_Item): Likewise.
13225 * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
13226 Has_Gigi_Rep_Item for objects.
13227 * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
13228 (prepend_one_attribute): ...this.
13229 (prepend_one_attribute_pragma): New function extracted from...
13230 (prepend_attributes): ...here. Swap the parameters for consistency.
13231 (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
13232 prepend_attributes.
13233 <object>: Deal with a pragma Linker_Section on a constant
13234 or variable. <E_Function>: Deal with a pragma Linker_Section
13236 (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
13238 2014-01-24 Vincent Celier <celier@adacore.com>
13240 * opt.ads: Minor comment update.
13242 2014-01-24 Robert Dewar <dewar@adacore.com>
13244 * sem_prag.adb (Analyze_Input_Output): Add missing error check
13246 * sem_util.adb (Is_Refined_State): Add defense against junk
13249 2014-01-24 Pascal Obry <obry@adacore.com>
13251 * projects.texi: Removes Build_Slaves attribute documentation.
13253 2014-01-23 Robert Dewar <dewar@adacore.com>
13255 * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
13258 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13260 * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
13261 applies to expressions that come from source.
13262 * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
13264 (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
13265 rule regarding potentially unevaluated expressions, to prefix
13268 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13270 * exp_util.adb (Make_Invqriant_Call): If type of expression is
13271 a private extension, get invariant from base type.
13273 2014-01-23 Robert Dewar <dewar@adacore.com>
13275 * sem_util.adb, sem_attr.adb: Minor reformatting.
13277 2014-01-23 Robert Dewar <dewar@adacore.com>
13279 * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
13280 (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
13281 * sem.adb (Semantics): Remove save/restore of
13282 SPARK_Mode[_Pragma]. Not needed since already done in
13283 Save/Restore_Opt_Config_Switches.
13285 2014-01-23 Robert Dewar <dewar@adacore.com>
13287 * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
13288 freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
13289 Linker_Section enhancements.
13291 2014-01-23 Tristan Gingold <gingold@adacore.com>
13293 * gnat_rm.texi: Minor editing.
13295 2014-01-23 Robert Dewar <dewar@adacore.com>
13297 * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
13298 with'ed internal units.
13299 * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
13301 2014-01-23 Javier Miranda <miranda@adacore.com>
13303 * lib-xref.adb (Generate_Reference): As part of processing the
13304 "end-of-spec" reference generate an extra reference to the first
13305 private entity of the package.
13306 * xr_tabls.adb (Add_Reference): No action needed for the extra
13307 'E' reference associated; similar to the processing of the
13310 2014-01-23 Bob Duff <duff@adacore.com>
13312 * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
13314 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13316 * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
13317 predicate to implement rule given in 6.1.1 (20/3).
13318 * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
13319 'Old in a postcondition, if it is potentially unevaluated and
13320 it is not an entity name.
13322 2014-01-23 Bob Duff <duff@adacore.com>
13324 * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
13326 2014-01-23 Robert Dewar <dewar@adacore.com>
13328 * gnatlink.adb (Gnatlink): Fix problem of generating bad name
13331 2014-01-23 Bob Duff <duff@adacore.com>
13333 * g-dynhta.ads: Minor comment fix.
13335 2014-01-23 Yannick Moy <moy@adacore.com>
13337 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
13338 from spec on body only when not already inherited on spec. Set
13339 SPARK_Mode from context on body without previous spec. *
13340 * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
13341 library-level entities. Correct retrieval of entity from
13342 declaration, for cases where the declaration is not a unit.
13343 * sem_ch12.adb (Instantiate_Object): Avoid
13344 calling Is_Volatile_Object on an empty node.
13346 2014-01-23 Robert Dewar <dewar@adacore.com>
13348 * gnatlink.adb (Gnatlink): Check for suspicious executable file
13351 2014-01-23 Robert Dewar <dewar@adacore.com>
13353 * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
13354 * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
13355 style errors in instances.
13356 * g-dynhta.ads (Static_HTable): Comment updates.
13358 2014-01-23 Vincent Celier <celier@adacore.com>
13360 * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
13361 to find a configuration project file when Config_File_Name is
13362 No_Configuration_File.
13363 * prj-conf.ads (No_Configuration_File): New constant String.
13364 * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
13365 with Config_File_Name set to No_Configuration_File, so that
13366 no existing configuration project file will be used, and the
13367 configuration project will be only created in memory when
13368 Add_Default_GNAT_Naming_Scheme is called.
13369 * projects.texi: Minor reformatting.
13371 2014-01-23 Vincent Celier <celier@adacore.com>
13373 * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
13374 a config project file if On_Load_Config is not null.
13375 * prj-pars.adb: Minor comment changes.
13377 2014-01-23 Ed Schonberg <schonberg@adacore.com>
13379 * lib-xref.adb (Output_References): Output progenitors of
13380 synchronized tagged types, for source navigation.
13382 2014-01-23 Robert Dewar <dewar@adacore.com>
13384 * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
13385 expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
13386 sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
13388 2014-01-23 Emmanuel Briot <briot@adacore.com>
13390 * prj-conf.adb (Get_Or_Create_Configuration_File): call
13391 On_Load_Config later.
13393 2014-01-23 Hristian Kirtchev <kirtchev@adacore.com>
13395 * sem_ch3.adb (Analyze_Declarations): Do not
13396 generate the spec of the late primitive in ASIS mode. Add two
13397 comments to explain the special cases when the expansion is
13400 2014-01-23 Robert Dewar <dewar@adacore.com>
13402 * sem_util.adb (Note_Possible_Modification): Fix error of
13403 misbehaving for implicit dereference cases in -gnatc mode.
13405 2014-01-23 Emmanuel Briot <briot@adacore.com>
13407 * prj-pars.adb: Minor reformatting.
13409 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13411 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
13412 body generated for an expression function within a protected body
13413 needs a set of renaming declarations if the expression function
13416 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13418 * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
13419 list interface progenitor of a tagged concurrent type, for better
13422 2014-01-22 Robert Dewar <dewar@adacore.com>
13424 * lib.adb (In_Extended_Main_Code_Unit): Return False for
13426 (In_Extended_Main_Source_Unit): Return False for Standard_Location.
13427 * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
13428 treatment of Slocs No_Location and Standard_Location.
13429 * restrict.adb (Check_Restriction_No_Dependence): Explicitly
13430 check for entity with Standard_Location Sloc, rather than relying
13431 on Lib routines to do that.
13432 * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
13433 that a call cannot occur before a later occuring body within
13436 2014-01-22 Thomas Quinot <quinot@adacore.com>
13438 * rtsfind.adb: Update comment.
13440 2014-01-22 Hristian Kirtchev <kirtchev@adacore.com>
13442 * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
13443 * sem_ch3.adb (Analyze_Declarations): Add local variable
13444 Body_Seen. Generate the spec of a late controlled
13445 primitive body that is about to freeze its related type.
13446 (Handle_Late_Controlled_Primitive): New routine.
13448 2014-01-22 Robert Dewar <dewar@adacore.com>
13450 * a-stream.adb: Minor reformatting.
13452 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13454 * sem_ch8.adb (From_Actual_Package): Introduce a recursive
13455 sub-procedure Declared_In_Actual to handle properly the visibility
13456 of actuals in actual packages, that are themselves actuals to a
13457 actual package of the current instance. This mimics properly the
13458 visibility of formals of formal packages declared with a box,
13459 within the corresponding generic unit.
13461 2014-01-22 Robert Dewar <dewar@adacore.com>
13463 * checks.adb: Do not assume that a volatile variable is valid.
13465 2014-01-22 Thomas Quinot <quinot@adacore.com>
13467 * g-catiio.ads (Image, Value): Clarify that these functions
13468 operate in the local time zone. Minor documentation update.
13470 2014-01-22 Thomas Quinot <quinot@adacore.com>
13472 * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
13474 2014-01-22 Robert Dewar <dewar@adacore.com>
13476 * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
13477 Moved to sem_aux.adb.
13479 2014-01-22 Robert Dewar <dewar@adacore.com>
13481 * vms_data.ads: Minor reformatting.
13483 2014-01-22 Robert Dewar <dewar@adacore.com>
13485 * debug.adb: Document messages affected by -gnatd.E including
13486 the new ones that relate to late definition of equality.
13487 * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
13488 debug flag -gnatd.E is set, then generate warnings rather than
13490 (Check_Untagged_Equality): In earlier versions of Ada,
13491 generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
13493 2014-01-22 Robert Dewar <dewar@adacore.com>
13495 * sem_prag.adb (Usage_Error): Output additional messages for
13496 unconstrained OUT parameters lacking an input dependency.
13498 2014-01-22 Robert Dewar <dewar@adacore.com>
13500 * sem_ch4.adb: Minor reformatting.
13502 2014-01-22 Robert Dewar <dewar@adacore.com>
13504 * restrict.ads: Minor reformatting.
13505 * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
13506 forbids a call from within a subprogram to the same subprogram.
13508 2014-01-22 Thomas Quinot <quinot@adacore.com>
13510 * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
13511 stream attributes for Stream_Element_Array.
13512 * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
13513 * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
13514 defined in the current scope.
13516 2014-01-22 Robert Dewar <dewar@adacore.com>
13518 * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
13520 2014-01-22 Thomas Quinot <quinot@adacore.com>
13522 * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
13524 2014-01-22 Thomas Quinot <quinot@adacore.com>
13526 * sem_ch3.adb (Analyze_Object_Declaration): For a constant
13527 declaration initialized with a function call, whose type
13528 has variable size, need to remove side effects so that the
13529 initialization expression becomes a dereference of a temporary
13530 reference to the function result.
13532 2014-01-22 Yannick Moy <moy@adacore.com>
13534 * errout.adb (Initialize): Remove trick to add dummy entry
13536 * erroutc.adb (Set_Warnings_Mode_Off,
13537 Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
13538 command line switch.
13539 * opt.ads (Warning_Mode): Document behavior
13540 wrt pragma Warnings, in normal mode and in GNATprove_Mode.
13542 2014-01-22 Robert Dewar <dewar@adacore.com>
13544 * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
13546 2014-01-22 Robert Dewar <dewar@adacore.com>
13548 * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
13549 (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
13550 Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
13551 case Storage_Size): call Check_Pool_Size_Clash.
13553 2014-01-22 Robert Dewar <dewar@adacore.com>
13555 * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
13556 sem_eval.ads: Minor reformatting.
13558 2014-01-22 Thomas Quinot <quinot@adacore.com>
13560 * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
13561 Any_Composite to prevent cascaded errors.
13563 2014-01-22 Yannick Moy <moy@adacore.com>
13565 * errout.adb (Initialize): Do not insert special entry in Warnings
13566 table in GNATprove_Mode.
13567 * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
13569 * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
13572 2014-01-22 Robert Dewar <dewar@adacore.com>
13574 * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
13577 2014-01-22 Robert Dewar <dewar@adacore.com>
13579 * snames.ads-tmpl: Update header.
13581 2014-01-22 Thomas Quinot <quinot@adacore.com>
13583 * exp_util.adb (Insert_Actions): When inserting actions on a
13584 short circuit operator that has already been analyzed, do not park
13585 actions in node; instead introduce an N_Expression_With_Actions
13586 and insert actions immediately.
13587 Add guard for unexpected case of climbing up through statement
13588 in Actions list of an N_Expression_With_Actions.
13589 * sem_elab.adb (Insert_Elab_Check): Remove complex
13590 specialized circuitry for the case where the context is already
13591 analyzed, as it is not needed and introduces irregularities in
13592 finalization. Instead rely on the above change to Insert_Actions
13593 to ensure that late insertion on short circuit operators works
13596 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13598 * sem_ch4.adb (Operator_Check): Improve error message when an
13599 operand of concatenation is an access type.
13601 2014-01-22 Thomas Quinot <quinot@adacore.com>
13603 * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
13606 2014-01-22 Ed Schonberg <schonberg@adacore.com>
13608 * sem_ch8.adb (Find_Selected_Component): Handle properly the case
13609 of an expanded name in a proper body, whose prefix is a package
13610 in the context of the proper body, when there is a homonym of
13611 the package declared in the parent unit.
13613 2014-01-22 Robert Dewar <dewar@adacore.com>
13615 * sem_warn.adb (Check_Use_Clause): Don't give no entities used
13616 msg if errors found.
13617 (Check_One_Unit): Same change.
13619 2014-01-22 Robert Dewar <dewar@adacore.com>
13621 * ug_words: Add missing/wrong entries for VMS warning switches.
13622 * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
13624 2014-01-22 Jerome Guitton <guitton@adacore.com>
13626 * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
13629 2014-01-22 Robert Dewar <dewar@adacore.com>
13631 * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
13633 2014-01-22 Eric Botcazou <ebotcazou@adacore.com>
13635 * gcc-interface/Makefile.in: Minor fixes.
13637 2014-01-21 Robert Dewar <dewar@adacore.com>
13639 * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
13640 * par-ch5.adb (P_Condition): New version with expression prescanned.
13641 * par.adb (P_Condition): New version with expression prescanned.
13643 2014-01-21 Robert Dewar <dewar@adacore.com>
13645 * gnat_rm.texi: Document that Allow_Integer_Address is ignored
13646 if Address is not a private type.
13647 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13648 Ignore pragma if System.Address is not a private type.
13650 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13652 * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
13653 uninitialized value.
13655 2014-01-21 Thomas Quinot <quinot@adacore.com>
13657 * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
13659 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13661 * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
13662 the value of Assertions_Enabled flag when compiling an instance of
13663 an internal unit. This facilitates the use of pre/postconditions
13664 in generic internal units, such as the new elementary function
13667 2014-01-21 Robert Dewar <dewar@adacore.com>
13669 * exp_aggr.adb: Minor reformatting.
13670 * sem_attr.adb: Minor reformatting.
13671 * sem_res.adb: Minor comment addition.
13672 * einfo.adb: Minor comment updates.
13673 * freeze.adb: Minor reformatting and code reorganization.
13675 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13677 * par-ch4.adb (P_If_Expression): Handle more gracefully an
13678 elsif clause that does not have an else part.
13680 2014-01-21 Robert Dewar <dewar@adacore.com>
13682 * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
13683 * gcc-interface/Makefile.in: clean up target pairs.
13685 2014-01-21 Pascal Obry <obry@adacore.com>
13687 * projects.texi: Minor typo fix.
13689 2014-01-21 Thomas Quinot <quinot@adacore.com>
13691 * freeze.adb (Check_Component_Storage_Order): If a record type
13692 has an explicit Scalar_Storage_Order attribute definition clause,
13693 reject any component that itself is of a composite type and does
13696 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13698 * sem_ch10.adb (Generate_Parent_Reference): Make public so it
13699 can be used to generate proper cross-reference information for
13700 the parent units of proper bodies.
13702 2014-01-21 Thomas Quinot <quinot@adacore.com>
13704 * exp_pakd.adb (Expand_Packed_Element_Set,
13705 Expand_Packed_Element_Reference): No byte swapping required in
13706 the front-end for the case of a reverse storage order array,
13707 as this is now handled uniformly in the back-end. However we
13708 still need to swap back an extracted element if it is itself a
13709 nested composite with reverse storage order.
13711 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
13713 * sem_prag.adb (Analyze_External_Property): Add processing for "others".
13714 (Analyze_Pragma): Update the grammar of pragma Abstract_State to
13717 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13719 * gnat_ugn.texi: Minor updates.
13721 2014-01-21 Thomas Quinot <quinot@adacore.com>
13723 * exp_pakd.adb: Update comment, minor reformatting.
13725 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
13727 * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
13728 object check when SPARK_Mode is on.
13729 * sem_ch6.adb (Process_Formals): Trigger the volatile object
13730 check when SPARK_Mode is on.
13731 * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
13732 check when SPARK_Mode is on.
13733 * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
13734 corresponding pragma of aspect SPARK_Mode in the visible
13735 declarations of a package declaration.
13736 * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
13737 check when SPARK_Mode is on.
13738 * sem_res.adb (Resolve_Actuals): Trigger the volatile object
13739 check when SPARK_Mode is on.
13740 (Resolve_Entity_Name): Trigger
13741 the volatile object check when SPARK_Mode is on.
13743 2014-01-21 Robert Dewar <dewar@adacore.com>
13745 * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
13746 sem_ch6.adb, a-except-2005.adb: Minor reformatting.
13748 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13750 * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
13751 object is declared, it is rewritten as a renaming of an dynamic
13752 expression that wraps the initial value. The renaming declaration
13753 is first given an internal name, to prevent collisions with the
13754 entity already declared, and then the name is modified to reflect
13755 the original one. the modification of the name must preserve
13756 the source location of the original, to prevent spurious errors
13757 when compiling with style checks if the declaration involves
13758 more than one entity.
13760 2014-01-21 Hristian Kirtchev <kirtchev@adacore.com>
13762 * aspects.adb Add entries for Async_Readers, Async_Writers,
13763 Effective_Reads and Effective_Writes in table Canonical_Aspect.
13764 * aspects.ads Add entries for Async_Readers, Async_Writers,
13765 Effective_Reads and Effective_Writes in tables Aspect_Id,
13766 Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
13767 * atree.adb (Ekind_In): New version with 8 parameters.
13768 (Node34): New routine.
13769 (Set_Node34): New routine.
13770 * atree.ads (Ekind_In): New version with 8 parameters.
13771 (Node34): New routine.
13772 (Set_Node34): New routine.
13773 * einfo.adb Contract is now Node34.
13774 (Contract): Update the assertion and node usage.
13775 (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
13776 Effective_Reads and Effective_Writes.
13777 (Set_Contract): Update the assertion and node usage.
13778 (Write_Field24_Name): Remove the output for a contract.
13779 (Write_Field34_Name): Add output for a contract.
13780 * einfo.ads Contract is now Node34. Update the comment on
13781 attribute usage and related node structures.
13782 (Get_Pragma): Update the comment on usage.
13783 * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
13784 Effective_Reads and Effective_Writes do not require special
13785 processing by the parser.
13786 * sem_ch3.adb (Analyze_Variable_Contract): New routine.
13787 (Analyze_Declarations): Analyze the contract of a variable at
13788 the end of the declarative region.
13789 (Analyze_Object_Declaration): Create a contract for a variable.
13790 * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
13791 of classification pragmas.
13792 (Process_Formals): Detect an illegal
13793 use of a volatile object as a formal in a function.
13794 * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
13795 a volatile object as an actual in generic instantiation.
13796 * sem_prag.adb Add entries for Async_Readers, Async_Writers,
13797 Effective_Reads and Effective_Writes in table Sig_Flags.
13798 (Analyze_External_State_In_Decl_Part): New routine.
13799 (Analyze_Global_Item): Detect an illegal use of a volatile object
13800 as a global item of a function.
13801 (Analyze_Pragma): Reimplement
13802 pragma Abstract_State. Add support for pragmas Async_Readers,
13803 Async_Writers, Effective_Reads and Effective_Writes.
13804 (Check_External_Properties): New routine.
13805 * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
13806 (Check_External_Properties): New routine.
13807 * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
13808 volatile object as an actual in a call.
13809 (Resolve_Entity_Name):
13810 Add local variables Par, Prev and Usage_OK. Detect illegal
13811 contexts of volatile objects.
13812 * sem_util.adb (Add_Contract_Item): Add support for
13813 pragmas associated with the contract of a variable.
13814 (Async_Readers_Enabled): New routine.
13815 (Async_Writers_Enabled): New routine.
13816 (Effective_Reads_Enabled): New routine.
13817 (Effective_Writes_Enabled): New routine.
13818 (Has_Enabled_Property):
13820 (Is_Unchecked_Conversion_Instance): New routine.
13821 (Is_Volatile_Object): Add support for entities that may denote
13823 * sem_util.ads (Add_Contract_Item): Update the
13825 (Async_Readers_Enabled): New routine.
13826 (Async_Writers_Enabled): New routine.
13827 (Effective_Reads_Enabled): New routine.
13828 (Effective_Writes_Enabled): New routine.
13829 (Is_Unchecked_Conversion_Instance): New routine.
13830 * sinfo.ads Update the comment on the structure of N_Contract.
13831 * snames.ads-tmpl Add predefined names for Async_Readers,
13832 Async_Writers, Effective_Reads and Effective_Writes. Add
13833 pragma ids for Async_Readers, Async_Writers, Effective_Reads
13834 and Effective_Writes.
13836 2014-01-21 Robert Dewar <dewar@adacore.com>
13838 * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
13839 * sem_eval.adb (Compile_Time_Known_Value): Remove special
13840 handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
13841 function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
13842 (Test_Foldable): Add CRT_Safe parameter
13843 * sem_eval.ads (Compile_Time_Known_Value): Remove special
13844 handling of CRT mode.
13845 (CRT_Safe_Compile_Time_Known_Value): New function.
13847 2014-01-21 Robert Dewar <dewar@adacore.com>
13849 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
13850 with pragma or aspect that applies to package spec or subprogram
13853 2014-01-21 Robert Dewar <dewar@adacore.com>
13855 * exp_aggr.adb: Minor reformatting.
13857 2014-01-21 Johannes Kanig <kanig@adacore.com>
13859 * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
13861 2014-01-21 Bob Duff <duff@adacore.com>
13863 * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
13865 2014-01-21 Steve Baird <baird@adacore.com>
13867 * gnat_rm.texi: Improve description of SPARK_Mode pragma.
13869 2014-01-21 Vincent Celier <celier@adacore.com>
13871 * prj-part.adb (Parse_Single_Project): Accept to extend a project
13872 if it has only be imported by an project being extended. When a
13873 project that has only been imported by a project being extended
13874 is imported by another project that is not being extended,
13875 reset the previous indication, so that it will be an error if
13876 this project is extended later.
13877 * prj-tree.adb (Create_Project): Include component From_Extended
13878 in table Projects_HT
13879 * prj-tree.ads (Project_Name_And_Node): New Boolean component
13882 2014-01-21 Robert Dewar <dewar@adacore.com>
13884 * atree.ads, atree.adb: Add Node33 and Set_Node33.
13885 * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
13886 New field (SPARK_Pragma_Inherited): New flag
13887 (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
13889 * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
13890 * opt.ads (SPARK_Mode_Pragma): New global variable.
13891 * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
13892 * sem_ch3.adb: Use new SPARK_Mode data structures.
13893 * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
13894 * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
13895 * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
13896 (Pop_Scope): Restore SPARK_Mode_Pragma.
13897 * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
13898 new data structures.
13900 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13902 * back_end.adb: Undo previous change, not needed. Minor reformatting.
13904 2014-01-21 Thomas Quinot <quinot@adacore.com>
13906 * exp_ch5.adb: Fix comment.
13907 * switch-c.adb: Minor comment update.
13908 * exp_ch3.adb: Minor reformatting.
13910 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13912 * back_end.adb (Scan_Compiler_Arguments): Do not store object
13913 filename in gnatprove mode.
13915 2014-01-21 Thomas Quinot <quinot@adacore.com>
13917 * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
13918 suppresses usage of primitive _assign for tagged types).
13919 * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
13920 No_Ctrl_Actions for a tagged type that does not require
13921 finalization, as we want to disable usage of _assign (which
13922 may cause undesirable discriminant checks on an uninitialized,
13925 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13927 * sem_prag.adb: Reject invariant'class on completion.
13929 2014-01-21 Javier Miranda <miranda@adacore.com>
13931 * exp_ch3.adb (Build_Init_Procedure): For
13932 derivations of interfaces, do not move the the initialization
13933 of the _parent field since such assignment is not generated.
13935 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13937 * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
13938 with the operator it renames if we are within an expression of
13939 a pre/postcondition, because the expression will be reanalyzed
13940 at a later point, and the analysis of the renaming may affect
13941 the visibility of the operator when in an instance.
13943 2014-01-21 Robert Dewar <dewar@adacore.com>
13945 * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
13946 Add this flag to type conversion nodes and assignment nodes.
13947 * treepr.adb: Deal properly with Flag 1,2,3.
13948 * treeprs.adt: Minor comment update.
13950 2014-01-21 Robert Dewar <dewar@adacore.com>
13952 * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
13954 * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
13955 parameter, completely rewrite spec.
13957 2014-01-21 Ed Schonberg <schonberg@adacore.com>
13959 * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
13960 instance that is inlined, it may have been rewritten as a wrapper
13961 package. In that case the unit that must be made visible is the
13962 related instance of the package.
13964 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13966 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
13967 previous change in codepeer mode.
13969 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13971 * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
13972 call to Abort_Undefer, as expected by the runtime.
13973 * s-tasren.adb (Local_Complete_Rendezvous): Replace
13974 Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
13975 deferred at this point. Update comments.
13977 2014-01-21 Thomas Quinot <quinot@adacore.com>
13979 * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
13981 2014-01-21 Arnaud Charlet <charlet@adacore.com>
13983 * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
13986 2014-01-21 Robert Dewar <dewar@adacore.com>
13988 * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
13990 2014-01-21 Thomas Quinot <quinot@adacore.com>
13992 * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
13993 this is value is used in Node_Id arithmetic operations.
13994 (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
13995 instead of hard-coded unrolled code.
13997 2014-01-21 Yannick Moy <moy@adacore.com>
13999 * gnat1drv.adb: Minor code cleanup, removing useless code.
14001 2014-01-21 Arnaud Charlet <charlet@adacore.com>
14003 * opt.ads (SPARK_Switches_File_Name): New.
14004 * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
14005 * usage.adb (Usage): Document -gnates, in gnatprove mode only.
14006 * gnat_ugn.texi: Document -gnates.
14008 2014-01-21 Yannick Moy <moy@adacore.com>
14010 * errout.adb (Special_Msg_Delete): Update comment. Remove
14011 special case for GNATprove which should not ignore mismatch
14012 in sizes for representation clauses.
14013 * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
14014 which should not ignore pragma Pack.
14016 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14018 * sem_ch4.adb: Code clean up.
14020 2014-01-21 Steve Baird <baird@adacore.com>
14022 * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
14024 2014-01-21 Robert Dewar <dewar@adacore.com>
14026 * gcc-interface/gigi.h: Get Flags array address.
14027 * gcc-interface/trans.c: Acquire Flags array address.
14028 * atree.adb: Add support for Flags array and Flag0,1,2,3.
14029 * atree.ads: Add support for Flags array and Flag0,1,2,3.
14030 * atree.h: Add support for Flags array and Flag0,1,2,3.
14031 * back_end.adb: Pass Flags array address to gigi.
14033 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14035 * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
14036 reference to generated body so that legality checks on stream
14037 attributes are properly applied. If type is tagged and already
14038 frozen, insert generated body at the point of the renaming
14041 2014-01-21 Ed Schonberg <schonberg@adacore.com>
14043 * sem_ch12.adb: Code clean up.
14044 * sem_ch8.adb: Minor reformatting
14046 2014-01-20 Robert Dewar <dewar@adacore.com>
14048 * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
14049 converting warnings on inevitable exceptions to errors.
14050 * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14051 converting warnings on inevitable exceptions to errors.
14052 * opt.adb (SPARK_Mode_Config): Handled like other config flags
14053 * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
14054 SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
14055 SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
14056 New flag (Config_Switches_Type): Add SPARK_Mode field
14057 * sem.adb: Minor code reorganization (remove unnecessary with)
14058 * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
14059 * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14060 converting warnings on inevitable exceptions to errors.
14061 * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14062 converting warnings on inevitable exceptions to errors.
14063 * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
14064 converting warnings on inevitable exceptions to errors.
14065 * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14066 converting warnings on inevitable exceptions to errors.
14067 * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
14068 from spec if needed
14069 * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
14070 from spec if needed
14071 * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
14073 * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
14074 converting warnings on inevitable exceptions to errors.
14075 * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
14076 (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
14077 of Get_SPARK_Mode_Id
14078 * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
14079 * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
14080 converting warnings on inevitable exceptions to errors.
14081 * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
14082 converting warnings on inevitable exceptions to errors.
14083 * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
14086 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14088 * sem_ch13.adb: Add semantic information to rewritten type
14091 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14093 * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
14094 are of a type with unknown discriminants, convert both to the
14095 underlying view of the type, so that the proper constraint check
14096 can be applied to the right-hand side.
14098 2014-01-20 Robert Dewar <dewar@adacore.com>
14100 * atree.adb (Copy_Node): Fix failure to copy last component
14101 (Exchange_Entities): Fix failure to exchange last entity
14103 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14105 * sem_ch12.adb: Code clean up.
14107 2014-01-20 Robert Dewar <dewar@adacore.com>
14109 * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
14111 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14113 * sem_ch4.adb (Analyze_Quantified_Expression): If after
14114 pre-analysis the loop parameter specification has been
14115 rewritten as a iterator specification, propagate the change to
14116 the quantified expression, for ASIS navigtion needs.
14118 2014-01-20 Vincent Celier <celier@adacore.com>
14120 * par-ch10.adb: Minor error message change: escape [ and ].
14122 2014-01-20 Robert Dewar <dewar@adacore.com>
14124 * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
14125 * errout.adb: Implement [ and ] insertion characters.
14126 * errout.ads: Document new [ and ] insertion characters.
14127 * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
14128 addition of ??? comment.
14129 * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
14130 * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
14131 sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
14132 Make warnings on exceptions into errors in GNATprove mode.
14133 * sem_dim.adb: Minor reformatting throughout Quote [ and ]
14136 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14138 * sem_ch13.adb: Code clean up.
14140 2014-01-20 Robert Dewar <dewar@adacore.com>
14142 * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
14144 * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
14145 error in GNATprove mode.
14147 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14149 * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
14150 reference 'Old takes no parameters, and thus can appear as a
14153 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14155 * exp_aggr.adb: Fix minor typos.
14157 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14159 * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
14160 instance the attribute is legal, and its value is determined
14161 statically if the type has no discriminants. This choice is
14162 more useful than rechecking the legality rule in the instance,
14163 is consistent with older usage, and is also consistent with all
14166 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14168 * sem_cat.adb (Validate_Static_Object_Name): Change error into
14169 warning in Relaxed_Semantic_Mode.
14171 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14173 * sem_attr.adb: Code and comments cleanup.
14175 2014-01-20 Yannick Moy <moy@adacore.com>
14177 * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
14178 * errout.adb (Compilation_Errors): Remove special handling in
14180 * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
14181 removed debug flags.
14182 * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
14183 Global, Initial_Condition, Initializes and Refined_State pragmas and
14185 * opt.ads (Frame_Condition_Mode, Formal_Extensions,
14186 SPARK_Strict_Mode): Remove global flags.
14187 * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
14188 always performed now, on packages declaring a null state.
14189 (Signed_Integer_Type_Declaration): Remove ill-designed attempt
14190 at providing pedantic mode for bounds of integer types.
14191 * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
14192 "some" quantified expression now issued under control of -gnatw.t,
14193 like the other warning on unused bound variable.
14194 * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
14196 (Analyze_Pragma): Remove tests for SPARK 2014
14197 pragmas, not officially allowed by GNAT.
14199 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14201 * sem_prag.adb (Analyze_Pragma): Ensure that
14202 the sole argument of pragmas Abstract_State, Contract_Cases,
14203 Depends, Global and Initializes in in aggregate form.
14204 (Analyze_Refined_Pragma): Ensure that the sole argument of
14205 pragmas Refined_Depends, Refined_Global and Refined_State is in
14207 (Ensure_Aggregate_Form): New routine.
14209 2014-01-20 Doug Rupp <rupp@adacore.com>
14211 * sem_attr.adb (Analyze_Attribute): case
14212 Attribute_Constrained => treat all prefixes as legal for Declib
14215 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14217 * sem_prag.adb (Check_Mode): Reimplement the routine.
14218 (Find_Mode): New routine.
14220 2014-01-20 Robert Dewar <dewar@adacore.com>
14222 * sem_ch4.adb (Operator_Check): Handle additional
14223 Allow_Integer_Address cases.
14225 2014-01-20 Robert Dewar <dewar@adacore.com>
14227 * gnat_rm.texi (Allow_Integer_Address): Remove note about not
14228 allowed if address is non-private, no longer true.
14229 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14230 Remove check for address being private, causes difficulty when
14231 pragma used in gnat.adc file and is not needed, since we guard
14232 this in Address_Integer_Convert_OK.
14233 * exp_ch7.adb: Minor reformatting.
14234 * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
14236 2014-01-20 Robert Dewar <dewar@adacore.com>
14238 * checks.adb (Apply_Range_Check): Remove gnatprove special
14239 casing of exponentiation.
14240 * sem_res.adb (Resolve_Op_Expon): Apply range check to right
14241 operand for integer case to check range against Natural.
14243 2014-01-20 Robert Dewar <dewar@adacore.com>
14245 * s-tataat.adb: Minor reformatting.
14247 2014-01-20 Robert Dewar <dewar@adacore.com>
14249 * einfo.adb (Is_Descendent_Of_Address): Now applies to all
14250 entities, and also fix documentation to remove mention of visible
14251 integer type, since this is not what the implementation does.
14252 * einfo.ads (Is_Descendent_Of_Address): Now applies to all
14253 entities, and also fix documentation to remove mention of visible
14254 integer type, since this is not what the implementation does.
14255 * gnat_rm.texi: Minor clarification of Allow_Integer_Address
14257 * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
14258 case for parameter type check.
14259 * sem_res.adb (Resolve): Use new function
14260 Address_Integer_Convert_OK.
14261 * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
14262 reformatting throughout.
14263 * sem_util.adb (Address_Integer_Convert_OK): New function.
14264 * sem_util.ads: Minor reformatting (put specs in alpha order)
14265 (Address_Integer_Convert_OK): New function.
14267 2014-01-20 Thomas Quinot <quinot@adacore.com>
14269 * exp_ch7.adb (Wrap_Transient_Expression):
14270 Insertion extra conditional expression only if
14271 Opt.Suppress_Control_Flow_Optimizations is set.
14273 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14275 * s-tataat.adb (Initialize_Attributes): Abort might already be
14276 deferred in Create_Task.
14278 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14280 * checks.adb (Apply_Scalar_Range_Check): Flag
14281 the exponent as requiring a range check when the expression is
14284 2014-01-20 Fedor Rybin <frybin@adacore.com>
14286 * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
14288 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14290 * sem_util.adb (Default_Initialization): New routine.
14291 * sem_util.ads: Add new type Default_Initialization_Kind.
14292 (Default_Initialization): New routine.
14294 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14296 * sem_prag.adb (Check_Mode): Correct all error
14297 message logic dealing with in/in out parameters that may appear
14298 as inputs or have a self reference.
14300 2014-01-20 Robert Dewar <dewar@adacore.com>
14302 * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
14303 * sem_res.adb (Resolve): Fix error causing infinite loop for
14304 integer used as address. Allow addresses as integers.
14306 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14308 * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
14310 2014-01-20 Bob Duff <duff@adacore.com>
14312 * par-ch8.adb (P_Use_Type_Clause): Detect syntax
14313 error when "use all" is not followed by "type".
14315 2014-01-20 Bob Duff <duff@adacore.com>
14317 * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
14320 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14322 * checks.adb (Apply_Address_Clause_Check): If there is an
14323 alignment check on the expression in an address clause, and there
14324 is no local exception propagation, add an additional explanatory
14325 message to clarify the cause of previous warning.
14327 2014-01-20 Robert Dewar <dewar@adacore.com>
14329 * exp_ch7.adb: Minor reformatting.
14330 * opt.ads: Minor comment updates.
14331 * sem.adb: Minor name change Is_Main_Unit =>
14332 Is_Main_Unit_Or_Main_Unit_Spec.
14333 * sem_ch6.adb: Minor reformatting and code reorganization.
14335 2014-01-20 Bob Duff <duff@adacore.com>
14337 * gnat_ugn.texi: Update gnatpp switches.
14339 2014-01-20 Thomas Quinot <quinot@adacore.com>
14341 * exp_ch9.adb: Minor comment edit.
14343 2014-01-20 Robert Dewar <dewar@adacore.com>
14345 * gnat_rm.texi: Document that Allow_Integer_Address is permitted
14346 only if System.Address is a private type.
14347 * opt.ads (Allow_Integer_Address): No longer set by -gnates.
14348 * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14349 Allowed only if type System.Address is private, since otherwise
14351 * sem_res.adb: Fix failure to properly Analyze unchecked
14352 conversions that were introduced by Allow_Integer_Address.
14353 * switch-c.adb: Remove -gnates switch.
14354 * usage.adb: Remove -gnates switch.
14355 * gnat_ugn.texi: Remove documentation of -gnates flag.
14357 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14359 * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
14360 resolve expression to perform proper name capture.
14362 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14364 * sem.adb (Semantics): When saving/restoring configuration
14365 switches, the spec of a pre- defined unit that is the main unit
14366 must be treated as a predefined unit as well.
14368 2014-01-20 Thomas Quinot <quinot@adacore.com>
14370 * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
14371 expression, insert an extra conditional expression when saving
14372 the value of the expression, for the benefit of control flow
14373 graph based coverage analysis.
14374 * exp_ch3.adb: Minor reformatting.
14376 2014-01-20 Robert Dewar <dewar@adacore.com>
14378 * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
14379 * gnat_rm.texi: Document pragma Allow_Integer_Address.
14380 * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
14381 * opt.ads: New flag Allow_Integer_Address.
14382 * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
14383 * sem_ch5.adb: Minor reformatting.
14384 * sem_prag.adb: Implement pragma Allow_Integer_Address.
14385 * sem_res.adb (Resolve): Allow integer address value if
14387 * sem_util.adb: Minor reformatting.
14388 * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
14389 * switch-c.adb: Recognize flag -gnates.
14390 * usage.adb: Document flag -gnates.
14392 2014-01-20 Thomas Quinot <quinot@adacore.com>
14394 * s-tadeca.adb: Fix minor typos in comment.
14396 2014-01-20 Pascal Obry <obry@adacore.com>
14398 * s-win32.ads (FreeLibrary): New import.
14400 2014-01-20 Robert Dewar <dewar@adacore.com>
14402 * sem_res.adb, sem_cat.adb: Minor reformatting.
14403 * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
14404 assigning to OUT parameters for the current subprogram scope.
14405 * exp_ch4.adb: Minor reformatting.
14407 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14409 * exp_ch4.adb (Process_Transient_Object,
14410 Find_Enclosing_Contexts): If the top-level if-expression that
14411 generated the transient object is an actual in a call, the proper
14412 Hook_Context is a construct enclosing the call.
14413 * einfo.ads: Indicate that Related_Expression is used to link a
14414 loop variable to the container expression over which the loop
14416 (Analyze_Iterator_Specification): Set the Related_Expression of
14417 the loop variable in a container element iterator.
14418 (Note_Possible_Modification): If the variable is the loop
14419 variable in a container element iterator, indicate that the
14420 enclosing container is also modified.
14422 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14424 * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
14426 2014-01-20 Robert Dewar <dewar@adacore.com>
14428 * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
14429 Minor reformatting and code clean up.
14431 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14433 * sem_cat.adb (Validate_Object_Declaration): Relax semantics
14434 of objects of private type if Relaxed_RM_Semantics.
14436 2014-01-20 Claire Dross <dross@adacore.com>
14438 * a-cofove.ads (Vector): Capacity discriminant
14439 should be in range of the index.
14441 2014-01-20 Thomas Quinot <quinot@adacore.com>
14443 * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
14444 Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
14445 possible difference between epoch of Ada.Calendar clock and Ada
14446 real-time/tasking clock.
14447 * s-taprop-posix.adb: Minor comment fix.
14449 2014-01-20 Doug Rupp <rupp@adacore.com>
14451 * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
14453 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14455 * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
14456 checks on the prefix of attribute 'Old.
14457 * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
14458 generation of validity checks on a range that belongs to the
14459 iteration scheme of a quantified expression.
14460 * sem_ch5.adb (One_Bound): Suppress the generation of validity
14461 checks on a bound that belongs to the iteration scheme of a
14462 quantified expression, generate the check in all other cases.
14464 2014-01-20 Bob Duff <duff@adacore.com>
14466 * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
14468 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14470 * sem_res.adb (Resolve): When compiling a predefined unit, ignore
14471 interpretations that do not come from other predefined units,
14472 to prevent spurious ambiguities in the presence of user-defined
14473 operators in the context of (an instance of) a predefined unit.
14475 2014-01-20 Robert Dewar <dewar@adacore.com>
14477 * gnat_rm.texi: Document that Loop_Variant is included in
14478 Statement_Assertions.
14479 * sem_prag.adb (Check_Kind): Add Loop_Variant to
14480 Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
14481 to Statement_Assertions.
14483 2014-01-20 Doug Rupp <rupp@adacore.com>
14485 * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
14486 for errno ENOENT from RTP on NFS mounted file system.
14488 2014-01-20 Ed Schonberg <schonberg@adacore.com>
14490 * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
14491 examine code that does not come from source. The check does not
14492 apply to code generated for constraint checks, and such code may
14493 generate spurious error messages when compiled with expansion
14494 disabled (as in a generic unit) because side effects may not
14496 2) Make error messages more explicit: indicate the component
14497 of the construct whose value is indeterminate because of a
14498 call to a function with in-out parameter in another component,
14499 when there is no mandated order of execution between the two
14500 components (actuals, aggregate components, alternatives).
14502 2014-01-20 Robert Dewar <dewar@adacore.com>
14504 * gnat_rm.texi: Minor cleanup.
14506 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14508 * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
14509 can now apply to a refined postcondition.
14510 * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
14511 variable Result_Seen. Add variables Case_Prag, Post_Prag,
14512 Seen_In_Case and Seen_In_Post. Update the mechanism that detects
14513 whether postconditions and/or constract-cases mention attribute
14514 'Result and introduce a post-state when applied to functions.
14515 (Check_Result_And_Post_State): Removed.
14516 * sem_prag.adb (Analyze_Pragma): Add local variable
14517 Result_Seen. Verify that the expression of pragma Refined_Post
14518 mentions attribute 'Result and introduces a post-state.
14519 * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
14521 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14523 * exp_ch7.adb (Is_Subprogram_Call): New routine.
14524 (Process_Transient_Objects): Make variable Must_Hook global with
14525 respect to all locally declared subprograms. Search the context
14526 for at least one subprogram call.
14527 (Requires_Hooking): Removed.
14529 2014-01-20 Claire Dross <dross@adacore.com>
14531 * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
14532 * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
14533 External_Axiomatization);
14535 2014-01-20 Robert Dewar <dewar@adacore.com>
14537 * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
14538 Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
14539 * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
14540 Allow Loop_Entry to be used in these pragmas if they appear in
14541 an appropriate context.
14542 (Placement_Error): Specialize error
14543 message for pragma Assert[_And_Cut] or pragma Assume containing
14544 Loop_Entry attribute.
14545 * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
14546 * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
14547 and code clean ups.
14549 2014-01-20 Robert Dewar <dewar@adacore.com>
14551 * gnat1drv.adb: Minor comment update.
14553 2014-01-20 Tristan Gingold <gingold@adacore.com>
14555 * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
14556 variables, comment out unused code.
14557 * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
14558 * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
14559 * s-excmac-arm.ads: New file.
14561 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14563 * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
14564 Drange and Index_Typ. Remove the circuitry which creates a
14565 range check to compare the index type of the array against the
14567 * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
14568 the circuitry which creates a range check to handle a
14569 discrete_range denoted by a subtype indication.
14571 2014-01-20 Pierre-Marie Derodat <derodat@adacore.com>
14573 * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
14574 nodes to get the original sloc range.
14576 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14578 * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
14579 entity of a [library level] package.
14581 2014-01-20 Tristan Gingold <gingold@adacore.com>
14583 * raise-gcc.c (exception_class_eq): New function.
14584 (is_handled_by): Use it to compare exception classes.
14585 (PERSONALITY_STORAGE): Define. (continue_unwind): New function to
14586 be called to return URC_CONTINUE_UNWIND.
14587 (personality_body): New function, extracted from PERSONALITY_ROUTINE.
14588 (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
14590 2014-01-20 Robert Dewar <dewar@adacore.com>
14592 * opt.ads: Minor comment update.
14594 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14596 * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
14597 constants to the "Local variables" area. Add new constant D. Add
14598 new variables Drange and Index_Typ. Rename Pfx to Rep and Ptp
14599 to Pref_Typ and update all occurrences. Add circuitry to extract
14600 the discrete_range and the index type and build a range check.
14602 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14604 * gnat1drv.adb (Adjust_Global_Switches): Enable
14605 Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
14608 2014-01-20 Thomas Quinot <quinot@adacore.com>
14610 * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
14612 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14614 * sem_ch13.adb (Analyze_Aspect_Specifications):
14615 When aspect SPARK_Mode appears on a package body, insert the
14616 generated pragma at the top of the body declarations.
14618 2014-01-20 Robert Dewar <dewar@adacore.com>
14620 * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
14621 checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
14622 expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
14623 sem_ch8.adb, exp_dist.adb: Minor reformatting.
14625 2014-01-20 Yannick Moy <moy@adacore.com>
14627 * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
14630 2014-01-20 Pascal Obry <obry@adacore.com>
14632 * g-arrspl.ads (Slice_Set): New definition (will use a copy on
14634 * g-arrspl.adb: Adapt all routine to this new implementation.
14635 (Set): Copy the Slice_Set definition before reusing it.
14637 2014-01-20 Arnaud Charlet <charlet@adacore.com>
14639 * sem_prag.adb (Process_Import_Or_Interface): In
14640 Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
14641 (Analyze_Pragma): Ditto for pragma Export.
14642 * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
14645 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14647 * einfo.ads: E_Abstract_State is now part of the entities that
14648 can be overloaded. Update type Overloadable_Kind to reflect the
14649 inclusion of abstract states.
14650 * sem_ch6.adb (New_Overloaded_Entity): A function can now
14651 overload an abstract state.
14652 * sem_prag.adb (Analyze_Constituent): Handle the overloading
14653 of states by functions. Use Entity_Of to obtain the entity of
14654 a constituent. (Analyze_Global_Item): Handle the overloading of
14655 states by functions.
14656 (Analyze_Initialization_Item): Handle the
14657 overloading of states by functions. Use Entity_Of to obtain the
14659 (Analyze_Input_Item): Handle the overloading
14660 of states by functions. Use Entity_Of to obtain the entity of an item.
14661 (Analyze_Input_Output): Handle the overloading of states by functions.
14662 (Analyze_Refinement_Clause): Handle the overloading
14663 of states by functions. Use Entity_Of to obtain the entity of an item.
14664 (Appears_In): Use Entity_Of to obtain the entity of an element.
14665 (Check_Usage): Use Entity_Of to obtain the entity of
14666 an item. Add a guard to prevent a crash due to a previous error.
14667 (Resolve_State): New routine.
14669 2014-01-20 Yannick Moy <moy@adacore.com>
14671 * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
14672 opt.ads: Minor comments updates.
14674 2014-01-20 Hristian Kirtchev <kirtchev@adacore.com>
14676 * einfo.adb (Non_Limited_View): Applies to abstract states.
14677 (Set_From_Limited_With): Applies to abstract states.
14678 (Set_Non_Limited_View): Applies to abstract states.
14679 (Write_Field17): Output the non-limited view of an abstract state.
14680 * einfo.ads: Update the comment on usage and occurrences in
14681 nodes for attributes From_Limited_With and Non_Limited_View.
14682 * sem_aux.adb (Available_View): This routine can now handle
14684 * sem_aux.ads (Available_View): This routine can now handle
14685 abstract states. Update the comment on usage.
14686 * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
14687 of states and variables.
14688 (In_Pragmas_Depends_Or_Global): New routine.
14689 * sem_ch10.adb (Build_Limited_Views): Implement
14690 abstract (limited) views of variables and states.
14691 (Build_Shadow_Entity): This routine is now a procedure. Add
14692 formal parameter Shadow. Update the comment on usage. Add
14693 context-specific decoration for states and variables.
14694 (Decorate_State): New routine. (Decorate_Variable): New routine.
14695 (Find_And_Process_States): New routine.
14696 (Process_Declarations): Renamed to Process_Declarations_And_States.
14697 (Process_Declarations_And_States): Add formal parameters
14698 Pack and Create_Abstract_Views. Update the comment on usage.
14699 (Process_States): New routine.
14700 * sem_prag.adb (Check_Dependency_Clause): Handle abstract
14701 views of states and variables. Match the abstract view of a state
14702 against its corresponding non-abstract view.
14703 (Is_Matching_Input):
14704 Handle abstract views of states and variables. Match the abstract
14705 view of a state against its corresponding non-abstract view.
14706 (Process_Global_Item): Handle abstract views of states and
14709 2014-01-20 Bob Duff <duff@adacore.com>
14711 * sem_ch10.adb (Expand_With_Clause): Don't
14712 recurse on the prefix if the current with-ed name refers to a
14713 package that renames its own parent, eg "package P.Q renames P;".
14715 2014-01-20 Yannick Moy <moy@adacore.com>
14717 * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
14718 * opt.adb, opt.ads (Full_Expander_Active): Remove function.
14719 * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
14720 * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
14721 * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
14724 2014-01-20 Yannick Moy <moy@adacore.com>
14726 * sinfo.ads Update documentation of GNATprove mode.
14728 2014-01-20 Yannick Moy <moy@adacore.com>
14730 * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
14731 * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
14732 * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
14733 * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
14735 * sem_ch13.adb: Remove blank.
14736 * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
14737 subprograms by alias for renamings, not for inherited primitive
14739 * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
14741 (Remove_Side_Effects): Apply the removal in
14742 GNATprove mode, for the full analysis of expressions.
14743 * expander.adb (Expand): Call the light SPARK expansion in GNATprove
14745 (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
14746 save/restore actions for Expander_Active flag in GNATprove mode,
14747 similar to what is done in ASIS mode.
14748 * frontend.adb (Frontend): Generic bodies are instantiated in
14750 * gnat1drv.adb (Adjust_Global_Switches): Set operating
14751 mode to Check_Semantics in GNATprove mode, although a light
14752 expansion is still performed.
14753 (Gnat1drv): Set Back_End_Mode to
14754 Declarations_Only in GNATprove mode, and later on special case
14755 the GNATprove mode to continue analysis anyway.
14756 * lib-writ.adb (Write_ALI): Always generate ALI files in
14758 * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
14760 (SPARK_Mode): Renamed as GNATprove_Mode.
14761 * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
14762 tree in GNATprove_Mode.
14763 * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
14764 body in GNATprove mode.
14765 (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
14767 * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
14768 Make sure side effects are removed in GNATprove mode.
14770 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14772 * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
14773 for aliased objects with an unconstrained nominal subtype.
14774 * gcc-interface/trans.c (Call_to_gnu): Likewise.
14775 (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
14776 <case N_Op_Minus>: Remove useless code.
14777 (Exception_Handler_to_gnu_zcx): Minor tweaks.
14779 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14781 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
14782 Tidy up. For a subtype with discriminants and variant part, if a
14783 variant is statically selected and the fields all have a constant
14784 position, put them in order of increasing position. Likewise if
14785 no variant part but representation clause is present.
14786 * gcc-interface/utils.c (make_packable_type): Robustify.
14787 (maybe_pad_type): Use local variable and tidy up condition. If no
14788 alignment is specified, use the original one.
14789 (create_type_stub_decl): Minor tweak.
14790 (convert) <case VECTOR_CST>: Fix typo.
14791 <case CONSTRUCTOR>: Deal with padding types around the same type.
14792 Do not punt on missing fields.
14793 (unchecked_convert): Call finish_record_type to lay out the special
14794 record types made for conversions from/to problematic integer types.
14795 Bump the alignment of CONSTRUCTORs before converting them to a more
14798 2014-01-20 Eric Botcazou <ebotcazou@adacore.com>
14800 * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
14801 obsolete code for type_annotate_only mode, simplify code and slightly
14802 improve wording of comments.
14804 2014-01-12 Eric Botcazou <ebotcazou@adacore.com>
14807 * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
14808 as intermediate type.
14809 (UI_To_gnu): Likewise.
14811 2014-01-03 Eric Botcazou <ebotcazou@adacore.com>
14813 * gnatvsn.ads (Current_Year): Bump to 2014.
14815 2014-01-02 Tobias Burnus <burnus@net-b.de>
14817 * gnat_ugn.texi: Bump @copying's copyright year.
14819 Copyright (C) 2014 Free Software Foundation, Inc.
14821 Copying and distribution of this file, with or without modification,
14822 are permitted in any medium without royalty provided the copyright
14823 notice and this notice are preserved.