2014-10-17 Ed Schonberg <schonberg@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blob63cf230a00152095cc58f45cc181d24629cd14d0
1 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
3         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
4         subprogram from base type.
5         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
6         subprogram for private type, not any of its subtypes.
7         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
8         of procedure entity, because a call to it may be generated in
9         a client unit before the corresponding subprogram declaration
10         is analyzed.
12 2014-10-17  Vincent Celier  <celier@adacore.com>
14         * prj-nmsc.adb (Get_Directories): Do not create directories
15         when a project is abstract.
17 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
19         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
20         of iteration is given by an expression that is not an array type,
21         verify that its type implements an iterator iterface.
23 2014-10-17  Robert Dewar  <dewar@adacore.com>
25         * sem_attr.adb (Eval_Attribute): Ensure that attribute
26         reference is not marked as being a static expression if the
27         prefix evaluation raises CE.
29 2014-10-17  Robert Dewar  <dewar@adacore.com>
31         * exp_pakd.adb: Move bit packed entity tables to spec.
32         * exp_pakd.ads: Move bit packed entity tables here from body.
33         * freeze.adb (Freeze_Array_Type): Check that packed array type
34         is supported.
35         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
36         Specialize messages using PRE_Id_Table.
37         * uintp.ads, uintp.adb (UI_Image): New functional form.
39 2014-10-17  Robert Dewar  <dewar@adacore.com>
41         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
42         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
43         E_Variable.
44         * exp_ch3.adb (Default_Initialize_Object): Handle
45         Suppress_Initialization.
46         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
47         procedure (Expand_N_Pragma): Handle Suppress_Initialization
48         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
49         (Undo_Initialization): New procedure.
50         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
51         This is now allowed for E_Variable case.
52         * gnat_rm.texi: Document new aspect Suppress_Initialization
53         Suppress_Initialization aspect/pragma can apply to variable.
54         * einfo.ads: Minor reformatting.
56 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
58         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
60 2014-10-17  Robert Dewar  <dewar@adacore.com>
62         * cstand.adb (Create_Standard): Mark Short_Integer as
63         implementation defined.
64         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
65         compiler built with assertions for No_Implementation_Identifiers test.
67 2014-10-17  Robert Dewar  <dewar@adacore.com>
69         * aspects.ads: Documentation fix, aspect Lock_Free does have a
70         corresponding pragma.
71         * gnat_rm.texi: Document implementation defined boolean aspects
72         as boolean.
74 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
76         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
77         preserve semantic information on the invariant expression
78         (typically a function call) because it may be inherited by a
79         type extension in a different unit, and it cannot be resolved
80         by visibility elsewhere because it may refer to local entities.
82 2014-10-17  Robert Dewar  <dewar@adacore.com>
84         * gnat_rm.texi: Document that string literal can be used for
85         pragma Warnings when operating in Ada 83 mode.
87 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
89         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
90         subsidiary function to Freeze_ Expression, used to determine
91         whether an aggregate for an array of access types also freezes the
92         designated type, when some aggregate components are allocators.
94 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
96         * a-strsea.adb (Find_Token): AI05-031 indicates that the
97         procedure must raise Index_Error when Source is not empty and
98         the From parameter is not within the range of the Source string.
100 2014-10-17  Robert Dewar  <dewar@adacore.com>
102         * sem_prag.adb (Is_Static_String_Expression): Allow string
103         literal in Ada 83 mode.
105 2014-10-17  Vincent Celier  <celier@adacore.com>
107         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
108         not take into account any compiler command from package IDE.
110 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
112         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
113         wrapper must have the same identifiers as those of the formal
114         subprogram, because calls within the generic may use named
115         associations.
117 2014-10-17  Robert Dewar  <dewar@adacore.com>
119         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
120         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
122 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
124         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
125         specfications from original type declaration to declaration of
126         implicit base, because original node is rewritten as a subtype
127         declaration on which type aspects do not belong.
129 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
131         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
132         inherits the attributes related to pragma Default_Initial_Condition
133         from its parent type.
135 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
137         * a-strsea.adb (Index - versions with a From parameter):
138         According to AI05-056, the Index functions with a From parameter
139         return 0 if the source is an empty string.
141 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
143         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
144         the consistency checks in ASIS mode.
146 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
148         * s-expmod.ads: Minor typo fix.
150 2014-10-17  Robert Dewar  <dewar@adacore.com>
152         * sem_util.adb: Minor reformatting.
154 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
156         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
157         actuals that are defaulted subprograms of the formal subprogram
158         declaration.
160 2014-10-17  Robert Dewar  <dewar@adacore.com>
162         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
163         implementation base type.
164         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
165         operands are always expanded out into component comparisons.
167 2014-10-17  Robert Dewar  <dewar@adacore.com>
169         * s-vallli.adb: Minor comment correction.
170         * s-valuti.ads: Minor comment reformatting.
172 2014-10-17  Robert Dewar  <dewar@adacore.com>
174         * gnat_rm.texi: Document System.Atomic_Counters.
175         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
176         list of user- accessible units added as children of System.
177         * s-atocou.ads: Update comment.
179 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
181         * s-expmod.ads: Add comments.
183 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
185         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
186         of all attributes related to pragma Default_Initial_Condition.
187         (Build_Derived_Type): Propagation of all attributes related
188         to pragma Default_Initial_Condition.
189         (Process_Full_View): Account for the case where the full view derives
190         from another private type and propagate the attributes related
191         to pragma Default_Initial_Condition to the private view.
192         (Propagate_Default_Init_Cond_Attributes): New routine.
193         * sem_util.adb: Alphabetize various routines.
194         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
195         when calling the default initial condition procedure of a private type.
196         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
197         the generation of multiple default initial condition procedures.
199 2014-10-17  Robert Dewar  <dewar@adacore.com>
201         * prj-conf.adb: Revert previous change.
203 2014-10-17  Robert Dewar  <dewar@adacore.com>
205         * lib-writ.ads, s-valdec.ads: Minor reformatting.
207 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
209         * sem_ch12.adb: Additional work on function wrappers.
211 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
213         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
214         on the renamed object of renamings.
216 2014-10-17  Vincent Celier  <celier@adacore.com>
218         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
219         mode, always use the native target.
221 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
223         * gcc-interface/misc.c: Adjust include files.
225 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
226             Alan Modra  <amodra@gmail.com>
228         PR ada/63225
229         * uintp.adb (Vector_To_Uint): Move from here to...
230         * uintp.ads (UI_Vector): Make public.
231         (Vector_To_Uint): ...here.
233 2014-10-10  Robert Dewar  <dewar@adacore.com>
235         * freeze.adb, sem_attr.adb: Minor reformatting.
237 2014-10-10  Johannes Kanig  <kanig@adacore.com>
239         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
240         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
241         to container type.
243 2014-10-10  Vincent Celier  <celier@adacore.com>
245         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
246         any configuration switches from the project file.
248 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
250         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
251         (Build_Function_Wrapper): New function, to construct a wrapper
252         function for actuals that are functions with an arbitrary
253         number of parameters. Used in GNATProve mode to simplify proof
254         propagation in instantiations.
256 2014-10-10  Robert Dewar  <dewar@adacore.com>
258         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
259         code clean up.
261 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
263         * sem_res.adb (Is_OK_Volatile_Context): Allow
264         a volatile object reference to appear as the expression of a
265         type conversion.
267 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
269         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
270         Aspect specification is legal on a local instantiation of a
271         library-level generic unit.
273 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
275         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
276         if inlining has been enabled via -gnatn and the target is not GCC.
278 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
280         * freeze.adb (Freeze_Entity): Freezing a subprogram does
281         not always freeze its profile.  In particular, an attribute
282         reference that takes the access type does not freeze the types
283         of the formals.
285 2014-10-10  Robert Dewar  <dewar@adacore.com>
287         * errout.adb (Adjust_Name_Case): New procedure.
288         (Set_Msg_Node): Use Adjust_Name_Case.
289         * errout.ads (Adjust_Name_Case): New procedure.
290         * exp_intr.adb (Add_Source_Info): Minor code reorganization
291         (use Ekind_In).
292         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
293         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
294         and fix up entries in Sig_Flags, and correct logical errors in
295         function itself.
296         * sprint.adb (Sprint_Node_Actual): Properly print string for
297         raise statement.
299 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
301         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
302         anonymous array type with delayed aspects, defer freezing of
303         type until object itself is frozen.
304         * freeze.adb (Freeze_Entity): When freezing an object of an
305         anonymous array type with delayed aspects, remove freeze node of
306         object after freezing type, to prevent out-of-order elaboration
307         in the back-end. The initialization call for the object has
308         already been constructed when expanding the object declaration.
310 2014-10-10  Robert Dewar  <dewar@adacore.com>
312         * exp_intr.adb (Write_Entity_Name): Moved to outer level
313         (Write_Entity_Name): Properly handle operator names
314         (Expand_Source_Info): New procedure.
315         * exp_intr.ads (Add_Source_Info): New procedure.
317 2014-10-10  Robert Dewar  <dewar@adacore.com>
319         * butil.ads: Minor reformatting.
320         * sem_ch5.adb: Code clean up.
322 2014-10-10  Robert Dewar  <dewar@adacore.com>
324         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
325         Prefix_Exception_Messages.
326         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
327         * opt.ads: New flags Prefix_Exception_Message[_Config].
328         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
329         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
330         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
331         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
333 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
335         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
336         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
338 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
340         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
341         contain pragmas generated for loop invariants and type predicates.
342         Clarify use of this subprogram.
344 2014-10-10  Yannick Moy  <moy@adacore.com>
346         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
347         contracts.
348         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
349         SPARK_Mode is Off.
351 2014-10-10  Vadim Godunko  <godunko@adacore.com>
353         * a-stwima.adb (To_Sequence): Compute size of result array.
355 2014-10-10  Javier Miranda  <miranda@adacore.com>
357         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
358         sources of the example to avoid a warning when the Ada files are
359         automatically generated by the binding generator.
361 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
363         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
364         Do_Range_Check on the expression of a record component
365         association when needed, as is done for array components, when
366         the corresponding type is a scalar type.
368 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
370         * a-coinho-shared.adb: Minor typo fix.
371         * prj-env.ads: Minor reformatting.
373 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
375         * sem_res.adb (Resolve_String_Literal): Do not
376         generate a string literal subtype for the default expression of
377         a formal parameter in GNATprove mode.
379 2014-10-10  Yannick Moy  <moy@adacore.com>
381         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
383 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
385         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
386         declaration for loop parameter before rest of loop, and set
387         entity kind to prevent assignments to it in the user code.
388         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
389         loop parameter in an element iteration over o formal container.
391 2014-10-10  Robert Dewar  <dewar@adacore.com>
393         * gnat_ugn.texi: Document use of user-level routines to handle
394         e.g. col major arrays.
396 2014-10-10  Doug Rupp  <rupp@adacore.com>
398         * s-osinte-android.adb: Fix misspelling.
399         * gsocket.h: Tweak the Android quirks.
401 2014-10-10  Robert Dewar  <dewar@adacore.com>
403         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
405 2014-10-10  Robert Dewar  <dewar@adacore.com>
407         * sem_ch13.adb: Minor code reorganization.
409 2014-10-10  Pat Rogers  <rogers@adacore.com>
411         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
412         for users.
414 2014-10-10  Vadim Godunko  <godunko@adacore.com>
416         * a-coinho-shared.adb: Add minor comment.
417         * a-stzmap.adb (To_Sequence): Compute size of result array.
419 2014-10-10  Javier Miranda  <miranda@adacore.com>
421         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
422         if-stmt to match its current documentation.
424 2014-10-10  Robert Dewar  <dewar@adacore.com>
426         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
427         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
428         sem_ch6.adb, sem_cat.adb, sem_disp.adb
429         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
430         throughout where appropriate.
432 2014-10-10  Bob Duff  <duff@adacore.com>
434         * a-coinho-shared.ads: Minor reformatting.
435         * s-traceb.adb: Minor clean up.
437 2014-10-10  Robert Dewar  <dewar@adacore.com>
439         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
440         * ali.ads (GNATprove_Mode): New component in ALI table.
441         (GNATprove_Mode_Specified): New global.
442         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
443         in GNATProve mode.
444         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
445         GNATProve_Mode.
447 2014-10-10  Javier Miranda  <miranda@adacore.com>
449         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
450         (Build_Init_Statement): Ensure that statements
451         associated with the parent components are located at the beginning
452         of the returned list of statements.
454 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
456         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
457         view of a private type T that has a type invariant is a scalar
458         or constrained array type, the base type created for the full
459         view has the same type invariant.
461 2014-10-10  Robert Dewar  <dewar@adacore.com>
463         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
464         reorganization.
466 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
468         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
469         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
471 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
473         * gcc-interface/Make-lang.in (check_acats_numbers0,
474         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
475         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
476         check_acats_numbers, check_acats_subdirs): New variables.
477         (check_acats_targets): Use $(check_acats_subdirs).
478         (check-acats, check-acats%): Rewritten so that for parallelized
479         testing each job runs all the chapters files, with
480         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
481         directory sequentially and share it.
482         (check-acats-subtargets): Always print just check-acats.
484 2014-08-25  Martin Liska  <mliska@suse.cz>
486         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
487         new cgraph interface.
488         (gnat_write_global_declarations): Likewise.
490 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
492         * 9drpc.adb: Fix a typo
493         * s-interr.ads: Likewise
494         * s-taskin.ads: Likewise
495         * s-traces.ads: Likewise
496         * sysdep.c: Likewise
498 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
500         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
501         * gsocket.h Add include of <unistd.h> on RTEMS.
503 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
505         * s-osinte-rtems.adb: Correct formatting of line in license block.
507 2014-08-04  Claire Dross  <dross@adacore.com>
509         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
510         For an instance, look at the scope before the generic parent.
512 2014-08-04  Yannick Moy  <moy@adacore.com>
514         * lib-writ.ads: Update comments.
515         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
516         parameters to filter inherited subprograms.
518 2014-08-04  Robert Dewar  <dewar@adacore.com>
520         * gnat_rm.texi: Add section on use of address clause for memory
521         mapped I/O.
523 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
525         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
526         particular the subtype created for a generic actual, inherits
527         invariant information from the base type.
529 2014-08-04  Robert Dewar  <dewar@adacore.com>
531         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
532         * gnat_rm.texi: Add documentation for aspect Obsolescent.
533         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
534         Obsolescent.
535         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
536         * s-osprim-mingw.adb: Minor reformatting.
537         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
538         (Resolve_Indexed_Component): Rework warnings for non-atomic access
539         (Resolve_Selected_Component): Add warnings for non-atomic access.
541 2014-08-04  Doug Rupp  <rupp@adacore.com>
543         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
544         formal to long_long.
545         * g-calend.ads (timeval): Bump up size to accomodate sec type.
546         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
547         long_long
548         * s-osprim-posix.adb (timeval): Bump up size to accomodate
549         new sec type.
550         (timeval_to_duration): Change sec formal to Long_Long_Integer
551         * s-osinte-darwin.adb (timeval): Bump up
552         size to accomodate new sec type.
553         (timeval_to_duration): Change sec formal to long_long
554         * s-osinte-android.adb: Likewise.
555         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
556         sec formal from long to long long.
558 2014-08-04  Robert Dewar  <dewar@adacore.com>
560         * sem_res.adb (Resolve_Qualified_Expression): Make sure
561         Do_Range_Check flag gets set.
563 2014-08-04  Robert Dewar  <dewar@adacore.com>
565         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
566         * exp_ch3.adb (Build_Array_Init_Proc): Use
567         Is_Standard_String_Type.
568         (Expand_Freeze_Array_Type): ditto.
569         (Get_Simple_Init_Val): ditto.
570         (Needs_Simple_Initialization): ditto.
571         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
572         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
574 2014-08-04  Pascal Obry  <obry@adacore.com>
576         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
577         _stprintf which insert garbage into the wfull_path buffer.
579 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
581         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
582         code.
583         * fe.h: Minor reformatting.
585 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
587         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
589 2014-08-04  Robert Dewar  <dewar@adacore.com>
591         * par-ch13.adb (Get_Aspect_Specifications): Improve error
592         recovery, fixing a -gnatQ bomb.
594 2014-08-04  Yannick Moy  <moy@adacore.com>
596         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
597         do not generate two Itypes with the same name for an array
598         definition.
599         * sinfo.ads: Expand doc on GNATprove mode.
601 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
603         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
604         master and storage pool attributes on the root type of an
605         anonymous access type.
606         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
607         and storage pool attributes on the root type of an anonymous
608         access type.
610 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
612         * exp_ch3.adb: Minor reformatting.
613         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
614         * tracebak.c: Remove use of above files.
615         * gcc-interface/Makefile.in: Update dependencies.
617 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
619         * gcc-interface/utils.c (gnat_set_type_context): Also set the
620         context for parallel types' TYPE_STUB_DECL.  Do not change
621         anything if the context is already set for them.
622         (gnat_pushdecl): Update the comment for calls to
623         gnat_set_type_context to mention parallel types.
624         (add_parallel_type): When adding a context-less parallel type to
625         a type that has a context, propagate the context from the latter
626         type to the former.
627         (process_deferred_decl_context): Call gnat_set_type_context
628         rather than manually setting the type context.
629         (build_unc_object_type): Call gnat_set_type_context on the
630         template type.
632 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
634         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
635         subtype indication and the case statement has only two choices,
636         replace subtype indication with its range, because the resulting
637         membership test cannot have a subtype indication as an operand.
639 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
641         * exp_ch3.adb: Update comments, minor reformatting.
643 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
645         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
646         the default initial condition procedures are build here.
647         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
648         analyzed argument of pragma Default_Initial_Condition in some
649         dummy code as GNATprove mode disables assertions, but still
650         needs to see the argument.
652 2014-08-04  Robert Dewar  <dewar@adacore.com>
654         * exp_ch6.adb, sem_util.adb: Minor reformatting.
656 2014-08-04  Olivier Hainque  <hainque@adacore.com>
658         * a-comutr.ads: Set Root_Node_Type'Alignment to
659         Standard'Maximum_Alignment, so that it is at least as large as
660         the max default for Tree_Node_Type'Alignment.
662 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
664         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
665         of the default initial condition procedure [body].
666         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
667         all default initial condition procedures at the end of private
668         declaration analysis.
669         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
670         routine.
671         (Build_Default_Init_Cond_Procedure_Body): Merged in the
672         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
673         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
674         New routine.
675         (Build_Default_Init_Cond_Procedure_Body): Removed.
677 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
679         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
680         postcondtion.
681         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
682         postcondition call.
684 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
686         * sem_prag.adb (Analyze_Pragma): Ensure that an
687         internally generated spec for a stand alone body is recognized
688         as a proper context for pragma SPARK_Mode.
690 2014-08-04  Robert Dewar  <dewar@adacore.com>
692         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
694 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
696         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
697         when -gnatO has already been specified, for compatibility
698         with gcc driver.
699         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
700         codepeer mode.
701         * g-expect.ads: Fix typo.
703 2014-08-04  Thomas Quinot  <quinot@adacore.com>
705         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
706         must account for the bounds template if the designated type is
707         an unconstrained array.
709 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
711         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
712         SPARK_Mode in the body.
713         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
714         way to verify the consistency of SPARK_Mode between a spec and
715         a body.
716         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
717         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
718         manually.
719         (Analyze_Subprogram_Instantiation): Remove the call to
720         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
721         manually.
722         * sem_prag.adb (Analyze_Pragma): Remove local variable
723         Inst_Id. SPARK_Mode can no longer be applied to a package or
724         subprogram instantiation.
725         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
726         Removed.
728 2014-08-04  Robert Dewar  <dewar@adacore.com>
730         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
732 2014-08-04  Yannick Moy  <moy@adacore.com>
734         * sem_ch3.adb (Derive_Type_Declaration,
735         Process_Discriminants): Remove SPARK-specific legality checks.
737 2014-08-04  Thomas Quinot  <quinot@adacore.com>
739         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
740         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
741         for HMAC.
743 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
745         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
746         compatibility of SPARK_Mode between a spec and a body, use the
747         SPARK_Mode of the public part.
748         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
749         the already available routine to exchange the aspects between
750         the template and its copy. Analyze the aspects of copy to
751         ensure that the corresponding pragmas perform their semantic
752         effects.  The partial analysis of aspects is no longer needed.
753         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
754         of the context.
755         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
756         the context.
757         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
758         instantiation which does not come from source.
760 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
762         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
763         SPARK_Mode pragmas to the public and private part of the unit.
764         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
765         type cannot have discriminants if the parent type already has
766         discriminants.
767         (Process_Discriminants): Ensure that the type of a discriminant is
768         discrete.
769         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
770         SPARK_Mode compatibility between a spec and a body can now be
771         safely performed while processing a generic.
772         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
773         SPARK_Mode compatibility between a spec and a body can now be
774         safely performed while processing a generic.
775         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
776         safely analyzed when processing a generic.
778 2014-08-04  Nicolas Roche  <roche@adacore.com>
780         * g-dirope.adb: Minor reformating.
782 2014-08-04  Robert Dewar  <dewar@adacore.com>
784         * sem_ch6.adb: Minor reformatting.
786 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
788         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
789         Before normalizing these pragmas into a pragma Check, preanalyze
790         the optional Message argument, (which is subsequently copied)
791         so that it has the proper semantic information for ASIS use.
792         * sem_case.adb: Initialize flag earlier.
793         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
794         the full source path of a configuration file is requested.
795         (Read_Source_File): Use Full_Name parameter..
797 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
799         * opt.ads Alphabetize various global flags. New flag
800         Ignore_Pragma_SPARK_Mode along with a comment on usage.
801         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
802         Pragma SPARK_Mode is now allowed in generic units.
803         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
804         between the SPARK_Mode of a spec and that of a body when inside
805         a generic.
806         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
807         compatibility between the SPARK_Mode of a spec and that of a
808         body when inside a generic.
809         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
810         Pragma SPARK_Mode is now allowed in generic units.
811         (Analyze_Package_Instantiation): Save and restore the value of
812         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
813         the governing SPARK_Mode before analyzing the instance.
814         (Analyze_Subprogram_Instantiation): Save and restore the value
815         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
816         the governing SPARK_Mode before analyzing the instance.
817         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
818         placement of a source pragma when inserting the generated pragma
819         for aspect SPARK_Mode.
820         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
821         pragma SPARK_Mode to allow for generics and their respective
822         instantiations.
823         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
824         (Set_Ignore_Pragma_SPARK_Mode): New routine.
826 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
828         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
829         renaming discriminants in tagged types first.
830         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
831         the underlying type of the prefix.
832         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
833         (process_freeze_entity): Reset the nodes of all the view of a type,
834         if any.
836 2014-08-04  Doug Rupp  <rupp@adacore.com>
837             Olivier Hainque  <hainque@adacore.com>
839         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
840         and remove incorrect EH_MECHANISM macros.
841         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
842         EXTRA_LIBGNAT_OBJS.
844 2014-08-04  Robert Dewar  <dewar@adacore.com>
846         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
847         of constructed 'Valid attribute in -gnatVa mode does not appear
848         to come from source.
849         * sem_attr.adb (Analyze_Access_Attribute): Don't set
850         Never_Set_In_Source for non-source reference.
851         * sem_util.adb: Minor reformatting.
852         * sem_warn.adb (Check_References): Don't check Address_Taken,
853         not necessary, see comment.
855 2014-08-04  Robert Dewar  <dewar@adacore.com>
857         * sem_util.adb, sem_case.adb: Minor reformatting.
859 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
861         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
862         limited view, replace with non-limited view, which is available
863         at the point of an entry call.
865 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
867         * exp_ch6.adb (Expand_Call): If the call is to a function in
868         a run-time unit that is marked Inline_Always, we must suppress
869         debugging information on it, so that the code that is eventually
870         inlined will not affect debugging of the user program.
872 2014-08-04  Robert Dewar  <dewar@adacore.com>
874         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
875         fixes.
877 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
879         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
880         an aspect Import that specifies a False value.
882 2014-08-04  Robert Dewar  <dewar@adacore.com>
884         * gnat_rm.texi: Add section on aspect Invariant'Class.
886 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
888         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
889         for better control of cascaded error messages when some choice
890         in a case statement over a predicated type violates the given
891         static predicate.
893 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
895         * sem_ch3.adb (Build_Derived_Type): Modify the
896         inheritance of the rep chain to ensure that a non-tagged type's
897         items are not clobbered during the inheritance.
899 2014-08-04  Robert Dewar  <dewar@adacore.com>
901         * sem_ch3.adb, einfo.ads: Minor reformatting.
903 2014-08-04  Yannick Moy  <moy@adacore.com>
905         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
906         detection of subprograms that cannot be inlined in GNATprove mode.
908 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
910         * einfo.adb: Add guard to Returns_Limited_View.
912 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
914         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
915         the secondary stack to respect the alignments of the returned objects.
917 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
919         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
920         on function entities whose return type is a limited view.
921         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
922         where to place the freeze node for a function that returns the
923         limited view of a type, when the function is called and frozen
924         in a different unit.
926 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
928         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
929         refactoring.
931 2014-08-04  Robert Dewar  <dewar@adacore.com>
933         * gnat_ugn.texi: Clarify documentation on assertions.
935 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
937         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
938         if a component association has a box initialization when the
939         component type has no default initialization, either through an
940         initial value, an aspect, or an implicit initialization procedure.
942 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
944         * freeze.adb: Code clean up.
946 2014-08-04  Thomas Quinot  <quinot@adacore.com>
948         * sem_ch5.adb: Minor reformatting.
950 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
952         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
953         a function can return a limited view of a type declared
954         elsewhere. In that case the function cannot be frozen at the end
955         of its enclosing package. If its first use is in a different unit,
956         it cannot be frozen there, but if the call is legal the full view
957         of the return type is available and the subprogram can now be
958         frozen. However the freeze node cannot be inserted at the point
959         of call, but rather must go in the package holding the function,
960         so that the backend can process it in the proper context.
962 2014-08-04  Robert Dewar  <dewar@adacore.com>
964         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
966 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
968         * sem_ch4.adb (Operator_Check): Refine previous change.
970 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
972         * sem_scil.ads: Improve comments.
973         * sem_ch4.adb (Analyze_Equality_Op): Add support for
974         Allow_Integer_Address (equality between Address and Integer).
976 2014-08-04  Yannick Moy  <moy@adacore.com>
978         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
979         notation on untagged objects.
980         * sem.ads: Update comment.
981         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
982         not inline subprograms declared in the visible part of a package.
984 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
986         * exp_ch5.adb: minor reformatting.
987         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
988         parameters.
990 2014-08-04  Thomas Quinot  <quinot@adacore.com>
992         * s-fatgen.adb: Minor reformatting.
994 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
996         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
997         False on .NET.
999 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1001         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
1002         the loop parameter for element iterators over containers and
1003         arrays, so that improper uses of it are detected in the loop
1004         body when expansion is disabled.
1005         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
1006         generated cursor is that of the analyzed loop parameter.
1008 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1010         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
1011         Flag_Decl. Do not analyze the declaration of the flag as it is
1012         not part of the tree yet, instead add it to the freeze actions
1013         of the C++ type.
1015 2014-08-04  Robert Dewar  <dewar@adacore.com>
1017         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
1018         case of OUT and IN OUT parameter correctly (where Source_Typ is
1019         set), we were missing one case where a check must be applied.
1021 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1023         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
1024         the generated code. Instead of hiding the renaming and using the
1025         wrapper as the proper association, have the subprogram renaming
1026         alias the wrapper.
1027         (Build_Spec): The entity of the wrapper is
1028         now derived from the entity of the related primitive.
1030 2014-08-04  Emmanuel Briot  <briot@adacore.com>
1032         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
1033         using non-capturing groups.
1035 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1037         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
1038         related pragmas before copying the original body, to prevent
1039         spurious errors when the pragmas apply to formals that will not
1040         appear in the inlined body.
1042 2014-08-04  Robert Dewar  <dewar@adacore.com>
1044         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
1045         exp_ch3.adb: Minor reformatting.
1047 2014-08-04  Robert Dewar  <dewar@adacore.com>
1049         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
1051 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1053         * aspects.adb Add an entry in table Canonical_Aspect for
1054         Default_Initial_Condition.
1055         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
1056         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
1057         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
1058         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
1059         Has_Inherited_Default_Init_Cond.
1060         (Default_Init_Cond_Procedure): New routine.
1061         (Has_Default_Init_Cond): New routine.
1062         (Has_Inherited_Default_Init_Cond): New routine.
1063         (Is_Default_Init_Cond_Procedure): New routine.
1064         (Set_Default_Init_Cond_Procedure): New routine.
1065         (Set_Has_Default_Init_Cond): New routine.
1066         (Set_Has_Inherited_Default_Init_Cond): New routine.
1067         (Set_Is_Default_Init_Cond_Procedure): New routine.
1068         (Write_Entity_Flags): Output all the new flags.
1069         * einfo.ads New attributes Default_Init_Cond_Procedure,
1070         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
1071         along with usage in nodes.
1072         (Default_Init_Cond_Procedure): New routine.
1073         (Has_Default_Init_Cond): New routine and pragma Inline.
1074         (Has_Inherited_Default_Init_Cond): New routine and
1075         pragma Inline.
1076         (Is_Default_Init_Cond_Procedure): New routine and
1077         pragma Inline.
1078         (Set_Default_Init_Cond_Procedure): New routine.
1079         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
1080         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
1081         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
1082         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
1083         Next_N. Generate a call to the default initial condition procedure
1084         if the object's type is subject to the pragma.  (Freeze_Type):
1085         Generate the body of the default initial condition procedure or
1086         inherit the spec from a parent type.
1087         * exp_ch7.adb Add with and use clause for Exp_Prag.
1088         (Expand_Pragma_Initial_Condition): Removed.
1089         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
1090         routine.
1091         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
1092         not need special treatment by the parser.
1093         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
1094         attributes related to pragma Default_Initial_Condition to the
1095         derived type.
1096         (Process_Full_View): Propagate the attributes
1097         related to pragma Default_Initial_Condition to the full view.
1098         * sem_ch7.adb (Analyze_Package_Specification): Build the
1099         declaration of the default initial condition procedure for all
1100         types that qualify or inherit the one from the parent type.
1101         * sem_ch13.adb (Analyze_Aspect_Specifications):
1102         Add processing for aspect Default_Initial_Condition.
1103         (Check_Aspect_At_Freeze_Point): Aspect
1104         Default_Initial_Condition does not require delayed analysis.
1105         (Replace_Type_References_Generic): Moved to spec.
1106         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
1107         * sem_prag.adb Add an entry in table Sif_Glags for
1108         Default_Initial_Condition.
1109         (Analyze_Pragma): Pragma
1110         Default_Initial_Condition is now part of assertion
1111         policy. Add processing for pragma Default_Initial_Condition.
1112         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
1113         now recognized as a proper assertion policy.
1114         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
1115         routine.
1116         (Build_Default_Init_Cond_Procedure_Body): New routine.
1117         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
1118         (Inherit_Default_Init_Cond_Procedure): New routine.
1119         * snames.ads-tmpl Add new predefined name and pragma id for
1120         Default_Initial_Condition.
1122 2014-08-04  Vincent Celier  <celier@adacore.com>
1124         * prj-dect.adb (Parse_Case_Construction): It is no longer
1125         an error if the variable for a case construction is not
1126         typed, only if the variable value is not a single string. Call
1127         Parse_Choice_List and End_Case_Construction with the new parameter
1128         to indicate that the variable is typed.
1129         * prj-strt.adb (End_Case_Construction): Only check the labels
1130         if the variable is typed.  If the variable is not typed,
1131         issue a warning when there is no "when others" allternative.
1132         (Parse_Choice_List): Manage the labels only if the variable
1133         is typed.
1134         * prj-strt.ads (End_Case_Construction): New Boolean parameter
1135         String_Type.
1136         (Parse_Choice_List): Ditto.
1138 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1140         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
1142 2014-08-04  Vincent Celier  <celier@adacore.com>
1144         * projects.texi: Update documentation of case constructions with
1145         variables that are not typed.
1147 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1149         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
1150         an Eliminated pragma, indicate that the wrapper is also to be
1151         eliminated, to prevent spurious errors when using gnatelim on
1152         programs that include box-initialization of equality operators
1153         (consequence of AI05-071)..
1155 2014-08-04  Robert Dewar  <dewar@adacore.com>
1157         * checks.adb (Activate_Overflow_Check): Handle floating-point
1158         case correctly.
1159         * checks.ads (Activate_Overflow_Check): Clarify handling of
1160         floating-point cases.
1161         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
1162         flag if we generate an explicit overflow check (for
1163         Check_Float_Overflow mode).
1165 2014-08-04  Robert Dewar  <dewar@adacore.com>
1167         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
1168         prj-attr.adb, prj-attr.ads: Minor reformatting.
1170 2014-08-04  Yannick Moy  <moy@adacore.com>
1172         * expander.adb (Expand): Always perform special
1173         expansion in GNATprove mode, even when doing pre-analysis.
1175 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1177         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
1178         not default. Also list bit order if SSO is specified. Do not
1179         assume that bit order is always equal to scalar storage order.
1181 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1183         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
1184         order to reverse SSO for a type that has an explicit native
1185         Bit_Order.
1187 2014-08-04  Doug Rupp  <rupp@adacore.com>
1189         * cal.c: Macro check for VxWorks7.
1190         * init.c (getpid): Likewise.
1191         * mkdir.c (__gnat_mkdir): Likewise.
1192         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
1194 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1196         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
1197         of an invariant check in the case where No_Initialization is set,
1198         since the object is uninitialized.
1200 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1202         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
1203         name, in addition to a pragma name.
1204         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
1205         Is_Pragma_Name): Adjust accordingly.
1206         * sem_attr.ads, sem_attr.adb, exp_attr.adb
1207         (Attribute_Default_Scalar_Storage_Order): Add handling of new
1208         attribute.
1209         * gnat_rm.texi: Document the above.
1211 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1213         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
1214         mode for now, to revert to previous behavior.
1215         * checks.adb: Revert previous change, no longer needed.
1217 2014-08-04  Robert Dewar  <dewar@adacore.com>
1219         * gnat1drv.adb (Adjust_Global_Switches): Don't set
1220         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1221         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
1222         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1223         * switch-c.adb (Scan_Front_End_Switches): Don't set
1224         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1226 2014-08-04  Vincent Celier  <celier@adacore.com>
1228         * prj-attr.adb: Add new default indications for
1229         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
1230         (Attribute_Default_Of): New function (Initialize): Set the
1231         default for those attributes that have one specified.
1232         * prj-attr.ads (Attribute_Data): New component Default.
1233         * prj-proc.adb (Expression): Take into account the new defaults
1234         for attributes Object_Dir, Exec_Dir and Source_Dirs.
1235         * prj-strt.adb (Attribute_Reference): Set the default for
1236         the attribute.
1237         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
1238         (Set_Default_Of): New procedure.
1239         * prj.adb (The_Dot_String): New global Name_Id variable,
1240         initialized in procedure Initialize.
1241         (Dot_String): New function
1242         (Initialize): Initialize The_Dot_String.
1243         (Reset): Create the string list Shared.Dot_String_List.
1244         * prj.ads (Attribute_Default_Value): New enumeration type.
1245         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
1246         (Dot_String): New function.
1247         (Shared_Project_Tree_Data): New string list component Dot_String_List.
1248         * projects.texi: Document new defaults for attribute Object_Dir,
1249         Exec_Dir and Source_Dirs.
1251 2014-08-04  Robert Dewar  <dewar@adacore.com>
1253         * sem_ch12.adb: Minor reformatting.
1255 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1257         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
1258         expansion in CodePeer_Mode.
1259         (Selected_Range_Checks): Add handling of overflow checks in
1260         CodePeer_Mode.
1262 2014-08-04  Robert Dewar  <dewar@adacore.com>
1264         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1265         Remove special test for Float'First, no longer required.
1266         (Expand_N_Attribute_Reference, case Succ): Remove special test
1267         for Float'First, no longer required.
1268         * s-fatgen.adb (Pred): return infinity unchanged.
1269         (Succ): ditto.
1271 2014-08-04  Claire Dross  <dross@adacore.com>
1273         * sem_ch12.adb (Analyze_Associations): Defaults should only be
1274         used if there is no explicit match.
1275         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1276         Also check for pragma external_axiomatization on generic units.
1278 2014-08-04  Robert Dewar  <dewar@adacore.com>
1280         * checks.adb (Activate_Overflow_Check): Remove
1281         Check_Float_Overflow processing.
1282         (Apply_Scalar_Range_Check): Ditto.
1283         (Generate_Range_Check): Ditto.
1284         * exp_ch4.adb (Expand_N_Op_Add): Add call to
1285         Check_Float_Op_Overflow.
1286         (Expand_N_Op_Divide): ditto.
1287         (Expand_N_Op_Multiply): ditto.
1288         (Expand_N_Op_Subtract): ditto.
1289         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
1290         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
1291         Do_Range_Check is set for floating-point case in -gnatc or
1292         GNATprove mode.
1293         (Analyze_Attribute, case Succ): Make sure
1294         Do_Range_Check is set for floating-point case in -gnatc or
1295         GNATprove mode.
1296         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
1297         flag is set for real to integer conversion in GNATprove or
1298         -gnatc mode.
1300 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1302         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
1303         the expression of an Import or Export aspect as type Boolean
1304         and require it to be static. Add ??? comment. Also, set the
1305         Is_Exported flag when appropriate.
1307 2014-08-04  Robert Dewar  <dewar@adacore.com>
1309         * exp_ch4.adb: Minor reformatting.
1310         * exp_attr.adb: Minor reformatting.
1312 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1314         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
1315         (Unaligned_Valid): Remove now unused subprogram.
1316         * exp_attr.adb (Expand_N_Attribute_Reference, case
1317         Attribute_Valid): If the prefix is in reverse SSO or potentially
1318         unaligned, copy it using a byte copy operation to a temporary
1319         variable.
1320         * einfo.adb: Minor comment fix.
1322 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1324         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
1326 2014-08-04  Robert Dewar  <dewar@adacore.com>
1328         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
1329         * s-fatgen.adb (Pred): Handle Float'First.
1330         (Succ): Handle Float'Last.
1332 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1334         * sem_util.adb (Is_Potentially_Unevaluated): If the original
1335         node of a parent node in the tree is a short-circuit operation,
1336         the node is potentially unevaluated.
1338 2014-08-04  Robert Dewar  <dewar@adacore.com>
1340         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
1341         conversion from a real type to an integer type.
1343 2014-08-04  Yannick Moy  <moy@adacore.com>
1345         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
1346         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
1347         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
1348         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
1349         SPARK_05 instead of SPARK.
1351 2014-08-04  Robert Dewar  <dewar@adacore.com>
1353         * sem.ads: Minor reformatting.
1354         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
1355         reformatting.
1356         (Analyze_Aspect_Specifications, case Convention): Put External_Name
1357         before Link_Name when constructing pragma.
1359 2014-08-04  Yannick Moy  <moy@adacore.com>
1361         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
1362         to True during analysis of a default component expression.
1363         (Semantics): Save and restore In_Default_Expr around analysis.
1364         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
1365         Call new wrapper Preanalyze_Default_Expression.
1366         (Preanalyze_Default_Expression): New wrapper on
1367         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
1368         * sem_res.adb (Resolve_Call): Mark calls inside default
1369         expressions as not inlined in GNATprove mode.
1371 2014-08-04  Robert Dewar  <dewar@adacore.com>
1373         * exp_ch4.adb: Minor reformatting.
1375 2014-08-04  Olivier Hainque  <hainque@adacore.com>
1377         * link.c: remove const on __gnat_objlist_file_supported for AIX
1379 2014-08-04  Robert Dewar  <dewar@adacore.com>
1381         * sem_util.ads: Minor addition of comment.
1383 2014-08-04  Vincent Celier  <celier@adacore.com>
1385         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
1386         all projects, including aggregate and aggregate library projects.
1388 2014-08-04  Yannick Moy  <moy@adacore.com>
1390         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
1392 2014-08-04  Robert Dewar  <dewar@adacore.com>
1394         * sem_eval.adb (Test_In_Range): Always in range for
1395         Is_Known_Valid target type, where input type has smaller or
1396         equal size and does not have biased rep.
1398 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1400         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
1401         a static attribute, and the Static flag must not be set on it
1402         during resolution. It may be constant-folded during expansion,
1403         but if expansion is disabled it is not a static expression.
1405 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1407         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
1408         referenced once resolution has taken place.
1410 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1412         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
1413         compare access levels in the case where the target type is the
1414         anonymous type of an access discriminant, since the level of
1415         such types is defined based on context. Add comment.
1417 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1419         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
1420         cases related to equality.  Remove the special processing
1421         for dispatching abstract subprograms as it is not needed.
1422         (Interpretation_Error): Add a specialized error message for
1423         predefined operators.
1424         (Is_Intrinsic_Equality): New routine.
1425         (Is_Suitable_Candidate): New routine.
1427 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1429         * checks.adb: Minor comment reformatting.
1431 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1433         * restrict.adb (Check_Restriction): For checked max_parameter
1434         restrictions reset Violated flag, so that subsequent violations
1435         are properly detected.
1437 2014-08-04  Robert Dewar  <dewar@adacore.com>
1439         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
1440         mode.
1441         (Process_Discriminants): Fix bad test of GNATprove mode
1443 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1445         * sem_ch12.adb (Instantiate_Formal_Subprogram):
1446         Move variable to their own section. Propagate the source
1447         location of a formal parameter to the corresponding formal of
1448         the subprogram renaming declaration. Code reformatting.
1450 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1452         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
1454 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1456         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
1457         if error already detected.  We may reach this point in spite of
1458         previous errors when compiling with -gnatq, to force all possible
1459         errors (this is the usual ACATS mode).
1461 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1463         * checks.adb (Generate_Range_Check): For the case of converting
1464         a base type with a larger range to a smaller target subtype, only
1465         use unchecked conversions of bounds in the range check followed
1466         by conversion in the case where both types are discrete. In other
1467         cases, convert to the target base type and save in a temporary
1468         followed by the range check.
1469         (Convert_And_Check_Range): New procedure factoring code to save
1470         conversion to a temporary followed by a range check (called two
1471         places in Generate_Range_Check).
1472         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
1473         check-in, to generate range checks for conversions between
1474         any floating-point types rather than limiting it to matching
1475         base types.
1477 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1479         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
1481 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1483         * restrict.adb (Update_Restrictions): For restrictions with a
1484         maximum parameter (e.g. number of protected entries in Ravenscar)
1485         do not compute the maximum of the violation over several objects,
1486         because the restriction is per-object.
1487         (Check_Restriction): After possible message, reset the value
1488         of of a checked max_parameter restriction to zero, to prevent
1489         cascaded errors.
1490         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
1491         (sub)type to determine whether derived type should be on the
1492         list of private dependents of a type whose full view may become
1493         visible subsequently.
1495 2014-08-01  Olivier Hainque  <hainque@adacore.com>
1497         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
1498         $(CXX) instead of ../../xg++ to feed CXX.
1499         (CXX_LFLAGS): Remove. Now unused as the proper flags
1500         are expected to be included in the CXX variable.
1502 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
1504         * gcc-interface/decl.c (elaborate_expression_1): Return the new
1505         variable when debug info is needed and the expression is not
1506         constant.  Tag as external only new variables that are global.
1507         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1508         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1509         attributes for IN array parameters when their actual subtype
1510         needs debug info.
1511         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1512         * gcc-interface/gigi.h (process_deferred_decl_context): New.
1513         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1514         emit debug info for ignored global declarations.
1515         (struct deferred_decl_context_node,
1516         add_deferred_decl_context, add_deferred_type_context,
1517         compute_deferred_decl_context, defer_or_set_type_context,
1518         deferred_decl_context_queue, get_debug_scope,
1519         get_global_context, process_deferred_decl_context): New.
1520         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1521         computation machinery to rely on the GNAT Scope attribute.
1523 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1525         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1527 2014-08-01  Robert Dewar  <dewar@adacore.com>
1529         * sem_ch8.adb, opt.ads Minor comment updates.
1531 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1533         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1534         from the side effects removal machinery.
1535         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1536         Renaming_Req. Update the nested call to Remove_Side_Effects.
1537         (Duplicate_Subexpr_No_Checks): Add formal parameter
1538         Renaming_Req. Update the nested call to Remove_Side_Effects.
1539         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1540         Renaming_Req. Update the nested call to Remove_Side_Effects.
1541         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1542         an object renaming declaration when the caller requests it.
1543         * exp_util.ads (Duplicate_Subexpr): Add formal
1544         parameter Renaming_Req. Update comment on usage.
1545         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
1546         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1547         Renaming_Req.
1549 2014-08-01  Bob Duff  <duff@adacore.com>
1551         * gnat_ugn.texi: Minor updates.
1553 2014-08-01  Robert Dewar  <dewar@adacore.com>
1555         * atree.adb: Minor reformatting.
1557 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1559         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
1560         private extension, get stored constraint, if any, from full view.
1562 2014-08-01  Robert Dewar  <dewar@adacore.com>
1564         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
1565         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
1566         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
1567         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
1568         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
1569         Remove code for checking with's, now in sem_ch10.adb, set
1570         Opt.No_Elab_Code_All_Pragma.
1572 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1574         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
1575         access types as well and adjust the subtype mark if there are
1576         no constraints.
1578 2014-08-01  Robert Dewar  <dewar@adacore.com>
1580         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
1582 2014-08-01  Robert Dewar  <dewar@adacore.com>
1584         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
1586 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1588         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
1589         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
1590         of the actuals in the case of untagged record types too.
1591         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
1592         full derivation of a derived private type, extracted from...
1593         (Copy_And_Build): In the case of record types and most
1594         enumeration types, copy the original declaration.  Build the
1595         full derivation according to the approach extracted from...
1596         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
1597         to create the full derivation in all existing cases and also
1598         create it in the no-discriminants/discriminants case instead of
1599         deriving directly from the full view.
1600         (Is_Visible_Component): Remove obsolete code.
1601         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
1603 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1605         * fe.h (GNAT_Mode): New.
1606         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
1607         reverse SSO in GNAT mode.
1609 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1611         * freeze.adb: Minor reformatting.
1613 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1615         * exp_ch3.adb (Default_Initialize_Object): Do not generate
1616         default initialization for an imported object.
1618 2014-08-01  Olivier Hainque  <hainque@adacore.com>
1620         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
1621         to the expected FARPROC type instead of void *.
1622         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
1623         other datastructures.
1624         (__gnat_file_time_name_attr): Adjust accordingly.
1625         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
1626         in line with uses.
1627         (__gnat_check_OWNER_ACL): Declare AccessMode
1628         parameter as ACCESS_MODE instead of DWORD, in line with callers
1629         and uses.
1630         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
1631         unused on win32.  Correct cast of "args" on call to spawnvp.
1632         (add_handle): Cast realloc calls into their destination types.
1633         (win32_wait): Remove declaration and initialization of unused variable.
1634         (__gnat_locate_exec_on_path): Cast alloca calls
1635         into their destination types.
1636         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
1637         their destination types.
1639 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
1641         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
1642         range checks for conversions between floating-point subtypes
1643         when the target and source types are the same.
1645 2014-08-01  Robert Dewar  <dewar@adacore.com>
1647         * exp_aggr.adb: Minor reformatting.
1649 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1651         * sem_ch13.adb (Check_Indexing_Functions): Initialize
1652         Indexing_Found.
1654 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
1656         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
1657         ALI file before we call the backend (so that gnat2why can append
1658         to it).
1660 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1662         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
1663         Expand_Packed_Element_Reference): Pass additional Rev_SSO
1664         parameter indicating whether the packed array type has reverse
1665         scalar storage order to the s-pack* Set/Get routines.
1666         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
1667         indicating reverse scalar storage order.
1669 2014-08-01  Robert Dewar  <dewar@adacore.com>
1671         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
1672         for initial component value in -gnatc or GNATprove mode.
1673         (Process_Discriminants): Same fix for default discriminant values.
1674         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
1675         checking subtypes.
1677 2014-08-01  Robert Dewar  <dewar@adacore.com>
1679         * sinfo.ads: Minor comment clarification.
1681 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1683         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
1684         reformatting. Store the generated pragma Import in the related
1685         subprogram as routine Wrap_Imported_Subprogram will need it later.
1686         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
1687         a private type with discriminants is considered to fall in the
1688         category of unconstrained or tagged items.
1690 2014-08-01  Arnaud charlet  <charlet@adacore.com>
1692         * s-os_lib.adb (Open_Append): New functions to open a file for
1693         appending. This binds to the already existing (but not used)
1694         __gnat_open_append.
1695         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
1696         to open a file for appending.
1697         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
1698         to open the ALI file for appending.
1700 2014-08-01  Robert Dewar  <dewar@adacore.com>
1702         * sem_ch8.adb: Minor reformatting.
1704 2014-08-01  Yannick Moy  <moy@adacore.com>
1706         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
1707         pragmas from aspects, which need to be inserted in proper order.
1709 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1711         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
1712         Handle properly a type extension that constrains a discriminated
1713         derived type that renames other discriminants of an ancestor.
1715 2014-08-01  Thomas Quinot  <quinot@adacore.com>
1717         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
1718         s-pack25.adb: Fix minor inconsistencies and typos.
1720 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1722         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
1723         globals and move certain variables to the "local
1724         variable" section. Call Build_Class_Wide_Wrapper when
1725         renaming a default actual subprogram with a class-wide actual.
1726         (Build_Class_Wide_Wrapper): New routine.
1727         (Check_Class_Wide_Actual): Removed.
1728         (Find_Renamed_Entity): Code reformatting.
1729         (Has_Class_Wide_Actual): Alphabetize. Change the
1730         logic of the predicate as the renamed name may not necessarely
1731         denote the correct subprogram.
1733 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1735         * sem_ch7.adb: Fix minor oversight in condition.
1737 2014-08-01  Bob Duff  <duff@adacore.com>
1739         * projects.texi: Minor documentation improvements.
1741 2014-08-01  Robert Dewar  <dewar@adacore.com>
1743         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
1744         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
1745         * lib-load.adb: Initialize No_Elab_Code_All field.
1746         * lib-writ.adb: Initialize No_Elab_Code_All.
1747         * lib.ads, lib.adb: New field No_Elab_Code_All.
1748         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
1749         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
1750         longer exists.
1751         * sem_ch10.adb (Analyze_Context): Processing for
1752         No_Elaboration_Code_All removed.
1753         (Generate_Parent_References): Moved to Sem_Util.
1754         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
1755         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
1756         Sem_Ch10.
1757         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
1758         * targparm.adb: Minor comment updates Add comments on ignoring
1759         pragma No_Elaboration_Code_All.
1761 2014-08-01  Nicolas Roche  <roche@adacore.com>
1763         * adaint.c (__gnat_set_close_on_exec): Ensure that
1764         we can unset "close_on_exec" flag.
1766 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1768         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
1769         the parameter specs of the wrapper program for a primitive operation
1770         of a synchronized type that implements an interface, copy the
1771         null_exclusion indicator as well.
1773 2014-08-01  Robert Dewar  <dewar@adacore.com>
1775         * sem_eval.ads: Minor reformatting.
1777 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1779         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
1780         to go down the chain of private derivations.
1781         * freeze.adb (Freeze_Entity): Fix typo in comment.
1783 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1785         * sem_ch3.adb (Access_Type_Declaration): If designated type is
1786         a limited view, create a master entity (as is already done for
1787         class-wide types) in case the full view designates a type that
1788         contains tasks.
1789         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
1790         and the designated type is a limited view, use the non-limited
1791         view if available.
1793 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1795         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
1796         (DECL_FUNCTION_STUB): Likewise.
1797         (SET_DECL_FUNCTION_STUB): Likewise.
1798         (DECL_PARM_ALT_TYPE): Likewise.
1799         (SET_DECL_PARM_ALT_TYPE): Likewise.
1800         (TYPE_VAX_FLOATING_POINT_P): Delete.
1801         (TYPE_DIGITS_VALUE): Likewise.
1802         (SET_TYPE_DIGITS_VALUE): Likewise.
1803         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
1804         (malloc32_decl): Delete.
1805         (build_vms_descriptor): Likewise.
1806         (build_vms_descriptor32): Likewise.
1807         (fill_vms_descriptor): Likewise.
1808         (convert_vms_descriptor): Likewise.
1809         (TARGET_ABI_OPEN_VMS): Likewise.
1810         (TARGET_MALLOC64): Likewise.
1811         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
1812         (gnat_to_gnu_entity): Call it to add the original type as a parallel
1813         type to the implementation type of a packed array type.
1814         <E_Procedure>: Remove now obsolete kludge.
1815         <E_Exception>: Delete obsolete comment.
1816         <object>: Small tweak.
1817         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
1818         for the descriptor passing mechanism.
1819         (gnat_to_gnu_param): Likewise.
1820         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
1821         (gnat_print_type): Adjust.
1822         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
1823         (vms_builtin_establish_handler_decl): Delete.
1824         (gnat_vms_condition_handler_decl): Likewise.
1825         (establish_gnat_vms_condition_handler): Likewise.
1826         (build_function_stub): Likewise.
1827         (Subprogram_Body_to_gnu): Do not call above functions.
1828         (Call_to_gnu): Remove support for the descriptor passing mechanism.
1829         * gcc-interface/utils.c (make_descriptor_field): Delete.
1830         (build_vms_descriptor32): Likewise.
1831         (build_vms_descriptor): Likewise.
1832         (fill_vms_descriptor): Likewise.
1833         (convert_vms_descriptor64): Likewise.
1834         (convert_vms_descriptor32): Likewise.
1835         (convert_vms_descriptor): Likewise.
1836         * gcc-interface/utils.c (unchecked_convert): Likewise.
1837         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
1839 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1841         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
1842         type and get_unpadded_type for the longest FP type.
1843         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
1844         (convert_with_check): Adjust formatting and remove FIXME.
1846 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1848         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
1849         Do not convert the RM bounds to the base type.
1850         (E_Floating_Point_Subtype): Likewise.
1851         (E_Array_Subtype): Convert the bounds to the base type.
1852         * gcc-interface/trans.c (get_type_length): New function.
1853         (Attribute_to_gnu) <Range_Length>: Call it.
1854         <Length>: Likewise.
1855         (Loop_Statement_to_gnu): Convert the bounds to the base type.
1856         (gnat_to_gnu) <N_In>: Likewise.
1857         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
1858         bounds to the base type.
1859         (create_range_type): Likewise.
1860         (convert): Convert the bounds to the base type for biased types.
1861         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
1862         base type.
1864 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1866         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
1867         incorrect implicit type derivation.
1868         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
1869         to the base type.
1871 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1873         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
1874         prefix of attribute Loop_Entry.
1875         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
1876         Loop_Variant with respect to an enclosing loop (if any).
1877         (Contains_Loop_Entry): Update the parameter profile and all
1878         calls to this routine.
1879         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
1880         for the corresponding body before determining the nature of the
1881         ultimate alias's declarative node.
1883 2014-08-01  Robert Dewar  <dewar@adacore.com>
1885         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
1887 2014-08-01  Robert Dewar  <dewar@adacore.com>
1889         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
1890         constraint error node since it is a list member.
1892 2014-08-01  Robert Dewar  <dewar@adacore.com>
1894         * sem_warn.adb: Minor reformatting.
1896 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1898         * einfo.adb (Underlying_Type): Return the underlying full view
1899         of a private type if present.
1900         * freeze.adb (Freeze_Entity):
1901         Build a single freeze node for partial, full and underlying full
1902         views, if any.
1903         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
1904         missing guard before the access to the Underlying_Full_View.
1905         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
1906         full view if present.
1907         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
1909 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1911         * sem_res.adb (Resolve_Entry_Call): When an entry has
1912         preconditions, the entry call is wrapped in a procedure call
1913         that incorporates the precondition checks. To prevent a double
1914         expansion, with possible duplication of extra formals, that
1915         procedure call must only be pre-analyzed and resolved. Expansion
1916         takes place upon return to the caller Resolve_Call.
1918 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1920         * sem_res.adb (Resolve_Call): Do not perform
1921         GNATprove-specific inlining while within a generic.
1923 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1925         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
1926         case expression with incompatible alternatives, when the first
1927         alternative is overloaded.
1929 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1931         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
1932         to create the name of the parameterless call, rather than
1933         New_Copy, to preserve the tree structure when the name is a
1934         complex expression, e.g. a selected component that denotes a
1935         protected operation, whose prefix is itself a selected component.
1937 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1939         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
1940         Unit_Declaration_Node to retrieve body when inlining, to handle
1941         properly subprogram child units.
1943 2014-08-01  Robert Dewar  <dewar@adacore.com>
1945         * sem_attr.adb: Minor reformatting.
1947 2014-08-01  Vincent Celier  <celier@adacore.com>
1949         * debug.adb: Minor documentation addition for -dn switch.
1951 2014-08-01  Robert Dewar  <dewar@adacore.com>
1953         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
1954         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
1955         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
1956         In several places, use the Is_OK version as suggested by the spec.
1958 2014-08-01  Vincent Celier  <celier@adacore.com>
1960         * gnatcmd.adb: Revert last change which was not correct.
1962 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1964         * freeze.adb (Find_Constant): Ensure that the constant being
1965         inspected is still an object declaration (i.e. not a renaming).
1967 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1969         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
1970         An attribute_reference to Loop_Entry denotes an iterator
1971         specification: its prefix is an object, as is the case for 'Old.
1972         b) If the domain of iteration is an expression whose type has
1973         the Iterable aspect defined, this is an iterator specification.
1975 2014-08-01  Robert Dewar  <dewar@adacore.com>
1977         * gnatcmd.adb: Minor reformatting.
1979 2014-08-01  Robert Dewar  <dewar@adacore.com>
1981         * atree.ads (Info_Messages): New counter.
1982         * err_vars.ads: Minor comment update.
1983         * errout.adb (Delete_Warning_And_Continuations): Deal
1984         with new Info_Messages counter.
1985         (Error_Msg_Internal): ditto.
1986         (Delete_Warning): ditto.
1987         (Initialize): ditto.
1988         (Write_Error_Summary): ditto.
1989         (Output_Messages): ditto.
1990         (To_Be_Removed): ditto.
1991         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
1992         (Compilation_Errors): ditto.
1993         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
1994         (Finalize): ditto.
1995         (Initialize): ditto.
1996         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
1997         * gnat_ugn.texi: Document that -gnatwe does not affect info
1998         messages.
2000 2014-08-01  Robert Dewar  <dewar@adacore.com>
2002         * debug.adb: Document debug switch -gnatd.Z.
2003         * sem.adb (Semantics): Force expansion on in no or configurable
2004         run time mode.
2006 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2008         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
2009         unchecked conversion denotes an iterator specification. Such a
2010         conversion will be inserted in the context of an inlined call
2011         when needed, and its argument is always an object.
2013 2014-08-01  Robert Dewar  <dewar@adacore.com>
2015         * make.adb, makeutl.ads: Minor reformatting.
2016         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
2017         Back_End_Inlining.
2019 2014-08-01  Tristan Gingold  <gingold@adacore.com>
2021         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
2023 2014-08-01  Javier Miranda  <miranda@adacore.com>
2025         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
2026         -gnatd.z.
2027         * debug.adb: Updating documentation.
2028         * exp_ch6.adb (Expand_Call): Remove assertion.
2030 2014-08-01  Robert Dewar  <dewar@adacore.com>
2032         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
2033         sem_res.adb: Minor reformatting.
2035 2014-08-01  Vincent Celier  <celier@adacore.com>
2037         * make.adb (Initialize): Set Keep_Temporary_Files to True when
2038         -dn is specified.
2039         * makeusg.adb: Add line for new switch --keep-temp-files.
2040         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
2041         * opt.ads (Keep_Temporary_Files): Document that it is also used
2042         by gnatmake and gprbuild.
2043         * switch-m.adb: Recognize new switch --keep-temp-files.
2045 2014-08-01  Tristan Gingold  <gingold@adacore.com>
2047         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
2048         * exp_ch9.adb (Make_Task_Create_Call): ... here.
2050 2014-08-01  Vincent Celier  <celier@adacore.com>
2052         * gnat1drv.adb: Do not try to get the target parameters when
2053         invoked with -gnats.
2055 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2057         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
2058         declaration subject to No_Initialization.
2060 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2062         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
2063         is a subtype with dynamic predicates, or a non-static subtype
2064         with predicates.
2065         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
2066         expression if subtype has a dynamic predicate.
2067         (Constrain_Index): Reject subtype indication if subtype mark
2068         has predicates.
2069         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
2070         (Make_Index): If index is a subtype indication, itype inhereits
2071         predicate flags for subsequent testing.
2072         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
2073         procedure Check_Predicate_Use, to reject illegal uses of domains
2074         of iteration that have dynamic predicates.
2075         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
2076         indication to which a predicate applies.
2077         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
2078         prevent cascaded errors when subtype is invalid.
2080 2014-08-01  Robert Dewar  <dewar@adacore.com>
2082         * sem_ch10.adb: Minor reformatting.
2084 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2086         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
2087         because either type may be a subtype of the other.
2089 2014-08-01  Vincent Celier  <celier@adacore.com>
2091         * makeusg.adb: Add documentation for debug switch -dn.
2093 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2095         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
2096         expression with standard operator and type, for pretty-printing
2097         use, when in ASIS_Mode. When generating code dimensional analysis
2098         is not involved and dimension expressions are handled statically,
2099         and other operators are resolved in the usual way.
2101 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2103         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
2104         Parent_Subtype in ASIS mode, leads to several failures.
2105         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
2106         if the prefix is a type extension, check whether component is
2107         declared in the parent type, possibly in a parent unit. Needed
2108         in ASIS mode when Parent_Subtype is not set.
2110 2014-08-01  Robert Dewar  <dewar@adacore.com>
2112         * sem_prag.adb: Minor reformatting.
2113         * s-regpat.adb: Minor reformatting.
2114         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
2115         Treat_As_Volatile on constants.
2117 2014-08-01  Tristan Gingold  <gingold@adacore.com>
2119         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
2121 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2123         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
2124         warning on a with_clause created for the renaming of a parent
2125         unit in an explicit with_clause.
2127 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2129         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
2130         Set Is_Imported flag at once, to simplify subsequent legality
2131         checks. Reject the aspect on an object whose declaration has an
2132         explicit initial value.
2133         * sem_prag.adb (Process_Import_Or_Interface): Use original node
2134         to check legality of an initial value for an imported entity.
2135         Set Is_Imported flag in case of error to prevent cascaded errors.
2136         Do not set the Is_Imported flag if the pragma comes from an
2137         aspect, because it is already done when analyzing the aspect.
2139 2014-08-01  Emmanuel Briot  <briot@adacore.com>
2141         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
2143 2014-08-01  Robert Dewar  <dewar@adacore.com>
2145         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
2146         identifier name.
2148 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2150         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
2151         checks when the related variable comes from source.
2152         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
2153         when the related actual parameter comes from source. Update comment.
2154         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
2155         type of an array of pointers when the designated type is
2156         class-wide and its root type is the record being currently frozen.
2158 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2160         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
2161         of renaming declaration created for domain of iteration.
2162         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
2163         for error messages on aggregates whose index subtypes have
2164         predicates. The new placement avoids posting messages on previous
2165         subtype declarations rather than on the aggregate itself.
2166         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
2167         Add_Dispatching_Operation, to handle properly the overriding of
2168         the predefined operations on controlled types, when the partial
2169         view of a type is not visibly controlled.
2171 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
2173         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
2174         appendix.
2176 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2178         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
2179         assertion check as the attribute is defined for all entities.
2180         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
2181         check as the attribute is defined for all entities.
2182         * einfo.ads Update the documentation of attribute
2183         Is_Hidden_Non_Overridden_Subprogram.
2184         * sem_ch7.adb (Install_Package_Entity): No need to check the
2185         entity kind of the Id.
2186         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
2187         usage. Ensure that the homographs are of the same entity kind
2188         and not fully conformant.
2189         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
2191 2014-08-01  Robert Dewar  <dewar@adacore.com>
2193         * inline.adb: Minor code reorganization.
2194         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
2196 2014-08-01  Robert Dewar  <dewar@adacore.com>
2198         * inline.adb, s-os_lib.ads: Minor reformatting.
2200 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2202         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
2203         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
2204         hooks.
2206 2014-08-01  Yannick Moy  <moy@adacore.com>
2208         * inline.adb (Cannot_Inline): Issue info message instead of
2209         warning for subprograms not inlined in GNATprove mode.
2210         * sem_res.adb (Resolve_Call): Take body into account for deciding
2211         whether subprogram can be inlined in GNATprove mode or not.
2213 2014-08-01  Claire Dross  <dross@adacore.com>
2215         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
2216         of Get_First_Parent_With_External_Axiomatization_For_Entity for
2217         shorter.
2218         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
2219         for parameters of packages with external axiomatization.
2221 2014-08-01  Robert Dewar  <dewar@adacore.com>
2223         * sem_res.adb: Minor comment addition.
2225 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2227         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
2228         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
2229         no longer used.
2230         * s-os_lib.ads: Minor reformatting.
2232 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2234         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
2235         completely previous code since only GCC back-ends are prepared
2236         to handle e.g. 'Machine attribute.
2237         * targparm.adb, targparm.ads: Remove remaining refs and
2238         handling of OpenVMS_On_Target, VAX_Float_On_Target and
2239         RTX_RTSS_Kernel_Module_On_Target.
2240         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
2241         no longer used.
2243 2014-08-01  Robert Dewar  <dewar@adacore.com>
2245         * exp_dist.adb, exp_attr.adb: Minor reformatting.
2246         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
2247         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
2248         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
2249         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
2250         improper use of shall.
2252 2014-08-01  Robert Dewar  <dewar@adacore.com>
2254         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
2255         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
2256         exp_ch3.adb: Minor reformatting & code reorganization.
2258 2014-08-01  Robert Dewar  <dewar@adacore.com>
2260         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
2261         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
2262         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
2263         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
2264         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
2265         code.
2266         * gcc-interface/decl.c, gcc-interface/Makefile.in,
2267         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
2269 2014-08-01  Pascal Obry  <obry@adacore.com>
2271         * s-os_lib.ads: Rename File_Size to Large_File_Size.
2273 2014-08-01  Robert Dewar  <dewar@adacore.com>
2275         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
2276         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
2277         a-numaux-libc-x86.ads: Fix bad package header comments.
2278         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
2279         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
2280         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
2281         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
2282         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
2283         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
2284         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
2285         s-os_lib.adb: Remove VMS-specific code.
2287 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2289         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
2290         previous state in CodePeer_Mode.
2292 2014-08-01  Robert Dewar  <dewar@adacore.com>
2294         * hostparm.ads: Put back definition of OpenVMS as False to aid
2295         the transition process.
2296         * sem_ch7.adb: Minor reformatting.
2297         * prj-env.adb: Minor code fix.
2298         * gnat_rm.texi: Complete previous change.
2299         * sem_ch3.adb: Minor reformatting.
2300         * sem_ch6.adb: Minor reformatting.
2301         * sem_elab.adb: Minor reformatting.
2302         * exp_strm.adb: Complete previous change.
2304 2014-08-01  Vincent Celier  <celier@adacore.com>
2306         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
2307         warning when a constant is unreferenced and its type has pragma
2308         Unreferenced_Objects.
2310 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2312         * einfo.adb: Flag2 is now known as
2313         Is_Hidden_Non_Overridden_Subprogram.
2314         (Is_Hidden_Non_Overridden_Subprogram): New routine.
2315         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
2316         (Write_Entity_Fields): Output Flag2.
2317         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
2318         along with occurrences in entities.
2319         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
2320         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
2321         and pragma Inline.
2322         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
2323         declared non-overriden homographs into visibility.
2324         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
2325         implicitly declared non-overriden homographs.
2326         (Hide_Non_Overridden_Subprograms): New routine.
2328 2014-08-01  Robert Dewar  <dewar@adacore.com>
2330         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
2331         VMS-specific code.
2332         * prj-conf.adb: Minor reformatting.
2333         * xr_tabls.adb (Read_File): Restore code which was enabled on
2334         non VMS platforms before.
2335         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
2336         * sem_ch5.adb: Minor reformatting.
2337         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
2338         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
2339         Remove VMS-specific code.
2341 2014-08-01  Vincent Celier  <celier@adacore.com>
2343         * make.adb (Await_Compile): Remove loop that was only needed
2344         for VMS.
2346 2014-08-01  Robert Dewar  <dewar@adacore.com>
2348         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
2349         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
2350         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
2351         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
2352         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
2353         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
2354         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
2355         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
2356         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
2357         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
2358         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
2359         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
2360         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
2361         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
2362         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
2363         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
2364         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
2365         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
2366         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
2367         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2368         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
2369         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
2370         specific code and comments.
2372 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2374         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
2375         Check_Reverse_Iteration, to verify the legality of the Reverse
2376         indicator on various container types, and to detect illegal
2377         reverse iterations on containers that only supoort forward
2378         iteration.
2380 2014-08-01  Vincent Celier  <celier@adacore.com>
2382         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
2383         procedure GNATCmd the relevant declarations from packages VMS_Cmds
2384         and VMS_Conv.
2385         * gnatcmd.ads: Update comments to remove any trace of VMS
2387 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2389         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
2390         defaulted actual that is an operator, before building wrapper
2391         for it in GNATprove mode. Restrict construction of wrapper to
2392         actuals that are operators.
2394 2014-08-01  Vincent Celier  <celier@adacore.com>
2396         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
2397         specific packages no longer needed.
2399 2014-08-01  Pascal Obry  <obry@adacore.com>
2401         * s-os_lib.ads (System.CRTL): Move with clause to body.
2402         (File_Size): New type.
2403         (File_Length64): Use it.
2404         (File_Length): Restore previous spec returning a Long_Integer.
2405         * s-os_lib.adb (System.CRTL): Move with clause here.
2407 2014-08-01  Vincent Celier  <celier@adacore.com>
2409         * mlib-prj.adb: Update comments to remove any mention of VMS.
2411 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2413         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
2414         xgnatugn.adb and ug_words.
2416 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2418         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
2419         expansion can be avoid for Machine, Model and Rounding.
2420         (Is_Inline_Floating_Point_Attribute): Return true for Machine
2421         & Model, as well as Rounding if wrapped in a conversion to an
2422         integer type.
2423         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
2424         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
2425         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
2426         * gcc-interface/misc.c (enumerate_modes): Compute it.
2427         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
2428         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
2429         Machine and Model.
2430         (Attribute_to_gnu) <Attr_Model>: New case.
2431         <Attr_Machine>): Likewise.
2432         (convert_with_check): Test
2433         fp_arith_may_widen variable.
2435 2014-08-01  Pascal Obry  <obry@adacore.com>
2437         * adaint.h (GNAT_FOPEN): New definition for Windows.
2438         (GNAT_OPEN): Likewise.
2439         (GNAT_STAT): Likewise.
2440         (GNAT_FSTAT): Likewise.
2441         (GNAT_LSTAT): Likewise.
2442         (GNAT_STRUCT_STAT): Likewise.
2443         * adaint.c (__gnat_stat): Fix computation of file size for
2444         Windows.
2446 2014-08-01  Vincent Celier  <celier@adacore.com>
2448         * Makefile.rtl: Minor comment update.
2450 2014-08-01  Vincent Celier  <celier@adacore.com>
2452         * Make-generated.in: Remove dependencies for vms-help.
2454 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
2456         * makeutl.ads, opt.ads: Minor grammar fixes.
2457         * makeutl.adb: Minor code reorganization.
2459 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2461         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
2462         gnatsym.adb: Remove gnatsym (VMS only tool).
2464 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
2466         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
2467         conditionalization from gnat_ugn.texi and projects.texi, and updated
2468         (considerably simplified) xgnatugn.adb, to be removed soon.
2470 2014-08-01  Vincent Celier  <celier@adacore.com>
2472         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2473         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
2474         instead of Debug.Debug_Flag_S.
2475         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
2476         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
2477         error messages.
2478         * makeutl.ads (No_Exit_Message_Option): New constant string
2479         for switch --no-exit-message.
2480         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
2481         * switch-m.adb (Scan_Make_Switches): Recognize new switch
2482         --no-exit-message.
2484 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2486         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
2487         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
2489 2014-08-01  Javier Miranda  <miranda@adacore.com>
2491         * inline.ads (Inlined_Calls, Backend_Calls,
2492         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
2493         moved to inline.adb (Cannot_Inline): Update documentation.
2494         (Check_And_Build_Body_To_Inline): Renamed.
2495         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2496         * inline.adb (Check_Inlining_Restrictions): New local variable.
2497         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
2498         Backend_Not_Inlined_Subps): Declarations moved here
2499         from inline.ads (Number_Of_Statements): Removed.
2500         (Remove_Pragmas): Avoid duplicated version of this subprogram.
2501         (Build_Body_To_Inline): Code cleanup.
2502         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
2503         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
2504         (Check_Body_To_Inline): Removed.
2505         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2506         (Has_Excluded_Declaration): No action if not
2507         Check_Inlining_Restrictions.
2508         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2509         (Initialize): Initialize the lists of inlined calls and subprograms.
2510         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2511         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2512         to Check_And_Build_Body_To_Inline since it has been renamed as
2513         Check_And_Split_Unconstrained_Function
2514         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2515         package inline.
2516         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2518 2014-08-01  Vincent Celier  <celier@adacore.com>
2520         * debug.adb: Add documentation for new debug switch -ds.
2521         * make.adb (List_Bad_Compilations): Do not issue any message
2522         when switch -ds is specified.
2523         * makeutl.adb (Fail_Program): Do not issue any message when
2524         -ds is specified.
2525         (Finish_Program): Ditto.
2527 2014-08-01  Robert Dewar  <dewar@adacore.com>
2529         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2530         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2531         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2532         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2533         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2534         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2535         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2536         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2537         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2538         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2539         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2540         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2541         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2542         s-tratas.ads: Minor fix to copyright notices.
2544 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2546         * sinfo.ads: Remove long obsolete comment.
2547 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2549         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
2550         * sem_ch3.adb: Minor reformatting.
2552 2014-08-01  Pascal Obry  <obry@adacore.com>
2554         * cstreams.c: Only enable large file support on know supported
2555         platforms. Add missing defines/includes.
2557 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2559         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
2560         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
2561         on generic units that contain constructs that forbid subtypes
2562         with predicates.
2563         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
2564         Inherit flags indicating the presence of predicates in subtype
2565         declarations with and without constraints.
2566         (Inherit_Predicate_Flags): Utility for the above.
2567         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
2568         indicate that the actual cannot have predicates, and preserve
2569         warning. In an instance, report error if actual has predicates
2570         and the construct appears in a package declaration.
2571         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
2572         for an actual with predicates, if the corresponding formal
2573         carries No_Predicate_On_Actual or (in the case of a loop)
2574         No_Dynamic_Predicate_On_Actual.
2575         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
2576         Static_Predicate function if the type is non-static (in the
2577         presence of previous errors),
2578         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
2579         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
2580         generic contract on actuals that cannot have predicates.
2582 2014-08-01  Pascal Obry  <obry@adacore.com>
2584         * a-direct.adb (C_Size): Returns an int64.
2585         * osint.adb (System.CRTL): New with clause.
2586         (File_Length.Internal): Returns an int64.
2587         * s-os_lib.ads (File_Length): Returns an int64.
2589 2014-08-01  Robert Dewar  <dewar@adacore.com>
2591         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
2592         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
2593         osint.adb, krunch.adb: Minor reformatting.
2595 2014-08-01  Robert Dewar  <dewar@adacore.com>
2597         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
2598         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
2599         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
2600         Remove VMS-specific code.
2601         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
2603 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2605         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
2606         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
2607         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
2608         mlib.ads, tempdir.adb: Remove VMS handling.
2610 2014-08-01  Pascal Obry  <obry@adacore.com>
2612         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
2613         (__gnat_named_file_length): Likewise.
2614         (__gnat_file_length_attr): Likewise.
2615         * a-direct.adb (C_Size): Use size_t as returned type.
2616         * osint.adb (File_Length): Adjust spec for Internal routine
2617         (returns size_t).
2618         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
2619         (System.CRTL): With claused moved to spec.
2620         * s-os_lib.ads (System.CRTL): With clause moved to here.
2622 2014-08-01  Pascal Obry  <obry@adacore.com>
2624         * adaint.h, adaint.c (__gnat_open): Added.
2625         * s-crtl.ads (open): Import __gnat_open for large file support.
2627 2014-08-01  Robert Dewar  <dewar@adacore.com>
2629         * sem_case.adb (Dup_Choice): Improve message for integer constants.
2631 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2633         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
2635 2014-08-01  Pascal Obry  <obry@adacore.com>
2637         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
2638         * adaint.c (GNAT_OPEN): Uses new macro where needed.
2640 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2642         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
2643         extracted from...
2644         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
2645         * gcc-interface/gigi.h: Update comment.
2647 2014-07-31  Javier Miranda  <miranda@adacore.com>
2649         * debug.adb Remove documentation of -gnatd.k (no longer needed).
2650         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
2651         * inline.ads (Backend_Inlined_Subps): New
2652         Elist.  (Backend_Not_Inlined_Subps): New Elist.
2653         (Has_Excluded_Declaration): Declaration previously located in
2654         * inline.adb (Has_Excluded_Statement): Declaration previously
2655         located in inline.adb
2656         * inline.adb (Has_Single_Return): Moved out of
2657         Build_Body_To_Inline to avoid having duplicated code.
2658         (Number_Of_Statements): New subprogram.
2659         (Register_Backend_Inlined_Subprogram): New subprogram.
2660         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
2661         (Add_Inlined_Subprogram): Register backend inlined subprograms and
2662         also register subprograms that cannot be inlined by the backend.
2663         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
2664         to avoid having duplicated code.  Replace occurrences of
2665         Debug_Flag_Dot_K by Back_End_Inlining.
2666         * sem_res.adb (Resolve_Call): Code cleanup.
2667         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
2668         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
2669         (List_Inlining_Info): Add listing of subprograms passed to the
2670         backend and listing of subprograms that cannot be inlined by
2671         the backend.
2672         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
2673         Debug_Flag_Dot_K by Back_End_Inlining.
2675 2014-07-31  Robert Dewar  <dewar@adacore.com>
2677         * nlists.ads: Minor code fix (remove unwise Inline for
2678         List_Length).
2680 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2682         * einfo.adb: Remove VMS specific code.
2683         * exp_attr.adb: Remove VAX specific code.
2684         * set_targ.adb: Remove handling of VAX_Float.
2685         * sem_vfpt.adb: Remove references to Vax_Native.
2686         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
2688 2014-07-31  Robert Dewar  <dewar@adacore.com>
2690         * sem_ch4.adb: Minor reformatting.
2692 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2694         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
2695         to VMS. Misc clean ups.
2696         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
2698 2014-07-31  Robert Dewar  <dewar@adacore.com>
2700         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
2701         exp_prag.adb, frontend.adb, interfac.ads,
2702         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
2703         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
2704         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
2705         snames.ads-tmpl: Remove obsolete VMS-specific code.
2707 2014-07-31  Robert Dewar  <dewar@adacore.com>
2709         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
2711 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2713         * a-intnam-linux.ads: Minor: update obsolete comments.
2714         * s-taasde.adb: Minor: fix comment header.
2716 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2718         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
2719         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
2720         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
2721         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
2722         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
2723         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
2724         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
2725         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
2726         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
2727         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
2728         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
2729         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
2730         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
2731         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
2732         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
2733         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
2734         * namet.h (Is_Non_Ada_Error): Remove.
2736 2014-07-31  Robert Dewar  <dewar@adacore.com>
2738         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
2739         reformatting.
2741 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2743         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
2744         which demonstrates the expansion of while loops subject to
2745         attribute 'Loop_Entry. The condition of a while loop along with
2746         related condition actions is now wrapped in a function.  Instead
2747         of repeating the condition, the expansion now calls the function.
2749 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2751         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
2752         error when reporting of missing values in a case statement for
2753         a type with a static predicate.
2754         (Check_Choices): Reject a choice given by a subtype to which a
2755         Dynamic_Predicate applies.
2756         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
2757         Has_Dynamic_Predicate_Aspect flag from parent.
2759 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2761         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
2762         cannot apply to a subtype of an incomplete type.
2763         (Is_Static_Choice): Treat an Others_Clause as static. The
2764         staticness of the expression and of the range are checked
2765         elsewhere.
2767 2014-07-31  Pascal Obry  <obry@adacore.com>
2769         * adaint.h (__gnat_ftell64): Added.
2770         (__gnat_fseek64): Added.
2771         (__int64): Added.
2772         * cstreams.c (__int64): Removed.
2774 2014-07-31  Pascal Obry  <obry@adacore.com>
2776         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
2777         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
2778         (ftell64): Always returns a 64bit value.
2779         * cstreams.c (int64): New definition.
2780         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
2781         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
2782         uses ftello() on UNIX.
2783         (__gnat_fseek64): Offset is always a 64bit value. The
2784         implementation now uses fseeko() on UNIX.
2785         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
2786         always use fseek64 to set the offset.
2787         (Size): Simplify code, always use fseek64/ftell64.
2788         * s-direio.ads (Count): Now an int64.
2789         * g-socket.ads (Vector_Element): Adjust definition for Length
2790         to be a size_t. This matches the C definition and avoid using
2791         a 64bit integer on 32bit platforms now that Count is always 64bit.
2792         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
2793         (C_Recvmsg): Change some conversion to account for change in
2794         Vector_Element.
2795         (C_Sendmsg): Likewise.
2797 2014-07-31  Robert Dewar  <dewar@adacore.com>
2799         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
2800         * debug.adb: Remove documentation of -gnatdm flag.
2801         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
2802         -gnatdm flag.
2804 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
2806         * lib-writ.adb (Write_Unit_Information): Fix case where U =
2807         No_Unit.
2809 2014-07-31  Claire Dross  <dross@adacore.com>
2811         * exp_util.adb, exp_util.ads
2812         (Get_First_Parent_With_External_Axiomatization_For_Entity):
2813         New routine to find the first parent of an entity with
2814         a pragma Annotate (GNATprove, External_Axiomatization).
2815         (Has_Annotate_Pragma_For_External_Axiomatization): New function
2816         to check if a package has a pragma Annotate (GNATprove,
2817         External_Axiomatization).
2818         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
2819         flag on the entity for the declaration created for a formal
2820         subprogram in an instance. This is a renaming declaration,
2821         or in GNATprove_Mode the declaration of an expression function
2822         that captures the axiomatization of the actual.
2823         * sem_ch6.adb (Analyze_Expression_Function): For a
2824         Generic_Actual_Subprogram, place body immediately after the
2825         declaration because it may be used in a subsequent declaration
2826         in the instance.
2827         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
2828         the actual is a function, not an operator. Handle functions with
2829         one and two parameters and binary and unary operators.
2831 2014-07-31  Pascal Obry  <obry@adacore.com>
2833         * cstreams.c (__gnat_is_regular_file_fd): Removed.
2834         * adaint.c (__gnat_is_regular_file_fd): Added.
2836 2014-07-31  Robert Dewar  <dewar@adacore.com>
2838         * exp_strm.adb: Minor reformatting.
2840 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2842         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
2843         Analyze_Associations, to create a wrapper around operators that
2844         are actuals to formal subprograms. This is done in GNATProve
2845         mode in order to propagate the contracts of the operators to
2846         the body of the instance.
2848 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2850         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
2851         legal if within an aspect specification for a generic subprogram.
2853 2014-07-31  Javier Miranda  <miranda@adacore.com>
2855         * gnat1drv.adb (Back_End_Inlining): Set to false if
2856         Suppress_All_Inlining is set.
2857         * debug.adb: Adding documentation for -gnatd.z.
2858         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
2859         processing to -gnatn1 for calls to Inline_Always routines.
2860         (Add_Inlined_Subprogram): Remove previous patch.
2862 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
2864         * sem_ch13.adb (Check_One_Function): Apply properly the static
2865         semantic rules for indexing aspects and the functions they denote.
2867 2014-07-31  Javier Miranda  <miranda@adacore.com>
2869         * debug.adb: Complete documentation of -gnatd.z.
2871 2014-07-31  Bob Duff  <duff@adacore.com>
2873         * gnat_ugn.texi: Minor doc fixes.
2875 2014-07-31  Robert Dewar  <dewar@adacore.com>
2877         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
2878         index value.
2880 2014-07-31  Tristan Gingold  <gingold@adacore.com>
2882         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
2883         (Packed_Bytes1): Make component aliased.
2885 2014-07-31  Robert Dewar  <dewar@adacore.com>
2887         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
2889 2014-07-31  Robert Dewar  <dewar@adacore.com>
2891         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
2892         reformatting.
2894 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
2896         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
2897         on array references here, now done more selectively in trans.c.
2899 2014-07-31  Doug Rupp  <rupp@adacore.com>
2901         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
2903 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2905         * sem_util.adb (Is_Effectively_Volatile): New routine.
2907 2014-07-31  Fedor Rybin  <frybin@adacore.com>
2909         * gnat_ugn.texi: Document --test-duration option for gnattest.
2911 2014-07-31  Javier Miranda  <miranda@adacore.com>
2912             Eric Botcazou  <ebotcazou@adacore.com>
2914         * opt.ads (Back_End_Inlining): New variable which controls
2915         activation of inlining by back-end expansion.
2916         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
2917         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
2918         the body to be inlined by the frontend if Back_End_Inlining
2919         is enabled.
2920         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
2921         (Expand_Call): If backend inlining is enabled let the backend to
2922         handle inlined subprograms.
2923         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
2924         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
2925         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
2926         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
2927         enabled.
2928         * debug.adb Document -gnatd.z
2929         * fe.h Import Back_End_Inlining variable.
2930         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
2931         enabled then declare attribute "always inline"
2932         * gcc-interface/decl.c, gcc-interface/trans.c,
2933         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
2935 2014-07-31  Robert Dewar  <dewar@adacore.com>
2937         * a-ngelfu.ads: Minor comment fix.
2939 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
2941         * freeze.adb (Freeze_Record_Type): Replace all calls to
2942         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2943         related comments.
2944         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
2945         Replace all calls to Is_SPARK_Volatile with
2946         Is_Effectively_Volatile and update related comments.
2947         * sem_ch5.adb (Analyze_Iterator_Specification,
2948         Analyze_Loop_Parameter_Specification): Replace all calls to
2949         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2950         related comments.
2951         * sem_ch6.adb (Process_Formals): Replace all calls to
2952         Is_SPARK_Volatile with Is_Effectively_Volatile and update
2953         related comments.
2954         * sem_ch12.adb (Instantiate_Object): Replace the call to
2955         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
2956         and update related comment.
2957         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
2958         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
2959         with Is_Effectively_Volatile and update related comments.
2960         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
2961         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
2962         update related comments.
2963         * sem_util.adb (Has_Enabled_Property,
2964         Variable_Has_Enabled_Property): Replace all calls
2965         to Is_SPARK_Volatile with Is_Effectively_Volatile and
2966         update related comments.
2967         (Is_Effectively_Volatile): New routine.
2968         (Is_Effectively_Volatile_Object): New routine.
2969         (Is_SPARK_Volatile): Removed.
2970         (Is_SPARK_Volatile_Object): Removed.
2971         * sem_util.ads (Is_Effectively_Volatile): New routine.
2972         (Is_Effectively_Volatile_Object): New routine.
2973         (Is_SPARK_Volatile): Removed.
2974         (Is_SPARK_Volatile_Object): Removed.
2976 2014-07-31  Pascal Obry  <obry@adacore.com>
2978         * s-fileio.adb (Open): Make sure a shared file gets inserted into
2979         the global list atomically. This ensures that the file descriptor
2980         won't be freed because another tasks is closing the file.
2982 2014-07-31  Robert Dewar  <dewar@adacore.com>
2984         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
2985         generation of _FIRST and _LAST variables even in GNATprove_Mode.
2986         * gnat_ugn.texi: Minor editing.
2987         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
2988         aggregate is marked Comes_From_Source if argument is CFS.
2990 2014-07-31  Pascal Obry  <obry@adacore.com>
2992         * s-fileio.adb: Remove obsolete comment.
2994 2014-07-31  Vincent Celier  <celier@adacore.com>
2996         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
2997         overriding keyword before function to avoid error when compiler
2998         is called with -gnatyO (check overriding indicators).
3000 2014-07-31  Tucker Taft  <taft@adacore.com>
3002         * gnat_ugn.texi: Add a paragraph pointing the reader
3003         to the "plugins" example.
3005 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3007         * freeze.adb (Freeze_Expression): Document the
3008         purpose of the parent chain traversal.
3010 2014-07-31  Robert Dewar  <dewar@adacore.com>
3012         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
3013         unconstrained fpt ops.
3015 2014-07-31  Pascal Obry  <obry@adacore.com>
3017         * s-fileio.adb (Open): Make sure a shared file gets inserted into
3018         the global list atomically. This ensures that the file descriptor
3019         won't be freed because another tasks is closing the file.
3021 2014-07-31  Vincent Celier  <celier@adacore.com>
3023         * projects.texi: Minor spelling error fix.
3025 2014-07-31  Robert Dewar  <dewar@adacore.com>
3027         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
3028         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
3029         information.
3030         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
3031         * restrict.adb (Process_Restriction_Synonyms): Add handling
3032         of No_Elaboration_Code_All.
3033         * restrict.ads (Process_Restriction_Synonyms): Now handles
3034         No_Elaboration_Code_All.
3035         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
3036         No_Elaboration_Code_All.
3037         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3038         Handle setting of No_Elab_Code in unit information. Handle
3039         No_Elaboration_Code_All.
3040         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
3041         pragma processing.
3042         (Name_No_Elaboration_Code_All): New name for pragma processing.
3044 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3046         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3047         types with a null range and use the Esize of the component
3048         instead of its RM_Size to identify appropriate values.
3050 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3052         * freeze.adb Add with and use clause for Aspects.
3053         (Freeze_Expression): Emit an error when a volatile constant lacks
3054         Boolean aspect Import.
3055         (Has_Boolean_Aspect_Import): New routine.
3057 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
3059         * exp_util.adb: Minor reformatting.
3061 2014-07-31  Vincent Celier  <celier@adacore.com>
3063         * errutil.adb (Error_Msg): Make sure that all components of
3064         the error message object are initialized.
3066 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3068         * sem_ch4.adb (Try_Container_Indexing): If the container type is
3069         class-wide, use specific type to locate iteration primitives.
3070         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
3071         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
3072         Minor error message reformating.
3073         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
3074         aspect for a derived type.
3076 2014-07-31  Robert Dewar  <dewar@adacore.com>
3078         * debug.adb: Document debug flag d.X.
3080 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3082         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
3083         * sem_util.adb (Find_Specific_Type): If type is untagged private,
3084         retrieve full view so that primitive operations can be located.
3085         * exp_disp.adb Move Find_Specific_Type to sem_util.
3086         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
3087         Find_Specific_Type to locate primitive equality.
3088         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
3089         type does not require initialization.
3090         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
3091         body all visibility is established, and the enclosing package
3092         declarations must not be installed.
3094 2014-07-31  Yannick Moy  <moy@adacore.com>
3096         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
3097         Make subprogram public.
3099 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3101         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
3102         predicate Discriminated_Size, to distinguish between private
3103         components that depend on discriminants from those whose size
3104         depends on some other non-static expression.
3106 2014-07-31  Nicolas Setton  <setton@adacore.com>
3108         * g-exptty.adb (Close): Fix binding to Waitpid: use the
3109         tty version.
3111 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3113         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
3114         in a discrete range, when 'range was probably intended.
3116 2014-07-31  Robert Dewar  <dewar@adacore.com>
3118         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
3120 2014-07-31  Robert Dewar  <dewar@adacore.com>
3122         * frontend.adb: Minor reformatting.
3123         * sem.adb: Minor reformatting.
3124         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
3125         identifiers on rewrite.
3126         * par.adb: Minor comment updates.
3127         * a-ngelfu.adb (Cos): Minor simplification.
3128         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
3129         and recovery for bad aspect.
3130         * exp_ch3.adb: Code clean up.
3131         * sem_util.ads: Minor comment correction.
3132         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
3133         * sem_ch3.adb: Code clean up.
3134         * binderr.ads: Minor comment correction.
3136 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3138         * exp_disp.adb (Expand_Interface_Conversion): A call whose
3139         prefix is a static conversion to an interface type that is not
3140         class-wide is not dispatching.
3142 2014-07-31  Robert Dewar  <dewar@adacore.com>
3144         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
3145         s-traceb-mastop.adb: Minor reformatting.
3147 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3149         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
3150         expansion, to handle properly visibility of selected components
3151         in instance bodies.
3153 2014-07-31  Robert Dewar  <dewar@adacore.com>
3155         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
3156         * par-ch2.adb (P_Pragma): Set Inside_Depends.
3157         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
3158         Check_Unary_Plus_Or_Minus.
3159         * scans.ads (Inside_Depends): New flag.
3160         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
3161         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
3162         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
3163         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
3164         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
3165         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
3166         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
3168 2014-07-31  Javier Miranda  <miranda@adacore.com>
3170         * s-vaflop.adb Move the body of function T_To_G before
3171         T_To_D. Required for frontend inlining.
3172         * inline.adb (Has_Excluded_Contract): New subprogram used to
3173         check if a subprogram inlined by the frontend has contracts
3174         which cannot be inlined.
3176 2014-07-31  Bob Duff  <duff@adacore.com>
3178         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
3179         (Call_Chain): Add 1 to number of frames to skip, to account for
3180         the fact that there's one more frame on the stack.
3181         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
3183 2014-07-31  Robert Dewar  <dewar@adacore.com>
3185         * checks.adb (Enable_Overflow_Check): More precise setting of
3186         Do_Overflow_Check flag for division.
3188 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3190         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
3191         array types with implementation type.
3193 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3195         * sem_ch10.adb (Process_State): Remove local variable Name. Add
3196         local variable Decl. Partially declare an abstract state by
3197         generating an entity and storing it in the state declaration.
3198         * sem_prag.adb (Create_Abstract_State): Fully declare a
3199         semi-declared abstract state.
3201 2014-07-31  Robert Dewar  <dewar@adacore.com>
3203         * prj-nmsc.adb: Minor reformatting.
3205 2014-07-31  Bob Duff  <duff@adacore.com>
3207         * s-tasdeb.adb (System.Tasking.Debug): Remove
3208         all usage of the secondary stack from this package.
3210 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3212         * freeze.adb (Freeze_Expression): Update the loop in charge
3213         of finding a proper insertion place for freeze nodes to handle
3214         N_Expression_With_Actions nodes.
3216 2014-07-31  Robert Dewar  <dewar@adacore.com>
3218         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
3219         reformatting.
3221 2014-07-31  Pascal Obry  <obry@adacore.com>
3223         * prj-nmsc.adb: Minor reformatting.
3225 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3227         * sem_util.adb (Has_Preelaborable_Initialization): Check that
3228         type is tagged before checking whether a user-defined Initialize
3229         procedure is present.
3231 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
3233         * a-ngelfu.ads (Sqrt): Augment postcondition.
3235 2014-07-31  Pascal Obry  <obry@adacore.com>
3237         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
3238         directory and ALI directory must be different than all object
3239         and library directories of aggregated projects.
3241 2014-07-31  Vincent Celier  <celier@adacore.com>
3243         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
3244         to package body, as it is not called from outside. Remove argument
3245         Project_Tree, no longer used. When runtime cannot be found,
3246         call Raise_Invalid_Config instead of failing the program.
3248 2014-07-31  Robert Dewar  <dewar@adacore.com>
3250         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
3251         (Overflow_Check).
3252         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
3253         no longer needed.
3255 2014-07-31  Robert Dewar  <dewar@adacore.com>
3257         * gnat_ugn.texi: Document new switch -gnato0.
3258         * sem_ch3.ads: Minor reformatting.
3259         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
3260         (we do not want overflow checks when incrementing elaboration
3261         counters).
3262         * einfo.ads: Minor reformatting.
3264 2014-07-31  Robert Dewar  <dewar@adacore.com>
3266         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
3267         * s-arit64.adb: Minor reformatting.
3269 2014-07-31  Robert Dewar  <dewar@adacore.com>
3271         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
3272         checking is enabled except in GNAT_Mode.
3273         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
3274         (suppress overflow checks).
3276 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3278         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
3279         invariant procedure for an internally generated subtype that is
3280         created for an object of a class-wide type.
3282 2014-07-31  Vincent Celier  <celier@adacore.com>
3284         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
3286 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
3288         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
3289         exp_disp.adb: Minor reformatting.
3291 2014-07-31  Robert Dewar  <dewar@adacore.com>
3293         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
3294         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
3295         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
3296         reformatting.
3298 2014-07-31  Robert Dewar  <dewar@adacore.com>
3300         * sem_ch13.adb: Minor reformatting.
3302 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3304         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
3305         is an unchecked_union, warn that invariants will not be checked
3306         on components that have them.
3308 2014-07-31  Robert Dewar  <dewar@adacore.com>
3310         * freeze.adb (Freeze_Entity): Check for error of
3311         Type_Invariant'Class applied to a untagged type.
3312         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
3313         as null body, so that we perform error checks even if expansion
3314         is off.
3316 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3318         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
3319         is already present, nothing to do.
3320         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
3321         component, check whether the access type has an invariant before
3322         checking the designated type.
3323         (Build_Record_Invariant_Proc): Change suffix of generated
3324         name to prevent ambiguity when record type has invariants
3325         in addition to those of components, and two subprograms are
3326         constructed. Consistent with handling of array types.
3327         (Insert_Component_Invariant_Checks): Build invariant procedure
3328         body when one has not been created yet, in the case of composite
3329         types that are completions and whose full declarations carry
3330         invariants.
3332 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3334         * gnat_rm.texi: Minor doc fixes.
3336 2014-07-30  Robert Dewar  <dewar@adacore.com>
3338         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
3340 2014-07-30  Vincent Celier  <celier@adacore.com>
3342         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
3343         of error message.
3344         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
3345         message to report that a directory cannot be created, to avoid
3346         processing of the directory path that may contains special
3347         insertion characters.
3349 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3351         * a-crdlli.ads: Place declaration of Empty_List after full type
3352         declaration for Curosr, to prevent freezing error.
3354 2014-07-30  Robert Dewar  <dewar@adacore.com>
3356         * get_targ.adb: Minor code reorganization.
3357         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
3358         reformatting.
3360 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3362         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
3363         not Program_Error, when attempting to remove an element not in
3364         the set. This is the given semantics for all set containers.
3366 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3368         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
3369         element is not present in tree return rather than violating
3370         an assertion. Constraint_Error will be raised in the caller if
3371         element is not in the container.
3373 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3375         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
3376         (elab body): Add provision for default target config file.
3377         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
3379 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3381         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
3382         when attempting to remove an element not in the set. This is
3383         the given semantics for all set containers.
3384         * a-cborse.adb (Delete): Attempt removal first, to check for
3385         tampering, before checking whether this is an attempt to
3386         delete a  non-existing element, and in fthe latter case raise
3387         Constraint_Error.
3389 2014-07-30  Vincent Celier  <celier@adacore.com>
3391         * prj-proc.adb (Recursive_Process): Do not create a new
3392         Project_Id if the project is already in the list of projects of
3393         the tree.
3395 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3397         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
3398         whose type is an incomplete formal type.
3399         (Analyze_Return_Type): Reject a return type that is an untagged
3400         imcomplete formal type.
3401         (Process_Formals): Reject a formal parameter whose type is an
3402         untagged formal incomplete type.
3403         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
3404         an untagged formal incomplete type.
3406 2014-07-30  Robert Dewar  <dewar@adacore.com>
3408         * gnat_ugn.texi: Minor spelling correction.
3409         * makeutl.adb: Minor code reorganization.
3410         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3412 2014-07-30  Robert Dewar  <dewar@adacore.com>
3414         * einfo.ads (Has_Unchecked_Union): Document that this is used
3415         to check for illegal Valid_Scalars attribute references.
3416         * exp_attr.adb (Build_Record_VS_Func): New function
3417         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
3418         function.
3419         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
3420         Unchecked_Union Add note on 'Valid_Scalars generating a lot
3421         of code.
3422         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
3423         error on attempt to apply Valid_Scalars to Unchecked_Union type.
3425 2014-07-30  Steve Baird  <baird@adacore.com>
3427         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
3428         of A(I..J)(K) in CodePeer_Mode.
3430 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
3432         * gnat_ugn.texi: Fix typo.
3434 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3436         * lib-writ.ads: document format change.
3438 2014-07-30  Pascal Obry  <obry@adacore.com>
3440         * prj-util.adb (For_Interface_Sources): Do not
3441         include sources from withed externally built projects.
3443 2014-07-30  Robert Dewar  <dewar@adacore.com>
3445         * lib.adb: Minor reformatting.
3446         * prj-util.adb: Minor reformatting.
3448 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3450         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
3451         that depends on discriminants, and which is given by an others
3452         clause, create an explicit subtype with the discriminant values
3453         of the enclosing aggregate, because the backend cannot otherwise
3454         retrieve the actual bounds of the array.
3456 2014-07-30  Fedor Rybin  <frybin@adacore.com>
3458         * gnat_ugn.texi: Improve gnattest documentation.
3460 2014-07-30  Pascal Obry  <obry@adacore.com>
3462         * makeutl.adb (Insert_Project_Sources): Properly handle sources
3463         that are aggregated. We want to include sources not only part
3464         of libraries but also if part of an aggregated project from an
3465         aggregate library.
3466         * prj.adb (For_Project_And_Aggregated_Context): Properly check
3467         state of root project.
3469 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3471         * lib-load.ads: Minor reformatting.
3472         * sinfo.ads (Library_Unit): Update comment.
3473         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
3474         is redundant. Instead used the pragma Node_Id directly as the
3475         element type.
3477 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3479         * lib.adb (Store_Note): Store only notes that do not come from
3480         an instance, and that are in the extended main source unit.
3481         * lib-writ (Write_Unit_Information): Annotations from subunits
3482         must be emitted along with those for the main unit, and they
3483         must carry a specific file name.
3484         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
3485         Unit_Id for the source file containing the pragma, as in the
3486         case of annotations from subunits we might not have a readily
3487         available unit id.
3488         * ali.adb (Scan_ALI): Account for above change in data structure.
3490 2014-07-30  Vincent Celier  <celier@adacore.com>
3492         * makeutl.adb (Insert_Project_Sources): When the library project
3493         is an aggregate Stand-Alone Library, insert in the queue the
3494         Ada interface units, with Closure set to True;
3496 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3498         * sem_util.adb: Fix minor typo.
3499         * makeutl.adb: Minor reformatting.
3501 2014-07-30  Robert Dewar  <dewar@adacore.com>
3503         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
3505 2014-07-30  Yannick Moy  <moy@adacore.com>
3507         * checks.ads: Fix typo in comment.
3509 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3511         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3512         entities that materialize range bounds, if any.
3514 2014-07-30  Vincent Celier  <celier@adacore.com>
3516         * projects.texi: Minor spelling fix.
3518 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3520         * checks.adb (Make_Bignum_Block): Use the new secondary stack
3521         build routines to manage the mark.
3522         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3523         Use the new secodary stack build routines to manage the mark.
3524         (Insert_Actions_In_Scope_Around): Add new formal parameter
3525         Manage_SS along with comment on its usage. Code and comment
3526         reformatting. Mark and release the secondary stack when the
3527         context warrants it.
3528         (Make_Transient_Block): Update the call
3529         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3530         (Wrap_Transient_Declaration): Remove local variable
3531         Uses_SS. Ensure that the secondary stack is marked and released
3532         when the related object declaration appears in a library level
3533         package or package body. Code and comment reformatting.
3534         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3535         (Build_SS_Release_Call): New routine.
3537 2014-07-30  Steve Baird  <baird@adacore.com>
3539         * exp_attr.adb: Revert previous change, not needed after all.
3541 2014-07-30  Vincent Celier  <celier@adacore.com>
3543         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3544         Closure => True for interfaces of Stand-Alone Libraries.
3545         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
3546         Boolean component Closure, defaulted to False.
3548 2014-07-30  Yannick Moy  <moy@adacore.com>
3550         * sem_res.adb: Fix typo in error message.
3552 2014-07-30  Robert Dewar  <dewar@adacore.com>
3554         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
3555         as name suffixes rather than L/H for subtype bounds.
3556         * tbuild.ads: Minor comment improvements and fixes
3557         (Make_External_Name): Document that suffix can start with an
3558         underscore.
3560 2014-07-30  Bob Duff  <duff@adacore.com>
3562         * gnat_ugn.texi: Document --rep-clauses switch.
3564 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3566         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
3567         Default_Component_Value can only be specified for scalar type or
3568         arrays of scalar types respectively.  This legality check must
3569         be performed at the point the aspect is analyzed, in order to
3570         reject aspect specifications that apply to a partial view.
3572 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3574         * freeze.adb: Minor reformatting.
3576 2014-07-30  Robert Dewar  <dewar@adacore.com>
3578         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
3579         codepeer mode.
3581 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3583         * freeze.adb (Check_Expression_Function): At the freeze point
3584         of an expression function, verify that the expression in the
3585         function does not contain references to any deferred constants
3586         that have no completion yet.
3587         (Freeze_Expression, Freeze_Before): call
3588         Check_Expression_Function.
3589         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
3590         * a-ciorse.adb: Add Adjust and Finalize routines for
3591         Reference_Control_Type. Use it in the construction of Reference
3592         and Constant_Reference values.
3594 2014-07-30  Robert Dewar  <dewar@adacore.com>
3596         * exp_aggr.adb: Update comments.
3597         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
3598         reformatting.
3600 2014-07-30  Robert Dewar  <dewar@adacore.com>
3602         * cstand.adb (New_Standard_Entity): New version takes name
3603         string to call Make_Name.
3604         (Create_Standard): Use this routine to set name before setting other
3605         fields.
3607 2014-07-30  Robert Dewar  <dewar@adacore.com>
3609         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
3610         entity reference.
3611         (Expand_Attribute, case Last): Ditto.
3612         * exp_ch3.adb (Constrain_Index): New calling sequence for
3613         Process_Range_Expr_In_Decl.
3614         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
3615         problematical case.
3616         * sem_ch3.adb (Constrain_Index): New calling sequence for
3617         Process_Range_Expr_In_Decl.
3618         (Set_Scalar_Range_For_Subtype): ditto.
3619         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
3620         subtype.
3621         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
3622         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
3623         types if we are not assuming no invalid values.
3625 2014-07-30  Robert Dewar  <dewar@adacore.com>
3627         * clean.adb: Minor reformatting.
3628         * opt.ads: Minor fix to incorrect comment.
3630 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3632         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
3633         subprogram, used by bounded hashed sets, to delete a node at
3634         a given index, whose element may have been improperly updated
3635         through a Reference_Preserving key.
3636         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
3637         * a-cbhase.adb: Add Adjust and Finalize routines for
3638         Reference_Control_Type.
3639         (Delete, Insert): Raise Program_Error, not Constraint_Error,
3640         when operation is illegal.
3641         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
3642         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
3643         private with_clause for Ada.Finalization.
3644         * a-cbmutr.adb: Add Adjust and Finalize routines for
3645         Reference_Control_Type. Use it in the construction of Reference
3646         and Constant_Reference values.
3648 2014-07-30  Robert Dewar  <dewar@adacore.com>
3650         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
3652 2014-07-30  Pascal Obry  <obry@adacore.com>
3654         * clean.adb (Clean_Project): Properly check for directory
3655         existence before trying to enter it.
3657 2014-07-30  Robert Dewar  <dewar@adacore.com>
3659         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
3661 2014-07-30  Robert Dewar  <dewar@adacore.com>
3663         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
3664         missing semicolon after name.
3666 2014-07-30  Pascal Obry  <obry@adacore.com>
3668         * prj.ads (Gprinstall_Flags): New constant.
3669         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
3670         missing library dir if Directories_Must_Exist_In_Projects
3671         is false.
3673 2014-07-30  Bob Duff  <duff@adacore.com>
3675         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
3676         * s-traceb.ads: Updagte comments.
3678 2014-07-30  Robert Dewar  <dewar@adacore.com>
3680         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
3681         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
3682         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
3683         reformatting.
3685 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3687         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
3688         subprogram, used by all versions of hashed sets, to delete a node
3689         whose element has been improperly updated through a Reference_
3690         Preserving key.
3691         * a-cohase.adb: Remove Delete_Node, use new common procedure
3692         Delete_Node_At_Index.
3693         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
3694         * a-cihase.adb: Add Adjust and Finalize routines for
3695         Reference_Control_Type.
3696         (Reference_Preserving_Key): Build aggregate for
3697         Reference_Control_Type
3699 2014-07-30  Yannick Moy  <moy@adacore.com>
3701         * checks.adb, checks.ads (Determine_Range_R): New procedure to
3702         determine the possible range of a floating-point expression.
3704 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3706         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
3707         * a-cborse.adb: Add Adjust and Finalize routines for
3708         Reference_Control_Type.
3709         (Reference_Preserving_Key): Build aggregate for
3710         Reference_Control_Type.
3711         (Delete): Check for tampering, and raise Program_Error (not
3712         Constraint_Error) when attempting to delete an element not in
3713         the set.
3714         (Insert): Ditto.
3716 2014-07-30  Bob Duff  <duff@adacore.com>
3718         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
3719         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
3720         Exception_Information is used to produce useful debugging
3721         information for the programmer. However, it was also used to
3722         implement the stream attributes for type Exception_Occurrence. The
3723         latter requires a stable and portable interface, which meant
3724         that we couldn't include a symbolic traceback. A separate set of
3725         routines was used to provide symbolic tracebacks under program
3726         control (i.e. not automatically). The goal of this ticket is
3727         to provide such automatic tracebacks, so the change here is to
3728         split the two functionalities: Exception_Information gives the
3729         maximally useful information for debugging (i.e. it now includes
3730         a symbolic traceback when a decorator is set, and it can be
3731         improved freely in the future without disturbing streaming).
3732         Untailored_Exception_Information always uses hexadecimal addresses
3733         in the traceback, has a stable and portable output, and is now
3734         used for streaming.
3736 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3738         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
3739         on the target of the assignment to find out whether it
3740         can be directly done by the back-end.
3741         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
3743 2014-07-30  Robert Dewar  <dewar@adacore.com>
3745         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
3746         a-tasatt.adb: Minor reformatting.
3748 2014-07-30  Robert Dewar  <dewar@adacore.com>
3750         * exp_ch4.adb: Minor reformatting.
3752 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3754         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
3755         Reference_Control_Type to generic package, to keep additional
3756         information for Reference_Types that manipulate keys. Add Adjust and
3757         Finalize procedures for this type.
3758         (Finalize): When finalizing a reference_preserving_key, verify
3759         that the key of the new value is equivalent to the key of the
3760         original element, raise Program_Error otherwise.
3761         (Insert): Detect tampering.
3762         (Reference_Preserving_Key): Build proper Reference_Control_Type,
3763         and update Busy and Lock bits to detect tampering.
3764         * a-cohase.ads: Keep with-clause private.
3766 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3768         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
3769         of an equality are of an Unchecked_Union type and lack inferable
3770         discriminants.
3772 2014-07-30  Bob Duff  <duff@adacore.com>
3774         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
3775         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
3776         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
3777         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
3778         we can call them from the runtimes. Leave renamings in place under GNAT.
3780 2014-07-30  Yannick Moy  <moy@adacore.com>
3782         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
3783         inlining in GNATprove mode.
3785 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3787         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
3788         Reference_Control_Type to generic package, to keep additional
3789         information for Reference_Types that manipulate keys. Add Adjust and
3790         Finalize procedures for this type.
3791         (Delete_Node): New procedure called when finalizing a
3792         Reference_Control_Type, to remove a node whose element has been
3793         improperly updated through a Reference.
3794         (Insert): Detect tampering.
3795         (Reference_Preserving_Key): Build proper Reference_Control_Type,
3796         and update Busy and Lock bits to detect tampering.
3798 2014-07-30  Bob Duff  <duff@adacore.com>
3800         * exp_intr.ads: Minor comment fix.
3802 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
3804         * exp_prag.adb, a-tags.ads: Minor typo fixes.
3806 2014-07-30  Bob Duff  <duff@adacore.com>
3808         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
3809         a-except.ads, g-traceb.adb, memtrack.adb,
3810         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
3811         Cleanup: Make the three versions of System.Traceback.Call_Chain
3812         have the same interface. Use an array for the Traceback parameter
3813         instead of an Address.  This will enable reduction in code
3814         duplication.
3816 2014-07-30  Pat Rogers  <rogers@adacore.com>
3818         * gnat_ugn.texi: Corrected minor textual error in description
3819         of switch -gnatwl.
3821 2014-07-30  Bob Duff  <duff@adacore.com>
3823         * Makefile.rtl: Sort file names.
3825 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3827         * a-tasatt.adb: Complete previous change: kill spurious warning
3828         on e.g. sparc, and make sure we only use the fast path when the
3829         alignment is compatible.
3831 2014-07-30  Yannick Moy  <moy@adacore.com>
3833         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
3834         coming from source.
3836 2014-07-30  Yannick Moy  <moy@adacore.com>
3838         * inline.adb (Build_Body_To_Inline): Issue more precise messages
3839         for declarations that prevent inlining.
3840         (Cannot_Inline): Change usual start of message to refer to contextual
3841         analysis in GNATprove mode.
3842         * sem_res.adb (Resolve_Call): Change usual start of message to
3843         refer to contextual analysis in GNATprove mode, when inlining
3844         not possible.
3846 2014-07-30  Robert Dewar  <dewar@adacore.com>
3848         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
3849         * inline.adb: Minor reformatting.
3851 2014-07-30  Javier Miranda  <miranda@adacore.com>
3853         * a-tags.ads: Add comments.
3855 2014-07-30  Pat Rogers  <rogers@adacore.com>
3857         * gnat_rm.texi: Minor word error.
3859 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3861         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
3862         created to capture the value of the prefix of 'Old at the
3863         beginning of the current declarative part, to prevent data flow
3864         anomalies in the postcondition procedure that will follow.
3866 2014-07-30  Yannick Moy  <moy@adacore.com>
3868         * debug.adb: Retire debug flag -gnatdQ.
3869         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
3870         on decl, not on body.  Ignore predicate functions.
3871         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
3872         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
3873         body when generating a decl for a body on which SPARK_Mode aspect
3874         is given.
3875         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
3876         attaching pragma to entity, to account for declaration not coming
3877         from source.
3878         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
3879         as not always inlined in GNATprove mode, when called in an
3880         assertion context.
3882 2014-07-30  Vincent Celier  <celier@adacore.com>
3884         * debug.adb: Minor comment update.
3886 2014-07-30  Robert Dewar  <dewar@adacore.com>
3888         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
3889         * sprint.adb (Sprint_Node): Handle N_Contract case.
3890         * exp_prag.adb: Minor reformatting.
3891         * freeze.adb (Freeze_Entity): Check useless postcondition for
3892         No_Return subprogram.
3893         * sem_prag.adb: Minor reformatting.
3895 2014-07-30  Javier Miranda  <miranda@adacore.com>
3897         * a-tags.ads: Complete comments about performance.
3899 2014-07-30  Fedor Rybin  <frybin@adacore.com>
3901         * gnat_ugn.texi: Adding description for --exit-status option to
3902         gnattest section.  Fixing index entry of --passed-tests option
3903         in gnattest section.
3905 2014-07-30  Javier Miranda  <miranda@adacore.com>
3907         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
3908         rtsfind.ads: Remove references to package Interfaces.CPP since this
3909         package is no longer needed.
3911 2014-07-30  Bob Duff  <duff@adacore.com>
3913         * s-taasde.adb (Timer_Queue): Don't use a
3914         build-in-place function call to initialize the Timer_Queue.
3915         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
3916         Turn off polling in these units, because otherwise we get
3917         elaboration circularities with Ada.Exceptions when the -gnatP
3918         switch is used.
3919         * s-tassta.adb (Create_Task): Make sure independent tasks
3920         are created with Parent = Environment_Task. This was not true,
3921         for example, in s-interr.adb, when Interrupt_Manager does "new
3922         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
3923         which is wrong because the master is determined by the access
3924         type, which is at library level.
3925         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
3926         now set correctly by Create_Task.
3927         (Make_Passive): Remove the workaround for the race condition in
3928         Make_Independent.
3929         * frontend.adb (Frontend): Revert to previous method of detecting
3930         temporary configuration pragma files, recognizing such files by
3931         ".tmp" in the name. This is more general than detecting pragmas
3932         Source_File_Name_Project, because it allows any tool to use
3933         this naming convention, no matter the content of the file.
3934         * gnat_ugn.texi: Document this naming convention.
3936 2014-07-30  Robert Dewar  <dewar@adacore.com>
3938         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
3939         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
3940         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
3941         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
3942         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
3943         conversion.
3945 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3947         * sem_ch5.adb: Improve error recovery.
3948         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
3949         before analyzing the body, so that in GNATprove mode there is
3950         no light expansion. Whatever expansion is required by SPARK will
3951         be performed when analysing the inlined code.
3953 2014-07-30  Bob Duff  <duff@adacore.com>
3955         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
3957 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3959         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
3960         verify that it is not hidden by an inner implicit declaration.
3962 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3964         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
3965         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
3966         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
3967         the call returns an unconstrained type: in this case there is
3968         already a transient scope, and we should not establish a new one.
3969         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
3970         True, also insert cleanup actions in the tree.
3971         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
3972         with Clean set True.
3974 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3976         * s-taskin.ads (Direct_Index, Direct_Index_Range,
3977         Direct_Attribute_Element, Direct_Attribute_Array,
3978         Direct_Index_Vector, Direct_Attributes, Is_Defined,
3979         Indirect_Attributes): Removed.  (Atomic_Address,
3980         Attribute_Array, Attributes): New.
3981         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
3982         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
3983         (Finalize_Attributes): Reimplement.
3984         * s-tassta.adb (Create_Task): Remove call to
3985         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
3986         Replace Finalize_Attributes_Link by Finalize_Attributes.
3987         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
3988         Reimplement from scratch, using a simpler and more efficient
3989         implementation.
3990         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
3991         * s-parame.ads, s-parame-hpux.ads,
3992         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
3993         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
3994         Default_Attribute_Count.
3996 2014-07-30  Olivier Hainque  <hainque@adacore.com>
3998         * vxworks-ppc-link.spec: New file. Extra link
3999         instructions for ppc-vxworks.
4000         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
4001         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
4002         * system-vxworks-arm.ads: Likewise.
4003         * gcc-interface/Makefile.in: Enable .spec files.
4005 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4007         * sem_aggr.adb: Minor comment reformatting.
4009 2014-07-30  Robert Dewar  <dewar@adacore.com>
4011         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
4012         * sem_warn.adb (Has_Junk_Name): New function
4013         (Check_References): Use Has_Junk_Name to delete junk warnings
4014         (Check_Unset_Reference): ditto.
4015         (Warn_On_Unreferenced_Entity): ditto.
4016         (Warn_On_Useless_Assignment): ditto.
4018 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4020         * checks.adb (Insert_Valid_Check): Do not check for the packed
4021         array type of a prefix that is an access type.
4023 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4025         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
4026         Unconstrained_Array even if prefix is not frozen yet, as can
4027         occur with a private subtype used as a generic actual.
4029 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
4031         * sem_attr.adb: Minor reformatting.
4033 2014-07-30  Pat Rogers  <rogers@adacore.com>
4035         * gnat_rm.texi: Corrected minor wording error in description
4036         of No_Exception_Registration.
4038 2014-07-30  Yannick Moy  <moy@adacore.com>
4040         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
4041         mode. Realphabetize two subprograms.
4042         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
4043         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
4044         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
4045         mode.
4046         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
4047         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
4048         Is_Inline in GNATprove mode.
4049         (Analyze_Subprogram_Specification):
4050         Set Is_Inlined_Always at subprogram entity creation.
4051         * sem_res.adb (Resolve_Call): Do not deal with inlining during
4052         pre-analysis.  Issue warning on call to possibly inlined
4053         subprogram when body not seen.
4055 2014-07-30  Yannick Moy  <moy@adacore.com>
4057         * lib-xref.adb (Generate_Reference): Add special
4058         case for compiler-generated formals in GNATprove mode.
4060 2014-07-30  Yannick Moy  <moy@adacore.com>
4062         * sem_ch6.adb: Add comments.
4064 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4066         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
4068 2014-07-30  Robert Dewar  <dewar@adacore.com>
4070         * sem_aggr.adb, sem_res.adb: Minor reformatting.
4072 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4074         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4075         Bit_Order): Set Reverse_Bit_Order on the base type of the
4076         specified first subtype.
4078 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4080         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
4081         to capture the value of actuals of a limited type rather than
4082         an object declaration, to prevent spurious errors when analyzing
4083         the inlined body.
4085 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4087         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
4088         as an instance, and inhibit semantic checks on already analyzed
4089         code to prevent spurious errors.
4091 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4093         * a-exctra.ads ("="): New function, to restore compatibility.
4095 2014-07-30  Pascal Obry  <obry@adacore.com>
4097         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
4098         routine to use the OS dst setting.
4100 2014-07-30  Pat Rogers  <rogers@adacore.com>
4102         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
4104 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4106         * sem_util.adb (Wrong_Type): Disable some checks equally within
4107         instances and within inlined bodies, to suppress spurious type
4108         errors on already analyzed code.
4109         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
4110         is legal in an inlined body, juts as it is in an instance body.
4112 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4114         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
4115         body the operand of an unchecked conversion may be a literal, in
4116         which case its type is the target type of the conversion. This
4117         is in contrast to conversions in other contexts, where the
4118         operand cannot be a literal and must be resolvable independent
4119         of the context.
4121 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
4123         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
4124         mere scalar constant instead of a reference for a renaming of
4125         scalar literal.
4126         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
4127         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
4129 2014-07-30  Robert Dewar  <dewar@adacore.com>
4131         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
4132         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
4133         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
4134         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
4135         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
4136         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
4137         & code reorganization.
4139 2014-07-30  Bob Duff  <duff@adacore.com>
4141         * s-tassta.adb, sem_util.ads: Minor reformatting.
4143 2014-07-30  Yannick Moy  <moy@adacore.com>
4145         * inline.adb (Build_Body_To_Inline): Detect when
4146         subprogram has multiple returns, or not a single last return
4147         statement, in GNATprove mode.
4148         (Cannot_Inline): Simplify logic to handle case of GNATprove
4149         inlining first.
4151 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4153         * sem_ch6.adb: Stubs are not subject to inlining.
4155 2014-07-30  Bob Duff  <duff@adacore.com>
4157         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
4158         from a procedure to a function, so that it can more easily be
4159         called before the "begin" of a task.
4160         * s-taasde.ads (Delay_Block): Make this type immutably limited,
4161         so we can use a build-in-place function call to initialize
4162         Timer_Queue in the body.
4163         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
4164         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
4165         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
4166         Make_Independent before reaching its "begin", to avoid race
4167         conditions. This causes the activating task to wait until after
4168         Make_Independent is complete before proceeding.  In addition,
4169         we initialize data structures used by independent tasks before
4170         activating those tasks, to avoid possible use of uninitialized data.
4171         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
4172         Minor comment fixes.
4174 2014-07-30  Bob Duff  <duff@adacore.com>
4176         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
4177         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
4178         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
4179         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
4180         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
4182 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4184         * a-tasatt.adb: Remove old comments.
4186 2014-07-30  Yannick Moy  <moy@adacore.com>
4188         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
4189         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
4190         to explain rationale for inlining or not in GNATprove mode.
4191         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
4192         to False when inlining is not possible.
4193         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
4194         flag to indicate that subprogram is fully inlined. To be reversed
4195         if inlining problem is found.
4196         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
4197         call in potentially unevaluated context.
4199 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
4201         * s-tarest.adb, s-tarest.ads: Fix comments.
4203 2014-07-30  Robert Dewar  <dewar@adacore.com>
4205         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
4206         Change No_Scalar_Parts predicate to Scalar_Part_Present and
4207         invert sense of test. This avoids the "not No_xxx" situation
4208         which is always ugly.
4210 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4212         * inline.adb (Expand_Inlined_Call): When generating code for
4213         an internal subprogram the expansion uses the location of the
4214         call, so that gdb can skip over it. In GNATprove mode we want to
4215         preserve slocs of original subprogram when expanding an inlined
4216         call, to obtain better warnings, even though subprogram appears
4217         not to come from source if it is the inlining of a subprogram
4218         body without a previous spec.
4220 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4222         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4223         types with atomic components.
4225 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4227         * Make-generated.in: Remove now unnecessary targets after s-oscons
4228         reorg.
4230 2014-07-30  Yannick Moy  <moy@adacore.com>
4232         * sem_res.adb (Resolve_Call): Use ultimate alias
4233         of callee when available.
4235 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4237         * sem_ch6.adb (Analyze_Expression_Function): To check whether
4238         an expression function is a completion, use the specification of
4239         the previous declaration, not its entity, which may be internally
4240         generated in an inlined context.
4242 2014-07-30  Doug Rupp  <rupp@adacore.com>
4244         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
4245         temp files in /cache directory unless overridden by TMPDIR.
4247 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
4249         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
4250         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
4251         type CPU, so it can never be greater than CPU_Range'Last.
4253 2014-07-30  Bob Duff  <duff@adacore.com>
4255         * s-taskin.ads: Minor comment fix.
4257 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4259         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
4260         clauses.
4262 2014-07-30  Yannick Moy  <moy@adacore.com>
4264         * debug.adb: Free debug flag dQ used for frontend inlining in
4265         GNATprove mode..
4266         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
4267         debug flag..
4269 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4271         * Make-generated.in: Remove generation of s-oscons.ads, only
4272         generate the xoscons utility, in runtime-agnostic rules.
4273         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
4274         no longer supported.
4276 2014-07-30  Bob Duff  <duff@adacore.com>
4278         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
4279         parameter Chain to be used in the allocator case.
4280         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
4281         has tasks, wrap the code in a block that will activate them,
4282         including the usual finalization code to kill them off in case
4283         of exception or abort.
4285 2014-07-30  Robert Dewar  <dewar@adacore.com>
4287         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
4288         Remove renamings (don't work for gdb).
4289         (par): New synonym for p (avoid gdb ambiguities).
4290         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
4292 2014-07-30  Bob Duff  <duff@adacore.com>
4294         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
4295         fixes.
4296         * treepr.ads, treepr.adb (ppp): Make this debugging routine
4297         accept any type covered by Union_Id.
4299 2014-07-30  Robert Dewar  <dewar@adacore.com>
4301         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
4302         analyzing branches.
4303         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
4304         expression case.
4306 2014-07-30  Robert Dewar  <dewar@adacore.com>
4308         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
4309         of predicate aspect on entity other than a type.
4311 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4313         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
4314         when a subprogram body without a previous spec cannot be inlined
4315         in GNATprove mode, because it includes aspects or pragmas that
4316         generate a SPARK contract clause.
4317         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
4318         instance cannot be inlined.
4320 2014-07-30  Robert Dewar  <dewar@adacore.com>
4322         * debug.adb: Document that d7 suppresses compilation time output.
4323         * errout.adb (Write_Header): Include compilation time in
4324         header output.
4325         * exp_intr.adb (Expand_Intrinsic_Call): Add
4326         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
4327         Compilation_Date/Compilation_Time.
4328         * g-souinf.ads (Compilation_Date): New function
4329         (Compilation_Time): New function.
4330         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
4331         * gnat_rm.texi (Compilation_Date): New function
4332         (Compilation_Time): New function.
4333         * opt.ads (Compilation_Time): New variable.
4334         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
4335         * sem_intr.adb (Compilation_Date): New function.
4336         (Compilation_Time): New function.
4337         * snames.ads-tmpl (Name_Compilation_Date): New entry.
4338         (Name_Compilation_Time): New entry.
4340 2014-07-30  Yannick Moy  <moy@adacore.com>
4342         * inline.adb: Add comment.
4344 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4346         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
4347         parameterless attribute, and a postondition can mention an
4348         indexed component or a slice whose prefix is an attribute
4349         reference F'Result.
4351 2014-07-30  Robert Dewar  <dewar@adacore.com>
4353         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
4354         Avoid bomb when printing package Standard.
4356 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4358         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
4359         entity is created at this point, ensure that the name of the
4360         flag is unique, because the subprogram may be overloaded and
4361         other homonyms may also have elaboration flags created on the fly.
4363 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4365         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
4366         (Analyze_Attribute): Major cleanup of attribute
4367         'Update. The logic is now split into two distinct routines
4368         depending on the type of the prefix. The use of <> is now illegal
4369         in attribute 'Update.
4370         (Analyze_Record_Component_Update): New routine.
4371         (Check_Component_Reference): Removed.
4372         (Resolve_Attribute): Remove the return statement and ??? comment
4373         following the processing for attribute 'Update. As a result,
4374         the attribute now freezes its prefix.
4376 2014-07-30  Javier Miranda  <miranda@adacore.com>
4378         * exp_ch4.adb (Apply_Accessibility_Check): Do
4379         not call Base_Address() in VM targets.
4381 2014-07-30  Yannick Moy  <moy@adacore.com>
4383         * gnat1drv.adb (Adjust_Global_Switches): Set
4384         Ineffective_Inline_Warnings to True in GNATprove mode.
4385         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
4386         mode of inlining.
4387         * opt.ads (Ineffective_Inline_Warnings): Add comment that
4388         describes use in GNATprove mode.
4389         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
4390         pragma when applied to the special body created for inlining.
4392 2014-07-30  Robert Dewar  <dewar@adacore.com>
4394         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
4395         Minor reformatting.
4397 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4399         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
4400         not delayed. Update the delay status of most SPARK 2014 aspects.
4401         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
4402         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
4403         to Decorate and Insert_Pragma. Add various comments concerning
4404         the delay status of several SPARK 2014 aspects. The insertion
4405         of Refined_State now uses routine Insert_After_SPARK_Mode.
4406         (Decorate): New routine.
4407         (Decorate_Aspect_And_Pragma): Removed.
4408         (Insert_Delayed_Pragma): Removed.
4409         (Insert_Pragma): New routine.
4411 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4413         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
4414         only a warning, not an error on an attempt to inline a recursive
4415         subprogram.
4417 2014-07-30  Robert Dewar  <dewar@adacore.com>
4419         * g-forstr.adb: Minor code reorganization (use J rather than I
4420         as a variable name).
4421         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
4422         g-forstr.ads: Minor reformatting.
4424 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4426         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
4427         we are debugging the generated code.
4429 2014-07-30  Yannick Moy  <moy@adacore.com>
4431         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
4432         returns True for source pointer for an inlined body.
4434 2014-07-30  Javier Miranda  <miranda@adacore.com>
4436         * exp_ch4.adb (Apply_Accessibility_Check): Add
4437         missing calls to Base_Address().
4439 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4441         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
4442         mode, subprogram bodies without a previous declaration are also
4443         candidates for front-end inlining.
4445 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4447         * aspects.ads Aspects Async_Readers, Async_Writers,
4448         Effective_Reads and Effective_Writes do not need to be delayed.
4449         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
4450         optional Boolean expression when generating the corresponding
4451         pragma for an external property aspect.
4452         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
4453         local constant Obj. Add local constant Obj_Id. Reimplement the
4454         check which ensures that the related variable is in fact volatile.
4455         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
4456         * sem_util.adb (Is_Enabled): New routine.
4457         (Variable_Has_Enabled_Property): Reimplement the detection of
4458         an enabled external property.
4460 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
4462         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
4463         for body stubs.
4465 2014-07-30  Pascal Obry  <obry@adacore.com>
4467         * g-forstr.adb, g-forstr.ads: New.
4468         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
4469         GNAT.Formatted_String.
4471 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4473         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
4474         (Expand_Array_Aggregate): Also enable in-place expansion for
4475         code generated by the compiler.  For an object declaration,
4476         set the kind of the object in addition to its type.  If an
4477         in-place assignment is to be generated and it can be directly
4478         done by the back-end, do not expand the aggregate.
4479         * fe.h (Is_Others_Aggregate): Declare.
4480         * gcc-interface/trans.c
4481         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
4482         aggregate with a single Others choice on the RHS by means of
4483         __builtin_memset.  Tidy up.
4485 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4487         * gnat_rm.texi: minor reformatting.
4489 2014-07-30  Yannick Moy  <moy@adacore.com>
4491         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
4492         in SPARK_Mode Off.
4494 2014-07-30  Robert Dewar  <dewar@adacore.com>
4496         * gnat_rm.texi: Document additional implementation-defined use
4497         of Constrained.
4499 2014-07-30  Robert Dewar  <dewar@adacore.com>
4501         * prj-proc.adb, prj-strt.adb: Update comments.
4503 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
4505         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4507 2014-07-30  Vincent Celier  <celier@adacore.com>
4509         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4510         parameter No_Extending, defaulted to False. When No_Extending
4511         is True, do not look for an extending project.
4512         (Expression): For a variable reference that is not for the current
4513         project, get its Id calling Imported_Or_Extended_Project_From
4514         with No_Extending set to True.
4515         * prj-strt.adb (Parse_Variable_Reference): If a referenced
4516         variable is not found in the current project, check if it is
4517         defined in one of the projects it extends.
4519 2014-07-30  Robert Dewar  <dewar@adacore.com>
4521         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4522         some additional cases of internally generated routines.
4524 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4526         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4527         if the compilation unit is a subunit, extend optional processing
4528         to all subunits of the current one. This allows gnatstub to
4529         supress generation of spurious bodies.
4531 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4533         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4534         track of the initial element's index within the tree.
4536 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4538         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4539         (Insert_Child): Add local variable First. Capture the index of the
4540         first node being created to ensure correct cursor construction
4541         later on. Use the three parameter version of Allocate_Node
4542         when creating multiple children as this method allows aspect
4543         Default_Value to take effect (if applicable).
4545 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
4547         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
4548         (Expand_Array_Aggregate): For a safe slice assignment, just set
4549         the target and use the common code path.
4551 2014-07-29  Robert Dewar  <dewar@adacore.com>
4553         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
4554         predicate No_Predicate_Test_On_Arguments, new name is
4555         Predicate_Tests_On_Arguments (with the opposite sense).
4557 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4559         * sem_attr.adb (Resolve_Attribute): Clean up the code for
4560         attribute 'Access. Do not generate an elaboration flag for a
4561         stand alone expression function. The expression of an expression
4562         function is now frozen when the expression function appears as
4563         the prefix of attribute 'Access.
4564         * sem_ch6.adb (Analyze_Expression_Function): Remove local
4565         variable New_Decl and update all references to it after the
4566         rewriting has taken place. Establish the linkages between the
4567         generated spec and body.
4569 2014-07-29  Robert Dewar  <dewar@adacore.com>
4571         * sem_prag.adb (ip, rv): Prevent from being optimized away.
4572         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
4573         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
4574         reformatting.
4576 2014-07-29  Vincent Celier  <celier@adacore.com>
4578         * prj-pp.adb: Minor comment update.
4579         * frontend.adb: If a target dependency info file has been read
4580         through switch -gnateT= add it to the dependencies of the source
4581         being compiled.
4583 2014-07-29  Robert Dewar  <dewar@adacore.com>
4585         * sem_ch3.adb, prj.adb: Minor reformatting.
4587 2014-07-29  Vincent Celier  <celier@adacore.com>
4589         * prj-pp.adb (Pretty_Print.Output_Project_File): New
4590         procedure to output project file names between quotes without
4591         concatenation, even if the line is too long.
4592         (Pretty_Print): Use Output_Project_File for project being extended and
4593         project imported.
4595 2014-07-29  Vincent Celier  <celier@adacore.com>
4597         * gnat_ugn.texi: Document that configuration pragmas files are
4598         added to the dependencies, unless they contain only pragmas
4599         Source_File_Name_Project.
4601 2014-07-29  Robert Dewar  <dewar@adacore.com>
4603         * frontend.adb: Minor reformatting.
4605 2014-07-29  Robert Dewar  <dewar@adacore.com>
4607         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
4608         (Expand_Actuals): Make sure predicate checks are properly applied
4609         for the case of OUT or IN OUT parameters.
4610         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
4611         predicate tests on arguments for Finalize
4612         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
4613         if predicate tests on subprogram arguments should be skipped.
4614         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
4616 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4618         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
4619         clause for the object and the expression is an aggregate, defer
4620         resolution and expansion of the aggregate until the freeze point
4621         of the entity.
4622         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
4623         the parent node is an N_Reference generated during expansion.
4625 2014-07-29  Vincent Celier  <celier@adacore.com>
4627         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
4629 2014-07-29  Robert Dewar  <dewar@adacore.com>
4631         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
4632         prepcomp.ads: Minor reformatting and code clean up.
4633         * exp_ch6.adb (Expand_Actuals): Generate predicate test
4634         unconditionally for case of OUT or IN OUT actual (before this
4635         was generated only for certain subcases, which is wrong, the
4636         test is always needed).
4638 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4640         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
4641         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
4642         until context type is available.
4643         * sem_res.adb (Resolve_Allocator): In the case of a qualified
4644         expression, complete resolution of expression.
4645         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
4646         to apply Ada2012 checks on aliased formals, as well as
4647         accesibility checks when the context of the call is an allocator
4648         or a qualified expression.
4649         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
4650         Moved here from sem_ch3.
4651         (Object_Access_Level): Handle properly aliased formals and
4652         aggregates.
4653         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
4654         now properly performed in sem_res (Resolve_Actuals,
4655         Check_Aliased_Parameter).
4657 2014-07-29  Yannick Moy  <moy@adacore.com>
4659         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
4660         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
4661         function to decide when a subprogram can be inlined in GNATprove mode.
4662         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
4663         condition for possible inlining.
4664         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
4665         for Inline_Always in GNATprove mode.
4666         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
4667         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
4668         * sem_prag.adb Minor change in comments.
4669         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
4670         inside subprograms marked as SPARK_Mode On.
4671         * sinfo.ads: Minor typo fix.
4673 2014-07-29  Vincent Celier  <celier@adacore.com>
4675         * frontend.adb: Add dependency on gnat.adc when taken into account
4676         and on non-temporary configuration pragmas files specified in
4677         switches -gnatec.
4678         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
4679         dependencies on configuration pragmas files.
4681 2014-07-29  Pat Rogers  <rogers@adacore.com>
4683         * gnat_ugn.texi: Minor clarification to the explanation for the
4684         GNATtest -v switch.
4686 2014-07-29  Robert Dewar  <dewar@adacore.com>
4688         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
4689         documentation that explains the need for this extended range
4690         (use by C_Pass_By_Copy).
4692 2014-07-29  Robert Dewar  <dewar@adacore.com>
4694         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
4696 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
4698         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
4699         complexity metrics.
4701 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4703         PR ada/60652
4704         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
4705         CRTSCTS to be visible.
4707 2014-07-29  Bob Duff  <duff@adacore.com>
4709         * g-trasym.adb, g-trasym.ads: Code cleanup.
4711 2014-07-29  Doug Rupp  <rupp@adacore.com>
4713         * sigtramp-vxworks.c: Minor reformatting.
4715 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4717         * gnat_rm.texi: No doc needed for Ada2012 aspect
4718         Implicit_dereference.
4720 2014-07-29  Robert Dewar  <dewar@adacore.com>
4722         * sem_attr.adb (Attribute_12): New array
4723         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
4724         (Check_Ada_2012_Attribute): Removed.
4726 2014-07-29  Doug Rupp  <rupp@adacore.com>
4728         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
4729         PPC, and e500.
4730         * sigtramp-vxworks.c: New file.
4731         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
4733 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4735         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
4736         derived array type, add information about component type, which
4737         was previously missing in ali file.
4738         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
4740 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4742         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
4743         of the subtype created for a record component, do not mark
4744         the subtype as frozen. For one thing, this is anomalous (in
4745         particular, the base type might not itself be frozen yet);
4746         furthermore, proper freezing of the subtype must happen in any
4747         case. So, we just mark the subtype as requiring delayed freezing
4748         (and we'll actually freeze it when generating the init_proc of
4749         the enclosing record).
4750         Also change the name of the constrained record subtype (append a
4751         'C' so that it is clearly different from the unconstrained record
4752         type, "related_idV") to make debugging easier.
4753         (Process_Full_View): When creating a full subtype for a pending
4754         private subtype, re-establish the scope of the private subtype
4755         so that we get proper visibility on outer discriminants.
4756         * exp_ch3.adb (Build_Init_Statements): Freeze any component
4757         subtype that is not frozen yet.
4759 2014-07-29  Vincent Celier  <celier@adacore.com>
4761         * prj-proc.adb (Recursive_Process): Always initialize the
4762         environment when the project is an aggregate project, even when
4763         it is not the root tree.
4764 2014-07-29  Robert Dewar  <dewar@adacore.com>
4766         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
4767         * gnat_rm.texi: Complete list of implementation aspects.
4768         * aspects.ads: Minor comment clarification.
4770 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4772         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
4773         is a null-excluding access type, do not generate a constraint
4774         check if Suppress_Assignment_Checks is set on assignment node.
4775         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
4776         parameter of a null-excluding access type, there is access check
4777         on entry, so set Suppress_Assignment_Checks on generated statement
4778         that assigns actual to parameter block.
4779         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
4781 2014-07-29  Robert Dewar  <dewar@adacore.com>
4783         * gnat_rm.texi: Change theta to @ in documentation of aspect
4784         Dimension_System.
4786 2014-07-29  Robert Dewar  <dewar@adacore.com>
4788         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
4789         are now on pragma.
4790         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
4791         of Uneval_Old_*
4792         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
4793         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
4795 2014-07-29  Javier Miranda  <miranda@adacore.com>
4797         * types.ads Update documentation on how to add new reason codes
4798         for exceptions.
4799         (RT_Exception_Code): Keep values ordered by their
4800         reason code.  Required by the .NET backend.
4801         (RT_CE_Exceptions): Subtype declaration removed.
4802         (RT_PE_Exceptions): Subtype declaration removed.
4803         (RT_SE_Exceptions): Subtype declaration removed.
4804         (Kind): New mapping table of RT_Exception_Codes.
4805         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
4806         new mapping table.
4807         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
4808         mapping table.  (Make_Raise_Program_Error): Updated to use the
4809         new mapping table.
4810         (Make_Raise_Storage_Error): Updated to use the new mapping table.
4811         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
4812         their reason code.
4814 2014-07-29  Thomas Quinot  <quinot@adacore.com>
4816         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
4817         distributed stubs generation.
4818         * exp_ch3.adb: Minor reformatting.
4820 2014-07-29  Yannick Moy  <moy@adacore.com>
4822         * sinfo.ads: Document constraint between frontend and GNATprove.
4824 2014-07-29  Robert Dewar  <dewar@adacore.com>
4826         * a-except.adb: Minor comment clarification.
4828 2014-07-29  Robert Dewar  <dewar@adacore.com>
4830         * gnat_rm.texi: Complete list of implementation attributes.
4831         * snames.ads-tmpl: Clean up list of impl-defined attributes.
4833 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4835         * freeze.adb (Freeze_Record_Type): Perform various
4836         volatility-related checks.
4838 2014-07-29  Robert Dewar  <dewar@adacore.com>
4840         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
4842 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4844         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
4845         the case where the attribute reference appears in a nested scope
4846         from that of the subprogram prefix.
4847         * sem_attr.adb: Minor reformatting.
4849 2014-07-29  Robert Dewar  <dewar@adacore.com>
4851         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
4852         initialization options.
4854 2014-07-29  Robert Dewar  <dewar@adacore.com>
4856         * sinfo.ads: Minor comment addition.
4858 2014-07-29  Bob Duff  <duff@adacore.com>
4860         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
4862 2014-07-29  Doug Rupp  <rupp@adacore.com>
4864         * init.c: Complete previous change.
4866 2014-07-29  Robert Dewar  <dewar@adacore.com>
4868         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
4869         array case.
4871 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4873         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
4874         and the completion will appear in the same declarative part,
4875         create elaboration flag.
4876         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
4877         is a completion of a declaration in the same declarative part,
4878         and the subprogram has had its address taken, add elaboration
4879         check inside the subprogram body, to detect elaboration errors
4880         that may occur through indirect calls.
4882 2014-07-29  Doug Rupp  <rupp@adacore.com>
4884         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
4885         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
4887 2014-07-29  Vincent Celier  <celier@adacore.com>
4889         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
4890         runtime directorie specified with two switches --RTS= designate
4891         the same directory, even when there are no literarily the same.
4893 2014-07-29  Robert Dewar  <dewar@adacore.com>
4895         * gnat_ugn.texi: Minor documentation clarification.
4896         * switch-c.adb: Minor reformatting.
4898 2014-07-29  Robert Dewar  <dewar@adacore.com>
4900         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
4901         Fix incorrect RTE call which caused bomb if pragma was in
4902         configuration pragma file.
4904 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4906         * expect.c (__gnat_expect_poll): Fix typo in previous change.
4907         * g-expect.adb: Update comments.
4909 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
4911         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
4912         (Default_Attribute_Count): Bump to 16 on native platforms.
4914 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4916         * sem_res.adb: Add guard to front-end inlining for SPARK.
4918 2014-07-29  Robert Dewar  <dewar@adacore.com>
4920         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
4921         Minor reformatting.
4923 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4925         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
4926         inline in GNATprove mode when subprogran is marked Inline_Always.
4927         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
4928         mode if body to inline is available.
4929         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
4930         effective in GNATprove mode.
4931         * sem_ch10.adb (Analyze_Compilation_Unit): Call
4932         Check_Package_Body_For_Inlining in GNATprove mode, so that body
4933         containing subprograms with Inline_Always can be available before
4934         calls to them.
4936 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4938         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
4939         to Check_Package_Body_For_Inlining, to prevent confusion with other
4940         inlining subprograms.
4942 2014-07-29  Robert Dewar  <dewar@adacore.com>
4944         * opt.ads: Minor comment update.
4945         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
4946         we want setting of Uneval_Old at time of encountering the aspect.
4947         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
4948         of Opt.Uneval_Old.
4949         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
4950         New function (Set_Uneval_Old_Accept): New procedure.
4951         (Set_Uneval_Old_Warn): New procedure.
4952         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
4954 2014-07-29  Robert Dewar  <dewar@adacore.com>
4956         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
4957         * snames.ads-tmpl: Minor reformatting.
4958         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
4959         to give <Error>.  Not clear why this was there, but the compiler
4960         sources do not reference Name_Error, and this interfered with
4961         the circuits for pragma Unevaluated_Use_Of_Old.
4963 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4965         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
4966         types in SPARK 2014 (again).
4967         * sem_res.adb (Is_OK_Volatile_Context): New routine.
4968         (Resolve_Entity_Name): Ensure that a volatile object with
4969         enabled properties Async_Writers or Effectire_Reads appears in
4970         a non-interfering context.
4972 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4974         * sem_ch6.adb: Move Build_Body_To_Inline,
4975         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
4976         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
4977         * inline.ads, inline.adb: Package now contains subprograms that
4978         implement front-end inlining.  No functional changes, no test
4979         needed.
4981 2014-07-29  Robert Dewar  <dewar@adacore.com>
4983         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
4985 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
4987         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
4988         is a limited view when the context is a package body, because
4989         there is no subsequent place at which the non-limited view may
4990         become visible.
4991         (Process_Formals): Ditto.
4992         * sinfo.ads, par-ch3.adb: Minor reformatting.
4994 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
4996         * expect.c (__gnat_expect_poll): New parameter dead_process
4997         used to return the dead process among the array of file
4998         descriptors. The Windows, VMS and HPUX implementations now
4999         properly report the dead process via this parameter. Other unixes
5000         don't need it.
5001         * g-expect.adb (Poll): Adapt to the C profile.
5002         (Expect_Internal): Use the new parameter to properly close the
5003         File Descriptor.  This then can be properly reported by the
5004         function First_Dead_Process as is expected.
5006 2014-07-29  Robert Dewar  <dewar@adacore.com>
5008         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
5010 2014-07-29  Robert Dewar  <dewar@adacore.com>
5012         * einfo.adb (Derived_Type_Link): New function
5013         (Set_Derived_Type_Link): New procedure.
5014         (Write_Field31_Name): Output Derived_Type_Link.
5015         * einfo.ads: New field Derived_Type_Link.
5016         * exp_ch6.adb (Expand_Call): Warn if change of representation
5017         needed on call.
5018         * sem_ch13.adb: Minor addition of ??? comment.
5019         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
5020         expensive implicit conversion.
5021         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
5023 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5025         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
5026         to DF_Id. Add new local variable DF_Call. Do not perform any
5027         elaboration-related checks on the call to the partial finalization
5028         routine within an init proc to avoid generating bogus elaboration
5029         warnings on expansion-related code.
5030         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
5031         the top level of the routine.  Ensure that Output_Calls takes
5032         into account flags -gnatel and -gnatwl when emitting warnings
5033         or info messages.
5034         (Check_Internal_Call_Continue): Update the call to Output_Calls.
5035         (Elab_Warning): Moved to the top level of routine Check_A_Call.
5036         (Emit): New routines.
5037         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
5038         comment on usage. Output all warnings or info messages only when the
5039         caller context demands it and the proper elaboration flag is set.
5041 2014-07-29  Yannick Moy  <moy@adacore.com>
5043         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
5044         Check rule about Old appearing in potentially unevaluated
5045         expression everywhere, not only in Post.
5047 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5049         * sem_prag.adb: Update comment.
5050         * a-except.adb, a-except-2005.adb: Minor editing.
5052 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
5054         * exp_dbug.adb (Debug_Renaming_Declaration):
5055         Do not create renaming entities for renamings of non-packed
5056         objects and for exceptions.
5058 2014-07-29  Robert Dewar  <dewar@adacore.com>
5060         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
5061         sem_ch6.adb, par-ch3.adb: Minor reformatting.
5063 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5065         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
5066         subtype indication in an extended return statement when the
5067         return value is an ancestor of the return type of the function,
5068         and that return type is a null record extension.
5070 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5072         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
5073         message produced for the case of a type-related representation
5074         item that is made illegal by 13.10(1).
5075         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
5076         documentation.
5078 2014-07-29  Robert Dewar  <dewar@adacore.com>
5080         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
5081         * erroutc.adb (Output_Error_Msgs): Take wide characters into
5082         account in computing position of error flags.
5083         * sinput.adb (Get_Column_Number): Take wide characters into
5084         account.
5086 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5088         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
5089         in an access type definition can carry a null_exclusion indicator.
5090         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
5091         carries a null_exclusion indicator, verify that the subtype
5092         indication denotes an access type, and create a null-excluding
5093         subtype for it.
5094         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
5095         defined on N_Access_To_Object_Definition to indicate that the
5096         subtype indication carries a null_exclusion indicator.
5098 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5100         * exp_ch6.adb (Add_Extra_Actual): Do not construct
5101         the extra actual by name, generate a reference instead.
5103 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5105         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
5106         Allow_Integer_Address if already set.
5107         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
5108         Fix order, for consistency with Rmsg_xx declarations.
5110 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5112         * sem_ch4.adb (Complete_Object_Operation): If the type of the
5113         candidate subprogram is a limited view, use non-limited view
5114         when available.
5116 2014-07-29  Robert Dewar  <dewar@adacore.com>
5118         * sem_ch13.adb: Minor change in RM reference.
5119         * sem_mech.ads: Minor reformatting.
5120         * einfo.ads: Minor comment fix.
5121         * types.ads: Minor correction to range given for Mechanism_Type.
5122         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
5123         check predicate on way out for OUT or IN OUT parameters.
5124         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
5125         better (P_Range_Constraint): Corresponding fix.
5126         * checks.ads: Minor comment clarification.
5128 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
5130         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
5131         and Treat_As_Volatile flags based on whether the renamed object
5132         is a volatile object.
5134 2014-07-29  Olivier Hainque  <hainque@adacore.com>
5136         * g-debpoo.adb
5137         (Default_Alignment): Rename as Storage_Alignment. This is not
5138         a "default" that can be overriden. Augment comment to clarify
5139         intent and document why we need to manage alignment padding.
5140         (Header_Offset): Set to Header'Object_Size instead of 'Size
5141         rounded up to Storage_Alignment. Storage_Alignment on the
5142         allocation header is not required by our internals so was
5143         overkill. 'Object_Size is enough to ensure proper alignment
5144         of the header address when substracted from a storage address
5145         aligned on Storage_Alignment.
5146         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
5147         this is always added on top of the incoming allocation requests.
5148         (Align): New function, to perform alignment rounding operations.
5149         (Allocate): Add comments on the Storage_Address computation
5150         scheme and adjust so that the alignment padding applies to that
5151         (Storage_Address) only.
5153 2014-07-29  Robert Dewar  <dewar@adacore.com>
5155         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
5156         pragma Unreferenced.
5157         * cstand.adb (Create_Standard): Use E_Array_Type for standard
5158         string types. Make sure index of Any_String/Any_Array is in a list.
5159         * errout.adb: Minor reformatting.
5161 2014-07-29  Robert Dewar  <dewar@adacore.com>
5163         * gnat_ugn.texi: Clean up and correct documentation of warnings.
5164         * usage.adb: Minor corrections to make sure warnings are properly
5165         documented.
5166         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
5167         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
5169 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5171         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
5172         created to match internal sequence numbers between compilations
5173         with/without abort must have its type properly set.
5175 2014-07-29  Robert Dewar  <dewar@adacore.com>
5177         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
5178         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
5179         SSO_Default_Specified.
5180         * ali.ads (ALIs_Record): Add field SSO_Default
5181         (SSO_Default_Specified): New global switch.
5182         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
5183         (Check_Configuration_Consistency): Call this procedure
5184         * einfo.adb (SSO_Set_High_By_Default): New
5185         function (SSO_Set_Low_By_Default): New function
5186         (Set_SSO_Set_High_By_Default): New procedure
5187         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
5188         List new flags
5189         * einfo.ads (SSO_Set_Low_By_Default): New flag
5190         (SSO_Set_High_By_Default): New flag
5191         * freeze.adb (Set_SSO_From_Default): New procedure
5192         (Freeze_Array_Type): Call Set_SSO_From_Default
5193         (Freeze_Record_Type): Call Set_SSO_From_Default
5194         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
5195         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
5196         * lib-writ.ads: Add OL/OH parameters to P line
5197         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
5198         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
5199         New global switch
5200         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
5201         set by default using pragma Default_Scalar_Storage_Order.
5202         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
5203         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
5204         Clear SSO defaults when explicit SSO is inherited.
5205         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
5206         explicit SSO is specified.
5207         (Inherit_Aspects_At_Freeze_Point):
5208         Clear SSO default when inheriting SSO.
5209         * sem_ch3.adb (Set_Default_SSO): New procedure
5210         (Analyze_Private_Extension_Declaration): Set defualt SSO
5211         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
5212         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
5213         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
5214         (Record_Type_Declaration): ditto
5215         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
5216         Save Default_SSO
5217         * sem_prag.adb (Analyze_Pragma, case
5218         Default_Scalar_Storage_Order): Set Default_SSO
5220 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5222         * sem_ch6.adb (Valid_Operator_Definition): Verify that
5223         all parameter have mode IN. This check must be done here for
5224         subprogram instantiations that have operator names, because their
5225         analysis does not follow the same path as that for subprogram
5226         declarations.
5228 2014-07-29  Robert Dewar  <dewar@adacore.com>
5230         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
5231         to make sure that the Etype of a component of the corresponding
5232         record type is present before trying to freeze it.
5233         * sem_ch5.adb: Minor reformatting.
5235 2014-07-29  Robert Dewar  <dewar@adacore.com>
5237         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
5238         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
5239         and then use it when a stream operation is used from a library generic
5240         when the restriction (No_Streams) is active.
5242 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5244         * projects.texi: Fix minor typo.
5246 2014-07-29  Yannick Moy  <moy@adacore.com>
5248         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
5250 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5252         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
5253         CodePeer mode.
5255 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5257         * exp_ch7.adb (Find_Last_Init): Add local variable
5258         Deep_Init_Found. Check the statement immediately following the
5259         declaration if [Deep_]Initialization was not found.
5261 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5263         * exp_util.adb (Is_Aliased): It appears that
5264         'reference-d and renamed objects still play some role in Boolean
5265         expression with actions and cannot be finalized immediately.
5267 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5269         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
5270         Loop names are not part of the full qualification of entity names.
5272 2014-07-29  Robert Dewar  <dewar@adacore.com>
5274         * einfo.adb (Has_Protected): Test base type.
5275         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
5276         that we always properly check No_Protected_Type_Allocators.
5278 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5280         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
5281         loop declarations as well.
5282         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
5283         to an iterator loop, because it may contain local renaming
5284         declarations that require debugging information.
5286 2014-07-29  Robert Dewar  <dewar@adacore.com>
5288         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
5290 2014-07-29  Robert Dewar  <dewar@adacore.com>
5292         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
5293         (Set_Static_Real_Or_String_Predicate): New procedure
5294         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
5295         string predicates (Is_Predicate_Static): Handle static string
5296         predicates.
5297         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
5298         New procedure (Check_Expression_Against_Static_Predicate):
5299         Deal with static string predicates, now fully implemented
5300         (Eval_Relational_Op): Allow string equality/inequality as static
5301         if not comes from source.
5303 2014-07-29  Robert Dewar  <dewar@adacore.com>
5305         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
5306         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
5307         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
5308         handling. Change name of Discrete_Predicate to
5309         Discrete_Static_Predicate, and replace testing of the presence of this
5310         field by testing the flag Has_Static_Expression.
5312 2014-07-29  Robert Dewar  <dewar@adacore.com>
5314         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
5315         * opt.adb: Handle Uneval_Old.
5316         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
5317         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
5318         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
5319         * sem_attr.adb (Uneval_Old_Msg): New procedure.
5320         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
5321         (Pop_Scope): Restore Uneval_Old.
5322         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
5323         Implemented.
5324         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
5325         Add entries for Name_Warn, Name_Allow.
5327 2014-07-29  Robert Dewar  <dewar@adacore.com>
5329         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
5330         to Is_OK_Static_Range.
5331         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
5332         static attributes (Eval_Attribute, case Size): Handle size of
5333         zero properly (Eval_Attribute, case Value_Size): Handle size of
5334         zero properly.
5335         * sem_ch13.adb: Minor reformatting.
5336         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
5337         Is_Static_Range to Is_OK_Static_Range.
5338         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
5339         wrong in several ways (Is_Static_Range): Moved here from spec
5340         (Is_Static_Subtype): Moved here from spec Change some incorrect
5341         Is_Static_Subtype calls to Is_OK_Static_Subtype.
5342         * sem_eval.ads: Add comments to section on
5343         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
5344         Add clarifying comments (Is_Static_Range): Moved to body
5345         (Is_Statically_Unevaluated): New function.
5346         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
5347         Is_Static_Range to Is_OK_Static_Range.
5348         * sinfo.ads: Additional commments for Is_Static_Expression noting
5349         that clients should almost always use Is_OK_Static_Expression
5350         instead. Many other changes throughout front end units to obey
5351         this rule.
5352         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
5353         for enumeration literal.
5354         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
5355         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
5356         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
5357         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
5358         Replace all occurrences of Is_Static_Expression by
5359         Is_OK_Static_Expression.
5361 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5363         * exp_ch4.adb (Process_Transient_Object): Remove constant
5364         In_Cond_Expr, use its initialization expression in place.
5365         * exp_ch7.adb (Process_Declarations): There is no need to check
5366         that a transient object being hooked is controlled as it would
5367         not have been hooked in the first place.
5368         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
5369         objects are not considered aliased when the related context is
5370         a Boolean expression_with_actions.
5371         (Requires_Cleanup_Actions): There is no need to check that a transient
5372         object being hooked is controlled as it would not have been hooked in
5373         the first place.
5375 2014-07-29  Robert Dewar  <dewar@adacore.com>
5377         * errout.adb: Minor reformatting.
5379 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5381         * exp_ch3.adb (Default_Initialize_Object): Add new variables
5382         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
5383         not allowed to ensure the symmetrical generation of symbols.
5384         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
5385         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
5386         temporary when aborts are not allowed to ensure symmertrical
5387         generation of symbols.
5388         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
5389         Dummy. Generate a dummy temporary when aborts are not allowed
5390         to ensure symmertrical generation of symbols.
5392 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5394         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
5395         renaming, indicate that the renamed entity itself needs debug
5396         information. This is necessary if that entity is a temporary,
5397         e.g. part of the expansion of an explicit dereference in an
5398         iterator.
5400 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5402         * errout.adb (Set_Error_Posted): When propagating flag to
5403         an enclosing named association, also propagate to the parent
5404         of that node, so that named and positional associations are
5405         treated consistently.
5407 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5409         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
5410         Do_Range_Check properly on array component expressions that
5411         have a scalar type. In GNATprove mode, only checks on scalar
5412         components must be marked by the front-end.
5414 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5416         * sem_res.adb (Resolve_Type_Conversion): If the type of the
5417         expression is a limited view, use the non-limited view when
5418         available.
5420 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5422         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
5423         case statement as coming from a conditional expression.
5424         (Expand_N_If_Expression): Mark the generated if statement as
5425         coming from a conditional expression.
5426         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
5427         objects found in case statement alternatives when the case
5428         statement is actually a case expression.
5429         (Expand_N_If_Statement):
5430         Do not process controlled objects found in an if statement when
5431         the if statement is actually an if expression.
5432         * sinfo.adb (From_Conditional_Expression): New routine.
5433         (Set_From_Conditional_Expression): New routine.
5434         * sinfo.ads Add new semantic flag From_Conditional_Expression and
5435         update related nodes.
5436         (From_Conditional_Expression): New routine along with pragma Inline.
5437         (Set_From_Conditional_Expression): New routine along with pragma Inline.
5439 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5441         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
5442         formal parameter Obj_Id and update the comment on usage. Renamed
5443         Obj_Typ to Func_Typ and update all occurrences.
5444         (Find_Last_Init): Remove formal parameter Decl and update the comment
5445         on usage.
5446         Remove local constants Obj_Id and Obj_Typ. Remove local variables
5447         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
5448         (Find_Last_Init_In_Block): Remove formal parameter
5449         Init_Typ and update the comment on usage.
5450         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
5451         on usage. Check whether the procedure call is an initialization
5452         procedure of either the object type or the initialization type.
5453         (Is_Init_Proc_Of): New routine.
5454         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
5455         routine. Add new variable Init_Typ. Add circuitry to extract the object
5456         type as well as the initialization type.
5458 2014-07-29  Robert Dewar  <dewar@adacore.com>
5460         * sem_case.adb: Minor reformatting.
5461         * sem_aux.ads: Minor reformatting.
5463 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5465         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
5466         pointer on these fields, even though they are semantic, because
5467         subsequent analysis and expansion of action nades may require
5468         exploring the tree, for example to locate a node to be wrapped
5469         when a function with controlled result is called.
5471 2014-07-29  Claire Dross  <dross@adacore.com>
5473         * sem_aux.adb (Get_Binary_Nkind): Use case on
5474         Name_Id instead of an intermediate string.
5475         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
5476         string.
5478 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
5480         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
5481         about processing sources with preprocessor directives.
5483 2014-07-24  Martin Liska  <mliska@suse.cz>
5485         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
5486         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
5487         (gnat_write_global_declarations): Likewise.
5489 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
5491         * gnat_rm.texi: Clean up for makeinfo 5.2.
5493 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
5495         * gnat_rm.texi (Machine Code Insertions): Clean up.
5497 2014-07-18  Robert Dewar  <dewar@adacore.com>
5499         * exp_ch7.adb: Minor reformatting.
5501 2014-07-18  Claire Dross  <dross@adacore.com>
5503         * sem_aux.ads (Get_Binary_Nkind): New function that returns
5504         the Node_Kind value of an entity defining a binary operator.
5505         (Get_Unary_Nkind): New function that returns the Node_Kind value
5506         of an entity defining a unary operator.
5508 2014-07-18  Pascal Obry  <obry@adacore.com>
5510         * sysdep.c: comment update.
5511         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5512         platforms where it is known to be supported.
5514 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5516         * sem_dist.adb (Process_Remote_AST_Declaration): Need
5517         to set Fat_Type's Ekind in order to be able to use its
5518         Corresponding_Remote_Type attribute.
5520 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5522         * einfo.adb Last_Aggregate_Assignment is now Node 30.
5523         (Last_Aggregate_Assignment): Include
5524         constants in the assertion. Update the underlying node.
5525         (Set_Last_Aggregate_Assignment): Include constants in the
5526         assertion. Update the underlying node.  (Write_Field11_Name):
5527         Remove the entry for Last_Aggregate_Assignment.
5528         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5529         * einfo.ads Update the node designation and usage of attribute
5530         Last_Aggregate_Assignment.
5531         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5532         assignment statement used to initialize a controlled object.
5533         (Late_Expansion): Store the last assignment statement used to
5534         initialize a controlled record or an array of controlled objects.
5535         * exp_ch3.adb (Expand_N_Object_Declaration): Default
5536         initialization of objects is now performed in a separate routine.
5537         (Default_Initialize_Object): New routine.
5538         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5539         Obj_Id. Update the comment on usage.
5540         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5541         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
5542         (Is_Init_Call): Add formal parameter Init_Typ. Update the
5543         comment on usage.  Account for the type init proc when trying
5544         to determine whether a statement is an initialization call.
5545         (Make_Adjust_Call): Rename formal parameter For_Parent to
5546         Skip_Self. Update all occurrences of For_Parent. Account for
5547         non-tagged types. Update the call to Make_Call.
5548         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
5549         comment on usage. Update all occurrences of For_Parent.
5550         (Make_Final_Call): Rename formal parameter For_Parent to
5551         Skip_Self. Update all occurrences of For_Parent. Account
5552         for non-tagged types. Update the call to Make_Call.
5553         (Process_Object_Declaration): Most variables and constants are
5554         now local to the routine.
5555         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
5556         For_Parent to Skip_Self. Update the comment on usage.
5557         (Make_Final_Call): Rename formal parameter For_Parent to
5558         Skip_Self. Update the comment on usage.
5560 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5562         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
5563         can be a procedure that is implemented by entry, and have a
5564         formal that is a synchronized interface.  It does not have to
5565         be declared as a protected operation.
5567 2014-07-18  Robert Dewar  <dewar@adacore.com>
5569         * gnat_rm.texi: Remove mention of obsolete attributes
5570         Max[_Interrupt]_Priority, which have never been implemented
5571         (or at the very least were removed long ago if they ever were
5572         implemented.  Add documentation of Max[_Interrupt]_Priority
5573         constants in package System.
5574         * ttypes.ads: Document actual handling of package System,
5575         rather than a historical fantasy version.  Remove mention of
5576         non-existent attributes Max[_Interrupt]_Priority.
5578 2014-07-18  Pascal Obry  <obry@adacore.com>
5580         * a-witeio.adb (Put): No 16-bit character output when text
5581         translation is disabled.
5582         * i-cstrea.ads: Code clean up.
5584 2014-07-18  Robert Dewar  <dewar@adacore.com>
5586         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
5587         static attributes.
5589 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5591         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
5593 2014-07-18  Pascal Obry  <obry@adacore.com>
5595         * adaint.c: Do not include wchar.h on VxWorks.
5596         * mingw32.h: Remove obsolete definition.
5598 2014-07-18  Pascal Obry  <obry@adacore.com>
5600         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
5601         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
5602         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
5603         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
5605 2014-07-18  Pascal Obry  <obry@adacore.com>
5607         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
5608         * a-ztexio.adb: Likewise.
5609         * a-witeio.adb: Likewise.
5610         (Open): Pass file's translation mode to set_text_mode.
5611         * s-ficobl.ads (Content_Encoding): New type.
5612         (Text_Content_Encoding): New subtype.
5613         (AFCB): Rename Is_Text_File to Text_Encoding.
5614         * s-fileio.adb (Open): Handles new text_translation
5615         values. Remove Is_Text_File which is equivalent to Text_Encoding
5616         in Text_Content_Encoding.
5617         * adaint.h (__gnat_set_mode): New routine.
5618         * sysdep.c (__gnat_set_wide_text_mode): Removed.
5619         (__gnat_set_mode): New routine.
5621 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5623         * gcc-interface/decl.c, gcc-interface/trans.c,
5624         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
5625         Is_Packed_Array_Impl_Type.
5627 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5629         * sem_util.adb: Minor typo correction.
5631 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
5633         * gnat_rm.texi: Complete previous change.
5635 2014-07-18  Pascal Obry  <obry@adacore.com>
5637         * s-fileio.adb: Minor style fix.
5639 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5641         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
5642         specification of stream attributes for subtypes that are not
5643         first subtypes, to prevent malformed rep_item chains in the case
5644         of such illegal specifications for discriminated private subtypes.
5645         (Check_Overloaded_Name): Verify that the name is an entity name
5646         before other checks.
5648 2014-07-18  Pascal Obry  <obry@adacore.com>
5650         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
5652 2014-07-18  Robert Dewar  <dewar@adacore.com>
5654         * sem_prag.adb, sem_attr.adb,
5655         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
5657 2014-07-18  Pascal Obry  <obry@adacore.com>
5659         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
5660         * initialize.c (__gnat_wide_text_translation_required): Defined here.
5662 2014-07-18  Pascal Obry  <obry@adacore.com>
5664         * adaint.c (__gnat_fputwc): New routine.
5665         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
5667 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5669         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
5670         (Set_Stores_Attribute_Old_Prefix): New routine.
5671         (Stores_Attribute_Old_Prefix): New routine.
5672         (Write_Entity_Flags):
5673         Output flag Stores_Attribute_Old_Prefix.
5674         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
5675         comment on usage.
5676         (Set_Stores_Attribute_Old_Prefix): New routine
5677         along with pragma Inline.
5678         (Stores_Attribute_Old_Prefix): New
5679         routine along with pragma Inline.
5680         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
5681         constant which captures the result of attribute 'Old's prefix.
5682         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
5683         relocated expression which acted as a prefix of attribute 'Old.
5685 2014-07-18  Bob Duff  <duff@adacore.com>
5687         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
5688         null before dispatching to Deallocate_Subpool.
5689         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
5690         parameter of Default_Subpool_For_Pool to 'in out'.
5691         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
5692         a message to the raise.
5693         * sem_util.adb: Minor reformatting.
5695 2014-07-18  Robert Dewar  <dewar@adacore.com>
5697         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5698         Mark expression as non-static if it fails static predicate check,
5699         and issue additional warning.
5701 2014-07-18  Pascal Obry  <obry@adacore.com>
5703         * a-witeio.adb (Put): Control translation based on
5704         wide_text_translation_required.
5705         * adaint.c (CurrentCCSEncoding): New variable.
5706         * initialize.c (__gnat_initialize): On Windows initialize
5707         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
5708         environment variable.
5709         * mingw32.h (CurrentCCSEncoding): New external.
5710         (__gnat_wide_text_translation_required): Likewise.
5711         * sysdep.c (wide_text_translation_required): New variable.
5712         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
5714 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5716         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5717         variable Refined_States.  Add global variable Matched_Items.
5718         (Check_Dependency_Clause): Account for dependency
5719         clauses utilizing states with visible null refinements.
5720         (Is_Null_Refined_State): New routine.
5721         (Match_Items): Record each successfully matched item of pragma Depends.
5722         (Record_Item): New routine.
5724 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5726         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
5727         Do_Range_Check flag on a dynamic index expression used in a
5728         component association in the argument of Update.
5730 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5732         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
5734 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5736         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
5737         of enclosing blocks, loops and the enclosing function using a
5738         parent-based traversal.
5739         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
5740         stack reclamation if the iterator loop contains a return statement
5741         that uses the stack.
5742         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
5743         patch up the scope stack as the secondary stack management now
5744         takes into account the enclosing function of the iterator loop.
5746 2014-07-18  Robert Dewar  <dewar@adacore.com>
5748         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
5750 2014-07-18  Robert Dewar  <dewar@adacore.com>
5752         * einfo.adb (Has_Static_Predicate): New function.
5753         (Set_Has_Static_Predicate): New procedure.
5754         * einfo.ads (Has_Static_Predicate): New flag.
5755         * sem_ch13.adb (Is_Predicate_Static): New function
5756         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
5757         (Add_Call): Minor change in Sloc of generated expression
5758         (Add_Predicates): Remove setting of Static_Pred, no longer used.
5759         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
5760         replace by use of the entity flag Has_Static_Predicate_Aspect.
5761         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
5762         and issue warning that predicate is not checked for now.
5763         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
5764         spec.
5765         * sem_util.adb (Check_Expression_Against_Static_Predicate):
5766         Carry out check for any case where there is a static predicate,
5767         and output appropriate message.
5768         * sinfo.ads: Minor comment corrections.
5770 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5772         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
5773         from an untagged private type whose full view is tagged, the type
5774         is marked tagged for layout reasons, but it has no dispatch table,
5775         so Set_All_DT_Position must not be called.
5776         * exp_ch13.adb: If the freeze node is for a type internal to a
5777         record declaration, as is the case for a class-wide subtype
5778         of a parent component, the relevant scope is the scope of the
5779         enclosing record.
5781 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5783         * g-memdum.adb, g-memdum.ads: Code clean ups.
5785 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5787         * sem_prag.adb (Check_Dependency_Clause):
5788         Update the comment on usage. Reimplement the mechanism which
5789         attempts to match a single clause of Depends against one or
5790         more clauses of Refined_Depends.
5791         (Input_Match): Removed.
5792         (Inputs_Match): Removed.
5793         (Is_Self_Referential): Removed.
5794         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
5795         (Normalize_Outputs): Rename variable Split to New_Claue and update
5796         all its occurrences.
5797         (Report_Extra_Clauses): Update the comment on usage.
5798         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
5800 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5802         * i-cstrea.ads: Minor reformatting.
5804 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5806         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
5807         secondary stack-related flags to the generated block.
5808         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
5809         once the loop is relocated in a block.
5811 2014-07-18  Robert Dewar  <dewar@adacore.com>
5813         * repinfo.ads: Add documentation on handling of back annotation
5814         for dynamic case.
5816 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5818         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
5819         of full type declaration, denotes previous declaration for
5820         incomplete view of the type.
5821         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
5822         of declaration if one is present.
5823         (Replace_Type): When constructing the signature of an inherited
5824         operation, handle properly the case where the operation has a
5825         formal whose type is an incomplete view.
5826         * sem_util.adb (Collect_Primitive_Operations): Handle properly
5827         the case of an operation declared after an incomplete declaration
5828         for a type T and before the full declaration of T.
5830 2014-07-18  Pascal Obry  <obry@adacore.com>
5832         * i-cstrea.ads: Add documentation for set_wide_text_mode.
5834 2014-07-18  Robert Dewar  <dewar@adacore.com>
5836         * a-witeio.adb: Minor code reorganization.
5837         * i-cstrea.ads: Add comment.
5839 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5841         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
5842         clarifications.
5844 2014-07-18  Robert Dewar  <dewar@adacore.com>
5846         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
5848 2014-07-18  Pascal Obry  <obry@adacore.com>
5850         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
5851         * a-witeio.adb (Put): On platforms where there is translation
5852         done by the OS output the raw text.
5853         (New_Line): Use Put above to properly handle the LM wide characters.
5855 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5857         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
5858         to Absolute_Address.
5860 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5862         * opt.ads (Suppress_Back_Annotation): Remove as unused.
5863         * fe.h (Back_Annotate_Rep_Info): Likewise.
5864         (Global_Discard_Names): Likewise.
5866 2014-07-18  Robert Dewar  <dewar@adacore.com>
5868         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
5869         parenthesized.
5871 2014-07-18  Vincent Celier  <celier@adacore.com>
5873         * s-osinte-vms.ads: Fix style errors.
5875 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5877         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
5878         NAME_MAX and PATH_MAX.
5880 2014-07-18  Bob Duff  <duff@adacore.com>
5882         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
5883         Build_Record_Or_Elementary_Output_Procedure): For Input and
5884         Output attributes, do not read/write the discriminants if they
5885         have default values; that will be done by Read/Write.
5887 2014-07-18  Robert Dewar  <dewar@adacore.com>
5889         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
5890         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
5891         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
5892         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
5893         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
5895 2014-07-18  Robert Dewar  <dewar@adacore.com>
5897         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
5899 2014-07-18  Vincent Celier  <celier@adacore.com>
5901         * lib-writ.ads: Update documentation about the D lines.
5903 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
5905         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
5906         as a parameter, rather than its Chars field, in order to locate
5907         freeze node of type. If the predicate or invariant has references
5908         to types other than the one to which the contract applies, these
5909         types must be frozen, and the corresponding predicate functions
5910         created, before that freeze node.
5912 2014-07-18  Robert Dewar  <dewar@adacore.com>
5914         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
5915         * par_sco.adb: Minor reformatting.
5917 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
5919         * exp_ch4.adb (Real_Range_Check): Turn off
5920         the Do_Range_Check flag on the conversion's current Expression
5921         argument rather than on the originally captured Operand node,
5922         as Expression may reflect a rewriting (as in conversions to a
5923         fixed-point type).
5925 2014-07-18  Vincent Celier  <celier@adacore.com>
5927         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
5928         is not a subunit.
5929         * ali.ads (Sdep_Record): New component Unit_Name.
5930         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
5931         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
5932         dependent unit is in a project and the source file name is not
5933         one of its sources.
5935 2014-07-18  Bob Duff  <duff@adacore.com>
5937         * s-addima.ads: Minor: add comment.
5939 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5941         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
5942         of nesting rules for composites with different SSOs.
5944 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5946         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
5947         a proper logical operator.
5948         (Has_Decision): An If_Expression indicates the presence of a decision
5949         although it is not a logical operator.
5951 2014-07-18  Robert Dewar  <dewar@adacore.com>
5953         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
5954         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
5956 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
5958         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
5959         on the null statement.
5961 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5963         * adaint.c: Minor comment rewording.
5964         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
5965         use of errno in this file is thread safe.
5967 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
5969         * gnat_ugn.texi: Doc clarification.
5970         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
5971         * sem_ch13.ads: Minor comment update.
5973 2014-07-18  Robert Dewar  <dewar@adacore.com>
5975         * repinfo.ads: Minor comment fix.
5977 2014-07-18  Robert Dewar  <dewar@adacore.com>
5979         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
5980         * sem_prag.adb: Add dummy implementation of
5981         Default_Scalar_Storage_Order.
5982         * snames.ads-tmpl: Add dummy entry for
5983         Default_Scalar_Storage_Order pragma.
5985 2014-07-18  Robert Dewar  <dewar@adacore.com>
5987         * opt.adb (Tree_Read): Read Address_Is_Private,
5988         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
5989         (Tree_Write): Corresponding writes
5990         * opt.ads: Minor comment reformatting and fixes.
5991         * tree_io.ads: Increment ASIS_Version_Number.
5993 2014-07-18  Robert Dewar  <dewar@adacore.com>
5995         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
5996         * types.h: Fix typo.
5998 2014-07-18  Robert Dewar  <dewar@adacore.com>
6000         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
6001         functional change).
6002         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
6003         ASIS trees.
6004         * sem_ch13.adb (Kill_Rep_Clause): New procedure
6005         (Analyze_Attribute_Definition_Clause): Use
6006         Kill_Rep_Clause. This is just a cleanup, no functional effect.
6007         (Analyze_Enumeration_Representation_Clause):
6008         Use Kill_Rep_Clause. This means that enum rep
6009         clauses are now properly removed from -gnatct trees.
6010         (Analyze_Record_Representation_Clause): Same change.
6011         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
6013 2014-07-18  Pascal Obry  <obry@adacore.com>
6015         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
6016         OS_Time from time parts.
6017         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
6019 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6021         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
6022         indexing over containers that are derived types: check whether
6023         signature of found operation has the correct first parameter
6024         before retrieving directly a primitive operation.
6026 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6028         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6029         Do_Range_Check flag on dynamic bounds of a range used in a
6030         component association in the argument of Update.
6032 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6034         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
6035         accesses to errno(3) to be thread safe.
6037 2014-07-18  Vincent Celier  <celier@adacore.com>
6039         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
6040         limited imported project that is an extending project, return
6041         a project being extended if it has the expected name.
6043 2014-07-18  Pascal Obry  <obry@adacore.com>
6045         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
6046         routine to set the last modification time stamp for the given file.
6047         * gnatchop.adb (File_Time_Stamp): Removed.
6048         (Write_Unit): Use
6049         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
6051 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6053         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
6054         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
6055         Moved here, so it can be shared with the resolution of 'Update,
6056         whose argument shares some features with aggregates.
6057         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
6058         Aggregate_Constraint_Checks with the expression of each
6059         association, so that the Do_Range_Check flag is set when needed.
6061 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6063         * sem_ch4.adb (Try_Container_Indexing):  If the container
6064         type is a derived type, the value of the inherited  aspect is
6065         the Reference operation declared for the parent type. However,
6066         Reference is also a primitive operation of the new type, and
6067         the inherited operation has a different signature. We retrieve
6068         the right one from the list of primitive operations of the
6069         derived type.
6071 2014-07-18  Vincent Celier  <celier@adacore.com>
6073         * debug.adb: Update comment.
6075 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6077         * exp_util.adb (Needs_Finalization): There is no reason why a
6078         C type should not benefit from finalization actions.
6080 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6082         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
6083         (FILENAME_MAX): Remove unneeded definition.
6085 2014-07-18  Robert Dewar  <dewar@adacore.com>
6087         * exp_attr.adb, debug.adb: Update comments.
6089 2014-07-18  Vincent Celier  <celier@adacore.com>
6091         * par-ch4.adb (Simple_Expression): Add missing style check
6092         for binary adding operators.
6093         (Term): Add missing style check for multiplying operators.
6095 2014-07-18  Robert Dewar  <dewar@adacore.com>
6097         * impunit.adb: Minor comment correction.
6098         * widechar.adb, s-wchcon.ads: Minor comment corrections.
6100 2014-07-18  Robert Dewar  <dewar@adacore.com>
6102         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
6103         for Build_Static_Predicate (Build_Predicate_Functions):
6104         Don't try to build discrete predicate for real type.
6105         (Build_Predicate_Functions): Report attempt to use
6106         Static_Predicate function on real type as unimplemented.
6107         * sem_util.adb (Check_Expression_Against_Static_Predicate):
6108         Add guard to prevent blow up on predicate for real type.
6110 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6112         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
6113         properly static predicate on enumeration types and modular types
6114         (not subtypes).
6116 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
6118         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
6119         the corresponding source file index.
6120         * get_scos.ads (Get_SCOs): Add a default value for it.
6121         * par_sco.adb (SCO_Record): Fill the corresponding value.
6122         * scos.h: New.
6124 2014-07-18  Vincent Celier  <celier@adacore.com>
6126         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
6127         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
6128         reformatting.
6129         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
6131 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6133         * g-sercom.ads (Set): document possible data loss.
6135 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6137         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
6138         Output, Read, Write): If the restriction No_Streams is active,
6139         replace each occurrence of a stream attribute by an explicit
6140         Raise statement.
6142 2014-07-18  Robert Dewar  <dewar@adacore.com>
6144         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
6145         reformatting.
6147 2014-07-18  Robert Dewar  <dewar@adacore.com>
6149         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
6150         function.
6151         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
6152         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
6153         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
6154         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
6156 2014-07-18  Robert Dewar  <dewar@adacore.com>
6158         * bcheck.adb (Check_Consistent_Restrictions):
6159         Remove obsolete code checking for violation of
6160         No_Standard_Allocators_After_Elaboration (main program)
6161         * bindgen.adb (Gen_Adainit): Handle
6162         No_Standard_Allocators_After_Elaboration
6163         (Gen_Output_File_Ada): ditto.
6164         * exp_ch4.adb (Expand_N_Allocator): Handle
6165         No_Standard_Allocators_After_Elaboration.
6166         * Makefile.rtl: Add entry for s-elaall
6167         * rtsfind.ads: Add entry for Check_Standard_Allocator.
6168         * s-elaall.ads, s-elaall.adb: New files.
6169         * sem_ch4.adb (Analyze_Allocator): Handle
6170         No_Standard_Allocators_After_Elaboration.
6172 2014-07-18  Robert Dewar  <dewar@adacore.com>
6174         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
6175         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
6176         Remove AB parameter from ali files and all uses.
6177         Remove Allocator_In_Body and all uses.
6179 2014-07-18  Robert Dewar  <dewar@adacore.com>
6181         * g-expect-vms.adb: Add comment.
6183 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6185         * par_sco.adb (Is_Logical_Operation): return True for
6186         N_If_Expression.
6188 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6190         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
6191         analysis and resolution of each choice in the associations within
6192         the argument of Update, because they may be variable names.
6194 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6196         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
6197         actions before the generated if statement.
6199 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6201         * gnat_ugn.texi Enhance the documentation of
6202         switches -gnateA and -gnateV.
6204 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6206         * sem_util.adb (Build_Default_Subtype): Add missing condition
6207         so that code matches description: use the full view of the base
6208         only if the base is private and the subtype is not.
6210 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
6212         * exp_disp.adb: Minor reformatting.
6213         * exp_disp.adb: Minor code reorganization.
6215 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6217         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
6218         require an explicit SSO attribute definition clause on a composite type
6219         just because one of its components has one.
6221 2014-07-17  Robert Dewar  <dewar@adacore.com>
6223         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
6224         attribute out of existence if the enclosing pragma is ignored.
6225         * sem_util.adb: Minor reformatting.
6227 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6229         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
6230         array aggregate expanded into assignments when it appears as a
6231         local declaration in an inlined body.
6233 2014-07-17  Doug Rupp  <rupp@adacore.com>
6235         * init.c [__ANDROID__]: Modify for ZCX.
6236         * exp_aggr.adb: Minor reformatting
6237         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
6239 2014-07-17  Robert Dewar  <dewar@adacore.com>
6241         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
6242         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
6243         scng.adb: Remove incorrect usage "allow to" and "allows to".
6245 2014-07-17  Robert Dewar  <dewar@adacore.com>
6247         * exp_dist.adb: Minor reformatting.
6249 2014-07-17  Bob Duff  <duff@adacore.com>
6251         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
6253 2014-07-17  Robert Dewar  <dewar@adacore.com>
6255         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
6256         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
6258 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6260         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
6261         non-bit-packed array, propagate Reverse_Storage_Order to the
6262         packed array type.
6264 2014-07-17  Javier Miranda  <miranda@adacore.com>
6266         * exp_disp.adb: Fix comment.
6267         * exp_pakd.adb: Minor reformatting.
6269 2014-07-17  Robert Dewar  <dewar@adacore.com>
6271         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
6272         entity if none exists (Gen_Elab_Calls): Complain if clash with
6273         No_Multiple_Elaboration.
6274         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
6275         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
6276         if not needed.
6277         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
6278         * sem_ch4.adb: Minor comment updates.
6280 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6282         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
6283         of function call for later use when shared passive objects
6284         are involved.
6286 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6288         * par-ch13.adb (Get_Aspect_Specifications):
6289         Catch a case where the argument of SPARK aspect Refined_State
6290         is not properly parenthesized.
6292 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6294         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
6295         the lifetime of a reference to an Ada 2012 container element.
6296         (Is_Element_Reference): New routine.
6298 2014-07-17  Robert Dewar  <dewar@adacore.com>
6300         * ali.ads: Minor comment fix.
6301         * lib-writ.adb: Minor reformatting.
6303 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6305         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
6306         in ASIS mode, load another subunit only if it a subunit of the
6307         current one, not a sibling that has been reached through the
6308         analysis of an ancestor. This allows the construction of the
6309         ASIS tree for the subunit even when sibling subunits have errors.
6311 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6313         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
6314         prevents the analysis of various contracts when the associated
6315         construct is erroneous.
6316         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
6317         SPARK_Pragma of an illegal or a partially decorated construct.
6319 2014-07-17  Robert Dewar  <dewar@adacore.com>
6321         * s-imguns.ads: Minor reformatting.
6323 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6325         * exp_ch7.adb (Build_Finalization_Master): Move all local
6326         variables to the proper code section. When looking for an existing
6327         finalization master, inspect the ultimate ancestor type of the
6328         full view.
6329         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
6331 2014-07-17  Robert Dewar  <dewar@adacore.com>
6333         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
6334         * gnat_rm.texi: Document Entity argument for pragma Annotate and
6335         Annotate aspect.
6336         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
6337         for Annotate aspect.
6338         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
6339         Entity argument at end.
6340         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
6342 2014-07-17  Tristan Gingold  <gingold@adacore.com>
6344         * s-imguns.ads: Fix minor typo.
6346 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6348         * sprint.adb: Minor reformatting.
6350 2014-07-17  Robert Dewar  <dewar@adacore.com>
6352         * sprint.adb (Write_Itype): Print proper header for string
6353         literal subtype.
6355 2014-07-17  Steve Baird  <baird@adacore.com>
6357         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
6359 2014-07-17  Vincent Celier  <celier@adacore.com>
6361         * gnatbind.adb: Change in message "try ... for more information".
6363 2014-07-17  Robert Dewar  <dewar@adacore.com>
6365         * sprint.adb: Code clean up.
6367 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6369         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
6370         the relevant code section. Add new local constant Obj_Id. When
6371         a limited controlled object is initialized by a function call,
6372         the build-in-place object access function call acts as the last
6373         initialization statement.
6374         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
6375         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
6376         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
6378 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6380         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
6381         propagate intrinsic flag to renamed entity, to allow e.g. renaming
6382         of Unchecked_Conversion.
6383         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
6384         if the declaration has errors.
6386 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6388         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
6389         container is busy before checking whether capacity allows for
6390         a further insertion. Insertion in a busy container that is full
6391         raises Program_Error rather than Capacity_Error. Previous to that
6392         patch which exception was raised varied among container types.
6394 2014-07-17  Robert Dewar  <dewar@adacore.com>
6396         * g-comlin.ads, g-comlin.adb: Minor clean up.
6398 2014-07-17  Bob Duff  <duff@adacore.com>
6400         * gnat_ugn.texi: Update gnatpp doc.
6402 2014-07-17  Robert Dewar  <dewar@adacore.com>
6404         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
6405         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
6406         could do this by actually expanding a real generic.
6407         * a-tags.ads: Add comments about performance.
6408         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
6409         Print Etype of defining identifier, rather than the object
6410         definition. More information.
6412 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6414         * exp_dist.adb: Minor documentation clarification.
6416 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6418         * exp_util.adb (Is_Aliased): Revert previous change.
6420 2014-07-17  Vincent Celier  <celier@adacore.com>
6422         * g-comlin.adb (Try_Help): New procedure.
6423         (Getopt): Use new procedure Try_Help.
6424         * g-comlin.ads (Try_Help): New procedure.
6426 2014-07-17  Bob Duff  <duff@adacore.com>
6428         * gnat_ugn.texi: Minor update.
6430 2014-07-17  Robert Dewar  <dewar@adacore.com>
6432         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
6433         * sinfo.ads: Document restriction on aggregates (must expand to
6434         assignments if one or more assignments needs expansion, e.g. for
6435         controlled types).
6436         * sem_ch13.adb: All warning messages regarding bit order should
6437         be info: messages.
6438         * gnat_ugn.texi: Minor correction of missing @ on @code
6440 2014-07-17  Robert Dewar  <dewar@adacore.com>
6442         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
6443         * s-rident.ads (Partition_Boolean_Restrictions): Add
6444         No_Long_Long_Integer.
6445         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
6446         Long_Integer'Size if restriction No_Long_Long_Integer is active.
6447         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
6448         as the implicit base type for a signed integer type declaration
6449         if restriction No_Long_Long_Integer is active.
6450         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
6451         No_Long_Long_Integer.
6453 2014-07-17  Robert Dewar  <dewar@adacore.com>
6455         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
6456         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
6457         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
6458         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
6459         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
6461 2014-07-17  Robert Dewar  <dewar@adacore.com>
6463         * debug.adb: Remove -gnatdQ.
6464         * exp_disp.adb: Remove -gnatdQ.
6465         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
6466         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
6467         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
6468         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
6469         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
6470         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
6472 2014-07-17  Robert Dewar  <dewar@adacore.com>
6474         * back_end.adb: Minor reformatting and comment additions.
6475         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
6476         function.
6477         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
6478         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
6479         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
6480         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
6481         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
6482         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
6484 2014-07-17  Robert Dewar  <dewar@adacore.com>
6486         * gnat_rm.texi: Minor comment updates.
6488 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6490         * sem_util.adb (Make_Explicit_Dereference): If the expression
6491         being dereferenced is a generalized indexing, reset the overloaded
6492         flag on the generalized indexing call, consistent with the
6493         resetting of the flag on the original indexed component.
6495 2014-07-17  Robert Dewar  <dewar@adacore.com>
6497         * gnat_ugn.texi: Document advise not to mix -gnatV? and
6498         optimization.
6500 2014-07-17  Robert Dewar  <dewar@adacore.com>
6502         * checks.adb (Insert_Valid_Check): Don't insist on a name
6503         for the prefix when we make calls to Force_Evaluation and
6504         Duplicate_Subexpr_No_Checks.
6505         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6506         (Remove_Side_Effects): Handle all volatile references right
6507         (Side_Effect_Free): Volatile reference is never side effect free
6508         * sinfo.ads (N_Attribute_Reference): Add comments explaining
6509         that in the tree, the prefix can be a general expression.
6511 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6513         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6514         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6515         * sem_ch7.adb (Analyze_Package_Body_Contract,
6516         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6518 2014-07-17  Robert Dewar  <dewar@adacore.com>
6520         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6521         Store_After_Actions_In_Scope.
6523 2014-07-17  Robert Dewar  <dewar@adacore.com>
6525         * sem_aux.ads: Minor comment addition.
6527 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6529         * sem_res.adb (Make_Call_Into_Operator): If the call is already
6530         a rewriting of an operator node, there are no actuals to be
6531         propagated from original node to rewritten node when in ASIS mode.
6533 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6535         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6536         Analyze_Subprogram_Contract): Add new local variable Mode. Save
6537         and restore the SPARK mode of the related construct in a
6538         stack-like fashion.
6539         * sem_ch7.adb (Analyze_Package_Body_Contract,
6540         Analyze_Package_Contract): Add new local variable Mode. Save and
6541         restore the SPARK mode of the related construct in a stack-like fashion.
6542         * sem_util.adb Remove with and use clause for Opt.
6543         (Restore_SPARK_Mode): New routine.
6544         (Save_SPARK_Mode_And_Set): New routine.
6545         * sem_util.ads Add with and use clause for Opt.
6546         (Restore_SPARK_Mode): New routine.
6547         (Save_SPARK_Mode_And_Set): New routine.
6549 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6551         * exp_util.adb (Is_Aliased): Transient objects
6552         within an expression with actions cannot be considered aliased.
6554 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6556         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
6557         introduce a new list (cleanup actions) for each (transient) scope.
6558         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
6559         N_Block_Statement
6560         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
6561         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
6562         processing for Store_xxx_Actions_In_Scope.
6563         (Build_Cleanup_Statements): Allow for a list of additional
6564         cleanup statements to be passed by the caller.
6565         (Expand_Cleanup_Actions): Take custom cleanup actions associated
6566         with an N_Block_Statement into account.
6567         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
6568         reorganization (refactoring only, no behaviour change).
6569         (Make_Transient_Block): Add assertion to ensure that the current
6570         scope is indeed a block (namely, the entity for the transient
6571         block being constructed syntactically, which has already been
6572         established as a scope).  If cleanup actions are present in the
6573         transient scope, transfer them now to the transient block.
6574         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
6575         called function while it is still present as the name in a call
6576         in the tree. This may not be the case later on if the call is
6577         rewritten into a transient block.
6578         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
6579         inserted after calling a protected operation on a shared passive
6580         protected must be performed in a block finalizer, not just
6581         inserted in the tree, so that they are executed even in case of
6582         a normal (RETURN) or abnormal (exception) transfer of control
6583         outside of the current scope.
6584         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
6585         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
6586         Scope_Stack_Entry reorganization.
6588 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6590         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
6591         call for types that do not have an explicit attribute definition
6592         clause for External_Tag, as their default tag may clash with an
6593         explicit tag defined for some other type.
6595 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6597         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
6598         controlled function call with multiple actual parameters that
6599         appears in Object.Operation form.
6601 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6603         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
6604         entity flag.
6605         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
6606         External_Tag): No need to set entity flag.
6607         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
6608         Reimplement correctly in terms of Has_Rep_Item.
6610 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6612         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
6613         Start examining the tree at the node passed to
6614         Establish_Transient_Scope (not its parent).
6615         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
6616         The access type for the variable storing the reference to
6617         the call must be declared and frozen prior to establishing a
6618         transient scope.
6619         * exp_ch9.adb: Minor reformatting.
6621 2014-07-17  Pascal Obry  <obry@adacore.com>
6623         * s-os_lib.ads: Minor comment update.
6625 2014-07-17  Tristan Gingold  <gingold@adacore.com>
6627         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
6628         indentation.
6629         * socket.c: Remove #warning to avoid warning.
6630         * expect.c: Indent some preprocessor directives to clarify
6631         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
6632         to remove warnings.
6633         * env.c: Fix indentation.  Port to PikeOS.
6634         * gsocket.h: Port to PikeOS.  Remove #warning.
6635         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
6636         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
6637         of stubbed __gnat_setup_parent_communication.
6638         * adaint.c: Port to PikeOS.  Reindent some preprocessor
6639         directives to clarify nested if.  Fix indentation.  Add missing
6640         ATTRIBUTE_UNUSED.
6642 2014-07-17  Robert Dewar  <dewar@adacore.com>
6644         * sem_attr.adb: Minor reformatting.
6646 2014-07-17  Robert Dewar  <dewar@adacore.com>
6648         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
6650 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6652         * sem_case.adb (Check_Choice_Set): If the case expression is the
6653         expression in a predicate, do not recheck coverage against itself,
6654         to prevent spurious errors.
6655         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
6656         expression comes from an aspect specification, to prevent spurious
6657         errors when expression is a case expression in a predicate.
6659 2014-07-17  Pascal Obry  <obry@adacore.com>
6661         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
6662         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
6664 2014-07-17  Vincent Celier  <celier@adacore.com>
6666         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
6667         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
6668         the usage for an erroneous invocation of a gnat tool.
6670 2014-07-16  Vincent Celier  <celier@adacore.com>
6672         * gnatls.adb: Get the target parameters only if -nostdinc was
6673         not specified.
6675 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6677         * checks.adb (Insert_Valid_Check): If the expression is a packed
6678         component of a modular type of the right size the data is always
6679         valid. This os particularly useful if the component is part of
6680         a volatile variable.
6682 2014-07-16  Robert Dewar  <dewar@adacore.com>
6684         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
6686 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6688         * exp_ch7.ads: Minor documentation fix.
6690 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6692         * sem_ch3.adb (Find_Type_Name): Diagnose properly
6693         a private extension completion that is an interface definition
6694         with an interface list.
6696 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
6698         * gnatls.adb (Gnatls): Code clean ups.
6700 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6702         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
6703         * sem.adb (Analyze): Handle N_Compound_Statement.
6704         * sprint.adb (Sprint_Node_Actual): Ditto.
6705         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
6706         procedure to handle N_Compound_Statement.
6707         * exp_aggr.adb (Collect_Initialization_Statements):
6708         Use a proper compound statement node, instead of a bogus
6709         expression-with-actions with a NULL statement as its expression,
6710         to wrap collected initialization statements.
6711         * freeze.ads, freeze.adb
6712         (Explode_Initialization_Compound_Statement): New public procedure,
6713         lifted from Freeze_Entity.
6714         (Freeze_Entity): When freezing
6715         an object with captured initialization statements and without
6716         delayed freezing, explode compount statement.
6717         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
6718         case that used to handle bogus EWAs with NULL statement as
6719         the expression.
6720         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
6721         delayed freezing and captured initialization statements, explode
6722         compound statement.
6724 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
6726         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
6728 2014-07-16  Doug Rupp  <rupp@adacore.com>
6730         * s-interr-hwint.adb: Casing error on parameter.
6732 2014-07-16  Pascal Obry  <obry@adacore.com>
6734         * Makefile.rtl: Add g-rewdat.o dependencies in
6735         GNATRTL_NONTASKING_OBJS.
6737 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6739         * sem_case.adb: Code clean up.
6741 2014-07-16  Vincent Celier  <celier@adacore.com>
6743         * make.adb: Do not read gnat.adc when gnatmake is invoked
6744         with -gnatA.
6746 2014-07-16  Pascal Obry  <obry@adacore.com>
6748         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
6749         implementation of GNAT.Rewrite_Data.
6751 2014-07-16  Vincent Celier  <celier@adacore.com>
6753         * gnatls.adb (Normalize): New function.
6754         (Gnatls): Get the target parameters. On targets other than VMS,
6755         normalize the path names in the source search path, the object search
6756         path and the project search path.
6758 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6760         * sem_case.adb: Avoid self-checking of case expressions in
6761         dynamic predicates.
6763 2014-07-16  Robert Dewar  <dewar@adacore.com>
6765         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
6766         discriminants.
6768 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
6770         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
6772 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6774         * gnat_ugn.texi: Fix typo.
6776 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6778         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
6779         expression if it is the specification of a subtype predicate:
6780         it will be expanded when the return statement is analyzed, or
6781         when a static predicate is transformed into a static expression
6782         for evaluation by the front-end.
6783         * sem_ch13.adb (Get_RList): If the expression for a static
6784         predicate is a case expression, extract the alternatives of the
6785         branches with a True value to create the required statically
6786         evaluable expression.
6788 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6790         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
6791         expression, not the location of the aspect, for all generated
6792         code, so that in particular the call to raise_assert_failure
6793         gets the sloc of the associated condition.
6794         * exp_ch6.adb
6795         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
6796         Set an explicit End_Label on the handled sequence of statements
6797         for the _Postconditions procedure so that the implicit return
6798         statement does not erroneously get associated with code generated
6799         for the last condition in postconditions.
6801 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6803         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
6804         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
6805         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
6806         -gnatw.Z.
6808 2014-07-16  Robert Dewar  <dewar@adacore.com>
6810         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
6811         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
6812         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
6813         not in Access_Kind.
6814         * par-ch4.adb (At_Start_Of_Attribute): New function
6815         (P_Simple_Expression): Better msg for bad attribute prefix.
6816         * scans.ads: Minor reformatting.
6818 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6820         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
6821         static constant, check that in belongs to the corresponding index
6822         subtype, to produce the proer warning when expansion is disabled.
6824 2014-07-16  Robert Dewar  <dewar@adacore.com>
6826         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
6827         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
6828         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
6829         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
6830         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
6831         -gnatw.z/-gnatw.Z
6832         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
6833         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
6834         reformatting.
6836 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6838         * exp_ch7.adb (Process_Declarations): Reinstate the check on
6839         a hook object to ensure that the related transient declaration
6840         is finalizable.
6841         * exp_util.adb (Is_Aliased): Do not consider expresison with
6842         actions as a special context.
6843         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
6844         ensure that the related transient declaration is finalizable.
6846 2014-07-16  Robert Dewar  <dewar@adacore.com>
6848         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
6849         * snames.ads-tmpl: Add Allocation_Check to list of check names.
6850         * types.ads: Add Allocation_Check to list of check names.
6852 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6854         * sem_util.adb (Enter_Name): replace bogus test for presence of
6855         Corresponding_Remote_Type with correct test on Ekind.
6856         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
6857         of calls to Corresponding_ Remote_Type (documentation fix).
6859 2014-07-16  Robert Dewar  <dewar@adacore.com>
6861         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
6862         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
6863         where it applies.
6864         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
6865         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
6867 2014-07-16  Robert Dewar  <dewar@adacore.com>
6869         * gnat_ugn.texi: Document binder switch -Ra.
6870         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
6871         (List_Closure_All).
6872         * opt.ads (List_Closure_All): New switch.
6873         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
6874         List_Closure_All.
6876 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
6878         * gnat_rm.texi: Minor edits, to make case consistent in names
6879         of types and fields.
6881 2014-07-16  Robert Dewar  <dewar@adacore.com>
6883         * gnat_rm.texi: Document erroneous mixing of thin pointers and
6884         unrestricted access
6885         * gnat_ugn.texi: Add note on size of access types about thin
6886         pointers and the use of attribute Unrestricted_Access.
6888 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6890         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
6891         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
6892         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
6893         machinery to detect tampering on bounded vectors.
6895 2014-07-16  Robert Dewar  <dewar@adacore.com>
6897         * gnat_rm.texi: Document that leading/trailing asterisks are
6898         now implied for the pattern match string for pragma Warnings
6899         and Warning_As_Error.
6900         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
6901         (Analyze_Pragma, case Warning_As_Error): Call
6902         Acquire_Warning_Match_String.
6903         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
6905 2014-07-16  Bob Duff  <duff@adacore.com>
6907         * gnat_ugn.texi: Document need for project file
6908         for --incremental switch for gnat2xml.
6910 2014-07-16  Robert Dewar  <dewar@adacore.com>
6912         * gnat_rm.texi: Fix example of non-packable components in packed
6913         records section.
6915 2014-07-16  Robert Dewar  <dewar@adacore.com>
6917         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
6918         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
6919         upper case in exception messages.
6921 2014-07-16  Robert Dewar  <dewar@adacore.com>
6923         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
6924         is renamed Has_Same_Storage.
6925         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
6926         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
6927         descriptions).
6929 2014-07-16  Robert Dewar  <dewar@adacore.com>
6931         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
6932         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
6934 2014-07-16  Robert Dewar  <dewar@adacore.com>
6936         * gnat_ugn.texi: Add note that integrated
6937         preprocessing cannot be applied to configuration pragma files.
6939 2014-07-16  Yannick Moy  <moy@adacore.com>
6941         * sem_attr.adb (Analyze_Attribute/cases Pred
6942         and Succ): Always enable range check on fixed-point types if
6943         not suppressed for the type.
6945 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6947         * sem_util.adb (State_Has_Enabled_Property):
6948         Account for an external property denoted by an others choice.
6950 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6952         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
6953         * exp_ch7.adb (Process_Declarations): There is no need to check
6954         that a transient object being hooked is controlled as it would
6955         not have been hooked in the first place.
6956         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
6957         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
6958         (Is_Aliased): A renaming of a transient controlled object is
6959         not considered aliasing when it occurs within an expression
6960         with actions.
6961         (Requires_Cleanup_Actions): There is no need to
6962         check that a transient object being hooked is controlled as it
6963         would not have been hooked in the first place.
6964         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
6966 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
6968         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
6969         the outer level of routine Analyze_Aspect_Specifications. Ensure
6970         that the corresponding pragmas of aspects Initial_Condition and
6971         Initializes are inserted after pragma SPARK_Mode.
6973 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
6975         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
6976         properly a choice list with more than one choice, where each
6977         is an aggregate denoting a sequence of array indices for a
6978         multidimentional array. For SPARK use.
6980 2014-07-16  Vadim Godunko  <godunko@adacore.com>
6982         * a-coinho-shared.adb (Adjust): Create
6983         copy of internal shared object and element when source container
6984         is locked.
6985         (Copy): Likewise.
6986         (Query_Element): Likewise.
6987         (Update_Element): Likewise.
6988         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
6989         to get reference for empty holder.
6990         (Reference): Likewise.
6992 2014-07-16  Thomas Quinot  <quinot@adacore.com>
6994         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
6995         from Process_Transient_Oject.
6996         * exp_ch4.ads: Ditto.
6997         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
6998         declaration as an action on the topmost enclosing expression,
6999         not on a possibly conditional subexpreession.
7001 2014-07-16  Vadim Godunko  <godunko@adacore.com>
7003         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
7004         Fix parameter mode of Update_Element.
7006 2014-07-16  Robert Dewar  <dewar@adacore.com>
7008         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
7009         reformatting.
7011 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7013         * a-cohase.ads: Type Iterator must be controlled, so that the
7014         tampering bit is properly set through an iteration.
7015         * a-cohase.adb: Add Finalize operation for type Iterator.
7017 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7019         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
7020         tampering checks.
7022 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7024         * a-coinho-shared.adb: Fix spurious accessibility check.
7026 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
7028         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
7030 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7032         PR ada/61505
7033         * gnat_rm.texi: Fix errors with makeinfo 5.1.
7035 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
7037         PR ada/61505
7038         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
7040 2014-06-13  Yannick Moy  <moy@adacore.com>
7042         * exp_attr.adb: Fix typo in comment.
7043         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
7044         checking in GNATprove_Mode.
7046 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7048         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
7050 2014-06-13  Robert Dewar  <dewar@adacore.com>
7052         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
7053         reformatting.
7055 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7057         * sem_prag.adb (Analyze_Pragma): Add local
7058         variable Missing_Parentheses. Emit an error when a state
7059         declaration with options appears without parentheses. Add a
7060         guard to prevent a bogus error when a state declaration may be
7061         interpreted as an option if a previous declaration with options
7062         was not parenthesized.
7064 2014-06-13  Robert Dewar  <dewar@adacore.com>
7066         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
7067         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
7068         * checks.ads (Alignment_Warnings_Record): New type.
7069         (Alignment_Warnings): New table
7070         (Validate_Alignment_Check_Warnings): New procedure.
7071         * errout.adb (Delete_Warning_And_Continuations): New procedure
7072         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
7073         Warnings_Treated_As_Errors (Finalize): Minor reformatting
7074         * errout.ads (Warning_Msg): New variable
7075         (Delete_Warning_And_Continuations): New procedure
7076         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
7077         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
7079 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7081         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
7083 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7085         * errout.adb (SPARK_Msg_N): New routine.
7086         (SPARK_Msg_NE): New routine.
7087         * errout.ads Add a section on SPARK-related error routines.
7088         (SPARK_Msg_N): New routine.
7089         (SPARK_Msg_NE): New routine.
7090         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
7091         pragma Abstract_State is always inserted after SPARK_Mode.
7092         (Insert_After_SPARK_Mode): New routine.
7093         * sem_prag.adb (Analyze_Abstract_State,
7094         Analyze_Constituent, Analyze_External_Property,
7095         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
7096         Analyze_Global_List, Analyze_Initialization_Item,
7097         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
7098         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
7099         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
7100         Analyze_Refined_Global_In_Decl_Part,
7101         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
7102         Check_Aspect_Specification_Order, Check_Constituent_Usage,
7103         Check_Declaration_Order, Check_Dependency_Clause,
7104         Check_Duplicate_Mode, Check_Duplicate_Option,
7105         Check_Duplicate_Property, Check_External_Properties,
7106         Check_External_Property, Check_Function_Return,
7107         Check_Matching_Constituent, Check_Matching_State,
7108         Check_Mode_Restriction_In_Enclosing_Context,
7109         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
7110         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
7111         Has_Extra_Parentheses, Inconsistent_Mode_Error,
7112         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
7113         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
7114         Report_Unrefined_States, Report_Unused_Constituents,
7115         Report_Unused_States, Role_Error, Usage_Error):
7116         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
7117         to report semantic errors only when SPARK_Mode is on.
7118         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
7119         pragma Depends explicitly, this is now done by the analysis.
7120         (Analyze_Global_In_Decl_List): Do not check the syntax of
7121         pragma Global explicitly, this is now done by the analysis.
7122         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
7123         pragma Initializes explicitly, this is now done by the analysis.
7124         (Analyze_Part_Of): Do not check the syntax of the encapsulating
7125         state, this is now done by the analysis.
7126         (Analyze_Pragma): Do
7127         not check the syntax of a state declaration, this is now done
7128         by the analysis.
7129         (Analyze_Refined_Depends_In_Decl_Part): Do not
7130         check the syntax of pragma Refined_Depends explicitly, this is now
7131         done by the analysis.
7132         (Analyze_Refined_Global_In_Decl_Part): Do
7133         not check the syntax of pragma Refined_Global explicitly, this is
7134         now done by the analysis.
7135         (Analyze_Refined_State_In_Decl_Part):
7136         Do not check the syntax of pragma Refined_State explicitly, this
7137         is now done by the analysis.
7138         (Check_Dependence_List_Syntax): Removed.
7139         (Check_Global_List_Syntax): Removed.
7140         (Check_Initialization_List_Syntax): Removed.
7141         (Check_Item_Syntax): Removed.
7142         (Check_Missing_Part_Of): Do not consider items from an instance.
7143         (Check_Refinement_List_Syntax): Removed.
7144         (Check_State_Declaration_Syntax): Removed.
7145         (Collect_Global_List): Do not raise Program_Error when the input is
7146         malformed.
7147         (Process_Global_List): Do not raise Program_Error when the input
7148         is malformed.
7149         * sem_ch13.adb: Minor reformatting.
7151 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7153         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
7154         that is an interface definition with an interface list.
7155         (Process_Full_View): Move error message on missmatched interfaces
7156         between views to the declaration of full view, for clarity.
7157         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
7158         for clarity.
7160 2014-06-13  Robert Dewar  <dewar@adacore.com>
7162         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
7163         reason to Overflow.
7165 2014-06-13  Robert Dewar  <dewar@adacore.com>
7167         * makeutl.adb: Minor reformatting.
7169 2014-06-13  Gail Schenker  <schenker@adacore.com>
7171         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
7172         associated flag (d.z), no longer needed.
7174 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7176         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
7177         Export aspects, do not check whether a corresponding Convention
7178         aspect has been specified. Convention is optional in Ada2012,
7179         and defaults to Convention_Ada.
7181 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7183         * checks.adb (Apply_Address_Clause_Check): Only issue the new
7184         warning if the propagation warning is issued.
7186 2014-06-13  Thomas Quinot  <quinot@adacore.com>
7188         * exp_ch4.adb: Minor reformatting.
7190 2014-06-13  Robert Dewar  <dewar@adacore.com>
7192         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
7193         Handle float range check case (Expand_N_Attribute_Reference,
7194         case Succ): Handle float range check case.
7195         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
7196         range check case.
7198 2014-06-13  Vincent Celier  <celier@adacore.com>
7200         * makeutl.ads (Compute_Builder_Switches): Change name of
7201         parameter Root_Environment to Env.
7202         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
7203         Env parameter of procedure Get_Or_Create_Configuration_File.
7204         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
7205         of new parameter Env.
7206         * prj-conf.ads (Locate_Runtime): New parameter Env of type
7207         Prj.Tree.Environment.
7209 2014-06-13  Robert Dewar  <dewar@adacore.com>
7211         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
7213 2014-06-13  Robert Dewar  <dewar@adacore.com>
7215         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
7216         reformatting.
7217         * sem_attr.adb: Minor code reformatting and simplification.
7218         * checks.adb: Fix minor typo.
7220 2014-06-13  Emmanuel Briot  <briot@adacore.com>
7222         * g-comlin.adb (Get_Argument): fix expansion
7223         of command line arguments (e.g. "*.adb") when using a custom
7224         parser. The parser was not passed to the recursive call, and
7225         thus we were trying to do the expansion on the default command
7226         line parser.
7228 2014-06-13  Thomas Quinot  <quinot@adacore.com>
7230         * exp_ch9.adb: Minor reformatting.
7232 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7234         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
7235         To determine whether the attribute should be expanded, examine
7236         whether the enclosing postcondition pragma is to be checked,
7237         rather than using the internal flag Assertions_Enabled.
7239 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
7241         * gnat_rm.texi: Minor fixes.
7242         * gnat_ugn.texi: Added a missing "@itemize".
7244 2014-06-13  Robert Dewar  <dewar@adacore.com>
7246         * debug.adb: Remove -gnatd.1 flag documentation.
7247         * layout.adb (Layout_Type): Remove special handling of size
7248         for anonymous access type.
7249         * sem_ch3.adb (Replace_Type): Remove special handling of size
7250         for anonymous access type.
7252 2014-06-13  Robert Dewar  <dewar@adacore.com>
7254         * debug.adb: Document debug flag -gnatd.1.
7255         * layout.adb (Layout_Type): Size change for anonymous access
7256         types under -gnatd.1.
7257         * sem_ch3.adb (Replace_Type): Size change for anonymous access
7258         types under -gnatd.1.
7260 2014-06-13  Robert Dewar  <dewar@adacore.com>
7262         * layout.adb (Layout_Type): Anonymous access types designating
7263         unconstrained arrays are always thin pointers.
7264         * sem_ch3.adb (Replace_Type): Anonymous access types designating
7265         unconstrained arrays are always thin pointers.
7267 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7269         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
7270         to resolve the prefix of an attribute that is an entity name
7271         and may be a parameterless call.  Minor code reorganization.
7273 2014-06-13  Robert Dewar  <dewar@adacore.com>
7275         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
7276         Removed.
7277         * opt.ads (Compiler_Unit): New flag.
7278         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
7279         for null statement sequence (not allowed in compiler unit).
7280         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
7281         parsing.
7282         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
7283         calling sequence.
7284         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
7285         Check_Compiler_Unit.
7286         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
7287         Check_Compiler_Unit (this construct is not allowed in compiler
7288         units).
7289         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
7290         Set Opt.Compiler_Unit.
7292 2014-06-13  Geert Bosch  <bosch@adacore.com>
7294         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
7295         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
7296         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
7298 2014-06-13  Robert Dewar  <dewar@adacore.com>
7300         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
7302 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7304         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
7305         types in SPARK as it is poorly placed and poorly formulated. The
7306         check was flagging ALL volatile entities as illegal in SPARK.
7307         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
7308         types as illegal in SPARK.
7310 2014-06-13  Robert Dewar  <dewar@adacore.com>
7312         * sem_cat.adb: Minor reformatting.
7314 2014-06-13  Yannick Moy  <moy@adacore.com>
7316         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
7318 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
7320         * gnat_rm.texi: Add detail on SPARK_05 restriction.
7322 2014-06-13  Bob Duff  <duff@adacore.com>
7324         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
7325         Add assertions requiring the secondary stack to be initialized.
7326         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
7327         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
7328         secondary stack is initialized before calling Init_Tasking_Soft_Links,
7329         by adding pragmas Elaborate_Body.
7331 2014-06-13  Thomas Quinot  <quinot@adacore.com>
7333         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
7334         kludge disabling new legality check.
7336 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7338         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
7339         volatile types.
7340         (Freeze_Type): Volatile types are now illegal in SPARK.
7342 2014-06-13  Robert Dewar  <dewar@adacore.com>
7344         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
7345         * gnat_rm.texi: Document aspect Thread_Local_Storage.
7347 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7349         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
7350         value is a temporary that renames an aggregate is legal in a
7351         preelaborated unit. Illegalities, if any will be detected in
7352         the aggregate components.
7354 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7356         * einfo.ads: Minor reformatting an comment expansion.
7358 2014-06-13  Robert Dewar  <dewar@adacore.com>
7360         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
7361         Tbuild.
7362         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
7363         Back_End.
7364         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
7365         * sem_warn.adb: Minor reformatting.
7367 2014-06-13  Doug Rupp  <rupp@adacore.com>
7369         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
7370         files with rfm=udf.
7372 2014-06-13  Yannick Moy  <moy@adacore.com>
7374         * sem_warn.adb (Check_Unset_References): Take
7375         case of Refined_Post into account in Within_Postcondition check.
7377 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7379         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
7380         SPARK.
7382 2014-06-13  Yannick Moy  <moy@adacore.com>
7384         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
7385         Aspect_Export): Consider that variables may be set outside the program.
7387 2014-06-13  Robert Dewar  <dewar@adacore.com>
7389         * back_end.adb (Make_Id): New function.
7390         (Make_SC): New function.
7391         (Set_RND): New procedure.
7392         * back_end.ads (Make_Id): New function.
7393         (Make_SC): New function.
7394         (Set_RND): New procedure.
7395         * einfo.ads: Minor comment updates.
7396         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
7397         * gnat1drv.adb (Gnat1drv): New calling sequence for
7398         Get_Target_Parameters.
7399         (Gnat1drv): Move Atree.Initialize here from Frontend.
7400         * targparm.adb (Get_Target_Parameters): New calling
7401         sequence (Get_Target_Parameters): Handle pragma Restriction
7402         (No_Dependence,..)
7403         * targparm.ads (Get_Target_Parameters): New calling sequence.
7405 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
7407         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
7408         loop if the pragma does not come from source, so that an implicit
7409         pragma Import only applies to the first declaration, avoiding
7410         possible conflicts with earlier explicit and implicit declarations
7411         due to multiple Provide_Shift_Operators pragmas.
7412         (Set_Imported): Remove previous fix that bypassed pragma duplication
7413         error.
7414         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
7415         of Provide_Shift_Operators.
7417 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
7419         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
7420         string pointer directly to set_decl_section_name.
7422 2014-06-11  Robert Dewar  <dewar@adacore.com>
7424         * sem_ch13.adb: Minor reformatting.
7426 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7428         * sem_prag.adb (Check_Clause_Syntax): Add new
7429         local variable Outputs. Account for the case where multiple
7430         output items appear as an aggregate.
7432 2014-06-11  Robert Dewar  <dewar@adacore.com>
7434         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7435         with ?j? not ??.
7437 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7439         * einfo.ads: Minor reformatting.
7441 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7443         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7444         new variable First_Node. Update the position after all insertions have
7445         taken place to First_Node.
7447 2014-06-11  Robert Dewar  <dewar@adacore.com>
7449         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7450         * layout.adb (Layout_Type): Remove test of -gnatd.1.
7452 2014-06-11  Robert Dewar  <dewar@adacore.com>
7454         * sem_ch13.adb: Minor reformatting.
7456 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7458         * sem_prag.adb (Check_Clause_Syntax): Add new
7459         local variable Outputs. Account for the case where multiple
7460         output items appear as an aggregate.
7462 2014-06-11  Robert Dewar  <dewar@adacore.com>
7464         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7465         with ?j? not ??.
7467 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7469         * einfo.ads: Minor reformatting.
7471 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7473         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7474         new variable First_Node. Update the position after all insertions have
7475         taken place to First_Node.
7477 2014-06-11  Robert Dewar  <dewar@adacore.com>
7479         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7480         * layout.adb (Layout_Type): Remove test of -gnatd.1.
7482 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7484         * freeze.ads: Minor reformatting.
7485         * checks.adb (Determine_Range): Do not attempt to determine
7486         the range of a deferred constant whose full view has not been
7487         seen yet.
7488         * sem_res.adb (Resolve): Remove undesirable guard against
7489         resolving expressions from expression functions.
7491 2014-06-11  Robert Dewar  <dewar@adacore.com>
7493         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
7494         access types.
7495         * layout.adb (Layout_Type): Make anonymous access types for
7496         subprogram formal types and return types always thin. For now
7497         only enabled if -gnatd.1 set.
7499 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7501         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7502         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
7503         subprogram must be a null procedure.
7505 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7507         * sem_prag.adb (Analyze_Input_Item): Allow formal
7508         parameters to appear as input_items in an initialization_list
7509         of pragma Initializes. Encapsulation now applies to states and
7510         variables only (as it should). Add RM references to key errors.
7511         * sem_prag.adb (Set_Imported): Suppress errors
7512         about preceding Imports when the pragma does not come from source,
7513         which can happen through use of pragma Provide_Shift_Operators.
7515 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7517         * sem_ch3.adb: Minor reformatting.
7518         * einfo.ads (Full_View): Minor comment update.
7520 2014-06-11  Robert Dewar  <dewar@adacore.com>
7522         * einfo.adb (Is_Independent): New flag.
7523         * einfo.ads (Is_Independent): New flag.
7524         (Has_Independent_Components): Clean up and fix comments.
7525         * sem_prag.adb (Fix_Error): Deal with changing argument
7526         [of] to entity [for].
7527         (Analyze_Pragma, case Independent): Set Is_Independent flag
7528         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7529         in all components of specified record.
7531 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7533         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7534         Set proper Etype on bounds of dummy type created for analysis
7535         of the generic.
7537 2014-06-11  Robert Dewar  <dewar@adacore.com>
7539         * debug.adb: Minor comment fix (add missing section of dot
7540         numeric flags).
7542 2014-06-11  Robert Dewar  <dewar@adacore.com>
7544         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
7545         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
7546         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
7547         * errout.adb (Output_Messages): Avoid duplicate output for
7548         library level instance.
7549         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
7550         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
7551         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
7552         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
7553         accomodate largest modulus value.
7554         * gnat_ugn.texi: Minor updates.
7556 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7558         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
7559         load body of generic package or its parent, if body is optional
7560         and the unit does not require a body.
7562 2014-06-11  Robert Dewar  <dewar@adacore.com>
7564         * gnat_rm.texi: Document System.Unsigned_Types.
7565         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
7566         * s-unstyp.ads: Update comments (this is now user available unit).
7568 2014-06-11  Robert Dewar  <dewar@adacore.com>
7570         * make.adb, sem_res.adb: Minor reformatting.
7572 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7574         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
7575         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
7576         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
7577         Preelaborate_05 to just Preelaborate in runtime units, and similarly
7578         change Pure_05 to just Pure.
7580 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7582         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
7583         analysis if error has been posted on subprogram body.
7585 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7587         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7588         rule given in RM 13.1 (8/1) for operational attributes to stream
7589         attributes: the attribute must apply to a first subtype. Fixes
7590         missing errors in ACATS test bdd2004.
7592 2014-06-11  Robert Dewar  <dewar@adacore.com>
7594         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
7595         record type if restriction No_Implicit_Conditionals is active.
7596         (Expand_N_Object_Declaration): Don't allow default initialization
7597         for variant record type if restriction No_Implicit_Condition is active.
7598         (Build_Variant_Record_Equality): Don't build for variant
7599         record type if restriction No_Implicit_Conditionals is active.
7600         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
7601         No_Implicit_Conditionals.
7602         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
7604 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
7606         * i-cstrin.ads: Update comments.
7608 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7610         * sem_res.adb (Resolve_Selected_Component): Handle properly a
7611         selected component whose prefix is overloaded, when none of the
7612         interpretations matches the expected type.
7614 2014-06-11  Bob Duff  <duff@adacore.com>
7616         * make.adb (Wait_For_Available_Slot): Give a more
7617         informative error message; if the ALI file is not found, print
7618         the full path of what it's looking for.
7620 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
7622         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
7623         option to specify the result file encoding.
7625 2014-06-11  Robert Dewar  <dewar@adacore.com>
7627         * errout.ads, sem_ch12.adb: Minor reformatting.
7628         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
7629         * lib-xref.adb: Minor reformatting.
7630         * restrict.adb: Minor code reorganization (put routines in
7631         alpha order).
7633 2014-06-11  Yannick Moy  <moy@adacore.com>
7635         * einfo.ads: Minor typo in comment
7637 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7639         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
7640         formal private types and private type extensions, to indicate
7641         variable in a generic unit whose uninitialized use suggest that
7642         actual type should be fully initialized.
7643         Needs_Initialized_Actual:  removed, functionaity replaced by
7644         the above.
7645         * lib-xref.adb (Generate_Reference): Generate a reference for
7646         variables of a formal type when the unit is not the main unit,
7647         to enable appropriate warnings in an instance.
7648         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
7649         of variable in a generic unit that suggests that actual type
7650         should be full initialized.
7651         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
7652         and do not emot warning, which now only appears in an instance.
7654 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
7656         * gnat_ugn.texi: Fix minor typo.
7658 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7660         * sem_ch3.adb Add with and use clause for Sem_Ch10.
7661         (Analyze_Declarations): Code reformatting. Analyze the contract
7662         of a subprogram body stub at the end of the declarative region.
7663         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
7664         now a variable. Do not process the body if its contract is not
7665         available. Account for subprogram body stubs when extracting
7666         the corresponding spec.
7667         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
7668         on usage.
7669         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
7670         New routine.
7671         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
7672         Account for subprogram body stubs when extracting the
7673         corresponding spec.
7674         (Analyze_Global_In_Decl_List):
7675         Account for subprogram body stubs when extracting the
7676         corresponding spec.
7677         (Analyze_Refined_Depends_In_Decl_Part):
7678         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
7679         of the related body. Spec_Is now a variable. Account for
7680         subprogram body stubs when extracting the corresponding spec.
7681         (Analyze_Refined_Global_In_Decl_Part): Use
7682         Find_Related_Subprogram_Or_Body to retrieve the declaration
7683         of the related body. Spec_Is now a variable. Account for
7684         subprogram body stubs when extracting the corresponding spec.
7685         (Collect_Subprogram_Inputs_Output): Account for subprogram body
7686         stubs when extracting the corresponding spec.
7688 2014-06-11  Vincent Celier  <celier@adacore.com>
7690         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
7691         -lgnarl or -lgnat.
7693 2014-06-11  Robert Dewar  <dewar@adacore.com>
7695         * debug.adb: Add debug flag -gnatd.q.
7696         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
7697         -gnatd.q set.
7698         * styleg.adb (Check_Xtra_Parens): Message should be a style
7699         message.
7700         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
7701         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
7702         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
7703         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
7705 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
7707         * gnat_rm.texi: Revised chapter on Implementation Defined
7708         Characteristics.
7710 2014-06-11  Geert Bosch  <bosch@adacore.com>
7712         * s-exctab.adb: avoid race conditions in exception registration.
7714 2014-06-11  Robert Dewar  <dewar@adacore.com>
7716         * errout.adb (Warn_Insertion): New function.
7717         (Error_Msg): Use Warn_Insertion and Prescan_Message.
7718         (Error_Msg_Internal): Set Info field of error object.
7719         (Error_Msg_NEL): Use Prescan_Message.
7720         (Set_Msg_Text): Don't store info: at start of message.
7721         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
7722         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
7723         * errout.ads: Document new ?$? and >$> insertion sequences
7724         Document use of "(style)" and "info: "
7725         * erroutc.adb (dmsg): Print several missing fields
7726         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
7727         Deal with new tagging of info messages
7728         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
7729         Add field Info (Prescan_Message): New procedure, this procedure
7730         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
7731         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
7732         sem_elab.adb: Follow new rules for info message (info belongs
7733         only at the start of a message, and only in the first message,
7734         not in any of the continuations).
7735         * gnat_ugn.texi: Document full set of warning tags.
7737 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
7739         * sem_util.adb: Minor typo fix.
7741 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7743         * sem_warn.adb (Check_References): Do not emit spurious warnings
7744         on uninitialzed variable of a formal private type if variable
7745         is not read.
7747 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
7749         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
7750         set_decl_section_name accessor.
7752 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
7754         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
7755         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
7756         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
7758 2014-05-21  Robert Dewar  <dewar@adacore.com>
7760         * layout.adb: Minor reformatting.
7761         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
7762         dummy procedure ip.
7764 2014-05-21  Robert Dewar  <dewar@adacore.com>
7766         * restrict.ads (Implementation_Restriction): Add entry for
7767         No_Fixed_IO.
7768         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
7769         Ada.[Wide_[Wide_]Text_IO.
7770         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
7771         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
7772         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
7773         Wide_Wide_Value if restriction No_Fixed_IO is set.
7774         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
7776 2014-05-21  Robert Dewar  <dewar@adacore.com>
7778         * gnatcmd.adb: Minor error msg changes (no upper case letter
7779         at start).
7780         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
7781         reformatting.
7783 2014-05-21  Robert Dewar  <dewar@adacore.com>
7785         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
7786         via generic formals.
7787         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
7788         -gnatd.G is set.
7790 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7792         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
7793         more accurately describe that this subprogram needs to come into
7794         play also in cases where no byte swapping is involved, because
7795         it also takes care of some required shifts (left-justification
7796         of values).
7798 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7800         * freeze.adb (Check_Component_Storage_Order): Indicate whether
7801         a Scalar_Storage_Order attribute definition is present for the
7802         component's type.
7803         (Freeze_Record_Type): Suppress junk warnings
7804         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
7805         definitions.
7807 2014-05-21  Robert Dewar  <dewar@adacore.com>
7809         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
7810         to Kill_Elaboration_Checks.
7812 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7814         * layout.adb (Assoc_Add): Suppress the optimization of the (E
7815         - C1) + C2 case, when the expression type is unsigned and C1 <
7816         C2, to avoid creating a negative literal when folding.
7818 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7820         * freeze.adb (Freeze_Record_Type): Update the use of
7821         Is_SPARK_Volatile.
7822         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
7823         Is_SPARK_Volatile.
7824         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
7825         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
7826         of Is_SPARK_Volatile.
7827         (Analyze_Loop_Parameter_Specification):
7828         Update the use of Is_SPARK_Volatile.
7829         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
7830         formal parameter when its type is volatile.
7831         * sem_prag.adb (Analyze_Global_Item): Update the use of
7832         Is_SPARK_Volatile.
7833         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
7834         determines whether an entity is a volatile source SPARK object.
7835         * sem_util.adb (Has_Enabled_Property): Accout for external
7836         properties being set on objects other than abstract states
7837         and variables. An example would be a formal parameter.
7838         (Is_SPARK_Volatile): New routine.
7839         (Is_SPARK_Volatile_Object):
7840         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
7841         when checking entities and/or types.
7842         * sem_util.ads (Is_SPARK_Volatile): New routine.
7844 2014-05-21  Robert Dewar  <dewar@adacore.com>
7846         * sem_warn.adb: Minor fix to warning messages (use ?? instead
7847         of ?).
7849 2014-05-21  Vincent Celier  <celier@adacore.com>
7851         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
7852         switch --version and --help.
7854 2014-05-21  Robert Dewar  <dewar@adacore.com>
7856         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
7858 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7860         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
7861         iterator variable when the domain of iteration is a formal
7862         container and this is an element iterator.
7864 2014-05-21  Bob Duff  <duff@adacore.com>
7866         * sem_ch12.adb: Minor reformatting.
7868 2014-05-21  Robert Dewar  <dewar@adacore.com>
7870         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
7872 2014-05-21  Robert Dewar  <dewar@adacore.com>
7874         * sem_elab.adb: Minor reformatting.
7875         * s-taprop.ads: Minor comment fix.
7876         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
7877         Kill_Elaboration_Checks.
7878         * errout.adb, erroutc.adb: Minor reformatting.
7880 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7882         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
7883         component. No byte swapping occurs, but this procedure also takes
7884         care of appropriately justifying the argument.
7886 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
7888         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
7889         New routine.
7890         (Analyze_Subprogram_Body_Helper): Move the
7891         analysis of aspect specifications and the processing of the
7892         subprogram body contract after inlining has taken place.
7893         (Diagnose_Misplaced_Aspect_Specifications): Removed.
7895 2014-05-21  Javier Miranda  <miranda@adacore.com>
7897         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
7899 2014-05-21  Robert Dewar  <dewar@adacore.com>
7901         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
7902         continuations any more.
7904 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7906         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
7907         present in formal_Private_Definitions and on private extension
7908         declarations of a formal derived type. Set when the use of the
7909         formal type in a generic suggests that the actual should be a
7910         fully initialized type.
7911         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
7912         to indicate that an entity of a generic type has default
7913         initialization, and that the corresponing actual type in any
7914         subsequent instantiation should be fully initialized.
7915         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
7916         to emit a warning if the actual for a generic type on which
7917         Needs_Initialized_Actual is set is not a fully initialized type.
7919 2014-05-21  Robert Dewar  <dewar@adacore.com>
7921         * sem_elab.adb, prj-dect.adb: Minor reformatting.
7923 2014-05-21  Robert Dewar  <dewar@adacore.com>
7925         * erroutc.ads: Minor comment addition.
7927 2014-05-21  Robert Dewar  <dewar@adacore.com>
7929         * errout.ads: Add documentation for use of >*> tag.
7930         * restrict.adb: Make sure we use >*> tag for restriction warnings.
7932 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
7934         * debug.adb: Add case of illegal overriding_indicator for a
7935         protected subprogram body to description of -gnatd.E switch.
7936         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
7937         for cases of giving overriding_indicators on protected subprogram
7938         bodies, but change this to a warning if -gnatd.E is enabled. No
7939         longer give a style warning about missing indicators on protected
7940         subprogram bodies.
7942 2014-05-21  Robert Dewar  <dewar@adacore.com>
7944         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
7945         sem_elab.ads: Minor reformatting.
7946         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
7947         parameter optional.
7949 2014-05-21  Pascal Obry  <obry@adacore.com>
7951         * prj-dect.adb: Allow package Install in aggregate project.
7953 2014-05-21  Robert Dewar  <dewar@adacore.com>
7955         * sem_ch13.adb (Analyze_Aspect_Specifications):
7956         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
7957         * sem_prag.adb: Minor comment improvements.
7959 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
7961         * sem_ch12.adb (Install_Body): When checking whether freezing of
7962         instantiation must be delayed, verify that the common enclosing
7963         subprogram to generic and instance is in fact an overloadable
7964         entity.
7966 2014-05-21  Vincent Celier  <celier@adacore.com>
7968         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
7969         mains with the same name and fail if there is more than one.
7970         * prj.ads, prj.adb (Find_All_Sources): New function
7972 2014-05-21  Robert Dewar  <dewar@adacore.com>
7974         * sem_ch13.adb: Minor reformatting.
7975         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
7976         * sem_prag.adb: Minor error message improvement.
7978 2014-05-21  Yannick Moy  <moy@adacore.com>
7980         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
7981         (Enclosing_Subprogram_Or_Package): Only return a library-level
7982         package.
7984 2014-05-21  Javier Miranda  <miranda@adacore.com>
7986         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
7987         to the full view of the parent type when processing a derived type
7988         which is the full view of a private type not defined in a generic
7989         unit which is derived from a private type with discriminants
7990         whose full view is a non-tagged record type.
7992 2014-05-21  Javier Miranda  <miranda@adacore.com>
7994         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
7995         Complete previous patch.
7997 2014-05-21  Thomas Quinot  <quinot@adacore.com>
7999         PR ada/9535
8000         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
8001         Provide a behaviour more consistent with underlying datagram
8002         socket: do not attempt to loop over Send_Socket/Receive_Socket
8003         iterating along the buffer.
8005 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
8007         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
8008         or a tagged type is not labelled as volatile. Ensure that a
8009         non-volatile type has no volatile components.
8010         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
8011         Obj_Typ. Code reformatting.  Ensure that a discriminated or
8012         tagged object is not labelled as volatile.
8013         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
8014         pragma Volatile applies to a full type declaration or an object
8015         declaration when SPARK mode is on.
8017 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
8019         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
8020         providing options needed for compiling the argument source for
8021         the situation when a project file can be used as a tool parameter.
8023 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
8025         * gnat_rm.texi: Minor typo fix.
8027 2014-05-21  Robert Dewar  <dewar@adacore.com>
8029         * stand.adb (Tree_Read): Read missing entities.
8030         (Tree_Write): Write missing entities.
8032 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
8034         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
8035         section in gnatmetric chapter.
8037 2014-05-21  Robert Dewar  <dewar@adacore.com>
8039         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
8040         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
8041         post-call copy write back (see detailed comment in code).
8042         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
8043         Exp_Ch6.
8044         * tbuild.ads: Minor reformatting.
8046 2014-05-21  Robert Dewar  <dewar@adacore.com>
8048         * stand.ads: Add warning about adding new entities and
8049         Tree_Read/Tree_Write.
8051 2014-05-21  Robert Dewar  <dewar@adacore.com>
8053         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
8054         references to restricted entities within the units in which they
8055         are declared.
8057 2014-05-21  Robert Dewar  <dewar@adacore.com>
8059         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
8060         simplify the needed test, and also deal with failure to catch
8061         situations with non-standard names.
8062         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
8063         (Source_File_Is_Subunit): Removed, no longer used.
8065 2014-05-21  Javier Miranda  <miranda@adacore.com>
8067         * exp_ch4.adb
8068         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
8069         renaming of an access to interface object there is no need to
8070         generate extra code to reference the tag.
8072 2014-05-21  Robert Dewar  <dewar@adacore.com>
8074         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
8075         Warnings (Off, string).
8077 2014-05-21  Robert Dewar  <dewar@adacore.com>
8079         * osint.adb: Fix three error messages to say invalid instead
8080         of erroneous.
8081         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
8082         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
8083         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
8085 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8087         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
8088         sem_ch9.ads: Move discriminant manipulation routines for analysis of
8089         aspect specifications from sem_ch9 to sem_ch13, where they belong.
8091 2014-05-21  Robert Dewar  <dewar@adacore.com>
8093         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
8094         Clearly document -gnatyg (GNAT style switches).
8095         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
8096         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
8097         available for VMS after all.
8098         * warnsw.adb: Reorganize to eliminate duplicated code
8099         (Restore_Warnings): Add a couple of missing entries
8100         (Save_Warnings): Add a couple of missing entries.
8101         * warnsw.ads: Add missing entries to Warning_Record (not clear
8102         what the impact is).
8104 2014-05-21  Robert Dewar  <dewar@adacore.com>
8106         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
8107         warning) case.
8108         * errout.ads: Document ?*? (restriction warning) insertion.
8109         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
8110         warning) case.
8111         * erroutc.ads: Document use of * for restriction warning tag.
8112         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
8114 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8116         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
8117         make discriminants immediately visible when analyzing an aspect
8118         of a subtype declaration.
8119         (Uninstall_Discriminants): Do not apply to the entity in a
8120         subtype declaration.
8122 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8124         * sem_util.adb: Code clean up.
8126 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
8128         * gnat_ugn.texi: Document -Werror.
8130 2014-05-21  Bob Duff  <duff@adacore.com>
8132         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
8133         This was returning False if the Object is a constant view. Fix
8134         it to return True in that case, because it might be a view of
8135         a variable.
8136         (Has_Discriminant_Dependent_Constraint): Fix latent
8137         bug; this function was crashing when passed a discriminant.
8139 2014-05-21  Robert Dewar  <dewar@adacore.com>
8141         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
8142         * s-arit64.adb: Minor code reorganization.
8143         * sem_prag.adb: Minor comment fix (remove erroneous use of the
8144         term erroneous).
8146 2014-05-21  Robert Dewar  <dewar@adacore.com>
8148         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
8149         computing new table size.
8151 2014-05-21  Robert Dewar  <dewar@adacore.com>
8153         * einfo.ads: Minor reformatting.
8154         * ceinfo.adb: Deal with slight format change of einfo.ads.
8156 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8158         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
8159         implementation of the SPARK 2014 rule concerning private child
8160         units (LRM 7.2.6).
8162 2014-05-21  Vincent Celier  <celier@adacore.com>
8164         * makeusg.adb: Add switch -d to usage.
8166 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8168         * sem_util.adb (Find_Actual): If an actual that is the prefix
8169         of an enclosing prefixed call has been rewritten, use Nkind
8170         and Sloc to identify the corresponding formal, when handling
8171         deferred references.
8173 2014-05-21  Robert Dewar  <dewar@adacore.com>
8175         * debug.adb: Document -gnatd.z switch.
8176         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
8178 2014-05-21  Robert Dewar  <dewar@adacore.com>
8180         * einfo.ads (Can_Never_Be_Null): Minor comment update.
8181         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
8182         error message change.
8183         * s-arit64.adb ("abs"): New function. Use expression functions
8184         for the simple conversions and arithmetic.
8186 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8188         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
8189         set function_start_locus.
8191 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8193         * utils.c (gnat_write_global_declarations): Adjust the flags put on
8194         dummy_global.
8196 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8198         * gcc-interface/decl.c (change_qualified_type): New static function.
8199         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
8200         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
8201         <E_Array_Subtype>: Likewise.
8202         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
8203         (gnat_to_gnu_component_type): Likewise.
8204         (gnat_to_gnu_param): Likewise.
8206 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8208         * fe.h (Set_Present_Expr): Move around.
8209         (End_Location): New macro.
8210         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
8212 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8214         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
8215         lieu of more verbose construct.
8216         * gcc-interface/trans.c (Call_to_gnu): Likewise.
8217         (gnat_to_gnu): Likewise.  Remove obsolete code.
8219 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8221         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
8222         consider that regular packed arrays can never be superflat.
8224 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
8226         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
8227         annotation.
8228         * gcc-interface/decl.c (annotate_value): Adjust.
8229         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
8230         (push_range_check_info): Likewise.
8231         (Loop_Statement_to_gnu): Likewise.
8232         (Subprogram_Body_to_gnu): Likewise.
8233         (Compilation_Unit_to_gnu): Likewise.
8234         (start_stmt_group): Likewise.
8235         * gcc-interface/utils.c (init_gnat_utils): Likewise.
8236         (gnat_pushlevel): Likewise.
8237         (maybe_pad_type): Likewise.
8239 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
8241         * seh_init.c: Fix copyright year.
8243 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8245         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
8246         are defined.  Move include windows.h before system.h.
8247         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
8248         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
8250 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
8252         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
8253         to the appropriate type.
8254         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
8255         (pos_to_constructor): Likewise.
8257 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
8259         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
8261 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
8262             Mike Stump  <mikestump@comcast.net>
8263             Richard Sandiford  <rdsandiford@googlemail.com>
8265         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
8266         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
8267         (annotate_value): Use wide-int interfaces.
8268         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
8270 2014-04-28  Richard Henderson  <rth@redhat.com>
8272         * gcc-interface/Makefile.in: Support aarch64-linux.
8274 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
8276         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
8277         add 'Suffix' parameter and adjust comment.
8278         (Get_External_Name_With_Suffix): Delete.
8279         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
8280         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
8281         'Suffix' parameter.
8282         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
8283         Call Get_External_Name instead of Get_External_Name_With_Suffix.
8284         (Get_Secondary_DT_External_Name): Likewise.
8285         * exp_cg.adb (Write_Call_Info): Likewise.
8286         * exp_disp.adb (Export_DT): Likewise.
8287         (Import_DT): Likewise.
8288         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
8289         parameter with False default.
8290         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
8291         * types.h (Fat_Pointer): Rename into...
8292         (String_Pointer): ...this.  Add comment on interfacing rules.
8293         * fe.h (Compiler_Abort): Adjust for above renaming.
8294         (Error_Msg_N): Likewise.
8295         (Error_Msg_NE): Likewise.
8296         (Get_External_Name): Likewise.  Add third parameter.
8297         (Get_External_Name_With_Suffix): Delete.
8298         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
8299         (create_concat_name): Adjust call to Get_External_Name, remove call to
8300         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
8301         * gcc-interface/trans.c (post_error): Likewise.
8302         (post_error_ne): Likewise.
8303         * gcc-interface/misc.c (internal_error_function): Likewise.
8305 2014-04-28  Richard Biener  <rguenther@suse.de>
8307         PR middle-end/60092
8308         * gcc-interface/utils.c: Define flag_isoc11.
8310 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
8312         * gnatvsn.ads (Library_Version): Bump to 4.10.
8314 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8316         Revert
8317         2014-04-22  Richard Henderson  <rth@redhat.com>
8319         * gcc-interface/Makefile.in: Support aarch64-linux.
8321         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8323         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8324         (Error_Msg_N): Likewise.
8325         (Error_Msg_NE): Likewise.
8326         (Get_External_Name_With_Suffix): Likewise.
8327         * types.h (Fat_Pointer): Delete.
8328         (String_Pointer): New type.
8329         (DECLARE_STRING_POINTER): New macro.
8330         * gcc-interface/decl.c (create_concat_name): Adjust.
8331         * gcc-interface/trans.c (post_error): Likewise.
8332         (post_error_ne): Likewise.
8333         * gcc-interface/misc.c (internal_error_function): Likewise.
8335 2014-04-22  Richard Henderson  <rth@redhat.com>
8337         * gcc-interface/Makefile.in: Support aarch64-linux.
8339         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
8340         (__gnat_alternate_stack): Enable for all linux except ia64.
8342 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8344         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8345         (Error_Msg_N): Likewise.
8346         (Error_Msg_NE): Likewise.
8347         (Get_External_Name_With_Suffix): Likewise.
8348         * types.h (Fat_Pointer): Delete.
8349         (String_Pointer): New type.
8350         (DECLARE_STRING_POINTER): New macro.
8351         * gcc-interface/decl.c (create_concat_name): Adjust.
8352         * gcc-interface/trans.c (post_error): Likewise.
8353         (post_error_ne): Likewise.
8354         * gcc-interface/misc.c (internal_error_function): Likewise.
8356 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8357             Pierre-Marie de Rodat  <derodat@adacore.com>
8359         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
8360         scalar constant instead of a reference for renaming of scalar literal.
8361         Do not create a new object for constant renaming except for a function
8362         call.  Make sure a VAR_DECL is created for the renaming pointer.
8363         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
8364         (fold_constant_decl_in_expr): New function.
8365         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
8366         For a constant renaming, try to fold a constant DECL in the result.
8367         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
8368         (Identifier_to_gnu): Reference the renamed object of constant renaming
8369         pointers directly.
8370         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
8371         invalidate constant renaming pointers.
8373 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8375         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
8376         (build_vector_type_for_size): New function.
8377         (build_vector_type_for_array): Likewise.
8378         (unchecked_convert): Build an intermediate vector type to convert
8379         from a generic array type to a vector type.
8380         (handle_vector_size_attribute): Reimplement.
8381         (handle_vector_type_attribute): Likewise.
8383 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8385         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
8386         Is_OK_Static_Expression in lieu of Is_Static_Expression to
8387         detect valid arguments.
8389 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8391         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
8393 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
8395         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
8396         (components_to_record): Likewise.
8397         * gcc-interface/utils.c (make_aligning_type): Likewise.
8398         (maybe_pad_type): Likewise.
8399         (finish_record_type): Likewise.
8400         (rest_of_record_type_compilation): Likewise.
8402 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8404         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
8405         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
8406         for Ivdep hint.
8407         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
8408         hint for Loop_Optimize.
8409         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
8410         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8411         with new Ivdep hint.
8412         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
8413         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8414         with new Ivdep hint.
8415         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
8417 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8418             Robert Dewar  <dewar@adacore.com>
8420         * opt.ads (Suppress_Back_Annotation): Remove as unused.
8421         * fe.h (Back_Annotate_Rep_Info): Likewise.
8422         (Global_Discard_Names): Likewise.
8423         (List_Representation_Info): Declare.
8424         * types.h (Uint_Minus_1): Likewise.
8425         * repinfo.ads: Document back-annotation change.
8426         * gcc-interface/gigi.h (init_gnat_decl): Declare.
8427         (destroy_gnat_decl): Likewise.
8428         * gcc-interface/decl.c (annotate_value): Do not create the cache of
8429         annotated values here but...
8430         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
8431         in ASIS mode.
8432         (init_gnat_decl): ...here instead.  New function.
8433         (destroy_gnat_decl): Likewise.
8434         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
8435         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
8437 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8439         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
8440         offset for the field, if any.
8442 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
8443             Svante Signell  <svante.signell@gmail.com>
8445         PR ada/54040
8446         PR ada/59346
8447         * s-osinte-x32.adb: New file.
8448         * s-linux.ads (Time): New section.
8449         * s-linux-alpha.ads (Time): Likewise.
8450         * s-linux-android.ads (Time: Likewise.
8451         * s-linux-hppa.ads (Time): Likewise.
8452         * s-linux-mipsel.ads (Time): Likewise.
8453         * s-linux-sparc.ads (Time): Likewise.
8454         * s-linux-x32.ads (Time): Likewise.
8455         * s-osprim-x32.ads (timespec): Adjust.
8456         (Clock): Likewise.
8457         (To_Timespec): Likewise.
8458         * s-osinte-linux.ads (Time): Define local subtypes for those defined
8459         in System.Linux.
8460         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
8461         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
8462         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
8463         * s-osinte-solaris-posix.ads (timespec): Likewise.
8464         * s-osinte-posix.adb (To_Timespec): Likewise.
8465         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
8467 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8469         PR ada/60411
8470         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
8471         * s-linux-android.ads: New file.
8472         * s-intman-android.adb: Likewise.
8473         * s-osinte-android.ads: Adjust.
8474         * sigtramp-armdroid.c: Likewise.
8475         * sigtramp.h: Add Android support.
8477 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
8479         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
8481 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
8483         PR ada/60703
8484         * system-linux-alpha.ads: Adjust for Ada 2005.
8485         * system-linux-mips.ads: Likewise.
8486         * system-linux-mips64el.ads: Likewise.
8487         * system-linux-mipsel.ads: Likewise.
8488         * system-linux-s390.ads: Likewise.
8489         * system-linux-s390x.ads: Likewise.
8490         * system-linux-sparc.ads: Likewise.
8491         * system-linux-sparcv9.ads: Likewise.
8492         * system-rtems.ads: Likewise.
8493         * system-vxworks-arm.ads: Likewise.
8495 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
8497         PR ada/39172
8498         * gcc-interface/Makefile.in (target_cpu_default): Revert
8499         2013-10-11 change.
8501 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8503         PR ada/51483
8504         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
8505         it to set the RM size.  Use directly 'size' for the Esize.
8506         (Create_Back_End_Float_Types): Adjust call to above.
8507         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8508         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8509         (Write_Target_Dependent_Values): Adjust comment.
8510         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8511         deal with it.
8512         (Write_Target_Dependent_Values): Write the precision in lieu of size.
8513         (Initialization): Read the precision in lieu of size and compute the
8514         size from the precision and the alignment.
8515         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8516         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
8517         types for vector modes, pass the size in addition to the precision.
8519 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
8521         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8523 2014-03-07  Doug Rupp  <rupp@adacore.com>
8525         PR ada/60411
8526         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8527         (Support_64_Bit_Divides): Removed, no longer used.
8528         (ZCX_By_Default): Enabled.
8530 2014-02-25  Doug Rupp  <rupp@adacore.com>
8532         * gcc-interface/Makefile.in (arm-linux):
8533         (EH_MECHANISM): Use ARM unwinder (-arm)
8534         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8535         s-excmac-arm.ads.
8536         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8537         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8538         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8539         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8540         Add dependencies for sigtramp-armvxw.o.
8542 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8544         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
8546 2014-02-25  Robert Dewar  <dewar@adacore.com>
8548         * rtsfind.adb (Is_RTE): Protect against entity with no scope
8549         field (previously this call blew up on the Standard entity).
8550         * sem_attr.adb (Analyze_Attribute, case Access): Remove
8551         test for No_Abort_Statements, this is now handled in
8552         Set_Entity_With_Checks.
8553         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
8554         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
8555         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
8556         Set_Entity_With_Checks.
8557         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
8558         Add checks for No_Abort_Statements.
8560 2014-02-25  Robert Dewar  <dewar@adacore.com>
8562         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
8563         Check_Restriction is OK.
8565 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8567         * sem_ch3.adb (Process_Full_View): Better error message when
8568         the full view of  a private type without discriminants is an
8569         unconstrained type.
8570         * sem_ch7.adb (Uninstall_Declarations): Ditto.
8572 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8574         * sigtramp-armvxw.c: Also restore r0.
8576 2014-02-25  Robert Dewar  <dewar@adacore.com>
8578         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
8579         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
8580         set unconditionally.
8581         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
8582         any more (Output_Msg_Text): Rewritten with new convention on
8583         output of warnings that are treated as errors.
8584         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
8585         if Warn is False.
8586         * gnat_rm.texi: Updates to documentation on pragma
8587         Warning_As_Error.
8588         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
8589         set Warning_Doc_Switch.
8590         * lib-writ.ads: Add documentation note on ALI file generation
8591         for C.
8592         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
8593         (belongs in Sem).
8594         * sem_attr.adb (Resolve_Attribute, case Access):
8595         Abort_Task'Access violates the No_Abort_Statements restriction.
8596         * sem_res.adb (Resolve_Call): Check restriction
8597         No_Abort_Statements for call to Abort_Task or a renaming of it.
8599 2014-02-25  Robert Dewar  <dewar@adacore.com>
8601         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
8602         type name as index.
8603         * lib.ads: Minor reformatting.
8604         * einfo.ads: Minor reformatting.
8606 2014-02-25  Doug Rupp  <rupp@adacore.com>
8608         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
8609         use Short_Descriptor(S) as the argument passing mechanism.
8611 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8613         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
8615 2014-02-25  Robert Dewar  <dewar@adacore.com>
8617         * atree.ads (Warnings_Treated_As_Errors): New variable.
8618         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
8619         error object (Initialize): Initialize Warnings_As_Errors_Count
8620         (Write_Error_Summary): Include count of warnings treated as errors.
8621         * erroutc.adb (Warning_Treated_As_Error): New function.
8622         (Matches): Function moved to outer level of package.
8623         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
8624         (Warning_Treated_As_Error): New function.
8625         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
8626         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
8627         * opt.ads (Config_Switches_Type): Add entry for
8628         Warnings_As_Errors_Count.
8629         (Warnings_As_Errors_Count): New variable.
8630         (Warnings_As_Errors): New array.
8631         * par-prag.adb: Add dummy entry for Warning_As_Error.
8632         * sem_prag.adb (Analyze_Pragma): Implement new pragma
8633         Warning_As_Error.
8634         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
8636 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8638         * sigtramp.h: Fix minor inaccuracy.
8640 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
8642         * gnat_ugn.texi: Added description of kill command.
8644 2014-02-25  Robert Dewar  <dewar@adacore.com>
8646         * gnat_rm.texi (Address_Clauses): Add a section discussing the
8647         problem of address clauses causing unexpected initialization,
8648         including the effect of Initialize_Scalars.
8650 2014-02-25  Robert Dewar  <dewar@adacore.com>
8652         * errout.adb: Various changes for better msgs for anonmous access
8653         subprogram types.
8654         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
8655         argument.
8656         (Buffer_Remove): Version with character argument.
8657         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
8658         of mismatching conventions for access-to-subprogram case.
8659         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
8660         access types in record.
8661         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
8662         types, including in records.
8664 2014-02-25  Doug Rupp  <rupp@adacore.com>
8666         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
8667         enhancements and corrections.
8669 2014-02-25  Robert Dewar  <dewar@adacore.com>
8671         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
8673 2014-02-25  Robert Dewar  <dewar@adacore.com>
8675         * gnat_rm.texi: First set of documentation additions for
8676         predefined RM units.
8677         * checks.adb: Minor reformatting.
8678         * sem_elab.adb (Check_Task_Activation): Minor fix to error
8679         message.
8680         * sem_util.adb: Minor reformatting.
8682 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
8684         * usage.adb (Usage): Add help on -gnateC.
8685         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
8686         * opt.ads (Generate_CodePeer_Messages): New flag.
8687         * gnat_ugn.texi: Document new switch -gnateC.
8689 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
8691         * gnat_rm.texi: Corrected minor typos in Implementation Defined
8692         Aspects.
8693         * opt.ads: Minor reformatting.
8695 2014-02-25  Robert Dewar  <dewar@adacore.com>
8697         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
8698         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
8699         of -gnatel/-gnateL.
8700         * opt.ads (Warn_Info_Messages): New flag.
8701         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
8702         messages.
8703         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
8704         messages.
8705         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
8706         * usage.adb: Add documentation of -gnatel/-gnateL Update
8707         documentation of -gnatwl/-gnatwL.
8708         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
8709         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
8711 2014-02-25  Robert Dewar  <dewar@adacore.com>
8713         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
8714         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
8715         * interfac.ads: Minor code reorganization (add pragma
8716         Compiler_Unit_Warning).
8717         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
8718         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
8719         Has_Shift_Operator flag.
8720         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
8721         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
8722         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
8723         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
8724         Add entry for Name_Amount.
8725         * checks.adb (Selected_Range_Checks): When checking for a null
8726         range, make sure we use the base type, and not the subtype for
8727         deciding a range is null.
8728         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
8729         for suspicious loop bound which is outside the range of the
8730         loop subtype.
8731         * gnat_ugn.texi: Add documentation section "Determining the
8732         Chosen Elaboration Order"
8733         * sem_ch13.adb (UC_Entry): Add field Act_Unit
8734         (Validate_Unchecked_Conversion): Store Act_Unit
8735         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
8736         * treepr.adb: Minor reformatting.
8738 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
8740         * usage.adb: Minor: fix typo.
8742 2014-02-25  Robert Dewar  <dewar@adacore.com>
8744         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
8745         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
8746         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
8747         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
8748         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
8749         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
8750         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
8751         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
8752         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
8753         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
8754         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
8755         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
8756         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
8757         Compiler_Unit_Warning, change Compiler_Unit everywhere to
8758         Compiler_Unit_Warning.
8760 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
8762         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
8763         in ASIS mode aggregates that are used as aspect definitions.
8765 2014-02-25  Robert Dewar  <dewar@adacore.com>
8767         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
8768         reformatting.
8770 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8772         * freeze.adb (Freeze_Entity): If the return type of a function
8773         is a limited view, and the non-limited view has not been seen yet,
8774         defer freezing to some later point.
8776 2014-02-25  Robert Dewar  <dewar@adacore.com>
8778         * sem_ch3.adb: Minor reformatting.
8780 2014-02-25  Robert Dewar  <dewar@adacore.com>
8782         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
8783         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
8784         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
8785         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
8786         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
8787         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
8788         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
8789         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
8790         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
8791         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
8792         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
8793         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
8794         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
8795         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
8796         snames.ads-tmpl: Change Compiler_Unit everywhere to
8797         Compiler_Unit_Warning.
8799 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8801         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
8802         (Collect_Body_Postconditions_In_Decls): New routine.
8803         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
8804         postcondition aspects or pragmas that appear on a subprogram
8805         body stub.
8806         (Collect_Spec_Preconditions): Factor out code. Handle
8807         precondition aspects or pragmas that appear on a subprogram
8808         body stub.
8809         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
8810         aspects that apply to a subprogram body stub is no longer delayed,
8811         the aspects are analyzed on the spot.
8812         (SPARK_Aspect_Error):
8813         Aspects that apply to a subprogram declaration cannot appear in
8814         a subunit.
8815         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
8816         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
8817         is now a local variable. Code cleanup. Analysis related to
8818         the aspects of a subprogram body stub is now carried out by
8819         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
8820         and/or pragmas of a subprogram body stub to the proper body
8821         as this is no longer needed. Do not analyze the aspects of a
8822         subprogram stub when the corresponding source unit is missing.
8823         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
8824         on a stub.
8825         (Analyze_Task_Body_Stub): Flag the illegal use of
8826         aspects on a stub.
8827         (Optional_Subunit): Add local variable Unum.
8828         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
8829         pragma when it applies to a subprogram body stub.
8830         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
8831         Depends and Global can now apply to a subprogram body stub as
8832         long as it acts as its own spec.
8833         (Analyze_Refined_Pragma):
8834         Code reformatting. Refinement pragmas cannot apply to a subunit.
8836 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8838         * einfo.ads Update the usage of flag
8839         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
8840         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
8841         now starts with the letter 'C'. This makes reading expanded
8842         code easier.
8843         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
8844         Iter_Loop. Signal that an Ada 2012 iterator loop requires
8845         secondary stack management when creating a transient scope for
8846         an element reference.
8847         * exp_util.adb (Process_Statements_For_Controlled_Objects):
8848         When wrapping the statements of a loop, pass the E_Loop entity
8849         to the wrapping machinery.
8850         (Wrap_Statements_In_Block): Add
8851         formal parameter Scop along with comment on usage. Add local
8852         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
8853         block as requiring secondary stack management when the block is
8854         created inside an Ada 2012 iterator loop. This ensures that any
8855         reference objects are reclaimed on each iteration of the loop.
8856         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
8857         tasked with the handling of container iterators as requiring
8858         secondary stack management. This ensures that iterators are
8859         reclaimed when the loop terminates or is exited in any fashion.
8860         * sem_util.adb (Add_Block_Identifier): New routine.
8861         (Find_Enclosing_Iterator_Loop): New routine.
8862         * sem_util.ads (Add_Block_Identifier): New routine.
8863         (Find_Enclosing_Iterator_Loop): New routine.
8865 2014-02-25  Robert Dewar  <dewar@adacore.com>
8867         * sinfo.ads: Minor reformatting.
8869 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8871         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
8873 2014-02-25  Pascal Obry  <obry@adacore.com>
8875         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
8877 2014-02-25  Tristan Gingold  <gingold@adacore.com>
8879         * sem_ch10.adb: Minor comment fix.
8881 2014-02-25  Bob Duff  <duff@adacore.com>
8883         * s-tasdeb.adb: Misc cleanup of this package,
8884         including printing addresses in hexadecimal.
8885         (Write): Fix minor bug when taking 'Address of an empty string.
8887 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8889         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
8890         public child unit when it does not refer to the abstract state
8891         of a public ancestor.
8893 2014-02-25  Yannick Moy  <moy@adacore.com>
8895         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
8896         Validity_Checks in GNATprove and CodePeer modes.
8898 2014-02-25  Pascal Obry  <obry@adacore.com>
8900         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
8901         Artifacts attribute.
8903 2014-02-25  Yannick Moy  <moy@adacore.com>
8905         * sem_prag.adb: Minor reformatting to get consistent messages.
8907 2014-02-25  Robert Dewar  <dewar@adacore.com>
8909         * checks.adb: Minor reformatting.
8910         * sinfo.ads (Do_Range_Check): Document that this flag is never
8911         passed to the back end.
8913 2014-02-25  Yannick Moy  <moy@adacore.com>
8915         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
8916         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
8918 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8920         * sem_res.adb (Appears_In_Check): New routine.
8921         (Resolve_Entity_Name): Remove local variables Prev and
8922         Usage_OK. Par is now a constant. Remove the parent chain traversal
8923         as the placement of a volatile object with enabled property
8924         Async_Writers and/or Effective_Reads must appear immediately
8925         within a legal construct.
8927 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
8929         * checks.adb (Apply_Selected_Range_Checks):
8930         Alphabetize local constants and variables. Add comments.
8931         Always insert a range check that requires runtime evaluation into
8932         the tree.
8934 2014-02-25  Robert Dewar  <dewar@adacore.com>
8936         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
8938 2014-02-25  Bob Duff  <duff@adacore.com>
8940         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
8941         iterations while waiting for independent tasks to terminate;
8942         if an independent task does not terminate, we do not want to
8943         hang here. In that case, the thread will be terminated when the
8944         process exits.
8945         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
8947 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8949         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
8950         used to perform pre-analysis of the expression for SPARK
8951         aspects that have a non-standard syntax, such as GLobal and
8952         Initializes. The procedure applies to the original expression
8953         in an aspect specification, prior to the analysis of the
8954         corresponding pragma, in order to provide semantic information
8955         for ASIS navigation purposes.
8956         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
8957         Call new subprogram.
8959 2014-02-25  Yannick Moy  <moy@adacore.com>
8961         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
8963 2014-02-25  Doug Rupp  <rupp@adacore.com>
8965         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
8966         (__gnat_adjust_context_for_raise): Bump the PC by 2.
8968 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8970         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
8971         misplaced IS, add a statement sequence to improper body only if
8972         one has not been parsed already.
8974 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
8976         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
8977         mismatch when multidimensional array is updated with a single
8978         index.
8980 2014-02-25  Yannick Moy  <moy@adacore.com>
8982         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
8983         sem_ch6.adb: Mark most references to SPARK RM in error messages
8984         for removal.
8986 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
8988         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
8989         appears in a list of basic declarations, complete the tree with
8990         an empty statement list, to prevent cascaded errors and crashes
8991         if semantic analysis is attempted.
8993 2014-02-24  Thomas Quinot  <quinot@adacore.com>
8995         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
8996         value.
8997         * erroutc.adb: Minor reformatting.
8999 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9001         * sem_prag.adb (Check_Clause_Syntax): Account
9002         for a solitary input item in a dependency list.
9004 2014-02-24  Yannick Moy  <moy@adacore.com>
9006         * gnat1drv.adb (Adjust_Global_Switches): Do not
9007         use validity checks at all in GNATprove_Mode.
9009 2014-02-24  Robert Dewar  <dewar@adacore.com>
9011         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
9012         atree.adb, atree.ads: Minor reformatting.
9014 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9016         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
9017         global and dependence refinement when SPARK_Mode is off.
9018         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
9019         state refinement when SPARK_Mode is off.
9020         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
9021         variable Decl. Insert the generated pragma for Refined_State
9022         after a potential pragma SPARK_Mode.
9023         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
9024         constant Deps. Remove local variable Expr. Check the syntax
9025         of pragma Depends when SPARK_Mode is off. Factor out the
9026         processing for extra parenthesis around individual clauses.
9027         (Analyze_Global_In_Decl_List): Items is now a constant. Check
9028         the syntax of pragma Global when SPARK_Mode is off.
9029         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
9030         Initializes when SPARK_Mode is off.
9031         (Analyze_Part_Of): Check
9032         the syntax of the encapsulating state when SPARK_Mode is off.
9033         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
9034         SPARK_Mode is off. Move the declaration order check with respect
9035         to pragma Initializes to the end of the processing. Do not verify
9036         the declaration order for pragma Initial_Condition when SPARK_Mode
9037         is off. Do not complain about a useless package refinement when
9038         SPARK_Mode is off.
9039         (Analyze_Refined_Depends_In_Decl_Part): Refs
9040         is now a constant. Check the syntax of pragma Refined_Depends
9041         when SPARK_Mode is off.
9042         (Analyze_Refined_Global_In_Decl_Part):
9043         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
9044         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
9045         Refined_State when SPARK_Mode is off.
9046         (Check_Dependence_List_Syntax): New routine.
9047         (Check_Global_List_Syntax): New routine.
9048         (Check_Initialization_List_Syntax): New routine.
9049         (Check_Item_Syntax): New routine.
9050         (Check_State_Declaration_Syntax): New routine.
9051         (Check_Refinement_List_Syntax): New routine.
9052         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
9054 2014-02-24  Robert Dewar  <dewar@adacore.com>
9056         * a-tags.adb, s-os_lib.adb: Minor reformatting.
9058 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9060         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
9061         strerror message, not just numeric errno value.
9063 2014-02-24  Doug Rupp  <rupp@adacore.com>
9065         * raise-gcc.c (exception_class_eq): Make endian neutral.
9067 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9069         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
9070         flag, and reset Etype and Analyzed attributes unconditionally
9071         when copying a tree that may be partly analyzed.
9072         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
9073         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
9074         within a subprogram body and applies to it, remove it from the
9075         body before making a copy of it, to prevent spurious errors when
9076         analyzing the copied body.
9078 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9080         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
9081         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
9082         vxWorks.h has been included.  Also ensure that file attributes
9083         related definitions are output even in cases where socket support
9084         is not enabled.
9085         * a-tags.adb: Code clean up.
9086         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
9087         instead of -I to add the main ada source directory to the header
9088         search path, in order to avoid conflict between our own "types.h"
9089         and VxWork's <types.h>.
9091 2014-02-24  Robert Dewar  <dewar@adacore.com>
9093         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
9094         * debug.adb: Remove documentation of -gnatd.X, no longer used.
9095         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
9097 2014-02-24  Bob Duff  <duff@adacore.com>
9099         * gnat_ugn.texi: Improve documentation of gnatpp.
9101 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9103         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
9104         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
9105         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
9106         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
9107         a chars_ptr, because on Windows this is a renaming of
9108         Socket_Error_Message.
9110 2014-02-24  Robert Dewar  <dewar@adacore.com>
9112         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
9113         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
9114         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
9115         reorganization.
9117 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9119         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
9120         that the source directory containing s-oscons-tmplt.c is on the
9121         include path, so that all internal header files are available.
9123 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9125         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
9126         domain of iteration is an attribute reference 'Old, this is an
9127         Ada 2012 iterator and the loop must be rewritten as such.
9129 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9131         * s-fileio.adb (Errno_Message): Remove, use shared version from
9132         s-os_lib instead.
9133         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
9134         * g-stseme (Socket_Error_Message): Reimplement in terms of new
9135         s-os_lib function.
9136         * g-socthi.ads, g-socthi.adb: Change profile of
9137         Socket_Error_Message to return String to allow the above.
9138         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
9139         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
9140         * g-socthi-vxworks.ads: Update to account for the above profile
9141         change.
9142         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
9143         * s-crtl.ads (strncpy): New procedure.
9144         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
9145         Use import from s-crtl.
9146         * a-envvar.adb, osint.adb: Use imports of C runtime functions
9147         from s-crtl instead of re-importing locally.
9149 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9151         * sem_prag.adb (Analyze_Global_Item): Emit the
9152         variable related checks concerning volatile objects only when
9153         SPARK_Mode is on.
9155 2014-02-24  Robert Dewar  <dewar@adacore.com>
9157         * sem_ch5.adb (Analyze_Iterator_Specification): use
9158         Error_Msg_Ada_2012_Feature.
9160 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
9162         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
9163         No_Local_Timing_Events and No_Specific_Termination_Handlers
9164         must be set, according to the Ravenscar profile definition
9165         in D.13(6/3).
9167 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9169         * sem_ch6.adb (Analyze_Expression_Function): If this is a
9170         completion, freeze return type and its designated type if needed.
9172 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9174         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9175         'Address): When moving initialization statements to a freeze
9176         entity, keep them under a single node (i.e. do not unwrap
9177         expressions with actions), and set the Initialization_Statements
9178         attribute again so that processing of a later pragma Import can
9179         still remove them.
9181 2014-02-24  Claire Dross  <dross@adacore.com>
9183         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
9184         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
9185         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
9186         Left/Right to First_To_Previous/Current_To_Last.
9188 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9190         * adaint.h (struct file_attributes): New component "error"
9191         (__gnat_error_attributes): Accessor for the above.
9192         * adaint.c (__gnat_error_attributes): New subprogram
9193         (__gnat_stat): Fix returned value (expect errno value)
9194         (__gnat_stat_to_attr): Add management of error component (set to
9195         stat errno value, except for missing files where it is set to 0,
9196         and exists is set to 0).
9197         * osint.ads (File_Attributes_Size): Update per change above,
9198         also clarify documentation.
9199         * s-filatt.ads: New file, binding to file attributes related
9200         functions.
9201         * Makefile.rtl (s-filatt): New runtime unit.
9202         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
9203         to library function if not available on target).
9204         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
9205         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
9206         SIZEOF_struct_dirent_alloc): New constants.
9207         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
9208         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
9209         Perform appropriate error checking if stat fails (do not just
9210         ignore existing files if stat fails)
9211         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
9212         dependencies.
9214 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9216         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
9217         the use of volatile objects as global items in a function to
9218         the variable related checks section.
9219         * sem_util.adb (Async_Readers_Enabled): Directly call
9220         Has_Enabled_Property.
9221         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
9222         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
9223         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
9224         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
9225         Update the comment on usage. State_Has_Enabled_Property how handles
9226         the original logic of the routine. Add processing for variables.
9227         (State_Has_Enabled_Property): New routine.
9228         (Variable_Has_Enabled_Property): New routine.
9230 2014-02-24  Robert Dewar  <dewar@adacore.com>
9232         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
9233         Minor reformatting.
9234         * atree.ads, atree.adb (Node35): New function.
9235         (Set_Node35): New procedure.
9236         * debug.adb: Define new debug flag -gnatd.X.
9237         * einfo.ads, einfo.adb (Import_Pragma): New field.
9238         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
9239         really active yet, has to be activated with -gnatd.X.
9240         * sem_prag.adb (Set_Imported): Set new Import_Pragma
9241         field (Set_Imported): Don't set Is_Public (see
9242         Freeze.Wrap_Imported_Subprogram)
9243         * par-ch3.adb (P_Component_List): Handle unexpected null component.
9245 2014-02-24  Yannick Moy  <moy@adacore.com>
9247         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
9248         * gnat_rm.texi: Correct documentation of attribute Update.
9250 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9252         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
9253         iterator in older versions of Ada.
9255 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
9257         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
9258         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
9260 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9262         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
9263         indexed_components that are instances of Ada 2012 container
9264         indexing operations. Analysis and resolution of such nodes
9265         is performed on the attribute, and the original source is
9266         preserved for ASIS operations. If expansion is enabled, the
9267         indexed component is replaced by the value of this attribute,
9268         which is in a call to an Indexing aspect, in most case wrapped
9269         in a dereference operation.
9270         * sem_ch4.adb (Analyze_Indexed_Component): Create
9271         Generalized_Indexing attribute when appropriate.
9272         (Analyze_Call): If prefix is not overloadable and has an indexing
9273         aspect, transform into an indexed component so it can be analyzed
9274         as a potential container indexing.
9275         (Analyze_Expression): If node is an indexed component with a
9276         Generalized_ Indexing, do not re-analyze.
9277         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
9278         of an indexed_component that has been transformed into a container
9279         indexing operation.
9280         (Resolve_Indexed_Component): Call the above when required.
9281         (Resolve): Do not insert an explicit dereference operation on
9282         an indexed_component whose type has an implicit dereference:
9283         the operation is inserted when resolving the related
9284         Generalized_Indexing.
9286 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
9288         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
9289         Environment.
9291 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9293         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
9294         error messages.
9295         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
9296         Merge the expected and available mode errors.
9297         (Report_Unused_Constituents): Remove leading spaces in error messages.
9298         (Report_Unused_States): Remove leading spaces in error messages.
9300 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9302         * par_sco.adb (Traverse_One): Refine categorization of statement
9303         SCOs.
9305 2014-02-24  Robert Dewar  <dewar@adacore.com>
9307         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
9308         Pure_05, Pure_12 and Preelaborate_05.
9309         * gnat_rm.texi: Update accordingly.
9310         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
9311         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
9312         Recognize one argument form of these pragmas only in GNAT mode
9313         (-gnatg).
9315 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9317         * s-dimmks.ads: Replace symbol for temperature, previously the
9318         Greek letter Theta, by the ASCII @ sign.
9319         * s-diflio.ads: ditto.
9321 2014-02-24  Robert Dewar  <dewar@adacore.com>
9323         * exp_ch4.adb: Minor code reorganization (use OR for boolean
9324         variables).
9325         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
9327 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
9329         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
9330         so that references to gnatmem and ASIS tools do not appear in the FSF
9331         edition of the GNAT User's Guide.
9333 2014-02-24  Yannick Moy  <moy@adacore.com>
9335         * freeze.adb (Freeze_Entity): Do not issue warning
9336         for pre/post being ignored on imported subprogram in GNATprove
9337         mode.
9339 2014-02-24  Robert Dewar  <dewar@adacore.com>
9341         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
9342         stand.ads, sem_eval.adb: Minor reformatting.
9344 2014-02-24  Yannick Moy  <moy@adacore.com>
9346         * sem_prag.adb: Minor rewording in error message.
9348 2014-02-24  Johannes Kanig  <kanig@adacore.com>
9350         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
9351         GNATprove_mode, gnat2why doesn't need nor use these types.
9353 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
9355         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
9356         target, in the case of signed integer exponentiation that uses a
9357         run-time routine, always select the Exp_* versions, since overflow
9358         checking is automatically done by AAMP arithmetic instructions.
9360 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9362         * sem_ch13.adb (Analyze_Aspect_Specifications):
9363         When the related context is a package instace, insert pragma
9364         Abstract_State after all internally-generated renamings related
9365         to the instance "header".
9367 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9369         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
9370         subprograms.
9371         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
9372         call to an abstract subprogram is legal if it appears in a
9373         pre/postcondition of another abstract operation.
9375 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
9377         * gnat_ugn.texi: Misc updates.
9379 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9381         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
9383 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
9385         * layout.adb (Layout_Variant_Record): Instantiate
9386         Generic_Check_Choices and call Check_Choices before calling
9387         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
9388         set to prevent generating incorrect discriminant-checking
9389         functions for 'others' variants (functions that unconditionally
9390         return True rather than accounting for the values covered by the
9391         'others' choice).
9392         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
9393         Formal_Derived_Matching.
9394         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
9395         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
9396         Formal_Derived_Matching formal to Subtypes_Statically_Match.
9397         (Subtypes_Statically_Match): Suppress the Object_Size matching
9398         test in the case where Formal_Derived_Matching is True.
9399         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
9400         True for Formal_Derived_Matching_Formal on the call to
9401         Subtypes_Statically_Compatible.
9403 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
9405         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
9407 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
9409         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
9410         Look through a conversion between original and packable version to get
9411         the base object.
9412         (build_component_ref): Rework comment and fix formatting.
9414 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
9416         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
9417         project-specific options.
9419 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9421         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
9422         not Constraint_Error.
9423         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
9424         * sem_ch5.adb: Code clean up.
9426 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9428         * sem_prag.adb (Usage_Error): Remove local
9429         constant Typ. Remove the specialized diagnostics for unconstrained
9430         or tagged items as those are not part of the explicit input set
9431         of the related subprogram and should not be flagged.
9433 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9435         * sem_attr.adb: Add guard to preserve all errors.
9437 2014-02-20  Vincent Celier  <celier@adacore.com>
9439         * switch-m.adb (Normalize_Compiler_Switches): Take into account
9440         switches that are recorded in ALI files: -gnateA, -gnateE,
9441         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
9443 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9445         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
9446         of an element iterator form over a formal container with an
9447         Iterable aspect.
9448         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
9449         to create declaration and loop statements for both forms of
9450         container iterators.
9451         (Expand_Formal_Container_Element_Iterator): New procedure
9452         to handle loops of the form  "for E of C" when C is a formal
9453         container.
9454         (Expand_Formal_Container_Iterator): Code cleanup.
9456 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9458         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
9459         (Analyze_Contract_Case): Remove the use of
9460         "may". Replace "aspect Contract_Cases" to avoid categorization
9461         of aspect vs pragma.
9462         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
9463         (Analyze_Global_Item): Remove
9464         the use of "formal", specify the subprogram.  Split the
9465         error message about a state with visible refinement into
9466         two. Remove the use of "global" from "volatile global item".
9467         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
9468         is on one line.
9469         (Analyze_Input_Output): Update the call to
9470         Check_Mode. Specify the duplicated item. Reword the error
9471         message concerning an input of a null output list. Use "\"
9472         for error message continuation.
9473         (Analyze_Part_Of): Remove
9474         the use of "may". Use "\" for error message continuation.
9475         (Analyze_Refined_Depends_In_Decl_Part): Update the error
9476         message concerning a useless refinement to match the format
9477         of Refined_Global.
9478         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
9479         concerning a useless refinement.
9480         (Analyze_Refinement_Clause): Use "\" for error message continuation.
9481         (Check_Constituent_Usage): Use "\" for error message continuation.
9482         (Check_Dependency_Clause): Use "\" for error message continuation.
9483         (Check_Matching_Constituent): Use "\" for error message continuation.
9484         (Check_Missing_Part_Of): Use "\" for error message continuation.
9485         (Check_Mode): Renamed to
9486         Check_Role. Update the comment on usage. Redo the error reporting
9487         to use Role_Error.
9488         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
9489         message continuation.
9490         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
9491         with comment on usage. Update all occurrences of Is_Input and Is_Output.
9492         (Inconsistent_Mode_Error): Use "\" for error message continuation.
9493         (Input_Match): Use "\" for error message continuation.
9494         (Role_Error): New routine.
9495         (Set_Convention_From_Pragma): Use "\" for error message continuation.
9496         (Usage_Error): Add local variable Error_Msg. Build specialized error
9497         message showcasing the offending item kind. Redo the diagnostics for
9498         unconstrained types.
9500 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9502         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
9503         to determine whether a type is a container type, rather than
9504         examining only its type declaration, so that subtypes and derived
9505         types are handled properly.
9507 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
9509         * gnat_ugn.texi: gnatmetric: add description of project-specific
9510         options.
9512 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9514         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9515         all choices in an association for a record type have the same
9516         type, as is done for record aggregates.
9518 2014-02-20  Robert Dewar  <dewar@adacore.com>
9520         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9521         Unmodified rather than Warnings (Off). Make comments
9522         uniform in the four affected units.
9524 2014-02-20  Robert Dewar  <dewar@adacore.com>
9526         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9527         Object_Size): For non-scalar types allow any value that is a
9528         multiple of 8.
9529         * gnat_rm.texi: Document Object_Size for composites more clearly.
9531 2014-02-20  Yannick Moy  <moy@adacore.com>
9533         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9535 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9537         * stand.ads: Raise_Type: new predefined entity, used as the type
9538         of a Raise_Expression prior to resolution.
9539         * cstand.adb: Build entity for Raise_Type.
9540         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9541         initial type of the node.
9542         * sem_type.adb (Covers): Raise_Type is compatible with all
9543         other types.
9544         * sem_res.adb (Resolve): Remove special handling of Any_Type on
9545         Raise_Expression nodes.
9546         (Resolve_Raise_Expression): Signal ambiguity if the type of the
9547         context is still Raise_Type.
9549 2014-02-20  Robert Dewar  <dewar@adacore.com>
9551         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
9552         mismatching predicates.
9553         * sem_ch6.adb (Check_Conformance): Give better messages on
9554         predicate mismatch.
9555         * sem_eval.adb (Predicates_Match): Move to spec.
9556         * sem_eval.ads (Predicates_Match): Moved here from body.
9558 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9560         * a-cbmutr.adb: Use default value in Insert_Child.
9562 2014-02-20  Vincent Celier  <celier@adacore.com>
9564         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
9565         Stringt.Initialize in all project aware tools.
9567 2014-02-20  Doug Rupp  <rupp@adacore.com>
9569         * gnat_ugn.texi: Document gnatbind -X option.
9570         * vms_data.ads: Minor warnings documentation reformatting.
9572 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9574         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
9575         procedure for a base type.
9577 2014-02-20  Robert Dewar  <dewar@adacore.com>
9579         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
9580         expression with type info.
9581         * sem_ch13.adb: Minor reformatting.
9582         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
9583         False if predicates do not match on the two types.
9585 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
9587         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
9588         In Relaxed_RM_Semantics mode, allow any static integer value,
9589         for compatibility with other compilers.
9591 2014-02-20  Vincent Celier  <celier@adacore.com>
9593         * errutil.adb (Initialize): Properly initialize entry in table
9594         Warnings when warnings are suppressed.
9596 2014-02-20  Robert Dewar  <dewar@adacore.com>
9598         * s-os_lib.ads: Add warning about non-portability of Rename_File.
9599         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
9600         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
9601         * gnat_ugn.texi: Document no warnings on junk variable names.
9602         * layout.adb: Minor code reorganization (use Ekind_In).
9603         * stringt.adb: Move initialization of Null_String_Id to Initialize
9604         routine.
9606 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9608         * sem_ch13.adb: Initialize optional Element_Id.
9610 2014-02-20  Robert Dewar  <dewar@adacore.com>
9612         * s-os_lib.ads (Rename_File): Minor commment addition.
9614 2014-02-20  Thomas Quinot  <quinot@adacore.com>
9616         * einfo.ads: Minor reformatting.
9618 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9620         * aspects.adb (Exchange_Aspects): New routine.
9621         * aspects.ads (Exchange_Aspects): New routine.
9622         * atree.adb (Rewrite): Do not check whether the save node has
9623         aspects as it never will, instead check the node about to be clobbered.
9624         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
9625         entities of generic packages.
9626         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
9627         pointer of an aspect specification list after rewriting takes place.
9628         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
9629         specifications of the generic template and the copy used for analysis.
9630         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
9631         the aspect specifications of the generic template and the
9632         copy used for analysis.
9633         (Analyze_Package_Instantiation): Propagate the aspect specifications
9634         from the generic template to the instantiation.
9635         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
9636         specifications from the generic template to the instantiation.
9637         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
9638         Abstract_State, Initializes and Initial_Condition when they
9639         apply to a package instantiation.
9641 2014-02-20  Robert Dewar  <dewar@adacore.com>
9643         * stringt.adb: Add call to Initialize in package initialization.
9645 2014-02-20  Robert Dewar  <dewar@adacore.com>
9647         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
9648         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
9649         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
9650         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
9651         reformatting.
9653 2014-02-20  Bob Duff  <duff@adacore.com>
9655         * s-os_lib.ads: Minor: Remove incorrect comment.
9657 2014-02-20  Robert Dewar  <dewar@adacore.com>
9659         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
9661 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9663         * a-cborma.adb (Assign): When creating a node without a specified
9664         element, insert an uninitialized element in the map, because
9665         the instance may provide an element type with a default
9666         initialization, e.g a scalar with a Default_Value aspect.
9667         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
9668         (Insert): In the version without explicit element, provide an
9669         uninitialized element, as above.
9670         * a-cbdlli.adb (Append): In the version without explicit element,
9671         provide an uninitalized element, as above.
9672         (Allocate): Remove unused version.
9674 2014-02-20  Robert Dewar  <dewar@adacore.com>
9676         * sem_elab.adb: Minor code reorganization (use Nkind_In).
9677         * stringt.adb: Remove temporary pragma Warnings (Off).
9678         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
9679         of Null_String_Id.
9681 2014-02-20  Matthew Heaney  <heaney@adacore.com>
9683         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
9684         index.
9686 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9688         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
9689         properly the cursor type for subsequent volatile testing in SPARK
9690         mode, when domain is a formal container with an Iterabe aspect.
9692 2014-02-20  Robert Dewar  <dewar@adacore.com>
9694         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
9695         (Set_Specific_Warning_Off): Add Reason argument.
9696         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
9697         (Set_Specific_Warning_Off): Add Reason argument.
9698         * erroutc.adb (Warnings_Entry): Add Reason field
9699         (Specific_Warning_Entry): Add Reason field.
9700         (Warnings_Suppressed): return String_Id for Reason.
9701         (Warning_Specifically_Suppressed): return String_Id for Reason.
9702         * erroutc.ads (Warnings_Entry): Add Reason field.
9703         (Specific_Warning_Entry): Add Reason field.
9704         (Set_Specific_Warning_Off): Add Reason argument.
9705         (Set_Warnings_Mode_Off): Add Reason argument.
9706         (Warnings_Suppressed): return String_Id for Reason.
9707         (Warning_Specifically_Suppressed): return String_Id for Reason.
9708         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
9709         (Warning_Specifically_Suppressed): returns String_Id for Reason
9710         * gnat_rm.texi: Document that Warning parameter is string literal
9711         or a concatenation of string literals.
9712         * par-prag.adb: New handling for Reason argument.
9713         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
9714         for Reason argument.
9715         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
9716         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
9717         * stringt.adb: Set Null_String_Id.
9718         * stringt.ads (Null_String_Id): New constant.
9720 2014-02-20  Robert Dewar  <dewar@adacore.com>
9722         * einfo.ads: Minor comment addition: Etype of package is
9723         Standard_Void_Type.
9724         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
9725         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
9726         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
9727         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
9728         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
9729         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
9730         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
9731         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
9732         Replace all calls with calls to New_Occurrence_Of.
9734 2014-02-20  Robert Dewar  <dewar@adacore.com>
9736         * par-util.adb (Ignore, case of right paren): Make this a
9737         serious error.
9739 2014-02-19  Robert Dewar  <dewar@adacore.com>
9741         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
9742         * debug.adb: Remove -gnatd.X switch, no longer used.
9743         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
9744         now always made.
9746 2014-02-19  Bob Duff  <duff@adacore.com>
9748         * g-socket.ads: Minor: Correct some comments.
9750 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9752         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
9754 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
9756         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
9757         an error on out of range priorities if Relaxed_RM_Semantics.
9758         * sem_prag.adb (Analyze_Pragma): Ditto.
9760 2014-02-19  Bob Duff  <duff@adacore.com>
9762         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
9763         where F denotes the renaming of an enumeration literal, and
9764         issue a specialized error message.
9766 2014-02-19  Matthew Heaney  <heaney@adacore.com>
9768         * a-chtgop.ads (Checked_Index): New operation.
9769         (Next): Changed mode of hash table.
9770         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
9771         (Generic_Read, Reserve_Capacity): Ditto.
9772         (Generic_Equal): Detect tampering.
9773         (Next): Changed mode of hash table, detect tampering.
9774         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
9775         operation.
9776         (Find): Changed mode of hash table.
9777         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
9778         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
9779         tampering.
9780         (Find): Changed mode of hash table, check for tampering.
9781         (Generic_Replace_Element): Check for tampering.
9782         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
9783         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
9784         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
9785         Detect tampering.
9786         (Find, Generic_Replace_Element): Check for tampering.
9787         * a-chtgbo.ads (Checked_Index): New operation.
9788         * a-chtgbo.adb (Checked_Index): New operation
9789         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
9790         (Generic_Read, Next): Ditto.
9791         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
9792         table (Difference, Intersection): Use variable view of
9793         source, detect tampering (Find, Is_Subset, Overlap): Use
9794         variable view of container (Symmetric_Difference, Union):
9795         Detect tampering (Vet): Use Checked_Index to detect tampering
9796         (Constant_Reference, Element, Find): Use variable view of
9797         container.
9798         (Update_Element_Preserving_Key): Detect tampering.
9799         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
9800         of container.
9801         (Is_Subset): Ditto.
9802         (Equivalent_Sets, Overlap): Use Node's Next component.
9803         (Vet): Use Checked_Index to detect tampering.
9804         (Constant_Reference, Element, Find): Use variable view of container.
9805         (Update_Element_Preserving_Key): Detect tampering.
9806         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
9807         Element, Find): Use variable view of container.
9808         (Reference): Rename hash table component.
9809         (Vet): Use Checked_Index to detect tampering.
9811 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
9813         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
9814         of -nostdinc.
9816 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9818         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
9819         against calls without Def_Id.
9821 2014-02-19  Claire Dross  <dross@adacore.com>
9823         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
9824         a-cofove.ads: Add global annotations to subprograms.
9826 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9828         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
9829         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
9830         Initial_Condition no longer requires the presence of pragma
9831         Initialized. Do not try to diagnose whether all variables mentioned in
9832         pragma Initializes also appear in Initial_Condition.
9833         (Collect_Variables): Removed.
9834         (Match_Variable): Removed.
9835         (Match_Variables): Removed.
9836         (Report_Unused_Variables): Removed.
9838 2014-02-19  Thomas Quinot  <quinot@adacore.com>
9840         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
9842 2014-02-19  Robert Dewar  <dewar@adacore.com>
9844         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
9845         reformatting.
9847 2014-02-19  Vincent Celier  <celier@adacore.com>
9849         * prj-part.adb (Parse_Single_Project): Use the fully resolved
9850         project path, with all symbolic links resolved, to check if the
9851         same project is imported with a different unresolved path.
9852         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
9853         changed to Resolved_Path to reflect that all symbolic links
9854         are resolved.
9856 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9858         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
9859         from sem_ch13, for use elsewhere.
9860         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
9861         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
9862         cursor type on the loop variable when the iteration is over o
9863         formal container.
9865 2014-02-19  Vincent Celier  <celier@adacore.com>
9867         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
9868         for an empty Target (Check_Target): Never fail when an empty
9869         target is declared in the configuration project.
9871 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9873         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
9874         the pragma comes fron a predicate aspect and the context is a
9875         record declaration within the scope that declares the type.
9877 2014-02-19  Robert Dewar  <dewar@adacore.com>
9879         * gnat_rm.texi: Minor clarifications.
9880         * expander.adb, sem_aggr.adb: Add comments.
9882 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9884         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
9885         applies to a subprogram body, the name is the current scope,
9886         rather than being declared in the current scope.
9887         (Analyze_Pragma, case No_Return): Handle properly a No_Return
9888         aspect applied to a subprogram body.
9890 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9892         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
9893         of overloaded subprograms, and fix bug in handling of primitive
9894         operation Element.
9896 2014-02-19  Pascal Obry  <obry@adacore.com>
9898         * s-os_lib.adb: Minor reformatting.
9900 2014-02-19  Yannick Moy  <moy@adacore.com>
9902         * expander.adb (Expand): Do nothing inside generics.
9903         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
9904         generics.
9906 2014-02-19  Yannick Moy  <moy@adacore.com>
9908         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
9910 2014-02-19  Robert Dewar  <dewar@adacore.com>
9912         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
9913         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
9914         longer needed).
9916 2014-02-19  Claire Dross  <dross@adacore.com>
9918         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
9919         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
9921 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9923         * sem_ch3.adb (Analyze_Declarations): Analyze
9924         a package contract at the end of the private declarations (if
9925         applicable), otherwise analyze it and the end of the visible
9926         declarations.
9928 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9930         * style.adb (Missing_Overriding): If subprogram is an
9931         instantiation, place warning on the instance node itself,
9932         without mention of the original generic. Do not emit message
9933         if explicit Ada version is older than the introduction of the
9934         overriding indicator.
9936 2014-02-19  Yannick Moy  <moy@adacore.com>
9938         * gnat_rm.texi: Doc clarifications.
9940 2014-02-19  Yannick Moy  <moy@adacore.com>
9942         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
9943         inside a generic.
9945 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9947         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
9948         specified First primitive, rather than by name.
9949         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
9950         and extend error checking for missing primitives and incorrect
9951         signatures.
9953 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
9955         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
9956         errors when a Synchronization aspect on an overriding protected
9957         operation does not match the given aspect on the overridden
9958         operation of an ancestor interface.
9960 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
9962         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
9963         (Check_Loop_Pragma_Placement): Update
9964         comment on usage. Remove local variables Orig_Stmt and
9965         Within_Same_Sequence. Check that the current Loop_Invariant or
9966         Loop_Variant pragma is grouped together with other such pragmas.
9967         (Is_Loop_Pragma): New routine.
9968         (Prev_In_Loop): Removed.
9970 2014-02-19  Robert Dewar  <dewar@adacore.com>
9972         * par-ch6.adb (P_Return): For extended return, end column lines
9973         up with RETURN.
9974         * par.adb: Minor documentation clarification.
9976 2014-02-19  Yannick Moy  <moy@adacore.com>
9978         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
9979         that Loop_Invariant and Loop_Variant appear consecutively.
9980         * gnat_rm.texi Update documentation of Loop_Invariant and
9981         Loop_Variant pragmas.
9983 2014-02-19  Robert Dewar  <dewar@adacore.com>
9985         * debug.adb: Document -gnatd.X.
9986         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
9987         first token
9988         (Check_Then_Column): Ditto.
9989         * styleg.adb (Check_Then): Allow THEN on line after IF.
9990         (Check_Then): Check THEN placement under control of -gnatd.X
9991         * styleg.ads (Check_Then): Now called even if THEN is not first
9992         token on line.
9993         * stylesw.ads (Style_Check_If_Then_Layout): Document new
9994         relaxed rules.
9995         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
9997 2014-02-19  Robert Dewar  <dewar@adacore.com>
9999         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
10000         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
10001         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
10002         vms_conv.adb: Fix bad layout of IF statements
10004 2014-02-19  Robert Dewar  <dewar@adacore.com>
10006         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
10008 2014-02-19  Robert Dewar  <dewar@adacore.com>
10010         * exp_util.adb: Update comments.
10012 2014-02-19  Doug Rupp  <rupp@adacore.com>
10014         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
10015         * init.c (__gl_float_format): [VMS] New global.
10016         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
10017         representation in effect.
10019 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10021         * exp_ch6.adb Add with and use clause for Exp_Prag.
10022         (Expand_Contract_Cases): Relocated to Exp_Prag.
10023         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
10024         * exp_prag.adb Add with and use clauses for Checks and Validsw.
10025         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
10026         structure of the expanded code to showcase the evaluation of
10027         attribute 'Old prefixes. Add local variable Old_Evals. Expand
10028         any attribute 'Old references found within a consequence. Add
10029         circuitry to evaluate the prefixes of attribute 'Old that
10030         belong to a selected consequence.
10031         (Expand_Old_In_Consequence): New routine.
10032         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
10033         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
10034         potentially unevaluated prefix is always evaluated.
10036 2014-02-19  Robert Dewar  <dewar@adacore.com>
10038         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
10039         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
10040         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
10041         handling for the case of Modify_Tree_For_C, this approach did
10042         not work.
10043         * exp_util.adb (Matching_Standard_Type): New function
10044         (Side_Effect_Free): New top level functions (from
10045         Remove_Side_Effects).
10046         * exp_util.ads (Side_Effect_Free): New top level functions
10047         (moved from body).
10048         * sinfo.ads: Minor comment updates.
10050 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10052         * exp_ch6.adb (Expand_Simple_Function_Return): If return
10053         type is unconstrained and uses the secondary stack, mark the
10054         enclosing function accordingly, to ensure that the value is not
10055         prematurely removed.
10057 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10059         * par.adb Alphabetize the routines in Par.Sync.
10060         (Resync_Past_Malformed_Aspect): New routine.
10061         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
10062         variables. Code and comment reformatting. Detect missing
10063         parentheses on aspects [Refined_]Global and [Refined_]Depends
10064         with a non-null definition.
10065         * par-sync.adb: Alphabetize all routines in this separate unit.
10066         (Resync_Past_Malformed_Aspect): New routine.
10068 2014-02-19  Robert Dewar  <dewar@adacore.com>
10070         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
10071         if Esize values do not match.
10073 2014-02-19  Yannick Moy  <moy@adacore.com>
10075         * sinfo.ads: Minor comment update.
10077 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10079         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
10081 2014-02-19  Thomas Quinot  <quinot@adacore.com>
10083         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
10084         that has the No_Ctrl_Actions flag is a suitable node to be
10085         wrapped if the assigned expression has no finalization actions.
10086         * sem_eval.adb (Eval_Entity_Name): For a compile time known
10087         boolean value, mark the corresponding condition SCO as constant.
10089 2014-02-19  Robert Dewar  <dewar@adacore.com>
10091         * exp_util.adb: Minor reformatting.
10092         * exp_util.ads (Matching_Standard_Type): New function.
10093         * exp_ch7.adb: Minor reformatting.
10095 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10097         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
10098         to find declaration for Cursor, to handle properly the case of
10099         a discriminated iterable type.
10101 2014-02-19  Vincent Celier  <celier@adacore.com>
10103         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
10104         imported library projects with the library ALI dirs, when setting
10105         the object paths.
10106         * prj-env.ads (Ada_Objects_Path): Correct comments about
10107         argument Including_Libraries.
10109 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
10111         * gnat_rm.texi: Minor spelling fixes.
10113 2014-02-19  Doug Rupp  <rupp@adacore.com>
10115         * init.c: Remove unneeded code.
10116         * fe.h (Float_Format): New macro
10117         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
10119 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10121         * sem_prag.adb (Check_Refined_Global_Item):
10122         A state or variable acts as a constituent only it is part of an
10123         encapsulating state and the state has visible refinement.
10125 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10127         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
10128         postcondition for a function when the expression does not mention
10129         'Result but the function has in-out parameters.
10131 2014-02-19  Robert Dewar  <dewar@adacore.com>
10133         * gnat_rm.texi: Add documentation on Value_Size forcing biased
10134         representation.
10136 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10138         * lib-xref.ads Remove the small table of letter and symbol usage as we
10139         already have one.
10141 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10143         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
10144         messages depending on the offending misplaced aspect specifications.
10145         (Diagnose_Misplaced_Aspect_Specifications): New routine.
10147 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10149         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
10150         for iterable aspect primitives.
10151         (Resolve_Iterable_Operation): Use expected signature of iterable
10152         aspect to resolve primitive when overloading is present.
10153         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
10154         (Check_Signature): Removed.
10156 2014-02-19  Yannick Moy  <moy@adacore.com>
10158         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
10159         subunit in GNATprove_Mode.
10160         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
10162 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10164         * lib-xref.ads Alphabetize the contents of table
10165         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
10166         for E_Abstract_State. List all letters and symbols in use.
10167         * sem_prag.adb (Analyze_Abstract_State): Update all calls
10168         to Create_Abstract_State to reflect the new signature.
10169         (Create_Abstract_State): Change subprogram profile and update
10170         the comment on usage. Use the proper location of the state
10171         declaration when creating a new abstract state entity. Do not
10172         generate an external name, but simply reuse the name coming from
10173         the state declaration.
10175 2014-02-19  Robert Dewar  <dewar@adacore.com>
10177         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
10178         declarations get properly inserted in Modify_Tree_For_C mode.
10179         * sinfo.ads: Minor comment addition.
10181 2014-02-19  Robert Dewar  <dewar@adacore.com>
10183         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
10184         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
10186 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10188         * style.adb (Missing_Overriding): Warning does not apply in
10189         language versions prior to Ada 2005.
10190         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
10191         * sem_attr.adb: Add Attribute_Iterable where needed.
10192         * exp_attr.adb: ditto.
10193         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
10194         handle loops and quantified expressions over types that have an
10195         iterable aspect.  Called from Expand_Iterator_Loop.
10196         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
10197         with Iterable aspect.
10198         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
10199         subprograms specified in the Iterable aspect have the proper
10200         signature involving container and cursor.
10201         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
10202         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
10203         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
10204         New procedure to retrieve one of the primitives First, Last,
10205         or Has_Element, from the value of the iterable aspect of a
10206         formal container.
10207         (Is_Container_Element): Predicate to recognize expressions
10208         that denote an element of one of the predefined containers,
10209         for possible optimization.  This subprogram is not currently
10210         used, pending ARG discussions on the legality of the proposed
10211         optimization. Worth preserving for eventual use.
10212         (Is_Iterator): Recognize formal container types.
10213         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
10215 2014-02-19  Robert Dewar  <dewar@adacore.com>
10217         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
10218         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
10219         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
10220         declarations from list of actions.
10221         * output.ads, output.adb (Delete_Last_Char): New procedure.
10222         * sinfo.ads: Document handling of Mod and expression with actions
10223         in Modify_Tree_For_C mode.
10225 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10227         * par-ch9.adb (P_Task): Add a null statement to produce a
10228         well-formed task body when due to a previous syntax error the
10229         statement list is empty.
10231 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10233         * sem_prag.adb (Check_Dependency_Clause): Account
10234         for the case where a state with a non-null refinement matches a
10235         null output list. Comment reformatting.
10236         (Inputs_Match): Copy a solitary input to avoid an assertion failure
10237         when trying to match the same input in multiple clauses.
10239 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
10241         * sem_attr.adb: Minor typo fix.
10243 2014-02-18  Robert Dewar  <dewar@adacore.com>
10245         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
10246         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
10247         (Create_Standard): Create new unsigned types.
10248         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
10249         mode (Expand_N_Reference): Removed, problematic and not needed
10250         for now.
10251         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
10252         not needed for now.
10253         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
10254         * expander.adb: Remove call to Expand_N_Reference (problematic,
10255         and not needed now).
10256         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
10257         * stand.adb: Read and write unsigned type entities.
10258         * stand.ads: Add new unsigned types.
10260 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
10262         * sem_ch4.adb (Analyze_Call): Do not mark a function call
10263         as being inside an assertion expression as the flag is now removed.
10264         (Check_Ghost_Subprogram_Call): Do not query the
10265         In_Assertion_Expression flag as it is now removed, instead use
10266         a predicate function.
10267         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
10268         In_Assertion_Expression flag as it is now removed, instead use
10269         a predicate function.
10270         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
10271         * sem_util.adb Add with and use clause for Sem_Prag.
10272         (In_Assertion_Expression_Pragma): New routine.
10273         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
10274         * sinfo.adb (In_Assertion_Expression): Removed.
10275         (Set_In_Assertion_Expression): Removed.
10276         * sinfo.ads Remove flag In_Assertion_Expression along with its
10277         use in nodes.
10278         (In_Assertion_Expression): Removed along with
10279         pragma Inline.  (Set_In_Assertion_Expression): Removed along
10280         with pragma Inline.
10282 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
10284         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
10285         used together with '-r', '-rf' or '-rnb' options.
10287 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
10289         * sem_attr.adb (Analyze_Attribute): Comment
10290         and code reformatting. Use separate routines to check the
10291         legality of attribute 'Old in certain pragmas. Verify
10292         the use of 'Old, 'Result and locally declared entities
10293         within the prefix of 'Old.
10294         (Check_References_In_Prefix): New routine.
10295         (Check_Use_In_Contract_Cases): New routine.
10296         (Check_Use_In_Test_Case): New routine.
10298 2014-02-18  Vincent Celier  <celier@adacore.com>
10300         * sem_aux.adb (Is_By_Reference_Type): For each components of
10301         a record type, check also if the component is volatile as it
10302         may have an aspect that makes it volatile. If it is, then the
10303         record type is a by reference type.
10305 2014-02-18  Robert Dewar  <dewar@adacore.com>
10307         * exp_attr.adb: Minor reformatting.
10308         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
10309         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
10310         as another case where we don't generate N_Reference nodes for
10311         primitive types.
10312         * expander.adb (Expand): Add call to Expand_N_Reference.
10314 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10316         * sem_prag.adb (Analyze_Refined_Pragma): Remove
10317         local variable Pack_Spec. Refinement pragmas may now apply to
10318         bodies of both visible and private subprograms.
10320 2014-02-06  Robert Dewar  <dewar@adacore.com>
10322         * exp_attr.adb (Expand_Loop_Entry_Attribute):
10323         Minor change (Attr => N) (Expand_Pred_Succ): New name
10324         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
10325         Max): Expand into if expression if Modify_Tree_For_C mode.
10326         (Expand_N_Attribute_Reference, case Min): ditto
10327         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
10328         Max attributes.
10330 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10332         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
10333         predicate check if this is an internal declaration with
10334         No_Initialization set, as for an expanded aggregate component.
10336 2014-02-06  Doug Rupp  <rupp@adacore.com>
10338         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
10339         conditions with severity of "SUCCESS" or "INFORMATIONAL".
10341 2014-02-06  Yannick Moy  <moy@adacore.com>
10343         * sem_prag.adb (Analyze_Pragma): Analyze pragma
10344         Debug rewritten node before rewriting it as a null statement in
10345         GNATprove mode.
10347 2014-02-06  Robert Dewar  <dewar@adacore.com>
10349         * sem_attr.adb (Min_Max): New procedure.
10350         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
10351         procedure.
10353 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10355         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
10356         gnatmetric/gnatpp.
10358 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10360         * sem_prag.adb (Analyze_Abstract_State): Update
10361         all calls to Create_Abstract_State to pass the proper state
10362         "declaration".
10363         (Create_Abstract_State): Add new formal parameter
10364         State_Decl along with comment on usage. Establish a link between
10365         the abstract state entity and the state declaration.
10367 2014-02-06  Robert Dewar  <dewar@adacore.com>
10369         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
10370         comparison of unordered enumeration type.
10371         (Analyze_Attribute, case Max): Check for improper comparison of
10372         unordered enumeration type.
10373         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
10374         sem_util.adb.
10375         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
10376         Moved here from Sem_Res.
10378 2014-02-06  Robert Dewar  <dewar@adacore.com>
10380         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
10381         reformatting.
10383 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10385         * sem_ch6.adb (Process_Formals): Error message reformatting.
10387 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10389         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
10390         variable Spec. Do not inherit the null indicator from the
10391         subprogram body when generating the spec.
10393 2014-02-06  Robert Dewar  <dewar@adacore.com>
10395         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
10396         mixed case.
10398 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10400         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
10401         when the function has a foreign convention, but not if only the
10402         limited return type has such a convention.
10404 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10406         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
10407         variable Spec. Comment reformatting. Use Copy_Separate_Tree
10408         rather than New_Copy_Tree when building the corresponding
10409         subprogram declaration.
10411 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10413         * sem_prag.adb (Analyze_Global_Item): Remove
10414         the mode-related checks on abstract states with enabled external
10415         properties.
10416         (Property_Error): Removed.
10418 2014-02-06  Javier Miranda  <miranda@adacore.com>
10420         * lib-xref.adb (Generate_Reference): When
10421         generating the reference to the first private entity take care
10422         of handling swapped entities.
10424 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10426         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10427         gnatmetric.
10429 2014-02-06  Robert Dewar  <dewar@adacore.com>
10431         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
10432         than the word size when operating in Modify_Tree_For_C mode.
10433         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
10435 2014-02-06  Robert Dewar  <dewar@adacore.com>
10437         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
10438         compare is case insensitive.
10439         * gnat_rm.texi: Document that string compare for Warnings Off
10440         is now case insensitive.
10442 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
10444         * gnat_rm.texi: Small wording tweak.
10446 2014-02-06  Pascal Obry  <obry@adacore.com>
10448         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
10449         and Included_Artifact_Patterns attribute definitions.
10451 2014-02-06  Yannick Moy  <moy@adacore.com>
10453         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
10454         SPARK_Mode pragma component for all subprograms, including stubs.
10456 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10458         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
10459         the configuration options of the enclosing context in a
10460         stack-like fasion.
10461         (Analyze_Subprogram_Body_Stub): Maintain the
10462         configuration options of the enclosing context in a stack-like
10463         fashion.
10465 2014-02-06  Robert Dewar  <dewar@adacore.com>
10467         * debug.adb: -gnatd.u sets Modify_Tree_For C
10468         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
10469         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
10470         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
10471         * exp_intr.adb (Expand_Shift): Call expander so we do
10472         Modify_Tree_For_C expansions.
10473         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10474         if -gnatd.u set.
10476 2014-02-06  Fedor Rybin  <frybin@adacore.com>
10478         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
10479         after the phase 1 of the processing of each aggregated project
10480         to get access to project trees of aggregated projects.
10481         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
10482         If specified, On_New_Tree_Loaded is called after each aggregated
10483         project has been processed succesfully.
10484         (Process): new parameter On_New_Tree_Loaded.
10485         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
10486         callback added after processing of each aggregated project.
10487         (Recursive_Process): new parameter On_New_Tree_Loaded.
10488         (Process): new parameter On_New_Tree_Loaded.
10489         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
10490         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
10491         On_New_Tree_Loaded.
10492         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
10493         On_New_Tree_Loaded.
10495 2014-02-06  Bob Duff  <duff@adacore.com>
10497         * gnat_ugn.texi: Implement --insert-blank-lines and
10498         --preserve-blank-lines switches.
10500 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10502         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10503         gnatelim.
10505 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
10507         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10508         of the pragma on individual objects.
10510 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10512         * einfo.adb Node29 is now used as BIP_Initialization_Call.
10513         (BIP_Initialization_Call): New routine.
10514         (Set_BIP_Initialization_Call): New routine.
10515         (Write_Field29_Name): Add an entry for constants and variables.
10516         * einfo.ads Add new attribute BIP_Initialization_Call and update
10517         its usage in nodes.
10518         (BIP_Initialization_Call): New routine along with pragma Inline.
10519         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10520         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10521         Add local declaration Res_Decl. Capture the build-in-place
10522         initialization call when the related object declaration has
10523         created a transient block.
10524         * exp_ch7.adb (Process_Transient_Objects): Add local variable
10525         Fin_Insrt. Recognize a scenario where an object declaration acts
10526         as a transient context and is initialized by a build-in-place
10527         function call.
10529 2014-02-06  Pascal Obry  <obry@adacore.com>
10531         * prj-util.adb (For_Interface_Sources): Fix handling of required
10532         bodies for aggregate libs.
10534 2014-02-06  Robert Dewar  <dewar@adacore.com>
10536         * nlists.ads: Minor comment clarifications.
10538 2014-02-06  Robert Dewar  <dewar@adacore.com>
10540         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10541         if gnatd.V set.
10542         * opt.ads (Modify_Tree_For_C): New flag.
10543         * output.ads, output.adb (Last_Char): New function.
10545 2014-02-06  Pascal Obry  <obry@adacore.com>
10547         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
10548         share/gpr for cross-builds.
10550 2014-02-06  Robert Dewar  <dewar@adacore.com>
10552         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
10553         Minor reformatting and code clean ups.
10555 2014-02-06  Pascal Obry  <obry@adacore.com>
10557         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
10558         * prj.ads: Minor typo fix in comment.
10560 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10562         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
10563         local variable Expr. Flag clauses with extra parenthesis as this
10564         is not allowed by the syntax of the pragma. Code reformatting.
10566 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10568         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
10569         variables. Rename variabme Tnn to Temp. Do not create a temporary
10570         if assertions are disabled. Find enclosing routine _Postconditions
10571         and insert the temporary that captures the value of the prefix
10572         before the routine.
10573         * exp_ch6.adb (Build_Postconditions_Procedure):
10574         Insert the generated _Postconditions routine
10575         before the first source declaration of the related
10576         subprogram.
10577         (Insert_After_Last_Declaration): Removed.
10578         (Insert_Before_First_Source_Declaration): New routine.
10580 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10582         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
10583         Utility to determine whether current expansion is for the body
10584         of a predefined primitive operation.
10585         (Make_Predicate_Check): Use Within_Internal_Subpgram
10586         * checks.adb (Apply_Predicate_Check): Use
10587         Within_Internal_Subprogram
10588         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
10590 2014-02-06  Pascal Obry  <obry@adacore.com>
10592         * prj.ads, prj-util.adb: Minor reformatting.
10594 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10596         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
10597         Take into account the Split_PPC flag to ensure that conjuncts
10598         in a composite postcondition aspect are tested in source order.
10600 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10602         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
10603         use of SPARK_Mode.
10604         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
10605         illegal use of SPARK_Mode.
10606         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
10607         * sem_prag.adb (Analyze_Pragma): Code reformatting.
10608         * sem_util.adb Add with and use clause for Aspects.
10609         (Check_SPARK_Mode_In_Generic): New routine.
10610         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
10612 2014-02-06  Thomas Quinot  <quinot@adacore.com>
10614         * a-calend.adb (Formatting_Operations.Split): Ensure that
10615         Time_Error is raised for invalid time values.
10617 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
10619         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
10620         in GNATprove_Mode.
10622 2014-02-06  Robert Dewar  <dewar@adacore.com>
10624         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
10625         * exp_ch3.adb (Build_Dcheck_Function): Set
10626         Is_Discriminant_Check_Function.
10628 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10630         * exp_ch7.adb (Is_Subprogram_Call): Inspect
10631         the original tree in certain cases where a construct has been
10632         factored out and replaced by a reference to a temporary.
10634 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10636         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
10637         parameters when propagating predicate function to full view.
10638         (Find_Type_Of_Object): Freeze base type of object type to catch
10639         premature use of discriminated private type without a full view.
10641 2014-02-06  Robert Dewar  <dewar@adacore.com>
10643         * sprint.adb: Minor reformatting.
10645 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10647         * exp_ch4.adb (Process_Transient_Object): Add local variable
10648         Temp_Ins. When the transient object is initialized by an
10649         aggregate, the hook must capture the object after the last
10650         component assignment takes place.
10651         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
10652         routine Is_Subprogram_Call.
10653         (Is_Subprogram_Call): Inspect an
10654         aggregate that has been heavily expanded for subprogram calls.
10655         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
10656         and Temp_Ins.  Remove the nested declare block and adjust the
10657         indentation. When the transient object is initialized by an
10658         aggregate, the hook must capture the object after the last
10659         component assignment takes place.
10661 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10663         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
10664         external states with enabled properties that do not match the
10665         global mode.
10666         (Property_Error): New routine.
10667         * sem_res.adb (Property_Error): New routine.
10668         (Resolve_Actuals): Detect illegal uses of external variables with
10669         enabled properties in procedure calls that do not match the mode of
10670         the corresponding formal parameter.
10672 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10674         * sem_util.adb (Has_Enabled_Property): Rename
10675         formal parameter Prop_Nam to Property. Update the comment on usage
10676         and all occurrences in the body. Add local variable Prop_Nam. When
10677         inspecting a property with an expression, the property name
10678         appears as the first choice of the component association.
10680 2014-02-04  Robert Dewar  <dewar@adacore.com>
10682         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
10684 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10686         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
10687         for consistency with other messages.
10689 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10691         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
10692         iterator, indicate that the element is a constant if the container
10693         type does not have a variable indexing aspect.
10694         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
10695         marked as constant, do not reset its Ekind, to ensure that
10696         container elements in an element loop are not modified if the
10697         container (e.g. a hashed set) only has a constant indexing aspect.
10699 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
10701         * g-souinf.ads: Subprograms in this unit are actually not pure.
10702         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
10703         * einfo.ads (Is_Pure): Update doc to match implementation.
10705 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10707         * exp_ch13.adb: Minor spelling fix.
10709 2014-02-04  Robert Dewar  <dewar@adacore.com>
10711         * opt.ads: Minor comment update.
10713 2014-02-04  Robert Dewar  <dewar@adacore.com>
10715         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
10716         instead of Replace.
10718 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10720         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
10721         on null expressions if component type is non-null, when the
10722         corresponding association covers an empty range of index values.
10724 2014-02-04  Robert Dewar  <dewar@adacore.com>
10726         * sinfo.ads: Further comments on N_Expression_With_Actions node.
10728 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
10730         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
10731         variables Out_Items and Ref_Global. Remove local constant
10732         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
10733         and D8. Remove the useless collection of global items as this
10734         was a leftover from an earlier version of the routine. Move
10735         several routines out to avoid deep nesting and indentation.
10736         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
10737         parameter Do_Checks to Post_Errors. Update the comment on usage.
10738         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
10739         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
10740         to Post_Errors. Update the comment on usage. Account for the
10741         case where a self referential state may have a null input_list.
10742         (Is_Self_Referential): New routine.
10744 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10746         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
10747         entity renames an expression, as in the case of an object of
10748         an unconstrained type initialized by a function call, defer the
10749         rewriting of the expression to the expander.
10750         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
10751         'Alignment): If the entity renames an expression, introduce
10752         temporary to capture value, and rewrite original declaration to
10753         use temporary.
10755 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
10757         * g-comlin.adb: Minor typo fix.
10759 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
10761         * freeze.adb (Freeze_All): Types derived from a formal
10762         access_to_classwide type do not have a finalization master.
10764 2014-02-04  Robert Dewar  <dewar@adacore.com>
10766         * sprint.adb: Minor reformatting.
10768 2014-02-04  Robert Dewar  <dewar@adacore.com>
10770         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
10771         cases where Actions is a null list.
10772         * sinfo.ads (N_Expression_With_Actions): Actions can be
10773         temporarily empty during semantic analysis, but must be non-empty
10774         in the final expanded tree.
10776 2014-01-31  Robert Dewar  <dewar@adacore.com>
10778         * exp_ch9.adb: Minor reformatting.
10780 2014-01-31  Emmanuel Briot  <briot@adacore.com>
10782         * g-comlin.adb (Set_Command_Line): Take the switches
10783         configuration from the Command_Line_Config.
10785 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10787         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
10788         refinement clause.
10790 2014-01-31  Vincent Celier  <celier@adacore.com>
10792         * projects.texi: Add more documentation about others used as an
10793         index in indexed attributes.
10795 2014-01-31  Robert Dewar  <dewar@adacore.com>
10797         * gnat_ugn.texi: Minor update.
10798         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
10799         * exp_util.adb: Minor reformatting.
10801 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10803         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
10804         depends on data that is not private to the protected object,
10805         and potentially modifiable in unsynchronized fashion.
10807 2014-01-31  Yannick Moy  <moy@adacore.com>
10809         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
10810         GNATprove_Mode.
10812 2014-01-31  Robert Dewar  <dewar@adacore.com>
10814         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
10815         for Unknown_Package.
10816         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
10818 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10820         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
10821         the logic that generates a runtime check to determine the
10822         controlled status of the object about to be allocated or
10823         deallocated. Class-wide types now always use a runtime check
10824         even if they appear as generic actuals.
10825         (Find_Object): Detect
10826         a special case that involves interface class-wide types because
10827         the object appears as a complex expression.
10829 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10831         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
10832         subprogram with an incomplete untagged formals on the list of
10833         private dependents, to verify that the type is properly completed
10834         in the private part.
10835         * sem_attr.adb: Code clean up.
10837 2014-01-31  Robert Dewar  <dewar@adacore.com>
10839         * exp_ch6.adb: Minor reformatting.
10841 2014-01-31  Vincent Celier  <celier@adacore.com>
10843         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
10844         when Pkg is unknown.
10846 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
10848         * sem_res.adb (Resolve_Entity_Name): Comment
10849         reformatting. Allow volatile objects in various generated checks.
10851 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10853         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
10854         component association, set the etype of the identifier, for
10855         SPARK use.
10857 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
10859         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
10860         declared in a package, not checks can apply to the subprogram.
10862 2014-01-31  Robert Dewar  <dewar@adacore.com>
10864         * erroutc.adb (Validate_Specific_Warnings): Warnings are
10865         controlled -gnatw.W.
10866         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
10867         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
10869 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
10871         * exp_disp.adb: Update comments.
10873 2014-01-31  Yannick Moy  <moy@adacore.com>
10875         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
10876         Save_Global_References): Guard access to expression in aspect.
10878 2014-01-31  Yannick Moy  <moy@adacore.com>
10880         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
10881         Issue an error when the pragma is applied to a generic unit,
10882         a generic declaration, or inside a generic.
10884 2014-01-31  Yannick Moy  <moy@adacore.com>
10886         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
10887         entity.
10889 2014-01-31  Robert Dewar  <dewar@adacore.com>
10891         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
10892         reformatting.
10894 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10896         * exp_disp.adb: Add a historic note.
10898 2014-01-31  Robert Dewar  <dewar@adacore.com>
10900         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
10901         Process_Deferred_References.
10903 2014-01-31  Yannick Moy  <moy@adacore.com>
10905         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
10906         ineffective pragma Warnings(Off) in GNATprove_Mode.
10908 2014-01-31  Bob Duff  <duff@adacore.com>
10910         * s-taskin.ads: Minor comment fix.
10911         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
10912         just direct dependents. If this is actually an abort, each task
10913         will take care of aborting its dependents, so all dependents will
10914         get aborted, as before. However, when this is called the second
10915         time from Vulnerable_Complete_Master "for convenience" (i.e. to
10916         kill off tasks waiting at terminate alternatives), aborting
10917         indirect dependents is wrong, because it causes some unrelated
10918         tasks to get aborted.
10920 2014-01-31  Robert Dewar  <dewar@adacore.com>
10922         * sem_ch4.adb: Minor reformatting.
10924 2014-01-31  Robert Dewar  <dewar@adacore.com>
10926         * exp_ch2.adb: New calling sequence for Is_LHS.
10927         * frontend.adb: Add call to Process_Deferred_References.
10928         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
10929         (Deferred_References): New table.
10930         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
10931         entries.
10932         (Find_Expanded_Name): Ditto.
10933         * sem_res.adb: New calling sequence for Is_LHS.
10934         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
10935         * sem_warn.adb: Call Process_Deferred_References before issuing
10936         warnings.
10938 2014-01-31  Tristan Gingold  <gingold@adacore.com>
10940         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
10941         use of System_Tasking_Protected_Objects_Single_Entry.
10942         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
10943         of Protected_Single_Entry_Call.
10944         (Expand_N_Timed_Entry_Call): Remove single_entry case.
10945         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
10946         single_entry case.
10947         (Make_Disp_Timed_Select_Body): Likewise.
10948         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
10949         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
10950         Self_Id parameter.
10951         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
10952         (Wait_For_Completion_With_Timeout): Remove.
10953         (Protected_Single_Entry_Call): Remove Mode parameter
10954         (always Simple_Call).
10955         (Service_Entry): Remove Self_Id constant (not used anymore).
10956         (Timed_Protected_Single_Entry_Call): Remove.
10957         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
10958         (Protected_Single_Entry_Call): Remove Mode parameter.
10960 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10962         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
10963         * einfo.ads (Get_Pragma): Update the comment on special pragmas
10964         handled by this routine.
10965         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
10966         to the contract of the related subprogram body.
10967         * sem_util.adb (Add_Contract_Item): Handle the insertion of
10968         pragma Refined_Post into the contract of a subprogram body.
10969         * sinfo.ads Update the documentation of node N_Contract.
10970         * sem_res.adb (Resolve_Entity_Name): Add a guard
10971         to detect abstract states and variables only when checking the
10972         SPARK 2014 rules concerning volatile object placement.
10974 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
10976         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
10977         null is compatible with any access type.
10979 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10981         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
10982         placement is not in a package.
10984 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
10986         * sem_util.adb (Has_Enabled_Property): Compare the character field of
10987         the sole property.
10989 2014-01-29  Robert Dewar  <dewar@adacore.com>
10991         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
10992         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
10993         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
10995 2014-01-29  Robert Dewar  <dewar@adacore.com>
10997         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
10998         * sem_warn.adb (Check_References): Suppress warnings if inside
10999         Initial_Condition pragma.
11001 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11003         * sem_prag.adb (Check_Missing_Part_Of): List all values of
11004         State_Space_Kind for readability reasons. Do not emit an error on
11005         a private item when the enclosing package lacks aspect/pragma
11006         Abstract_State. Do not emit an error on a private package
11007         instantiation when the corresponding generic template lacks
11008         visible state.
11009         (Has_Visible_State): New routine.
11010         * sem_util.adb (Find_Placement_In_State_Space): The visible
11011         declarations of any kind of child units in general act as proper
11012         placement location.
11014 2014-01-29  Robert Dewar  <dewar@adacore.com>
11016         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
11017         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
11018         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
11019         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
11020         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
11021         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
11022         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
11023         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
11024         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
11025         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
11026         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
11027         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
11028         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
11029         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
11030         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
11031         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
11032         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
11033         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
11034         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
11035         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
11036         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
11037         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
11038         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
11039         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
11040         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
11041         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
11042         s-regpat.adb, s-secsta.adb, s-stalib.ads,
11043         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
11044         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
11045         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
11046         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
11047         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
11049 2014-01-29  Robert Dewar  <dewar@adacore.com>
11051         * expander.adb: Minor reformatting.
11053 2014-01-29  Javier Miranda  <miranda@adacore.com>
11055         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
11056         previous patch.
11058 2014-01-29  Javier Miranda  <miranda@adacore.com>
11060         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
11061         that checks if an interface types defines the predefined "="
11062         function because the compiler was erroneously not generating the
11063         predefined "=" primitive as soon as the name of some interface
11064         primitive is "=" (formals were not checked).
11066 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11068         * expander.adb (Expander): In GNATprove mode, do not process
11069         transient scopes: they are in general not created in this mode,
11070         and an attempt to examine them will lead to constraint errors when
11071         processing configuration pragmas that have analyzable expressions.
11073 2014-01-29  Vincent Celier  <celier@adacore.com>
11075         * clean.adb (Gnatclean): Fail if main project is an aggregate
11076         project or if there is an aggregate library project in the
11077         project tree.
11078         * gnatcmd.adb: Fail if the main project is an aggregate project
11079         or if there is an aggegate library project in the project tree.
11080         * make.adb (Initialize): : Fail if main project is an aggregate
11081         project or if there is an aggregate library project in the
11082         project tree.
11083         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
11084         * prj-makr.adb (Initialize): Fail if the main project is an
11085         aggregate project or an aggregate library project.
11087 2014-01-29  Vincent Celier  <celier@adacore.com>
11089         * prj-part.adb (Check_Import_Aggregate): New procedure
11090         to check if an imported project is an aggregate project.
11091         (Parse_Single_Project): Call Check_Import_Aggregate
11092         * projects.texi: Document that aggregate projects cannot be
11093         extended or imported.
11095 2014-01-29  Robert Dewar  <dewar@adacore.com>
11097         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
11098         reformatting and code clean up.
11099         * gnat_ugn.texi: Add documentation section on Atomic Variables
11100         and Optimization.
11102 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11104         * einfo.adb Flag264 is now unused.
11105         (Has_Body_References): Removed.
11106         (Set_Has_Body_References): Removed.
11107         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
11108         * einfo.ads Update the comment on usage of attribute
11109         Body_References. Remove attribute Has_Body_References and its
11110         usage in nodes.
11111         (Has_Body_References): Removed along with pragma Inline.
11112         (Set_Has_Body_References): Removed along with pragma Inline.
11113         * sem_prag.adb (Analyze_Global_Item): Move the call to
11114         Record_Possible_Body_Reference in the state related checks
11115         section. Add a comment intended function.
11116         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
11117         in the state related checks section. Add a comment intended function.
11118         (Analyze_Refinement_Clause): Cleanup the illegal body reference
11119         reporting. Add a comment on timing of error reporting.
11120         (Record_Possible_Body_Reference): Reimplement the routine.
11122 2014-01-29  Vincent Celier  <celier@adacore.com>
11124         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
11125         unit-based languages.
11126         (Mains.Complete_Mains.Do_Complete): Use the source file project
11127         tree when calling Find_File_Add_Extension. Use the correct
11128         project name when reporting an error.
11130 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11132         * aspects.adb Add an entry for aspect Part_Of in table
11133         Canonical_Aspect.
11134         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
11135         Aspect_Argument, Aspect_Names and Aspect_Delay.
11136         * atree.h Define Elist9.
11137         * atree.adb (Elist9): New routine.
11138         (Set_Elist9): New routine.
11139         * atree.ads (Elist9): New routine.
11140         (Set_Elist9): New routine.
11141         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
11142         the list of node usage.  Remove Refined_State from the list of
11143         node usage.
11144         (Encapsulating_State): New routine.
11145         (Get_Pragma):
11146         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
11147         (Refined_State): Removed.
11148         (Set_Encapsulating_State): New routine.
11149         (Set_Part_Of_Constituents): New routine.
11150         (Set_Refined_State): Removed.
11151         (Write_Field9_Name): Add an entry
11152         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
11153         Encapsulating_State. Remove the entry for Refined_State.
11154         * einfo.ads Add new attributes Encapsulating_State
11155         and Part_Of_Constituents alond with their usage in
11156         entities. Remove attribute Refined_State along with its
11157         usage in entities.
11158         (Encapsulating_State): New routine and
11159         pragma Inline.  (Get_Pragma): Update the comment on usage.
11160         (Part_Of_Constituents): New routine and pragma Inline.
11161         (Refined_State): Removed along with pragma Inline.
11162         (Set_Encapsulating_State): New routine and pragma Inline.
11163         (Set_Part_Of_Constituents): New routine and pragma Inline.
11164         (Set_Refined_State): Removed along with pragma Inline.
11165         * par-prag.adb Pragma Part_Of does not need any special processing
11166         by the parser.
11167         * sem_ch3.adb (Analyze_Declarations): Remove local variables
11168         Body_Id and Prag. Call separate routines to analyze the
11169         contract of a package [body].
11170         (Analyze_Object_Contract):
11171         Update the comment on usage. Remove local variables
11172         Items and Nam. Use Get_Pragma rather than traversing the
11173         classification list.  Verify whether the lack of indicator
11174         Part_Of agrees with the placement of the variable in state space.
11175         (Analyze_Object_Declaration): Initialize the encapsulating state
11176         of a variable.  (Requires_State_Refinement): Moved to sem_util.
11177         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
11178         (Analyze_Package_Contract): New routine.
11179         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
11180         (Analyze_Package_Contract): New routine.
11181         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
11182         state and Part_Of constituents.
11183         * sem_ch13.adb (Analyze_Aspect_Specifications):
11184         Add processing for aspect Part_Of. Update all
11185         calls to Decorate_Delayed_Aspect_And_Pragma.
11186         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
11187         not need any special processing at freeze time.
11188         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
11189         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
11190         update the associated comment.
11191         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
11192         (Analyze_Abstract_State): Add new global variable State_Id. Remove
11193         local constants Errors and Loc. Remove local variables Is_Null
11194         and State_Nam. Create the entity of the abstract state on the
11195         spot, before all remaining checks are performed. Verify that a
11196         missing Part_Of option agrees with the placement of the abstract
11197         state within the state space.
11198         (Analyze_Depends_In_Decl_Part):
11199         Add new global variables Constits_Seen and States_Seen. Check
11200         that a state and a corresponding constituent do not appear
11201         in pragma [Refined_]Depends.
11202         (Analyze_Global_In_Decl_Part):
11203         Add new global variables Constits_Seen and States_Seen. Check
11204         that a state and a corresponding constituent do not appear
11205         in pragma [Refined_]Global.
11206         (Analyze_Global_Item):
11207         Remove the now obsolete code that deals with Part_Of.
11208         Add the entity of the global item to the list of processed
11209         items.  (Analyze_Initializes_In_Decl_Part): Add new global
11210         variables Constits_Seen and States_Seen. Check that a state
11211         and a corresponding constituent do not appear in pragma
11212         Initializes.
11213         (Analyze_Initialization_Item): Add the entity
11214         of the initialization item to the list of processed items.
11215         (Analyze_Input_Item): Add the entity of the initialization
11216         item to the list of processed items.
11217         (Analyze_Input_Output):
11218         Remove the now obsolete code that deals with Part_Of.  Add the
11219         entity of the input/output to the list of processed items.
11220         (Analyze_Part_Of): New routine.
11221         (Analyze_Part_Of_Option): Remove
11222         local constant Par_State. Add local constant Encaps and local
11223         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
11224         the option. Turn the related state into a Part_Of constituent
11225         if the option is legal.
11226         (Analyze_Pragma): Add processing
11227         for pragma Part_Of.
11228         (Analyze_Refined_State_In_Decl_Part):
11229         Remove global constants Pack_Body and Spec_Id. Remove
11230         global variables Abstr_States and Hidden_States. Add new
11231         global variables Available_States, Body_Id, Body_States and
11232         Spec_Id. Add new local constant Body_Decl. Reimplement the
11233         logic that extracts the states available for refinement from
11234         the related package and the body hidden states of the said
11235         package.
11236         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
11237         (Check_Applicable_Policy): Alphabetize body.
11238         (Check_Dependency_Clause): Replace Refined_State
11239         with Encapsulating_State.
11240         (Check_Matching_Constituent):
11241         Reimplement the logic that determines whether an item is a valid
11242         / invalid constituent of the current refined state. Return when
11243         a construct does not denote a valid abstract state. Extract the
11244         list of Part_Of constituents for further analysis. Check that all
11245         Part_Of constituents of a state have been used in its refinement.
11246         (Check_Matching_State): Update the comment on usage. Operate
11247         on the list of available states.
11248         (Check_Missing_Part_Of): New routine.
11249         (Check_Refined_Global_Item): Replace Refined_State
11250         with Encapsulating_State.
11251         (Check_State_And_Constituent_Use): New routine.
11252         (Create_Abstract_State): New routine.
11253         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
11254         (Is_Part_Of): Removed.
11255         (Collect_Body_States): New routine.
11256         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
11257         (Collect_Hidden_States): Removed.
11258         (Report_Unrefined_States): Change the profile of the procedure along
11259         with the comment on usage.
11260         (Report_Unused_Constituents): New routine.
11261         (Report_Unused_Hidden_States): Removed.
11262         (Report_Unused_States): New routine.
11263         * sem_prag.ads (Check_Missing_Part_Of): New routine.
11264         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
11265         appear in the classification pragmas of a package instantiation
11266         or a variable.
11267         (Find_Placement_In_State_Space): New routine.
11268         (Is_Child): Removed.
11269         (Is_Child_Or_Sibling): Remove formal
11270         parameter Private_Child. Remove the private child checks.
11271         (Requires_State_Refinement): Moved from sem_ch3.
11272         * sem_util.ads Add new type State_Space_Kind along with
11273         comment on its usage and values.
11274         (Add_Contract_Item): Update the comment on usage.
11275         (Find_Body_Discriminal): Alphabetize spec.
11276         (Find_Placement_In_State_Space): New routine.
11277         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
11278         and update the comment on usage.
11279         (Requires_State_Refinement): Moved from sem_ch3.
11280         * sinfo.ads: Update the documentation of N_Contract.
11281         * snames.ads-tmpl The predefined name for Part_Of is now used
11282         to denote a pragma. Add Pragma_Id for Part_Of.
11284 2014-01-29  Emmanuel Briot  <briot@adacore.com>
11286         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
11287         machine as needed.
11288         (Dump): New subprogram.
11290 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11292         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
11293         Expand_Entry_Declaration to factorize code.
11295 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11297         * checks.adb: minor clarification.
11298         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
11299         search for primitive operations to the entities that immediately
11300         follow the type declaration.
11302 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11304         * exp_ch9.adb (Build_Protected_Entry): Do not call
11305         Complete_Entry_Body anymore.
11306         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
11307         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
11309 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
11311         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
11312         string when the Name input bigger than allowed. Adapt the function
11313         specification.
11315 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11317         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
11318         if expression is within a case_expression of if_expression.
11320 2014-01-29  Robert Dewar  <dewar@adacore.com>
11322         * exp_ch9.adb, inline.ads: Minor reformatting.
11324 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11326         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
11328 2014-01-29  Yannick Moy  <moy@adacore.com>
11330         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
11331         SPARK_Mode_Pragma components to be able to analyze generic
11332         instance.
11333         * sem_ch12.adb (Analyze_Package_Instantiation,
11334         Inline_Instance_Body, Need_Subprogram_Instance_Body,
11335         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
11336         for future analysis of the instance.
11337         (Instantiate_Package_Body,
11338         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
11339         from instantiation to analyze the instance.
11341 2014-01-29  Robert Dewar  <dewar@adacore.com>
11343         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
11344         reorganization.
11346 2014-01-29  Yannick Moy  <moy@adacore.com>
11348         * gnat_rm.texi: Update description of SPARK_Mode pragma.
11350 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11352         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
11354 2014-01-29  Thomas Quinot  <quinot@adacore.com>
11356         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
11358 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11360         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
11361         resulting string is an internal entity. and thus requires no
11362         initialization. This is relevant when Initialize_ Scalars is
11363         enabled, because the resultant spurious initialization may lead to
11364         secondary stack anomalies that produce a mangled name for a task.
11366 2014-01-29  Yannick Moy  <moy@adacore.com>
11368         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
11369         not inherited from spec anymore. Check consistency
11370         rules after processing of declarations.
11371         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
11372         from spec anymore. Check consistency rules after processing of
11373         declarations.
11374         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
11375         packages.
11376         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
11377         consistency rules.
11379 2014-01-27  Robert Dewar  <dewar@adacore.com>
11381         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
11382         to unordered msg.
11383         (Resolve_Range): Add type name/location to unordered msg.
11385 2014-01-27  Claire Dross  <dross@adacore.com>
11387         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
11388         Capacity) is only called with Capacity >= Length (Source) and
11389         Capacity in Capacity_Range.
11390         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
11391         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
11392         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
11393         in the code is this is not the case.
11395 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11397         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
11398         selected component in an instance where the component of the
11399         actual is not visibile at instantiation.
11401 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11403         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
11404         has a dynamic predicate, generate freeze node for Actual_Subtype
11405         at once, because the declaration of the corresponding predicate
11406         function will make reference to it.
11408 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11410         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
11412 2014-01-27  Robert Dewar  <dewar@adacore.com>
11414         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
11415         for 2**X optimization.
11417 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11419         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
11420         explicitly whether value is in range of Character, because the
11421         library is typically compiled with range checks disabled, and
11422         we cannot rely on the implicit check on the argument of 'Val.
11424 2014-01-27  Vincent Celier  <celier@adacore.com>
11426         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
11427         not the Target to itself.
11429 2014-01-27  Robert Dewar  <dewar@adacore.com>
11431         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
11432         changes to avoid incorrect use of unordered enum types.
11434 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11436         * sem_ch4.adb: Minor reformatting.
11438 2014-01-27  Robert Dewar  <dewar@adacore.com>
11440         * scn.adb (Check_End_Of_Line): Removed.
11441         (Error_Long_Line): Removed.
11442         (Determine_License): Use versions of above routines from Scanner.
11443         * scng.adb (Check_End_Of_Line): Moved to spec.
11444         (Error_Long_Line): Removed, no longer used.
11445         * scng.ads (Check_End_Of_Line): Moved here from body.
11447 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11449         * exp_ch7.adb (Build_Cleanup_Statements): Call
11450         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
11451         for protected body.
11452         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
11453          Remove Service_Name variable.
11454         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
11455         factorize code from the above subprograms.
11456         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
11458 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
11460         * einfo.adb (Has_Option): Reimplemented.
11461         * sem_prag.adb (Analyze_Refinement_Clause): Add global
11462         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
11463         External_Constit_Seen and State. Add local variables Body_Ref,
11464         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
11465         avoid a cumbersome while pool. Verify the legality of an external
11466         state and relevant properties.
11467         (Check_External_Property): New routine.
11468         (Check_Matching_State): Remove parameter profile
11469         and update comment on usage.
11470         (Collect_Constituent): Store the
11471         relevant external property of a constituent.
11472         * sem_util.adb (Async_Readers_Enabled): Update the call to
11473         Has_Enabled_Property.
11474         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
11475         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
11476         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
11477         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
11478         Update comment on usage. Reimplement the logic to recognize the various
11479         formats of properties.
11481 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11483         * par-ch5.adb: Minor reformatting.
11485 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11487         * s-tposen.ads: Harmonize style and comments.
11489 2014-01-27  Vincent Celier  <celier@adacore.com>
11491         * projects.texi: Document that shared library projects, by
11492         default, cannot import projects that are not shared library
11493         projects.
11495 2014-01-27  Robert Dewar  <dewar@adacore.com>
11497         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
11498         of Rewrite.
11500 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11502         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
11503         any other exception is raised.
11504         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
11505         still necessary to perform a conversion in order to remove overlong
11506         encodings.
11508 2014-01-27  Robert Dewar  <dewar@adacore.com>
11510         * exp_smem.adb: Minor reformatting.
11512 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11514         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11516 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11518         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11519         nodes for operands to the original node for the call, to preserve
11520         Original_Node pointers within the resolved operands, given that
11521         they may have been rewritten as well. Previous approach copied
11522         the operands into a new tree and lost those pointers.
11524 2014-01-27  Claire Dross  <dross@adacore.com>
11527         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11529 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11531         * sem_util.adb (Check_Internal_Protected_Use): A call through
11532         an anonymous access parameter of the current protected function
11533         is not a potential modification of the current object.
11535 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11537         * a-cobove.adb (Reserve_Capacity): Procedure raises
11538         Capacity_Error, not Constraint_Error, when request cannot be
11539         satisfied.
11541 2014-01-27  Vincent Celier  <celier@adacore.com>
11543         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11544         not the Target to itself.
11546 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11548         * exp_ch4.adb (Expand_Concatenate): If the target of the
11549         concatenation is a library-level entity, always use the off-line
11550         version of concatenation, regardless of optimization level. This
11551         is space-efficient, and prevents linking problems when some
11552         units are compiled with different optimization levels.
11554 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11556         * sem_ch5.adb: Code clean up.
11558 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11560         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
11561         when an array or container iterator includes a subtype indication,
11562         which is only legal in an element iterator.
11564 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11566         * exp_ch7.adb: Minor reformatting.
11568 2014-01-27  Robert Dewar  <dewar@adacore.com>
11570         * opt.adb (SPARK_Mode): Default for library units is None rather
11571         than Off.
11572         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
11573         no longer ordered.
11574         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
11575         possibility.
11576         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
11578 2014-01-27  Robert Dewar  <dewar@adacore.com>
11580         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
11581         Suspicious_Labels table if we have identifier; followed by loop
11582         or block.
11583         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
11584         * par.adb (Suspicious_Labels): New table.
11586 2014-01-27  Robert Dewar  <dewar@adacore.com>
11588         * exp_aggr.adb (Check_Bounds): Reason is range check, not
11589         length check.
11591 2014-01-27  Yannick Moy  <moy@adacore.com>
11593         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
11594         reference.
11595         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
11596         function now.
11597         (Add_SPARK_Xrefs): Include references to constants.
11598         * spark_xrefs.ads Document new character 'c' for references to
11599         constants.
11601 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11603         * exp_smem.adb (Add_Write_After): For a function call, insert write as
11604         an after action in a transient scope.
11606 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11608         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
11609         to a shared variable as an OUT formal in a call to an init proc,
11610         the 'Read call must be emitted after, not before, the call.
11612 2014-01-27  Robert Dewar  <dewar@adacore.com>
11614         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
11616 2014-01-27  Robert Dewar  <dewar@adacore.com>
11618         * a-wichha.adb (Character_Set_Version): Change to output proper
11619         value.
11621 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
11623         * einfo.adb (Is_Input_Only_State): Removed.
11624         (Is_Non_Volatile_State): Removed.
11625         (Is_Output_State): Removed.
11626         * einfo.ads (Is_Input_Only_State): Remove attribute and
11627         subprogram. Update related entity.
11628         (Is_Non_Volatile_State):
11629         Remove attribute and subprogram. Update related entity.
11630         (Is_Output_State): Removed attribute and subprogram. Update
11631         related entity.
11632         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
11633         generated code.
11634         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
11635         an object, not just variables.
11636         (Analyze_Object_Contract): New routine.
11637         (Analyze_Variable_Contract): Removed.
11638         (Process_Discriminants): Detect an illegal use of volatile
11639         discriminant in SPARK mode.
11640         * sem_ch5.adb (Analyze_Iterator_Specification):
11641         Detect an illegal use of volatile loop variable.
11642         (Analyze_Loop_Parameter_Specification): Detect an illegal use
11643         of volatile loop variable.
11644         * sem_ch6.adb (Process_Formals): Update the volatile object
11645         detection. Detect an illegal formal of mode IN OUT or OUT in
11646         SPARK mode. Enhance the error messages with references.
11647         * sem_ch12.adb (Instantiate_Object): Update the volatile object
11648         detection. Enhance the error messages with references.
11649         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
11650         messages with references.
11651         (Analyze_Contract_Case): Enhance the error messages with references.
11652         (Analyze_External_Property): Call Check_Duplicate_Property to process
11653         an external property.
11654         (Analyze_External_Property_In_Decl_Part): New routine.
11655         (Analyze_External_State_In_Decl_Part): Removed.
11656         (Analyze_Global_Item): Detect an illegal
11657         use of a volatile constant. Detect an illegal use
11658         of a variable with enabled Effective_Reads. Enhance
11659         the error messages with references. Remove obsolete
11660         checks concerning Input_Only and Output_Only states.
11661         (Analyze_Initialization_Item): Enhance the error messages
11662         with references.
11663         (Analyze_Initializes_In_Decl_Part): Do not
11664         collect the states and variables when the initialization list
11665         is null.
11666         (Analyze_Input_Item): Enhance the error messages with references.
11667         (Analyze_Input_Output): Enhance the error messages with references.
11668         (Analyze_Pragma): Enhance the error messages with references.
11669         (Analyze_Refinement_Clause): Code reformatting.
11670         (Analyze_Refined_Depends_In_Decl_Part):
11671         Rename global variable Global to Reg_Global and update all
11672         occurrences. Add local variables D7 and D8. Update the error
11673         messages with references. Update the call to Collect_Global_Items.
11674         (Analyze_Refined_Global_In_Decl_Part): Add local variables
11675         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
11676         the call to Collect_Global_Items.  Account for a Proof_In state
11677         in null / useless refinement checks. Verify the coverage of
11678         Proof_In states.
11679         (Check_Dependency_Clause): Remove local variable
11680         Out_Constits. Remove the retrieval and removal of constituents
11681         for an Output_Only state. Remove the reporting of unused
11682         Output_Only state constituents.
11683         (Check_Duplicate_Mode): Enhance
11684         the error message with a reference.
11685         (Check_Duplicate_Property): New routine.
11686         (Check_Duplicate_Option): Enhance the error message with a reference.
11687         (Check_External_Properties): Enhance the error message with a reference.
11688         (Check_Function_Return): Enhance the error message with a reference.
11689         (Check_In_Out_States): Update
11690         comment on usage. Add a specialized error message for Proof_In
11691         constituents. Enhance the error message with a reference.
11692         (Check_Input_States): Update comment on usage. Account for
11693         possible Proof_In constituents. Enhance the error message
11694         with a areference.
11695         (Check_Matching_Constituent): Enhance the error message with a
11696         reference.
11697         (Check_Matching_State): Enchance the error message with a reference.
11698         (Check_Mode): Add local variable From_Global. Update the call to
11699         Find_Mode.  Emit more precise error messages concerning extra items
11700         (Check_Mode_Restriction_In_Enclosing_Context): Consider
11701         pragma Refined_Global.  Enhance the error message with a
11702         reference.
11703         (Check_Mode_Restriction_In_Function): Enhance the error message with
11704         a reference.
11705         (Check_Output_States): Update comment on usage. Add local variable
11706         Posted.  Account for possible Proof_In constituents. Produce a detailed
11707         list of missing constituents.
11708         (Check_Proof_In_States): New routine.
11709         (Check_Refined_Global_Item): Handle Proof_In
11710         constituents. Enchance the error message with a reference.
11711         (Collect_Global_Items): Add formal parameters Proof_In_Items
11712         and Has_Proof_In_State. Update the comment on usage. Account
11713         for Proof_In items.
11714         (Create_Or_Modify_Clause): Enchance
11715         the error message with a reference.
11716         (Find_Mode): Add
11717         formal parameter From_Global. Update the comment on usage.
11718         Detect when the mode is governed by pragma [Refined_]Global.
11719         (Output_Constituents): Removed.
11720         (Report_Extra_Constituents):
11721         Report extra Proof_In constituents.
11722         (Report_Unused_Constituents): Removed.
11723         (Usage_Error): Code reformatting. Enhance the error
11724         messages with reference.
11725         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
11726         (Analyze_External_State_In_Decl_Part): Removed.
11727         * sem_res.adb (Resolve_Actuals): Update the volatile object
11728         detection. Enhance the error message with a reference.
11729         (Resolve_Entity_Name): Update the volatile object
11730         detection. Enhance the error message with a reference.
11731         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
11732         (Is_SPARK_Volatile_Object): New routine.
11733         (Has_Volatile_Component): New routine.
11734         * sem_util.ads (Is_Delegate): Alphabetized.
11735         (Is_SPARK_Volatile_Object): New routine.
11736         (Has_Volatile_Component): New routine.
11737         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
11739 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11741         * sem_attr.adb: Resolve fully prefix of 'Update.
11743 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
11745         * gnat_rm.texi: Minor clarifications.
11747 2014-01-27  Robert Dewar  <dewar@adacore.com>
11749         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
11750         about call that is generated as part of an Initial_Condition
11751         check.
11752         * sem_prag.adb: Minor spelling correction.
11754 2014-01-27  Robert Dewar  <dewar@adacore.com>
11756         * sem_prag.adb (Set_Convention_From_Pragma): Check that
11757         convention Ghost can only apply to functions.
11758         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
11760 2014-01-27  Robert Dewar  <dewar@adacore.com>
11762         * gnat_ugn.texi: Add Short_Enums to documentation of
11763         -gnatet/-gnateT.
11765 2014-01-27  Robert Dewar  <dewar@adacore.com>
11767         * sem_prag.adb (Analyze_Input_Item): Correct check for input
11768         item in same package.
11769         * sem_util.ads, sem_util.adb (Within_Scope): New function.
11771 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
11773         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
11774         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
11775         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
11776         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
11777         maintained.
11779 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
11781         * gcc-interface/Makefile.in: Fix oversight.
11783 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
11785         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
11786         conversion from a thin pointer with a shifted value.
11787         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
11788         read-only flag from the values onto the result.
11789         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
11791 2014-01-25  Tristan Gingold  <gingold@adacore.com>
11793         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
11794         for E_Variable with a pragma Linker_Section.
11796 2014-01-25  Robert Dewar  <dewar@adacore.com>
11798         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
11799         with Default_Value aspect is passed in by copy.
11801 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11803         * set_targ.adb: Set Short_Enums.
11804         * gcc-interface/lang.opt (fshort-enums): New option.
11805         * gcc-interface/misc.c (gnat_handle_option): Handle it.
11806         (gnat_post_options): Do not modify the global settings.
11808 2014-01-24  Robert Dewar  <dewar@adacore.com>
11810         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
11811         function.
11812         (Random_Decimal_Fixed): New generic function.
11813         * s-rannum.ads: Minor comment clarifications.
11815 2014-01-24  Robert Dewar  <dewar@adacore.com>
11817         * back_end.adb: Remove Short_Enums handling (handled in
11818         Ttypes/Get_Targ now) Minor added comments.
11819         * freeze.adb: Change name Short_Enums_On_Target to
11820         Target_Short_Enums.
11821         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
11822         * opt.ads: Minor comment updates.
11823         * sem_ch13.adb: Change name Short_Enums_On_Target to
11824         Target_Short_Enums.
11825         * set_targ.adb: Set Short_Enums from gcc back end.
11826         * set_targ.ads (Short_Enums): New variable.
11827         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
11828         Ttypes/Get_Targ now).
11829         * ttypes.ads (Target_Short_Enums): New constant boolean switch
11831 2014-01-24  Pascal Obry  <obry@adacore.com>
11833         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
11835 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
11837         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
11838         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
11839         stripped off.
11841 2014-01-24  Robert Dewar  <dewar@adacore.com>
11843         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
11845 2014-01-24  Vincent Celier  <celier@adacore.com>
11847         * prj.adb (Add_Aggregated_Project): Do not add a project in
11848         the list if it is already there.
11850 2014-01-24  Yannick Moy  <moy@adacore.com>
11852         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
11853         Correct the search for a subrogram declaration to which a pragma is
11854         attached.
11856 2014-01-24  Bob Duff  <duff@adacore.com>
11858         * gnat_ugn.texi: Document --decimal-grouping and
11859         --based-grouping switches in gnatpp.
11861 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11863         * sinfo.ads: Documentation update.
11865 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11867         * sem_ch3.adb (Constant_Redeclaration): New declaration is
11868         illegal if previous one has an initial expression that is an
11869         aggregate expanded into assignments.
11871 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11873         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
11874         code reorganization to remove spurious warning on a loop with
11875         an array element iterator that has a null range.
11877 2014-01-24  Vincent Celier  <celier@adacore.com>
11879         * make.adb (Binding_Phase): When setting the Ada paths, use
11880         the library ALI dir, not the object dir in libraries.
11882 2014-01-24  Yannick Moy  <moy@adacore.com>
11884         * sinfo.ads: Add documentation of check flag fields.
11886 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11888         * sem_res.adb (Resolve_Actuals): If an actual is a view
11889         conversion of a discriminated object, and the formal type is
11890         discriminated and constrained, apply a discriminant check to
11891         the object itself.
11893 2014-01-24  Robert Dewar  <dewar@adacore.com>
11895         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
11897 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11899         * sem_ch3.adb (Analyze_Declarations): At the end of an
11900         appropriate declarative part, call Freeze_All from the first
11901         declaration in the scope, not from the first unfrozen one. This
11902         is necessary to apply visibility checks to entities with delayed
11903         aspects. Otherwise, in the presence of instantiations and cleanups
11904         that they may generate, the delayed aspects may be analyzed too
11905         late and produce spurious visibility errors.
11906         * sem_attr.adb: Place etype on range.
11907         * sem_ch6.adb: Documentation expression functions.
11909 2014-01-24  Robert Dewar  <dewar@adacore.com>
11911         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
11912         terminology in compiler).
11914 2014-01-24  Robert Dewar  <dewar@adacore.com>
11916         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
11917         categories, now that Ada 95 supports raise expressions.
11919 2014-01-24  Robert Dewar  <dewar@adacore.com>
11921         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
11922         Short_Enums_On_Target.
11923         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
11924         into account.
11925         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
11927 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11929         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
11930         indication is given explicity, check that it matches the array
11931         component type or the container element type of the domain
11932         of iteration.
11934 2014-01-24  Tristan Gingold  <gingold@adacore.com>
11936         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
11937         * gcc-interface/misc.c (flag_short_enums): Declare.
11938         (gnat_post_options): Set it.
11940 2014-01-24  Vincent Celier  <celier@adacore.com>
11942         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
11943         to cache the result when Including_Libraries is False.
11944         * prj-env.ads (Ada_Objects_Path): Update documentation
11945         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
11946         (Get_Object_Directory): Return the Library_Ali_Dir only when
11947         when Including_Libraries is True.
11948         * prj.ads (Get_Object_Directory): Fix and complete documentation
11949         (Project_Data): New component Ada_Objects_Path_No_Libs
11951 2014-01-24  Robert Dewar  <dewar@adacore.com>
11953         * checks.adb (Expr_Known_Valid): Result of fpt operator never
11954         considered valid.
11956 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
11958         * back_end.adb: Minor fix in comment.
11960 2014-01-24  Javier Miranda  <miranda@adacore.com>
11962         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
11963         required to report the error in case of task types.
11965 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11967         * sem_attr.adb: Additional index checking.
11969 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
11971         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
11972         expressions in each component association, and for records note
11973         the entity in each association choice, for subsequent resolution.
11974         (Resolve_Attribute, case 'Update): Complete resolution of
11975         expressions in each component association.
11977 2014-01-24  Robert Dewar  <dewar@adacore.com>
11979         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
11980         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
11981         leading to wrong handling of SPARK_Mode for library units).
11983 2014-01-24  Robert Dewar  <dewar@adacore.com>
11985         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
11986         on generic instances (do not consider them to be internally
11987         generated)
11989 2014-01-24  Doug Rupp  <rupp@adacore.com>
11991         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
11992         vice pthread_sigmask.
11994 2014-01-24  Vincent Celier  <celier@adacore.com>
11996         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
11997         not default.
11999 2014-01-24  Vincent Celier  <celier@adacore.com>
12001         * prj-ext.adb (Add): Do not output anything when Silent is True,
12002         whatever the verbosity. When Source is From_External_Attribute,
12003         set the corresponding environment variable if it is not already set.
12004         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
12005         to False
12006         * prj-proc.adb (Process_Expression_For_Associative_Array):
12007         For attribute External, call Prj.Ext.Add with Silent set to
12008         True for the child environment, to avoid useless output in non
12009         default verbosity.
12011 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12013         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
12014         range given by a subtype indication, and force evaluation of
12015         the bounds, as for a simple range.
12016         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
12017         of bounds of slice for various kinds of discrete ranges.
12018         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
12019         Evaluate_Slice_Bounds.
12021 2014-01-24  Bob Duff  <duff@adacore.com>
12023         * s-taskin.ads (Activator): Make this Atomic, because
12024         Activation_Is_Complete reads it, and that can be called
12025         from any task. Previously, this component was only
12026         modified by the activator before activation, and by
12027         Self after activation.
12028         * a-taside.ads, a-taside.adb (Environment_Task,
12029         Activation_Is_Complete): Implement these missing functions.
12031 2014-01-24  Doug Rupp  <rupp@adacore.com>
12033         * init.c: Add a handler section for Android.
12035 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
12037         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
12039 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12041         * sem_ch4.adb (Operator_Check): If one operand is a
12042         Raise_Expression, set its type to that of the other operand.
12043         * sem_res.adb (Resolve_Raise_Expression): new procedure.
12044         (Resolve_Actuals): For an actual that is a Raise_Expression,
12045         set the type to that of the formal.
12046         * sem_type.adb (Find_Unique_Type): If one of the operands is a
12047         Raise_Expression, return type of the other operand.
12049 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12051         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
12052         component of the record has a type with a default aspect, and
12053         the corresponding aggregate component is initiaized with a box,
12054         use the default value in the rewritten aggregate.
12056 2014-01-24  Tristan Gingold  <gingold@adacore.com>
12058         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
12059         s-interr-sigaction.adb,
12060         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
12061         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
12062         to the call to Install_Restricted_Handlers.
12064 2014-01-24  Emmanuel Briot  <briot@adacore.com>
12066         * prj-nmsc.adb (Check_File): Add protection when the source is
12067         not fully initialized.
12069 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12071         * sem_util.adb (Is_Post_State): In a postcondition, a selected
12072         component that denotes an implicit dereference is a reference
12073         to the post state of the subprogram.
12075 2014-01-24  Robert Dewar  <dewar@adacore.com>
12077         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
12078         for generated subprograms.
12079         (Analyze_Subprogram_Specification): Ditto.
12081 2014-01-24  Vincent Celier  <celier@adacore.com>
12083         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
12084         attributes in package Builder of aggregate and aggregate library
12085         projects.
12086         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
12087         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
12088         Remove parameters.  Change error message from "... externally
12089         build library ..." to "... externally built project ...".
12090         (Process_Naming_Scheme.Check): Do not do any check in aggregate
12091         project, as attribute Library_Dir and Library_Name have already
12092         been detected as forbidden.
12094 2014-01-24  Vincent Celier  <celier@adacore.com>
12096         * prj-env.adb (Find_Project): If cached project path is not in
12097         project directory, look in current directory first and use cached
12098         project path only if project is not found in project directory.
12100 2014-01-24  Robert Dewar  <dewar@adacore.com>
12102         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
12104 2014-01-24  Vincent Celier  <celier@adacore.com>
12106         * projects.texi: Document that aggregate projects are only
12107         supported by gprbuild, but not by gnatmake.  Document that the
12108         only attribute Switches in package Binder of aggregate projects
12109         will be ignored if its index is not others.  Document that
12110         attribute Global_Config_File is allowed in package Binder of
12111         aggregate projects.
12113 2014-01-24  Robert Dewar  <dewar@adacore.com>
12115         * sem_prag.adb: Minor code reorganization.
12116         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
12118 2014-01-24  Pascal Obry  <obry@adacore.com>
12120         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
12121         attribute definition.
12123 2014-01-24  Vincent Celier  <celier@adacore.com>
12125         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
12126         in the Queue the same source (same path, same multi-source index)
12127         from the same project file, to avoid compiling several times
12128         the same source.
12130 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
12132         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
12133         (Has_Gigi_Rep_Item): Likewise.
12134         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
12135         Has_Gigi_Rep_Item for objects.
12136         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
12137         (prepend_one_attribute): ...this.
12138         (prepend_one_attribute_pragma): New function extracted from...
12139         (prepend_attributes): ...here.  Swap the parameters for consistency.
12140         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
12141         prepend_attributes.
12142         <object>: Deal with a pragma Linker_Section on a constant
12143         or variable.  <E_Function>: Deal with a pragma Linker_Section
12144         on a subprogram.
12145         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
12147 2014-01-24  Vincent Celier  <celier@adacore.com>
12149         * opt.ads: Minor comment update.
12151 2014-01-24  Robert Dewar  <dewar@adacore.com>
12153         * sem_prag.adb (Analyze_Input_Output): Add missing error check
12154         for junk operand.
12155         * sem_util.adb (Is_Refined_State): Add defense against junk
12156         tree from error.
12158 2014-01-24  Pascal Obry  <obry@adacore.com>
12160         * projects.texi: Removes Build_Slaves attribute documentation.
12162 2014-01-23  Robert Dewar  <dewar@adacore.com>
12164         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
12165         setting.
12167 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12169         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
12170         applies to expressions that come from source.
12171         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
12172         message.
12173         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
12174         rule regarding potentially unevaluated expressions, to prefix
12175         of attribute.
12177 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12179         * exp_util.adb (Make_Invqriant_Call): If type of expression is
12180         a private extension, get invariant from base type.
12182 2014-01-23  Robert Dewar  <dewar@adacore.com>
12184         * sem_util.adb, sem_attr.adb: Minor reformatting.
12186 2014-01-23  Robert Dewar  <dewar@adacore.com>
12188         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
12189         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
12190         * sem.adb (Semantics): Remove save/restore of
12191         SPARK_Mode[_Pragma]. Not needed since already done in
12192         Save/Restore_Opt_Config_Switches.
12194 2014-01-23  Robert Dewar  <dewar@adacore.com>
12196         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
12197         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
12198         Linker_Section enhancements.
12200 2014-01-23  Tristan Gingold  <gingold@adacore.com>
12202         * gnat_rm.texi: Minor editing.
12204 2014-01-23  Robert Dewar  <dewar@adacore.com>
12206         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
12207         with'ed internal units.
12208         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
12210 2014-01-23  Javier Miranda  <miranda@adacore.com>
12212         * lib-xref.adb (Generate_Reference): As part of processing the
12213         "end-of-spec" reference generate an extra reference to the first
12214         private entity of the package.
12215         * xr_tabls.adb (Add_Reference): No action needed for the extra
12216         'E' reference associated; similar to the processing of the
12217         'e' reference.
12219 2014-01-23  Bob Duff  <duff@adacore.com>
12221         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
12223 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12225         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
12226         predicate to implement rule given in 6.1.1 (20/3).
12227         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
12228         'Old in a postcondition, if it is potentially unevaluated and
12229         it is not an entity name.
12231 2014-01-23  Bob Duff  <duff@adacore.com>
12233         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
12235 2014-01-23  Robert Dewar  <dewar@adacore.com>
12237         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
12238         msg on VMS.
12240 2014-01-23  Bob Duff  <duff@adacore.com>
12242         * g-dynhta.ads: Minor comment fix.
12244 2014-01-23  Yannick Moy  <moy@adacore.com>
12246         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
12247         from spec on body only when not already inherited on spec. Set
12248         SPARK_Mode from context on body without previous spec.  *
12249         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
12250         library-level entities.  Correct retrieval of entity from
12251         declaration, for cases where the declaration is not a unit.
12252         * sem_ch12.adb (Instantiate_Object): Avoid
12253         calling Is_Volatile_Object on an empty node.
12255 2014-01-23  Robert Dewar  <dewar@adacore.com>
12257         * gnatlink.adb (Gnatlink): Check for suspicious executable file
12258         names on windows.
12260 2014-01-23  Robert Dewar  <dewar@adacore.com>
12262         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
12263         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
12264         style errors in instances.
12265         * g-dynhta.ads (Static_HTable): Comment updates.
12267 2014-01-23  Vincent Celier  <celier@adacore.com>
12269         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
12270         to find a configuration project file when Config_File_Name is
12271         No_Configuration_File.
12272         * prj-conf.ads (No_Configuration_File): New constant String.
12273         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
12274         with Config_File_Name set to No_Configuration_File, so that
12275         no existing configuration project file will be used, and the
12276         configuration project will be only created in memory when
12277         Add_Default_GNAT_Naming_Scheme is called.
12278         * projects.texi: Minor reformatting.
12280 2014-01-23  Vincent Celier  <celier@adacore.com>
12282         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
12283         a config project file if On_Load_Config is not null.
12284         * prj-pars.adb: Minor comment changes.
12286 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12288         * lib-xref.adb (Output_References): Output progenitors of
12289         synchronized tagged types, for source navigation.
12291 2014-01-23  Robert Dewar  <dewar@adacore.com>
12293         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
12294         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
12295         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
12297 2014-01-23  Emmanuel Briot  <briot@adacore.com>
12299         * prj-conf.adb (Get_Or_Create_Configuration_File): call
12300         On_Load_Config later.
12302 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
12304         * sem_ch3.adb (Analyze_Declarations): Do not
12305         generate the spec of the late primitive in ASIS mode. Add two
12306         comments to explain the special cases when the expansion is
12307         not performed.
12309 2014-01-23  Robert Dewar  <dewar@adacore.com>
12311         * sem_util.adb (Note_Possible_Modification): Fix error of
12312         misbehaving for implicit dereference cases in -gnatc mode.
12314 2014-01-23  Emmanuel Briot  <briot@adacore.com>
12316         * prj-pars.adb: Minor reformatting.
12318 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12320         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
12321         body generated for an expression function within a protected body
12322         needs a set of renaming declarations if the expression function
12323         comes from source.
12325 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12327         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
12328         list interface progenitor of a tagged concurrent type, for better
12329         source navigation.
12331 2014-01-22  Robert Dewar  <dewar@adacore.com>
12333         * lib.adb (In_Extended_Main_Code_Unit): Return False for
12334         Standard_Location.
12335         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
12336         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
12337         treatment of Slocs No_Location and Standard_Location.
12338         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
12339         check for entity with Standard_Location Sloc, rather than relying
12340         on Lib routines to do that.
12341         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
12342         that a call cannot occur before a later occuring body within
12343         the same unit.
12345 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12347         * rtsfind.adb: Update comment.
12349 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
12351         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
12352         * sem_ch3.adb (Analyze_Declarations): Add local variable
12353         Body_Seen. Generate the spec of a late controlled
12354         primitive body that is about to freeze its related type.
12355         (Handle_Late_Controlled_Primitive): New routine.
12357 2014-01-22  Robert Dewar  <dewar@adacore.com>
12359         * a-stream.adb: Minor reformatting.
12361 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12363         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
12364         sub-procedure Declared_In_Actual to handle properly the visibility
12365         of actuals in actual packages, that are themselves actuals to a
12366         actual package of the current instance. This mimics properly the
12367         visibility of formals of formal packages declared with a box,
12368         within the corresponding generic unit.
12370 2014-01-22  Robert Dewar  <dewar@adacore.com>
12372         * checks.adb: Do not assume that a volatile variable is valid.
12374 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12376         * g-catiio.ads (Image, Value): Clarify that these functions
12377         operate in the local time zone.  Minor documentation update.
12379 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12381         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
12383 2014-01-22  Robert Dewar  <dewar@adacore.com>
12385         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
12386         Moved to sem_aux.adb.
12388 2014-01-22  Robert Dewar  <dewar@adacore.com>
12390         * vms_data.ads: Minor reformatting.
12392 2014-01-22  Robert Dewar  <dewar@adacore.com>
12394         * debug.adb: Document messages affected by -gnatd.E including
12395         the new ones that relate to late definition of equality.
12396         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
12397         debug flag -gnatd.E is set, then generate warnings rather than
12398         errors.
12399         (Check_Untagged_Equality): In earlier versions of Ada,
12400         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
12402 2014-01-22  Robert Dewar  <dewar@adacore.com>
12404         * sem_prag.adb (Usage_Error): Output additional messages for
12405         unconstrained OUT parameters lacking an input dependency.
12407 2014-01-22  Robert Dewar  <dewar@adacore.com>
12409         * sem_ch4.adb: Minor reformatting.
12411 2014-01-22  Robert Dewar  <dewar@adacore.com>
12413         * restrict.ads: Minor reformatting.
12414         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
12415         forbids a call from within a subprogram to the same subprogram.
12417 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12419         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
12420         stream attributes for Stream_Element_Array.
12421         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
12422         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
12423         defined in the current scope.
12425 2014-01-22  Robert Dewar  <dewar@adacore.com>
12427         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
12429 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12431         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
12433 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12435         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
12436         declaration initialized with a function call, whose type
12437         has variable size, need to remove side effects so that the
12438         initialization expression becomes a dereference of a temporary
12439         reference to the function result.
12441 2014-01-22  Yannick Moy  <moy@adacore.com>
12443         * errout.adb (Initialize): Remove trick to add dummy entry
12444         in Warnings table.
12445         * erroutc.adb (Set_Warnings_Mode_Off,
12446         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
12447         command line switch.
12448         * opt.ads (Warning_Mode): Document behavior
12449         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
12451 2014-01-22  Robert Dewar  <dewar@adacore.com>
12453         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
12455 2014-01-22  Robert Dewar  <dewar@adacore.com>
12457         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
12458         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
12459         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
12460         case Storage_Size): call Check_Pool_Size_Clash.
12462 2014-01-22  Robert Dewar  <dewar@adacore.com>
12464         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
12465         sem_eval.ads: Minor reformatting.
12467 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12469         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
12470         Any_Composite to prevent cascaded errors.
12472 2014-01-22  Yannick Moy  <moy@adacore.com>
12474         * errout.adb (Initialize): Do not insert special entry in Warnings
12475         table in GNATprove_Mode.
12476         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
12477         GNATprove_Mode.
12478         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
12479         warnings anymore.
12481 2014-01-22  Robert Dewar  <dewar@adacore.com>
12483         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
12484         initializes case.
12486 2014-01-22  Robert Dewar  <dewar@adacore.com>
12488         * snames.ads-tmpl: Update header.
12490 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12492         * exp_util.adb (Insert_Actions): When inserting actions on a
12493         short circuit operator that has already been analyzed, do not park
12494         actions in node; instead introduce an N_Expression_With_Actions
12495         and insert actions immediately.
12496         Add guard for unexpected case of climbing up through statement
12497         in Actions list of an N_Expression_With_Actions.
12498         * sem_elab.adb (Insert_Elab_Check): Remove complex
12499         specialized circuitry for the case where the context is already
12500         analyzed, as it is not needed and introduces irregularities in
12501         finalization. Instead rely on the above change to Insert_Actions
12502         to ensure that late insertion on short circuit operators works
12503         as expected.
12505 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12507         * sem_ch4.adb (Operator_Check): Improve error message when an
12508         operand of concatenation is an access type.
12510 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12512         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12513         cascaded error.
12515 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12517         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12518         of an expanded name in a proper body, whose prefix is a package
12519         in the context of the proper body, when there is a homonym of
12520         the package declared in the parent unit.
12522 2014-01-22  Robert Dewar  <dewar@adacore.com>
12524         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12525         msg if errors found.
12526         (Check_One_Unit): Same change.
12528 2014-01-22  Robert Dewar  <dewar@adacore.com>
12530         * ug_words: Add missing/wrong entries for VMS warning switches.
12531         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12533 2014-01-22  Jerome Guitton  <guitton@adacore.com>
12535         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12536         arm.
12538 2014-01-22  Robert Dewar  <dewar@adacore.com>
12540         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12542 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
12544         * gcc-interface/Makefile.in: Minor fixes.
12546 2014-01-21  Robert Dewar  <dewar@adacore.com>
12548         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
12549         * par-ch5.adb (P_Condition): New version with expression prescanned.
12550         * par.adb (P_Condition): New version with expression prescanned.
12552 2014-01-21  Robert Dewar  <dewar@adacore.com>
12554         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
12555         if Address is not a private type.
12556         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
12557         Ignore pragma if System.Address is not a private type.
12559 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12561         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
12562         uninitialized value.
12564 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12566         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
12568 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12570         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
12571         the value of Assertions_Enabled flag when compiling an instance of
12572         an internal unit. This facilitates the use of pre/postconditions
12573         in generic internal units, such as the new elementary function
12574         libraries.
12576 2014-01-21  Robert Dewar  <dewar@adacore.com>
12578         * exp_aggr.adb: Minor reformatting.
12579         * sem_attr.adb: Minor reformatting.
12580         * sem_res.adb: Minor comment addition.
12581         * einfo.adb: Minor comment updates.
12582         * freeze.adb: Minor reformatting and code reorganization.
12584 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12586         * par-ch4.adb (P_If_Expression): Handle more gracefully an
12587         elsif clause that does not have an else part.
12589 2014-01-21  Robert Dewar  <dewar@adacore.com>
12591         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
12592         * gcc-interface/Makefile.in: clean up target pairs.
12594 2014-01-21  Pascal Obry  <obry@adacore.com>
12596         * projects.texi: Minor typo fix.
12598 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12600         * freeze.adb (Check_Component_Storage_Order): If a record type
12601         has an explicit Scalar_Storage_Order attribute definition clause,
12602         reject any component that itself is of a composite type and does
12603         not have one.
12605 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12607         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
12608         can be used to generate proper cross-reference information for
12609         the parent units of proper bodies.
12611 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12613         * exp_pakd.adb (Expand_Packed_Element_Set,
12614         Expand_Packed_Element_Reference): No byte swapping required in
12615         the front-end for the case of a reverse storage order array,
12616         as this is now handled uniformly in the back-end.  However we
12617         still need to swap back an extracted element if it is itself a
12618         nested composite with reverse storage order.
12620 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12622         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
12623         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
12624         include "others".
12626 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12628         * gnat_ugn.texi: Minor updates.
12630 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12632         * exp_pakd.adb: Update comment, minor reformatting.
12634 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12636         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
12637         object check when SPARK_Mode is on.
12638         * sem_ch6.adb (Process_Formals): Trigger the volatile object
12639         check when SPARK_Mode is on.
12640         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
12641         check when SPARK_Mode is on.
12642         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
12643         corresponding pragma of aspect SPARK_Mode in the visible
12644         declarations of a package declaration.
12645         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
12646         check when SPARK_Mode is on.
12647         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
12648         check when SPARK_Mode is on.
12649         (Resolve_Entity_Name): Trigger
12650         the volatile object check when SPARK_Mode is on.
12652 2014-01-21  Robert Dewar  <dewar@adacore.com>
12654         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
12655         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
12657 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12659         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
12660         object is declared, it is rewritten as a renaming of an dynamic
12661         expression that wraps the initial value.  The renaming declaration
12662         is first given an internal name, to prevent collisions with the
12663         entity already declared, and then the name is modified to reflect
12664         the original one. the modification of the name must preserve
12665         the source location of the original, to prevent spurious errors
12666         when compiling with style checks if the declaration involves
12667         more than one entity.
12669 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
12671         * aspects.adb Add entries for Async_Readers, Async_Writers,
12672         Effective_Reads and Effective_Writes in table Canonical_Aspect.
12673         * aspects.ads Add entries for Async_Readers, Async_Writers,
12674         Effective_Reads and Effective_Writes in tables Aspect_Id,
12675         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
12676         * atree.adb (Ekind_In): New version with 8 parameters.
12677         (Node34): New routine.
12678         (Set_Node34): New routine.
12679         * atree.ads (Ekind_In): New version with 8 parameters.
12680         (Node34): New routine.
12681         (Set_Node34): New routine.
12682         * einfo.adb Contract is now Node34.
12683         (Contract): Update the assertion and node usage.
12684         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
12685         Effective_Reads and Effective_Writes.
12686         (Set_Contract): Update the assertion and node usage.
12687         (Write_Field24_Name): Remove the output for a contract.
12688         (Write_Field34_Name): Add output for a contract.
12689         * einfo.ads Contract is now Node34. Update the comment on
12690         attribute usage and related node structures.
12691         (Get_Pragma): Update the comment on usage.
12692         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
12693         Effective_Reads and Effective_Writes do not require special
12694         processing by the parser.
12695         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
12696         (Analyze_Declarations): Analyze the contract of a variable at
12697         the end of the declarative region.
12698         (Analyze_Object_Declaration): Create a contract for a variable.
12699         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
12700         of classification pragmas.
12701         (Process_Formals): Detect an illegal
12702         use of a volatile object as a formal in a function.
12703         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
12704         a volatile object as an actual in generic instantiation.
12705         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
12706         Effective_Reads and Effective_Writes in table Sig_Flags.
12707         (Analyze_External_State_In_Decl_Part): New routine.
12708         (Analyze_Global_Item): Detect an illegal use of a volatile object
12709         as a global item of a function.
12710         (Analyze_Pragma): Reimplement
12711         pragma Abstract_State. Add support for pragmas Async_Readers,
12712         Async_Writers, Effective_Reads and Effective_Writes.
12713         (Check_External_Properties): New routine.
12714         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
12715         (Check_External_Properties): New routine.
12716         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
12717         volatile object as an actual in a call.
12718         (Resolve_Entity_Name):
12719         Add local variables Par, Prev and Usage_OK. Detect illegal
12720         contexts of volatile objects.
12721         * sem_util.adb (Add_Contract_Item): Add support for
12722         pragmas associated with the contract of a variable.
12723         (Async_Readers_Enabled): New routine.
12724         (Async_Writers_Enabled): New routine.
12725         (Effective_Reads_Enabled): New routine.
12726         (Effective_Writes_Enabled): New routine.
12727         (Has_Enabled_Property):
12728         New routine.
12729         (Is_Unchecked_Conversion_Instance): New routine.
12730         (Is_Volatile_Object): Add support for entities that may denote
12731         a volatile object.
12732         * sem_util.ads (Add_Contract_Item): Update the
12733         comment on usage.
12734         (Async_Readers_Enabled): New routine.
12735         (Async_Writers_Enabled): New routine.
12736         (Effective_Reads_Enabled): New routine.
12737         (Effective_Writes_Enabled): New routine.
12738         (Is_Unchecked_Conversion_Instance): New routine.
12739         * sinfo.ads Update the comment on the structure of N_Contract.
12740         * snames.ads-tmpl Add predefined names for Async_Readers,
12741         Async_Writers, Effective_Reads and Effective_Writes. Add
12742         pragma ids for Async_Readers, Async_Writers, Effective_Reads
12743         and Effective_Writes.
12745 2014-01-21  Robert Dewar  <dewar@adacore.com>
12747         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
12748         * sem_eval.adb (Compile_Time_Known_Value): Remove special
12749         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
12750         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
12751         (Test_Foldable): Add CRT_Safe parameter
12752         * sem_eval.ads (Compile_Time_Known_Value): Remove special
12753         handling of CRT mode.
12754         (CRT_Safe_Compile_Time_Known_Value): New function.
12756 2014-01-21  Robert Dewar  <dewar@adacore.com>
12758         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
12759         with pragma or aspect that applies to package spec or subprogram
12760         spec.
12762 2014-01-21  Robert Dewar  <dewar@adacore.com>
12764         * exp_aggr.adb: Minor reformatting.
12766 2014-01-21  Johannes Kanig  <kanig@adacore.com>
12768         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
12770 2014-01-21  Bob Duff  <duff@adacore.com>
12772         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
12774 2014-01-21  Steve Baird  <baird@adacore.com>
12776         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
12778 2014-01-21  Vincent Celier  <celier@adacore.com>
12780         * prj-part.adb (Parse_Single_Project): Accept to extend a project
12781         if it has only be imported by an project being extended. When a
12782         project that has only been imported by a project being extended
12783         is imported by another project that is not being extended,
12784         reset the previous indication, so that it will be an error if
12785         this project is extended later.
12786         * prj-tree.adb (Create_Project): Include component From_Extended
12787         in table Projects_HT
12788         * prj-tree.ads (Project_Name_And_Node): New Boolean component
12789         From_Extended
12791 2014-01-21  Robert Dewar  <dewar@adacore.com>
12793         * atree.ads, atree.adb: Add Node33 and Set_Node33.
12794         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
12795         New field (SPARK_Pragma_Inherited): New flag
12796         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
12797         Removed.
12798         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
12799         * opt.ads (SPARK_Mode_Pragma): New global variable.
12800         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
12801         * sem_ch3.adb: Use new SPARK_Mode data structures.
12802         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
12803         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
12804         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
12805         (Pop_Scope): Restore SPARK_Mode_Pragma.
12806         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
12807         new data structures.
12809 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12811         * back_end.adb: Undo previous change, not needed. Minor reformatting.
12813 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12815         * exp_ch5.adb: Fix comment.
12816         * switch-c.adb: Minor comment update.
12817         * exp_ch3.adb: Minor reformatting.
12819 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12821         * back_end.adb (Scan_Compiler_Arguments): Do not store object
12822         filename in gnatprove mode.
12824 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12826         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
12827         suppresses usage of primitive _assign for tagged types).
12828         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
12829         No_Ctrl_Actions for a tagged type that does not require
12830         finalization, as we want to disable usage of _assign (which
12831         may cause undesirable discriminant checks on an uninitialized,
12832         invalid target).
12834 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12836         * sem_prag.adb: Reject invariant'class on completion.
12838 2014-01-21  Javier Miranda  <miranda@adacore.com>
12840         * exp_ch3.adb (Build_Init_Procedure): For
12841         derivations of interfaces, do not move the the initialization
12842         of the _parent field since such assignment is not generated.
12844 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12846         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
12847         with the operator it renames if we are within an expression of
12848         a pre/postcondition, because the expression will be reanalyzed
12849         at a later point, and the analysis of the renaming may affect
12850         the visibility of the operator when in an instance.
12852 2014-01-21  Robert Dewar  <dewar@adacore.com>
12854         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
12855         Add this flag to type conversion nodes and assignment nodes.
12856         * treepr.adb: Deal properly with Flag 1,2,3.
12857         * treeprs.adt: Minor comment update.
12859 2014-01-21  Robert Dewar  <dewar@adacore.com>
12861         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
12862         parameter.
12863         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
12864         parameter, completely rewrite spec.
12866 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12868         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
12869         instance that is inlined, it may have been rewritten as a wrapper
12870         package. In that case the unit that must be made visible is the
12871         related instance of the package.
12873 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12875         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
12876         previous change in codepeer mode.
12878 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12880         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
12881         call to Abort_Undefer, as expected by the runtime.
12882         * s-tasren.adb (Local_Complete_Rendezvous): Replace
12883         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
12884         deferred at this point. Update comments.
12886 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12888         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
12890 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12892         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
12893         remove from doc.
12895 2014-01-21  Robert Dewar  <dewar@adacore.com>
12897         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
12899 2014-01-21  Thomas Quinot  <quinot@adacore.com>
12901         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
12902         this is value is used in Node_Id arithmetic operations.
12903         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
12904         instead of hard-coded unrolled code.
12906 2014-01-21  Yannick Moy  <moy@adacore.com>
12908         * gnat1drv.adb: Minor code cleanup, removing useless code.
12910 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
12912         * opt.ads (SPARK_Switches_File_Name): New.
12913         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
12914         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
12915         * gnat_ugn.texi: Document -gnates.
12917 2014-01-21  Yannick Moy  <moy@adacore.com>
12919         * errout.adb (Special_Msg_Delete): Update comment. Remove
12920         special case for GNATprove which should not ignore mismatch
12921         in sizes for representation clauses.
12922         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
12923         which should not ignore pragma Pack.
12925 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12927         * sem_ch4.adb: Code clean up.
12929 2014-01-21  Steve Baird  <baird@adacore.com>
12931         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
12933 2014-01-21  Robert Dewar  <dewar@adacore.com>
12935         * gcc-interface/gigi.h: Get Flags array address.
12936         * gcc-interface/trans.c: Acquire Flags array address.
12937         * atree.adb: Add support for Flags array and Flag0,1,2,3.
12938         * atree.ads: Add support for Flags array and Flag0,1,2,3.
12939         * atree.h: Add support for Flags array and Flag0,1,2,3.
12940         * back_end.adb: Pass Flags array address to gigi.
12942 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12944         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
12945         reference to generated body so that legality checks on stream
12946         attributes are properly applied. If type is tagged and already
12947         frozen, insert generated body at the point of the renaming
12948         declaration.
12950 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
12952         * sem_ch12.adb: Code clean up.
12953         * sem_ch8.adb: Minor reformatting
12955 2014-01-20  Robert Dewar  <dewar@adacore.com>
12957         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
12958         converting warnings on inevitable exceptions to errors.
12959         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12960         converting warnings on inevitable exceptions to errors.
12961         * opt.adb (SPARK_Mode_Config): Handled like other config flags
12962         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
12963         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
12964         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
12965         New flag (Config_Switches_Type): Add SPARK_Mode field
12966         * sem.adb: Minor code reorganization (remove unnecessary with)
12967         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
12968         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12969         converting warnings on inevitable exceptions to errors.
12970         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
12971         converting warnings on inevitable exceptions to errors.
12972         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
12973         converting warnings on inevitable exceptions to errors.
12974         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
12975         converting warnings on inevitable exceptions to errors.
12976         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
12977         from spec if needed
12978         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
12979         from spec if needed
12980         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
12981         Restore SPARK_Mode
12982         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
12983         converting warnings on inevitable exceptions to errors.
12984         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
12985         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
12986         of Get_SPARK_Mode_Id
12987         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
12988         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
12989         converting warnings on inevitable exceptions to errors.
12990         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
12991         converting warnings on inevitable exceptions to errors.
12992         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
12993         SPARK_Mode_Type
12995 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
12997         * sem_ch13.adb: Add semantic information to rewritten type
12998         reference.
13000 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13002         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
13003         are of a type with unknown discriminants, convert both to the
13004         underlying view of the type, so that the proper constraint check
13005         can be applied to the right-hand side.
13007 2014-01-20  Robert Dewar  <dewar@adacore.com>
13009         * atree.adb (Copy_Node): Fix failure to copy last component
13010         (Exchange_Entities): Fix failure to exchange last entity
13012 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13014         * sem_ch12.adb: Code clean up.
13016 2014-01-20  Robert Dewar  <dewar@adacore.com>
13018         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
13020 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13022         * sem_ch4.adb (Analyze_Quantified_Expression): If after
13023         pre-analysis  the loop parameter specification has been
13024         rewritten as a iterator specification, propagate the change to
13025         the quantified expression, for ASIS navigtion needs.
13027 2014-01-20  Vincent Celier  <celier@adacore.com>
13029         * par-ch10.adb: Minor error message change: escape [ and ].
13031 2014-01-20  Robert Dewar  <dewar@adacore.com>
13033         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
13034         * errout.adb: Implement [ and ] insertion characters.
13035         * errout.ads: Document new [ and ] insertion characters.
13036         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
13037         addition of ??? comment.
13038         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
13039         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
13040         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
13041         Make warnings on exceptions into errors in GNATprove mode.
13042         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
13043         in error messages.
13045 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13047         * sem_ch13.adb: Code clean up.
13049 2014-01-20  Robert Dewar  <dewar@adacore.com>
13051         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
13052         messages.
13053         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
13054         error in GNATprove mode.
13056 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13058         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
13059         reference 'Old takes no parameters, and thus can appear as a
13060         prefix of a slice.
13062 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13064         * exp_aggr.adb: Fix minor typos.
13066 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13068         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
13069         instance the attribute is legal, and its value is determined
13070         statically if the type has no discriminants. This choice is
13071         more useful than rechecking the legality rule in the instance,
13072         is consistent with older usage, and is also consistent with all
13073         existing tests.
13075 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13077         * sem_cat.adb (Validate_Static_Object_Name): Change error into
13078         warning in Relaxed_Semantic_Mode.
13080 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13082         * sem_attr.adb: Code and comments cleanup.
13084 2014-01-20  Yannick Moy  <moy@adacore.com>
13086         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
13087         * errout.adb (Compilation_Errors): Remove special handling in
13088         GNATprove mode.
13089         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
13090         removed debug flags.
13091         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
13092         Global, Initial_Condition, Initializes and Refined_State pragmas and
13093         aspects.
13094         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
13095         SPARK_Strict_Mode): Remove global flags.
13096         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
13097         always performed now, on packages declaring a null state.
13098         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
13099         at providing pedantic mode for bounds of integer types.
13100         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
13101         "some" quantified expression now issued under control of -gnatw.t,
13102         like the other warning on unused bound variable.
13103         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
13104         on removed flag.
13105         (Analyze_Pragma): Remove tests for SPARK 2014
13106         pragmas, not officially allowed by GNAT.
13108 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13110         * sem_prag.adb (Analyze_Pragma): Ensure that
13111         the sole argument of pragmas Abstract_State, Contract_Cases,
13112         Depends, Global and Initializes in in aggregate form.
13113         (Analyze_Refined_Pragma): Ensure that the sole argument of
13114         pragmas Refined_Depends, Refined_Global and Refined_State is in
13115         aggregate form.
13116         (Ensure_Aggregate_Form): New routine.
13118 2014-01-20  Doug Rupp  <rupp@adacore.com>
13120         * sem_attr.adb (Analyze_Attribute): case
13121         Attribute_Constrained => treat all prefixes as legal for Declib
13122         compatibility.
13124 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13126         * sem_prag.adb (Check_Mode): Reimplement the routine.
13127         (Find_Mode): New routine.
13129 2014-01-20  Robert Dewar  <dewar@adacore.com>
13131         * sem_ch4.adb (Operator_Check): Handle additional
13132         Allow_Integer_Address cases.
13134 2014-01-20  Robert Dewar  <dewar@adacore.com>
13136         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
13137         allowed if address is non-private, no longer true.
13138         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13139         Remove check for address being private, causes difficulty when
13140         pragma used in gnat.adc file and is not needed, since we guard
13141         this in Address_Integer_Convert_OK.
13142         * exp_ch7.adb: Minor reformatting.
13143         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
13145 2014-01-20  Robert Dewar  <dewar@adacore.com>
13147         * checks.adb (Apply_Range_Check): Remove gnatprove special
13148         casing of exponentiation.
13149         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
13150         operand for integer case to check range against Natural.
13152 2014-01-20  Robert Dewar  <dewar@adacore.com>
13154         * s-tataat.adb: Minor reformatting.
13156 2014-01-20  Robert Dewar  <dewar@adacore.com>
13158         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
13159         entities, and also fix documentation to remove mention of visible
13160         integer type, since this is not what the implementation does.
13161         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
13162         entities, and also fix documentation to remove mention of visible
13163         integer type, since this is not what the implementation does.
13164         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
13165         function.
13166         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
13167         case for parameter type check.
13168         * sem_res.adb (Resolve): Use new function
13169         Address_Integer_Convert_OK.
13170         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
13171         reformatting throughout.
13172         * sem_util.adb (Address_Integer_Convert_OK): New function.
13173         * sem_util.ads: Minor reformatting (put specs in alpha order)
13174         (Address_Integer_Convert_OK): New function.
13176 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13178         * exp_ch7.adb (Wrap_Transient_Expression):
13179         Insertion extra conditional expression only if
13180         Opt.Suppress_Control_Flow_Optimizations is set.
13182 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13184         * s-tataat.adb (Initialize_Attributes): Abort might already be
13185         deferred in Create_Task.
13187 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13189         * checks.adb (Apply_Scalar_Range_Check): Flag
13190         the exponent as requiring a range check when the expression is
13191         an exponentiation.
13193 2014-01-20  Fedor Rybin  <frybin@adacore.com>
13195         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
13197 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13199         * sem_util.adb (Default_Initialization): New routine.
13200         * sem_util.ads: Add new type Default_Initialization_Kind.
13201         (Default_Initialization): New routine.
13203 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13205         * sem_prag.adb (Check_Mode): Correct all error
13206         message logic dealing with in/in out parameters that may appear
13207         as inputs or have a self reference.
13209 2014-01-20  Robert Dewar  <dewar@adacore.com>
13211         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
13212         * sem_res.adb (Resolve): Fix error causing infinite loop for
13213         integer used as address. Allow addresses as integers.
13215 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13217         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
13219 2014-01-20  Bob Duff  <duff@adacore.com>
13221         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
13222         error when "use all" is not followed by "type".
13224 2014-01-20  Bob Duff  <duff@adacore.com>
13226         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
13227         followed by free.
13229 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13231         * checks.adb (Apply_Address_Clause_Check): If there is an
13232         alignment check on the expression in an address clause, and there
13233         is no local exception propagation, add an additional explanatory
13234         message to clarify the cause of previous warning.
13236 2014-01-20  Robert Dewar  <dewar@adacore.com>
13238         * exp_ch7.adb: Minor reformatting.
13239         * opt.ads: Minor comment updates.
13240         * sem.adb: Minor name change Is_Main_Unit =>
13241         Is_Main_Unit_Or_Main_Unit_Spec.
13242         * sem_ch6.adb: Minor reformatting and code reorganization.
13244 2014-01-20  Bob Duff  <duff@adacore.com>
13246         * gnat_ugn.texi: Update gnatpp switches.
13248 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13250         * exp_ch9.adb: Minor comment edit.
13252 2014-01-20  Robert Dewar  <dewar@adacore.com>
13254         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
13255         only if System.Address is a private type.
13256         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
13257         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13258         Allowed only if type System.Address is private, since otherwise
13259         it makes no sense.
13260         * sem_res.adb: Fix failure to properly Analyze unchecked
13261         conversions that were introduced by Allow_Integer_Address.
13262         * switch-c.adb: Remove -gnates switch.
13263         * usage.adb: Remove -gnates switch.
13264         * gnat_ugn.texi: Remove documentation of -gnates flag.
13266 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13268         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
13269         resolve expression to perform proper name capture.
13271 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13273         * sem.adb (Semantics): When saving/restoring configuration
13274         switches, the spec of a pre- defined unit that is the main unit
13275         must be treated as a predefined unit as well.
13277 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13279         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
13280         expression, insert an extra conditional expression when saving
13281         the value of the expression, for the benefit of control flow
13282         graph based coverage analysis.
13283         * exp_ch3.adb: Minor reformatting.
13285 2014-01-20  Robert Dewar  <dewar@adacore.com>
13287         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
13288         * gnat_rm.texi: Document pragma Allow_Integer_Address.
13289         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
13290         * opt.ads: New flag Allow_Integer_Address.
13291         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
13292         * sem_ch5.adb: Minor reformatting.
13293         * sem_prag.adb: Implement pragma Allow_Integer_Address.
13294         * sem_res.adb (Resolve): Allow integer address value if
13295         switch set.
13296         * sem_util.adb: Minor reformatting.
13297         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
13298         * switch-c.adb: Recognize flag -gnates.
13299         * usage.adb: Document flag -gnates.
13301 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13303         * s-tadeca.adb: Fix minor typos in comment.
13305 2014-01-20  Pascal Obry  <obry@adacore.com>
13307         * s-win32.ads (FreeLibrary): New import.
13309 2014-01-20  Robert Dewar  <dewar@adacore.com>
13311         * sem_res.adb, sem_cat.adb: Minor reformatting.
13312         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
13313         assigning to OUT parameters for the current subprogram scope.
13314         * exp_ch4.adb: Minor reformatting.
13316 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13318         * exp_ch4.adb (Process_Transient_Object,
13319         Find_Enclosing_Contexts): If the top-level if-expression that
13320         generated the transient object is an actual in a call, the proper
13321         Hook_Context is a construct enclosing the call.
13322         * einfo.ads: Indicate that Related_Expression is used to link a
13323         loop variable to the container expression over which the loop
13324         takes place.
13325         (Analyze_Iterator_Specification): Set the Related_Expression of
13326         the loop variable in a container element iterator.
13327         (Note_Possible_Modification): If the variable is the loop
13328         variable in a container element iterator, indicate that the
13329         enclosing container is also modified.
13331 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13333         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
13335 2014-01-20  Robert Dewar  <dewar@adacore.com>
13337         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
13338         Minor reformatting and code clean up.
13340 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13342         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
13343         of objects of private type if Relaxed_RM_Semantics.
13345 2014-01-20  Claire Dross  <dross@adacore.com>
13347         * a-cofove.ads (Vector): Capacity discriminant
13348         should be in range of the index.
13350 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13352         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
13353         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
13354         possible difference between epoch of Ada.Calendar clock and Ada
13355         real-time/tasking clock.
13356         * s-taprop-posix.adb: Minor comment fix.
13358 2014-01-20  Doug Rupp  <rupp@adacore.com>
13360         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
13362 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13364         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
13365         checks on the prefix of attribute 'Old.
13366         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
13367         generation of validity checks on a range that belongs to the
13368         iteration scheme of a quantified expression.
13369         * sem_ch5.adb (One_Bound): Suppress the generation of validity
13370         checks on a bound that belongs to the iteration scheme of a
13371         quantified expression, generate the check in all other cases.
13373 2014-01-20  Bob Duff  <duff@adacore.com>
13375         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
13377 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13379         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
13380         interpretations that do not come from other predefined units,
13381         to prevent spurious ambiguities in the presence of user-defined
13382         operators in the context of (an instance of) a predefined unit.
13384 2014-01-20  Robert Dewar  <dewar@adacore.com>
13386         * gnat_rm.texi: Document that Loop_Variant is included in
13387         Statement_Assertions.
13388         * sem_prag.adb (Check_Kind): Add Loop_Variant to
13389         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
13390         to Statement_Assertions.
13392 2014-01-20  Doug Rupp  <rupp@adacore.com>
13394         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
13395         for errno ENOENT from RTP on NFS mounted file system.
13397 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13399         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
13400         examine code that does not come from source. The check does not
13401         apply to code generated for constraint checks, and such code may
13402         generate spurious error messages when compiled with expansion
13403         disabled (as in a generic unit) because side effects may not
13404         have been removed.
13405         2) Make error messages more explicit: indicate the component
13406         of the  construct whose value is indeterminate because of a
13407         call to a function with in-out parameter in another component,
13408         when there is no mandated order of execution between the two
13409         components (actuals, aggregate components, alternatives).
13411 2014-01-20  Robert Dewar  <dewar@adacore.com>
13413         * gnat_rm.texi: Minor cleanup.
13415 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13417         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
13418         can now apply to a refined postcondition.
13419         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
13420         variable Result_Seen. Add variables Case_Prag, Post_Prag,
13421         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
13422         whether postconditions and/or constract-cases mention attribute
13423         'Result and introduce a post-state when applied to functions.
13424         (Check_Result_And_Post_State): Removed.
13425         * sem_prag.adb (Analyze_Pragma): Add local variable
13426         Result_Seen. Verify that the expression of pragma Refined_Post
13427         mentions attribute 'Result and introduces a post-state.
13428         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
13430 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13432         * exp_ch7.adb (Is_Subprogram_Call): New routine.
13433         (Process_Transient_Objects): Make variable Must_Hook global with
13434         respect to all locally declared subprograms. Search the context
13435         for at least one subprogram call.
13436         (Requires_Hooking): Removed.
13438 2014-01-20  Claire Dross  <dross@adacore.com>
13440         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
13441         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
13442         External_Axiomatization);
13444 2014-01-20  Robert Dewar  <dewar@adacore.com>
13446         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
13447         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
13448         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
13449         Allow Loop_Entry to be used in these pragmas if they appear in
13450         an appropriate context.
13451         (Placement_Error): Specialize error
13452         message for pragma Assert[_And_Cut] or pragma Assume containing
13453         Loop_Entry attribute.
13454         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
13455         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
13456         and code clean ups.
13458 2014-01-20  Robert Dewar  <dewar@adacore.com>
13460         * gnat1drv.adb: Minor comment update.
13462 2014-01-20  Tristan Gingold  <gingold@adacore.com>
13464         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
13465         variables, comment out unused code.
13466         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
13467         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
13468         * s-excmac-arm.ads: New file.
13470 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13472         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
13473         Drange and Index_Typ. Remove the circuitry which creates a
13474         range check to compare the index type of the array against the
13475         discrete_range.
13476         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
13477         the circuitry which creates a range check to handle a
13478         discrete_range denoted by a subtype indication.
13480 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
13482         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
13483         nodes to get the original sloc range.
13485 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13487         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
13488         entity of a [library level] package.
13490 2014-01-20  Tristan Gingold  <gingold@adacore.com>
13492         * raise-gcc.c (exception_class_eq): New function.
13493         (is_handled_by): Use it to compare exception classes.
13494         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
13495         be called to return URC_CONTINUE_UNWIND.
13496         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
13497         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
13499 2014-01-20  Robert Dewar  <dewar@adacore.com>
13501         * opt.ads: Minor comment update.
13503 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13505         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13506         constants to the "Local variables" area. Add new constant D. Add
13507         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
13508         to Pref_Typ and update all occurrences. Add circuitry to extract
13509         the discrete_range and the index type and build a range check.
13511 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13513         * gnat1drv.adb (Adjust_Global_Switches): Enable
13514         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13515         is set.
13517 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13519         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13521 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13523         * sem_ch13.adb (Analyze_Aspect_Specifications):
13524         When aspect SPARK_Mode appears on a package body, insert the
13525         generated pragma at the top of the body declarations.
13527 2014-01-20  Robert Dewar  <dewar@adacore.com>
13529         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13530         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13531         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13532         sem_ch8.adb, exp_dist.adb: Minor reformatting.
13534 2014-01-20  Yannick Moy  <moy@adacore.com>
13536         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13537         mode.
13539 2014-01-20  Pascal Obry  <obry@adacore.com>
13541         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13542         write scheme).
13543         * g-arrspl.adb: Adapt all routine to this new implementation.
13544         (Set): Copy the Slice_Set definition before reusing it.
13546 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13548         * sem_prag.adb (Process_Import_Or_Interface): In
13549         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
13550         (Analyze_Pragma): Ditto for pragma Export.
13551         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
13552         Import style.
13554 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13556         * einfo.ads: E_Abstract_State is now part of the entities that
13557         can be overloaded. Update type Overloadable_Kind to reflect the
13558         inclusion of abstract states.
13559         * sem_ch6.adb (New_Overloaded_Entity): A function can now
13560         overload an abstract state.
13561         * sem_prag.adb (Analyze_Constituent): Handle the overloading
13562         of states by functions. Use Entity_Of to obtain the entity of
13563         a constituent.  (Analyze_Global_Item): Handle the overloading of
13564         states by functions.
13565         (Analyze_Initialization_Item): Handle the
13566         overloading of states by functions.  Use Entity_Of to obtain the
13567         entity of an item.
13568         (Analyze_Input_Item): Handle the overloading
13569         of states by functions. Use Entity_Of to obtain the entity of an item.
13570         (Analyze_Input_Output): Handle the overloading of states by functions.
13571         (Analyze_Refinement_Clause): Handle the overloading
13572         of states by functions.  Use Entity_Of to obtain the entity of an item.
13573         (Appears_In): Use Entity_Of to obtain the entity of an element.
13574         (Check_Usage): Use Entity_Of to obtain the entity of
13575         an item. Add a guard to prevent a crash due to a previous error.
13576         (Resolve_State): New routine.
13578 2014-01-20  Yannick Moy  <moy@adacore.com>
13580         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
13581         opt.ads: Minor comments updates.
13583 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13585         * einfo.adb (Non_Limited_View): Applies to abstract states.
13586         (Set_From_Limited_With): Applies to abstract states.
13587         (Set_Non_Limited_View): Applies to abstract states.
13588         (Write_Field17): Output the non-limited view of an abstract state.
13589         * einfo.ads: Update the comment on usage and occurrences in
13590         nodes for attributes From_Limited_With and Non_Limited_View.
13591         * sem_aux.adb (Available_View): This routine can now handle
13592         abstract states.
13593         * sem_aux.ads (Available_View): This routine can now handle
13594         abstract states. Update the comment on usage.
13595         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
13596         of states and variables.
13597         (In_Pragmas_Depends_Or_Global): New routine.
13598         * sem_ch10.adb (Build_Limited_Views): Implement
13599         abstract (limited) views of variables and states.
13600         (Build_Shadow_Entity): This routine is now a procedure. Add
13601         formal parameter Shadow. Update the comment on usage. Add
13602         context-specific decoration for states and variables.
13603         (Decorate_State): New routine.  (Decorate_Variable): New routine.
13604         (Find_And_Process_States): New routine.
13605         (Process_Declarations): Renamed to Process_Declarations_And_States.
13606         (Process_Declarations_And_States): Add formal parameters
13607         Pack and Create_Abstract_Views. Update the comment on usage.
13608         (Process_States): New routine.
13609         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
13610         views of states and variables. Match the abstract view of a state
13611         against its corresponding non-abstract view.
13612         (Is_Matching_Input):
13613         Handle abstract views of states and variables. Match the abstract
13614         view of a state against its corresponding non-abstract view.
13615         (Process_Global_Item): Handle abstract views of states and
13616         variables.
13618 2014-01-20  Bob Duff  <duff@adacore.com>
13620         * sem_ch10.adb (Expand_With_Clause): Don't
13621         recurse on the prefix if the current with-ed name refers to a
13622         package that renames its own parent, eg "package P.Q renames P;".
13624 2014-01-20  Yannick Moy  <moy@adacore.com>
13626         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
13627         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
13628         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
13629         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
13630         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
13631         Expander_Active.
13633 2014-01-20  Yannick Moy  <moy@adacore.com>
13635         * sinfo.ads Update documentation of GNATprove mode.
13637 2014-01-20  Yannick Moy  <moy@adacore.com>
13639         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
13640         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
13641         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
13642         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
13643         GNATprove_Mode.
13644         * sem_ch13.adb: Remove blank.
13645         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
13646         subprograms by alias for renamings, not for inherited primitive
13647         operations.
13648         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
13649         in GNATprove mode.
13650         (Remove_Side_Effects): Apply the removal in
13651         GNATprove mode, for the full analysis of expressions.
13652         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
13653         mode.
13654         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
13655         save/restore actions for Expander_Active flag in GNATprove mode,
13656         similar to what is done in ASIS mode.
13657         * frontend.adb (Frontend): Generic bodies are instantiated in
13658         GNATprove mode.
13659         * gnat1drv.adb (Adjust_Global_Switches): Set operating
13660         mode to Check_Semantics in GNATprove mode, although a light
13661         expansion is still performed.
13662         (Gnat1drv): Set Back_End_Mode to
13663         Declarations_Only in GNATprove mode, and later on special case
13664         the GNATprove mode to continue analysis anyway.
13665         * lib-writ.adb (Write_ALI): Always generate ALI files in
13666         GNATprove mode.
13667         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
13668         Expander_Active.
13669         (SPARK_Mode): Renamed as GNATprove_Mode.
13670         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
13671         tree in GNATprove_Mode.
13672         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
13673         body in GNATprove mode.
13674         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
13675         mode.
13676         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
13677         Make sure side effects are removed in GNATprove mode.
13679 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13681         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
13682         for aliased objects with an unconstrained nominal subtype.
13683         * gcc-interface/trans.c (Call_to_gnu): Likewise.
13684         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
13685         <case N_Op_Minus>: Remove useless code.
13686         (Exception_Handler_to_gnu_zcx): Minor tweaks.
13688 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13690         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
13691         Tidy up.  For a subtype with discriminants and variant part, if a
13692         variant is statically selected and the fields all have a constant
13693         position, put them in order of increasing position.  Likewise if
13694         no variant part but representation clause is present.
13695         * gcc-interface/utils.c (make_packable_type): Robustify.
13696         (maybe_pad_type): Use local variable and tidy up condition.  If no
13697         alignment is specified, use the original one.
13698         (create_type_stub_decl): Minor tweak.
13699         (convert) <case VECTOR_CST>: Fix typo.
13700         <case CONSTRUCTOR>: Deal with padding types around the same type.
13701         Do not punt on missing fields.
13702         (unchecked_convert): Call finish_record_type to lay out the special
13703         record types made for conversions from/to problematic integer types.
13704         Bump the alignment of CONSTRUCTORs before converting them to a more
13705         aligned type.
13707 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13709         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
13710         obsolete code for type_annotate_only mode, simplify code and slightly
13711         improve wording of comments.
13713 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
13715         PR ada/59772
13716         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
13717         as intermediate type.
13718         (UI_To_gnu): Likewise.
13720 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
13722         * gnatvsn.ads (Current_Year): Bump to 2014.
13724 2014-01-02  Tobias Burnus  <burnus@net-b.de>
13726         * gnat_ugn.texi: Bump @copying's copyright year.
13728 Copyright (C) 2014 Free Software Foundation, Inc.
13730 Copying and distribution of this file, with or without modification,
13731 are permitted in any medium without royalty provided the copyright
13732 notice and this notice are preserved.