2014-10-23 Vincent Celier <celier@adacore.com>
[official-gcc.git] / gcc / ada / ChangeLog
blob38edfbe07304e2726aabd12550a24f4ed2fc7862
1 2014-10-23  Vincent Celier  <celier@adacore.com>
3         * gnatls.adb: If --RTS= was not used, check if there is a default
4         runtime. If there is none, in verbose mode, indicate that the
5         default runtime is not available and show only the current
6         directory in the source and the object search paths.
8 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
10         * sem_ch6.adb (Process_Formals): A thunk procedure with a
11         parameter of a limited view does not need a freeze node.
13 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
15         * sem_ch7.adb (Analyze_Package_Body_Helper):
16         The logic which hides local entities from external
17         visibility is now contained in routine Hide_Public_Entities.
18         (Hide_Public_Entities): New routine. Object and subprogram
19         renamings are now hidden from external visibility the same way
20         objects are.
22 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
24         * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
25         does not require freezing, in particular if it denotes a generic
26         function.
28 2014-10-23  Yannick Moy  <moy@adacore.com>
30         * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
31         Disable analysis in GNATprove mode.
33 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
35         * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
37 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
39         * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
40         pragmas in codepeer mode.
42 2014-10-23  Gary Dismukes  <dismukes@adacore.com>
44         * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
46 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
48         * sem_ch12.adb (Inline_Instance_Body): Alphabetize
49         local variables and constants. Add constants Save_SM and Save_SMP
50         to capture SPARK_Mode-related attributes.  Compile the inlined
51         body with the SPARK_Mode of the enclosing context.
53 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
55         * sinfo.adb (Elaboration_Boolean): Removed.
56         (Set_Elaboration_Boolean): Removed.
57         * sinfo.ads Remove attribute Elaboration_Boolean along with its
58         occurrence in nodes.
59         (Elaboration_Boolean): Removed along with pragma Inline.
60         (Set_Elaboration_Boolean): Removed along with pragma Inline.
62 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
64         * sem_ch3.adb (Constant_Redeclaration): Make error message more
65         explicit on a deferred constant whose object_definition is an
66         anonymous array.
68 2014-10-23  Vincent Celier  <celier@adacore.com>
70         * gnatls.adb: Never call Targparm.Get_Target_Parameters.
72 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
74         * sem_ch6.adb (Analyze_Expression_Function): In a generic
75         context do not create a body, and only pre-analyze the expression,
76         which may include incomplete views.
78 2014-10-23  Robert Dewar  <dewar@adacore.com>
80         * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
81         * sem_ch3.adb: Minor reformatting.
83 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
85         * sem_ch12.adb (Analyze_Associations): If an actual for a formal
86         object is a call to a parameterless expression function, add
87         the function to the list of actuals to freeze.
88         * freeze.adb (Check_Expression_Function): Create freeze nodes of
89         outer types that may be references in the body of the expression.
91 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
93         * exp_util.ads, checks.ads: Minor comment reformatting.
95 2014-10-23  Javier Miranda  <miranda@adacore.com>
97         * sem_eval (Test_In_Range): Disable removal of range_check for
98         VM targets.
100 2014-10-23  Robert Dewar  <dewar@adacore.com>
102         * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
103         messages, which got disabled when we unconditionally added an
104         asterisk at the start of the string.
106 2014-10-23  Vincent Celier  <celier@adacore.com>
108         * gnatls.adb: Ensure that "gnatls -l" works even when there is
109         no default runtime.
111 2014-10-23  Eric Botcazou  <ebotcazou@adacore.com>
113         * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
114         untagged and has discriminants, build the implicit full view after
115         building the derived type. Capture original declaration and type
116         here instead of...
117         (Copy_And_Build): ...here.
118         * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
120 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
122         * checks.adb (Ensure_Valid): Update the subprogram
123         profile. Propagate the contex attributes to Insert_Valid_Check.
124         (Insert_Valid_Check): Update the subprogram profile. Propagate
125         the attributes of the context to Duplicate_Subexpr_No_Checks.
126         (Validity_Check_Range): Update the subprogram profile. Propagate
127         the context attribute to Ensure_Valid.
128         * checks.ads (Ensure_Valid): Update the subprogram profile
129         along with the comment on usage.
130         (Insert_Valid_Check): Update the subprogram profile along with the
131         comment on usage.
132         (Validity_Check_Range): Update the subprogram profile along with
133         the comment on usage.
134         * exp_util.adb (Build_Temporary): New routine.
135         (Duplicate_Subexpr_No_Checks): Update the subprogram
136         profile. Propagate the attributes of the context to Remove_Side_Effects.
137         (Remove_Side_Effects): Update the subprogram profile. Update all calls
138         to Make_Temporary to invoke Build_Temporary.
139         * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
140         the subprogram profile along with the comment on usage.
141         (Remove_Side_Effects): Update the subprogram profile along with
142         the comment on usage.
143         * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
144         to the validity check machinery.  Explain the reason for this
145         propagation.
147 2014-10-23  Robert Dewar  <dewar@adacore.com>
149         * a-strsea.adb: Minor reformatting.
151 2014-10-23  Thomas Quinot  <quinot@adacore.com>
153         * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
154         units from consistency check.
155         * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
156         consistency check excludes run-time units.
158 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
160         * a-strsea.adb (Find_Token): Enable constraint checking in this
161         procedure, so that even when compiling with checks suppressed, as is
162         the case for the run-time, an exception is raised in this routine when
163         the input meets the conditions described in RM 2005 A.4.3 (68/1).
165 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
167         * sem_ch3.adb (Build_Derived_Private_Type): When the parent
168         is untagged and has discriminants, build the implicit full
169         view even if the derived type is a completion, and make it
170         the Underlying_Full_View of the type.
171         (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
172         Build_Derived_Type.
173         (Build_Derived_Record_Type): Likewise.
175 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
177         * sem_ch13.adb: Add guard to convention setting.
179 2014-10-20  Robert Dewar  <dewar@adacore.com>
181         * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
182         reformatting.
184 2014-10-20  Robert Dewar  <dewar@adacore.com>
186         * par-prag.adb (Add_List_Pragma_Entry): New procedure.
187         * par.adb (P_Pragma): Document requirement to handle multiple calls.
189 2014-10-20  Robert Dewar  <dewar@adacore.com>
191         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
192         Fix error of bad inheritance of this pragma from with'ed unit.
194 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
196         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
197         inherit convention from parent type, because the subtype may
198         have been declared on a partial view, prior to the pragma on
199         the parent.
201 2014-10-20  Olivier Hainque  <hainque@adacore.com>
202             Tristan Gingold  <gingold@adacore.com>
204         * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
205         Misc clean ups.
207 2014-10-20  Nicolas Roche  <roche@adacore.com>
209         * gcc-interface/Make-lang.in: ensure that automatically generated
210         dependency are referencing generated gnatvsn rather than original
211         one.
213 2014-10-20  Gary Dismukes  <dismukes@adacore.com>
215         * gnat_ugn.texi: Minor reformatting.
216         * sem_ch3.adb: Minor reformatting.
218 2014-10-20  Vincent Celier  <celier@adacore.com>
220         * prj-attr.adb: New project level attribute Runtime.
221         * prj-conf.adb (Get_Project_Runtimes): New procedure to get
222         the attributes Runtime declared in the main project, to use
223         in auto-configuration.
224         (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
225         * prj-proc.adb (Runtime_Defaults): New table to store
226         the default values of attributes Runtime (<language>).
227         (Set_Default_Runtime_For): New procedure to store the default
228         value of a Runtime (<language>) in table Runtime_Defaults.
229         (Expression): Use the value stored in table Runtime_Defaults as
230         the default for Runtime (<language>).
231         * prj-proc.ads (Set_Default_Runtime_For): New procedure.
232         * prj.ads (Attribute_Default_Value): New enumerated value
233         Runtime_Value.
235 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
237         * sem_ch3.adb (Analyze_Object_Declaration): If the type is
238         an unconstrained unchecked_union type, rewrite declaration
239         as a renaming to prevent attempt to retrieve non- existent
240         discriminants from expression.
242 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
244         * gnat_ugn.texi: Minor reformatting.
246 2014-10-20  Tristan Gingold  <gingold@adacore.com>
248         * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
249         arm-darwin.
250         * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
251         unused arguments.
253 2014-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
255         * sem_attr.adb (Analyze_Attribute): Replace
256         variables CS and PS with Proc_Id and Subp_Id to better illustrate
257         their purpose. Account for the case where _Postconditions
258         has not been generated yet and the context is aspect/pragma
259         Refined_Post. In that scenario the expected prefix of attribute
260         'Result is the current scope.
262 2014-10-20  Robert Dewar  <dewar@adacore.com>
264         * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
265         in middle of expression with logical operators.
267 2014-10-20  Robert Dewar  <dewar@adacore.com>
269         * par-ch13.adb (Possible_Misspelled_Aspect): New function.
271 2014-10-20  Steve Baird  <baird@adacore.com>
273         * pprint.adb: Improve Expression_Image function.
275 2014-10-20  Robert Dewar  <dewar@adacore.com>
277         * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
278         * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
279         * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
280         * einfo.adb (No_Tagged_Streams_Pragma): New field.
281         * einfo.ads: Minor reformatting (reorder entries).
282         (No_Tagged_Streams_Pragma): New field.
283         * exp_ch3.adb: Minor comment update.
284         * opt.ads (No_Tagged_Streams): New variable.
285         * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
286         * sem.ads (Save_No_Tagged_Streams): New field in scope record.
287         * sem_attr.adb (Check_Stream_Attribute): Check stream ops
288         prohibited by No_Tagged_Streams.
289         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
290         No_Tagged_Streams_Pragma.
291         (Analyze_Subtype_Declaration): ditto.
292         (Build_Derived_Record_Type): ditto.
293         (Record_Type_Declaration): ditto.
294         * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
295         (Push_Scope): Save No_Tagged_Streams.
296         * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
297         pragma.
299 2014-10-20  Robert Dewar  <dewar@adacore.com>
301         * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
302         sem_ch13.adb: Minor reformatting.
304 2014-10-20  Javier Miranda  <miranda@adacore.com>
306         * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
307         declaration of a class-wide limited object containing an
308         initializing expression into a renaming declaration.  Required to
309         avoid passing such declaration to the backend and also to avoid
310         generating an extra copy.
312 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
314         * inline.adb (List_Inlining_Info): Minor tweaks.
315         (Add_Inlined_Body): Inline the enclosing package
316         if it is not internally generated, even if it doesn't come
317         from source.
319 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
321         * sem_ch4.adb (Process_Function_Call): If the first actual
322         denotes a discrete type, the mode must be interpreted as a slice
323         of an array returned by a parameterless call.
325 2014-10-20  Vasiliy Fofanov  <fofanov@adacore.com>
327         * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
328         searching for runtime referenced by a simple name on a project path.
330 2014-10-20  Olivier Hainque  <hainque@adacore.com>
332         * vxworks-x86-link.spec: New file.
333         * system-vxworks-x86.ads: Add pragma Linker_Options to link with
334         vxworks-x86-link.spec.
336 2014-10-20  Vincent Celier  <celier@adacore.com>
338         * opt.ads (Origin_Of_Target): New type.
339         (Target_Origin): New variable.
340         * prj-conf.adb (Parse_Project_And_Apply_Config): Record
341         Target_Value and Target_Origin.  If target was not specified
342         on the command line with --target=, check if attribute Target
343         is declared in the main project. If it is and it is not the
344         native target, parse again the projects so that 'Target get
345         the new value. Fail if the target has changed again.  Invoke
346         Process_Project_And_Apply_Config with Do_Phase_1 set to False
347         is Process_Project_Tree_Phase_1 has already been invoked.
348         * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
349         parameter Do_Phase_1, defaulted to True.
350         * prj-proc.adb (Expression): Check the special values and
351         defaults for attribute Target.
353 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
355         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
356         the subprogram spec of the body in full, because it will be
357         reanalyzed when the declaration itself is analyzed;  otherwise. a
358         formal may end up duplicated in the list of formals leading to
359         spurious conformance errors with an existing declaration.
361 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
363         * sem_ch13.adb: Improve error recovery on illegal aspect.
365 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
367         * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
368         Fix calling C APIs with no trailing NUL char by calling better
369         wrappers instead.
371 2014-10-20  Tristan Gingold  <gingold@adacore.com>
373         * gnat_ugn.texi: Document that gdb users must be in group
374         _developer on mac os.
376 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
378         * a-tgdico.ads: Fix typo.
380 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
382         * exp_aggr.adb (Convert_To_Assignments): Do not create a
383         transient scope for a component whose type requires it, if the
384         context is an initialization procedure, because the target of
385         the assignment must be visible outside of the block.
387 2014-10-20  Tristan Gingold  <gingold@adacore.com>
389         * tracebak.c: Define PC_ADJUST for arm-darwin.
390         * env.c: Remove darwin specific code.
391         * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
393 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
395         * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
396         is incomplete rather than private, and full type declaration
397         has aspects, analyze aspects on the full view rather than
398         the incomplete view, to prevent freezing anomalies with the
399         class-wide type.
401 2014-10-17  Robert Dewar  <dewar@adacore.com>
403         * exp_ch9.adb (Expand_N_Task_Body): Add defense against
404         previous errors.
405         * freeze.adb (Freeze_Entity): Add defense against checking null
406         scope for generic.
407         * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
408         * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
409         previous errors.
410         * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
411         in No_Run_Time mode.
413 2014-10-17  Robert Dewar  <dewar@adacore.com>
415         * prj-makr.adb: Minor reformatting.
417 2014-10-17  Robert Dewar  <dewar@adacore.com>
419         * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
420         prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
422 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
424         * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
425         is enabled, code will be generated for some composite types
426         to initialize an object after its declaration. If there is
427         a subsequent Import pragma for the object, that code must be
428         removed as specified byw the semantics of the pragma, and to
429         prevent out-of-order elaboration issues in the back-end.
431 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
433         * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
434         wrapping mechanism under debug flag -gnatd.h.
435         * debug.adb: Claim debug switch -gnatd.h.
437 2014-10-17  Doug Rupp  <rupp@adacore.com>
439         * gcc-interface/Makefile.in: Enable the socket runtime bits
440         for Android.
442 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
444         * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
445         not perform the replacement on the expression for an inherited
446         class-wide invariant if in ASIS_Mode and the type reference is
447         already the prefix of a 'Class attribute reference: the expression
448         has already been preanalyzed and the replacement performed when
449         first encountered on the declaration of the parent type.
451 2014-10-17  Robert Dewar  <dewar@adacore.com>
453         * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
454         Minor reformatting.
456 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
458         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
459         subprogram from base type.
460         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
461         subprogram for private type, not any of its subtypes.
462         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
463         of procedure entity, because a call to it may be generated in
464         a client unit before the corresponding subprogram declaration
465         is analyzed.
467 2014-10-17  Vincent Celier  <celier@adacore.com>
469         * prj-nmsc.adb (Get_Directories): Do not create directories
470         when a project is abstract.
472 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
474         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
475         of iteration is given by an expression that is not an array type,
476         verify that its type implements an iterator iterface.
478 2014-10-17  Robert Dewar  <dewar@adacore.com>
480         * sem_attr.adb (Eval_Attribute): Ensure that attribute
481         reference is not marked as being a static expression if the
482         prefix evaluation raises CE.
484 2014-10-17  Robert Dewar  <dewar@adacore.com>
486         * exp_pakd.adb: Move bit packed entity tables to spec.
487         * exp_pakd.ads: Move bit packed entity tables here from body.
488         * freeze.adb (Freeze_Array_Type): Check that packed array type
489         is supported.
490         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
491         Specialize messages using PRE_Id_Table.
492         * uintp.ads, uintp.adb (UI_Image): New functional form.
494 2014-10-17  Robert Dewar  <dewar@adacore.com>
496         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
497         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
498         E_Variable.
499         * exp_ch3.adb (Default_Initialize_Object): Handle
500         Suppress_Initialization.
501         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
502         procedure (Expand_N_Pragma): Handle Suppress_Initialization
503         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
504         (Undo_Initialization): New procedure.
505         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
506         This is now allowed for E_Variable case.
507         * gnat_rm.texi: Document new aspect Suppress_Initialization
508         Suppress_Initialization aspect/pragma can apply to variable.
509         * einfo.ads: Minor reformatting.
511 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
513         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
515 2014-10-17  Robert Dewar  <dewar@adacore.com>
517         * cstand.adb (Create_Standard): Mark Short_Integer as
518         implementation defined.
519         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
520         compiler built with assertions for No_Implementation_Identifiers test.
522 2014-10-17  Robert Dewar  <dewar@adacore.com>
524         * aspects.ads: Documentation fix, aspect Lock_Free does have a
525         corresponding pragma.
526         * gnat_rm.texi: Document implementation defined boolean aspects
527         as boolean.
529 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
531         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
532         preserve semantic information on the invariant expression
533         (typically a function call) because it may be inherited by a
534         type extension in a different unit, and it cannot be resolved
535         by visibility elsewhere because it may refer to local entities.
537 2014-10-17  Robert Dewar  <dewar@adacore.com>
539         * gnat_rm.texi: Document that string literal can be used for
540         pragma Warnings when operating in Ada 83 mode.
542 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
544         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
545         subsidiary function to Freeze_ Expression, used to determine
546         whether an aggregate for an array of access types also freezes the
547         designated type, when some aggregate components are allocators.
549 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
551         * a-strsea.adb (Find_Token): AI05-031 indicates that the
552         procedure must raise Index_Error when Source is not empty and
553         the From parameter is not within the range of the Source string.
555 2014-10-17  Robert Dewar  <dewar@adacore.com>
557         * sem_prag.adb (Is_Static_String_Expression): Allow string
558         literal in Ada 83 mode.
560 2014-10-17  Vincent Celier  <celier@adacore.com>
562         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
563         not take into account any compiler command from package IDE.
565 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
567         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
568         wrapper must have the same identifiers as those of the formal
569         subprogram, because calls within the generic may use named
570         associations.
572 2014-10-17  Robert Dewar  <dewar@adacore.com>
574         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
575         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
577 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
579         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
580         specfications from original type declaration to declaration of
581         implicit base, because original node is rewritten as a subtype
582         declaration on which type aspects do not belong.
584 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
586         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
587         inherits the attributes related to pragma Default_Initial_Condition
588         from its parent type.
590 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
592         * a-strsea.adb (Index - versions with a From parameter):
593         According to AI05-056, the Index functions with a From parameter
594         return 0 if the source is an empty string.
596 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
598         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
599         the consistency checks in ASIS mode.
601 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
603         * s-expmod.ads: Minor typo fix.
605 2014-10-17  Robert Dewar  <dewar@adacore.com>
607         * sem_util.adb: Minor reformatting.
609 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
611         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
612         actuals that are defaulted subprograms of the formal subprogram
613         declaration.
615 2014-10-17  Robert Dewar  <dewar@adacore.com>
617         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
618         implementation base type.
619         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
620         operands are always expanded out into component comparisons.
622 2014-10-17  Robert Dewar  <dewar@adacore.com>
624         * s-vallli.adb: Minor comment correction.
625         * s-valuti.ads: Minor comment reformatting.
627 2014-10-17  Robert Dewar  <dewar@adacore.com>
629         * gnat_rm.texi: Document System.Atomic_Counters.
630         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
631         list of user- accessible units added as children of System.
632         * s-atocou.ads: Update comment.
634 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
636         * s-expmod.ads: Add comments.
638 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
640         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
641         of all attributes related to pragma Default_Initial_Condition.
642         (Build_Derived_Type): Propagation of all attributes related
643         to pragma Default_Initial_Condition.
644         (Process_Full_View): Account for the case where the full view derives
645         from another private type and propagate the attributes related
646         to pragma Default_Initial_Condition to the private view.
647         (Propagate_Default_Init_Cond_Attributes): New routine.
648         * sem_util.adb: Alphabetize various routines.
649         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
650         when calling the default initial condition procedure of a private type.
651         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
652         the generation of multiple default initial condition procedures.
654 2014-10-17  Robert Dewar  <dewar@adacore.com>
656         * prj-conf.adb: Revert previous change.
658 2014-10-17  Robert Dewar  <dewar@adacore.com>
660         * lib-writ.ads, s-valdec.ads: Minor reformatting.
662 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
664         * sem_ch12.adb: Additional work on function wrappers.
666 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
668         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
669         on the renamed object of renamings.
671 2014-10-17  Vincent Celier  <celier@adacore.com>
673         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
674         mode, always use the native target.
676 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
678         * gcc-interface/misc.c: Adjust include files.
680 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
681             Alan Modra  <amodra@gmail.com>
683         PR ada/63225
684         * uintp.adb (Vector_To_Uint): Move from here to...
685         * uintp.ads (UI_Vector): Make public.
686         (Vector_To_Uint): ...here.
688 2014-10-10  Robert Dewar  <dewar@adacore.com>
690         * freeze.adb, sem_attr.adb: Minor reformatting.
692 2014-10-10  Johannes Kanig  <kanig@adacore.com>
694         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
695         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
696         to container type.
698 2014-10-10  Vincent Celier  <celier@adacore.com>
700         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
701         any configuration switches from the project file.
703 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
705         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
706         (Build_Function_Wrapper): New function, to construct a wrapper
707         function for actuals that are functions with an arbitrary
708         number of parameters. Used in GNATProve mode to simplify proof
709         propagation in instantiations.
711 2014-10-10  Robert Dewar  <dewar@adacore.com>
713         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
714         code clean up.
716 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
718         * sem_res.adb (Is_OK_Volatile_Context): Allow
719         a volatile object reference to appear as the expression of a
720         type conversion.
722 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
724         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
725         Aspect specification is legal on a local instantiation of a
726         library-level generic unit.
728 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
730         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
731         if inlining has been enabled via -gnatn and the target is not GCC.
733 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
735         * freeze.adb (Freeze_Entity): Freezing a subprogram does
736         not always freeze its profile.  In particular, an attribute
737         reference that takes the access type does not freeze the types
738         of the formals.
740 2014-10-10  Robert Dewar  <dewar@adacore.com>
742         * errout.adb (Adjust_Name_Case): New procedure.
743         (Set_Msg_Node): Use Adjust_Name_Case.
744         * errout.ads (Adjust_Name_Case): New procedure.
745         * exp_intr.adb (Add_Source_Info): Minor code reorganization
746         (use Ekind_In).
747         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
748         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
749         and fix up entries in Sig_Flags, and correct logical errors in
750         function itself.
751         * sprint.adb (Sprint_Node_Actual): Properly print string for
752         raise statement.
754 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
756         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
757         anonymous array type with delayed aspects, defer freezing of
758         type until object itself is frozen.
759         * freeze.adb (Freeze_Entity): When freezing an object of an
760         anonymous array type with delayed aspects, remove freeze node of
761         object after freezing type, to prevent out-of-order elaboration
762         in the back-end. The initialization call for the object has
763         already been constructed when expanding the object declaration.
765 2014-10-10  Robert Dewar  <dewar@adacore.com>
767         * exp_intr.adb (Write_Entity_Name): Moved to outer level
768         (Write_Entity_Name): Properly handle operator names
769         (Expand_Source_Info): New procedure.
770         * exp_intr.ads (Add_Source_Info): New procedure.
772 2014-10-10  Robert Dewar  <dewar@adacore.com>
774         * butil.ads: Minor reformatting.
775         * sem_ch5.adb: Code clean up.
777 2014-10-10  Robert Dewar  <dewar@adacore.com>
779         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
780         Prefix_Exception_Messages.
781         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
782         * opt.ads: New flags Prefix_Exception_Message[_Config].
783         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
784         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
785         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
786         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
788 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
790         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
791         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
793 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
795         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
796         contain pragmas generated for loop invariants and type predicates.
797         Clarify use of this subprogram.
799 2014-10-10  Yannick Moy  <moy@adacore.com>
801         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
802         contracts.
803         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
804         SPARK_Mode is Off.
806 2014-10-10  Vadim Godunko  <godunko@adacore.com>
808         * a-stwima.adb (To_Sequence): Compute size of result array.
810 2014-10-10  Javier Miranda  <miranda@adacore.com>
812         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
813         sources of the example to avoid a warning when the Ada files are
814         automatically generated by the binding generator.
816 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
818         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
819         Do_Range_Check on the expression of a record component
820         association when needed, as is done for array components, when
821         the corresponding type is a scalar type.
823 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
825         * a-coinho-shared.adb: Minor typo fix.
826         * prj-env.ads: Minor reformatting.
828 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
830         * sem_res.adb (Resolve_String_Literal): Do not
831         generate a string literal subtype for the default expression of
832         a formal parameter in GNATprove mode.
834 2014-10-10  Yannick Moy  <moy@adacore.com>
836         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
838 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
840         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
841         declaration for loop parameter before rest of loop, and set
842         entity kind to prevent assignments to it in the user code.
843         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
844         loop parameter in an element iteration over o formal container.
846 2014-10-10  Robert Dewar  <dewar@adacore.com>
848         * gnat_ugn.texi: Document use of user-level routines to handle
849         e.g. col major arrays.
851 2014-10-10  Doug Rupp  <rupp@adacore.com>
853         * s-osinte-android.adb: Fix misspelling.
854         * gsocket.h: Tweak the Android quirks.
856 2014-10-10  Robert Dewar  <dewar@adacore.com>
858         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
860 2014-10-10  Robert Dewar  <dewar@adacore.com>
862         * sem_ch13.adb: Minor code reorganization.
864 2014-10-10  Pat Rogers  <rogers@adacore.com>
866         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
867         for users.
869 2014-10-10  Vadim Godunko  <godunko@adacore.com>
871         * a-coinho-shared.adb: Add minor comment.
872         * a-stzmap.adb (To_Sequence): Compute size of result array.
874 2014-10-10  Javier Miranda  <miranda@adacore.com>
876         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
877         if-stmt to match its current documentation.
879 2014-10-10  Robert Dewar  <dewar@adacore.com>
881         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
882         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
883         sem_ch6.adb, sem_cat.adb, sem_disp.adb
884         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
885         throughout where appropriate.
887 2014-10-10  Bob Duff  <duff@adacore.com>
889         * a-coinho-shared.ads: Minor reformatting.
890         * s-traceb.adb: Minor clean up.
892 2014-10-10  Robert Dewar  <dewar@adacore.com>
894         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
895         * ali.ads (GNATprove_Mode): New component in ALI table.
896         (GNATprove_Mode_Specified): New global.
897         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
898         in GNATProve mode.
899         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
900         GNATProve_Mode.
902 2014-10-10  Javier Miranda  <miranda@adacore.com>
904         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
905         (Build_Init_Statement): Ensure that statements
906         associated with the parent components are located at the beginning
907         of the returned list of statements.
909 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
911         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
912         view of a private type T that has a type invariant is a scalar
913         or constrained array type, the base type created for the full
914         view has the same type invariant.
916 2014-10-10  Robert Dewar  <dewar@adacore.com>
918         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
919         reorganization.
921 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
923         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
924         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
926 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
928         * gcc-interface/Make-lang.in (check_acats_numbers0,
929         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
930         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
931         check_acats_numbers, check_acats_subdirs): New variables.
932         (check_acats_targets): Use $(check_acats_subdirs).
933         (check-acats, check-acats%): Rewritten so that for parallelized
934         testing each job runs all the chapters files, with
935         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
936         directory sequentially and share it.
937         (check-acats-subtargets): Always print just check-acats.
939 2014-08-25  Martin Liska  <mliska@suse.cz>
941         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
942         new cgraph interface.
943         (gnat_write_global_declarations): Likewise.
945 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
947         * 9drpc.adb: Fix a typo
948         * s-interr.ads: Likewise
949         * s-taskin.ads: Likewise
950         * s-traces.ads: Likewise
951         * sysdep.c: Likewise
953 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
955         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
956         * gsocket.h Add include of <unistd.h> on RTEMS.
958 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
960         * s-osinte-rtems.adb: Correct formatting of line in license block.
962 2014-08-04  Claire Dross  <dross@adacore.com>
964         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
965         For an instance, look at the scope before the generic parent.
967 2014-08-04  Yannick Moy  <moy@adacore.com>
969         * lib-writ.ads: Update comments.
970         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
971         parameters to filter inherited subprograms.
973 2014-08-04  Robert Dewar  <dewar@adacore.com>
975         * gnat_rm.texi: Add section on use of address clause for memory
976         mapped I/O.
978 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
980         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
981         particular the subtype created for a generic actual, inherits
982         invariant information from the base type.
984 2014-08-04  Robert Dewar  <dewar@adacore.com>
986         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
987         * gnat_rm.texi: Add documentation for aspect Obsolescent.
988         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
989         Obsolescent.
990         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
991         * s-osprim-mingw.adb: Minor reformatting.
992         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
993         (Resolve_Indexed_Component): Rework warnings for non-atomic access
994         (Resolve_Selected_Component): Add warnings for non-atomic access.
996 2014-08-04  Doug Rupp  <rupp@adacore.com>
998         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
999         formal to long_long.
1000         * g-calend.ads (timeval): Bump up size to accomodate sec type.
1001         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
1002         long_long
1003         * s-osprim-posix.adb (timeval): Bump up size to accomodate
1004         new sec type.
1005         (timeval_to_duration): Change sec formal to Long_Long_Integer
1006         * s-osinte-darwin.adb (timeval): Bump up
1007         size to accomodate new sec type.
1008         (timeval_to_duration): Change sec formal to long_long
1009         * s-osinte-android.adb: Likewise.
1010         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
1011         sec formal from long to long long.
1013 2014-08-04  Robert Dewar  <dewar@adacore.com>
1015         * sem_res.adb (Resolve_Qualified_Expression): Make sure
1016         Do_Range_Check flag gets set.
1018 2014-08-04  Robert Dewar  <dewar@adacore.com>
1020         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
1021         * exp_ch3.adb (Build_Array_Init_Proc): Use
1022         Is_Standard_String_Type.
1023         (Expand_Freeze_Array_Type): ditto.
1024         (Get_Simple_Init_Val): ditto.
1025         (Needs_Simple_Initialization): ditto.
1026         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
1027         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
1029 2014-08-04  Pascal Obry  <obry@adacore.com>
1031         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
1032         _stprintf which insert garbage into the wfull_path buffer.
1034 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1036         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
1037         code.
1038         * fe.h: Minor reformatting.
1040 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1042         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
1044 2014-08-04  Robert Dewar  <dewar@adacore.com>
1046         * par-ch13.adb (Get_Aspect_Specifications): Improve error
1047         recovery, fixing a -gnatQ bomb.
1049 2014-08-04  Yannick Moy  <moy@adacore.com>
1051         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
1052         do not generate two Itypes with the same name for an array
1053         definition.
1054         * sinfo.ads: Expand doc on GNATprove mode.
1056 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1058         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
1059         master and storage pool attributes on the root type of an
1060         anonymous access type.
1061         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
1062         and storage pool attributes on the root type of an anonymous
1063         access type.
1065 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1067         * exp_ch3.adb: Minor reformatting.
1068         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
1069         * tracebak.c: Remove use of above files.
1070         * gcc-interface/Makefile.in: Update dependencies.
1072 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
1074         * gcc-interface/utils.c (gnat_set_type_context): Also set the
1075         context for parallel types' TYPE_STUB_DECL.  Do not change
1076         anything if the context is already set for them.
1077         (gnat_pushdecl): Update the comment for calls to
1078         gnat_set_type_context to mention parallel types.
1079         (add_parallel_type): When adding a context-less parallel type to
1080         a type that has a context, propagate the context from the latter
1081         type to the former.
1082         (process_deferred_decl_context): Call gnat_set_type_context
1083         rather than manually setting the type context.
1084         (build_unc_object_type): Call gnat_set_type_context on the
1085         template type.
1087 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1089         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
1090         subtype indication and the case statement has only two choices,
1091         replace subtype indication with its range, because the resulting
1092         membership test cannot have a subtype indication as an operand.
1094 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1096         * exp_ch3.adb: Update comments, minor reformatting.
1098 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1100         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
1101         the default initial condition procedures are build here.
1102         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
1103         analyzed argument of pragma Default_Initial_Condition in some
1104         dummy code as GNATprove mode disables assertions, but still
1105         needs to see the argument.
1107 2014-08-04  Robert Dewar  <dewar@adacore.com>
1109         * exp_ch6.adb, sem_util.adb: Minor reformatting.
1111 2014-08-04  Olivier Hainque  <hainque@adacore.com>
1113         * a-comutr.ads: Set Root_Node_Type'Alignment to
1114         Standard'Maximum_Alignment, so that it is at least as large as
1115         the max default for Tree_Node_Type'Alignment.
1117 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1119         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
1120         of the default initial condition procedure [body].
1121         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
1122         all default initial condition procedures at the end of private
1123         declaration analysis.
1124         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
1125         routine.
1126         (Build_Default_Init_Cond_Procedure_Body): Merged in the
1127         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
1128         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
1129         New routine.
1130         (Build_Default_Init_Cond_Procedure_Body): Removed.
1132 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1134         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
1135         postcondtion.
1136         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
1137         postcondition call.
1139 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1141         * sem_prag.adb (Analyze_Pragma): Ensure that an
1142         internally generated spec for a stand alone body is recognized
1143         as a proper context for pragma SPARK_Mode.
1145 2014-08-04  Robert Dewar  <dewar@adacore.com>
1147         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
1149 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1151         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
1152         when -gnatO has already been specified, for compatibility
1153         with gcc driver.
1154         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
1155         codepeer mode.
1156         * g-expect.ads: Fix typo.
1158 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1160         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
1161         must account for the bounds template if the designated type is
1162         an unconstrained array.
1164 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1166         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
1167         SPARK_Mode in the body.
1168         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
1169         way to verify the consistency of SPARK_Mode between a spec and
1170         a body.
1171         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
1172         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1173         manually.
1174         (Analyze_Subprogram_Instantiation): Remove the call to
1175         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1176         manually.
1177         * sem_prag.adb (Analyze_Pragma): Remove local variable
1178         Inst_Id. SPARK_Mode can no longer be applied to a package or
1179         subprogram instantiation.
1180         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
1181         Removed.
1183 2014-08-04  Robert Dewar  <dewar@adacore.com>
1185         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
1187 2014-08-04  Yannick Moy  <moy@adacore.com>
1189         * sem_ch3.adb (Derive_Type_Declaration,
1190         Process_Discriminants): Remove SPARK-specific legality checks.
1192 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1194         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
1195         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
1196         for HMAC.
1198 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1200         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
1201         compatibility of SPARK_Mode between a spec and a body, use the
1202         SPARK_Mode of the public part.
1203         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
1204         the already available routine to exchange the aspects between
1205         the template and its copy. Analyze the aspects of copy to
1206         ensure that the corresponding pragmas perform their semantic
1207         effects.  The partial analysis of aspects is no longer needed.
1208         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
1209         of the context.
1210         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
1211         the context.
1212         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
1213         instantiation which does not come from source.
1215 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1217         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
1218         SPARK_Mode pragmas to the public and private part of the unit.
1219         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
1220         type cannot have discriminants if the parent type already has
1221         discriminants.
1222         (Process_Discriminants): Ensure that the type of a discriminant is
1223         discrete.
1224         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
1225         SPARK_Mode compatibility between a spec and a body can now be
1226         safely performed while processing a generic.
1227         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
1228         SPARK_Mode compatibility between a spec and a body can now be
1229         safely performed while processing a generic.
1230         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
1231         safely analyzed when processing a generic.
1233 2014-08-04  Nicolas Roche  <roche@adacore.com>
1235         * g-dirope.adb: Minor reformating.
1237 2014-08-04  Robert Dewar  <dewar@adacore.com>
1239         * sem_ch6.adb: Minor reformatting.
1241 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1243         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
1244         Before normalizing these pragmas into a pragma Check, preanalyze
1245         the optional Message argument, (which is subsequently copied)
1246         so that it has the proper semantic information for ASIS use.
1247         * sem_case.adb: Initialize flag earlier.
1248         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
1249         the full source path of a configuration file is requested.
1250         (Read_Source_File): Use Full_Name parameter..
1252 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1254         * opt.ads Alphabetize various global flags. New flag
1255         Ignore_Pragma_SPARK_Mode along with a comment on usage.
1256         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
1257         Pragma SPARK_Mode is now allowed in generic units.
1258         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
1259         between the SPARK_Mode of a spec and that of a body when inside
1260         a generic.
1261         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
1262         compatibility between the SPARK_Mode of a spec and that of a
1263         body when inside a generic.
1264         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
1265         Pragma SPARK_Mode is now allowed in generic units.
1266         (Analyze_Package_Instantiation): Save and restore the value of
1267         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
1268         the governing SPARK_Mode before analyzing the instance.
1269         (Analyze_Subprogram_Instantiation): Save and restore the value
1270         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
1271         the governing SPARK_Mode before analyzing the instance.
1272         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
1273         placement of a source pragma when inserting the generated pragma
1274         for aspect SPARK_Mode.
1275         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
1276         pragma SPARK_Mode to allow for generics and their respective
1277         instantiations.
1278         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
1279         (Set_Ignore_Pragma_SPARK_Mode): New routine.
1281 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1283         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
1284         renaming discriminants in tagged types first.
1285         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
1286         the underlying type of the prefix.
1287         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
1288         (process_freeze_entity): Reset the nodes of all the view of a type,
1289         if any.
1291 2014-08-04  Doug Rupp  <rupp@adacore.com>
1292             Olivier Hainque  <hainque@adacore.com>
1294         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
1295         and remove incorrect EH_MECHANISM macros.
1296         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
1297         EXTRA_LIBGNAT_OBJS.
1299 2014-08-04  Robert Dewar  <dewar@adacore.com>
1301         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
1302         of constructed 'Valid attribute in -gnatVa mode does not appear
1303         to come from source.
1304         * sem_attr.adb (Analyze_Access_Attribute): Don't set
1305         Never_Set_In_Source for non-source reference.
1306         * sem_util.adb: Minor reformatting.
1307         * sem_warn.adb (Check_References): Don't check Address_Taken,
1308         not necessary, see comment.
1310 2014-08-04  Robert Dewar  <dewar@adacore.com>
1312         * sem_util.adb, sem_case.adb: Minor reformatting.
1314 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1316         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
1317         limited view, replace with non-limited view, which is available
1318         at the point of an entry call.
1320 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1322         * exp_ch6.adb (Expand_Call): If the call is to a function in
1323         a run-time unit that is marked Inline_Always, we must suppress
1324         debugging information on it, so that the code that is eventually
1325         inlined will not affect debugging of the user program.
1327 2014-08-04  Robert Dewar  <dewar@adacore.com>
1329         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
1330         fixes.
1332 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1334         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
1335         an aspect Import that specifies a False value.
1337 2014-08-04  Robert Dewar  <dewar@adacore.com>
1339         * gnat_rm.texi: Add section on aspect Invariant'Class.
1341 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1343         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
1344         for better control of cascaded error messages when some choice
1345         in a case statement over a predicated type violates the given
1346         static predicate.
1348 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1350         * sem_ch3.adb (Build_Derived_Type): Modify the
1351         inheritance of the rep chain to ensure that a non-tagged type's
1352         items are not clobbered during the inheritance.
1354 2014-08-04  Robert Dewar  <dewar@adacore.com>
1356         * sem_ch3.adb, einfo.ads: Minor reformatting.
1358 2014-08-04  Yannick Moy  <moy@adacore.com>
1360         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
1361         detection of subprograms that cannot be inlined in GNATprove mode.
1363 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1365         * einfo.adb: Add guard to Returns_Limited_View.
1367 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
1369         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
1370         the secondary stack to respect the alignments of the returned objects.
1372 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1374         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
1375         on function entities whose return type is a limited view.
1376         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
1377         where to place the freeze node for a function that returns the
1378         limited view of a type, when the function is called and frozen
1379         in a different unit.
1381 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
1383         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
1384         refactoring.
1386 2014-08-04  Robert Dewar  <dewar@adacore.com>
1388         * gnat_ugn.texi: Clarify documentation on assertions.
1390 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1392         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
1393         if a component association has a box initialization when the
1394         component type has no default initialization, either through an
1395         initial value, an aspect, or an implicit initialization procedure.
1397 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1399         * freeze.adb: Code clean up.
1401 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1403         * sem_ch5.adb: Minor reformatting.
1405 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1407         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
1408         a function can return a limited view of a type declared
1409         elsewhere. In that case the function cannot be frozen at the end
1410         of its enclosing package. If its first use is in a different unit,
1411         it cannot be frozen there, but if the call is legal the full view
1412         of the return type is available and the subprogram can now be
1413         frozen. However the freeze node cannot be inserted at the point
1414         of call, but rather must go in the package holding the function,
1415         so that the backend can process it in the proper context.
1417 2014-08-04  Robert Dewar  <dewar@adacore.com>
1419         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
1421 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1423         * sem_ch4.adb (Operator_Check): Refine previous change.
1425 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1427         * sem_scil.ads: Improve comments.
1428         * sem_ch4.adb (Analyze_Equality_Op): Add support for
1429         Allow_Integer_Address (equality between Address and Integer).
1431 2014-08-04  Yannick Moy  <moy@adacore.com>
1433         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
1434         notation on untagged objects.
1435         * sem.ads: Update comment.
1436         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
1437         not inline subprograms declared in the visible part of a package.
1439 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1441         * exp_ch5.adb: minor reformatting.
1442         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
1443         parameters.
1445 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1447         * s-fatgen.adb: Minor reformatting.
1449 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1451         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
1452         False on .NET.
1454 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1456         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
1457         the loop parameter for element iterators over containers and
1458         arrays, so that improper uses of it are detected in the loop
1459         body when expansion is disabled.
1460         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
1461         generated cursor is that of the analyzed loop parameter.
1463 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1465         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
1466         Flag_Decl. Do not analyze the declaration of the flag as it is
1467         not part of the tree yet, instead add it to the freeze actions
1468         of the C++ type.
1470 2014-08-04  Robert Dewar  <dewar@adacore.com>
1472         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
1473         case of OUT and IN OUT parameter correctly (where Source_Typ is
1474         set), we were missing one case where a check must be applied.
1476 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1478         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
1479         the generated code. Instead of hiding the renaming and using the
1480         wrapper as the proper association, have the subprogram renaming
1481         alias the wrapper.
1482         (Build_Spec): The entity of the wrapper is
1483         now derived from the entity of the related primitive.
1485 2014-08-04  Emmanuel Briot  <briot@adacore.com>
1487         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
1488         using non-capturing groups.
1490 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1492         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
1493         related pragmas before copying the original body, to prevent
1494         spurious errors when the pragmas apply to formals that will not
1495         appear in the inlined body.
1497 2014-08-04  Robert Dewar  <dewar@adacore.com>
1499         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
1500         exp_ch3.adb: Minor reformatting.
1502 2014-08-04  Robert Dewar  <dewar@adacore.com>
1504         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
1506 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1508         * aspects.adb Add an entry in table Canonical_Aspect for
1509         Default_Initial_Condition.
1510         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
1511         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
1512         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
1513         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
1514         Has_Inherited_Default_Init_Cond.
1515         (Default_Init_Cond_Procedure): New routine.
1516         (Has_Default_Init_Cond): New routine.
1517         (Has_Inherited_Default_Init_Cond): New routine.
1518         (Is_Default_Init_Cond_Procedure): New routine.
1519         (Set_Default_Init_Cond_Procedure): New routine.
1520         (Set_Has_Default_Init_Cond): New routine.
1521         (Set_Has_Inherited_Default_Init_Cond): New routine.
1522         (Set_Is_Default_Init_Cond_Procedure): New routine.
1523         (Write_Entity_Flags): Output all the new flags.
1524         * einfo.ads New attributes Default_Init_Cond_Procedure,
1525         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
1526         along with usage in nodes.
1527         (Default_Init_Cond_Procedure): New routine.
1528         (Has_Default_Init_Cond): New routine and pragma Inline.
1529         (Has_Inherited_Default_Init_Cond): New routine and
1530         pragma Inline.
1531         (Is_Default_Init_Cond_Procedure): New routine and
1532         pragma Inline.
1533         (Set_Default_Init_Cond_Procedure): New routine.
1534         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
1535         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
1536         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
1537         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
1538         Next_N. Generate a call to the default initial condition procedure
1539         if the object's type is subject to the pragma.  (Freeze_Type):
1540         Generate the body of the default initial condition procedure or
1541         inherit the spec from a parent type.
1542         * exp_ch7.adb Add with and use clause for Exp_Prag.
1543         (Expand_Pragma_Initial_Condition): Removed.
1544         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
1545         routine.
1546         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
1547         not need special treatment by the parser.
1548         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
1549         attributes related to pragma Default_Initial_Condition to the
1550         derived type.
1551         (Process_Full_View): Propagate the attributes
1552         related to pragma Default_Initial_Condition to the full view.
1553         * sem_ch7.adb (Analyze_Package_Specification): Build the
1554         declaration of the default initial condition procedure for all
1555         types that qualify or inherit the one from the parent type.
1556         * sem_ch13.adb (Analyze_Aspect_Specifications):
1557         Add processing for aspect Default_Initial_Condition.
1558         (Check_Aspect_At_Freeze_Point): Aspect
1559         Default_Initial_Condition does not require delayed analysis.
1560         (Replace_Type_References_Generic): Moved to spec.
1561         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
1562         * sem_prag.adb Add an entry in table Sif_Glags for
1563         Default_Initial_Condition.
1564         (Analyze_Pragma): Pragma
1565         Default_Initial_Condition is now part of assertion
1566         policy. Add processing for pragma Default_Initial_Condition.
1567         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
1568         now recognized as a proper assertion policy.
1569         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
1570         routine.
1571         (Build_Default_Init_Cond_Procedure_Body): New routine.
1572         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
1573         (Inherit_Default_Init_Cond_Procedure): New routine.
1574         * snames.ads-tmpl Add new predefined name and pragma id for
1575         Default_Initial_Condition.
1577 2014-08-04  Vincent Celier  <celier@adacore.com>
1579         * prj-dect.adb (Parse_Case_Construction): It is no longer
1580         an error if the variable for a case construction is not
1581         typed, only if the variable value is not a single string. Call
1582         Parse_Choice_List and End_Case_Construction with the new parameter
1583         to indicate that the variable is typed.
1584         * prj-strt.adb (End_Case_Construction): Only check the labels
1585         if the variable is typed.  If the variable is not typed,
1586         issue a warning when there is no "when others" allternative.
1587         (Parse_Choice_List): Manage the labels only if the variable
1588         is typed.
1589         * prj-strt.ads (End_Case_Construction): New Boolean parameter
1590         String_Type.
1591         (Parse_Choice_List): Ditto.
1593 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1595         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
1597 2014-08-04  Vincent Celier  <celier@adacore.com>
1599         * projects.texi: Update documentation of case constructions with
1600         variables that are not typed.
1602 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1604         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
1605         an Eliminated pragma, indicate that the wrapper is also to be
1606         eliminated, to prevent spurious errors when using gnatelim on
1607         programs that include box-initialization of equality operators
1608         (consequence of AI05-071)..
1610 2014-08-04  Robert Dewar  <dewar@adacore.com>
1612         * checks.adb (Activate_Overflow_Check): Handle floating-point
1613         case correctly.
1614         * checks.ads (Activate_Overflow_Check): Clarify handling of
1615         floating-point cases.
1616         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
1617         flag if we generate an explicit overflow check (for
1618         Check_Float_Overflow mode).
1620 2014-08-04  Robert Dewar  <dewar@adacore.com>
1622         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
1623         prj-attr.adb, prj-attr.ads: Minor reformatting.
1625 2014-08-04  Yannick Moy  <moy@adacore.com>
1627         * expander.adb (Expand): Always perform special
1628         expansion in GNATprove mode, even when doing pre-analysis.
1630 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1632         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
1633         not default. Also list bit order if SSO is specified. Do not
1634         assume that bit order is always equal to scalar storage order.
1636 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1638         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
1639         order to reverse SSO for a type that has an explicit native
1640         Bit_Order.
1642 2014-08-04  Doug Rupp  <rupp@adacore.com>
1644         * cal.c: Macro check for VxWorks7.
1645         * init.c (getpid): Likewise.
1646         * mkdir.c (__gnat_mkdir): Likewise.
1647         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
1649 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1651         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
1652         of an invariant check in the case where No_Initialization is set,
1653         since the object is uninitialized.
1655 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1657         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
1658         name, in addition to a pragma name.
1659         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
1660         Is_Pragma_Name): Adjust accordingly.
1661         * sem_attr.ads, sem_attr.adb, exp_attr.adb
1662         (Attribute_Default_Scalar_Storage_Order): Add handling of new
1663         attribute.
1664         * gnat_rm.texi: Document the above.
1666 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1668         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
1669         mode for now, to revert to previous behavior.
1670         * checks.adb: Revert previous change, no longer needed.
1672 2014-08-04  Robert Dewar  <dewar@adacore.com>
1674         * gnat1drv.adb (Adjust_Global_Switches): Don't set
1675         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1676         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
1677         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1678         * switch-c.adb (Scan_Front_End_Switches): Don't set
1679         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
1681 2014-08-04  Vincent Celier  <celier@adacore.com>
1683         * prj-attr.adb: Add new default indications for
1684         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
1685         (Attribute_Default_Of): New function (Initialize): Set the
1686         default for those attributes that have one specified.
1687         * prj-attr.ads (Attribute_Data): New component Default.
1688         * prj-proc.adb (Expression): Take into account the new defaults
1689         for attributes Object_Dir, Exec_Dir and Source_Dirs.
1690         * prj-strt.adb (Attribute_Reference): Set the default for
1691         the attribute.
1692         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
1693         (Set_Default_Of): New procedure.
1694         * prj.adb (The_Dot_String): New global Name_Id variable,
1695         initialized in procedure Initialize.
1696         (Dot_String): New function
1697         (Initialize): Initialize The_Dot_String.
1698         (Reset): Create the string list Shared.Dot_String_List.
1699         * prj.ads (Attribute_Default_Value): New enumeration type.
1700         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
1701         (Dot_String): New function.
1702         (Shared_Project_Tree_Data): New string list component Dot_String_List.
1703         * projects.texi: Document new defaults for attribute Object_Dir,
1704         Exec_Dir and Source_Dirs.
1706 2014-08-04  Robert Dewar  <dewar@adacore.com>
1708         * sem_ch12.adb: Minor reformatting.
1710 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1712         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
1713         expansion in CodePeer_Mode.
1714         (Selected_Range_Checks): Add handling of overflow checks in
1715         CodePeer_Mode.
1717 2014-08-04  Robert Dewar  <dewar@adacore.com>
1719         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1720         Remove special test for Float'First, no longer required.
1721         (Expand_N_Attribute_Reference, case Succ): Remove special test
1722         for Float'First, no longer required.
1723         * s-fatgen.adb (Pred): return infinity unchanged.
1724         (Succ): ditto.
1726 2014-08-04  Claire Dross  <dross@adacore.com>
1728         * sem_ch12.adb (Analyze_Associations): Defaults should only be
1729         used if there is no explicit match.
1730         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1731         Also check for pragma external_axiomatization on generic units.
1733 2014-08-04  Robert Dewar  <dewar@adacore.com>
1735         * checks.adb (Activate_Overflow_Check): Remove
1736         Check_Float_Overflow processing.
1737         (Apply_Scalar_Range_Check): Ditto.
1738         (Generate_Range_Check): Ditto.
1739         * exp_ch4.adb (Expand_N_Op_Add): Add call to
1740         Check_Float_Op_Overflow.
1741         (Expand_N_Op_Divide): ditto.
1742         (Expand_N_Op_Multiply): ditto.
1743         (Expand_N_Op_Subtract): ditto.
1744         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
1745         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
1746         Do_Range_Check is set for floating-point case in -gnatc or
1747         GNATprove mode.
1748         (Analyze_Attribute, case Succ): Make sure
1749         Do_Range_Check is set for floating-point case in -gnatc or
1750         GNATprove mode.
1751         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
1752         flag is set for real to integer conversion in GNATprove or
1753         -gnatc mode.
1755 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1757         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
1758         the expression of an Import or Export aspect as type Boolean
1759         and require it to be static. Add ??? comment. Also, set the
1760         Is_Exported flag when appropriate.
1762 2014-08-04  Robert Dewar  <dewar@adacore.com>
1764         * exp_ch4.adb: Minor reformatting.
1765         * exp_attr.adb: Minor reformatting.
1767 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1769         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
1770         (Unaligned_Valid): Remove now unused subprogram.
1771         * exp_attr.adb (Expand_N_Attribute_Reference, case
1772         Attribute_Valid): If the prefix is in reverse SSO or potentially
1773         unaligned, copy it using a byte copy operation to a temporary
1774         variable.
1775         * einfo.adb: Minor comment fix.
1777 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1779         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
1781 2014-08-04  Robert Dewar  <dewar@adacore.com>
1783         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
1784         * s-fatgen.adb (Pred): Handle Float'First.
1785         (Succ): Handle Float'Last.
1787 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1789         * sem_util.adb (Is_Potentially_Unevaluated): If the original
1790         node of a parent node in the tree is a short-circuit operation,
1791         the node is potentially unevaluated.
1793 2014-08-04  Robert Dewar  <dewar@adacore.com>
1795         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
1796         conversion from a real type to an integer type.
1798 2014-08-04  Yannick Moy  <moy@adacore.com>
1800         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
1801         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
1802         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
1803         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
1804         SPARK_05 instead of SPARK.
1806 2014-08-04  Robert Dewar  <dewar@adacore.com>
1808         * sem.ads: Minor reformatting.
1809         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
1810         reformatting.
1811         (Analyze_Aspect_Specifications, case Convention): Put External_Name
1812         before Link_Name when constructing pragma.
1814 2014-08-04  Yannick Moy  <moy@adacore.com>
1816         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
1817         to True during analysis of a default component expression.
1818         (Semantics): Save and restore In_Default_Expr around analysis.
1819         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
1820         Call new wrapper Preanalyze_Default_Expression.
1821         (Preanalyze_Default_Expression): New wrapper on
1822         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
1823         * sem_res.adb (Resolve_Call): Mark calls inside default
1824         expressions as not inlined in GNATprove mode.
1826 2014-08-04  Robert Dewar  <dewar@adacore.com>
1828         * exp_ch4.adb: Minor reformatting.
1830 2014-08-04  Olivier Hainque  <hainque@adacore.com>
1832         * link.c: remove const on __gnat_objlist_file_supported for AIX
1834 2014-08-04  Robert Dewar  <dewar@adacore.com>
1836         * sem_util.ads: Minor addition of comment.
1838 2014-08-04  Vincent Celier  <celier@adacore.com>
1840         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
1841         all projects, including aggregate and aggregate library projects.
1843 2014-08-04  Yannick Moy  <moy@adacore.com>
1845         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
1847 2014-08-04  Robert Dewar  <dewar@adacore.com>
1849         * sem_eval.adb (Test_In_Range): Always in range for
1850         Is_Known_Valid target type, where input type has smaller or
1851         equal size and does not have biased rep.
1853 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1855         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
1856         a static attribute, and the Static flag must not be set on it
1857         during resolution. It may be constant-folded during expansion,
1858         but if expansion is disabled it is not a static expression.
1860 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1862         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
1863         referenced once resolution has taken place.
1865 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1867         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
1868         compare access levels in the case where the target type is the
1869         anonymous type of an access discriminant, since the level of
1870         such types is defined based on context. Add comment.
1872 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1874         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
1875         cases related to equality.  Remove the special processing
1876         for dispatching abstract subprograms as it is not needed.
1877         (Interpretation_Error): Add a specialized error message for
1878         predefined operators.
1879         (Is_Intrinsic_Equality): New routine.
1880         (Is_Suitable_Candidate): New routine.
1882 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1884         * checks.adb: Minor comment reformatting.
1886 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1888         * restrict.adb (Check_Restriction): For checked max_parameter
1889         restrictions reset Violated flag, so that subsequent violations
1890         are properly detected.
1892 2014-08-04  Robert Dewar  <dewar@adacore.com>
1894         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
1895         mode.
1896         (Process_Discriminants): Fix bad test of GNATprove mode
1898 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1900         * sem_ch12.adb (Instantiate_Formal_Subprogram):
1901         Move variable to their own section. Propagate the source
1902         location of a formal parameter to the corresponding formal of
1903         the subprogram renaming declaration. Code reformatting.
1905 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1907         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
1909 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1911         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
1912         if error already detected.  We may reach this point in spite of
1913         previous errors when compiling with -gnatq, to force all possible
1914         errors (this is the usual ACATS mode).
1916 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
1918         * checks.adb (Generate_Range_Check): For the case of converting
1919         a base type with a larger range to a smaller target subtype, only
1920         use unchecked conversions of bounds in the range check followed
1921         by conversion in the case where both types are discrete. In other
1922         cases, convert to the target base type and save in a temporary
1923         followed by the range check.
1924         (Convert_And_Check_Range): New procedure factoring code to save
1925         conversion to a temporary followed by a range check (called two
1926         places in Generate_Range_Check).
1927         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
1928         check-in, to generate range checks for conversions between
1929         any floating-point types rather than limiting it to matching
1930         base types.
1932 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
1934         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
1936 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
1938         * restrict.adb (Update_Restrictions): For restrictions with a
1939         maximum parameter (e.g. number of protected entries in Ravenscar)
1940         do not compute the maximum of the violation over several objects,
1941         because the restriction is per-object.
1942         (Check_Restriction): After possible message, reset the value
1943         of of a checked max_parameter restriction to zero, to prevent
1944         cascaded errors.
1945         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
1946         (sub)type to determine whether derived type should be on the
1947         list of private dependents of a type whose full view may become
1948         visible subsequently.
1950 2014-08-01  Olivier Hainque  <hainque@adacore.com>
1952         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
1953         $(CXX) instead of ../../xg++ to feed CXX.
1954         (CXX_LFLAGS): Remove. Now unused as the proper flags
1955         are expected to be included in the CXX variable.
1957 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
1959         * gcc-interface/decl.c (elaborate_expression_1): Return the new
1960         variable when debug info is needed and the expression is not
1961         constant.  Tag as external only new variables that are global.
1962         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
1963         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
1964         attributes for IN array parameters when their actual subtype
1965         needs debug info.
1966         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
1967         * gcc-interface/gigi.h (process_deferred_decl_context): New.
1968         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
1969         emit debug info for ignored global declarations.
1970         (struct deferred_decl_context_node,
1971         add_deferred_decl_context, add_deferred_type_context,
1972         compute_deferred_decl_context, defer_or_set_type_context,
1973         deferred_decl_context_queue, get_debug_scope,
1974         get_global_context, process_deferred_decl_context): New.
1975         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
1976         computation machinery to rely on the GNAT Scope attribute.
1978 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
1980         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
1982 2014-08-01  Robert Dewar  <dewar@adacore.com>
1984         * sem_ch8.adb, opt.ads Minor comment updates.
1986 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
1988         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
1989         from the side effects removal machinery.
1990         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
1991         Renaming_Req. Update the nested call to Remove_Side_Effects.
1992         (Duplicate_Subexpr_No_Checks): Add formal parameter
1993         Renaming_Req. Update the nested call to Remove_Side_Effects.
1994         (Duplicate_Subexpr_Move_Checks): Add formal parameter
1995         Renaming_Req. Update the nested call to Remove_Side_Effects.
1996         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
1997         an object renaming declaration when the caller requests it.
1998         * exp_util.ads (Duplicate_Subexpr): Add formal
1999         parameter Renaming_Req. Update comment on usage.
2000         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
2001         (Duplicate_Subexpr_Move_Checks): Add formal parameter
2002         Renaming_Req.
2004 2014-08-01  Bob Duff  <duff@adacore.com>
2006         * gnat_ugn.texi: Minor updates.
2008 2014-08-01  Robert Dewar  <dewar@adacore.com>
2010         * atree.adb: Minor reformatting.
2012 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2014         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
2015         private extension, get stored constraint, if any, from full view.
2017 2014-08-01  Robert Dewar  <dewar@adacore.com>
2019         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
2020         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
2021         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
2022         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
2023         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2024         Remove code for checking with's, now in sem_ch10.adb, set
2025         Opt.No_Elab_Code_All_Pragma.
2027 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2029         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
2030         access types as well and adjust the subtype mark if there are
2031         no constraints.
2033 2014-08-01  Robert Dewar  <dewar@adacore.com>
2035         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
2037 2014-08-01  Robert Dewar  <dewar@adacore.com>
2039         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
2041 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2043         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
2044         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
2045         of the actuals in the case of untagged record types too.
2046         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
2047         full derivation of a derived private type, extracted from...
2048         (Copy_And_Build): In the case of record types and most
2049         enumeration types, copy the original declaration.  Build the
2050         full derivation according to the approach extracted from...
2051         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
2052         to create the full derivation in all existing cases and also
2053         create it in the no-discriminants/discriminants case instead of
2054         deriving directly from the full view.
2055         (Is_Visible_Component): Remove obsolete code.
2056         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
2058 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2060         * fe.h (GNAT_Mode): New.
2061         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
2062         reverse SSO in GNAT mode.
2064 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2066         * freeze.adb: Minor reformatting.
2068 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2070         * exp_ch3.adb (Default_Initialize_Object): Do not generate
2071         default initialization for an imported object.
2073 2014-08-01  Olivier Hainque  <hainque@adacore.com>
2075         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
2076         to the expected FARPROC type instead of void *.
2077         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
2078         other datastructures.
2079         (__gnat_file_time_name_attr): Adjust accordingly.
2080         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
2081         in line with uses.
2082         (__gnat_check_OWNER_ACL): Declare AccessMode
2083         parameter as ACCESS_MODE instead of DWORD, in line with callers
2084         and uses.
2085         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
2086         unused on win32.  Correct cast of "args" on call to spawnvp.
2087         (add_handle): Cast realloc calls into their destination types.
2088         (win32_wait): Remove declaration and initialization of unused variable.
2089         (__gnat_locate_exec_on_path): Cast alloca calls
2090         into their destination types.
2091         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
2092         their destination types.
2094 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
2096         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
2097         range checks for conversions between floating-point subtypes
2098         when the target and source types are the same.
2100 2014-08-01  Robert Dewar  <dewar@adacore.com>
2102         * exp_aggr.adb: Minor reformatting.
2104 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2106         * sem_ch13.adb (Check_Indexing_Functions): Initialize
2107         Indexing_Found.
2109 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2111         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
2112         ALI file before we call the backend (so that gnat2why can append
2113         to it).
2115 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2117         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
2118         Expand_Packed_Element_Reference): Pass additional Rev_SSO
2119         parameter indicating whether the packed array type has reverse
2120         scalar storage order to the s-pack* Set/Get routines.
2121         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
2122         indicating reverse scalar storage order.
2124 2014-08-01  Robert Dewar  <dewar@adacore.com>
2126         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
2127         for initial component value in -gnatc or GNATprove mode.
2128         (Process_Discriminants): Same fix for default discriminant values.
2129         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
2130         checking subtypes.
2132 2014-08-01  Robert Dewar  <dewar@adacore.com>
2134         * sinfo.ads: Minor comment clarification.
2136 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2138         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
2139         reformatting. Store the generated pragma Import in the related
2140         subprogram as routine Wrap_Imported_Subprogram will need it later.
2141         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
2142         a private type with discriminants is considered to fall in the
2143         category of unconstrained or tagged items.
2145 2014-08-01  Arnaud charlet  <charlet@adacore.com>
2147         * s-os_lib.adb (Open_Append): New functions to open a file for
2148         appending. This binds to the already existing (but not used)
2149         __gnat_open_append.
2150         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
2151         to open a file for appending.
2152         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
2153         to open the ALI file for appending.
2155 2014-08-01  Robert Dewar  <dewar@adacore.com>
2157         * sem_ch8.adb: Minor reformatting.
2159 2014-08-01  Yannick Moy  <moy@adacore.com>
2161         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
2162         pragmas from aspects, which need to be inserted in proper order.
2164 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2166         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
2167         Handle properly a type extension that constrains a discriminated
2168         derived type that renames other discriminants of an ancestor.
2170 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2172         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
2173         s-pack25.adb: Fix minor inconsistencies and typos.
2175 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2177         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
2178         globals and move certain variables to the "local
2179         variable" section. Call Build_Class_Wide_Wrapper when
2180         renaming a default actual subprogram with a class-wide actual.
2181         (Build_Class_Wide_Wrapper): New routine.
2182         (Check_Class_Wide_Actual): Removed.
2183         (Find_Renamed_Entity): Code reformatting.
2184         (Has_Class_Wide_Actual): Alphabetize. Change the
2185         logic of the predicate as the renamed name may not necessarely
2186         denote the correct subprogram.
2188 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2190         * sem_ch7.adb: Fix minor oversight in condition.
2192 2014-08-01  Bob Duff  <duff@adacore.com>
2194         * projects.texi: Minor documentation improvements.
2196 2014-08-01  Robert Dewar  <dewar@adacore.com>
2198         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
2199         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
2200         * lib-load.adb: Initialize No_Elab_Code_All field.
2201         * lib-writ.adb: Initialize No_Elab_Code_All.
2202         * lib.ads, lib.adb: New field No_Elab_Code_All.
2203         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
2204         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
2205         longer exists.
2206         * sem_ch10.adb (Analyze_Context): Processing for
2207         No_Elaboration_Code_All removed.
2208         (Generate_Parent_References): Moved to Sem_Util.
2209         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
2210         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
2211         Sem_Ch10.
2212         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
2213         * targparm.adb: Minor comment updates Add comments on ignoring
2214         pragma No_Elaboration_Code_All.
2216 2014-08-01  Nicolas Roche  <roche@adacore.com>
2218         * adaint.c (__gnat_set_close_on_exec): Ensure that
2219         we can unset "close_on_exec" flag.
2221 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2223         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
2224         the parameter specs of the wrapper program for a primitive operation
2225         of a synchronized type that implements an interface, copy the
2226         null_exclusion indicator as well.
2228 2014-08-01  Robert Dewar  <dewar@adacore.com>
2230         * sem_eval.ads: Minor reformatting.
2232 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2234         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
2235         to go down the chain of private derivations.
2236         * freeze.adb (Freeze_Entity): Fix typo in comment.
2238 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2240         * sem_ch3.adb (Access_Type_Declaration): If designated type is
2241         a limited view, create a master entity (as is already done for
2242         class-wide types) in case the full view designates a type that
2243         contains tasks.
2244         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
2245         and the designated type is a limited view, use the non-limited
2246         view if available.
2248 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2250         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
2251         (DECL_FUNCTION_STUB): Likewise.
2252         (SET_DECL_FUNCTION_STUB): Likewise.
2253         (DECL_PARM_ALT_TYPE): Likewise.
2254         (SET_DECL_PARM_ALT_TYPE): Likewise.
2255         (TYPE_VAX_FLOATING_POINT_P): Delete.
2256         (TYPE_DIGITS_VALUE): Likewise.
2257         (SET_TYPE_DIGITS_VALUE): Likewise.
2258         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
2259         (malloc32_decl): Delete.
2260         (build_vms_descriptor): Likewise.
2261         (build_vms_descriptor32): Likewise.
2262         (fill_vms_descriptor): Likewise.
2263         (convert_vms_descriptor): Likewise.
2264         (TARGET_ABI_OPEN_VMS): Likewise.
2265         (TARGET_MALLOC64): Likewise.
2266         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
2267         (gnat_to_gnu_entity): Call it to add the original type as a parallel
2268         type to the implementation type of a packed array type.
2269         <E_Procedure>: Remove now obsolete kludge.
2270         <E_Exception>: Delete obsolete comment.
2271         <object>: Small tweak.
2272         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
2273         for the descriptor passing mechanism.
2274         (gnat_to_gnu_param): Likewise.
2275         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
2276         (gnat_print_type): Adjust.
2277         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
2278         (vms_builtin_establish_handler_decl): Delete.
2279         (gnat_vms_condition_handler_decl): Likewise.
2280         (establish_gnat_vms_condition_handler): Likewise.
2281         (build_function_stub): Likewise.
2282         (Subprogram_Body_to_gnu): Do not call above functions.
2283         (Call_to_gnu): Remove support for the descriptor passing mechanism.
2284         * gcc-interface/utils.c (make_descriptor_field): Delete.
2285         (build_vms_descriptor32): Likewise.
2286         (build_vms_descriptor): Likewise.
2287         (fill_vms_descriptor): Likewise.
2288         (convert_vms_descriptor64): Likewise.
2289         (convert_vms_descriptor32): Likewise.
2290         (convert_vms_descriptor): Likewise.
2291         * gcc-interface/utils.c (unchecked_convert): Likewise.
2292         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
2294 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2296         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
2297         type and get_unpadded_type for the longest FP type.
2298         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
2299         (convert_with_check): Adjust formatting and remove FIXME.
2301 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2303         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
2304         Do not convert the RM bounds to the base type.
2305         (E_Floating_Point_Subtype): Likewise.
2306         (E_Array_Subtype): Convert the bounds to the base type.
2307         * gcc-interface/trans.c (get_type_length): New function.
2308         (Attribute_to_gnu) <Range_Length>: Call it.
2309         <Length>: Likewise.
2310         (Loop_Statement_to_gnu): Convert the bounds to the base type.
2311         (gnat_to_gnu) <N_In>: Likewise.
2312         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
2313         bounds to the base type.
2314         (create_range_type): Likewise.
2315         (convert): Convert the bounds to the base type for biased types.
2316         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
2317         base type.
2319 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2321         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
2322         incorrect implicit type derivation.
2323         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
2324         to the base type.
2326 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2328         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
2329         prefix of attribute Loop_Entry.
2330         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
2331         Loop_Variant with respect to an enclosing loop (if any).
2332         (Contains_Loop_Entry): Update the parameter profile and all
2333         calls to this routine.
2334         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
2335         for the corresponding body before determining the nature of the
2336         ultimate alias's declarative node.
2338 2014-08-01  Robert Dewar  <dewar@adacore.com>
2340         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
2342 2014-08-01  Robert Dewar  <dewar@adacore.com>
2344         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
2345         constraint error node since it is a list member.
2347 2014-08-01  Robert Dewar  <dewar@adacore.com>
2349         * sem_warn.adb: Minor reformatting.
2351 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2353         * einfo.adb (Underlying_Type): Return the underlying full view
2354         of a private type if present.
2355         * freeze.adb (Freeze_Entity):
2356         Build a single freeze node for partial, full and underlying full
2357         views, if any.
2358         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
2359         missing guard before the access to the Underlying_Full_View.
2360         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
2361         full view if present.
2362         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
2364 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2366         * sem_res.adb (Resolve_Entry_Call): When an entry has
2367         preconditions, the entry call is wrapped in a procedure call
2368         that incorporates the precondition checks. To prevent a double
2369         expansion, with possible duplication of extra formals, that
2370         procedure call must only be pre-analyzed and resolved. Expansion
2371         takes place upon return to the caller Resolve_Call.
2373 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2375         * sem_res.adb (Resolve_Call): Do not perform
2376         GNATprove-specific inlining while within a generic.
2378 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2380         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
2381         case expression with incompatible alternatives, when the first
2382         alternative is overloaded.
2384 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2386         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
2387         to create the name of the parameterless call, rather than
2388         New_Copy, to preserve the tree structure when the name is a
2389         complex expression, e.g. a selected component that denotes a
2390         protected operation, whose prefix is itself a selected component.
2392 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2394         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
2395         Unit_Declaration_Node to retrieve body when inlining, to handle
2396         properly subprogram child units.
2398 2014-08-01  Robert Dewar  <dewar@adacore.com>
2400         * sem_attr.adb: Minor reformatting.
2402 2014-08-01  Vincent Celier  <celier@adacore.com>
2404         * debug.adb: Minor documentation addition for -dn switch.
2406 2014-08-01  Robert Dewar  <dewar@adacore.com>
2408         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
2409         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
2410         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
2411         In several places, use the Is_OK version as suggested by the spec.
2413 2014-08-01  Vincent Celier  <celier@adacore.com>
2415         * gnatcmd.adb: Revert last change which was not correct.
2417 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2419         * freeze.adb (Find_Constant): Ensure that the constant being
2420         inspected is still an object declaration (i.e. not a renaming).
2422 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2424         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
2425         An attribute_reference to Loop_Entry denotes an iterator
2426         specification: its prefix is an object, as is the case for 'Old.
2427         b) If the domain of iteration is an expression whose type has
2428         the Iterable aspect defined, this is an iterator specification.
2430 2014-08-01  Robert Dewar  <dewar@adacore.com>
2432         * gnatcmd.adb: Minor reformatting.
2434 2014-08-01  Robert Dewar  <dewar@adacore.com>
2436         * atree.ads (Info_Messages): New counter.
2437         * err_vars.ads: Minor comment update.
2438         * errout.adb (Delete_Warning_And_Continuations): Deal
2439         with new Info_Messages counter.
2440         (Error_Msg_Internal): ditto.
2441         (Delete_Warning): ditto.
2442         (Initialize): ditto.
2443         (Write_Error_Summary): ditto.
2444         (Output_Messages): ditto.
2445         (To_Be_Removed): ditto.
2446         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
2447         (Compilation_Errors): ditto.
2448         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
2449         (Finalize): ditto.
2450         (Initialize): ditto.
2451         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
2452         * gnat_ugn.texi: Document that -gnatwe does not affect info
2453         messages.
2455 2014-08-01  Robert Dewar  <dewar@adacore.com>
2457         * debug.adb: Document debug switch -gnatd.Z.
2458         * sem.adb (Semantics): Force expansion on in no or configurable
2459         run time mode.
2461 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2463         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
2464         unchecked conversion denotes an iterator specification. Such a
2465         conversion will be inserted in the context of an inlined call
2466         when needed, and its argument is always an object.
2468 2014-08-01  Robert Dewar  <dewar@adacore.com>
2470         * make.adb, makeutl.ads: Minor reformatting.
2471         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
2472         Back_End_Inlining.
2474 2014-08-01  Tristan Gingold  <gingold@adacore.com>
2476         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
2478 2014-08-01  Javier Miranda  <miranda@adacore.com>
2480         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
2481         -gnatd.z.
2482         * debug.adb: Updating documentation.
2483         * exp_ch6.adb (Expand_Call): Remove assertion.
2485 2014-08-01  Robert Dewar  <dewar@adacore.com>
2487         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
2488         sem_res.adb: Minor reformatting.
2490 2014-08-01  Vincent Celier  <celier@adacore.com>
2492         * make.adb (Initialize): Set Keep_Temporary_Files to True when
2493         -dn is specified.
2494         * makeusg.adb: Add line for new switch --keep-temp-files.
2495         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
2496         * opt.ads (Keep_Temporary_Files): Document that it is also used
2497         by gnatmake and gprbuild.
2498         * switch-m.adb: Recognize new switch --keep-temp-files.
2500 2014-08-01  Tristan Gingold  <gingold@adacore.com>
2502         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
2503         * exp_ch9.adb (Make_Task_Create_Call): ... here.
2505 2014-08-01  Vincent Celier  <celier@adacore.com>
2507         * gnat1drv.adb: Do not try to get the target parameters when
2508         invoked with -gnats.
2510 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2512         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
2513         declaration subject to No_Initialization.
2515 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2517         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
2518         is a subtype with dynamic predicates, or a non-static subtype
2519         with predicates.
2520         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
2521         expression if subtype has a dynamic predicate.
2522         (Constrain_Index): Reject subtype indication if subtype mark
2523         has predicates.
2524         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
2525         (Make_Index): If index is a subtype indication, itype inhereits
2526         predicate flags for subsequent testing.
2527         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
2528         procedure Check_Predicate_Use, to reject illegal uses of domains
2529         of iteration that have dynamic predicates.
2530         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
2531         indication to which a predicate applies.
2532         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
2533         prevent cascaded errors when subtype is invalid.
2535 2014-08-01  Robert Dewar  <dewar@adacore.com>
2537         * sem_ch10.adb: Minor reformatting.
2539 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2541         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
2542         because either type may be a subtype of the other.
2544 2014-08-01  Vincent Celier  <celier@adacore.com>
2546         * makeusg.adb: Add documentation for debug switch -dn.
2548 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2550         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
2551         expression with standard operator and type, for pretty-printing
2552         use, when in ASIS_Mode. When generating code dimensional analysis
2553         is not involved and dimension expressions are handled statically,
2554         and other operators are resolved in the usual way.
2556 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2558         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
2559         Parent_Subtype in ASIS mode, leads to several failures.
2560         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
2561         if the prefix is a type extension, check whether component is
2562         declared in the parent type, possibly in a parent unit. Needed
2563         in ASIS mode when Parent_Subtype is not set.
2565 2014-08-01  Robert Dewar  <dewar@adacore.com>
2567         * sem_prag.adb: Minor reformatting.
2568         * s-regpat.adb: Minor reformatting.
2569         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
2570         Treat_As_Volatile on constants.
2572 2014-08-01  Tristan Gingold  <gingold@adacore.com>
2574         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
2576 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2578         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
2579         warning on a with_clause created for the renaming of a parent
2580         unit in an explicit with_clause.
2582 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2584         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
2585         Set Is_Imported flag at once, to simplify subsequent legality
2586         checks. Reject the aspect on an object whose declaration has an
2587         explicit initial value.
2588         * sem_prag.adb (Process_Import_Or_Interface): Use original node
2589         to check legality of an initial value for an imported entity.
2590         Set Is_Imported flag in case of error to prevent cascaded errors.
2591         Do not set the Is_Imported flag if the pragma comes from an
2592         aspect, because it is already done when analyzing the aspect.
2594 2014-08-01  Emmanuel Briot  <briot@adacore.com>
2596         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
2598 2014-08-01  Robert Dewar  <dewar@adacore.com>
2600         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
2601         identifier name.
2603 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2605         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
2606         checks when the related variable comes from source.
2607         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
2608         when the related actual parameter comes from source. Update comment.
2609         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
2610         type of an array of pointers when the designated type is
2611         class-wide and its root type is the record being currently frozen.
2613 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2615         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
2616         of renaming declaration created for domain of iteration.
2617         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
2618         for error messages on aggregates whose index subtypes have
2619         predicates. The new placement avoids posting messages on previous
2620         subtype declarations rather than on the aggregate itself.
2621         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
2622         Add_Dispatching_Operation, to handle properly the overriding of
2623         the predefined operations on controlled types, when the partial
2624         view of a type is not visibly controlled.
2626 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
2628         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
2629         appendix.
2631 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2633         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
2634         assertion check as the attribute is defined for all entities.
2635         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
2636         check as the attribute is defined for all entities.
2637         * einfo.ads Update the documentation of attribute
2638         Is_Hidden_Non_Overridden_Subprogram.
2639         * sem_ch7.adb (Install_Package_Entity): No need to check the
2640         entity kind of the Id.
2641         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
2642         usage. Ensure that the homographs are of the same entity kind
2643         and not fully conformant.
2644         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
2646 2014-08-01  Robert Dewar  <dewar@adacore.com>
2648         * inline.adb: Minor code reorganization.
2649         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
2651 2014-08-01  Robert Dewar  <dewar@adacore.com>
2653         * inline.adb, s-os_lib.ads: Minor reformatting.
2655 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2657         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
2658         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
2659         hooks.
2661 2014-08-01  Yannick Moy  <moy@adacore.com>
2663         * inline.adb (Cannot_Inline): Issue info message instead of
2664         warning for subprograms not inlined in GNATprove mode.
2665         * sem_res.adb (Resolve_Call): Take body into account for deciding
2666         whether subprogram can be inlined in GNATprove mode or not.
2668 2014-08-01  Claire Dross  <dross@adacore.com>
2670         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
2671         of Get_First_Parent_With_External_Axiomatization_For_Entity for
2672         shorter.
2673         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
2674         for parameters of packages with external axiomatization.
2676 2014-08-01  Robert Dewar  <dewar@adacore.com>
2678         * sem_res.adb: Minor comment addition.
2680 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2682         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
2683         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
2684         no longer used.
2685         * s-os_lib.ads: Minor reformatting.
2687 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2689         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
2690         completely previous code since only GCC back-ends are prepared
2691         to handle e.g. 'Machine attribute.
2692         * targparm.adb, targparm.ads: Remove remaining refs and
2693         handling of OpenVMS_On_Target, VAX_Float_On_Target and
2694         RTX_RTSS_Kernel_Module_On_Target.
2695         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
2696         no longer used.
2698 2014-08-01  Robert Dewar  <dewar@adacore.com>
2700         * exp_dist.adb, exp_attr.adb: Minor reformatting.
2701         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
2702         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
2703         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
2704         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
2705         improper use of shall.
2707 2014-08-01  Robert Dewar  <dewar@adacore.com>
2709         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
2710         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
2711         exp_ch3.adb: Minor reformatting & code reorganization.
2713 2014-08-01  Robert Dewar  <dewar@adacore.com>
2715         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
2716         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
2717         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
2718         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
2719         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
2720         code.
2721         * gcc-interface/decl.c, gcc-interface/Makefile.in,
2722         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
2724 2014-08-01  Pascal Obry  <obry@adacore.com>
2726         * s-os_lib.ads: Rename File_Size to Large_File_Size.
2728 2014-08-01  Robert Dewar  <dewar@adacore.com>
2730         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
2731         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
2732         a-numaux-libc-x86.ads: Fix bad package header comments.
2733         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
2734         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
2735         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
2736         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
2737         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
2738         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
2739         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
2740         s-os_lib.adb: Remove VMS-specific code.
2742 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2744         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
2745         previous state in CodePeer_Mode.
2747 2014-08-01  Robert Dewar  <dewar@adacore.com>
2749         * hostparm.ads: Put back definition of OpenVMS as False to aid
2750         the transition process.
2751         * sem_ch7.adb: Minor reformatting.
2752         * prj-env.adb: Minor code fix.
2753         * gnat_rm.texi: Complete previous change.
2754         * sem_ch3.adb: Minor reformatting.
2755         * sem_ch6.adb: Minor reformatting.
2756         * sem_elab.adb: Minor reformatting.
2757         * exp_strm.adb: Complete previous change.
2759 2014-08-01  Vincent Celier  <celier@adacore.com>
2761         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
2762         warning when a constant is unreferenced and its type has pragma
2763         Unreferenced_Objects.
2765 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2767         * einfo.adb: Flag2 is now known as
2768         Is_Hidden_Non_Overridden_Subprogram.
2769         (Is_Hidden_Non_Overridden_Subprogram): New routine.
2770         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
2771         (Write_Entity_Fields): Output Flag2.
2772         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
2773         along with occurrences in entities.
2774         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
2775         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
2776         and pragma Inline.
2777         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
2778         declared non-overriden homographs into visibility.
2779         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
2780         implicitly declared non-overriden homographs.
2781         (Hide_Non_Overridden_Subprograms): New routine.
2783 2014-08-01  Robert Dewar  <dewar@adacore.com>
2785         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
2786         VMS-specific code.
2787         * prj-conf.adb: Minor reformatting.
2788         * xr_tabls.adb (Read_File): Restore code which was enabled on
2789         non VMS platforms before.
2790         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
2791         * sem_ch5.adb: Minor reformatting.
2792         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
2793         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
2794         Remove VMS-specific code.
2796 2014-08-01  Vincent Celier  <celier@adacore.com>
2798         * make.adb (Await_Compile): Remove loop that was only needed
2799         for VMS.
2801 2014-08-01  Robert Dewar  <dewar@adacore.com>
2803         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
2804         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
2805         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
2806         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
2807         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
2808         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
2809         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
2810         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
2811         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
2812         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
2813         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
2814         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
2815         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
2816         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
2817         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
2818         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
2819         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
2820         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
2821         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
2822         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
2823         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
2824         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
2825         specific code and comments.
2827 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2829         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
2830         Check_Reverse_Iteration, to verify the legality of the Reverse
2831         indicator on various container types, and to detect illegal
2832         reverse iterations on containers that only supoort forward
2833         iteration.
2835 2014-08-01  Vincent Celier  <celier@adacore.com>
2837         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
2838         procedure GNATCmd the relevant declarations from packages VMS_Cmds
2839         and VMS_Conv.
2840         * gnatcmd.ads: Update comments to remove any trace of VMS
2842 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2844         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
2845         defaulted actual that is an operator, before building wrapper
2846         for it in GNATprove mode. Restrict construction of wrapper to
2847         actuals that are operators.
2849 2014-08-01  Vincent Celier  <celier@adacore.com>
2851         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
2852         specific packages no longer needed.
2854 2014-08-01  Pascal Obry  <obry@adacore.com>
2856         * s-os_lib.ads (System.CRTL): Move with clause to body.
2857         (File_Size): New type.
2858         (File_Length64): Use it.
2859         (File_Length): Restore previous spec returning a Long_Integer.
2860         * s-os_lib.adb (System.CRTL): Move with clause here.
2862 2014-08-01  Vincent Celier  <celier@adacore.com>
2864         * mlib-prj.adb: Update comments to remove any mention of VMS.
2866 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2868         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
2869         xgnatugn.adb and ug_words.
2871 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2873         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
2874         expansion can be avoid for Machine, Model and Rounding.
2875         (Is_Inline_Floating_Point_Attribute): Return true for Machine
2876         & Model, as well as Rounding if wrapped in a conversion to an
2877         integer type.
2878         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
2879         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
2880         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
2881         * gcc-interface/misc.c (enumerate_modes): Compute it.
2882         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
2883         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
2884         Machine and Model.
2885         (Attribute_to_gnu) <Attr_Model>: New case.
2886         <Attr_Machine>): Likewise.
2887         (convert_with_check): Test
2888         fp_arith_may_widen variable.
2890 2014-08-01  Pascal Obry  <obry@adacore.com>
2892         * adaint.h (GNAT_FOPEN): New definition for Windows.
2893         (GNAT_OPEN): Likewise.
2894         (GNAT_STAT): Likewise.
2895         (GNAT_FSTAT): Likewise.
2896         (GNAT_LSTAT): Likewise.
2897         (GNAT_STRUCT_STAT): Likewise.
2898         * adaint.c (__gnat_stat): Fix computation of file size for
2899         Windows.
2901 2014-08-01  Vincent Celier  <celier@adacore.com>
2903         * Makefile.rtl: Minor comment update.
2905 2014-08-01  Vincent Celier  <celier@adacore.com>
2907         * Make-generated.in: Remove dependencies for vms-help.
2909 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
2911         * makeutl.ads, opt.ads: Minor grammar fixes.
2912         * makeutl.adb: Minor code reorganization.
2914 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2916         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
2917         gnatsym.adb: Remove gnatsym (VMS only tool).
2919 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
2921         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
2922         conditionalization from gnat_ugn.texi and projects.texi, and updated
2923         (considerably simplified) xgnatugn.adb, to be removed soon.
2925 2014-08-01  Vincent Celier  <celier@adacore.com>
2927         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
2928         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
2929         instead of Debug.Debug_Flag_S.
2930         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
2931         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
2932         error messages.
2933         * makeutl.ads (No_Exit_Message_Option): New constant string
2934         for switch --no-exit-message.
2935         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
2936         * switch-m.adb (Scan_Make_Switches): Recognize new switch
2937         --no-exit-message.
2939 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2941         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
2942         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
2944 2014-08-01  Javier Miranda  <miranda@adacore.com>
2946         * inline.ads (Inlined_Calls, Backend_Calls,
2947         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
2948         moved to inline.adb (Cannot_Inline): Update documentation.
2949         (Check_And_Build_Body_To_Inline): Renamed.
2950         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2951         * inline.adb (Check_Inlining_Restrictions): New local variable.
2952         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
2953         Backend_Not_Inlined_Subps): Declarations moved here
2954         from inline.ads (Number_Of_Statements): Removed.
2955         (Remove_Pragmas): Avoid duplicated version of this subprogram.
2956         (Build_Body_To_Inline): Code cleanup.
2957         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
2958         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
2959         (Check_Body_To_Inline): Removed.
2960         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
2961         (Has_Excluded_Declaration): No action if not
2962         Check_Inlining_Restrictions.
2963         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
2964         (Initialize): Initialize the lists of inlined calls and subprograms.
2965         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
2966         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
2967         to Check_And_Build_Body_To_Inline since it has been renamed as
2968         Check_And_Split_Unconstrained_Function
2969         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
2970         package inline.
2971         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
2973 2014-08-01  Vincent Celier  <celier@adacore.com>
2975         * debug.adb: Add documentation for new debug switch -ds.
2976         * make.adb (List_Bad_Compilations): Do not issue any message
2977         when switch -ds is specified.
2978         * makeutl.adb (Fail_Program): Do not issue any message when
2979         -ds is specified.
2980         (Finish_Program): Ditto.
2982 2014-08-01  Robert Dewar  <dewar@adacore.com>
2984         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
2985         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
2986         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
2987         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
2988         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
2989         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
2990         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
2991         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
2992         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
2993         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
2994         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
2995         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
2996         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
2997         s-tratas.ads: Minor fix to copyright notices.
2999 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3001         * sinfo.ads: Remove long obsolete comment.
3002 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3004         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
3005         * sem_ch3.adb: Minor reformatting.
3007 2014-08-01  Pascal Obry  <obry@adacore.com>
3009         * cstreams.c: Only enable large file support on know supported
3010         platforms. Add missing defines/includes.
3012 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3014         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
3015         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
3016         on generic units that contain constructs that forbid subtypes
3017         with predicates.
3018         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
3019         Inherit flags indicating the presence of predicates in subtype
3020         declarations with and without constraints.
3021         (Inherit_Predicate_Flags): Utility for the above.
3022         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
3023         indicate that the actual cannot have predicates, and preserve
3024         warning. In an instance, report error if actual has predicates
3025         and the construct appears in a package declaration.
3026         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
3027         for an actual with predicates, if the corresponding formal
3028         carries No_Predicate_On_Actual or (in the case of a loop)
3029         No_Dynamic_Predicate_On_Actual.
3030         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
3031         Static_Predicate function if the type is non-static (in the
3032         presence of previous errors),
3033         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
3034         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
3035         generic contract on actuals that cannot have predicates.
3037 2014-08-01  Pascal Obry  <obry@adacore.com>
3039         * a-direct.adb (C_Size): Returns an int64.
3040         * osint.adb (System.CRTL): New with clause.
3041         (File_Length.Internal): Returns an int64.
3042         * s-os_lib.ads (File_Length): Returns an int64.
3044 2014-08-01  Robert Dewar  <dewar@adacore.com>
3046         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
3047         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
3048         osint.adb, krunch.adb: Minor reformatting.
3050 2014-08-01  Robert Dewar  <dewar@adacore.com>
3052         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
3053         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
3054         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
3055         Remove VMS-specific code.
3056         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
3058 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3060         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
3061         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
3062         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
3063         mlib.ads, tempdir.adb: Remove VMS handling.
3065 2014-08-01  Pascal Obry  <obry@adacore.com>
3067         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
3068         (__gnat_named_file_length): Likewise.
3069         (__gnat_file_length_attr): Likewise.
3070         * a-direct.adb (C_Size): Use size_t as returned type.
3071         * osint.adb (File_Length): Adjust spec for Internal routine
3072         (returns size_t).
3073         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
3074         (System.CRTL): With claused moved to spec.
3075         * s-os_lib.ads (System.CRTL): With clause moved to here.
3077 2014-08-01  Pascal Obry  <obry@adacore.com>
3079         * adaint.h, adaint.c (__gnat_open): Added.
3080         * s-crtl.ads (open): Import __gnat_open for large file support.
3082 2014-08-01  Robert Dewar  <dewar@adacore.com>
3084         * sem_case.adb (Dup_Choice): Improve message for integer constants.
3086 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3088         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
3090 2014-08-01  Pascal Obry  <obry@adacore.com>
3092         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
3093         * adaint.c (GNAT_OPEN): Uses new macro where needed.
3095 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3097         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
3098         extracted from...
3099         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
3100         * gcc-interface/gigi.h: Update comment.
3102 2014-07-31  Javier Miranda  <miranda@adacore.com>
3104         * debug.adb Remove documentation of -gnatd.k (no longer needed).
3105         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
3106         * inline.ads (Backend_Inlined_Subps): New
3107         Elist.  (Backend_Not_Inlined_Subps): New Elist.
3108         (Has_Excluded_Declaration): Declaration previously located in
3109         * inline.adb (Has_Excluded_Statement): Declaration previously
3110         located in inline.adb
3111         * inline.adb (Has_Single_Return): Moved out of
3112         Build_Body_To_Inline to avoid having duplicated code.
3113         (Number_Of_Statements): New subprogram.
3114         (Register_Backend_Inlined_Subprogram): New subprogram.
3115         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
3116         (Add_Inlined_Subprogram): Register backend inlined subprograms and
3117         also register subprograms that cannot be inlined by the backend.
3118         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
3119         to avoid having duplicated code.  Replace occurrences of
3120         Debug_Flag_Dot_K by Back_End_Inlining.
3121         * sem_res.adb (Resolve_Call): Code cleanup.
3122         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
3123         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
3124         (List_Inlining_Info): Add listing of subprograms passed to the
3125         backend and listing of subprograms that cannot be inlined by
3126         the backend.
3127         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
3128         Debug_Flag_Dot_K by Back_End_Inlining.
3130 2014-07-31  Robert Dewar  <dewar@adacore.com>
3132         * nlists.ads: Minor code fix (remove unwise Inline for
3133         List_Length).
3135 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3137         * einfo.adb: Remove VMS specific code.
3138         * exp_attr.adb: Remove VAX specific code.
3139         * set_targ.adb: Remove handling of VAX_Float.
3140         * sem_vfpt.adb: Remove references to Vax_Native.
3141         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
3143 2014-07-31  Robert Dewar  <dewar@adacore.com>
3145         * sem_ch4.adb: Minor reformatting.
3147 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3149         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
3150         to VMS. Misc clean ups.
3151         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
3153 2014-07-31  Robert Dewar  <dewar@adacore.com>
3155         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
3156         exp_prag.adb, frontend.adb, interfac.ads,
3157         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
3158         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
3159         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
3160         snames.ads-tmpl: Remove obsolete VMS-specific code.
3162 2014-07-31  Robert Dewar  <dewar@adacore.com>
3164         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
3166 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3168         * a-intnam-linux.ads: Minor: update obsolete comments.
3169         * s-taasde.adb: Minor: fix comment header.
3171 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3173         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
3174         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
3175         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
3176         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
3177         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
3178         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
3179         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
3180         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
3181         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
3182         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
3183         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
3184         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
3185         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
3186         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
3187         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
3188         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
3189         * namet.h (Is_Non_Ada_Error): Remove.
3191 2014-07-31  Robert Dewar  <dewar@adacore.com>
3193         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
3194         reformatting.
3196 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3198         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
3199         which demonstrates the expansion of while loops subject to
3200         attribute 'Loop_Entry. The condition of a while loop along with
3201         related condition actions is now wrapped in a function.  Instead
3202         of repeating the condition, the expansion now calls the function.
3204 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3206         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
3207         error when reporting of missing values in a case statement for
3208         a type with a static predicate.
3209         (Check_Choices): Reject a choice given by a subtype to which a
3210         Dynamic_Predicate applies.
3211         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
3212         Has_Dynamic_Predicate_Aspect flag from parent.
3214 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3216         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
3217         cannot apply to a subtype of an incomplete type.
3218         (Is_Static_Choice): Treat an Others_Clause as static. The
3219         staticness of the expression and of the range are checked
3220         elsewhere.
3222 2014-07-31  Pascal Obry  <obry@adacore.com>
3224         * adaint.h (__gnat_ftell64): Added.
3225         (__gnat_fseek64): Added.
3226         (__int64): Added.
3227         * cstreams.c (__int64): Removed.
3229 2014-07-31  Pascal Obry  <obry@adacore.com>
3231         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
3232         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
3233         (ftell64): Always returns a 64bit value.
3234         * cstreams.c (int64): New definition.
3235         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
3236         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
3237         uses ftello() on UNIX.
3238         (__gnat_fseek64): Offset is always a 64bit value. The
3239         implementation now uses fseeko() on UNIX.
3240         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
3241         always use fseek64 to set the offset.
3242         (Size): Simplify code, always use fseek64/ftell64.
3243         * s-direio.ads (Count): Now an int64.
3244         * g-socket.ads (Vector_Element): Adjust definition for Length
3245         to be a size_t. This matches the C definition and avoid using
3246         a 64bit integer on 32bit platforms now that Count is always 64bit.
3247         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
3248         (C_Recvmsg): Change some conversion to account for change in
3249         Vector_Element.
3250         (C_Sendmsg): Likewise.
3252 2014-07-31  Robert Dewar  <dewar@adacore.com>
3254         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
3255         * debug.adb: Remove documentation of -gnatdm flag.
3256         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
3257         -gnatdm flag.
3259 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3261         * lib-writ.adb (Write_Unit_Information): Fix case where U =
3262         No_Unit.
3264 2014-07-31  Claire Dross  <dross@adacore.com>
3266         * exp_util.adb, exp_util.ads
3267         (Get_First_Parent_With_External_Axiomatization_For_Entity):
3268         New routine to find the first parent of an entity with
3269         a pragma Annotate (GNATprove, External_Axiomatization).
3270         (Has_Annotate_Pragma_For_External_Axiomatization): New function
3271         to check if a package has a pragma Annotate (GNATprove,
3272         External_Axiomatization).
3273         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
3274         flag on the entity for the declaration created for a formal
3275         subprogram in an instance. This is a renaming declaration,
3276         or in GNATprove_Mode the declaration of an expression function
3277         that captures the axiomatization of the actual.
3278         * sem_ch6.adb (Analyze_Expression_Function): For a
3279         Generic_Actual_Subprogram, place body immediately after the
3280         declaration because it may be used in a subsequent declaration
3281         in the instance.
3282         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
3283         the actual is a function, not an operator. Handle functions with
3284         one and two parameters and binary and unary operators.
3286 2014-07-31  Pascal Obry  <obry@adacore.com>
3288         * cstreams.c (__gnat_is_regular_file_fd): Removed.
3289         * adaint.c (__gnat_is_regular_file_fd): Added.
3291 2014-07-31  Robert Dewar  <dewar@adacore.com>
3293         * exp_strm.adb: Minor reformatting.
3295 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3297         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
3298         Analyze_Associations, to create a wrapper around operators that
3299         are actuals to formal subprograms. This is done in GNATProve
3300         mode in order to propagate the contracts of the operators to
3301         the body of the instance.
3303 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3305         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
3306         legal if within an aspect specification for a generic subprogram.
3308 2014-07-31  Javier Miranda  <miranda@adacore.com>
3310         * gnat1drv.adb (Back_End_Inlining): Set to false if
3311         Suppress_All_Inlining is set.
3312         * debug.adb: Adding documentation for -gnatd.z.
3313         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
3314         processing to -gnatn1 for calls to Inline_Always routines.
3315         (Add_Inlined_Subprogram): Remove previous patch.
3317 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3319         * sem_ch13.adb (Check_One_Function): Apply properly the static
3320         semantic rules for indexing aspects and the functions they denote.
3322 2014-07-31  Javier Miranda  <miranda@adacore.com>
3324         * debug.adb: Complete documentation of -gnatd.z.
3326 2014-07-31  Bob Duff  <duff@adacore.com>
3328         * gnat_ugn.texi: Minor doc fixes.
3330 2014-07-31  Robert Dewar  <dewar@adacore.com>
3332         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
3333         index value.
3335 2014-07-31  Tristan Gingold  <gingold@adacore.com>
3337         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
3338         (Packed_Bytes1): Make component aliased.
3340 2014-07-31  Robert Dewar  <dewar@adacore.com>
3342         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
3344 2014-07-31  Robert Dewar  <dewar@adacore.com>
3346         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
3347         reformatting.
3349 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3351         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
3352         on array references here, now done more selectively in trans.c.
3354 2014-07-31  Doug Rupp  <rupp@adacore.com>
3356         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
3358 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3360         * sem_util.adb (Is_Effectively_Volatile): New routine.
3362 2014-07-31  Fedor Rybin  <frybin@adacore.com>
3364         * gnat_ugn.texi: Document --test-duration option for gnattest.
3366 2014-07-31  Javier Miranda  <miranda@adacore.com>
3367             Eric Botcazou  <ebotcazou@adacore.com>
3369         * opt.ads (Back_End_Inlining): New variable which controls
3370         activation of inlining by back-end expansion.
3371         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
3372         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
3373         the body to be inlined by the frontend if Back_End_Inlining
3374         is enabled.
3375         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
3376         (Expand_Call): If backend inlining is enabled let the backend to
3377         handle inlined subprograms.
3378         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
3379         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
3380         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
3381         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
3382         enabled.
3383         * debug.adb Document -gnatd.z
3384         * fe.h Import Back_End_Inlining variable.
3385         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
3386         enabled then declare attribute "always inline"
3387         * gcc-interface/decl.c, gcc-interface/trans.c,
3388         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
3390 2014-07-31  Robert Dewar  <dewar@adacore.com>
3392         * a-ngelfu.ads: Minor comment fix.
3394 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3396         * freeze.adb (Freeze_Record_Type): Replace all calls to
3397         Is_SPARK_Volatile with Is_Effectively_Volatile and update
3398         related comments.
3399         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
3400         Replace all calls to Is_SPARK_Volatile with
3401         Is_Effectively_Volatile and update related comments.
3402         * sem_ch5.adb (Analyze_Iterator_Specification,
3403         Analyze_Loop_Parameter_Specification): Replace all calls to
3404         Is_SPARK_Volatile with Is_Effectively_Volatile and update
3405         related comments.
3406         * sem_ch6.adb (Process_Formals): Replace all calls to
3407         Is_SPARK_Volatile with Is_Effectively_Volatile and update
3408         related comments.
3409         * sem_ch12.adb (Instantiate_Object): Replace the call to
3410         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
3411         and update related comment.
3412         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
3413         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
3414         with Is_Effectively_Volatile and update related comments.
3415         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
3416         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
3417         update related comments.
3418         * sem_util.adb (Has_Enabled_Property,
3419         Variable_Has_Enabled_Property): Replace all calls
3420         to Is_SPARK_Volatile with Is_Effectively_Volatile and
3421         update related comments.
3422         (Is_Effectively_Volatile): New routine.
3423         (Is_Effectively_Volatile_Object): New routine.
3424         (Is_SPARK_Volatile): Removed.
3425         (Is_SPARK_Volatile_Object): Removed.
3426         * sem_util.ads (Is_Effectively_Volatile): New routine.
3427         (Is_Effectively_Volatile_Object): New routine.
3428         (Is_SPARK_Volatile): Removed.
3429         (Is_SPARK_Volatile_Object): Removed.
3431 2014-07-31  Pascal Obry  <obry@adacore.com>
3433         * s-fileio.adb (Open): Make sure a shared file gets inserted into
3434         the global list atomically. This ensures that the file descriptor
3435         won't be freed because another tasks is closing the file.
3437 2014-07-31  Robert Dewar  <dewar@adacore.com>
3439         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
3440         generation of _FIRST and _LAST variables even in GNATprove_Mode.
3441         * gnat_ugn.texi: Minor editing.
3442         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
3443         aggregate is marked Comes_From_Source if argument is CFS.
3445 2014-07-31  Pascal Obry  <obry@adacore.com>
3447         * s-fileio.adb: Remove obsolete comment.
3449 2014-07-31  Vincent Celier  <celier@adacore.com>
3451         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
3452         overriding keyword before function to avoid error when compiler
3453         is called with -gnatyO (check overriding indicators).
3455 2014-07-31  Tucker Taft  <taft@adacore.com>
3457         * gnat_ugn.texi: Add a paragraph pointing the reader
3458         to the "plugins" example.
3460 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3462         * freeze.adb (Freeze_Expression): Document the
3463         purpose of the parent chain traversal.
3465 2014-07-31  Robert Dewar  <dewar@adacore.com>
3467         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
3468         unconstrained fpt ops.
3470 2014-07-31  Pascal Obry  <obry@adacore.com>
3472         * s-fileio.adb (Open): Make sure a shared file gets inserted into
3473         the global list atomically. This ensures that the file descriptor
3474         won't be freed because another tasks is closing the file.
3476 2014-07-31  Vincent Celier  <celier@adacore.com>
3478         * projects.texi: Minor spelling error fix.
3480 2014-07-31  Robert Dewar  <dewar@adacore.com>
3482         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
3483         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
3484         information.
3485         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
3486         * restrict.adb (Process_Restriction_Synonyms): Add handling
3487         of No_Elaboration_Code_All.
3488         * restrict.ads (Process_Restriction_Synonyms): Now handles
3489         No_Elaboration_Code_All.
3490         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
3491         No_Elaboration_Code_All.
3492         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
3493         Handle setting of No_Elab_Code in unit information. Handle
3494         No_Elaboration_Code_All.
3495         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
3496         pragma processing.
3497         (Name_No_Elaboration_Code_All): New name for pragma processing.
3499 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3501         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
3502         types with a null range and use the Esize of the component
3503         instead of its RM_Size to identify appropriate values.
3505 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3507         * freeze.adb Add with and use clause for Aspects.
3508         (Freeze_Expression): Emit an error when a volatile constant lacks
3509         Boolean aspect Import.
3510         (Has_Boolean_Aspect_Import): New routine.
3512 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
3514         * exp_util.adb: Minor reformatting.
3516 2014-07-31  Vincent Celier  <celier@adacore.com>
3518         * errutil.adb (Error_Msg): Make sure that all components of
3519         the error message object are initialized.
3521 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3523         * sem_ch4.adb (Try_Container_Indexing): If the container type is
3524         class-wide, use specific type to locate iteration primitives.
3525         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
3526         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
3527         Minor error message reformating.
3528         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
3529         aspect for a derived type.
3531 2014-07-31  Robert Dewar  <dewar@adacore.com>
3533         * debug.adb: Document debug flag d.X.
3535 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3537         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
3538         * sem_util.adb (Find_Specific_Type): If type is untagged private,
3539         retrieve full view so that primitive operations can be located.
3540         * exp_disp.adb Move Find_Specific_Type to sem_util.
3541         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
3542         Find_Specific_Type to locate primitive equality.
3543         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
3544         type does not require initialization.
3545         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
3546         body all visibility is established, and the enclosing package
3547         declarations must not be installed.
3549 2014-07-31  Yannick Moy  <moy@adacore.com>
3551         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
3552         Make subprogram public.
3554 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3556         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
3557         predicate Discriminated_Size, to distinguish between private
3558         components that depend on discriminants from those whose size
3559         depends on some other non-static expression.
3561 2014-07-31  Nicolas Setton  <setton@adacore.com>
3563         * g-exptty.adb (Close): Fix binding to Waitpid: use the
3564         tty version.
3566 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3568         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
3569         in a discrete range, when 'range was probably intended.
3571 2014-07-31  Robert Dewar  <dewar@adacore.com>
3573         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
3575 2014-07-31  Robert Dewar  <dewar@adacore.com>
3577         * frontend.adb: Minor reformatting.
3578         * sem.adb: Minor reformatting.
3579         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
3580         identifiers on rewrite.
3581         * par.adb: Minor comment updates.
3582         * a-ngelfu.adb (Cos): Minor simplification.
3583         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
3584         and recovery for bad aspect.
3585         * exp_ch3.adb: Code clean up.
3586         * sem_util.ads: Minor comment correction.
3587         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
3588         * sem_ch3.adb: Code clean up.
3589         * binderr.ads: Minor comment correction.
3591 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3593         * exp_disp.adb (Expand_Interface_Conversion): A call whose
3594         prefix is a static conversion to an interface type that is not
3595         class-wide is not dispatching.
3597 2014-07-31  Robert Dewar  <dewar@adacore.com>
3599         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
3600         s-traceb-mastop.adb: Minor reformatting.
3602 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3604         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
3605         expansion, to handle properly visibility of selected components
3606         in instance bodies.
3608 2014-07-31  Robert Dewar  <dewar@adacore.com>
3610         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
3611         * par-ch2.adb (P_Pragma): Set Inside_Depends.
3612         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
3613         Check_Unary_Plus_Or_Minus.
3614         * scans.ads (Inside_Depends): New flag.
3615         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
3616         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
3617         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
3618         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
3619         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
3620         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
3621         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
3623 2014-07-31  Javier Miranda  <miranda@adacore.com>
3625         * s-vaflop.adb Move the body of function T_To_G before
3626         T_To_D. Required for frontend inlining.
3627         * inline.adb (Has_Excluded_Contract): New subprogram used to
3628         check if a subprogram inlined by the frontend has contracts
3629         which cannot be inlined.
3631 2014-07-31  Bob Duff  <duff@adacore.com>
3633         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
3634         (Call_Chain): Add 1 to number of frames to skip, to account for
3635         the fact that there's one more frame on the stack.
3636         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
3638 2014-07-31  Robert Dewar  <dewar@adacore.com>
3640         * checks.adb (Enable_Overflow_Check): More precise setting of
3641         Do_Overflow_Check flag for division.
3643 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3645         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
3646         array types with implementation type.
3648 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3650         * sem_ch10.adb (Process_State): Remove local variable Name. Add
3651         local variable Decl. Partially declare an abstract state by
3652         generating an entity and storing it in the state declaration.
3653         * sem_prag.adb (Create_Abstract_State): Fully declare a
3654         semi-declared abstract state.
3656 2014-07-31  Robert Dewar  <dewar@adacore.com>
3658         * prj-nmsc.adb: Minor reformatting.
3660 2014-07-31  Bob Duff  <duff@adacore.com>
3662         * s-tasdeb.adb (System.Tasking.Debug): Remove
3663         all usage of the secondary stack from this package.
3665 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3667         * freeze.adb (Freeze_Expression): Update the loop in charge
3668         of finding a proper insertion place for freeze nodes to handle
3669         N_Expression_With_Actions nodes.
3671 2014-07-31  Robert Dewar  <dewar@adacore.com>
3673         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
3674         reformatting.
3676 2014-07-31  Pascal Obry  <obry@adacore.com>
3678         * prj-nmsc.adb: Minor reformatting.
3680 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3682         * sem_util.adb (Has_Preelaborable_Initialization): Check that
3683         type is tagged before checking whether a user-defined Initialize
3684         procedure is present.
3686 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
3688         * a-ngelfu.ads (Sqrt): Augment postcondition.
3690 2014-07-31  Pascal Obry  <obry@adacore.com>
3692         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
3693         directory and ALI directory must be different than all object
3694         and library directories of aggregated projects.
3696 2014-07-31  Vincent Celier  <celier@adacore.com>
3698         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
3699         to package body, as it is not called from outside. Remove argument
3700         Project_Tree, no longer used. When runtime cannot be found,
3701         call Raise_Invalid_Config instead of failing the program.
3703 2014-07-31  Robert Dewar  <dewar@adacore.com>
3705         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
3706         (Overflow_Check).
3707         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
3708         no longer needed.
3710 2014-07-31  Robert Dewar  <dewar@adacore.com>
3712         * gnat_ugn.texi: Document new switch -gnato0.
3713         * sem_ch3.ads: Minor reformatting.
3714         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
3715         (we do not want overflow checks when incrementing elaboration
3716         counters).
3717         * einfo.ads: Minor reformatting.
3719 2014-07-31  Robert Dewar  <dewar@adacore.com>
3721         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
3722         * s-arit64.adb: Minor reformatting.
3724 2014-07-31  Robert Dewar  <dewar@adacore.com>
3726         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
3727         checking is enabled except in GNAT_Mode.
3728         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
3729         (suppress overflow checks).
3731 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3733         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
3734         invariant procedure for an internally generated subtype that is
3735         created for an object of a class-wide type.
3737 2014-07-31  Vincent Celier  <celier@adacore.com>
3739         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
3741 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
3743         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
3744         exp_disp.adb: Minor reformatting.
3746 2014-07-31  Robert Dewar  <dewar@adacore.com>
3748         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
3749         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
3750         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
3751         reformatting.
3753 2014-07-31  Robert Dewar  <dewar@adacore.com>
3755         * sem_ch13.adb: Minor reformatting.
3757 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3759         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
3760         is an unchecked_union, warn that invariants will not be checked
3761         on components that have them.
3763 2014-07-31  Robert Dewar  <dewar@adacore.com>
3765         * freeze.adb (Freeze_Entity): Check for error of
3766         Type_Invariant'Class applied to a untagged type.
3767         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
3768         as null body, so that we perform error checks even if expansion
3769         is off.
3771 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3773         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
3774         is already present, nothing to do.
3775         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
3776         component, check whether the access type has an invariant before
3777         checking the designated type.
3778         (Build_Record_Invariant_Proc): Change suffix of generated
3779         name to prevent ambiguity when record type has invariants
3780         in addition to those of components, and two subprograms are
3781         constructed. Consistent with handling of array types.
3782         (Insert_Component_Invariant_Checks): Build invariant procedure
3783         body when one has not been created yet, in the case of composite
3784         types that are completions and whose full declarations carry
3785         invariants.
3787 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3789         * gnat_rm.texi: Minor doc fixes.
3791 2014-07-30  Robert Dewar  <dewar@adacore.com>
3793         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
3795 2014-07-30  Vincent Celier  <celier@adacore.com>
3797         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
3798         of error message.
3799         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
3800         message to report that a directory cannot be created, to avoid
3801         processing of the directory path that may contains special
3802         insertion characters.
3804 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3806         * a-crdlli.ads: Place declaration of Empty_List after full type
3807         declaration for Curosr, to prevent freezing error.
3809 2014-07-30  Robert Dewar  <dewar@adacore.com>
3811         * get_targ.adb: Minor code reorganization.
3812         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
3813         reformatting.
3815 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3817         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
3818         not Program_Error, when attempting to remove an element not in
3819         the set. This is the given semantics for all set containers.
3821 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3823         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
3824         element is not present in tree return rather than violating
3825         an assertion. Constraint_Error will be raised in the caller if
3826         element is not in the container.
3828 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
3830         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
3831         (elab body): Add provision for default target config file.
3832         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
3834 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3836         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
3837         when attempting to remove an element not in the set. This is
3838         the given semantics for all set containers.
3839         * a-cborse.adb (Delete): Attempt removal first, to check for
3840         tampering, before checking whether this is an attempt to
3841         delete a  non-existing element, and in fthe latter case raise
3842         Constraint_Error.
3844 2014-07-30  Vincent Celier  <celier@adacore.com>
3846         * prj-proc.adb (Recursive_Process): Do not create a new
3847         Project_Id if the project is already in the list of projects of
3848         the tree.
3850 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3852         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
3853         whose type is an incomplete formal type.
3854         (Analyze_Return_Type): Reject a return type that is an untagged
3855         imcomplete formal type.
3856         (Process_Formals): Reject a formal parameter whose type is an
3857         untagged formal incomplete type.
3858         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
3859         an untagged formal incomplete type.
3861 2014-07-30  Robert Dewar  <dewar@adacore.com>
3863         * gnat_ugn.texi: Minor spelling correction.
3864         * makeutl.adb: Minor code reorganization.
3865         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
3867 2014-07-30  Robert Dewar  <dewar@adacore.com>
3869         * einfo.ads (Has_Unchecked_Union): Document that this is used
3870         to check for illegal Valid_Scalars attribute references.
3871         * exp_attr.adb (Build_Record_VS_Func): New function
3872         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
3873         function.
3874         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
3875         Unchecked_Union Add note on 'Valid_Scalars generating a lot
3876         of code.
3877         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
3878         error on attempt to apply Valid_Scalars to Unchecked_Union type.
3880 2014-07-30  Steve Baird  <baird@adacore.com>
3882         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
3883         of A(I..J)(K) in CodePeer_Mode.
3885 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
3887         * gnat_ugn.texi: Fix typo.
3889 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3891         * lib-writ.ads: document format change.
3893 2014-07-30  Pascal Obry  <obry@adacore.com>
3895         * prj-util.adb (For_Interface_Sources): Do not
3896         include sources from withed externally built projects.
3898 2014-07-30  Robert Dewar  <dewar@adacore.com>
3900         * lib.adb: Minor reformatting.
3901         * prj-util.adb: Minor reformatting.
3903 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
3905         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
3906         that depends on discriminants, and which is given by an others
3907         clause, create an explicit subtype with the discriminant values
3908         of the enclosing aggregate, because the backend cannot otherwise
3909         retrieve the actual bounds of the array.
3911 2014-07-30  Fedor Rybin  <frybin@adacore.com>
3913         * gnat_ugn.texi: Improve gnattest documentation.
3915 2014-07-30  Pascal Obry  <obry@adacore.com>
3917         * makeutl.adb (Insert_Project_Sources): Properly handle sources
3918         that are aggregated. We want to include sources not only part
3919         of libraries but also if part of an aggregated project from an
3920         aggregate library.
3921         * prj.adb (For_Project_And_Aggregated_Context): Properly check
3922         state of root project.
3924 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3926         * lib-load.ads: Minor reformatting.
3927         * sinfo.ads (Library_Unit): Update comment.
3928         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
3929         is redundant. Instead used the pragma Node_Id directly as the
3930         element type.
3932 2014-07-30  Thomas Quinot  <quinot@adacore.com>
3934         * lib.adb (Store_Note): Store only notes that do not come from
3935         an instance, and that are in the extended main source unit.
3936         * lib-writ (Write_Unit_Information): Annotations from subunits
3937         must be emitted along with those for the main unit, and they
3938         must carry a specific file name.
3939         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
3940         Unit_Id for the source file containing the pragma, as in the
3941         case of annotations from subunits we might not have a readily
3942         available unit id.
3943         * ali.adb (Scan_ALI): Account for above change in data structure.
3945 2014-07-30  Vincent Celier  <celier@adacore.com>
3947         * makeutl.adb (Insert_Project_Sources): When the library project
3948         is an aggregate Stand-Alone Library, insert in the queue the
3949         Ada interface units, with Closure set to True;
3951 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
3953         * sem_util.adb: Fix minor typo.
3954         * makeutl.adb: Minor reformatting.
3956 2014-07-30  Robert Dewar  <dewar@adacore.com>
3958         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
3960 2014-07-30  Yannick Moy  <moy@adacore.com>
3962         * checks.ads: Fix typo in comment.
3964 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
3966         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
3967         entities that materialize range bounds, if any.
3969 2014-07-30  Vincent Celier  <celier@adacore.com>
3971         * projects.texi: Minor spelling fix.
3973 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
3975         * checks.adb (Make_Bignum_Block): Use the new secondary stack
3976         build routines to manage the mark.
3977         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
3978         Use the new secodary stack build routines to manage the mark.
3979         (Insert_Actions_In_Scope_Around): Add new formal parameter
3980         Manage_SS along with comment on its usage. Code and comment
3981         reformatting. Mark and release the secondary stack when the
3982         context warrants it.
3983         (Make_Transient_Block): Update the call
3984         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
3985         (Wrap_Transient_Declaration): Remove local variable
3986         Uses_SS. Ensure that the secondary stack is marked and released
3987         when the related object declaration appears in a library level
3988         package or package body. Code and comment reformatting.
3989         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
3990         (Build_SS_Release_Call): New routine.
3992 2014-07-30  Steve Baird  <baird@adacore.com>
3994         * exp_attr.adb: Revert previous change, not needed after all.
3996 2014-07-30  Vincent Celier  <celier@adacore.com>
3998         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
3999         Closure => True for interfaces of Stand-Alone Libraries.
4000         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
4001         Boolean component Closure, defaulted to False.
4003 2014-07-30  Yannick Moy  <moy@adacore.com>
4005         * sem_res.adb: Fix typo in error message.
4007 2014-07-30  Robert Dewar  <dewar@adacore.com>
4009         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
4010         as name suffixes rather than L/H for subtype bounds.
4011         * tbuild.ads: Minor comment improvements and fixes
4012         (Make_External_Name): Document that suffix can start with an
4013         underscore.
4015 2014-07-30  Bob Duff  <duff@adacore.com>
4017         * gnat_ugn.texi: Document --rep-clauses switch.
4019 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4021         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
4022         Default_Component_Value can only be specified for scalar type or
4023         arrays of scalar types respectively.  This legality check must
4024         be performed at the point the aspect is analyzed, in order to
4025         reject aspect specifications that apply to a partial view.
4027 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4029         * freeze.adb: Minor reformatting.
4031 2014-07-30  Robert Dewar  <dewar@adacore.com>
4033         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
4034         codepeer mode.
4036 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4038         * freeze.adb (Check_Expression_Function): At the freeze point
4039         of an expression function, verify that the expression in the
4040         function does not contain references to any deferred constants
4041         that have no completion yet.
4042         (Freeze_Expression, Freeze_Before): call
4043         Check_Expression_Function.
4044         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
4045         * a-ciorse.adb: Add Adjust and Finalize routines for
4046         Reference_Control_Type. Use it in the construction of Reference
4047         and Constant_Reference values.
4049 2014-07-30  Robert Dewar  <dewar@adacore.com>
4051         * exp_aggr.adb: Update comments.
4052         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
4053         reformatting.
4055 2014-07-30  Robert Dewar  <dewar@adacore.com>
4057         * cstand.adb (New_Standard_Entity): New version takes name
4058         string to call Make_Name.
4059         (Create_Standard): Use this routine to set name before setting other
4060         fields.
4062 2014-07-30  Robert Dewar  <dewar@adacore.com>
4064         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
4065         entity reference.
4066         (Expand_Attribute, case Last): Ditto.
4067         * exp_ch3.adb (Constrain_Index): New calling sequence for
4068         Process_Range_Expr_In_Decl.
4069         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
4070         problematical case.
4071         * sem_ch3.adb (Constrain_Index): New calling sequence for
4072         Process_Range_Expr_In_Decl.
4073         (Set_Scalar_Range_For_Subtype): ditto.
4074         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
4075         subtype.
4076         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
4077         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
4078         types if we are not assuming no invalid values.
4080 2014-07-30  Robert Dewar  <dewar@adacore.com>
4082         * clean.adb: Minor reformatting.
4083         * opt.ads: Minor fix to incorrect comment.
4085 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4087         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
4088         subprogram, used by bounded hashed sets, to delete a node at
4089         a given index, whose element may have been improperly updated
4090         through a Reference_Preserving key.
4091         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
4092         * a-cbhase.adb: Add Adjust and Finalize routines for
4093         Reference_Control_Type.
4094         (Delete, Insert): Raise Program_Error, not Constraint_Error,
4095         when operation is illegal.
4096         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
4097         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
4098         private with_clause for Ada.Finalization.
4099         * a-cbmutr.adb: Add Adjust and Finalize routines for
4100         Reference_Control_Type. Use it in the construction of Reference
4101         and Constant_Reference values.
4103 2014-07-30  Robert Dewar  <dewar@adacore.com>
4105         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
4107 2014-07-30  Pascal Obry  <obry@adacore.com>
4109         * clean.adb (Clean_Project): Properly check for directory
4110         existence before trying to enter it.
4112 2014-07-30  Robert Dewar  <dewar@adacore.com>
4114         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
4116 2014-07-30  Robert Dewar  <dewar@adacore.com>
4118         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
4119         missing semicolon after name.
4121 2014-07-30  Pascal Obry  <obry@adacore.com>
4123         * prj.ads (Gprinstall_Flags): New constant.
4124         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
4125         missing library dir if Directories_Must_Exist_In_Projects
4126         is false.
4128 2014-07-30  Bob Duff  <duff@adacore.com>
4130         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
4131         * s-traceb.ads: Updagte comments.
4133 2014-07-30  Robert Dewar  <dewar@adacore.com>
4135         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
4136         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
4137         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
4138         reformatting.
4140 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4142         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
4143         subprogram, used by all versions of hashed sets, to delete a node
4144         whose element has been improperly updated through a Reference_
4145         Preserving key.
4146         * a-cohase.adb: Remove Delete_Node, use new common procedure
4147         Delete_Node_At_Index.
4148         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
4149         * a-cihase.adb: Add Adjust and Finalize routines for
4150         Reference_Control_Type.
4151         (Reference_Preserving_Key): Build aggregate for
4152         Reference_Control_Type
4154 2014-07-30  Yannick Moy  <moy@adacore.com>
4156         * checks.adb, checks.ads (Determine_Range_R): New procedure to
4157         determine the possible range of a floating-point expression.
4159 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4161         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
4162         * a-cborse.adb: Add Adjust and Finalize routines for
4163         Reference_Control_Type.
4164         (Reference_Preserving_Key): Build aggregate for
4165         Reference_Control_Type.
4166         (Delete): Check for tampering, and raise Program_Error (not
4167         Constraint_Error) when attempting to delete an element not in
4168         the set.
4169         (Insert): Ditto.
4171 2014-07-30  Bob Duff  <duff@adacore.com>
4173         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
4174         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
4175         Exception_Information is used to produce useful debugging
4176         information for the programmer. However, it was also used to
4177         implement the stream attributes for type Exception_Occurrence. The
4178         latter requires a stable and portable interface, which meant
4179         that we couldn't include a symbolic traceback. A separate set of
4180         routines was used to provide symbolic tracebacks under program
4181         control (i.e. not automatically). The goal of this ticket is
4182         to provide such automatic tracebacks, so the change here is to
4183         split the two functionalities: Exception_Information gives the
4184         maximally useful information for debugging (i.e. it now includes
4185         a symbolic traceback when a decorator is set, and it can be
4186         improved freely in the future without disturbing streaming).
4187         Untailored_Exception_Information always uses hexadecimal addresses
4188         in the traceback, has a stable and portable output, and is now
4189         used for streaming.
4191 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4193         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
4194         on the target of the assignment to find out whether it
4195         can be directly done by the back-end.
4196         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
4198 2014-07-30  Robert Dewar  <dewar@adacore.com>
4200         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
4201         a-tasatt.adb: Minor reformatting.
4203 2014-07-30  Robert Dewar  <dewar@adacore.com>
4205         * exp_ch4.adb: Minor reformatting.
4207 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4209         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
4210         Reference_Control_Type to generic package, to keep additional
4211         information for Reference_Types that manipulate keys. Add Adjust and
4212         Finalize procedures for this type.
4213         (Finalize): When finalizing a reference_preserving_key, verify
4214         that the key of the new value is equivalent to the key of the
4215         original element, raise Program_Error otherwise.
4216         (Insert): Detect tampering.
4217         (Reference_Preserving_Key): Build proper Reference_Control_Type,
4218         and update Busy and Lock bits to detect tampering.
4219         * a-cohase.ads: Keep with-clause private.
4221 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4223         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
4224         of an equality are of an Unchecked_Union type and lack inferable
4225         discriminants.
4227 2014-07-30  Bob Duff  <duff@adacore.com>
4229         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
4230         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
4231         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
4232         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
4233         we can call them from the runtimes. Leave renamings in place under GNAT.
4235 2014-07-30  Yannick Moy  <moy@adacore.com>
4237         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
4238         inlining in GNATprove mode.
4240 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4242         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
4243         Reference_Control_Type to generic package, to keep additional
4244         information for Reference_Types that manipulate keys. Add Adjust and
4245         Finalize procedures for this type.
4246         (Delete_Node): New procedure called when finalizing a
4247         Reference_Control_Type, to remove a node whose element has been
4248         improperly updated through a Reference.
4249         (Insert): Detect tampering.
4250         (Reference_Preserving_Key): Build proper Reference_Control_Type,
4251         and update Busy and Lock bits to detect tampering.
4253 2014-07-30  Bob Duff  <duff@adacore.com>
4255         * exp_intr.ads: Minor comment fix.
4257 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
4259         * exp_prag.adb, a-tags.ads: Minor typo fixes.
4261 2014-07-30  Bob Duff  <duff@adacore.com>
4263         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
4264         a-except.ads, g-traceb.adb, memtrack.adb,
4265         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
4266         Cleanup: Make the three versions of System.Traceback.Call_Chain
4267         have the same interface. Use an array for the Traceback parameter
4268         instead of an Address.  This will enable reduction in code
4269         duplication.
4271 2014-07-30  Pat Rogers  <rogers@adacore.com>
4273         * gnat_ugn.texi: Corrected minor textual error in description
4274         of switch -gnatwl.
4276 2014-07-30  Bob Duff  <duff@adacore.com>
4278         * Makefile.rtl: Sort file names.
4280 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4282         * a-tasatt.adb: Complete previous change: kill spurious warning
4283         on e.g. sparc, and make sure we only use the fast path when the
4284         alignment is compatible.
4286 2014-07-30  Yannick Moy  <moy@adacore.com>
4288         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
4289         coming from source.
4291 2014-07-30  Yannick Moy  <moy@adacore.com>
4293         * inline.adb (Build_Body_To_Inline): Issue more precise messages
4294         for declarations that prevent inlining.
4295         (Cannot_Inline): Change usual start of message to refer to contextual
4296         analysis in GNATprove mode.
4297         * sem_res.adb (Resolve_Call): Change usual start of message to
4298         refer to contextual analysis in GNATprove mode, when inlining
4299         not possible.
4301 2014-07-30  Robert Dewar  <dewar@adacore.com>
4303         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
4304         * inline.adb: Minor reformatting.
4306 2014-07-30  Javier Miranda  <miranda@adacore.com>
4308         * a-tags.ads: Add comments.
4310 2014-07-30  Pat Rogers  <rogers@adacore.com>
4312         * gnat_rm.texi: Minor word error.
4314 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4316         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
4317         created to capture the value of the prefix of 'Old at the
4318         beginning of the current declarative part, to prevent data flow
4319         anomalies in the postcondition procedure that will follow.
4321 2014-07-30  Yannick Moy  <moy@adacore.com>
4323         * debug.adb: Retire debug flag -gnatdQ.
4324         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
4325         on decl, not on body.  Ignore predicate functions.
4326         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
4327         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
4328         body when generating a decl for a body on which SPARK_Mode aspect
4329         is given.
4330         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
4331         attaching pragma to entity, to account for declaration not coming
4332         from source.
4333         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
4334         as not always inlined in GNATprove mode, when called in an
4335         assertion context.
4337 2014-07-30  Vincent Celier  <celier@adacore.com>
4339         * debug.adb: Minor comment update.
4341 2014-07-30  Robert Dewar  <dewar@adacore.com>
4343         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
4344         * sprint.adb (Sprint_Node): Handle N_Contract case.
4345         * exp_prag.adb: Minor reformatting.
4346         * freeze.adb (Freeze_Entity): Check useless postcondition for
4347         No_Return subprogram.
4348         * sem_prag.adb: Minor reformatting.
4350 2014-07-30  Javier Miranda  <miranda@adacore.com>
4352         * a-tags.ads: Complete comments about performance.
4354 2014-07-30  Fedor Rybin  <frybin@adacore.com>
4356         * gnat_ugn.texi: Adding description for --exit-status option to
4357         gnattest section.  Fixing index entry of --passed-tests option
4358         in gnattest section.
4360 2014-07-30  Javier Miranda  <miranda@adacore.com>
4362         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
4363         rtsfind.ads: Remove references to package Interfaces.CPP since this
4364         package is no longer needed.
4366 2014-07-30  Bob Duff  <duff@adacore.com>
4368         * s-taasde.adb (Timer_Queue): Don't use a
4369         build-in-place function call to initialize the Timer_Queue.
4370         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
4371         Turn off polling in these units, because otherwise we get
4372         elaboration circularities with Ada.Exceptions when the -gnatP
4373         switch is used.
4374         * s-tassta.adb (Create_Task): Make sure independent tasks
4375         are created with Parent = Environment_Task. This was not true,
4376         for example, in s-interr.adb, when Interrupt_Manager does "new
4377         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
4378         which is wrong because the master is determined by the access
4379         type, which is at library level.
4380         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
4381         now set correctly by Create_Task.
4382         (Make_Passive): Remove the workaround for the race condition in
4383         Make_Independent.
4384         * frontend.adb (Frontend): Revert to previous method of detecting
4385         temporary configuration pragma files, recognizing such files by
4386         ".tmp" in the name. This is more general than detecting pragmas
4387         Source_File_Name_Project, because it allows any tool to use
4388         this naming convention, no matter the content of the file.
4389         * gnat_ugn.texi: Document this naming convention.
4391 2014-07-30  Robert Dewar  <dewar@adacore.com>
4393         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
4394         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
4395         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
4396         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
4397         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
4398         conversion.
4400 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4402         * sem_ch5.adb: Improve error recovery.
4403         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
4404         before analyzing the body, so that in GNATprove mode there is
4405         no light expansion. Whatever expansion is required by SPARK will
4406         be performed when analysing the inlined code.
4408 2014-07-30  Bob Duff  <duff@adacore.com>
4410         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
4412 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4414         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
4415         verify that it is not hidden by an inner implicit declaration.
4417 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4419         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
4420         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
4421         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
4422         the call returns an unconstrained type: in this case there is
4423         already a transient scope, and we should not establish a new one.
4424         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
4425         True, also insert cleanup actions in the tree.
4426         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
4427         with Clean set True.
4429 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4431         * s-taskin.ads (Direct_Index, Direct_Index_Range,
4432         Direct_Attribute_Element, Direct_Attribute_Array,
4433         Direct_Index_Vector, Direct_Attributes, Is_Defined,
4434         Indirect_Attributes): Removed.  (Atomic_Address,
4435         Attribute_Array, Attributes): New.
4436         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
4437         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
4438         (Finalize_Attributes): Reimplement.
4439         * s-tassta.adb (Create_Task): Remove call to
4440         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
4441         Replace Finalize_Attributes_Link by Finalize_Attributes.
4442         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
4443         Reimplement from scratch, using a simpler and more efficient
4444         implementation.
4445         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
4446         * s-parame.ads, s-parame-hpux.ads,
4447         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
4448         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
4449         Default_Attribute_Count.
4451 2014-07-30  Olivier Hainque  <hainque@adacore.com>
4453         * vxworks-ppc-link.spec: New file. Extra link
4454         instructions for ppc-vxworks.
4455         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
4456         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
4457         * system-vxworks-arm.ads: Likewise.
4458         * gcc-interface/Makefile.in: Enable .spec files.
4460 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4462         * sem_aggr.adb: Minor comment reformatting.
4464 2014-07-30  Robert Dewar  <dewar@adacore.com>
4466         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
4467         * sem_warn.adb (Has_Junk_Name): New function
4468         (Check_References): Use Has_Junk_Name to delete junk warnings
4469         (Check_Unset_Reference): ditto.
4470         (Warn_On_Unreferenced_Entity): ditto.
4471         (Warn_On_Useless_Assignment): ditto.
4473 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4475         * checks.adb (Insert_Valid_Check): Do not check for the packed
4476         array type of a prefix that is an access type.
4478 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4480         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
4481         Unconstrained_Array even if prefix is not frozen yet, as can
4482         occur with a private subtype used as a generic actual.
4484 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
4486         * sem_attr.adb: Minor reformatting.
4488 2014-07-30  Pat Rogers  <rogers@adacore.com>
4490         * gnat_rm.texi: Corrected minor wording error in description
4491         of No_Exception_Registration.
4493 2014-07-30  Yannick Moy  <moy@adacore.com>
4495         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
4496         mode. Realphabetize two subprograms.
4497         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
4498         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
4499         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
4500         mode.
4501         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
4502         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
4503         Is_Inline in GNATprove mode.
4504         (Analyze_Subprogram_Specification):
4505         Set Is_Inlined_Always at subprogram entity creation.
4506         * sem_res.adb (Resolve_Call): Do not deal with inlining during
4507         pre-analysis.  Issue warning on call to possibly inlined
4508         subprogram when body not seen.
4510 2014-07-30  Yannick Moy  <moy@adacore.com>
4512         * lib-xref.adb (Generate_Reference): Add special
4513         case for compiler-generated formals in GNATprove mode.
4515 2014-07-30  Yannick Moy  <moy@adacore.com>
4517         * sem_ch6.adb: Add comments.
4519 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4521         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
4523 2014-07-30  Robert Dewar  <dewar@adacore.com>
4525         * sem_aggr.adb, sem_res.adb: Minor reformatting.
4527 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4529         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4530         Bit_Order): Set Reverse_Bit_Order on the base type of the
4531         specified first subtype.
4533 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4535         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
4536         to capture the value of actuals of a limited type rather than
4537         an object declaration, to prevent spurious errors when analyzing
4538         the inlined body.
4540 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4542         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
4543         as an instance, and inhibit semantic checks on already analyzed
4544         code to prevent spurious errors.
4546 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4548         * a-exctra.ads ("="): New function, to restore compatibility.
4550 2014-07-30  Pascal Obry  <obry@adacore.com>
4552         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
4553         routine to use the OS dst setting.
4555 2014-07-30  Pat Rogers  <rogers@adacore.com>
4557         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
4559 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4561         * sem_util.adb (Wrong_Type): Disable some checks equally within
4562         instances and within inlined bodies, to suppress spurious type
4563         errors on already analyzed code.
4564         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
4565         is legal in an inlined body, juts as it is in an instance body.
4567 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4569         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
4570         body the operand of an unchecked conversion may be a literal, in
4571         which case its type is the target type of the conversion. This
4572         is in contrast to conversions in other contexts, where the
4573         operand cannot be a literal and must be resolvable independent
4574         of the context.
4576 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
4578         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
4579         mere scalar constant instead of a reference for a renaming of
4580         scalar literal.
4581         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
4582         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
4584 2014-07-30  Robert Dewar  <dewar@adacore.com>
4586         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
4587         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
4588         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
4589         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
4590         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
4591         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
4592         & code reorganization.
4594 2014-07-30  Bob Duff  <duff@adacore.com>
4596         * s-tassta.adb, sem_util.ads: Minor reformatting.
4598 2014-07-30  Yannick Moy  <moy@adacore.com>
4600         * inline.adb (Build_Body_To_Inline): Detect when
4601         subprogram has multiple returns, or not a single last return
4602         statement, in GNATprove mode.
4603         (Cannot_Inline): Simplify logic to handle case of GNATprove
4604         inlining first.
4606 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4608         * sem_ch6.adb: Stubs are not subject to inlining.
4610 2014-07-30  Bob Duff  <duff@adacore.com>
4612         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
4613         from a procedure to a function, so that it can more easily be
4614         called before the "begin" of a task.
4615         * s-taasde.ads (Delay_Block): Make this type immutably limited,
4616         so we can use a build-in-place function call to initialize
4617         Timer_Queue in the body.
4618         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
4619         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
4620         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
4621         Make_Independent before reaching its "begin", to avoid race
4622         conditions. This causes the activating task to wait until after
4623         Make_Independent is complete before proceeding.  In addition,
4624         we initialize data structures used by independent tasks before
4625         activating those tasks, to avoid possible use of uninitialized data.
4626         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
4627         Minor comment fixes.
4629 2014-07-30  Bob Duff  <duff@adacore.com>
4631         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
4632         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
4633         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
4634         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
4635         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
4637 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4639         * a-tasatt.adb: Remove old comments.
4641 2014-07-30  Yannick Moy  <moy@adacore.com>
4643         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
4644         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
4645         to explain rationale for inlining or not in GNATprove mode.
4646         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
4647         to False when inlining is not possible.
4648         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
4649         flag to indicate that subprogram is fully inlined. To be reversed
4650         if inlining problem is found.
4651         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
4652         call in potentially unevaluated context.
4654 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
4656         * s-tarest.adb, s-tarest.ads: Fix comments.
4658 2014-07-30  Robert Dewar  <dewar@adacore.com>
4660         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
4661         Change No_Scalar_Parts predicate to Scalar_Part_Present and
4662         invert sense of test. This avoids the "not No_xxx" situation
4663         which is always ugly.
4665 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4667         * inline.adb (Expand_Inlined_Call): When generating code for
4668         an internal subprogram the expansion uses the location of the
4669         call, so that gdb can skip over it. In GNATprove mode we want to
4670         preserve slocs of original subprogram when expanding an inlined
4671         call, to obtain better warnings, even though subprogram appears
4672         not to come from source if it is the inlining of a subprogram
4673         body without a previous spec.
4675 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4677         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4678         types with atomic components.
4680 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4682         * Make-generated.in: Remove now unnecessary targets after s-oscons
4683         reorg.
4685 2014-07-30  Yannick Moy  <moy@adacore.com>
4687         * sem_res.adb (Resolve_Call): Use ultimate alias
4688         of callee when available.
4690 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4692         * sem_ch6.adb (Analyze_Expression_Function): To check whether
4693         an expression function is a completion, use the specification of
4694         the previous declaration, not its entity, which may be internally
4695         generated in an inlined context.
4697 2014-07-30  Doug Rupp  <rupp@adacore.com>
4699         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
4700         temp files in /cache directory unless overridden by TMPDIR.
4702 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
4704         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
4705         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
4706         type CPU, so it can never be greater than CPU_Range'Last.
4708 2014-07-30  Bob Duff  <duff@adacore.com>
4710         * s-taskin.ads: Minor comment fix.
4712 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4714         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
4715         clauses.
4717 2014-07-30  Yannick Moy  <moy@adacore.com>
4719         * debug.adb: Free debug flag dQ used for frontend inlining in
4720         GNATprove mode..
4721         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
4722         debug flag..
4724 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4726         * Make-generated.in: Remove generation of s-oscons.ads, only
4727         generate the xoscons utility, in runtime-agnostic rules.
4728         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
4729         no longer supported.
4731 2014-07-30  Bob Duff  <duff@adacore.com>
4733         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
4734         parameter Chain to be used in the allocator case.
4735         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
4736         has tasks, wrap the code in a block that will activate them,
4737         including the usual finalization code to kill them off in case
4738         of exception or abort.
4740 2014-07-30  Robert Dewar  <dewar@adacore.com>
4742         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
4743         Remove renamings (don't work for gdb).
4744         (par): New synonym for p (avoid gdb ambiguities).
4745         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
4747 2014-07-30  Bob Duff  <duff@adacore.com>
4749         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
4750         fixes.
4751         * treepr.ads, treepr.adb (ppp): Make this debugging routine
4752         accept any type covered by Union_Id.
4754 2014-07-30  Robert Dewar  <dewar@adacore.com>
4756         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
4757         analyzing branches.
4758         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
4759         expression case.
4761 2014-07-30  Robert Dewar  <dewar@adacore.com>
4763         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
4764         of predicate aspect on entity other than a type.
4766 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4768         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
4769         when a subprogram body without a previous spec cannot be inlined
4770         in GNATprove mode, because it includes aspects or pragmas that
4771         generate a SPARK contract clause.
4772         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
4773         instance cannot be inlined.
4775 2014-07-30  Robert Dewar  <dewar@adacore.com>
4777         * debug.adb: Document that d7 suppresses compilation time output.
4778         * errout.adb (Write_Header): Include compilation time in
4779         header output.
4780         * exp_intr.adb (Expand_Intrinsic_Call): Add
4781         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
4782         Compilation_Date/Compilation_Time.
4783         * g-souinf.ads (Compilation_Date): New function
4784         (Compilation_Time): New function.
4785         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
4786         * gnat_rm.texi (Compilation_Date): New function
4787         (Compilation_Time): New function.
4788         * opt.ads (Compilation_Time): New variable.
4789         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
4790         * sem_intr.adb (Compilation_Date): New function.
4791         (Compilation_Time): New function.
4792         * snames.ads-tmpl (Name_Compilation_Date): New entry.
4793         (Name_Compilation_Time): New entry.
4795 2014-07-30  Yannick Moy  <moy@adacore.com>
4797         * inline.adb: Add comment.
4799 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4801         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
4802         parameterless attribute, and a postondition can mention an
4803         indexed component or a slice whose prefix is an attribute
4804         reference F'Result.
4806 2014-07-30  Robert Dewar  <dewar@adacore.com>
4808         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
4809         Avoid bomb when printing package Standard.
4811 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4813         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
4814         entity is created at this point, ensure that the name of the
4815         flag is unique, because the subprogram may be overloaded and
4816         other homonyms may also have elaboration flags created on the fly.
4818 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4820         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
4821         (Analyze_Attribute): Major cleanup of attribute
4822         'Update. The logic is now split into two distinct routines
4823         depending on the type of the prefix. The use of <> is now illegal
4824         in attribute 'Update.
4825         (Analyze_Record_Component_Update): New routine.
4826         (Check_Component_Reference): Removed.
4827         (Resolve_Attribute): Remove the return statement and ??? comment
4828         following the processing for attribute 'Update. As a result,
4829         the attribute now freezes its prefix.
4831 2014-07-30  Javier Miranda  <miranda@adacore.com>
4833         * exp_ch4.adb (Apply_Accessibility_Check): Do
4834         not call Base_Address() in VM targets.
4836 2014-07-30  Yannick Moy  <moy@adacore.com>
4838         * gnat1drv.adb (Adjust_Global_Switches): Set
4839         Ineffective_Inline_Warnings to True in GNATprove mode.
4840         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
4841         mode of inlining.
4842         * opt.ads (Ineffective_Inline_Warnings): Add comment that
4843         describes use in GNATprove mode.
4844         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
4845         pragma when applied to the special body created for inlining.
4847 2014-07-30  Robert Dewar  <dewar@adacore.com>
4849         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
4850         Minor reformatting.
4852 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4854         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
4855         not delayed. Update the delay status of most SPARK 2014 aspects.
4856         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
4857         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
4858         to Decorate and Insert_Pragma. Add various comments concerning
4859         the delay status of several SPARK 2014 aspects. The insertion
4860         of Refined_State now uses routine Insert_After_SPARK_Mode.
4861         (Decorate): New routine.
4862         (Decorate_Aspect_And_Pragma): Removed.
4863         (Insert_Delayed_Pragma): Removed.
4864         (Insert_Pragma): New routine.
4866 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4868         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
4869         only a warning, not an error on an attempt to inline a recursive
4870         subprogram.
4872 2014-07-30  Robert Dewar  <dewar@adacore.com>
4874         * g-forstr.adb: Minor code reorganization (use J rather than I
4875         as a variable name).
4876         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
4877         g-forstr.ads: Minor reformatting.
4879 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4881         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
4882         we are debugging the generated code.
4884 2014-07-30  Yannick Moy  <moy@adacore.com>
4886         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
4887         returns True for source pointer for an inlined body.
4889 2014-07-30  Javier Miranda  <miranda@adacore.com>
4891         * exp_ch4.adb (Apply_Accessibility_Check): Add
4892         missing calls to Base_Address().
4894 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4896         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
4897         mode, subprogram bodies without a previous declaration are also
4898         candidates for front-end inlining.
4900 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4902         * aspects.ads Aspects Async_Readers, Async_Writers,
4903         Effective_Reads and Effective_Writes do not need to be delayed.
4904         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
4905         optional Boolean expression when generating the corresponding
4906         pragma for an external property aspect.
4907         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
4908         local constant Obj. Add local constant Obj_Id. Reimplement the
4909         check which ensures that the related variable is in fact volatile.
4910         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
4911         * sem_util.adb (Is_Enabled): New routine.
4912         (Variable_Has_Enabled_Property): Reimplement the detection of
4913         an enabled external property.
4915 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
4917         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
4918         for body stubs.
4920 2014-07-30  Pascal Obry  <obry@adacore.com>
4922         * g-forstr.adb, g-forstr.ads: New.
4923         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
4924         GNAT.Formatted_String.
4926 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4928         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
4929         (Expand_Array_Aggregate): Also enable in-place expansion for
4930         code generated by the compiler.  For an object declaration,
4931         set the kind of the object in addition to its type.  If an
4932         in-place assignment is to be generated and it can be directly
4933         done by the back-end, do not expand the aggregate.
4934         * fe.h (Is_Others_Aggregate): Declare.
4935         * gcc-interface/trans.c
4936         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
4937         aggregate with a single Others choice on the RHS by means of
4938         __builtin_memset.  Tidy up.
4940 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4942         * gnat_rm.texi: minor reformatting.
4944 2014-07-30  Yannick Moy  <moy@adacore.com>
4946         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
4947         in SPARK_Mode Off.
4949 2014-07-30  Robert Dewar  <dewar@adacore.com>
4951         * gnat_rm.texi: Document additional implementation-defined use
4952         of Constrained.
4954 2014-07-30  Robert Dewar  <dewar@adacore.com>
4956         * prj-proc.adb, prj-strt.adb: Update comments.
4958 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
4960         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
4962 2014-07-30  Vincent Celier  <celier@adacore.com>
4964         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
4965         parameter No_Extending, defaulted to False. When No_Extending
4966         is True, do not look for an extending project.
4967         (Expression): For a variable reference that is not for the current
4968         project, get its Id calling Imported_Or_Extended_Project_From
4969         with No_Extending set to True.
4970         * prj-strt.adb (Parse_Variable_Reference): If a referenced
4971         variable is not found in the current project, check if it is
4972         defined in one of the projects it extends.
4974 2014-07-30  Robert Dewar  <dewar@adacore.com>
4976         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
4977         some additional cases of internally generated routines.
4979 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4981         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
4982         if the compilation unit is a subunit, extend optional processing
4983         to all subunits of the current one. This allows gnatstub to
4984         supress generation of spurious bodies.
4986 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4988         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
4989         track of the initial element's index within the tree.
4991 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
4993         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
4994         (Insert_Child): Add local variable First. Capture the index of the
4995         first node being created to ensure correct cursor construction
4996         later on. Use the three parameter version of Allocate_Node
4997         when creating multiple children as this method allows aspect
4998         Default_Value to take effect (if applicable).
5000 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
5002         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
5003         (Expand_Array_Aggregate): For a safe slice assignment, just set
5004         the target and use the common code path.
5006 2014-07-29  Robert Dewar  <dewar@adacore.com>
5008         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
5009         predicate No_Predicate_Test_On_Arguments, new name is
5010         Predicate_Tests_On_Arguments (with the opposite sense).
5012 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5014         * sem_attr.adb (Resolve_Attribute): Clean up the code for
5015         attribute 'Access. Do not generate an elaboration flag for a
5016         stand alone expression function. The expression of an expression
5017         function is now frozen when the expression function appears as
5018         the prefix of attribute 'Access.
5019         * sem_ch6.adb (Analyze_Expression_Function): Remove local
5020         variable New_Decl and update all references to it after the
5021         rewriting has taken place. Establish the linkages between the
5022         generated spec and body.
5024 2014-07-29  Robert Dewar  <dewar@adacore.com>
5026         * sem_prag.adb (ip, rv): Prevent from being optimized away.
5027         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
5028         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
5029         reformatting.
5031 2014-07-29  Vincent Celier  <celier@adacore.com>
5033         * prj-pp.adb: Minor comment update.
5034         * frontend.adb: If a target dependency info file has been read
5035         through switch -gnateT= add it to the dependencies of the source
5036         being compiled.
5038 2014-07-29  Robert Dewar  <dewar@adacore.com>
5040         * sem_ch3.adb, prj.adb: Minor reformatting.
5042 2014-07-29  Vincent Celier  <celier@adacore.com>
5044         * prj-pp.adb (Pretty_Print.Output_Project_File): New
5045         procedure to output project file names between quotes without
5046         concatenation, even if the line is too long.
5047         (Pretty_Print): Use Output_Project_File for project being extended and
5048         project imported.
5050 2014-07-29  Vincent Celier  <celier@adacore.com>
5052         * gnat_ugn.texi: Document that configuration pragmas files are
5053         added to the dependencies, unless they contain only pragmas
5054         Source_File_Name_Project.
5056 2014-07-29  Robert Dewar  <dewar@adacore.com>
5058         * frontend.adb: Minor reformatting.
5060 2014-07-29  Robert Dewar  <dewar@adacore.com>
5062         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
5063         (Expand_Actuals): Make sure predicate checks are properly applied
5064         for the case of OUT or IN OUT parameters.
5065         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
5066         predicate tests on arguments for Finalize
5067         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
5068         if predicate tests on subprogram arguments should be skipped.
5069         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
5071 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5073         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
5074         clause for the object and the expression is an aggregate, defer
5075         resolution and expansion of the aggregate until the freeze point
5076         of the entity.
5077         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
5078         the parent node is an N_Reference generated during expansion.
5080 2014-07-29  Vincent Celier  <celier@adacore.com>
5082         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
5084 2014-07-29  Robert Dewar  <dewar@adacore.com>
5086         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
5087         prepcomp.ads: Minor reformatting and code clean up.
5088         * exp_ch6.adb (Expand_Actuals): Generate predicate test
5089         unconditionally for case of OUT or IN OUT actual (before this
5090         was generated only for certain subcases, which is wrong, the
5091         test is always needed).
5093 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5095         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
5096         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
5097         until context type is available.
5098         * sem_res.adb (Resolve_Allocator): In the case of a qualified
5099         expression, complete resolution of expression.
5100         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
5101         to apply Ada2012 checks on aliased formals, as well as
5102         accesibility checks when the context of the call is an allocator
5103         or a qualified expression.
5104         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
5105         Moved here from sem_ch3.
5106         (Object_Access_Level): Handle properly aliased formals and
5107         aggregates.
5108         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
5109         now properly performed in sem_res (Resolve_Actuals,
5110         Check_Aliased_Parameter).
5112 2014-07-29  Yannick Moy  <moy@adacore.com>
5114         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
5115         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
5116         function to decide when a subprogram can be inlined in GNATprove mode.
5117         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
5118         condition for possible inlining.
5119         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
5120         for Inline_Always in GNATprove mode.
5121         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
5122         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
5123         * sem_prag.adb Minor change in comments.
5124         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
5125         inside subprograms marked as SPARK_Mode On.
5126         * sinfo.ads: Minor typo fix.
5128 2014-07-29  Vincent Celier  <celier@adacore.com>
5130         * frontend.adb: Add dependency on gnat.adc when taken into account
5131         and on non-temporary configuration pragmas files specified in
5132         switches -gnatec.
5133         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
5134         dependencies on configuration pragmas files.
5136 2014-07-29  Pat Rogers  <rogers@adacore.com>
5138         * gnat_ugn.texi: Minor clarification to the explanation for the
5139         GNATtest -v switch.
5141 2014-07-29  Robert Dewar  <dewar@adacore.com>
5143         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
5144         documentation that explains the need for this extended range
5145         (use by C_Pass_By_Copy).
5147 2014-07-29  Robert Dewar  <dewar@adacore.com>
5149         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
5151 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
5153         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
5154         complexity metrics.
5156 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5158         PR ada/60652
5159         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
5160         CRTSCTS to be visible.
5162 2014-07-29  Bob Duff  <duff@adacore.com>
5164         * g-trasym.adb, g-trasym.ads: Code cleanup.
5166 2014-07-29  Doug Rupp  <rupp@adacore.com>
5168         * sigtramp-vxworks.c: Minor reformatting.
5170 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5172         * gnat_rm.texi: No doc needed for Ada2012 aspect
5173         Implicit_dereference.
5175 2014-07-29  Robert Dewar  <dewar@adacore.com>
5177         * sem_attr.adb (Attribute_12): New array
5178         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
5179         (Check_Ada_2012_Attribute): Removed.
5181 2014-07-29  Doug Rupp  <rupp@adacore.com>
5183         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
5184         PPC, and e500.
5185         * sigtramp-vxworks.c: New file.
5186         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
5188 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5190         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
5191         derived array type, add information about component type, which
5192         was previously missing in ali file.
5193         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
5195 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5197         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
5198         of the subtype created for a record component, do not mark
5199         the subtype as frozen. For one thing, this is anomalous (in
5200         particular, the base type might not itself be frozen yet);
5201         furthermore, proper freezing of the subtype must happen in any
5202         case. So, we just mark the subtype as requiring delayed freezing
5203         (and we'll actually freeze it when generating the init_proc of
5204         the enclosing record).
5205         Also change the name of the constrained record subtype (append a
5206         'C' so that it is clearly different from the unconstrained record
5207         type, "related_idV") to make debugging easier.
5208         (Process_Full_View): When creating a full subtype for a pending
5209         private subtype, re-establish the scope of the private subtype
5210         so that we get proper visibility on outer discriminants.
5211         * exp_ch3.adb (Build_Init_Statements): Freeze any component
5212         subtype that is not frozen yet.
5214 2014-07-29  Vincent Celier  <celier@adacore.com>
5216         * prj-proc.adb (Recursive_Process): Always initialize the
5217         environment when the project is an aggregate project, even when
5218         it is not the root tree.
5219 2014-07-29  Robert Dewar  <dewar@adacore.com>
5221         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
5222         * gnat_rm.texi: Complete list of implementation aspects.
5223         * aspects.ads: Minor comment clarification.
5225 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5227         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
5228         is a null-excluding access type, do not generate a constraint
5229         check if Suppress_Assignment_Checks is set on assignment node.
5230         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
5231         parameter of a null-excluding access type, there is access check
5232         on entry, so set Suppress_Assignment_Checks on generated statement
5233         that assigns actual to parameter block.
5234         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
5236 2014-07-29  Robert Dewar  <dewar@adacore.com>
5238         * gnat_rm.texi: Change theta to @ in documentation of aspect
5239         Dimension_System.
5241 2014-07-29  Robert Dewar  <dewar@adacore.com>
5243         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
5244         are now on pragma.
5245         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
5246         of Uneval_Old_*
5247         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
5248         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
5250 2014-07-29  Javier Miranda  <miranda@adacore.com>
5252         * types.ads Update documentation on how to add new reason codes
5253         for exceptions.
5254         (RT_Exception_Code): Keep values ordered by their
5255         reason code.  Required by the .NET backend.
5256         (RT_CE_Exceptions): Subtype declaration removed.
5257         (RT_PE_Exceptions): Subtype declaration removed.
5258         (RT_SE_Exceptions): Subtype declaration removed.
5259         (Kind): New mapping table of RT_Exception_Codes.
5260         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
5261         new mapping table.
5262         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
5263         mapping table.  (Make_Raise_Program_Error): Updated to use the
5264         new mapping table.
5265         (Make_Raise_Storage_Error): Updated to use the new mapping table.
5266         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
5267         their reason code.
5269 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5271         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
5272         distributed stubs generation.
5273         * exp_ch3.adb: Minor reformatting.
5275 2014-07-29  Yannick Moy  <moy@adacore.com>
5277         * sinfo.ads: Document constraint between frontend and GNATprove.
5279 2014-07-29  Robert Dewar  <dewar@adacore.com>
5281         * a-except.adb: Minor comment clarification.
5283 2014-07-29  Robert Dewar  <dewar@adacore.com>
5285         * gnat_rm.texi: Complete list of implementation attributes.
5286         * snames.ads-tmpl: Clean up list of impl-defined attributes.
5288 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5290         * freeze.adb (Freeze_Record_Type): Perform various
5291         volatility-related checks.
5293 2014-07-29  Robert Dewar  <dewar@adacore.com>
5295         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
5297 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5299         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
5300         the case where the attribute reference appears in a nested scope
5301         from that of the subprogram prefix.
5302         * sem_attr.adb: Minor reformatting.
5304 2014-07-29  Robert Dewar  <dewar@adacore.com>
5306         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
5307         initialization options.
5309 2014-07-29  Robert Dewar  <dewar@adacore.com>
5311         * sinfo.ads: Minor comment addition.
5313 2014-07-29  Bob Duff  <duff@adacore.com>
5315         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
5317 2014-07-29  Doug Rupp  <rupp@adacore.com>
5319         * init.c: Complete previous change.
5321 2014-07-29  Robert Dewar  <dewar@adacore.com>
5323         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
5324         array case.
5326 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5328         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
5329         and the completion will appear in the same declarative part,
5330         create elaboration flag.
5331         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
5332         is a completion of a declaration in the same declarative part,
5333         and the subprogram has had its address taken, add elaboration
5334         check inside the subprogram body, to detect elaboration errors
5335         that may occur through indirect calls.
5337 2014-07-29  Doug Rupp  <rupp@adacore.com>
5339         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
5340         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
5342 2014-07-29  Vincent Celier  <celier@adacore.com>
5344         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
5345         runtime directorie specified with two switches --RTS= designate
5346         the same directory, even when there are no literarily the same.
5348 2014-07-29  Robert Dewar  <dewar@adacore.com>
5350         * gnat_ugn.texi: Minor documentation clarification.
5351         * switch-c.adb: Minor reformatting.
5353 2014-07-29  Robert Dewar  <dewar@adacore.com>
5355         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
5356         Fix incorrect RTE call which caused bomb if pragma was in
5357         configuration pragma file.
5359 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
5361         * expect.c (__gnat_expect_poll): Fix typo in previous change.
5362         * g-expect.adb: Update comments.
5364 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5366         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
5367         (Default_Attribute_Count): Bump to 16 on native platforms.
5369 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5371         * sem_res.adb: Add guard to front-end inlining for SPARK.
5373 2014-07-29  Robert Dewar  <dewar@adacore.com>
5375         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
5376         Minor reformatting.
5378 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5380         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
5381         inline in GNATprove mode when subprogran is marked Inline_Always.
5382         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
5383         mode if body to inline is available.
5384         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
5385         effective in GNATprove mode.
5386         * sem_ch10.adb (Analyze_Compilation_Unit): Call
5387         Check_Package_Body_For_Inlining in GNATprove mode, so that body
5388         containing subprograms with Inline_Always can be available before
5389         calls to them.
5391 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5393         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
5394         to Check_Package_Body_For_Inlining, to prevent confusion with other
5395         inlining subprograms.
5397 2014-07-29  Robert Dewar  <dewar@adacore.com>
5399         * opt.ads: Minor comment update.
5400         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
5401         we want setting of Uneval_Old at time of encountering the aspect.
5402         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
5403         of Opt.Uneval_Old.
5404         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
5405         New function (Set_Uneval_Old_Accept): New procedure.
5406         (Set_Uneval_Old_Warn): New procedure.
5407         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
5409 2014-07-29  Robert Dewar  <dewar@adacore.com>
5411         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
5412         * snames.ads-tmpl: Minor reformatting.
5413         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
5414         to give <Error>.  Not clear why this was there, but the compiler
5415         sources do not reference Name_Error, and this interfered with
5416         the circuits for pragma Unevaluated_Use_Of_Old.
5418 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5420         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
5421         types in SPARK 2014 (again).
5422         * sem_res.adb (Is_OK_Volatile_Context): New routine.
5423         (Resolve_Entity_Name): Ensure that a volatile object with
5424         enabled properties Async_Writers or Effectire_Reads appears in
5425         a non-interfering context.
5427 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5429         * sem_ch6.adb: Move Build_Body_To_Inline,
5430         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
5431         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
5432         * inline.ads, inline.adb: Package now contains subprograms that
5433         implement front-end inlining.  No functional changes, no test
5434         needed.
5436 2014-07-29  Robert Dewar  <dewar@adacore.com>
5438         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
5440 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5442         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
5443         is a limited view when the context is a package body, because
5444         there is no subsequent place at which the non-limited view may
5445         become visible.
5446         (Process_Formals): Ditto.
5447         * sinfo.ads, par-ch3.adb: Minor reformatting.
5449 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
5451         * expect.c (__gnat_expect_poll): New parameter dead_process
5452         used to return the dead process among the array of file
5453         descriptors. The Windows, VMS and HPUX implementations now
5454         properly report the dead process via this parameter. Other unixes
5455         don't need it.
5456         * g-expect.adb (Poll): Adapt to the C profile.
5457         (Expect_Internal): Use the new parameter to properly close the
5458         File Descriptor.  This then can be properly reported by the
5459         function First_Dead_Process as is expected.
5461 2014-07-29  Robert Dewar  <dewar@adacore.com>
5463         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
5465 2014-07-29  Robert Dewar  <dewar@adacore.com>
5467         * einfo.adb (Derived_Type_Link): New function
5468         (Set_Derived_Type_Link): New procedure.
5469         (Write_Field31_Name): Output Derived_Type_Link.
5470         * einfo.ads: New field Derived_Type_Link.
5471         * exp_ch6.adb (Expand_Call): Warn if change of representation
5472         needed on call.
5473         * sem_ch13.adb: Minor addition of ??? comment.
5474         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
5475         expensive implicit conversion.
5476         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
5478 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5480         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
5481         to DF_Id. Add new local variable DF_Call. Do not perform any
5482         elaboration-related checks on the call to the partial finalization
5483         routine within an init proc to avoid generating bogus elaboration
5484         warnings on expansion-related code.
5485         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
5486         the top level of the routine.  Ensure that Output_Calls takes
5487         into account flags -gnatel and -gnatwl when emitting warnings
5488         or info messages.
5489         (Check_Internal_Call_Continue): Update the call to Output_Calls.
5490         (Elab_Warning): Moved to the top level of routine Check_A_Call.
5491         (Emit): New routines.
5492         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
5493         comment on usage. Output all warnings or info messages only when the
5494         caller context demands it and the proper elaboration flag is set.
5496 2014-07-29  Yannick Moy  <moy@adacore.com>
5498         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
5499         Check rule about Old appearing in potentially unevaluated
5500         expression everywhere, not only in Post.
5502 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5504         * sem_prag.adb: Update comment.
5505         * a-except.adb, a-except-2005.adb: Minor editing.
5507 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
5509         * exp_dbug.adb (Debug_Renaming_Declaration):
5510         Do not create renaming entities for renamings of non-packed
5511         objects and for exceptions.
5513 2014-07-29  Robert Dewar  <dewar@adacore.com>
5515         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
5516         sem_ch6.adb, par-ch3.adb: Minor reformatting.
5518 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5520         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
5521         subtype indication in an extended return statement when the
5522         return value is an ancestor of the return type of the function,
5523         and that return type is a null record extension.
5525 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5527         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
5528         message produced for the case of a type-related representation
5529         item that is made illegal by 13.10(1).
5530         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
5531         documentation.
5533 2014-07-29  Robert Dewar  <dewar@adacore.com>
5535         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
5536         * erroutc.adb (Output_Error_Msgs): Take wide characters into
5537         account in computing position of error flags.
5538         * sinput.adb (Get_Column_Number): Take wide characters into
5539         account.
5541 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5543         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
5544         in an access type definition can carry a null_exclusion indicator.
5545         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
5546         carries a null_exclusion indicator, verify that the subtype
5547         indication denotes an access type, and create a null-excluding
5548         subtype for it.
5549         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
5550         defined on N_Access_To_Object_Definition to indicate that the
5551         subtype indication carries a null_exclusion indicator.
5553 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5555         * exp_ch6.adb (Add_Extra_Actual): Do not construct
5556         the extra actual by name, generate a reference instead.
5558 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5560         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
5561         Allow_Integer_Address if already set.
5562         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
5563         Fix order, for consistency with Rmsg_xx declarations.
5565 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5567         * sem_ch4.adb (Complete_Object_Operation): If the type of the
5568         candidate subprogram is a limited view, use non-limited view
5569         when available.
5571 2014-07-29  Robert Dewar  <dewar@adacore.com>
5573         * sem_ch13.adb: Minor change in RM reference.
5574         * sem_mech.ads: Minor reformatting.
5575         * einfo.ads: Minor comment fix.
5576         * types.ads: Minor correction to range given for Mechanism_Type.
5577         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
5578         check predicate on way out for OUT or IN OUT parameters.
5579         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
5580         better (P_Range_Constraint): Corresponding fix.
5581         * checks.ads: Minor comment clarification.
5583 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
5585         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
5586         and Treat_As_Volatile flags based on whether the renamed object
5587         is a volatile object.
5589 2014-07-29  Olivier Hainque  <hainque@adacore.com>
5591         * g-debpoo.adb
5592         (Default_Alignment): Rename as Storage_Alignment. This is not
5593         a "default" that can be overriden. Augment comment to clarify
5594         intent and document why we need to manage alignment padding.
5595         (Header_Offset): Set to Header'Object_Size instead of 'Size
5596         rounded up to Storage_Alignment. Storage_Alignment on the
5597         allocation header is not required by our internals so was
5598         overkill. 'Object_Size is enough to ensure proper alignment
5599         of the header address when substracted from a storage address
5600         aligned on Storage_Alignment.
5601         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
5602         this is always added on top of the incoming allocation requests.
5603         (Align): New function, to perform alignment rounding operations.
5604         (Allocate): Add comments on the Storage_Address computation
5605         scheme and adjust so that the alignment padding applies to that
5606         (Storage_Address) only.
5608 2014-07-29  Robert Dewar  <dewar@adacore.com>
5610         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
5611         pragma Unreferenced.
5612         * cstand.adb (Create_Standard): Use E_Array_Type for standard
5613         string types. Make sure index of Any_String/Any_Array is in a list.
5614         * errout.adb: Minor reformatting.
5616 2014-07-29  Robert Dewar  <dewar@adacore.com>
5618         * gnat_ugn.texi: Clean up and correct documentation of warnings.
5619         * usage.adb: Minor corrections to make sure warnings are properly
5620         documented.
5621         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
5622         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
5624 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5626         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
5627         created to match internal sequence numbers between compilations
5628         with/without abort must have its type properly set.
5630 2014-07-29  Robert Dewar  <dewar@adacore.com>
5632         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
5633         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
5634         SSO_Default_Specified.
5635         * ali.ads (ALIs_Record): Add field SSO_Default
5636         (SSO_Default_Specified): New global switch.
5637         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
5638         (Check_Configuration_Consistency): Call this procedure
5639         * einfo.adb (SSO_Set_High_By_Default): New
5640         function (SSO_Set_Low_By_Default): New function
5641         (Set_SSO_Set_High_By_Default): New procedure
5642         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
5643         List new flags
5644         * einfo.ads (SSO_Set_Low_By_Default): New flag
5645         (SSO_Set_High_By_Default): New flag
5646         * freeze.adb (Set_SSO_From_Default): New procedure
5647         (Freeze_Array_Type): Call Set_SSO_From_Default
5648         (Freeze_Record_Type): Call Set_SSO_From_Default
5649         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
5650         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
5651         * lib-writ.ads: Add OL/OH parameters to P line
5652         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
5653         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
5654         New global switch
5655         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
5656         set by default using pragma Default_Scalar_Storage_Order.
5657         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
5658         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
5659         Clear SSO defaults when explicit SSO is inherited.
5660         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
5661         explicit SSO is specified.
5662         (Inherit_Aspects_At_Freeze_Point):
5663         Clear SSO default when inheriting SSO.
5664         * sem_ch3.adb (Set_Default_SSO): New procedure
5665         (Analyze_Private_Extension_Declaration): Set defualt SSO
5666         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
5667         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
5668         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
5669         (Record_Type_Declaration): ditto
5670         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
5671         Save Default_SSO
5672         * sem_prag.adb (Analyze_Pragma, case
5673         Default_Scalar_Storage_Order): Set Default_SSO
5675 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5677         * sem_ch6.adb (Valid_Operator_Definition): Verify that
5678         all parameter have mode IN. This check must be done here for
5679         subprogram instantiations that have operator names, because their
5680         analysis does not follow the same path as that for subprogram
5681         declarations.
5683 2014-07-29  Robert Dewar  <dewar@adacore.com>
5685         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
5686         to make sure that the Etype of a component of the corresponding
5687         record type is present before trying to freeze it.
5688         * sem_ch5.adb: Minor reformatting.
5690 2014-07-29  Robert Dewar  <dewar@adacore.com>
5692         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
5693         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
5694         and then use it when a stream operation is used from a library generic
5695         when the restriction (No_Streams) is active.
5697 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5699         * projects.texi: Fix minor typo.
5701 2014-07-29  Yannick Moy  <moy@adacore.com>
5703         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
5705 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
5707         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
5708         CodePeer mode.
5710 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5712         * exp_ch7.adb (Find_Last_Init): Add local variable
5713         Deep_Init_Found. Check the statement immediately following the
5714         declaration if [Deep_]Initialization was not found.
5716 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5718         * exp_util.adb (Is_Aliased): It appears that
5719         'reference-d and renamed objects still play some role in Boolean
5720         expression with actions and cannot be finalized immediately.
5722 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5724         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
5725         Loop names are not part of the full qualification of entity names.
5727 2014-07-29  Robert Dewar  <dewar@adacore.com>
5729         * einfo.adb (Has_Protected): Test base type.
5730         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
5731         that we always properly check No_Protected_Type_Allocators.
5733 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5735         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
5736         loop declarations as well.
5737         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
5738         to an iterator loop, because it may contain local renaming
5739         declarations that require debugging information.
5741 2014-07-29  Robert Dewar  <dewar@adacore.com>
5743         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
5745 2014-07-29  Robert Dewar  <dewar@adacore.com>
5747         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
5748         (Set_Static_Real_Or_String_Predicate): New procedure
5749         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
5750         string predicates (Is_Predicate_Static): Handle static string
5751         predicates.
5752         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
5753         New procedure (Check_Expression_Against_Static_Predicate):
5754         Deal with static string predicates, now fully implemented
5755         (Eval_Relational_Op): Allow string equality/inequality as static
5756         if not comes from source.
5758 2014-07-29  Robert Dewar  <dewar@adacore.com>
5760         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
5761         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
5762         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
5763         handling. Change name of Discrete_Predicate to
5764         Discrete_Static_Predicate, and replace testing of the presence of this
5765         field by testing the flag Has_Static_Expression.
5767 2014-07-29  Robert Dewar  <dewar@adacore.com>
5769         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
5770         * opt.adb: Handle Uneval_Old.
5771         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
5772         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
5773         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
5774         * sem_attr.adb (Uneval_Old_Msg): New procedure.
5775         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
5776         (Pop_Scope): Restore Uneval_Old.
5777         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
5778         Implemented.
5779         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
5780         Add entries for Name_Warn, Name_Allow.
5782 2014-07-29  Robert Dewar  <dewar@adacore.com>
5784         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
5785         to Is_OK_Static_Range.
5786         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
5787         static attributes (Eval_Attribute, case Size): Handle size of
5788         zero properly (Eval_Attribute, case Value_Size): Handle size of
5789         zero properly.
5790         * sem_ch13.adb: Minor reformatting.
5791         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
5792         Is_Static_Range to Is_OK_Static_Range.
5793         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
5794         wrong in several ways (Is_Static_Range): Moved here from spec
5795         (Is_Static_Subtype): Moved here from spec Change some incorrect
5796         Is_Static_Subtype calls to Is_OK_Static_Subtype.
5797         * sem_eval.ads: Add comments to section on
5798         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
5799         Add clarifying comments (Is_Static_Range): Moved to body
5800         (Is_Statically_Unevaluated): New function.
5801         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
5802         Is_Static_Range to Is_OK_Static_Range.
5803         * sinfo.ads: Additional commments for Is_Static_Expression noting
5804         that clients should almost always use Is_OK_Static_Expression
5805         instead. Many other changes throughout front end units to obey
5806         this rule.
5807         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
5808         for enumeration literal.
5809         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
5810         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
5811         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
5812         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
5813         Replace all occurrences of Is_Static_Expression by
5814         Is_OK_Static_Expression.
5816 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5818         * exp_ch4.adb (Process_Transient_Object): Remove constant
5819         In_Cond_Expr, use its initialization expression in place.
5820         * exp_ch7.adb (Process_Declarations): There is no need to check
5821         that a transient object being hooked is controlled as it would
5822         not have been hooked in the first place.
5823         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
5824         objects are not considered aliased when the related context is
5825         a Boolean expression_with_actions.
5826         (Requires_Cleanup_Actions): There is no need to check that a transient
5827         object being hooked is controlled as it would not have been hooked in
5828         the first place.
5830 2014-07-29  Robert Dewar  <dewar@adacore.com>
5832         * errout.adb: Minor reformatting.
5834 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5836         * exp_ch3.adb (Default_Initialize_Object): Add new variables
5837         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
5838         not allowed to ensure the symmetrical generation of symbols.
5839         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
5840         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
5841         temporary when aborts are not allowed to ensure symmertrical
5842         generation of symbols.
5843         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
5844         Dummy. Generate a dummy temporary when aborts are not allowed
5845         to ensure symmertrical generation of symbols.
5847 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5849         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
5850         renaming, indicate that the renamed entity itself needs debug
5851         information. This is necessary if that entity is a temporary,
5852         e.g. part of the expansion of an explicit dereference in an
5853         iterator.
5855 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5857         * errout.adb (Set_Error_Posted): When propagating flag to
5858         an enclosing named association, also propagate to the parent
5859         of that node, so that named and positional associations are
5860         treated consistently.
5862 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5864         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
5865         Do_Range_Check properly on array component expressions that
5866         have a scalar type. In GNATprove mode, only checks on scalar
5867         components must be marked by the front-end.
5869 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5871         * sem_res.adb (Resolve_Type_Conversion): If the type of the
5872         expression is a limited view, use the non-limited view when
5873         available.
5875 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5877         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
5878         case statement as coming from a conditional expression.
5879         (Expand_N_If_Expression): Mark the generated if statement as
5880         coming from a conditional expression.
5881         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
5882         objects found in case statement alternatives when the case
5883         statement is actually a case expression.
5884         (Expand_N_If_Statement):
5885         Do not process controlled objects found in an if statement when
5886         the if statement is actually an if expression.
5887         * sinfo.adb (From_Conditional_Expression): New routine.
5888         (Set_From_Conditional_Expression): New routine.
5889         * sinfo.ads Add new semantic flag From_Conditional_Expression and
5890         update related nodes.
5891         (From_Conditional_Expression): New routine along with pragma Inline.
5892         (Set_From_Conditional_Expression): New routine along with pragma Inline.
5894 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5896         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
5897         formal parameter Obj_Id and update the comment on usage. Renamed
5898         Obj_Typ to Func_Typ and update all occurrences.
5899         (Find_Last_Init): Remove formal parameter Decl and update the comment
5900         on usage.
5901         Remove local constants Obj_Id and Obj_Typ. Remove local variables
5902         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
5903         (Find_Last_Init_In_Block): Remove formal parameter
5904         Init_Typ and update the comment on usage.
5905         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
5906         on usage. Check whether the procedure call is an initialization
5907         procedure of either the object type or the initialization type.
5908         (Is_Init_Proc_Of): New routine.
5909         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
5910         routine. Add new variable Init_Typ. Add circuitry to extract the object
5911         type as well as the initialization type.
5913 2014-07-29  Robert Dewar  <dewar@adacore.com>
5915         * sem_case.adb: Minor reformatting.
5916         * sem_aux.ads: Minor reformatting.
5918 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5920         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
5921         pointer on these fields, even though they are semantic, because
5922         subsequent analysis and expansion of action nades may require
5923         exploring the tree, for example to locate a node to be wrapped
5924         when a function with controlled result is called.
5926 2014-07-29  Claire Dross  <dross@adacore.com>
5928         * sem_aux.adb (Get_Binary_Nkind): Use case on
5929         Name_Id instead of an intermediate string.
5930         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
5931         string.
5933 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
5935         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
5936         about processing sources with preprocessor directives.
5938 2014-07-24  Martin Liska  <mliska@suse.cz>
5940         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
5941         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
5942         (gnat_write_global_declarations): Likewise.
5944 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
5946         * gnat_rm.texi: Clean up for makeinfo 5.2.
5948 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
5950         * gnat_rm.texi (Machine Code Insertions): Clean up.
5952 2014-07-18  Robert Dewar  <dewar@adacore.com>
5954         * exp_ch7.adb: Minor reformatting.
5956 2014-07-18  Claire Dross  <dross@adacore.com>
5958         * sem_aux.ads (Get_Binary_Nkind): New function that returns
5959         the Node_Kind value of an entity defining a binary operator.
5960         (Get_Unary_Nkind): New function that returns the Node_Kind value
5961         of an entity defining a unary operator.
5963 2014-07-18  Pascal Obry  <obry@adacore.com>
5965         * sysdep.c: comment update.
5966         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
5967         platforms where it is known to be supported.
5969 2014-07-18  Thomas Quinot  <quinot@adacore.com>
5971         * sem_dist.adb (Process_Remote_AST_Declaration): Need
5972         to set Fat_Type's Ekind in order to be able to use its
5973         Corresponding_Remote_Type attribute.
5975 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
5977         * einfo.adb Last_Aggregate_Assignment is now Node 30.
5978         (Last_Aggregate_Assignment): Include
5979         constants in the assertion. Update the underlying node.
5980         (Set_Last_Aggregate_Assignment): Include constants in the
5981         assertion. Update the underlying node.  (Write_Field11_Name):
5982         Remove the entry for Last_Aggregate_Assignment.
5983         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
5984         * einfo.ads Update the node designation and usage of attribute
5985         Last_Aggregate_Assignment.
5986         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
5987         assignment statement used to initialize a controlled object.
5988         (Late_Expansion): Store the last assignment statement used to
5989         initialize a controlled record or an array of controlled objects.
5990         * exp_ch3.adb (Expand_N_Object_Declaration): Default
5991         initialization of objects is now performed in a separate routine.
5992         (Default_Initialize_Object): New routine.
5993         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
5994         Obj_Id. Update the comment on usage.
5995         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
5996         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
5997         (Is_Init_Call): Add formal parameter Init_Typ. Update the
5998         comment on usage.  Account for the type init proc when trying
5999         to determine whether a statement is an initialization call.
6000         (Make_Adjust_Call): Rename formal parameter For_Parent to
6001         Skip_Self. Update all occurrences of For_Parent. Account for
6002         non-tagged types. Update the call to Make_Call.
6003         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
6004         comment on usage. Update all occurrences of For_Parent.
6005         (Make_Final_Call): Rename formal parameter For_Parent to
6006         Skip_Self. Update all occurrences of For_Parent. Account
6007         for non-tagged types. Update the call to Make_Call.
6008         (Process_Object_Declaration): Most variables and constants are
6009         now local to the routine.
6010         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
6011         For_Parent to Skip_Self. Update the comment on usage.
6012         (Make_Final_Call): Rename formal parameter For_Parent to
6013         Skip_Self. Update the comment on usage.
6015 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6017         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
6018         can be a procedure that is implemented by entry, and have a
6019         formal that is a synchronized interface.  It does not have to
6020         be declared as a protected operation.
6022 2014-07-18  Robert Dewar  <dewar@adacore.com>
6024         * gnat_rm.texi: Remove mention of obsolete attributes
6025         Max[_Interrupt]_Priority, which have never been implemented
6026         (or at the very least were removed long ago if they ever were
6027         implemented.  Add documentation of Max[_Interrupt]_Priority
6028         constants in package System.
6029         * ttypes.ads: Document actual handling of package System,
6030         rather than a historical fantasy version.  Remove mention of
6031         non-existent attributes Max[_Interrupt]_Priority.
6033 2014-07-18  Pascal Obry  <obry@adacore.com>
6035         * a-witeio.adb (Put): No 16-bit character output when text
6036         translation is disabled.
6037         * i-cstrea.ads: Code clean up.
6039 2014-07-18  Robert Dewar  <dewar@adacore.com>
6041         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
6042         static attributes.
6044 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6046         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
6048 2014-07-18  Pascal Obry  <obry@adacore.com>
6050         * adaint.c: Do not include wchar.h on VxWorks.
6051         * mingw32.h: Remove obsolete definition.
6053 2014-07-18  Pascal Obry  <obry@adacore.com>
6055         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
6056         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
6057         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
6058         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
6060 2014-07-18  Pascal Obry  <obry@adacore.com>
6062         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
6063         * a-ztexio.adb: Likewise.
6064         * a-witeio.adb: Likewise.
6065         (Open): Pass file's translation mode to set_text_mode.
6066         * s-ficobl.ads (Content_Encoding): New type.
6067         (Text_Content_Encoding): New subtype.
6068         (AFCB): Rename Is_Text_File to Text_Encoding.
6069         * s-fileio.adb (Open): Handles new text_translation
6070         values. Remove Is_Text_File which is equivalent to Text_Encoding
6071         in Text_Content_Encoding.
6072         * adaint.h (__gnat_set_mode): New routine.
6073         * sysdep.c (__gnat_set_wide_text_mode): Removed.
6074         (__gnat_set_mode): New routine.
6076 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6078         * gcc-interface/decl.c, gcc-interface/trans.c,
6079         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
6080         Is_Packed_Array_Impl_Type.
6082 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6084         * sem_util.adb: Minor typo correction.
6086 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
6088         * gnat_rm.texi: Complete previous change.
6090 2014-07-18  Pascal Obry  <obry@adacore.com>
6092         * s-fileio.adb: Minor style fix.
6094 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6096         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
6097         specification of stream attributes for subtypes that are not
6098         first subtypes, to prevent malformed rep_item chains in the case
6099         of such illegal specifications for discriminated private subtypes.
6100         (Check_Overloaded_Name): Verify that the name is an entity name
6101         before other checks.
6103 2014-07-18  Pascal Obry  <obry@adacore.com>
6105         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
6107 2014-07-18  Robert Dewar  <dewar@adacore.com>
6109         * sem_prag.adb, sem_attr.adb,
6110         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
6112 2014-07-18  Pascal Obry  <obry@adacore.com>
6114         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
6115         * initialize.c (__gnat_wide_text_translation_required): Defined here.
6117 2014-07-18  Pascal Obry  <obry@adacore.com>
6119         * adaint.c (__gnat_fputwc): New routine.
6120         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
6122 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6124         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
6125         (Set_Stores_Attribute_Old_Prefix): New routine.
6126         (Stores_Attribute_Old_Prefix): New routine.
6127         (Write_Entity_Flags):
6128         Output flag Stores_Attribute_Old_Prefix.
6129         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
6130         comment on usage.
6131         (Set_Stores_Attribute_Old_Prefix): New routine
6132         along with pragma Inline.
6133         (Stores_Attribute_Old_Prefix): New
6134         routine along with pragma Inline.
6135         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
6136         constant which captures the result of attribute 'Old's prefix.
6137         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
6138         relocated expression which acted as a prefix of attribute 'Old.
6140 2014-07-18  Bob Duff  <duff@adacore.com>
6142         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
6143         null before dispatching to Deallocate_Subpool.
6144         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
6145         parameter of Default_Subpool_For_Pool to 'in out'.
6146         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
6147         a message to the raise.
6148         * sem_util.adb: Minor reformatting.
6150 2014-07-18  Robert Dewar  <dewar@adacore.com>
6152         * sem_util.adb (Check_Expression_Against_Static_Predicate):
6153         Mark expression as non-static if it fails static predicate check,
6154         and issue additional warning.
6156 2014-07-18  Pascal Obry  <obry@adacore.com>
6158         * a-witeio.adb (Put): Control translation based on
6159         wide_text_translation_required.
6160         * adaint.c (CurrentCCSEncoding): New variable.
6161         * initialize.c (__gnat_initialize): On Windows initialize
6162         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
6163         environment variable.
6164         * mingw32.h (CurrentCCSEncoding): New external.
6165         (__gnat_wide_text_translation_required): Likewise.
6166         * sysdep.c (wide_text_translation_required): New variable.
6167         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
6169 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6171         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
6172         variable Refined_States.  Add global variable Matched_Items.
6173         (Check_Dependency_Clause): Account for dependency
6174         clauses utilizing states with visible null refinements.
6175         (Is_Null_Refined_State): New routine.
6176         (Match_Items): Record each successfully matched item of pragma Depends.
6177         (Record_Item): New routine.
6179 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6181         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6182         Do_Range_Check flag on a dynamic index expression used in a
6183         component association in the argument of Update.
6185 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6187         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
6189 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6191         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
6192         of enclosing blocks, loops and the enclosing function using a
6193         parent-based traversal.
6194         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
6195         stack reclamation if the iterator loop contains a return statement
6196         that uses the stack.
6197         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
6198         patch up the scope stack as the secondary stack management now
6199         takes into account the enclosing function of the iterator loop.
6201 2014-07-18  Robert Dewar  <dewar@adacore.com>
6203         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
6205 2014-07-18  Robert Dewar  <dewar@adacore.com>
6207         * einfo.adb (Has_Static_Predicate): New function.
6208         (Set_Has_Static_Predicate): New procedure.
6209         * einfo.ads (Has_Static_Predicate): New flag.
6210         * sem_ch13.adb (Is_Predicate_Static): New function
6211         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
6212         (Add_Call): Minor change in Sloc of generated expression
6213         (Add_Predicates): Remove setting of Static_Pred, no longer used.
6214         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
6215         replace by use of the entity flag Has_Static_Predicate_Aspect.
6216         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
6217         and issue warning that predicate is not checked for now.
6218         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
6219         spec.
6220         * sem_util.adb (Check_Expression_Against_Static_Predicate):
6221         Carry out check for any case where there is a static predicate,
6222         and output appropriate message.
6223         * sinfo.ads: Minor comment corrections.
6225 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6227         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
6228         from an untagged private type whose full view is tagged, the type
6229         is marked tagged for layout reasons, but it has no dispatch table,
6230         so Set_All_DT_Position must not be called.
6231         * exp_ch13.adb: If the freeze node is for a type internal to a
6232         record declaration, as is the case for a class-wide subtype
6233         of a parent component, the relevant scope is the scope of the
6234         enclosing record.
6236 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6238         * g-memdum.adb, g-memdum.ads: Code clean ups.
6240 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6242         * sem_prag.adb (Check_Dependency_Clause):
6243         Update the comment on usage. Reimplement the mechanism which
6244         attempts to match a single clause of Depends against one or
6245         more clauses of Refined_Depends.
6246         (Input_Match): Removed.
6247         (Inputs_Match): Removed.
6248         (Is_Self_Referential): Removed.
6249         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
6250         (Normalize_Outputs): Rename variable Split to New_Claue and update
6251         all its occurrences.
6252         (Report_Extra_Clauses): Update the comment on usage.
6253         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
6255 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6257         * i-cstrea.ads: Minor reformatting.
6259 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6261         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
6262         secondary stack-related flags to the generated block.
6263         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
6264         once the loop is relocated in a block.
6266 2014-07-18  Robert Dewar  <dewar@adacore.com>
6268         * repinfo.ads: Add documentation on handling of back annotation
6269         for dynamic case.
6271 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6273         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
6274         of full type declaration, denotes previous declaration for
6275         incomplete view of the type.
6276         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
6277         of declaration if one is present.
6278         (Replace_Type): When constructing the signature of an inherited
6279         operation, handle properly the case where the operation has a
6280         formal whose type is an incomplete view.
6281         * sem_util.adb (Collect_Primitive_Operations): Handle properly
6282         the case of an operation declared after an incomplete declaration
6283         for a type T and before the full declaration of T.
6285 2014-07-18  Pascal Obry  <obry@adacore.com>
6287         * i-cstrea.ads: Add documentation for set_wide_text_mode.
6289 2014-07-18  Robert Dewar  <dewar@adacore.com>
6291         * a-witeio.adb: Minor code reorganization.
6292         * i-cstrea.ads: Add comment.
6294 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6296         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
6297         clarifications.
6299 2014-07-18  Robert Dewar  <dewar@adacore.com>
6301         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
6303 2014-07-18  Pascal Obry  <obry@adacore.com>
6305         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
6306         * a-witeio.adb (Put): On platforms where there is translation
6307         done by the OS output the raw text.
6308         (New_Line): Use Put above to properly handle the LM wide characters.
6310 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6312         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
6313         to Absolute_Address.
6315 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
6317         * opt.ads (Suppress_Back_Annotation): Remove as unused.
6318         * fe.h (Back_Annotate_Rep_Info): Likewise.
6319         (Global_Discard_Names): Likewise.
6321 2014-07-18  Robert Dewar  <dewar@adacore.com>
6323         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
6324         parenthesized.
6326 2014-07-18  Vincent Celier  <celier@adacore.com>
6328         * s-osinte-vms.ads: Fix style errors.
6330 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6332         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
6333         NAME_MAX and PATH_MAX.
6335 2014-07-18  Bob Duff  <duff@adacore.com>
6337         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
6338         Build_Record_Or_Elementary_Output_Procedure): For Input and
6339         Output attributes, do not read/write the discriminants if they
6340         have default values; that will be done by Read/Write.
6342 2014-07-18  Robert Dewar  <dewar@adacore.com>
6344         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
6345         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
6346         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
6347         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
6348         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
6350 2014-07-18  Robert Dewar  <dewar@adacore.com>
6352         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
6354 2014-07-18  Vincent Celier  <celier@adacore.com>
6356         * lib-writ.ads: Update documentation about the D lines.
6358 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6360         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
6361         as a parameter, rather than its Chars field, in order to locate
6362         freeze node of type. If the predicate or invariant has references
6363         to types other than the one to which the contract applies, these
6364         types must be frozen, and the corresponding predicate functions
6365         created, before that freeze node.
6367 2014-07-18  Robert Dewar  <dewar@adacore.com>
6369         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
6370         * par_sco.adb: Minor reformatting.
6372 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6374         * exp_ch4.adb (Real_Range_Check): Turn off
6375         the Do_Range_Check flag on the conversion's current Expression
6376         argument rather than on the originally captured Operand node,
6377         as Expression may reflect a rewriting (as in conversions to a
6378         fixed-point type).
6380 2014-07-18  Vincent Celier  <celier@adacore.com>
6382         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
6383         is not a subunit.
6384         * ali.ads (Sdep_Record): New component Unit_Name.
6385         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
6386         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
6387         dependent unit is in a project and the source file name is not
6388         one of its sources.
6390 2014-07-18  Bob Duff  <duff@adacore.com>
6392         * s-addima.ads: Minor: add comment.
6394 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6396         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
6397         of nesting rules for composites with different SSOs.
6399 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6401         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
6402         a proper logical operator.
6403         (Has_Decision): An If_Expression indicates the presence of a decision
6404         although it is not a logical operator.
6406 2014-07-18  Robert Dewar  <dewar@adacore.com>
6408         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
6409         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
6411 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
6413         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
6414         on the null statement.
6416 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6418         * adaint.c: Minor comment rewording.
6419         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
6420         use of errno in this file is thread safe.
6422 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6424         * gnat_ugn.texi: Doc clarification.
6425         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
6426         * sem_ch13.ads: Minor comment update.
6428 2014-07-18  Robert Dewar  <dewar@adacore.com>
6430         * repinfo.ads: Minor comment fix.
6432 2014-07-18  Robert Dewar  <dewar@adacore.com>
6434         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
6435         * sem_prag.adb: Add dummy implementation of
6436         Default_Scalar_Storage_Order.
6437         * snames.ads-tmpl: Add dummy entry for
6438         Default_Scalar_Storage_Order pragma.
6440 2014-07-18  Robert Dewar  <dewar@adacore.com>
6442         * opt.adb (Tree_Read): Read Address_Is_Private,
6443         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
6444         (Tree_Write): Corresponding writes
6445         * opt.ads: Minor comment reformatting and fixes.
6446         * tree_io.ads: Increment ASIS_Version_Number.
6448 2014-07-18  Robert Dewar  <dewar@adacore.com>
6450         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
6451         * types.h: Fix typo.
6453 2014-07-18  Robert Dewar  <dewar@adacore.com>
6455         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
6456         functional change).
6457         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
6458         ASIS trees.
6459         * sem_ch13.adb (Kill_Rep_Clause): New procedure
6460         (Analyze_Attribute_Definition_Clause): Use
6461         Kill_Rep_Clause. This is just a cleanup, no functional effect.
6462         (Analyze_Enumeration_Representation_Clause):
6463         Use Kill_Rep_Clause. This means that enum rep
6464         clauses are now properly removed from -gnatct trees.
6465         (Analyze_Record_Representation_Clause): Same change.
6466         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
6468 2014-07-18  Pascal Obry  <obry@adacore.com>
6470         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
6471         OS_Time from time parts.
6472         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
6474 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6476         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
6477         indexing over containers that are derived types: check whether
6478         signature of found operation has the correct first parameter
6479         before retrieving directly a primitive operation.
6481 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6483         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6484         Do_Range_Check flag on dynamic bounds of a range used in a
6485         component association in the argument of Update.
6487 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6489         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
6490         accesses to errno(3) to be thread safe.
6492 2014-07-18  Vincent Celier  <celier@adacore.com>
6494         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
6495         limited imported project that is an extending project, return
6496         a project being extended if it has the expected name.
6498 2014-07-18  Pascal Obry  <obry@adacore.com>
6500         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
6501         routine to set the last modification time stamp for the given file.
6502         * gnatchop.adb (File_Time_Stamp): Removed.
6503         (Write_Unit): Use
6504         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
6506 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6508         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
6509         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
6510         Moved here, so it can be shared with the resolution of 'Update,
6511         whose argument shares some features with aggregates.
6512         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
6513         Aggregate_Constraint_Checks with the expression of each
6514         association, so that the Do_Range_Check flag is set when needed.
6516 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6518         * sem_ch4.adb (Try_Container_Indexing):  If the container
6519         type is a derived type, the value of the inherited  aspect is
6520         the Reference operation declared for the parent type. However,
6521         Reference is also a primitive operation of the new type, and
6522         the inherited operation has a different signature. We retrieve
6523         the right one from the list of primitive operations of the
6524         derived type.
6526 2014-07-18  Vincent Celier  <celier@adacore.com>
6528         * debug.adb: Update comment.
6530 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6532         * exp_util.adb (Needs_Finalization): There is no reason why a
6533         C type should not benefit from finalization actions.
6535 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6537         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
6538         (FILENAME_MAX): Remove unneeded definition.
6540 2014-07-18  Robert Dewar  <dewar@adacore.com>
6542         * exp_attr.adb, debug.adb: Update comments.
6544 2014-07-18  Vincent Celier  <celier@adacore.com>
6546         * par-ch4.adb (Simple_Expression): Add missing style check
6547         for binary adding operators.
6548         (Term): Add missing style check for multiplying operators.
6550 2014-07-18  Robert Dewar  <dewar@adacore.com>
6552         * impunit.adb: Minor comment correction.
6553         * widechar.adb, s-wchcon.ads: Minor comment corrections.
6555 2014-07-18  Robert Dewar  <dewar@adacore.com>
6557         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
6558         for Build_Static_Predicate (Build_Predicate_Functions):
6559         Don't try to build discrete predicate for real type.
6560         (Build_Predicate_Functions): Report attempt to use
6561         Static_Predicate function on real type as unimplemented.
6562         * sem_util.adb (Check_Expression_Against_Static_Predicate):
6563         Add guard to prevent blow up on predicate for real type.
6565 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6567         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
6568         properly static predicate on enumeration types and modular types
6569         (not subtypes).
6571 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
6573         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
6574         the corresponding source file index.
6575         * get_scos.ads (Get_SCOs): Add a default value for it.
6576         * par_sco.adb (SCO_Record): Fill the corresponding value.
6577         * scos.h: New.
6579 2014-07-18  Vincent Celier  <celier@adacore.com>
6581         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
6582         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
6583         reformatting.
6584         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
6586 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6588         * g-sercom.ads (Set): document possible data loss.
6590 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6592         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
6593         Output, Read, Write): If the restriction No_Streams is active,
6594         replace each occurrence of a stream attribute by an explicit
6595         Raise statement.
6597 2014-07-18  Robert Dewar  <dewar@adacore.com>
6599         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
6600         reformatting.
6602 2014-07-18  Robert Dewar  <dewar@adacore.com>
6604         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
6605         function.
6606         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
6607         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
6608         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
6609         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
6611 2014-07-18  Robert Dewar  <dewar@adacore.com>
6613         * bcheck.adb (Check_Consistent_Restrictions):
6614         Remove obsolete code checking for violation of
6615         No_Standard_Allocators_After_Elaboration (main program)
6616         * bindgen.adb (Gen_Adainit): Handle
6617         No_Standard_Allocators_After_Elaboration
6618         (Gen_Output_File_Ada): ditto.
6619         * exp_ch4.adb (Expand_N_Allocator): Handle
6620         No_Standard_Allocators_After_Elaboration.
6621         * Makefile.rtl: Add entry for s-elaall
6622         * rtsfind.ads: Add entry for Check_Standard_Allocator.
6623         * s-elaall.ads, s-elaall.adb: New files.
6624         * sem_ch4.adb (Analyze_Allocator): Handle
6625         No_Standard_Allocators_After_Elaboration.
6627 2014-07-18  Robert Dewar  <dewar@adacore.com>
6629         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
6630         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
6631         Remove AB parameter from ali files and all uses.
6632         Remove Allocator_In_Body and all uses.
6634 2014-07-18  Robert Dewar  <dewar@adacore.com>
6636         * g-expect-vms.adb: Add comment.
6638 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6640         * par_sco.adb (Is_Logical_Operation): return True for
6641         N_If_Expression.
6643 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6645         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
6646         analysis and resolution of each choice in the associations within
6647         the argument of Update, because they may be variable names.
6649 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6651         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
6652         actions before the generated if statement.
6654 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6656         * gnat_ugn.texi Enhance the documentation of
6657         switches -gnateA and -gnateV.
6659 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6661         * sem_util.adb (Build_Default_Subtype): Add missing condition
6662         so that code matches description: use the full view of the base
6663         only if the base is private and the subtype is not.
6665 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
6667         * exp_disp.adb: Minor reformatting.
6668         * exp_disp.adb: Minor code reorganization.
6670 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6672         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
6673         require an explicit SSO attribute definition clause on a composite type
6674         just because one of its components has one.
6676 2014-07-17  Robert Dewar  <dewar@adacore.com>
6678         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
6679         attribute out of existence if the enclosing pragma is ignored.
6680         * sem_util.adb: Minor reformatting.
6682 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6684         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
6685         array aggregate expanded into assignments when it appears as a
6686         local declaration in an inlined body.
6688 2014-07-17  Doug Rupp  <rupp@adacore.com>
6690         * init.c [__ANDROID__]: Modify for ZCX.
6691         * exp_aggr.adb: Minor reformatting
6692         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
6694 2014-07-17  Robert Dewar  <dewar@adacore.com>
6696         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
6697         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
6698         scng.adb: Remove incorrect usage "allow to" and "allows to".
6700 2014-07-17  Robert Dewar  <dewar@adacore.com>
6702         * exp_dist.adb: Minor reformatting.
6704 2014-07-17  Bob Duff  <duff@adacore.com>
6706         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
6708 2014-07-17  Robert Dewar  <dewar@adacore.com>
6710         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
6711         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
6713 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6715         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
6716         non-bit-packed array, propagate Reverse_Storage_Order to the
6717         packed array type.
6719 2014-07-17  Javier Miranda  <miranda@adacore.com>
6721         * exp_disp.adb: Fix comment.
6722         * exp_pakd.adb: Minor reformatting.
6724 2014-07-17  Robert Dewar  <dewar@adacore.com>
6726         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
6727         entity if none exists (Gen_Elab_Calls): Complain if clash with
6728         No_Multiple_Elaboration.
6729         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
6730         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
6731         if not needed.
6732         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
6733         * sem_ch4.adb: Minor comment updates.
6735 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6737         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
6738         of function call for later use when shared passive objects
6739         are involved.
6741 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6743         * par-ch13.adb (Get_Aspect_Specifications):
6744         Catch a case where the argument of SPARK aspect Refined_State
6745         is not properly parenthesized.
6747 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6749         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
6750         the lifetime of a reference to an Ada 2012 container element.
6751         (Is_Element_Reference): New routine.
6753 2014-07-17  Robert Dewar  <dewar@adacore.com>
6755         * ali.ads: Minor comment fix.
6756         * lib-writ.adb: Minor reformatting.
6758 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6760         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
6761         in ASIS mode, load another subunit only if it a subunit of the
6762         current one, not a sibling that has been reached through the
6763         analysis of an ancestor. This allows the construction of the
6764         ASIS tree for the subunit even when sibling subunits have errors.
6766 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6768         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
6769         prevents the analysis of various contracts when the associated
6770         construct is erroneous.
6771         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
6772         SPARK_Pragma of an illegal or a partially decorated construct.
6774 2014-07-17  Robert Dewar  <dewar@adacore.com>
6776         * s-imguns.ads: Minor reformatting.
6778 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6780         * exp_ch7.adb (Build_Finalization_Master): Move all local
6781         variables to the proper code section. When looking for an existing
6782         finalization master, inspect the ultimate ancestor type of the
6783         full view.
6784         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
6786 2014-07-17  Robert Dewar  <dewar@adacore.com>
6788         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
6789         * gnat_rm.texi: Document Entity argument for pragma Annotate and
6790         Annotate aspect.
6791         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
6792         for Annotate aspect.
6793         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
6794         Entity argument at end.
6795         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
6797 2014-07-17  Tristan Gingold  <gingold@adacore.com>
6799         * s-imguns.ads: Fix minor typo.
6801 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6803         * sprint.adb: Minor reformatting.
6805 2014-07-17  Robert Dewar  <dewar@adacore.com>
6807         * sprint.adb (Write_Itype): Print proper header for string
6808         literal subtype.
6810 2014-07-17  Steve Baird  <baird@adacore.com>
6812         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
6814 2014-07-17  Vincent Celier  <celier@adacore.com>
6816         * gnatbind.adb: Change in message "try ... for more information".
6818 2014-07-17  Robert Dewar  <dewar@adacore.com>
6820         * sprint.adb: Code clean up.
6822 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6824         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
6825         the relevant code section. Add new local constant Obj_Id. When
6826         a limited controlled object is initialized by a function call,
6827         the build-in-place object access function call acts as the last
6828         initialization statement.
6829         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
6830         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
6831         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
6833 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6835         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
6836         propagate intrinsic flag to renamed entity, to allow e.g. renaming
6837         of Unchecked_Conversion.
6838         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
6839         if the declaration has errors.
6841 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6843         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
6844         container is busy before checking whether capacity allows for
6845         a further insertion. Insertion in a busy container that is full
6846         raises Program_Error rather than Capacity_Error. Previous to that
6847         patch which exception was raised varied among container types.
6849 2014-07-17  Robert Dewar  <dewar@adacore.com>
6851         * g-comlin.ads, g-comlin.adb: Minor clean up.
6853 2014-07-17  Bob Duff  <duff@adacore.com>
6855         * gnat_ugn.texi: Update gnatpp doc.
6857 2014-07-17  Robert Dewar  <dewar@adacore.com>
6859         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
6860         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
6861         could do this by actually expanding a real generic.
6862         * a-tags.ads: Add comments about performance.
6863         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
6864         Print Etype of defining identifier, rather than the object
6865         definition. More information.
6867 2014-07-17  Thomas Quinot  <quinot@adacore.com>
6869         * exp_dist.adb: Minor documentation clarification.
6871 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6873         * exp_util.adb (Is_Aliased): Revert previous change.
6875 2014-07-17  Vincent Celier  <celier@adacore.com>
6877         * g-comlin.adb (Try_Help): New procedure.
6878         (Getopt): Use new procedure Try_Help.
6879         * g-comlin.ads (Try_Help): New procedure.
6881 2014-07-17  Bob Duff  <duff@adacore.com>
6883         * gnat_ugn.texi: Minor update.
6885 2014-07-17  Robert Dewar  <dewar@adacore.com>
6887         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
6888         * sinfo.ads: Document restriction on aggregates (must expand to
6889         assignments if one or more assignments needs expansion, e.g. for
6890         controlled types).
6891         * sem_ch13.adb: All warning messages regarding bit order should
6892         be info: messages.
6893         * gnat_ugn.texi: Minor correction of missing @ on @code
6895 2014-07-17  Robert Dewar  <dewar@adacore.com>
6897         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
6898         * s-rident.ads (Partition_Boolean_Restrictions): Add
6899         No_Long_Long_Integer.
6900         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
6901         Long_Integer'Size if restriction No_Long_Long_Integer is active.
6902         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
6903         as the implicit base type for a signed integer type declaration
6904         if restriction No_Long_Long_Integer is active.
6905         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
6906         No_Long_Long_Integer.
6908 2014-07-17  Robert Dewar  <dewar@adacore.com>
6910         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
6911         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
6912         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
6913         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
6914         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
6916 2014-07-17  Robert Dewar  <dewar@adacore.com>
6918         * debug.adb: Remove -gnatdQ.
6919         * exp_disp.adb: Remove -gnatdQ.
6920         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
6921         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
6922         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
6923         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
6924         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
6925         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
6927 2014-07-17  Robert Dewar  <dewar@adacore.com>
6929         * back_end.adb: Minor reformatting and comment additions.
6930         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
6931         function.
6932         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
6933         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
6934         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
6935         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
6936         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
6937         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
6939 2014-07-17  Robert Dewar  <dewar@adacore.com>
6941         * gnat_rm.texi: Minor comment updates.
6943 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6945         * sem_util.adb (Make_Explicit_Dereference): If the expression
6946         being dereferenced is a generalized indexing, reset the overloaded
6947         flag on the generalized indexing call, consistent with the
6948         resetting of the flag on the original indexed component.
6950 2014-07-17  Robert Dewar  <dewar@adacore.com>
6952         * gnat_ugn.texi: Document advise not to mix -gnatV? and
6953         optimization.
6955 2014-07-17  Robert Dewar  <dewar@adacore.com>
6957         * checks.adb (Insert_Valid_Check): Don't insist on a name
6958         for the prefix when we make calls to Force_Evaluation and
6959         Duplicate_Subexpr_No_Checks.
6960         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
6961         (Remove_Side_Effects): Handle all volatile references right
6962         (Side_Effect_Free): Volatile reference is never side effect free
6963         * sinfo.ads (N_Attribute_Reference): Add comments explaining
6964         that in the tree, the prefix can be a general expression.
6966 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6968         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6969         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
6970         * sem_ch7.adb (Analyze_Package_Body_Contract,
6971         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
6973 2014-07-17  Robert Dewar  <dewar@adacore.com>
6975         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
6976         Store_After_Actions_In_Scope.
6978 2014-07-17  Robert Dewar  <dewar@adacore.com>
6980         * sem_aux.ads: Minor comment addition.
6982 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
6984         * sem_res.adb (Make_Call_Into_Operator): If the call is already
6985         a rewriting of an operator node, there are no actuals to be
6986         propagated from original node to rewritten node when in ASIS mode.
6988 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
6990         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
6991         Analyze_Subprogram_Contract): Add new local variable Mode. Save
6992         and restore the SPARK mode of the related construct in a
6993         stack-like fashion.
6994         * sem_ch7.adb (Analyze_Package_Body_Contract,
6995         Analyze_Package_Contract): Add new local variable Mode. Save and
6996         restore the SPARK mode of the related construct in a stack-like fashion.
6997         * sem_util.adb Remove with and use clause for Opt.
6998         (Restore_SPARK_Mode): New routine.
6999         (Save_SPARK_Mode_And_Set): New routine.
7000         * sem_util.ads Add with and use clause for Opt.
7001         (Restore_SPARK_Mode): New routine.
7002         (Save_SPARK_Mode_And_Set): New routine.
7004 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7006         * exp_util.adb (Is_Aliased): Transient objects
7007         within an expression with actions cannot be considered aliased.
7009 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7011         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
7012         introduce a new list (cleanup actions) for each (transient) scope.
7013         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
7014         N_Block_Statement
7015         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
7016         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
7017         processing for Store_xxx_Actions_In_Scope.
7018         (Build_Cleanup_Statements): Allow for a list of additional
7019         cleanup statements to be passed by the caller.
7020         (Expand_Cleanup_Actions): Take custom cleanup actions associated
7021         with an N_Block_Statement into account.
7022         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
7023         reorganization (refactoring only, no behaviour change).
7024         (Make_Transient_Block): Add assertion to ensure that the current
7025         scope is indeed a block (namely, the entity for the transient
7026         block being constructed syntactically, which has already been
7027         established as a scope).  If cleanup actions are present in the
7028         transient scope, transfer them now to the transient block.
7029         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
7030         called function while it is still present as the name in a call
7031         in the tree. This may not be the case later on if the call is
7032         rewritten into a transient block.
7033         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
7034         inserted after calling a protected operation on a shared passive
7035         protected must be performed in a block finalizer, not just
7036         inserted in the tree, so that they are executed even in case of
7037         a normal (RETURN) or abnormal (exception) transfer of control
7038         outside of the current scope.
7039         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
7040         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
7041         Scope_Stack_Entry reorganization.
7043 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7045         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
7046         call for types that do not have an explicit attribute definition
7047         clause for External_Tag, as their default tag may clash with an
7048         explicit tag defined for some other type.
7050 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7052         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
7053         controlled function call with multiple actual parameters that
7054         appears in Object.Operation form.
7056 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7058         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
7059         entity flag.
7060         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7061         External_Tag): No need to set entity flag.
7062         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
7063         Reimplement correctly in terms of Has_Rep_Item.
7065 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7067         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
7068         Start examining the tree at the node passed to
7069         Establish_Transient_Scope (not its parent).
7070         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7071         The access type for the variable storing the reference to
7072         the call must be declared and frozen prior to establishing a
7073         transient scope.
7074         * exp_ch9.adb: Minor reformatting.
7076 2014-07-17  Pascal Obry  <obry@adacore.com>
7078         * s-os_lib.ads: Minor comment update.
7080 2014-07-17  Tristan Gingold  <gingold@adacore.com>
7082         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
7083         indentation.
7084         * socket.c: Remove #warning to avoid warning.
7085         * expect.c: Indent some preprocessor directives to clarify
7086         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
7087         to remove warnings.
7088         * env.c: Fix indentation.  Port to PikeOS.
7089         * gsocket.h: Port to PikeOS.  Remove #warning.
7090         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
7091         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
7092         of stubbed __gnat_setup_parent_communication.
7093         * adaint.c: Port to PikeOS.  Reindent some preprocessor
7094         directives to clarify nested if.  Fix indentation.  Add missing
7095         ATTRIBUTE_UNUSED.
7097 2014-07-17  Robert Dewar  <dewar@adacore.com>
7099         * sem_attr.adb: Minor reformatting.
7101 2014-07-17  Robert Dewar  <dewar@adacore.com>
7103         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
7105 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7107         * sem_case.adb (Check_Choice_Set): If the case expression is the
7108         expression in a predicate, do not recheck coverage against itself,
7109         to prevent spurious errors.
7110         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
7111         expression comes from an aspect specification, to prevent spurious
7112         errors when expression is a case expression in a predicate.
7114 2014-07-17  Pascal Obry  <obry@adacore.com>
7116         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
7117         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
7119 2014-07-17  Vincent Celier  <celier@adacore.com>
7121         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
7122         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
7123         the usage for an erroneous invocation of a gnat tool.
7125 2014-07-16  Vincent Celier  <celier@adacore.com>
7127         * gnatls.adb: Get the target parameters only if -nostdinc was
7128         not specified.
7130 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7132         * checks.adb (Insert_Valid_Check): If the expression is a packed
7133         component of a modular type of the right size the data is always
7134         valid. This os particularly useful if the component is part of
7135         a volatile variable.
7137 2014-07-16  Robert Dewar  <dewar@adacore.com>
7139         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
7141 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7143         * exp_ch7.ads: Minor documentation fix.
7145 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7147         * sem_ch3.adb (Find_Type_Name): Diagnose properly
7148         a private extension completion that is an interface definition
7149         with an interface list.
7151 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
7153         * gnatls.adb (Gnatls): Code clean ups.
7155 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7157         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
7158         * sem.adb (Analyze): Handle N_Compound_Statement.
7159         * sprint.adb (Sprint_Node_Actual): Ditto.
7160         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
7161         procedure to handle N_Compound_Statement.
7162         * exp_aggr.adb (Collect_Initialization_Statements):
7163         Use a proper compound statement node, instead of a bogus
7164         expression-with-actions with a NULL statement as its expression,
7165         to wrap collected initialization statements.
7166         * freeze.ads, freeze.adb
7167         (Explode_Initialization_Compound_Statement): New public procedure,
7168         lifted from Freeze_Entity.
7169         (Freeze_Entity): When freezing
7170         an object with captured initialization statements and without
7171         delayed freezing, explode compount statement.
7172         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
7173         case that used to handle bogus EWAs with NULL statement as
7174         the expression.
7175         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
7176         delayed freezing and captured initialization statements, explode
7177         compound statement.
7179 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
7181         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
7183 2014-07-16  Doug Rupp  <rupp@adacore.com>
7185         * s-interr-hwint.adb: Casing error on parameter.
7187 2014-07-16  Pascal Obry  <obry@adacore.com>
7189         * Makefile.rtl: Add g-rewdat.o dependencies in
7190         GNATRTL_NONTASKING_OBJS.
7192 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7194         * sem_case.adb: Code clean up.
7196 2014-07-16  Vincent Celier  <celier@adacore.com>
7198         * make.adb: Do not read gnat.adc when gnatmake is invoked
7199         with -gnatA.
7201 2014-07-16  Pascal Obry  <obry@adacore.com>
7203         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
7204         implementation of GNAT.Rewrite_Data.
7206 2014-07-16  Vincent Celier  <celier@adacore.com>
7208         * gnatls.adb (Normalize): New function.
7209         (Gnatls): Get the target parameters. On targets other than VMS,
7210         normalize the path names in the source search path, the object search
7211         path and the project search path.
7213 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7215         * sem_case.adb: Avoid self-checking of case expressions in
7216         dynamic predicates.
7218 2014-07-16  Robert Dewar  <dewar@adacore.com>
7220         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
7221         discriminants.
7223 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
7225         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
7227 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
7229         * gnat_ugn.texi: Fix typo.
7231 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7233         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
7234         expression if it is the specification of a subtype predicate:
7235         it will be expanded when the return statement is analyzed, or
7236         when a static predicate is transformed into a static expression
7237         for evaluation by the front-end.
7238         * sem_ch13.adb (Get_RList): If the expression for a static
7239         predicate is a case expression, extract the alternatives of the
7240         branches with a True value to create the required statically
7241         evaluable expression.
7243 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7245         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
7246         expression, not the location of the aspect, for all generated
7247         code, so that in particular the call to raise_assert_failure
7248         gets the sloc of the associated condition.
7249         * exp_ch6.adb
7250         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
7251         Set an explicit End_Label on the handled sequence of statements
7252         for the _Postconditions procedure so that the implicit return
7253         statement does not erroneously get associated with code generated
7254         for the last condition in postconditions.
7256 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7258         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
7259         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
7260         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
7261         -gnatw.Z.
7263 2014-07-16  Robert Dewar  <dewar@adacore.com>
7265         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
7266         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
7267         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
7268         not in Access_Kind.
7269         * par-ch4.adb (At_Start_Of_Attribute): New function
7270         (P_Simple_Expression): Better msg for bad attribute prefix.
7271         * scans.ads: Minor reformatting.
7273 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7275         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
7276         static constant, check that in belongs to the corresponding index
7277         subtype, to produce the proer warning when expansion is disabled.
7279 2014-07-16  Robert Dewar  <dewar@adacore.com>
7281         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
7282         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
7283         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
7284         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
7285         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
7286         -gnatw.z/-gnatw.Z
7287         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
7288         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
7289         reformatting.
7291 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
7293         * exp_ch7.adb (Process_Declarations): Reinstate the check on
7294         a hook object to ensure that the related transient declaration
7295         is finalizable.
7296         * exp_util.adb (Is_Aliased): Do not consider expresison with
7297         actions as a special context.
7298         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
7299         ensure that the related transient declaration is finalizable.
7301 2014-07-16  Robert Dewar  <dewar@adacore.com>
7303         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
7304         * snames.ads-tmpl: Add Allocation_Check to list of check names.
7305         * types.ads: Add Allocation_Check to list of check names.
7307 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7309         * sem_util.adb (Enter_Name): replace bogus test for presence of
7310         Corresponding_Remote_Type with correct test on Ekind.
7311         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
7312         of calls to Corresponding_ Remote_Type (documentation fix).
7314 2014-07-16  Robert Dewar  <dewar@adacore.com>
7316         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
7317         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
7318         where it applies.
7319         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
7320         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
7322 2014-07-16  Robert Dewar  <dewar@adacore.com>
7324         * gnat_ugn.texi: Document binder switch -Ra.
7325         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
7326         (List_Closure_All).
7327         * opt.ads (List_Closure_All): New switch.
7328         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
7329         List_Closure_All.
7331 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
7333         * gnat_rm.texi: Minor edits, to make case consistent in names
7334         of types and fields.
7336 2014-07-16  Robert Dewar  <dewar@adacore.com>
7338         * gnat_rm.texi: Document erroneous mixing of thin pointers and
7339         unrestricted access
7340         * gnat_ugn.texi: Add note on size of access types about thin
7341         pointers and the use of attribute Unrestricted_Access.
7343 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7345         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
7346         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
7347         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
7348         machinery to detect tampering on bounded vectors.
7350 2014-07-16  Robert Dewar  <dewar@adacore.com>
7352         * gnat_rm.texi: Document that leading/trailing asterisks are
7353         now implied for the pattern match string for pragma Warnings
7354         and Warning_As_Error.
7355         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
7356         (Analyze_Pragma, case Warning_As_Error): Call
7357         Acquire_Warning_Match_String.
7358         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
7360 2014-07-16  Bob Duff  <duff@adacore.com>
7362         * gnat_ugn.texi: Document need for project file
7363         for --incremental switch for gnat2xml.
7365 2014-07-16  Robert Dewar  <dewar@adacore.com>
7367         * gnat_rm.texi: Fix example of non-packable components in packed
7368         records section.
7370 2014-07-16  Robert Dewar  <dewar@adacore.com>
7372         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
7373         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
7374         upper case in exception messages.
7376 2014-07-16  Robert Dewar  <dewar@adacore.com>
7378         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
7379         is renamed Has_Same_Storage.
7380         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
7381         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
7382         descriptions).
7384 2014-07-16  Robert Dewar  <dewar@adacore.com>
7386         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
7387         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
7389 2014-07-16  Robert Dewar  <dewar@adacore.com>
7391         * gnat_ugn.texi: Add note that integrated
7392         preprocessing cannot be applied to configuration pragma files.
7394 2014-07-16  Yannick Moy  <moy@adacore.com>
7396         * sem_attr.adb (Analyze_Attribute/cases Pred
7397         and Succ): Always enable range check on fixed-point types if
7398         not suppressed for the type.
7400 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
7402         * sem_util.adb (State_Has_Enabled_Property):
7403         Account for an external property denoted by an others choice.
7405 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
7407         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
7408         * exp_ch7.adb (Process_Declarations): There is no need to check
7409         that a transient object being hooked is controlled as it would
7410         not have been hooked in the first place.
7411         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
7412         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
7413         (Is_Aliased): A renaming of a transient controlled object is
7414         not considered aliasing when it occurs within an expression
7415         with actions.
7416         (Requires_Cleanup_Actions): There is no need to
7417         check that a transient object being hooked is controlled as it
7418         would not have been hooked in the first place.
7419         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
7421 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
7423         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
7424         the outer level of routine Analyze_Aspect_Specifications. Ensure
7425         that the corresponding pragmas of aspects Initial_Condition and
7426         Initializes are inserted after pragma SPARK_Mode.
7428 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7430         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
7431         properly a choice list with more than one choice, where each
7432         is an aggregate denoting a sequence of array indices for a
7433         multidimentional array. For SPARK use.
7435 2014-07-16  Vadim Godunko  <godunko@adacore.com>
7437         * a-coinho-shared.adb (Adjust): Create
7438         copy of internal shared object and element when source container
7439         is locked.
7440         (Copy): Likewise.
7441         (Query_Element): Likewise.
7442         (Update_Element): Likewise.
7443         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
7444         to get reference for empty holder.
7445         (Reference): Likewise.
7447 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7449         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
7450         from Process_Transient_Oject.
7451         * exp_ch4.ads: Ditto.
7452         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
7453         declaration as an action on the topmost enclosing expression,
7454         not on a possibly conditional subexpreession.
7456 2014-07-16  Vadim Godunko  <godunko@adacore.com>
7458         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
7459         Fix parameter mode of Update_Element.
7461 2014-07-16  Robert Dewar  <dewar@adacore.com>
7463         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
7464         reformatting.
7466 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7468         * a-cohase.ads: Type Iterator must be controlled, so that the
7469         tampering bit is properly set through an iteration.
7470         * a-cohase.adb: Add Finalize operation for type Iterator.
7472 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7474         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
7475         tampering checks.
7477 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7479         * a-coinho-shared.adb: Fix spurious accessibility check.
7481 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
7483         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
7485 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7487         PR ada/61505
7488         * gnat_rm.texi: Fix errors with makeinfo 5.1.
7490 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
7492         PR ada/61505
7493         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
7495 2014-06-13  Yannick Moy  <moy@adacore.com>
7497         * exp_attr.adb: Fix typo in comment.
7498         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
7499         checking in GNATprove_Mode.
7501 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7503         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
7505 2014-06-13  Robert Dewar  <dewar@adacore.com>
7507         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
7508         reformatting.
7510 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7512         * sem_prag.adb (Analyze_Pragma): Add local
7513         variable Missing_Parentheses. Emit an error when a state
7514         declaration with options appears without parentheses. Add a
7515         guard to prevent a bogus error when a state declaration may be
7516         interpreted as an option if a previous declaration with options
7517         was not parenthesized.
7519 2014-06-13  Robert Dewar  <dewar@adacore.com>
7521         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
7522         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
7523         * checks.ads (Alignment_Warnings_Record): New type.
7524         (Alignment_Warnings): New table
7525         (Validate_Alignment_Check_Warnings): New procedure.
7526         * errout.adb (Delete_Warning_And_Continuations): New procedure
7527         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
7528         Warnings_Treated_As_Errors (Finalize): Minor reformatting
7529         * errout.ads (Warning_Msg): New variable
7530         (Delete_Warning_And_Continuations): New procedure
7531         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
7532         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
7534 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7536         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
7538 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7540         * errout.adb (SPARK_Msg_N): New routine.
7541         (SPARK_Msg_NE): New routine.
7542         * errout.ads Add a section on SPARK-related error routines.
7543         (SPARK_Msg_N): New routine.
7544         (SPARK_Msg_NE): New routine.
7545         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
7546         pragma Abstract_State is always inserted after SPARK_Mode.
7547         (Insert_After_SPARK_Mode): New routine.
7548         * sem_prag.adb (Analyze_Abstract_State,
7549         Analyze_Constituent, Analyze_External_Property,
7550         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
7551         Analyze_Global_List, Analyze_Initialization_Item,
7552         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
7553         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
7554         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
7555         Analyze_Refined_Global_In_Decl_Part,
7556         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
7557         Check_Aspect_Specification_Order, Check_Constituent_Usage,
7558         Check_Declaration_Order, Check_Dependency_Clause,
7559         Check_Duplicate_Mode, Check_Duplicate_Option,
7560         Check_Duplicate_Property, Check_External_Properties,
7561         Check_External_Property, Check_Function_Return,
7562         Check_Matching_Constituent, Check_Matching_State,
7563         Check_Mode_Restriction_In_Enclosing_Context,
7564         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
7565         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
7566         Has_Extra_Parentheses, Inconsistent_Mode_Error,
7567         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
7568         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
7569         Report_Unrefined_States, Report_Unused_Constituents,
7570         Report_Unused_States, Role_Error, Usage_Error):
7571         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
7572         to report semantic errors only when SPARK_Mode is on.
7573         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
7574         pragma Depends explicitly, this is now done by the analysis.
7575         (Analyze_Global_In_Decl_List): Do not check the syntax of
7576         pragma Global explicitly, this is now done by the analysis.
7577         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
7578         pragma Initializes explicitly, this is now done by the analysis.
7579         (Analyze_Part_Of): Do not check the syntax of the encapsulating
7580         state, this is now done by the analysis.
7581         (Analyze_Pragma): Do
7582         not check the syntax of a state declaration, this is now done
7583         by the analysis.
7584         (Analyze_Refined_Depends_In_Decl_Part): Do not
7585         check the syntax of pragma Refined_Depends explicitly, this is now
7586         done by the analysis.
7587         (Analyze_Refined_Global_In_Decl_Part): Do
7588         not check the syntax of pragma Refined_Global explicitly, this is
7589         now done by the analysis.
7590         (Analyze_Refined_State_In_Decl_Part):
7591         Do not check the syntax of pragma Refined_State explicitly, this
7592         is now done by the analysis.
7593         (Check_Dependence_List_Syntax): Removed.
7594         (Check_Global_List_Syntax): Removed.
7595         (Check_Initialization_List_Syntax): Removed.
7596         (Check_Item_Syntax): Removed.
7597         (Check_Missing_Part_Of): Do not consider items from an instance.
7598         (Check_Refinement_List_Syntax): Removed.
7599         (Check_State_Declaration_Syntax): Removed.
7600         (Collect_Global_List): Do not raise Program_Error when the input is
7601         malformed.
7602         (Process_Global_List): Do not raise Program_Error when the input
7603         is malformed.
7604         * sem_ch13.adb: Minor reformatting.
7606 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7608         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
7609         that is an interface definition with an interface list.
7610         (Process_Full_View): Move error message on missmatched interfaces
7611         between views to the declaration of full view, for clarity.
7612         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
7613         for clarity.
7615 2014-06-13  Robert Dewar  <dewar@adacore.com>
7617         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
7618         reason to Overflow.
7620 2014-06-13  Robert Dewar  <dewar@adacore.com>
7622         * makeutl.adb: Minor reformatting.
7624 2014-06-13  Gail Schenker  <schenker@adacore.com>
7626         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
7627         associated flag (d.z), no longer needed.
7629 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7631         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
7632         Export aspects, do not check whether a corresponding Convention
7633         aspect has been specified. Convention is optional in Ada2012,
7634         and defaults to Convention_Ada.
7636 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
7638         * checks.adb (Apply_Address_Clause_Check): Only issue the new
7639         warning if the propagation warning is issued.
7641 2014-06-13  Thomas Quinot  <quinot@adacore.com>
7643         * exp_ch4.adb: Minor reformatting.
7645 2014-06-13  Robert Dewar  <dewar@adacore.com>
7647         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
7648         Handle float range check case (Expand_N_Attribute_Reference,
7649         case Succ): Handle float range check case.
7650         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
7651         range check case.
7653 2014-06-13  Vincent Celier  <celier@adacore.com>
7655         * makeutl.ads (Compute_Builder_Switches): Change name of
7656         parameter Root_Environment to Env.
7657         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
7658         Env parameter of procedure Get_Or_Create_Configuration_File.
7659         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
7660         of new parameter Env.
7661         * prj-conf.ads (Locate_Runtime): New parameter Env of type
7662         Prj.Tree.Environment.
7664 2014-06-13  Robert Dewar  <dewar@adacore.com>
7666         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
7668 2014-06-13  Robert Dewar  <dewar@adacore.com>
7670         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
7671         reformatting.
7672         * sem_attr.adb: Minor code reformatting and simplification.
7673         * checks.adb: Fix minor typo.
7675 2014-06-13  Emmanuel Briot  <briot@adacore.com>
7677         * g-comlin.adb (Get_Argument): fix expansion
7678         of command line arguments (e.g. "*.adb") when using a custom
7679         parser. The parser was not passed to the recursive call, and
7680         thus we were trying to do the expansion on the default command
7681         line parser.
7683 2014-06-13  Thomas Quinot  <quinot@adacore.com>
7685         * exp_ch9.adb: Minor reformatting.
7687 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7689         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
7690         To determine whether the attribute should be expanded, examine
7691         whether the enclosing postcondition pragma is to be checked,
7692         rather than using the internal flag Assertions_Enabled.
7694 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
7696         * gnat_rm.texi: Minor fixes.
7697         * gnat_ugn.texi: Added a missing "@itemize".
7699 2014-06-13  Robert Dewar  <dewar@adacore.com>
7701         * debug.adb: Remove -gnatd.1 flag documentation.
7702         * layout.adb (Layout_Type): Remove special handling of size
7703         for anonymous access type.
7704         * sem_ch3.adb (Replace_Type): Remove special handling of size
7705         for anonymous access type.
7707 2014-06-13  Robert Dewar  <dewar@adacore.com>
7709         * debug.adb: Document debug flag -gnatd.1.
7710         * layout.adb (Layout_Type): Size change for anonymous access
7711         types under -gnatd.1.
7712         * sem_ch3.adb (Replace_Type): Size change for anonymous access
7713         types under -gnatd.1.
7715 2014-06-13  Robert Dewar  <dewar@adacore.com>
7717         * layout.adb (Layout_Type): Anonymous access types designating
7718         unconstrained arrays are always thin pointers.
7719         * sem_ch3.adb (Replace_Type): Anonymous access types designating
7720         unconstrained arrays are always thin pointers.
7722 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7724         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
7725         to resolve the prefix of an attribute that is an entity name
7726         and may be a parameterless call.  Minor code reorganization.
7728 2014-06-13  Robert Dewar  <dewar@adacore.com>
7730         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
7731         Removed.
7732         * opt.ads (Compiler_Unit): New flag.
7733         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
7734         for null statement sequence (not allowed in compiler unit).
7735         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
7736         parsing.
7737         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
7738         calling sequence.
7739         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
7740         Check_Compiler_Unit.
7741         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
7742         Check_Compiler_Unit (this construct is not allowed in compiler
7743         units).
7744         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
7745         Set Opt.Compiler_Unit.
7747 2014-06-13  Geert Bosch  <bosch@adacore.com>
7749         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
7750         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
7751         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
7753 2014-06-13  Robert Dewar  <dewar@adacore.com>
7755         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
7757 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7759         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
7760         types in SPARK as it is poorly placed and poorly formulated. The
7761         check was flagging ALL volatile entities as illegal in SPARK.
7762         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
7763         types as illegal in SPARK.
7765 2014-06-13  Robert Dewar  <dewar@adacore.com>
7767         * sem_cat.adb: Minor reformatting.
7769 2014-06-13  Yannick Moy  <moy@adacore.com>
7771         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
7773 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
7775         * gnat_rm.texi: Add detail on SPARK_05 restriction.
7777 2014-06-13  Bob Duff  <duff@adacore.com>
7779         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
7780         Add assertions requiring the secondary stack to be initialized.
7781         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
7782         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
7783         secondary stack is initialized before calling Init_Tasking_Soft_Links,
7784         by adding pragmas Elaborate_Body.
7786 2014-06-13  Thomas Quinot  <quinot@adacore.com>
7788         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
7789         kludge disabling new legality check.
7791 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7793         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
7794         volatile types.
7795         (Freeze_Type): Volatile types are now illegal in SPARK.
7797 2014-06-13  Robert Dewar  <dewar@adacore.com>
7799         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
7800         * gnat_rm.texi: Document aspect Thread_Local_Storage.
7802 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7804         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
7805         value is a temporary that renames an aggregate is legal in a
7806         preelaborated unit. Illegalities, if any will be detected in
7807         the aggregate components.
7809 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
7811         * einfo.ads: Minor reformatting an comment expansion.
7813 2014-06-13  Robert Dewar  <dewar@adacore.com>
7815         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
7816         Tbuild.
7817         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
7818         Back_End.
7819         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
7820         * sem_warn.adb: Minor reformatting.
7822 2014-06-13  Doug Rupp  <rupp@adacore.com>
7824         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
7825         files with rfm=udf.
7827 2014-06-13  Yannick Moy  <moy@adacore.com>
7829         * sem_warn.adb (Check_Unset_References): Take
7830         case of Refined_Post into account in Within_Postcondition check.
7832 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
7834         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
7835         SPARK.
7837 2014-06-13  Yannick Moy  <moy@adacore.com>
7839         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
7840         Aspect_Export): Consider that variables may be set outside the program.
7842 2014-06-13  Robert Dewar  <dewar@adacore.com>
7844         * back_end.adb (Make_Id): New function.
7845         (Make_SC): New function.
7846         (Set_RND): New procedure.
7847         * back_end.ads (Make_Id): New function.
7848         (Make_SC): New function.
7849         (Set_RND): New procedure.
7850         * einfo.ads: Minor comment updates.
7851         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
7852         * gnat1drv.adb (Gnat1drv): New calling sequence for
7853         Get_Target_Parameters.
7854         (Gnat1drv): Move Atree.Initialize here from Frontend.
7855         * targparm.adb (Get_Target_Parameters): New calling
7856         sequence (Get_Target_Parameters): Handle pragma Restriction
7857         (No_Dependence,..)
7858         * targparm.ads (Get_Target_Parameters): New calling sequence.
7860 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
7862         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
7863         loop if the pragma does not come from source, so that an implicit
7864         pragma Import only applies to the first declaration, avoiding
7865         possible conflicts with earlier explicit and implicit declarations
7866         due to multiple Provide_Shift_Operators pragmas.
7867         (Set_Imported): Remove previous fix that bypassed pragma duplication
7868         error.
7869         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
7870         of Provide_Shift_Operators.
7872 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
7874         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
7875         string pointer directly to set_decl_section_name.
7877 2014-06-11  Robert Dewar  <dewar@adacore.com>
7879         * sem_ch13.adb: Minor reformatting.
7881 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7883         * sem_prag.adb (Check_Clause_Syntax): Add new
7884         local variable Outputs. Account for the case where multiple
7885         output items appear as an aggregate.
7887 2014-06-11  Robert Dewar  <dewar@adacore.com>
7889         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7890         with ?j? not ??.
7892 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7894         * einfo.ads: Minor reformatting.
7896 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7898         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7899         new variable First_Node. Update the position after all insertions have
7900         taken place to First_Node.
7902 2014-06-11  Robert Dewar  <dewar@adacore.com>
7904         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7905         * layout.adb (Layout_Type): Remove test of -gnatd.1.
7907 2014-06-11  Robert Dewar  <dewar@adacore.com>
7909         * sem_ch13.adb: Minor reformatting.
7911 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7913         * sem_prag.adb (Check_Clause_Syntax): Add new
7914         local variable Outputs. Account for the case where multiple
7915         output items appear as an aggregate.
7917 2014-06-11  Robert Dewar  <dewar@adacore.com>
7919         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
7920         with ?j? not ??.
7922 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7924         * einfo.ads: Minor reformatting.
7926 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7928         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
7929         new variable First_Node. Update the position after all insertions have
7930         taken place to First_Node.
7932 2014-06-11  Robert Dewar  <dewar@adacore.com>
7934         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
7935         * layout.adb (Layout_Type): Remove test of -gnatd.1.
7937 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7939         * freeze.ads: Minor reformatting.
7940         * checks.adb (Determine_Range): Do not attempt to determine
7941         the range of a deferred constant whose full view has not been
7942         seen yet.
7943         * sem_res.adb (Resolve): Remove undesirable guard against
7944         resolving expressions from expression functions.
7946 2014-06-11  Robert Dewar  <dewar@adacore.com>
7948         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
7949         access types.
7950         * layout.adb (Layout_Type): Make anonymous access types for
7951         subprogram formal types and return types always thin. For now
7952         only enabled if -gnatd.1 set.
7954 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
7956         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
7957         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
7958         subprogram must be a null procedure.
7960 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
7962         * sem_prag.adb (Analyze_Input_Item): Allow formal
7963         parameters to appear as input_items in an initialization_list
7964         of pragma Initializes. Encapsulation now applies to states and
7965         variables only (as it should). Add RM references to key errors.
7966         * sem_prag.adb (Set_Imported): Suppress errors
7967         about preceding Imports when the pragma does not come from source,
7968         which can happen through use of pragma Provide_Shift_Operators.
7970 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7972         * sem_ch3.adb: Minor reformatting.
7973         * einfo.ads (Full_View): Minor comment update.
7975 2014-06-11  Robert Dewar  <dewar@adacore.com>
7977         * einfo.adb (Is_Independent): New flag.
7978         * einfo.ads (Is_Independent): New flag.
7979         (Has_Independent_Components): Clean up and fix comments.
7980         * sem_prag.adb (Fix_Error): Deal with changing argument
7981         [of] to entity [for].
7982         (Analyze_Pragma, case Independent): Set Is_Independent flag
7983         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
7984         in all components of specified record.
7986 2014-06-11  Thomas Quinot  <quinot@adacore.com>
7988         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
7989         Set proper Etype on bounds of dummy type created for analysis
7990         of the generic.
7992 2014-06-11  Robert Dewar  <dewar@adacore.com>
7994         * debug.adb: Minor comment fix (add missing section of dot
7995         numeric flags).
7997 2014-06-11  Robert Dewar  <dewar@adacore.com>
7999         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
8000         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
8001         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
8002         * errout.adb (Output_Messages): Avoid duplicate output for
8003         library level instance.
8004         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
8005         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
8006         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
8007         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
8008         accomodate largest modulus value.
8009         * gnat_ugn.texi: Minor updates.
8011 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8013         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
8014         load body of generic package or its parent, if body is optional
8015         and the unit does not require a body.
8017 2014-06-11  Robert Dewar  <dewar@adacore.com>
8019         * gnat_rm.texi: Document System.Unsigned_Types.
8020         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
8021         * s-unstyp.ads: Update comments (this is now user available unit).
8023 2014-06-11  Robert Dewar  <dewar@adacore.com>
8025         * make.adb, sem_res.adb: Minor reformatting.
8027 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8029         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
8030         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
8031         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
8032         Preelaborate_05 to just Preelaborate in runtime units, and similarly
8033         change Pure_05 to just Pure.
8035 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8037         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
8038         analysis if error has been posted on subprogram body.
8040 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8042         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8043         rule given in RM 13.1 (8/1) for operational attributes to stream
8044         attributes: the attribute must apply to a first subtype. Fixes
8045         missing errors in ACATS test bdd2004.
8047 2014-06-11  Robert Dewar  <dewar@adacore.com>
8049         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
8050         record type if restriction No_Implicit_Conditionals is active.
8051         (Expand_N_Object_Declaration): Don't allow default initialization
8052         for variant record type if restriction No_Implicit_Condition is active.
8053         (Build_Variant_Record_Equality): Don't build for variant
8054         record type if restriction No_Implicit_Conditionals is active.
8055         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
8056         No_Implicit_Conditionals.
8057         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
8059 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
8061         * i-cstrin.ads: Update comments.
8063 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8065         * sem_res.adb (Resolve_Selected_Component): Handle properly a
8066         selected component whose prefix is overloaded, when none of the
8067         interpretations matches the expected type.
8069 2014-06-11  Bob Duff  <duff@adacore.com>
8071         * make.adb (Wait_For_Available_Slot): Give a more
8072         informative error message; if the ALI file is not found, print
8073         the full path of what it's looking for.
8075 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
8077         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
8078         option to specify the result file encoding.
8080 2014-06-11  Robert Dewar  <dewar@adacore.com>
8082         * errout.ads, sem_ch12.adb: Minor reformatting.
8083         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
8084         * lib-xref.adb: Minor reformatting.
8085         * restrict.adb: Minor code reorganization (put routines in
8086         alpha order).
8088 2014-06-11  Yannick Moy  <moy@adacore.com>
8090         * einfo.ads: Minor typo in comment
8092 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8094         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
8095         formal private types and private type extensions, to indicate
8096         variable in a generic unit whose uninitialized use suggest that
8097         actual type should be fully initialized.
8098         Needs_Initialized_Actual:  removed, functionaity replaced by
8099         the above.
8100         * lib-xref.adb (Generate_Reference): Generate a reference for
8101         variables of a formal type when the unit is not the main unit,
8102         to enable appropriate warnings in an instance.
8103         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
8104         of variable in a generic unit that suggests that actual type
8105         should be full initialized.
8106         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
8107         and do not emot warning, which now only appears in an instance.
8109 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
8111         * gnat_ugn.texi: Fix minor typo.
8113 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8115         * sem_ch3.adb Add with and use clause for Sem_Ch10.
8116         (Analyze_Declarations): Code reformatting. Analyze the contract
8117         of a subprogram body stub at the end of the declarative region.
8118         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
8119         now a variable. Do not process the body if its contract is not
8120         available. Account for subprogram body stubs when extracting
8121         the corresponding spec.
8122         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
8123         on usage.
8124         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
8125         New routine.
8126         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
8127         Account for subprogram body stubs when extracting the
8128         corresponding spec.
8129         (Analyze_Global_In_Decl_List):
8130         Account for subprogram body stubs when extracting the
8131         corresponding spec.
8132         (Analyze_Refined_Depends_In_Decl_Part):
8133         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
8134         of the related body. Spec_Is now a variable. Account for
8135         subprogram body stubs when extracting the corresponding spec.
8136         (Analyze_Refined_Global_In_Decl_Part): Use
8137         Find_Related_Subprogram_Or_Body to retrieve the declaration
8138         of the related body. Spec_Is now a variable. Account for
8139         subprogram body stubs when extracting the corresponding spec.
8140         (Collect_Subprogram_Inputs_Output): Account for subprogram body
8141         stubs when extracting the corresponding spec.
8143 2014-06-11  Vincent Celier  <celier@adacore.com>
8145         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
8146         -lgnarl or -lgnat.
8148 2014-06-11  Robert Dewar  <dewar@adacore.com>
8150         * debug.adb: Add debug flag -gnatd.q.
8151         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
8152         -gnatd.q set.
8153         * styleg.adb (Check_Xtra_Parens): Message should be a style
8154         message.
8155         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
8156         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
8157         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
8158         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
8160 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
8162         * gnat_rm.texi: Revised chapter on Implementation Defined
8163         Characteristics.
8165 2014-06-11  Geert Bosch  <bosch@adacore.com>
8167         * s-exctab.adb: avoid race conditions in exception registration.
8169 2014-06-11  Robert Dewar  <dewar@adacore.com>
8171         * errout.adb (Warn_Insertion): New function.
8172         (Error_Msg): Use Warn_Insertion and Prescan_Message.
8173         (Error_Msg_Internal): Set Info field of error object.
8174         (Error_Msg_NEL): Use Prescan_Message.
8175         (Set_Msg_Text): Don't store info: at start of message.
8176         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
8177         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
8178         * errout.ads: Document new ?$? and >$> insertion sequences
8179         Document use of "(style)" and "info: "
8180         * erroutc.adb (dmsg): Print several missing fields
8181         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
8182         Deal with new tagging of info messages
8183         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
8184         Add field Info (Prescan_Message): New procedure, this procedure
8185         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
8186         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
8187         sem_elab.adb: Follow new rules for info message (info belongs
8188         only at the start of a message, and only in the first message,
8189         not in any of the continuations).
8190         * gnat_ugn.texi: Document full set of warning tags.
8192 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
8194         * sem_util.adb: Minor typo fix.
8196 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8198         * sem_warn.adb (Check_References): Do not emit spurious warnings
8199         on uninitialzed variable of a formal private type if variable
8200         is not read.
8202 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
8204         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
8205         set_decl_section_name accessor.
8207 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
8209         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8210         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8211         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
8213 2014-05-21  Robert Dewar  <dewar@adacore.com>
8215         * layout.adb: Minor reformatting.
8216         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
8217         dummy procedure ip.
8219 2014-05-21  Robert Dewar  <dewar@adacore.com>
8221         * restrict.ads (Implementation_Restriction): Add entry for
8222         No_Fixed_IO.
8223         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
8224         Ada.[Wide_[Wide_]Text_IO.
8225         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
8226         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
8227         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
8228         Wide_Wide_Value if restriction No_Fixed_IO is set.
8229         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
8231 2014-05-21  Robert Dewar  <dewar@adacore.com>
8233         * gnatcmd.adb: Minor error msg changes (no upper case letter
8234         at start).
8235         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
8236         reformatting.
8238 2014-05-21  Robert Dewar  <dewar@adacore.com>
8240         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
8241         via generic formals.
8242         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
8243         -gnatd.G is set.
8245 2014-05-21  Thomas Quinot  <quinot@adacore.com>
8247         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
8248         more accurately describe that this subprogram needs to come into
8249         play also in cases where no byte swapping is involved, because
8250         it also takes care of some required shifts (left-justification
8251         of values).
8253 2014-05-21  Thomas Quinot  <quinot@adacore.com>
8255         * freeze.adb (Check_Component_Storage_Order): Indicate whether
8256         a Scalar_Storage_Order attribute definition is present for the
8257         component's type.
8258         (Freeze_Record_Type): Suppress junk warnings
8259         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
8260         definitions.
8262 2014-05-21  Robert Dewar  <dewar@adacore.com>
8264         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
8265         to Kill_Elaboration_Checks.
8267 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
8269         * layout.adb (Assoc_Add): Suppress the optimization of the (E
8270         - C1) + C2 case, when the expression type is unsigned and C1 <
8271         C2, to avoid creating a negative literal when folding.
8273 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
8275         * freeze.adb (Freeze_Record_Type): Update the use of
8276         Is_SPARK_Volatile.
8277         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
8278         Is_SPARK_Volatile.
8279         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
8280         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
8281         of Is_SPARK_Volatile.
8282         (Analyze_Loop_Parameter_Specification):
8283         Update the use of Is_SPARK_Volatile.
8284         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
8285         formal parameter when its type is volatile.
8286         * sem_prag.adb (Analyze_Global_Item): Update the use of
8287         Is_SPARK_Volatile.
8288         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
8289         determines whether an entity is a volatile source SPARK object.
8290         * sem_util.adb (Has_Enabled_Property): Accout for external
8291         properties being set on objects other than abstract states
8292         and variables. An example would be a formal parameter.
8293         (Is_SPARK_Volatile): New routine.
8294         (Is_SPARK_Volatile_Object):
8295         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
8296         when checking entities and/or types.
8297         * sem_util.ads (Is_SPARK_Volatile): New routine.
8299 2014-05-21  Robert Dewar  <dewar@adacore.com>
8301         * sem_warn.adb: Minor fix to warning messages (use ?? instead
8302         of ?).
8304 2014-05-21  Vincent Celier  <celier@adacore.com>
8306         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
8307         switch --version and --help.
8309 2014-05-21  Robert Dewar  <dewar@adacore.com>
8311         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
8313 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8315         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
8316         iterator variable when the domain of iteration is a formal
8317         container and this is an element iterator.
8319 2014-05-21  Bob Duff  <duff@adacore.com>
8321         * sem_ch12.adb: Minor reformatting.
8323 2014-05-21  Robert Dewar  <dewar@adacore.com>
8325         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
8327 2014-05-21  Robert Dewar  <dewar@adacore.com>
8329         * sem_elab.adb: Minor reformatting.
8330         * s-taprop.ads: Minor comment fix.
8331         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
8332         Kill_Elaboration_Checks.
8333         * errout.adb, erroutc.adb: Minor reformatting.
8335 2014-05-21  Thomas Quinot  <quinot@adacore.com>
8337         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
8338         component. No byte swapping occurs, but this procedure also takes
8339         care of appropriately justifying the argument.
8341 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
8343         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
8344         New routine.
8345         (Analyze_Subprogram_Body_Helper): Move the
8346         analysis of aspect specifications and the processing of the
8347         subprogram body contract after inlining has taken place.
8348         (Diagnose_Misplaced_Aspect_Specifications): Removed.
8350 2014-05-21  Javier Miranda  <miranda@adacore.com>
8352         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
8354 2014-05-21  Robert Dewar  <dewar@adacore.com>
8356         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
8357         continuations any more.
8359 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8361         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
8362         present in formal_Private_Definitions and on private extension
8363         declarations of a formal derived type. Set when the use of the
8364         formal type in a generic suggests that the actual should be a
8365         fully initialized type.
8366         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
8367         to indicate that an entity of a generic type has default
8368         initialization, and that the corresponing actual type in any
8369         subsequent instantiation should be fully initialized.
8370         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
8371         to emit a warning if the actual for a generic type on which
8372         Needs_Initialized_Actual is set is not a fully initialized type.
8374 2014-05-21  Robert Dewar  <dewar@adacore.com>
8376         * sem_elab.adb, prj-dect.adb: Minor reformatting.
8378 2014-05-21  Robert Dewar  <dewar@adacore.com>
8380         * erroutc.ads: Minor comment addition.
8382 2014-05-21  Robert Dewar  <dewar@adacore.com>
8384         * errout.ads: Add documentation for use of >*> tag.
8385         * restrict.adb: Make sure we use >*> tag for restriction warnings.
8387 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
8389         * debug.adb: Add case of illegal overriding_indicator for a
8390         protected subprogram body to description of -gnatd.E switch.
8391         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
8392         for cases of giving overriding_indicators on protected subprogram
8393         bodies, but change this to a warning if -gnatd.E is enabled. No
8394         longer give a style warning about missing indicators on protected
8395         subprogram bodies.
8397 2014-05-21  Robert Dewar  <dewar@adacore.com>
8399         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
8400         sem_elab.ads: Minor reformatting.
8401         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
8402         parameter optional.
8404 2014-05-21  Pascal Obry  <obry@adacore.com>
8406         * prj-dect.adb: Allow package Install in aggregate project.
8408 2014-05-21  Robert Dewar  <dewar@adacore.com>
8410         * sem_ch13.adb (Analyze_Aspect_Specifications):
8411         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
8412         * sem_prag.adb: Minor comment improvements.
8414 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8416         * sem_ch12.adb (Install_Body): When checking whether freezing of
8417         instantiation must be delayed, verify that the common enclosing
8418         subprogram to generic and instance is in fact an overloadable
8419         entity.
8421 2014-05-21  Vincent Celier  <celier@adacore.com>
8423         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
8424         mains with the same name and fail if there is more than one.
8425         * prj.ads, prj.adb (Find_All_Sources): New function
8427 2014-05-21  Robert Dewar  <dewar@adacore.com>
8429         * sem_ch13.adb: Minor reformatting.
8430         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
8431         * sem_prag.adb: Minor error message improvement.
8433 2014-05-21  Yannick Moy  <moy@adacore.com>
8435         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
8436         (Enclosing_Subprogram_Or_Package): Only return a library-level
8437         package.
8439 2014-05-21  Javier Miranda  <miranda@adacore.com>
8441         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
8442         to the full view of the parent type when processing a derived type
8443         which is the full view of a private type not defined in a generic
8444         unit which is derived from a private type with discriminants
8445         whose full view is a non-tagged record type.
8447 2014-05-21  Javier Miranda  <miranda@adacore.com>
8449         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
8450         Complete previous patch.
8452 2014-05-21  Thomas Quinot  <quinot@adacore.com>
8454         PR ada/9535
8455         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
8456         Provide a behaviour more consistent with underlying datagram
8457         socket: do not attempt to loop over Send_Socket/Receive_Socket
8458         iterating along the buffer.
8460 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
8462         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
8463         or a tagged type is not labelled as volatile. Ensure that a
8464         non-volatile type has no volatile components.
8465         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
8466         Obj_Typ. Code reformatting.  Ensure that a discriminated or
8467         tagged object is not labelled as volatile.
8468         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
8469         pragma Volatile applies to a full type declaration or an object
8470         declaration when SPARK mode is on.
8472 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
8474         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
8475         providing options needed for compiling the argument source for
8476         the situation when a project file can be used as a tool parameter.
8478 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
8480         * gnat_rm.texi: Minor typo fix.
8482 2014-05-21  Robert Dewar  <dewar@adacore.com>
8484         * stand.adb (Tree_Read): Read missing entities.
8485         (Tree_Write): Write missing entities.
8487 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
8489         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
8490         section in gnatmetric chapter.
8492 2014-05-21  Robert Dewar  <dewar@adacore.com>
8494         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
8495         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
8496         post-call copy write back (see detailed comment in code).
8497         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
8498         Exp_Ch6.
8499         * tbuild.ads: Minor reformatting.
8501 2014-05-21  Robert Dewar  <dewar@adacore.com>
8503         * stand.ads: Add warning about adding new entities and
8504         Tree_Read/Tree_Write.
8506 2014-05-21  Robert Dewar  <dewar@adacore.com>
8508         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
8509         references to restricted entities within the units in which they
8510         are declared.
8512 2014-05-21  Robert Dewar  <dewar@adacore.com>
8514         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
8515         simplify the needed test, and also deal with failure to catch
8516         situations with non-standard names.
8517         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
8518         (Source_File_Is_Subunit): Removed, no longer used.
8520 2014-05-21  Javier Miranda  <miranda@adacore.com>
8522         * exp_ch4.adb
8523         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
8524         renaming of an access to interface object there is no need to
8525         generate extra code to reference the tag.
8527 2014-05-21  Robert Dewar  <dewar@adacore.com>
8529         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
8530         Warnings (Off, string).
8532 2014-05-21  Robert Dewar  <dewar@adacore.com>
8534         * osint.adb: Fix three error messages to say invalid instead
8535         of erroneous.
8536         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
8537         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
8538         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
8540 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8542         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
8543         sem_ch9.ads: Move discriminant manipulation routines for analysis of
8544         aspect specifications from sem_ch9 to sem_ch13, where they belong.
8546 2014-05-21  Robert Dewar  <dewar@adacore.com>
8548         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
8549         Clearly document -gnatyg (GNAT style switches).
8550         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
8551         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
8552         available for VMS after all.
8553         * warnsw.adb: Reorganize to eliminate duplicated code
8554         (Restore_Warnings): Add a couple of missing entries
8555         (Save_Warnings): Add a couple of missing entries.
8556         * warnsw.ads: Add missing entries to Warning_Record (not clear
8557         what the impact is).
8559 2014-05-21  Robert Dewar  <dewar@adacore.com>
8561         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
8562         warning) case.
8563         * errout.ads: Document ?*? (restriction warning) insertion.
8564         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
8565         warning) case.
8566         * erroutc.ads: Document use of * for restriction warning tag.
8567         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
8569 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8571         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
8572         make discriminants immediately visible when analyzing an aspect
8573         of a subtype declaration.
8574         (Uninstall_Discriminants): Do not apply to the entity in a
8575         subtype declaration.
8577 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8579         * sem_util.adb: Code clean up.
8581 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
8583         * gnat_ugn.texi: Document -Werror.
8585 2014-05-21  Bob Duff  <duff@adacore.com>
8587         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
8588         This was returning False if the Object is a constant view. Fix
8589         it to return True in that case, because it might be a view of
8590         a variable.
8591         (Has_Discriminant_Dependent_Constraint): Fix latent
8592         bug; this function was crashing when passed a discriminant.
8594 2014-05-21  Robert Dewar  <dewar@adacore.com>
8596         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
8597         * s-arit64.adb: Minor code reorganization.
8598         * sem_prag.adb: Minor comment fix (remove erroneous use of the
8599         term erroneous).
8601 2014-05-21  Robert Dewar  <dewar@adacore.com>
8603         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
8604         computing new table size.
8606 2014-05-21  Robert Dewar  <dewar@adacore.com>
8608         * einfo.ads: Minor reformatting.
8609         * ceinfo.adb: Deal with slight format change of einfo.ads.
8611 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8613         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
8614         implementation of the SPARK 2014 rule concerning private child
8615         units (LRM 7.2.6).
8617 2014-05-21  Vincent Celier  <celier@adacore.com>
8619         * makeusg.adb: Add switch -d to usage.
8621 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
8623         * sem_util.adb (Find_Actual): If an actual that is the prefix
8624         of an enclosing prefixed call has been rewritten, use Nkind
8625         and Sloc to identify the corresponding formal, when handling
8626         deferred references.
8628 2014-05-21  Robert Dewar  <dewar@adacore.com>
8630         * debug.adb: Document -gnatd.z switch.
8631         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
8633 2014-05-21  Robert Dewar  <dewar@adacore.com>
8635         * einfo.ads (Can_Never_Be_Null): Minor comment update.
8636         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
8637         error message change.
8638         * s-arit64.adb ("abs"): New function. Use expression functions
8639         for the simple conversions and arithmetic.
8641 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8643         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
8644         set function_start_locus.
8646 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8648         * utils.c (gnat_write_global_declarations): Adjust the flags put on
8649         dummy_global.
8651 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8653         * gcc-interface/decl.c (change_qualified_type): New static function.
8654         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
8655         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
8656         <E_Array_Subtype>: Likewise.
8657         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
8658         (gnat_to_gnu_component_type): Likewise.
8659         (gnat_to_gnu_param): Likewise.
8661 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8663         * fe.h (Set_Present_Expr): Move around.
8664         (End_Location): New macro.
8665         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
8667 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8669         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
8670         lieu of more verbose construct.
8671         * gcc-interface/trans.c (Call_to_gnu): Likewise.
8672         (gnat_to_gnu): Likewise.  Remove obsolete code.
8674 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
8676         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
8677         consider that regular packed arrays can never be superflat.
8679 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
8681         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
8682         annotation.
8683         * gcc-interface/decl.c (annotate_value): Adjust.
8684         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
8685         (push_range_check_info): Likewise.
8686         (Loop_Statement_to_gnu): Likewise.
8687         (Subprogram_Body_to_gnu): Likewise.
8688         (Compilation_Unit_to_gnu): Likewise.
8689         (start_stmt_group): Likewise.
8690         * gcc-interface/utils.c (init_gnat_utils): Likewise.
8691         (gnat_pushlevel): Likewise.
8692         (maybe_pad_type): Likewise.
8694 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
8696         * seh_init.c: Fix copyright year.
8698 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8700         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
8701         are defined.  Move include windows.h before system.h.
8702         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
8703         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
8705 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
8707         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
8708         to the appropriate type.
8709         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
8710         (pos_to_constructor): Likewise.
8712 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
8714         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
8716 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
8717             Mike Stump  <mikestump@comcast.net>
8718             Richard Sandiford  <rdsandiford@googlemail.com>
8720         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
8721         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
8722         (annotate_value): Use wide-int interfaces.
8723         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
8725 2014-04-28  Richard Henderson  <rth@redhat.com>
8727         * gcc-interface/Makefile.in: Support aarch64-linux.
8729 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
8731         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
8732         add 'Suffix' parameter and adjust comment.
8733         (Get_External_Name_With_Suffix): Delete.
8734         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
8735         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
8736         'Suffix' parameter.
8737         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
8738         Call Get_External_Name instead of Get_External_Name_With_Suffix.
8739         (Get_Secondary_DT_External_Name): Likewise.
8740         * exp_cg.adb (Write_Call_Info): Likewise.
8741         * exp_disp.adb (Export_DT): Likewise.
8742         (Import_DT): Likewise.
8743         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
8744         parameter with False default.
8745         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
8746         * types.h (Fat_Pointer): Rename into...
8747         (String_Pointer): ...this.  Add comment on interfacing rules.
8748         * fe.h (Compiler_Abort): Adjust for above renaming.
8749         (Error_Msg_N): Likewise.
8750         (Error_Msg_NE): Likewise.
8751         (Get_External_Name): Likewise.  Add third parameter.
8752         (Get_External_Name_With_Suffix): Delete.
8753         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
8754         (create_concat_name): Adjust call to Get_External_Name, remove call to
8755         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
8756         * gcc-interface/trans.c (post_error): Likewise.
8757         (post_error_ne): Likewise.
8758         * gcc-interface/misc.c (internal_error_function): Likewise.
8760 2014-04-28  Richard Biener  <rguenther@suse.de>
8762         PR middle-end/60092
8763         * gcc-interface/utils.c: Define flag_isoc11.
8765 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
8767         * gnatvsn.ads (Library_Version): Bump to 4.10.
8769 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
8771         Revert
8772         2014-04-22  Richard Henderson  <rth@redhat.com>
8774         * gcc-interface/Makefile.in: Support aarch64-linux.
8776         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8778         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8779         (Error_Msg_N): Likewise.
8780         (Error_Msg_NE): Likewise.
8781         (Get_External_Name_With_Suffix): Likewise.
8782         * types.h (Fat_Pointer): Delete.
8783         (String_Pointer): New type.
8784         (DECLARE_STRING_POINTER): New macro.
8785         * gcc-interface/decl.c (create_concat_name): Adjust.
8786         * gcc-interface/trans.c (post_error): Likewise.
8787         (post_error_ne): Likewise.
8788         * gcc-interface/misc.c (internal_error_function): Likewise.
8790 2014-04-22  Richard Henderson  <rth@redhat.com>
8792         * gcc-interface/Makefile.in: Support aarch64-linux.
8794         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
8795         (__gnat_alternate_stack): Enable for all linux except ia64.
8797 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
8799         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
8800         (Error_Msg_N): Likewise.
8801         (Error_Msg_NE): Likewise.
8802         (Get_External_Name_With_Suffix): Likewise.
8803         * types.h (Fat_Pointer): Delete.
8804         (String_Pointer): New type.
8805         (DECLARE_STRING_POINTER): New macro.
8806         * gcc-interface/decl.c (create_concat_name): Adjust.
8807         * gcc-interface/trans.c (post_error): Likewise.
8808         (post_error_ne): Likewise.
8809         * gcc-interface/misc.c (internal_error_function): Likewise.
8811 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8812             Pierre-Marie de Rodat  <derodat@adacore.com>
8814         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
8815         scalar constant instead of a reference for renaming of scalar literal.
8816         Do not create a new object for constant renaming except for a function
8817         call.  Make sure a VAR_DECL is created for the renaming pointer.
8818         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
8819         (fold_constant_decl_in_expr): New function.
8820         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
8821         For a constant renaming, try to fold a constant DECL in the result.
8822         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
8823         (Identifier_to_gnu): Reference the renamed object of constant renaming
8824         pointers directly.
8825         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
8826         invalidate constant renaming pointers.
8828 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8830         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
8831         (build_vector_type_for_size): New function.
8832         (build_vector_type_for_array): Likewise.
8833         (unchecked_convert): Build an intermediate vector type to convert
8834         from a generic array type to a vector type.
8835         (handle_vector_size_attribute): Reimplement.
8836         (handle_vector_type_attribute): Likewise.
8838 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8840         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
8841         Is_OK_Static_Expression in lieu of Is_Static_Expression to
8842         detect valid arguments.
8844 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
8846         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
8848 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
8850         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
8851         (components_to_record): Likewise.
8852         * gcc-interface/utils.c (make_aligning_type): Likewise.
8853         (maybe_pad_type): Likewise.
8854         (finish_record_type): Likewise.
8855         (rest_of_record_type_compilation): Likewise.
8857 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8859         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
8860         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
8861         for Ivdep hint.
8862         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
8863         hint for Loop_Optimize.
8864         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
8865         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8866         with new Ivdep hint.
8867         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
8868         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
8869         with new Ivdep hint.
8870         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
8872 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8873             Robert Dewar  <dewar@adacore.com>
8875         * opt.ads (Suppress_Back_Annotation): Remove as unused.
8876         * fe.h (Back_Annotate_Rep_Info): Likewise.
8877         (Global_Discard_Names): Likewise.
8878         (List_Representation_Info): Declare.
8879         * types.h (Uint_Minus_1): Likewise.
8880         * repinfo.ads: Document back-annotation change.
8881         * gcc-interface/gigi.h (init_gnat_decl): Declare.
8882         (destroy_gnat_decl): Likewise.
8883         * gcc-interface/decl.c (annotate_value): Do not create the cache of
8884         annotated values here but...
8885         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
8886         in ASIS mode.
8887         (init_gnat_decl): ...here instead.  New function.
8888         (destroy_gnat_decl): Likewise.
8889         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
8890         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
8892 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
8894         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
8895         offset for the field, if any.
8897 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
8898             Svante Signell  <svante.signell@gmail.com>
8900         PR ada/54040
8901         PR ada/59346
8902         * s-osinte-x32.adb: New file.
8903         * s-linux.ads (Time): New section.
8904         * s-linux-alpha.ads (Time): Likewise.
8905         * s-linux-android.ads (Time: Likewise.
8906         * s-linux-hppa.ads (Time): Likewise.
8907         * s-linux-mipsel.ads (Time): Likewise.
8908         * s-linux-sparc.ads (Time): Likewise.
8909         * s-linux-x32.ads (Time): Likewise.
8910         * s-osprim-x32.ads (timespec): Adjust.
8911         (Clock): Likewise.
8912         (To_Timespec): Likewise.
8913         * s-osinte-linux.ads (Time): Define local subtypes for those defined
8914         in System.Linux.
8915         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
8916         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
8917         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
8918         * s-osinte-solaris-posix.ads (timespec): Likewise.
8919         * s-osinte-posix.adb (To_Timespec): Likewise.
8920         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
8922 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
8924         PR ada/60411
8925         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
8926         * s-linux-android.ads: New file.
8927         * s-intman-android.adb: Likewise.
8928         * s-osinte-android.ads: Adjust.
8929         * sigtramp-armdroid.c: Likewise.
8930         * sigtramp.h: Add Android support.
8932 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
8934         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
8936 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
8938         PR ada/60703
8939         * system-linux-alpha.ads: Adjust for Ada 2005.
8940         * system-linux-mips.ads: Likewise.
8941         * system-linux-mips64el.ads: Likewise.
8942         * system-linux-mipsel.ads: Likewise.
8943         * system-linux-s390.ads: Likewise.
8944         * system-linux-s390x.ads: Likewise.
8945         * system-linux-sparc.ads: Likewise.
8946         * system-linux-sparcv9.ads: Likewise.
8947         * system-rtems.ads: Likewise.
8948         * system-vxworks-arm.ads: Likewise.
8950 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
8952         PR ada/39172
8953         * gcc-interface/Makefile.in (target_cpu_default): Revert
8954         2013-10-11 change.
8956 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
8958         PR ada/51483
8959         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
8960         it to set the RM size.  Use directly 'size' for the Esize.
8961         (Create_Back_End_Float_Types): Adjust call to above.
8962         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
8963         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
8964         (Write_Target_Dependent_Values): Adjust comment.
8965         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
8966         deal with it.
8967         (Write_Target_Dependent_Values): Write the precision in lieu of size.
8968         (Initialization): Read the precision in lieu of size and compute the
8969         size from the precision and the alignment.
8970         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
8971         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
8972         types for vector modes, pass the size in addition to the precision.
8974 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
8976         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
8978 2014-03-07  Doug Rupp  <rupp@adacore.com>
8980         PR ada/60411
8981         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
8982         (Support_64_Bit_Divides): Removed, no longer used.
8983         (ZCX_By_Default): Enabled.
8985 2014-02-25  Doug Rupp  <rupp@adacore.com>
8987         * gcc-interface/Makefile.in (arm-linux):
8988         (EH_MECHANISM): Use ARM unwinder (-arm)
8989         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
8990         s-excmac-arm.ads.
8991         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
8992         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
8993         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
8994         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
8995         Add dependencies for sigtramp-armvxw.o.
8997 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
8999         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
9001 2014-02-25  Robert Dewar  <dewar@adacore.com>
9003         * rtsfind.adb (Is_RTE): Protect against entity with no scope
9004         field (previously this call blew up on the Standard entity).
9005         * sem_attr.adb (Analyze_Attribute, case Access): Remove
9006         test for No_Abort_Statements, this is now handled in
9007         Set_Entity_With_Checks.
9008         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
9009         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
9010         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
9011         Set_Entity_With_Checks.
9012         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
9013         Add checks for No_Abort_Statements.
9015 2014-02-25  Robert Dewar  <dewar@adacore.com>
9017         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
9018         Check_Restriction is OK.
9020 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9022         * sem_ch3.adb (Process_Full_View): Better error message when
9023         the full view of  a private type without discriminants is an
9024         unconstrained type.
9025         * sem_ch7.adb (Uninstall_Declarations): Ditto.
9027 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9029         * sigtramp-armvxw.c: Also restore r0.
9031 2014-02-25  Robert Dewar  <dewar@adacore.com>
9033         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
9034         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
9035         set unconditionally.
9036         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
9037         any more (Output_Msg_Text): Rewritten with new convention on
9038         output of warnings that are treated as errors.
9039         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
9040         if Warn is False.
9041         * gnat_rm.texi: Updates to documentation on pragma
9042         Warning_As_Error.
9043         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
9044         set Warning_Doc_Switch.
9045         * lib-writ.ads: Add documentation note on ALI file generation
9046         for C.
9047         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
9048         (belongs in Sem).
9049         * sem_attr.adb (Resolve_Attribute, case Access):
9050         Abort_Task'Access violates the No_Abort_Statements restriction.
9051         * sem_res.adb (Resolve_Call): Check restriction
9052         No_Abort_Statements for call to Abort_Task or a renaming of it.
9054 2014-02-25  Robert Dewar  <dewar@adacore.com>
9056         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
9057         type name as index.
9058         * lib.ads: Minor reformatting.
9059         * einfo.ads: Minor reformatting.
9061 2014-02-25  Doug Rupp  <rupp@adacore.com>
9063         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
9064         use Short_Descriptor(S) as the argument passing mechanism.
9066 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9068         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
9070 2014-02-25  Robert Dewar  <dewar@adacore.com>
9072         * atree.ads (Warnings_Treated_As_Errors): New variable.
9073         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
9074         error object (Initialize): Initialize Warnings_As_Errors_Count
9075         (Write_Error_Summary): Include count of warnings treated as errors.
9076         * erroutc.adb (Warning_Treated_As_Error): New function.
9077         (Matches): Function moved to outer level of package.
9078         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
9079         (Warning_Treated_As_Error): New function.
9080         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
9081         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
9082         * opt.ads (Config_Switches_Type): Add entry for
9083         Warnings_As_Errors_Count.
9084         (Warnings_As_Errors_Count): New variable.
9085         (Warnings_As_Errors): New array.
9086         * par-prag.adb: Add dummy entry for Warning_As_Error.
9087         * sem_prag.adb (Analyze_Pragma): Implement new pragma
9088         Warning_As_Error.
9089         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
9091 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9093         * sigtramp.h: Fix minor inaccuracy.
9095 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
9097         * gnat_ugn.texi: Added description of kill command.
9099 2014-02-25  Robert Dewar  <dewar@adacore.com>
9101         * gnat_rm.texi (Address_Clauses): Add a section discussing the
9102         problem of address clauses causing unexpected initialization,
9103         including the effect of Initialize_Scalars.
9105 2014-02-25  Robert Dewar  <dewar@adacore.com>
9107         * errout.adb: Various changes for better msgs for anonmous access
9108         subprogram types.
9109         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
9110         argument.
9111         (Buffer_Remove): Version with character argument.
9112         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
9113         of mismatching conventions for access-to-subprogram case.
9114         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
9115         access types in record.
9116         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
9117         types, including in records.
9119 2014-02-25  Doug Rupp  <rupp@adacore.com>
9121         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
9122         enhancements and corrections.
9124 2014-02-25  Robert Dewar  <dewar@adacore.com>
9126         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
9128 2014-02-25  Robert Dewar  <dewar@adacore.com>
9130         * gnat_rm.texi: First set of documentation additions for
9131         predefined RM units.
9132         * checks.adb: Minor reformatting.
9133         * sem_elab.adb (Check_Task_Activation): Minor fix to error
9134         message.
9135         * sem_util.adb: Minor reformatting.
9137 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
9139         * usage.adb (Usage): Add help on -gnateC.
9140         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
9141         * opt.ads (Generate_CodePeer_Messages): New flag.
9142         * gnat_ugn.texi: Document new switch -gnateC.
9144 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
9146         * gnat_rm.texi: Corrected minor typos in Implementation Defined
9147         Aspects.
9148         * opt.ads: Minor reformatting.
9150 2014-02-25  Robert Dewar  <dewar@adacore.com>
9152         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
9153         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
9154         of -gnatel/-gnateL.
9155         * opt.ads (Warn_Info_Messages): New flag.
9156         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
9157         messages.
9158         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
9159         messages.
9160         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
9161         * usage.adb: Add documentation of -gnatel/-gnateL Update
9162         documentation of -gnatwl/-gnatwL.
9163         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
9164         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
9166 2014-02-25  Robert Dewar  <dewar@adacore.com>
9168         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
9169         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
9170         * interfac.ads: Minor code reorganization (add pragma
9171         Compiler_Unit_Warning).
9172         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
9173         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
9174         Has_Shift_Operator flag.
9175         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
9176         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
9177         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
9178         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
9179         Add entry for Name_Amount.
9180         * checks.adb (Selected_Range_Checks): When checking for a null
9181         range, make sure we use the base type, and not the subtype for
9182         deciding a range is null.
9183         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
9184         for suspicious loop bound which is outside the range of the
9185         loop subtype.
9186         * gnat_ugn.texi: Add documentation section "Determining the
9187         Chosen Elaboration Order"
9188         * sem_ch13.adb (UC_Entry): Add field Act_Unit
9189         (Validate_Unchecked_Conversion): Store Act_Unit
9190         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
9191         * treepr.adb: Minor reformatting.
9193 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
9195         * usage.adb: Minor: fix typo.
9197 2014-02-25  Robert Dewar  <dewar@adacore.com>
9199         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
9200         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
9201         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
9202         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
9203         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
9204         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
9205         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
9206         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
9207         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
9208         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
9209         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
9210         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
9211         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
9212         Compiler_Unit_Warning, change Compiler_Unit everywhere to
9213         Compiler_Unit_Warning.
9215 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
9217         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
9218         in ASIS mode aggregates that are used as aspect definitions.
9220 2014-02-25  Robert Dewar  <dewar@adacore.com>
9222         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
9223         reformatting.
9225 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9227         * freeze.adb (Freeze_Entity): If the return type of a function
9228         is a limited view, and the non-limited view has not been seen yet,
9229         defer freezing to some later point.
9231 2014-02-25  Robert Dewar  <dewar@adacore.com>
9233         * sem_ch3.adb: Minor reformatting.
9235 2014-02-25  Robert Dewar  <dewar@adacore.com>
9237         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
9238         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
9239         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
9240         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
9241         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
9242         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
9243         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
9244         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
9245         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
9246         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
9247         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
9248         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
9249         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
9250         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
9251         snames.ads-tmpl: Change Compiler_Unit everywhere to
9252         Compiler_Unit_Warning.
9254 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
9256         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
9257         (Collect_Body_Postconditions_In_Decls): New routine.
9258         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
9259         postcondition aspects or pragmas that appear on a subprogram
9260         body stub.
9261         (Collect_Spec_Preconditions): Factor out code. Handle
9262         precondition aspects or pragmas that appear on a subprogram
9263         body stub.
9264         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
9265         aspects that apply to a subprogram body stub is no longer delayed,
9266         the aspects are analyzed on the spot.
9267         (SPARK_Aspect_Error):
9268         Aspects that apply to a subprogram declaration cannot appear in
9269         a subunit.
9270         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
9271         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
9272         is now a local variable. Code cleanup. Analysis related to
9273         the aspects of a subprogram body stub is now carried out by
9274         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
9275         and/or pragmas of a subprogram body stub to the proper body
9276         as this is no longer needed. Do not analyze the aspects of a
9277         subprogram stub when the corresponding source unit is missing.
9278         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
9279         on a stub.
9280         (Analyze_Task_Body_Stub): Flag the illegal use of
9281         aspects on a stub.
9282         (Optional_Subunit): Add local variable Unum.
9283         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
9284         pragma when it applies to a subprogram body stub.
9285         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
9286         Depends and Global can now apply to a subprogram body stub as
9287         long as it acts as its own spec.
9288         (Analyze_Refined_Pragma):
9289         Code reformatting. Refinement pragmas cannot apply to a subunit.
9291 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
9293         * einfo.ads Update the usage of flag
9294         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
9295         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
9296         now starts with the letter 'C'. This makes reading expanded
9297         code easier.
9298         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
9299         Iter_Loop. Signal that an Ada 2012 iterator loop requires
9300         secondary stack management when creating a transient scope for
9301         an element reference.
9302         * exp_util.adb (Process_Statements_For_Controlled_Objects):
9303         When wrapping the statements of a loop, pass the E_Loop entity
9304         to the wrapping machinery.
9305         (Wrap_Statements_In_Block): Add
9306         formal parameter Scop along with comment on usage. Add local
9307         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
9308         block as requiring secondary stack management when the block is
9309         created inside an Ada 2012 iterator loop. This ensures that any
9310         reference objects are reclaimed on each iteration of the loop.
9311         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
9312         tasked with the handling of container iterators as requiring
9313         secondary stack management. This ensures that iterators are
9314         reclaimed when the loop terminates or is exited in any fashion.
9315         * sem_util.adb (Add_Block_Identifier): New routine.
9316         (Find_Enclosing_Iterator_Loop): New routine.
9317         * sem_util.ads (Add_Block_Identifier): New routine.
9318         (Find_Enclosing_Iterator_Loop): New routine.
9320 2014-02-25  Robert Dewar  <dewar@adacore.com>
9322         * sinfo.ads: Minor reformatting.
9324 2014-02-25  Tristan Gingold  <gingold@adacore.com>
9326         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
9328 2014-02-25  Pascal Obry  <obry@adacore.com>
9330         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
9332 2014-02-25  Tristan Gingold  <gingold@adacore.com>
9334         * sem_ch10.adb: Minor comment fix.
9336 2014-02-25  Bob Duff  <duff@adacore.com>
9338         * s-tasdeb.adb: Misc cleanup of this package,
9339         including printing addresses in hexadecimal.
9340         (Write): Fix minor bug when taking 'Address of an empty string.
9342 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9344         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
9345         public child unit when it does not refer to the abstract state
9346         of a public ancestor.
9348 2014-02-25  Yannick Moy  <moy@adacore.com>
9350         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
9351         Validity_Checks in GNATprove and CodePeer modes.
9353 2014-02-25  Pascal Obry  <obry@adacore.com>
9355         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
9356         Artifacts attribute.
9358 2014-02-25  Yannick Moy  <moy@adacore.com>
9360         * sem_prag.adb: Minor reformatting to get consistent messages.
9362 2014-02-25  Robert Dewar  <dewar@adacore.com>
9364         * checks.adb: Minor reformatting.
9365         * sinfo.ads (Do_Range_Check): Document that this flag is never
9366         passed to the back end.
9368 2014-02-25  Yannick Moy  <moy@adacore.com>
9370         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
9371         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
9373 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
9375         * sem_res.adb (Appears_In_Check): New routine.
9376         (Resolve_Entity_Name): Remove local variables Prev and
9377         Usage_OK. Par is now a constant. Remove the parent chain traversal
9378         as the placement of a volatile object with enabled property
9379         Async_Writers and/or Effective_Reads must appear immediately
9380         within a legal construct.
9382 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
9384         * checks.adb (Apply_Selected_Range_Checks):
9385         Alphabetize local constants and variables. Add comments.
9386         Always insert a range check that requires runtime evaluation into
9387         the tree.
9389 2014-02-25  Robert Dewar  <dewar@adacore.com>
9391         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
9393 2014-02-25  Bob Duff  <duff@adacore.com>
9395         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
9396         iterations while waiting for independent tasks to terminate;
9397         if an independent task does not terminate, we do not want to
9398         hang here. In that case, the thread will be terminated when the
9399         process exits.
9400         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
9402 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9404         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
9405         used to perform pre-analysis of the expression for SPARK
9406         aspects that have a non-standard syntax, such as GLobal and
9407         Initializes. The procedure applies to the original expression
9408         in an aspect specification, prior to the analysis of the
9409         corresponding pragma, in order to provide semantic information
9410         for ASIS navigation purposes.
9411         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
9412         Call new subprogram.
9414 2014-02-25  Yannick Moy  <moy@adacore.com>
9416         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
9418 2014-02-25  Doug Rupp  <rupp@adacore.com>
9420         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
9421         (__gnat_adjust_context_for_raise): Bump the PC by 2.
9423 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9425         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
9426         misplaced IS, add a statement sequence to improper body only if
9427         one has not been parsed already.
9429 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9431         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
9432         mismatch when multidimensional array is updated with a single
9433         index.
9435 2014-02-25  Yannick Moy  <moy@adacore.com>
9437         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
9438         sem_ch6.adb: Mark most references to SPARK RM in error messages
9439         for removal.
9441 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9443         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
9444         appears in a list of basic declarations, complete the tree with
9445         an empty statement list, to prevent cascaded errors and crashes
9446         if semantic analysis is attempted.
9448 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9450         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
9451         value.
9452         * erroutc.adb: Minor reformatting.
9454 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9456         * sem_prag.adb (Check_Clause_Syntax): Account
9457         for a solitary input item in a dependency list.
9459 2014-02-24  Yannick Moy  <moy@adacore.com>
9461         * gnat1drv.adb (Adjust_Global_Switches): Do not
9462         use validity checks at all in GNATprove_Mode.
9464 2014-02-24  Robert Dewar  <dewar@adacore.com>
9466         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
9467         atree.adb, atree.ads: Minor reformatting.
9469 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9471         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
9472         global and dependence refinement when SPARK_Mode is off.
9473         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
9474         state refinement when SPARK_Mode is off.
9475         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
9476         variable Decl. Insert the generated pragma for Refined_State
9477         after a potential pragma SPARK_Mode.
9478         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
9479         constant Deps. Remove local variable Expr. Check the syntax
9480         of pragma Depends when SPARK_Mode is off. Factor out the
9481         processing for extra parenthesis around individual clauses.
9482         (Analyze_Global_In_Decl_List): Items is now a constant. Check
9483         the syntax of pragma Global when SPARK_Mode is off.
9484         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
9485         Initializes when SPARK_Mode is off.
9486         (Analyze_Part_Of): Check
9487         the syntax of the encapsulating state when SPARK_Mode is off.
9488         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
9489         SPARK_Mode is off. Move the declaration order check with respect
9490         to pragma Initializes to the end of the processing. Do not verify
9491         the declaration order for pragma Initial_Condition when SPARK_Mode
9492         is off. Do not complain about a useless package refinement when
9493         SPARK_Mode is off.
9494         (Analyze_Refined_Depends_In_Decl_Part): Refs
9495         is now a constant. Check the syntax of pragma Refined_Depends
9496         when SPARK_Mode is off.
9497         (Analyze_Refined_Global_In_Decl_Part):
9498         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
9499         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
9500         Refined_State when SPARK_Mode is off.
9501         (Check_Dependence_List_Syntax): New routine.
9502         (Check_Global_List_Syntax): New routine.
9503         (Check_Initialization_List_Syntax): New routine.
9504         (Check_Item_Syntax): New routine.
9505         (Check_State_Declaration_Syntax): New routine.
9506         (Check_Refinement_List_Syntax): New routine.
9507         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
9509 2014-02-24  Robert Dewar  <dewar@adacore.com>
9511         * a-tags.adb, s-os_lib.adb: Minor reformatting.
9513 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9515         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
9516         strerror message, not just numeric errno value.
9518 2014-02-24  Doug Rupp  <rupp@adacore.com>
9520         * raise-gcc.c (exception_class_eq): Make endian neutral.
9522 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9524         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
9525         flag, and reset Etype and Analyzed attributes unconditionally
9526         when copying a tree that may be partly analyzed.
9527         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
9528         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
9529         within a subprogram body and applies to it, remove it from the
9530         body before making a copy of it, to prevent spurious errors when
9531         analyzing the copied body.
9533 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9535         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
9536         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
9537         vxWorks.h has been included.  Also ensure that file attributes
9538         related definitions are output even in cases where socket support
9539         is not enabled.
9540         * a-tags.adb: Code clean up.
9541         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
9542         instead of -I to add the main ada source directory to the header
9543         search path, in order to avoid conflict between our own "types.h"
9544         and VxWork's <types.h>.
9546 2014-02-24  Robert Dewar  <dewar@adacore.com>
9548         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
9549         * debug.adb: Remove documentation of -gnatd.X, no longer used.
9550         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
9552 2014-02-24  Bob Duff  <duff@adacore.com>
9554         * gnat_ugn.texi: Improve documentation of gnatpp.
9556 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9558         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
9559         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
9560         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
9561         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
9562         a chars_ptr, because on Windows this is a renaming of
9563         Socket_Error_Message.
9565 2014-02-24  Robert Dewar  <dewar@adacore.com>
9567         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
9568         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
9569         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
9570         reorganization.
9572 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9574         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
9575         that the source directory containing s-oscons-tmplt.c is on the
9576         include path, so that all internal header files are available.
9578 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9580         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
9581         domain of iteration is an attribute reference 'Old, this is an
9582         Ada 2012 iterator and the loop must be rewritten as such.
9584 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9586         * s-fileio.adb (Errno_Message): Remove, use shared version from
9587         s-os_lib instead.
9588         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
9589         * g-stseme (Socket_Error_Message): Reimplement in terms of new
9590         s-os_lib function.
9591         * g-socthi.ads, g-socthi.adb: Change profile of
9592         Socket_Error_Message to return String to allow the above.
9593         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
9594         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
9595         * g-socthi-vxworks.ads: Update to account for the above profile
9596         change.
9597         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
9598         * s-crtl.ads (strncpy): New procedure.
9599         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
9600         Use import from s-crtl.
9601         * a-envvar.adb, osint.adb: Use imports of C runtime functions
9602         from s-crtl instead of re-importing locally.
9604 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9606         * sem_prag.adb (Analyze_Global_Item): Emit the
9607         variable related checks concerning volatile objects only when
9608         SPARK_Mode is on.
9610 2014-02-24  Robert Dewar  <dewar@adacore.com>
9612         * sem_ch5.adb (Analyze_Iterator_Specification): use
9613         Error_Msg_Ada_2012_Feature.
9615 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
9617         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
9618         No_Local_Timing_Events and No_Specific_Termination_Handlers
9619         must be set, according to the Ravenscar profile definition
9620         in D.13(6/3).
9622 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9624         * sem_ch6.adb (Analyze_Expression_Function): If this is a
9625         completion, freeze return type and its designated type if needed.
9627 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9629         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9630         'Address): When moving initialization statements to a freeze
9631         entity, keep them under a single node (i.e. do not unwrap
9632         expressions with actions), and set the Initialization_Statements
9633         attribute again so that processing of a later pragma Import can
9634         still remove them.
9636 2014-02-24  Claire Dross  <dross@adacore.com>
9638         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
9639         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
9640         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
9641         Left/Right to First_To_Previous/Current_To_Last.
9643 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9645         * adaint.h (struct file_attributes): New component "error"
9646         (__gnat_error_attributes): Accessor for the above.
9647         * adaint.c (__gnat_error_attributes): New subprogram
9648         (__gnat_stat): Fix returned value (expect errno value)
9649         (__gnat_stat_to_attr): Add management of error component (set to
9650         stat errno value, except for missing files where it is set to 0,
9651         and exists is set to 0).
9652         * osint.ads (File_Attributes_Size): Update per change above,
9653         also clarify documentation.
9654         * s-filatt.ads: New file, binding to file attributes related
9655         functions.
9656         * Makefile.rtl (s-filatt): New runtime unit.
9657         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
9658         to library function if not available on target).
9659         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
9660         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
9661         SIZEOF_struct_dirent_alloc): New constants.
9662         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
9663         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
9664         Perform appropriate error checking if stat fails (do not just
9665         ignore existing files if stat fails)
9666         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
9667         dependencies.
9669 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9671         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
9672         the use of volatile objects as global items in a function to
9673         the variable related checks section.
9674         * sem_util.adb (Async_Readers_Enabled): Directly call
9675         Has_Enabled_Property.
9676         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
9677         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
9678         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
9679         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
9680         Update the comment on usage. State_Has_Enabled_Property how handles
9681         the original logic of the routine. Add processing for variables.
9682         (State_Has_Enabled_Property): New routine.
9683         (Variable_Has_Enabled_Property): New routine.
9685 2014-02-24  Robert Dewar  <dewar@adacore.com>
9687         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
9688         Minor reformatting.
9689         * atree.ads, atree.adb (Node35): New function.
9690         (Set_Node35): New procedure.
9691         * debug.adb: Define new debug flag -gnatd.X.
9692         * einfo.ads, einfo.adb (Import_Pragma): New field.
9693         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
9694         really active yet, has to be activated with -gnatd.X.
9695         * sem_prag.adb (Set_Imported): Set new Import_Pragma
9696         field (Set_Imported): Don't set Is_Public (see
9697         Freeze.Wrap_Imported_Subprogram)
9698         * par-ch3.adb (P_Component_List): Handle unexpected null component.
9700 2014-02-24  Yannick Moy  <moy@adacore.com>
9702         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
9703         * gnat_rm.texi: Correct documentation of attribute Update.
9705 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9707         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
9708         iterator in older versions of Ada.
9710 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
9712         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
9713         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
9715 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9717         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
9718         indexed_components that are instances of Ada 2012 container
9719         indexing operations. Analysis and resolution of such nodes
9720         is performed on the attribute, and the original source is
9721         preserved for ASIS operations. If expansion is enabled, the
9722         indexed component is replaced by the value of this attribute,
9723         which is in a call to an Indexing aspect, in most case wrapped
9724         in a dereference operation.
9725         * sem_ch4.adb (Analyze_Indexed_Component): Create
9726         Generalized_Indexing attribute when appropriate.
9727         (Analyze_Call): If prefix is not overloadable and has an indexing
9728         aspect, transform into an indexed component so it can be analyzed
9729         as a potential container indexing.
9730         (Analyze_Expression): If node is an indexed component with a
9731         Generalized_ Indexing, do not re-analyze.
9732         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
9733         of an indexed_component that has been transformed into a container
9734         indexing operation.
9735         (Resolve_Indexed_Component): Call the above when required.
9736         (Resolve): Do not insert an explicit dereference operation on
9737         an indexed_component whose type has an implicit dereference:
9738         the operation is inserted when resolving the related
9739         Generalized_Indexing.
9741 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
9743         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
9744         Environment.
9746 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9748         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
9749         error messages.
9750         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
9751         Merge the expected and available mode errors.
9752         (Report_Unused_Constituents): Remove leading spaces in error messages.
9753         (Report_Unused_States): Remove leading spaces in error messages.
9755 2014-02-24  Thomas Quinot  <quinot@adacore.com>
9757         * par_sco.adb (Traverse_One): Refine categorization of statement
9758         SCOs.
9760 2014-02-24  Robert Dewar  <dewar@adacore.com>
9762         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
9763         Pure_05, Pure_12 and Preelaborate_05.
9764         * gnat_rm.texi: Update accordingly.
9765         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
9766         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
9767         Recognize one argument form of these pragmas only in GNAT mode
9768         (-gnatg).
9770 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9772         * s-dimmks.ads: Replace symbol for temperature, previously the
9773         Greek letter Theta, by the ASCII @ sign.
9774         * s-diflio.ads: ditto.
9776 2014-02-24  Robert Dewar  <dewar@adacore.com>
9778         * exp_ch4.adb: Minor code reorganization (use OR for boolean
9779         variables).
9780         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
9782 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
9784         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
9785         so that references to gnatmem and ASIS tools do not appear in the FSF
9786         edition of the GNAT User's Guide.
9788 2014-02-24  Yannick Moy  <moy@adacore.com>
9790         * freeze.adb (Freeze_Entity): Do not issue warning
9791         for pre/post being ignored on imported subprogram in GNATprove
9792         mode.
9794 2014-02-24  Robert Dewar  <dewar@adacore.com>
9796         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
9797         stand.ads, sem_eval.adb: Minor reformatting.
9799 2014-02-24  Yannick Moy  <moy@adacore.com>
9801         * sem_prag.adb: Minor rewording in error message.
9803 2014-02-24  Johannes Kanig  <kanig@adacore.com>
9805         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
9806         GNATprove_mode, gnat2why doesn't need nor use these types.
9808 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
9810         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
9811         target, in the case of signed integer exponentiation that uses a
9812         run-time routine, always select the Exp_* versions, since overflow
9813         checking is automatically done by AAMP arithmetic instructions.
9815 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9817         * sem_ch13.adb (Analyze_Aspect_Specifications):
9818         When the related context is a package instace, insert pragma
9819         Abstract_State after all internally-generated renamings related
9820         to the instance "header".
9822 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
9824         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
9825         subprograms.
9826         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
9827         call to an abstract subprogram is legal if it appears in a
9828         pre/postcondition of another abstract operation.
9830 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
9832         * gnat_ugn.texi: Misc updates.
9834 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
9836         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
9838 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
9840         * layout.adb (Layout_Variant_Record): Instantiate
9841         Generic_Check_Choices and call Check_Choices before calling
9842         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
9843         set to prevent generating incorrect discriminant-checking
9844         functions for 'others' variants (functions that unconditionally
9845         return True rather than accounting for the values covered by the
9846         'others' choice).
9847         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
9848         Formal_Derived_Matching.
9849         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
9850         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
9851         Formal_Derived_Matching formal to Subtypes_Statically_Match.
9852         (Subtypes_Statically_Match): Suppress the Object_Size matching
9853         test in the case where Formal_Derived_Matching is True.
9854         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
9855         True for Formal_Derived_Matching_Formal on the call to
9856         Subtypes_Statically_Compatible.
9858 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
9860         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
9862 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
9864         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
9865         Look through a conversion between original and packable version to get
9866         the base object.
9867         (build_component_ref): Rework comment and fix formatting.
9869 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
9871         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
9872         project-specific options.
9874 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9876         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
9877         not Constraint_Error.
9878         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
9879         * sem_ch5.adb: Code clean up.
9881 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9883         * sem_prag.adb (Usage_Error): Remove local
9884         constant Typ. Remove the specialized diagnostics for unconstrained
9885         or tagged items as those are not part of the explicit input set
9886         of the related subprogram and should not be flagged.
9888 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9890         * sem_attr.adb: Add guard to preserve all errors.
9892 2014-02-20  Vincent Celier  <celier@adacore.com>
9894         * switch-m.adb (Normalize_Compiler_Switches): Take into account
9895         switches that are recorded in ALI files: -gnateA, -gnateE,
9896         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
9898 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9900         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
9901         of an element iterator form over a formal container with an
9902         Iterable aspect.
9903         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
9904         to create declaration and loop statements for both forms of
9905         container iterators.
9906         (Expand_Formal_Container_Element_Iterator): New procedure
9907         to handle loops of the form  "for E of C" when C is a formal
9908         container.
9909         (Expand_Formal_Container_Iterator): Code cleanup.
9911 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
9913         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
9914         (Analyze_Contract_Case): Remove the use of
9915         "may". Replace "aspect Contract_Cases" to avoid categorization
9916         of aspect vs pragma.
9917         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
9918         (Analyze_Global_Item): Remove
9919         the use of "formal", specify the subprogram.  Split the
9920         error message about a state with visible refinement into
9921         two. Remove the use of "global" from "volatile global item".
9922         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
9923         is on one line.
9924         (Analyze_Input_Output): Update the call to
9925         Check_Mode. Specify the duplicated item. Reword the error
9926         message concerning an input of a null output list. Use "\"
9927         for error message continuation.
9928         (Analyze_Part_Of): Remove
9929         the use of "may". Use "\" for error message continuation.
9930         (Analyze_Refined_Depends_In_Decl_Part): Update the error
9931         message concerning a useless refinement to match the format
9932         of Refined_Global.
9933         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
9934         concerning a useless refinement.
9935         (Analyze_Refinement_Clause): Use "\" for error message continuation.
9936         (Check_Constituent_Usage): Use "\" for error message continuation.
9937         (Check_Dependency_Clause): Use "\" for error message continuation.
9938         (Check_Matching_Constituent): Use "\" for error message continuation.
9939         (Check_Missing_Part_Of): Use "\" for error message continuation.
9940         (Check_Mode): Renamed to
9941         Check_Role. Update the comment on usage. Redo the error reporting
9942         to use Role_Error.
9943         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
9944         message continuation.
9945         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
9946         with comment on usage. Update all occurrences of Is_Input and Is_Output.
9947         (Inconsistent_Mode_Error): Use "\" for error message continuation.
9948         (Input_Match): Use "\" for error message continuation.
9949         (Role_Error): New routine.
9950         (Set_Convention_From_Pragma): Use "\" for error message continuation.
9951         (Usage_Error): Add local variable Error_Msg. Build specialized error
9952         message showcasing the offending item kind. Redo the diagnostics for
9953         unconstrained types.
9955 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9957         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
9958         to determine whether a type is a container type, rather than
9959         examining only its type declaration, so that subtypes and derived
9960         types are handled properly.
9962 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
9964         * gnat_ugn.texi: gnatmetric: add description of project-specific
9965         options.
9967 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9969         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
9970         all choices in an association for a record type have the same
9971         type, as is done for record aggregates.
9973 2014-02-20  Robert Dewar  <dewar@adacore.com>
9975         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
9976         Unmodified rather than Warnings (Off). Make comments
9977         uniform in the four affected units.
9979 2014-02-20  Robert Dewar  <dewar@adacore.com>
9981         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
9982         Object_Size): For non-scalar types allow any value that is a
9983         multiple of 8.
9984         * gnat_rm.texi: Document Object_Size for composites more clearly.
9986 2014-02-20  Yannick Moy  <moy@adacore.com>
9988         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
9990 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
9992         * stand.ads: Raise_Type: new predefined entity, used as the type
9993         of a Raise_Expression prior to resolution.
9994         * cstand.adb: Build entity for Raise_Type.
9995         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
9996         initial type of the node.
9997         * sem_type.adb (Covers): Raise_Type is compatible with all
9998         other types.
9999         * sem_res.adb (Resolve): Remove special handling of Any_Type on
10000         Raise_Expression nodes.
10001         (Resolve_Raise_Expression): Signal ambiguity if the type of the
10002         context is still Raise_Type.
10004 2014-02-20  Robert Dewar  <dewar@adacore.com>
10006         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
10007         mismatching predicates.
10008         * sem_ch6.adb (Check_Conformance): Give better messages on
10009         predicate mismatch.
10010         * sem_eval.adb (Predicates_Match): Move to spec.
10011         * sem_eval.ads (Predicates_Match): Moved here from body.
10013 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10015         * a-cbmutr.adb: Use default value in Insert_Child.
10017 2014-02-20  Vincent Celier  <celier@adacore.com>
10019         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
10020         Stringt.Initialize in all project aware tools.
10022 2014-02-20  Doug Rupp  <rupp@adacore.com>
10024         * gnat_ugn.texi: Document gnatbind -X option.
10025         * vms_data.ads: Minor warnings documentation reformatting.
10027 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10029         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
10030         procedure for a base type.
10032 2014-02-20  Robert Dewar  <dewar@adacore.com>
10034         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
10035         expression with type info.
10036         * sem_ch13.adb: Minor reformatting.
10037         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
10038         False if predicates do not match on the two types.
10040 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
10042         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
10043         In Relaxed_RM_Semantics mode, allow any static integer value,
10044         for compatibility with other compilers.
10046 2014-02-20  Vincent Celier  <celier@adacore.com>
10048         * errutil.adb (Initialize): Properly initialize entry in table
10049         Warnings when warnings are suppressed.
10051 2014-02-20  Robert Dewar  <dewar@adacore.com>
10053         * s-os_lib.ads: Add warning about non-portability of Rename_File.
10054         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
10055         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
10056         * gnat_ugn.texi: Document no warnings on junk variable names.
10057         * layout.adb: Minor code reorganization (use Ekind_In).
10058         * stringt.adb: Move initialization of Null_String_Id to Initialize
10059         routine.
10061 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10063         * sem_ch13.adb: Initialize optional Element_Id.
10065 2014-02-20  Robert Dewar  <dewar@adacore.com>
10067         * s-os_lib.ads (Rename_File): Minor commment addition.
10069 2014-02-20  Thomas Quinot  <quinot@adacore.com>
10071         * einfo.ads: Minor reformatting.
10073 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10075         * aspects.adb (Exchange_Aspects): New routine.
10076         * aspects.ads (Exchange_Aspects): New routine.
10077         * atree.adb (Rewrite): Do not check whether the save node has
10078         aspects as it never will, instead check the node about to be clobbered.
10079         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
10080         entities of generic packages.
10081         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
10082         pointer of an aspect specification list after rewriting takes place.
10083         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
10084         specifications of the generic template and the copy used for analysis.
10085         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
10086         the aspect specifications of the generic template and the
10087         copy used for analysis.
10088         (Analyze_Package_Instantiation): Propagate the aspect specifications
10089         from the generic template to the instantiation.
10090         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
10091         specifications from the generic template to the instantiation.
10092         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
10093         Abstract_State, Initializes and Initial_Condition when they
10094         apply to a package instantiation.
10096 2014-02-20  Robert Dewar  <dewar@adacore.com>
10098         * stringt.adb: Add call to Initialize in package initialization.
10100 2014-02-20  Robert Dewar  <dewar@adacore.com>
10102         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
10103         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
10104         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
10105         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
10106         reformatting.
10108 2014-02-20  Bob Duff  <duff@adacore.com>
10110         * s-os_lib.ads: Minor: Remove incorrect comment.
10112 2014-02-20  Robert Dewar  <dewar@adacore.com>
10114         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
10116 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10118         * a-cborma.adb (Assign): When creating a node without a specified
10119         element, insert an uninitialized element in the map, because
10120         the instance may provide an element type with a default
10121         initialization, e.g a scalar with a Default_Value aspect.
10122         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
10123         (Insert): In the version without explicit element, provide an
10124         uninitialized element, as above.
10125         * a-cbdlli.adb (Append): In the version without explicit element,
10126         provide an uninitalized element, as above.
10127         (Allocate): Remove unused version.
10129 2014-02-20  Robert Dewar  <dewar@adacore.com>
10131         * sem_elab.adb: Minor code reorganization (use Nkind_In).
10132         * stringt.adb: Remove temporary pragma Warnings (Off).
10133         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
10134         of Null_String_Id.
10136 2014-02-20  Matthew Heaney  <heaney@adacore.com>
10138         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
10139         index.
10141 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10143         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
10144         properly the cursor type for subsequent volatile testing in SPARK
10145         mode, when domain is a formal container with an Iterabe aspect.
10147 2014-02-20  Robert Dewar  <dewar@adacore.com>
10149         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
10150         (Set_Specific_Warning_Off): Add Reason argument.
10151         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
10152         (Set_Specific_Warning_Off): Add Reason argument.
10153         * erroutc.adb (Warnings_Entry): Add Reason field
10154         (Specific_Warning_Entry): Add Reason field.
10155         (Warnings_Suppressed): return String_Id for Reason.
10156         (Warning_Specifically_Suppressed): return String_Id for Reason.
10157         * erroutc.ads (Warnings_Entry): Add Reason field.
10158         (Specific_Warning_Entry): Add Reason field.
10159         (Set_Specific_Warning_Off): Add Reason argument.
10160         (Set_Warnings_Mode_Off): Add Reason argument.
10161         (Warnings_Suppressed): return String_Id for Reason.
10162         (Warning_Specifically_Suppressed): return String_Id for Reason.
10163         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
10164         (Warning_Specifically_Suppressed): returns String_Id for Reason
10165         * gnat_rm.texi: Document that Warning parameter is string literal
10166         or a concatenation of string literals.
10167         * par-prag.adb: New handling for Reason argument.
10168         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
10169         for Reason argument.
10170         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
10171         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
10172         * stringt.adb: Set Null_String_Id.
10173         * stringt.ads (Null_String_Id): New constant.
10175 2014-02-20  Robert Dewar  <dewar@adacore.com>
10177         * einfo.ads: Minor comment addition: Etype of package is
10178         Standard_Void_Type.
10179         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
10180         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
10181         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
10182         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
10183         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
10184         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10185         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
10186         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
10187         Replace all calls with calls to New_Occurrence_Of.
10189 2014-02-20  Robert Dewar  <dewar@adacore.com>
10191         * par-util.adb (Ignore, case of right paren): Make this a
10192         serious error.
10194 2014-02-19  Robert Dewar  <dewar@adacore.com>
10196         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
10197         * debug.adb: Remove -gnatd.X switch, no longer used.
10198         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
10199         now always made.
10201 2014-02-19  Bob Duff  <duff@adacore.com>
10203         * g-socket.ads: Minor: Correct some comments.
10205 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10207         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
10209 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
10211         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
10212         an error on out of range priorities if Relaxed_RM_Semantics.
10213         * sem_prag.adb (Analyze_Pragma): Ditto.
10215 2014-02-19  Bob Duff  <duff@adacore.com>
10217         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
10218         where F denotes the renaming of an enumeration literal, and
10219         issue a specialized error message.
10221 2014-02-19  Matthew Heaney  <heaney@adacore.com>
10223         * a-chtgop.ads (Checked_Index): New operation.
10224         (Next): Changed mode of hash table.
10225         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
10226         (Generic_Read, Reserve_Capacity): Ditto.
10227         (Generic_Equal): Detect tampering.
10228         (Next): Changed mode of hash table, detect tampering.
10229         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
10230         operation.
10231         (Find): Changed mode of hash table.
10232         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
10233         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
10234         tampering.
10235         (Find): Changed mode of hash table, check for tampering.
10236         (Generic_Replace_Element): Check for tampering.
10237         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
10238         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
10239         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
10240         Detect tampering.
10241         (Find, Generic_Replace_Element): Check for tampering.
10242         * a-chtgbo.ads (Checked_Index): New operation.
10243         * a-chtgbo.adb (Checked_Index): New operation
10244         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
10245         (Generic_Read, Next): Ditto.
10246         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
10247         table (Difference, Intersection): Use variable view of
10248         source, detect tampering (Find, Is_Subset, Overlap): Use
10249         variable view of container (Symmetric_Difference, Union):
10250         Detect tampering (Vet): Use Checked_Index to detect tampering
10251         (Constant_Reference, Element, Find): Use variable view of
10252         container.
10253         (Update_Element_Preserving_Key): Detect tampering.
10254         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
10255         of container.
10256         (Is_Subset): Ditto.
10257         (Equivalent_Sets, Overlap): Use Node's Next component.
10258         (Vet): Use Checked_Index to detect tampering.
10259         (Constant_Reference, Element, Find): Use variable view of container.
10260         (Update_Element_Preserving_Key): Detect tampering.
10261         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
10262         Element, Find): Use variable view of container.
10263         (Reference): Rename hash table component.
10264         (Vet): Use Checked_Index to detect tampering.
10266 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
10268         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
10269         of -nostdinc.
10271 2014-02-19  Thomas Quinot  <quinot@adacore.com>
10273         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
10274         against calls without Def_Id.
10276 2014-02-19  Claire Dross  <dross@adacore.com>
10278         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
10279         a-cofove.ads: Add global annotations to subprograms.
10281 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10283         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
10284         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
10285         Initial_Condition no longer requires the presence of pragma
10286         Initialized. Do not try to diagnose whether all variables mentioned in
10287         pragma Initializes also appear in Initial_Condition.
10288         (Collect_Variables): Removed.
10289         (Match_Variable): Removed.
10290         (Match_Variables): Removed.
10291         (Report_Unused_Variables): Removed.
10293 2014-02-19  Thomas Quinot  <quinot@adacore.com>
10295         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
10297 2014-02-19  Robert Dewar  <dewar@adacore.com>
10299         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
10300         reformatting.
10302 2014-02-19  Vincent Celier  <celier@adacore.com>
10304         * prj-part.adb (Parse_Single_Project): Use the fully resolved
10305         project path, with all symbolic links resolved, to check if the
10306         same project is imported with a different unresolved path.
10307         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
10308         changed to Resolved_Path to reflect that all symbolic links
10309         are resolved.
10311 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10313         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
10314         from sem_ch13, for use elsewhere.
10315         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
10316         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
10317         cursor type on the loop variable when the iteration is over o
10318         formal container.
10320 2014-02-19  Vincent Celier  <celier@adacore.com>
10322         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
10323         for an empty Target (Check_Target): Never fail when an empty
10324         target is declared in the configuration project.
10326 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10328         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
10329         the pragma comes fron a predicate aspect and the context is a
10330         record declaration within the scope that declares the type.
10332 2014-02-19  Robert Dewar  <dewar@adacore.com>
10334         * gnat_rm.texi: Minor clarifications.
10335         * expander.adb, sem_aggr.adb: Add comments.
10337 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10339         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
10340         applies to a subprogram body, the name is the current scope,
10341         rather than being declared in the current scope.
10342         (Analyze_Pragma, case No_Return): Handle properly a No_Return
10343         aspect applied to a subprogram body.
10345 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10347         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
10348         of overloaded subprograms, and fix bug in handling of primitive
10349         operation Element.
10351 2014-02-19  Pascal Obry  <obry@adacore.com>
10353         * s-os_lib.adb: Minor reformatting.
10355 2014-02-19  Yannick Moy  <moy@adacore.com>
10357         * expander.adb (Expand): Do nothing inside generics.
10358         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
10359         generics.
10361 2014-02-19  Yannick Moy  <moy@adacore.com>
10363         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
10365 2014-02-19  Robert Dewar  <dewar@adacore.com>
10367         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
10368         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
10369         longer needed).
10371 2014-02-19  Claire Dross  <dross@adacore.com>
10373         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
10374         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
10376 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10378         * sem_ch3.adb (Analyze_Declarations): Analyze
10379         a package contract at the end of the private declarations (if
10380         applicable), otherwise analyze it and the end of the visible
10381         declarations.
10383 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10385         * style.adb (Missing_Overriding): If subprogram is an
10386         instantiation, place warning on the instance node itself,
10387         without mention of the original generic. Do not emit message
10388         if explicit Ada version is older than the introduction of the
10389         overriding indicator.
10391 2014-02-19  Yannick Moy  <moy@adacore.com>
10393         * gnat_rm.texi: Doc clarifications.
10395 2014-02-19  Yannick Moy  <moy@adacore.com>
10397         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
10398         inside a generic.
10400 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10402         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
10403         specified First primitive, rather than by name.
10404         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
10405         and extend error checking for missing primitives and incorrect
10406         signatures.
10408 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10410         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
10411         errors when a Synchronization aspect on an overriding protected
10412         operation does not match the given aspect on the overridden
10413         operation of an ancestor interface.
10415 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10417         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
10418         (Check_Loop_Pragma_Placement): Update
10419         comment on usage. Remove local variables Orig_Stmt and
10420         Within_Same_Sequence. Check that the current Loop_Invariant or
10421         Loop_Variant pragma is grouped together with other such pragmas.
10422         (Is_Loop_Pragma): New routine.
10423         (Prev_In_Loop): Removed.
10425 2014-02-19  Robert Dewar  <dewar@adacore.com>
10427         * par-ch6.adb (P_Return): For extended return, end column lines
10428         up with RETURN.
10429         * par.adb: Minor documentation clarification.
10431 2014-02-19  Yannick Moy  <moy@adacore.com>
10433         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
10434         that Loop_Invariant and Loop_Variant appear consecutively.
10435         * gnat_rm.texi Update documentation of Loop_Invariant and
10436         Loop_Variant pragmas.
10438 2014-02-19  Robert Dewar  <dewar@adacore.com>
10440         * debug.adb: Document -gnatd.X.
10441         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
10442         first token
10443         (Check_Then_Column): Ditto.
10444         * styleg.adb (Check_Then): Allow THEN on line after IF.
10445         (Check_Then): Check THEN placement under control of -gnatd.X
10446         * styleg.ads (Check_Then): Now called even if THEN is not first
10447         token on line.
10448         * stylesw.ads (Style_Check_If_Then_Layout): Document new
10449         relaxed rules.
10450         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
10452 2014-02-19  Robert Dewar  <dewar@adacore.com>
10454         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
10455         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
10456         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
10457         vms_conv.adb: Fix bad layout of IF statements
10459 2014-02-19  Robert Dewar  <dewar@adacore.com>
10461         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
10463 2014-02-19  Robert Dewar  <dewar@adacore.com>
10465         * exp_util.adb: Update comments.
10467 2014-02-19  Doug Rupp  <rupp@adacore.com>
10469         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
10470         * init.c (__gl_float_format): [VMS] New global.
10471         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
10472         representation in effect.
10474 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10476         * exp_ch6.adb Add with and use clause for Exp_Prag.
10477         (Expand_Contract_Cases): Relocated to Exp_Prag.
10478         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
10479         * exp_prag.adb Add with and use clauses for Checks and Validsw.
10480         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
10481         structure of the expanded code to showcase the evaluation of
10482         attribute 'Old prefixes. Add local variable Old_Evals. Expand
10483         any attribute 'Old references found within a consequence. Add
10484         circuitry to evaluate the prefixes of attribute 'Old that
10485         belong to a selected consequence.
10486         (Expand_Old_In_Consequence): New routine.
10487         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
10488         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
10489         potentially unevaluated prefix is always evaluated.
10491 2014-02-19  Robert Dewar  <dewar@adacore.com>
10493         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
10494         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
10495         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
10496         handling for the case of Modify_Tree_For_C, this approach did
10497         not work.
10498         * exp_util.adb (Matching_Standard_Type): New function
10499         (Side_Effect_Free): New top level functions (from
10500         Remove_Side_Effects).
10501         * exp_util.ads (Side_Effect_Free): New top level functions
10502         (moved from body).
10503         * sinfo.ads: Minor comment updates.
10505 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10507         * exp_ch6.adb (Expand_Simple_Function_Return): If return
10508         type is unconstrained and uses the secondary stack, mark the
10509         enclosing function accordingly, to ensure that the value is not
10510         prematurely removed.
10512 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10514         * par.adb Alphabetize the routines in Par.Sync.
10515         (Resync_Past_Malformed_Aspect): New routine.
10516         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
10517         variables. Code and comment reformatting. Detect missing
10518         parentheses on aspects [Refined_]Global and [Refined_]Depends
10519         with a non-null definition.
10520         * par-sync.adb: Alphabetize all routines in this separate unit.
10521         (Resync_Past_Malformed_Aspect): New routine.
10523 2014-02-19  Robert Dewar  <dewar@adacore.com>
10525         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
10526         if Esize values do not match.
10528 2014-02-19  Yannick Moy  <moy@adacore.com>
10530         * sinfo.ads: Minor comment update.
10532 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10534         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
10536 2014-02-19  Thomas Quinot  <quinot@adacore.com>
10538         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
10539         that has the No_Ctrl_Actions flag is a suitable node to be
10540         wrapped if the assigned expression has no finalization actions.
10541         * sem_eval.adb (Eval_Entity_Name): For a compile time known
10542         boolean value, mark the corresponding condition SCO as constant.
10544 2014-02-19  Robert Dewar  <dewar@adacore.com>
10546         * exp_util.adb: Minor reformatting.
10547         * exp_util.ads (Matching_Standard_Type): New function.
10548         * exp_ch7.adb: Minor reformatting.
10550 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10552         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
10553         to find declaration for Cursor, to handle properly the case of
10554         a discriminated iterable type.
10556 2014-02-19  Vincent Celier  <celier@adacore.com>
10558         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
10559         imported library projects with the library ALI dirs, when setting
10560         the object paths.
10561         * prj-env.ads (Ada_Objects_Path): Correct comments about
10562         argument Including_Libraries.
10564 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
10566         * gnat_rm.texi: Minor spelling fixes.
10568 2014-02-19  Doug Rupp  <rupp@adacore.com>
10570         * init.c: Remove unneeded code.
10571         * fe.h (Float_Format): New macro
10572         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
10574 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10576         * sem_prag.adb (Check_Refined_Global_Item):
10577         A state or variable acts as a constituent only it is part of an
10578         encapsulating state and the state has visible refinement.
10580 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10582         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
10583         postcondition for a function when the expression does not mention
10584         'Result but the function has in-out parameters.
10586 2014-02-19  Robert Dewar  <dewar@adacore.com>
10588         * gnat_rm.texi: Add documentation on Value_Size forcing biased
10589         representation.
10591 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10593         * lib-xref.ads Remove the small table of letter and symbol usage as we
10594         already have one.
10596 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10598         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
10599         messages depending on the offending misplaced aspect specifications.
10600         (Diagnose_Misplaced_Aspect_Specifications): New routine.
10602 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10604         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
10605         for iterable aspect primitives.
10606         (Resolve_Iterable_Operation): Use expected signature of iterable
10607         aspect to resolve primitive when overloading is present.
10608         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
10609         (Check_Signature): Removed.
10611 2014-02-19  Yannick Moy  <moy@adacore.com>
10613         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
10614         subunit in GNATprove_Mode.
10615         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
10617 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10619         * lib-xref.ads Alphabetize the contents of table
10620         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
10621         for E_Abstract_State. List all letters and symbols in use.
10622         * sem_prag.adb (Analyze_Abstract_State): Update all calls
10623         to Create_Abstract_State to reflect the new signature.
10624         (Create_Abstract_State): Change subprogram profile and update
10625         the comment on usage. Use the proper location of the state
10626         declaration when creating a new abstract state entity. Do not
10627         generate an external name, but simply reuse the name coming from
10628         the state declaration.
10630 2014-02-19  Robert Dewar  <dewar@adacore.com>
10632         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
10633         declarations get properly inserted in Modify_Tree_For_C mode.
10634         * sinfo.ads: Minor comment addition.
10636 2014-02-19  Robert Dewar  <dewar@adacore.com>
10638         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
10639         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
10641 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10643         * style.adb (Missing_Overriding): Warning does not apply in
10644         language versions prior to Ada 2005.
10645         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
10646         * sem_attr.adb: Add Attribute_Iterable where needed.
10647         * exp_attr.adb: ditto.
10648         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
10649         handle loops and quantified expressions over types that have an
10650         iterable aspect.  Called from Expand_Iterator_Loop.
10651         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
10652         with Iterable aspect.
10653         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
10654         subprograms specified in the Iterable aspect have the proper
10655         signature involving container and cursor.
10656         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
10657         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
10658         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
10659         New procedure to retrieve one of the primitives First, Last,
10660         or Has_Element, from the value of the iterable aspect of a
10661         formal container.
10662         (Is_Container_Element): Predicate to recognize expressions
10663         that denote an element of one of the predefined containers,
10664         for possible optimization.  This subprogram is not currently
10665         used, pending ARG discussions on the legality of the proposed
10666         optimization. Worth preserving for eventual use.
10667         (Is_Iterator): Recognize formal container types.
10668         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
10670 2014-02-19  Robert Dewar  <dewar@adacore.com>
10672         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
10673         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
10674         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
10675         declarations from list of actions.
10676         * output.ads, output.adb (Delete_Last_Char): New procedure.
10677         * sinfo.ads: Document handling of Mod and expression with actions
10678         in Modify_Tree_For_C mode.
10680 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10682         * par-ch9.adb (P_Task): Add a null statement to produce a
10683         well-formed task body when due to a previous syntax error the
10684         statement list is empty.
10686 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
10688         * sem_prag.adb (Check_Dependency_Clause): Account
10689         for the case where a state with a non-null refinement matches a
10690         null output list. Comment reformatting.
10691         (Inputs_Match): Copy a solitary input to avoid an assertion failure
10692         when trying to match the same input in multiple clauses.
10694 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
10696         * sem_attr.adb: Minor typo fix.
10698 2014-02-18  Robert Dewar  <dewar@adacore.com>
10700         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
10701         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
10702         (Create_Standard): Create new unsigned types.
10703         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
10704         mode (Expand_N_Reference): Removed, problematic and not needed
10705         for now.
10706         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
10707         not needed for now.
10708         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
10709         * expander.adb: Remove call to Expand_N_Reference (problematic,
10710         and not needed now).
10711         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
10712         * stand.adb: Read and write unsigned type entities.
10713         * stand.ads: Add new unsigned types.
10715 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
10717         * sem_ch4.adb (Analyze_Call): Do not mark a function call
10718         as being inside an assertion expression as the flag is now removed.
10719         (Check_Ghost_Subprogram_Call): Do not query the
10720         In_Assertion_Expression flag as it is now removed, instead use
10721         a predicate function.
10722         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
10723         In_Assertion_Expression flag as it is now removed, instead use
10724         a predicate function.
10725         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
10726         * sem_util.adb Add with and use clause for Sem_Prag.
10727         (In_Assertion_Expression_Pragma): New routine.
10728         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
10729         * sinfo.adb (In_Assertion_Expression): Removed.
10730         (Set_In_Assertion_Expression): Removed.
10731         * sinfo.ads Remove flag In_Assertion_Expression along with its
10732         use in nodes.
10733         (In_Assertion_Expression): Removed along with
10734         pragma Inline.  (Set_In_Assertion_Expression): Removed along
10735         with pragma Inline.
10737 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
10739         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
10740         used together with '-r', '-rf' or '-rnb' options.
10742 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
10744         * sem_attr.adb (Analyze_Attribute): Comment
10745         and code reformatting. Use separate routines to check the
10746         legality of attribute 'Old in certain pragmas. Verify
10747         the use of 'Old, 'Result and locally declared entities
10748         within the prefix of 'Old.
10749         (Check_References_In_Prefix): New routine.
10750         (Check_Use_In_Contract_Cases): New routine.
10751         (Check_Use_In_Test_Case): New routine.
10753 2014-02-18  Vincent Celier  <celier@adacore.com>
10755         * sem_aux.adb (Is_By_Reference_Type): For each components of
10756         a record type, check also if the component is volatile as it
10757         may have an aspect that makes it volatile. If it is, then the
10758         record type is a by reference type.
10760 2014-02-18  Robert Dewar  <dewar@adacore.com>
10762         * exp_attr.adb: Minor reformatting.
10763         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
10764         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
10765         as another case where we don't generate N_Reference nodes for
10766         primitive types.
10767         * expander.adb (Expand): Add call to Expand_N_Reference.
10769 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10771         * sem_prag.adb (Analyze_Refined_Pragma): Remove
10772         local variable Pack_Spec. Refinement pragmas may now apply to
10773         bodies of both visible and private subprograms.
10775 2014-02-06  Robert Dewar  <dewar@adacore.com>
10777         * exp_attr.adb (Expand_Loop_Entry_Attribute):
10778         Minor change (Attr => N) (Expand_Pred_Succ): New name
10779         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
10780         Max): Expand into if expression if Modify_Tree_For_C mode.
10781         (Expand_N_Attribute_Reference, case Min): ditto
10782         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
10783         Max attributes.
10785 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10787         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
10788         predicate check if this is an internal declaration with
10789         No_Initialization set, as for an expanded aggregate component.
10791 2014-02-06  Doug Rupp  <rupp@adacore.com>
10793         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
10794         conditions with severity of "SUCCESS" or "INFORMATIONAL".
10796 2014-02-06  Yannick Moy  <moy@adacore.com>
10798         * sem_prag.adb (Analyze_Pragma): Analyze pragma
10799         Debug rewritten node before rewriting it as a null statement in
10800         GNATprove mode.
10802 2014-02-06  Robert Dewar  <dewar@adacore.com>
10804         * sem_attr.adb (Min_Max): New procedure.
10805         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
10806         procedure.
10808 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10810         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
10811         gnatmetric/gnatpp.
10813 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10815         * sem_prag.adb (Analyze_Abstract_State): Update
10816         all calls to Create_Abstract_State to pass the proper state
10817         "declaration".
10818         (Create_Abstract_State): Add new formal parameter
10819         State_Decl along with comment on usage. Establish a link between
10820         the abstract state entity and the state declaration.
10822 2014-02-06  Robert Dewar  <dewar@adacore.com>
10824         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
10825         comparison of unordered enumeration type.
10826         (Analyze_Attribute, case Max): Check for improper comparison of
10827         unordered enumeration type.
10828         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
10829         sem_util.adb.
10830         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
10831         Moved here from Sem_Res.
10833 2014-02-06  Robert Dewar  <dewar@adacore.com>
10835         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
10836         reformatting.
10838 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10840         * sem_ch6.adb (Process_Formals): Error message reformatting.
10842 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10844         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
10845         variable Spec. Do not inherit the null indicator from the
10846         subprogram body when generating the spec.
10848 2014-02-06  Robert Dewar  <dewar@adacore.com>
10850         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
10851         mixed case.
10853 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
10855         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
10856         when the function has a foreign convention, but not if only the
10857         limited return type has such a convention.
10859 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10861         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
10862         variable Spec. Comment reformatting. Use Copy_Separate_Tree
10863         rather than New_Copy_Tree when building the corresponding
10864         subprogram declaration.
10866 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10868         * sem_prag.adb (Analyze_Global_Item): Remove
10869         the mode-related checks on abstract states with enabled external
10870         properties.
10871         (Property_Error): Removed.
10873 2014-02-06  Javier Miranda  <miranda@adacore.com>
10875         * lib-xref.adb (Generate_Reference): When
10876         generating the reference to the first private entity take care
10877         of handling swapped entities.
10879 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10881         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10882         gnatmetric.
10884 2014-02-06  Robert Dewar  <dewar@adacore.com>
10886         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
10887         than the word size when operating in Modify_Tree_For_C mode.
10888         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
10890 2014-02-06  Robert Dewar  <dewar@adacore.com>
10892         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
10893         compare is case insensitive.
10894         * gnat_rm.texi: Document that string compare for Warnings Off
10895         is now case insensitive.
10897 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
10899         * gnat_rm.texi: Small wording tweak.
10901 2014-02-06  Pascal Obry  <obry@adacore.com>
10903         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
10904         and Included_Artifact_Patterns attribute definitions.
10906 2014-02-06  Yannick Moy  <moy@adacore.com>
10908         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
10909         SPARK_Mode pragma component for all subprograms, including stubs.
10911 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10913         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
10914         the configuration options of the enclosing context in a
10915         stack-like fasion.
10916         (Analyze_Subprogram_Body_Stub): Maintain the
10917         configuration options of the enclosing context in a stack-like
10918         fashion.
10920 2014-02-06  Robert Dewar  <dewar@adacore.com>
10922         * debug.adb: -gnatd.u sets Modify_Tree_For C
10923         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
10924         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
10925         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
10926         * exp_intr.adb (Expand_Shift): Call expander so we do
10927         Modify_Tree_For_C expansions.
10928         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10929         if -gnatd.u set.
10931 2014-02-06  Fedor Rybin  <frybin@adacore.com>
10933         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
10934         after the phase 1 of the processing of each aggregated project
10935         to get access to project trees of aggregated projects.
10936         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
10937         If specified, On_New_Tree_Loaded is called after each aggregated
10938         project has been processed succesfully.
10939         (Process): new parameter On_New_Tree_Loaded.
10940         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
10941         callback added after processing of each aggregated project.
10942         (Recursive_Process): new parameter On_New_Tree_Loaded.
10943         (Process): new parameter On_New_Tree_Loaded.
10944         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
10945         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
10946         On_New_Tree_Loaded.
10947         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
10948         On_New_Tree_Loaded.
10950 2014-02-06  Bob Duff  <duff@adacore.com>
10952         * gnat_ugn.texi: Implement --insert-blank-lines and
10953         --preserve-blank-lines switches.
10955 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
10957         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
10958         gnatelim.
10960 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
10962         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
10963         of the pragma on individual objects.
10965 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
10967         * einfo.adb Node29 is now used as BIP_Initialization_Call.
10968         (BIP_Initialization_Call): New routine.
10969         (Set_BIP_Initialization_Call): New routine.
10970         (Write_Field29_Name): Add an entry for constants and variables.
10971         * einfo.ads Add new attribute BIP_Initialization_Call and update
10972         its usage in nodes.
10973         (BIP_Initialization_Call): New routine along with pragma Inline.
10974         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
10975         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
10976         Add local declaration Res_Decl. Capture the build-in-place
10977         initialization call when the related object declaration has
10978         created a transient block.
10979         * exp_ch7.adb (Process_Transient_Objects): Add local variable
10980         Fin_Insrt. Recognize a scenario where an object declaration acts
10981         as a transient context and is initialized by a build-in-place
10982         function call.
10984 2014-02-06  Pascal Obry  <obry@adacore.com>
10986         * prj-util.adb (For_Interface_Sources): Fix handling of required
10987         bodies for aggregate libs.
10989 2014-02-06  Robert Dewar  <dewar@adacore.com>
10991         * nlists.ads: Minor comment clarifications.
10993 2014-02-06  Robert Dewar  <dewar@adacore.com>
10995         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
10996         if gnatd.V set.
10997         * opt.ads (Modify_Tree_For_C): New flag.
10998         * output.ads, output.adb (Last_Char): New function.
11000 2014-02-06  Pascal Obry  <obry@adacore.com>
11002         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
11003         share/gpr for cross-builds.
11005 2014-02-06  Robert Dewar  <dewar@adacore.com>
11007         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
11008         Minor reformatting and code clean ups.
11010 2014-02-06  Pascal Obry  <obry@adacore.com>
11012         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
11013         * prj.ads: Minor typo fix in comment.
11015 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11017         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
11018         local variable Expr. Flag clauses with extra parenthesis as this
11019         is not allowed by the syntax of the pragma. Code reformatting.
11021 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11023         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
11024         variables. Rename variabme Tnn to Temp. Do not create a temporary
11025         if assertions are disabled. Find enclosing routine _Postconditions
11026         and insert the temporary that captures the value of the prefix
11027         before the routine.
11028         * exp_ch6.adb (Build_Postconditions_Procedure):
11029         Insert the generated _Postconditions routine
11030         before the first source declaration of the related
11031         subprogram.
11032         (Insert_After_Last_Declaration): Removed.
11033         (Insert_Before_First_Source_Declaration): New routine.
11035 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11037         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
11038         Utility to determine whether current expansion is for the body
11039         of a predefined primitive operation.
11040         (Make_Predicate_Check): Use Within_Internal_Subpgram
11041         * checks.adb (Apply_Predicate_Check): Use
11042         Within_Internal_Subprogram
11043         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
11045 2014-02-06  Pascal Obry  <obry@adacore.com>
11047         * prj.ads, prj-util.adb: Minor reformatting.
11049 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11051         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
11052         Take into account the Split_PPC flag to ensure that conjuncts
11053         in a composite postcondition aspect are tested in source order.
11055 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11057         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
11058         use of SPARK_Mode.
11059         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
11060         illegal use of SPARK_Mode.
11061         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
11062         * sem_prag.adb (Analyze_Pragma): Code reformatting.
11063         * sem_util.adb Add with and use clause for Aspects.
11064         (Check_SPARK_Mode_In_Generic): New routine.
11065         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
11067 2014-02-06  Thomas Quinot  <quinot@adacore.com>
11069         * a-calend.adb (Formatting_Operations.Split): Ensure that
11070         Time_Error is raised for invalid time values.
11072 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
11074         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
11075         in GNATprove_Mode.
11077 2014-02-06  Robert Dewar  <dewar@adacore.com>
11079         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
11080         * exp_ch3.adb (Build_Dcheck_Function): Set
11081         Is_Discriminant_Check_Function.
11083 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11085         * exp_ch7.adb (Is_Subprogram_Call): Inspect
11086         the original tree in certain cases where a construct has been
11087         factored out and replaced by a reference to a temporary.
11089 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11091         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
11092         parameters when propagating predicate function to full view.
11093         (Find_Type_Of_Object): Freeze base type of object type to catch
11094         premature use of discriminated private type without a full view.
11096 2014-02-06  Robert Dewar  <dewar@adacore.com>
11098         * sprint.adb: Minor reformatting.
11100 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11102         * exp_ch4.adb (Process_Transient_Object): Add local variable
11103         Temp_Ins. When the transient object is initialized by an
11104         aggregate, the hook must capture the object after the last
11105         component assignment takes place.
11106         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
11107         routine Is_Subprogram_Call.
11108         (Is_Subprogram_Call): Inspect an
11109         aggregate that has been heavily expanded for subprogram calls.
11110         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
11111         and Temp_Ins.  Remove the nested declare block and adjust the
11112         indentation. When the transient object is initialized by an
11113         aggregate, the hook must capture the object after the last
11114         component assignment takes place.
11116 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11118         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
11119         external states with enabled properties that do not match the
11120         global mode.
11121         (Property_Error): New routine.
11122         * sem_res.adb (Property_Error): New routine.
11123         (Resolve_Actuals): Detect illegal uses of external variables with
11124         enabled properties in procedure calls that do not match the mode of
11125         the corresponding formal parameter.
11127 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11129         * sem_util.adb (Has_Enabled_Property): Rename
11130         formal parameter Prop_Nam to Property. Update the comment on usage
11131         and all occurrences in the body. Add local variable Prop_Nam. When
11132         inspecting a property with an expression, the property name
11133         appears as the first choice of the component association.
11135 2014-02-04  Robert Dewar  <dewar@adacore.com>
11137         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
11139 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11141         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
11142         for consistency with other messages.
11144 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11146         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
11147         iterator, indicate that the element is a constant if the container
11148         type does not have a variable indexing aspect.
11149         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
11150         marked as constant, do not reset its Ekind, to ensure that
11151         container elements in an element loop are not modified if the
11152         container (e.g. a hashed set) only has a constant indexing aspect.
11154 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
11156         * g-souinf.ads: Subprograms in this unit are actually not pure.
11157         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
11158         * einfo.ads (Is_Pure): Update doc to match implementation.
11160 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11162         * exp_ch13.adb: Minor spelling fix.
11164 2014-02-04  Robert Dewar  <dewar@adacore.com>
11166         * opt.ads: Minor comment update.
11168 2014-02-04  Robert Dewar  <dewar@adacore.com>
11170         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
11171         instead of Replace.
11173 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11175         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
11176         on null expressions if component type is non-null, when the
11177         corresponding association covers an empty range of index values.
11179 2014-02-04  Robert Dewar  <dewar@adacore.com>
11181         * sinfo.ads: Further comments on N_Expression_With_Actions node.
11183 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
11185         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
11186         variables Out_Items and Ref_Global. Remove local constant
11187         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
11188         and D8. Remove the useless collection of global items as this
11189         was a leftover from an earlier version of the routine. Move
11190         several routines out to avoid deep nesting and indentation.
11191         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
11192         parameter Do_Checks to Post_Errors. Update the comment on usage.
11193         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
11194         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
11195         to Post_Errors. Update the comment on usage. Account for the
11196         case where a self referential state may have a null input_list.
11197         (Is_Self_Referential): New routine.
11199 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11201         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
11202         entity renames an expression, as in the case of an object of
11203         an unconstrained type initialized by a function call, defer the
11204         rewriting of the expression to the expander.
11205         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
11206         'Alignment): If the entity renames an expression, introduce
11207         temporary to capture value, and rewrite original declaration to
11208         use temporary.
11210 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11212         * g-comlin.adb: Minor typo fix.
11214 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11216         * freeze.adb (Freeze_All): Types derived from a formal
11217         access_to_classwide type do not have a finalization master.
11219 2014-02-04  Robert Dewar  <dewar@adacore.com>
11221         * sprint.adb: Minor reformatting.
11223 2014-02-04  Robert Dewar  <dewar@adacore.com>
11225         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
11226         cases where Actions is a null list.
11227         * sinfo.ads (N_Expression_With_Actions): Actions can be
11228         temporarily empty during semantic analysis, but must be non-empty
11229         in the final expanded tree.
11231 2014-01-31  Robert Dewar  <dewar@adacore.com>
11233         * exp_ch9.adb: Minor reformatting.
11235 2014-01-31  Emmanuel Briot  <briot@adacore.com>
11237         * g-comlin.adb (Set_Command_Line): Take the switches
11238         configuration from the Command_Line_Config.
11240 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
11242         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
11243         refinement clause.
11245 2014-01-31  Vincent Celier  <celier@adacore.com>
11247         * projects.texi: Add more documentation about others used as an
11248         index in indexed attributes.
11250 2014-01-31  Robert Dewar  <dewar@adacore.com>
11252         * gnat_ugn.texi: Minor update.
11253         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
11254         * exp_util.adb: Minor reformatting.
11256 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
11258         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
11259         depends on data that is not private to the protected object,
11260         and potentially modifiable in unsynchronized fashion.
11262 2014-01-31  Yannick Moy  <moy@adacore.com>
11264         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
11265         GNATprove_Mode.
11267 2014-01-31  Robert Dewar  <dewar@adacore.com>
11269         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
11270         for Unknown_Package.
11271         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
11273 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
11275         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
11276         the logic that generates a runtime check to determine the
11277         controlled status of the object about to be allocated or
11278         deallocated. Class-wide types now always use a runtime check
11279         even if they appear as generic actuals.
11280         (Find_Object): Detect
11281         a special case that involves interface class-wide types because
11282         the object appears as a complex expression.
11284 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
11286         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
11287         subprogram with an incomplete untagged formals on the list of
11288         private dependents, to verify that the type is properly completed
11289         in the private part.
11290         * sem_attr.adb: Code clean up.
11292 2014-01-31  Robert Dewar  <dewar@adacore.com>
11294         * exp_ch6.adb: Minor reformatting.
11296 2014-01-31  Vincent Celier  <celier@adacore.com>
11298         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
11299         when Pkg is unknown.
11301 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
11303         * sem_res.adb (Resolve_Entity_Name): Comment
11304         reformatting. Allow volatile objects in various generated checks.
11306 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
11308         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
11309         component association, set the etype of the identifier, for
11310         SPARK use.
11312 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
11314         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
11315         declared in a package, not checks can apply to the subprogram.
11317 2014-01-31  Robert Dewar  <dewar@adacore.com>
11319         * erroutc.adb (Validate_Specific_Warnings): Warnings are
11320         controlled -gnatw.W.
11321         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
11322         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
11324 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
11326         * exp_disp.adb: Update comments.
11328 2014-01-31  Yannick Moy  <moy@adacore.com>
11330         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
11331         Save_Global_References): Guard access to expression in aspect.
11333 2014-01-31  Yannick Moy  <moy@adacore.com>
11335         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
11336         Issue an error when the pragma is applied to a generic unit,
11337         a generic declaration, or inside a generic.
11339 2014-01-31  Yannick Moy  <moy@adacore.com>
11341         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
11342         entity.
11344 2014-01-31  Robert Dewar  <dewar@adacore.com>
11346         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
11347         reformatting.
11349 2014-01-31  Tristan Gingold  <gingold@adacore.com>
11351         * exp_disp.adb: Add a historic note.
11353 2014-01-31  Robert Dewar  <dewar@adacore.com>
11355         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
11356         Process_Deferred_References.
11358 2014-01-31  Yannick Moy  <moy@adacore.com>
11360         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
11361         ineffective pragma Warnings(Off) in GNATprove_Mode.
11363 2014-01-31  Bob Duff  <duff@adacore.com>
11365         * s-taskin.ads: Minor comment fix.
11366         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
11367         just direct dependents. If this is actually an abort, each task
11368         will take care of aborting its dependents, so all dependents will
11369         get aborted, as before. However, when this is called the second
11370         time from Vulnerable_Complete_Master "for convenience" (i.e. to
11371         kill off tasks waiting at terminate alternatives), aborting
11372         indirect dependents is wrong, because it causes some unrelated
11373         tasks to get aborted.
11375 2014-01-31  Robert Dewar  <dewar@adacore.com>
11377         * sem_ch4.adb: Minor reformatting.
11379 2014-01-31  Robert Dewar  <dewar@adacore.com>
11381         * exp_ch2.adb: New calling sequence for Is_LHS.
11382         * frontend.adb: Add call to Process_Deferred_References.
11383         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
11384         (Deferred_References): New table.
11385         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
11386         entries.
11387         (Find_Expanded_Name): Ditto.
11388         * sem_res.adb: New calling sequence for Is_LHS.
11389         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
11390         * sem_warn.adb: Call Process_Deferred_References before issuing
11391         warnings.
11393 2014-01-31  Tristan Gingold  <gingold@adacore.com>
11395         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
11396         use of System_Tasking_Protected_Objects_Single_Entry.
11397         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
11398         of Protected_Single_Entry_Call.
11399         (Expand_N_Timed_Entry_Call): Remove single_entry case.
11400         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
11401         single_entry case.
11402         (Make_Disp_Timed_Select_Body): Likewise.
11403         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
11404         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
11405         Self_Id parameter.
11406         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
11407         (Wait_For_Completion_With_Timeout): Remove.
11408         (Protected_Single_Entry_Call): Remove Mode parameter
11409         (always Simple_Call).
11410         (Service_Entry): Remove Self_Id constant (not used anymore).
11411         (Timed_Protected_Single_Entry_Call): Remove.
11412         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
11413         (Protected_Single_Entry_Call): Remove Mode parameter.
11415 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11417         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
11418         * einfo.ads (Get_Pragma): Update the comment on special pragmas
11419         handled by this routine.
11420         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
11421         to the contract of the related subprogram body.
11422         * sem_util.adb (Add_Contract_Item): Handle the insertion of
11423         pragma Refined_Post into the contract of a subprogram body.
11424         * sinfo.ads Update the documentation of node N_Contract.
11425         * sem_res.adb (Resolve_Entity_Name): Add a guard
11426         to detect abstract states and variables only when checking the
11427         SPARK 2014 rules concerning volatile object placement.
11429 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11431         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
11432         null is compatible with any access type.
11434 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11436         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
11437         placement is not in a package.
11439 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11441         * sem_util.adb (Has_Enabled_Property): Compare the character field of
11442         the sole property.
11444 2014-01-29  Robert Dewar  <dewar@adacore.com>
11446         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
11447         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
11448         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
11450 2014-01-29  Robert Dewar  <dewar@adacore.com>
11452         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
11453         * sem_warn.adb (Check_References): Suppress warnings if inside
11454         Initial_Condition pragma.
11456 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11458         * sem_prag.adb (Check_Missing_Part_Of): List all values of
11459         State_Space_Kind for readability reasons. Do not emit an error on
11460         a private item when the enclosing package lacks aspect/pragma
11461         Abstract_State. Do not emit an error on a private package
11462         instantiation when the corresponding generic template lacks
11463         visible state.
11464         (Has_Visible_State): New routine.
11465         * sem_util.adb (Find_Placement_In_State_Space): The visible
11466         declarations of any kind of child units in general act as proper
11467         placement location.
11469 2014-01-29  Robert Dewar  <dewar@adacore.com>
11471         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
11472         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
11473         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
11474         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
11475         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
11476         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
11477         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
11478         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
11479         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
11480         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
11481         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
11482         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
11483         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
11484         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
11485         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
11486         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
11487         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
11488         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
11489         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
11490         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
11491         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
11492         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
11493         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
11494         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
11495         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
11496         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
11497         s-regpat.adb, s-secsta.adb, s-stalib.ads,
11498         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
11499         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
11500         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
11501         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
11502         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
11504 2014-01-29  Robert Dewar  <dewar@adacore.com>
11506         * expander.adb: Minor reformatting.
11508 2014-01-29  Javier Miranda  <miranda@adacore.com>
11510         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
11511         previous patch.
11513 2014-01-29  Javier Miranda  <miranda@adacore.com>
11515         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
11516         that checks if an interface types defines the predefined "="
11517         function because the compiler was erroneously not generating the
11518         predefined "=" primitive as soon as the name of some interface
11519         primitive is "=" (formals were not checked).
11521 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11523         * expander.adb (Expander): In GNATprove mode, do not process
11524         transient scopes: they are in general not created in this mode,
11525         and an attempt to examine them will lead to constraint errors when
11526         processing configuration pragmas that have analyzable expressions.
11528 2014-01-29  Vincent Celier  <celier@adacore.com>
11530         * clean.adb (Gnatclean): Fail if main project is an aggregate
11531         project or if there is an aggregate library project in the
11532         project tree.
11533         * gnatcmd.adb: Fail if the main project is an aggregate project
11534         or if there is an aggegate library project in the project tree.
11535         * make.adb (Initialize): : Fail if main project is an aggregate
11536         project or if there is an aggregate library project in the
11537         project tree.
11538         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
11539         * prj-makr.adb (Initialize): Fail if the main project is an
11540         aggregate project or an aggregate library project.
11542 2014-01-29  Vincent Celier  <celier@adacore.com>
11544         * prj-part.adb (Check_Import_Aggregate): New procedure
11545         to check if an imported project is an aggregate project.
11546         (Parse_Single_Project): Call Check_Import_Aggregate
11547         * projects.texi: Document that aggregate projects cannot be
11548         extended or imported.
11550 2014-01-29  Robert Dewar  <dewar@adacore.com>
11552         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
11553         reformatting and code clean up.
11554         * gnat_ugn.texi: Add documentation section on Atomic Variables
11555         and Optimization.
11557 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11559         * einfo.adb Flag264 is now unused.
11560         (Has_Body_References): Removed.
11561         (Set_Has_Body_References): Removed.
11562         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
11563         * einfo.ads Update the comment on usage of attribute
11564         Body_References. Remove attribute Has_Body_References and its
11565         usage in nodes.
11566         (Has_Body_References): Removed along with pragma Inline.
11567         (Set_Has_Body_References): Removed along with pragma Inline.
11568         * sem_prag.adb (Analyze_Global_Item): Move the call to
11569         Record_Possible_Body_Reference in the state related checks
11570         section. Add a comment intended function.
11571         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
11572         in the state related checks section. Add a comment intended function.
11573         (Analyze_Refinement_Clause): Cleanup the illegal body reference
11574         reporting. Add a comment on timing of error reporting.
11575         (Record_Possible_Body_Reference): Reimplement the routine.
11577 2014-01-29  Vincent Celier  <celier@adacore.com>
11579         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
11580         unit-based languages.
11581         (Mains.Complete_Mains.Do_Complete): Use the source file project
11582         tree when calling Find_File_Add_Extension. Use the correct
11583         project name when reporting an error.
11585 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
11587         * aspects.adb Add an entry for aspect Part_Of in table
11588         Canonical_Aspect.
11589         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
11590         Aspect_Argument, Aspect_Names and Aspect_Delay.
11591         * atree.h Define Elist9.
11592         * atree.adb (Elist9): New routine.
11593         (Set_Elist9): New routine.
11594         * atree.ads (Elist9): New routine.
11595         (Set_Elist9): New routine.
11596         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
11597         the list of node usage.  Remove Refined_State from the list of
11598         node usage.
11599         (Encapsulating_State): New routine.
11600         (Get_Pragma):
11601         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
11602         (Refined_State): Removed.
11603         (Set_Encapsulating_State): New routine.
11604         (Set_Part_Of_Constituents): New routine.
11605         (Set_Refined_State): Removed.
11606         (Write_Field9_Name): Add an entry
11607         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
11608         Encapsulating_State. Remove the entry for Refined_State.
11609         * einfo.ads Add new attributes Encapsulating_State
11610         and Part_Of_Constituents alond with their usage in
11611         entities. Remove attribute Refined_State along with its
11612         usage in entities.
11613         (Encapsulating_State): New routine and
11614         pragma Inline.  (Get_Pragma): Update the comment on usage.
11615         (Part_Of_Constituents): New routine and pragma Inline.
11616         (Refined_State): Removed along with pragma Inline.
11617         (Set_Encapsulating_State): New routine and pragma Inline.
11618         (Set_Part_Of_Constituents): New routine and pragma Inline.
11619         (Set_Refined_State): Removed along with pragma Inline.
11620         * par-prag.adb Pragma Part_Of does not need any special processing
11621         by the parser.
11622         * sem_ch3.adb (Analyze_Declarations): Remove local variables
11623         Body_Id and Prag. Call separate routines to analyze the
11624         contract of a package [body].
11625         (Analyze_Object_Contract):
11626         Update the comment on usage. Remove local variables
11627         Items and Nam. Use Get_Pragma rather than traversing the
11628         classification list.  Verify whether the lack of indicator
11629         Part_Of agrees with the placement of the variable in state space.
11630         (Analyze_Object_Declaration): Initialize the encapsulating state
11631         of a variable.  (Requires_State_Refinement): Moved to sem_util.
11632         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
11633         (Analyze_Package_Contract): New routine.
11634         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
11635         (Analyze_Package_Contract): New routine.
11636         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
11637         state and Part_Of constituents.
11638         * sem_ch13.adb (Analyze_Aspect_Specifications):
11639         Add processing for aspect Part_Of. Update all
11640         calls to Decorate_Delayed_Aspect_And_Pragma.
11641         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
11642         not need any special processing at freeze time.
11643         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
11644         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
11645         update the associated comment.
11646         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
11647         (Analyze_Abstract_State): Add new global variable State_Id. Remove
11648         local constants Errors and Loc. Remove local variables Is_Null
11649         and State_Nam. Create the entity of the abstract state on the
11650         spot, before all remaining checks are performed. Verify that a
11651         missing Part_Of option agrees with the placement of the abstract
11652         state within the state space.
11653         (Analyze_Depends_In_Decl_Part):
11654         Add new global variables Constits_Seen and States_Seen. Check
11655         that a state and a corresponding constituent do not appear
11656         in pragma [Refined_]Depends.
11657         (Analyze_Global_In_Decl_Part):
11658         Add new global variables Constits_Seen and States_Seen. Check
11659         that a state and a corresponding constituent do not appear
11660         in pragma [Refined_]Global.
11661         (Analyze_Global_Item):
11662         Remove the now obsolete code that deals with Part_Of.
11663         Add the entity of the global item to the list of processed
11664         items.  (Analyze_Initializes_In_Decl_Part): Add new global
11665         variables Constits_Seen and States_Seen. Check that a state
11666         and a corresponding constituent do not appear in pragma
11667         Initializes.
11668         (Analyze_Initialization_Item): Add the entity
11669         of the initialization item to the list of processed items.
11670         (Analyze_Input_Item): Add the entity of the initialization
11671         item to the list of processed items.
11672         (Analyze_Input_Output):
11673         Remove the now obsolete code that deals with Part_Of.  Add the
11674         entity of the input/output to the list of processed items.
11675         (Analyze_Part_Of): New routine.
11676         (Analyze_Part_Of_Option): Remove
11677         local constant Par_State. Add local constant Encaps and local
11678         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
11679         the option. Turn the related state into a Part_Of constituent
11680         if the option is legal.
11681         (Analyze_Pragma): Add processing
11682         for pragma Part_Of.
11683         (Analyze_Refined_State_In_Decl_Part):
11684         Remove global constants Pack_Body and Spec_Id. Remove
11685         global variables Abstr_States and Hidden_States. Add new
11686         global variables Available_States, Body_Id, Body_States and
11687         Spec_Id. Add new local constant Body_Decl. Reimplement the
11688         logic that extracts the states available for refinement from
11689         the related package and the body hidden states of the said
11690         package.
11691         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
11692         (Check_Applicable_Policy): Alphabetize body.
11693         (Check_Dependency_Clause): Replace Refined_State
11694         with Encapsulating_State.
11695         (Check_Matching_Constituent):
11696         Reimplement the logic that determines whether an item is a valid
11697         / invalid constituent of the current refined state. Return when
11698         a construct does not denote a valid abstract state. Extract the
11699         list of Part_Of constituents for further analysis. Check that all
11700         Part_Of constituents of a state have been used in its refinement.
11701         (Check_Matching_State): Update the comment on usage. Operate
11702         on the list of available states.
11703         (Check_Missing_Part_Of): New routine.
11704         (Check_Refined_Global_Item): Replace Refined_State
11705         with Encapsulating_State.
11706         (Check_State_And_Constituent_Use): New routine.
11707         (Create_Abstract_State): New routine.
11708         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
11709         (Is_Part_Of): Removed.
11710         (Collect_Body_States): New routine.
11711         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
11712         (Collect_Hidden_States): Removed.
11713         (Report_Unrefined_States): Change the profile of the procedure along
11714         with the comment on usage.
11715         (Report_Unused_Constituents): New routine.
11716         (Report_Unused_Hidden_States): Removed.
11717         (Report_Unused_States): New routine.
11718         * sem_prag.ads (Check_Missing_Part_Of): New routine.
11719         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
11720         appear in the classification pragmas of a package instantiation
11721         or a variable.
11722         (Find_Placement_In_State_Space): New routine.
11723         (Is_Child): Removed.
11724         (Is_Child_Or_Sibling): Remove formal
11725         parameter Private_Child. Remove the private child checks.
11726         (Requires_State_Refinement): Moved from sem_ch3.
11727         * sem_util.ads Add new type State_Space_Kind along with
11728         comment on its usage and values.
11729         (Add_Contract_Item): Update the comment on usage.
11730         (Find_Body_Discriminal): Alphabetize spec.
11731         (Find_Placement_In_State_Space): New routine.
11732         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
11733         and update the comment on usage.
11734         (Requires_State_Refinement): Moved from sem_ch3.
11735         * sinfo.ads: Update the documentation of N_Contract.
11736         * snames.ads-tmpl The predefined name for Part_Of is now used
11737         to denote a pragma. Add Pragma_Id for Part_Of.
11739 2014-01-29  Emmanuel Briot  <briot@adacore.com>
11741         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
11742         machine as needed.
11743         (Dump): New subprogram.
11745 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11747         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
11748         Expand_Entry_Declaration to factorize code.
11750 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11752         * checks.adb: minor clarification.
11753         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
11754         search for primitive operations to the entities that immediately
11755         follow the type declaration.
11757 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11759         * exp_ch9.adb (Build_Protected_Entry): Do not call
11760         Complete_Entry_Body anymore.
11761         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
11762         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
11764 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
11766         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
11767         string when the Name input bigger than allowed. Adapt the function
11768         specification.
11770 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11772         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
11773         if expression is within a case_expression of if_expression.
11775 2014-01-29  Robert Dewar  <dewar@adacore.com>
11777         * exp_ch9.adb, inline.ads: Minor reformatting.
11779 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11781         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
11783 2014-01-29  Yannick Moy  <moy@adacore.com>
11785         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
11786         SPARK_Mode_Pragma components to be able to analyze generic
11787         instance.
11788         * sem_ch12.adb (Analyze_Package_Instantiation,
11789         Inline_Instance_Body, Need_Subprogram_Instance_Body,
11790         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
11791         for future analysis of the instance.
11792         (Instantiate_Package_Body,
11793         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
11794         from instantiation to analyze the instance.
11796 2014-01-29  Robert Dewar  <dewar@adacore.com>
11798         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
11799         reorganization.
11801 2014-01-29  Yannick Moy  <moy@adacore.com>
11803         * gnat_rm.texi: Update description of SPARK_Mode pragma.
11805 2014-01-29  Tristan Gingold  <gingold@adacore.com>
11807         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
11809 2014-01-29  Thomas Quinot  <quinot@adacore.com>
11811         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
11813 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
11815         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
11816         resulting string is an internal entity. and thus requires no
11817         initialization. This is relevant when Initialize_ Scalars is
11818         enabled, because the resultant spurious initialization may lead to
11819         secondary stack anomalies that produce a mangled name for a task.
11821 2014-01-29  Yannick Moy  <moy@adacore.com>
11823         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
11824         not inherited from spec anymore. Check consistency
11825         rules after processing of declarations.
11826         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
11827         from spec anymore. Check consistency rules after processing of
11828         declarations.
11829         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
11830         packages.
11831         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
11832         consistency rules.
11834 2014-01-27  Robert Dewar  <dewar@adacore.com>
11836         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
11837         to unordered msg.
11838         (Resolve_Range): Add type name/location to unordered msg.
11840 2014-01-27  Claire Dross  <dross@adacore.com>
11842         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
11843         Capacity) is only called with Capacity >= Length (Source) and
11844         Capacity in Capacity_Range.
11845         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
11846         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
11847         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
11848         in the code is this is not the case.
11850 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11852         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
11853         selected component in an instance where the component of the
11854         actual is not visibile at instantiation.
11856 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11858         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
11859         has a dynamic predicate, generate freeze node for Actual_Subtype
11860         at once, because the declaration of the corresponding predicate
11861         function will make reference to it.
11863 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11865         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
11867 2014-01-27  Robert Dewar  <dewar@adacore.com>
11869         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
11870         for 2**X optimization.
11872 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11874         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
11875         explicitly whether value is in range of Character, because the
11876         library is typically compiled with range checks disabled, and
11877         we cannot rely on the implicit check on the argument of 'Val.
11879 2014-01-27  Vincent Celier  <celier@adacore.com>
11881         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
11882         not the Target to itself.
11884 2014-01-27  Robert Dewar  <dewar@adacore.com>
11886         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
11887         changes to avoid incorrect use of unordered enum types.
11889 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11891         * sem_ch4.adb: Minor reformatting.
11893 2014-01-27  Robert Dewar  <dewar@adacore.com>
11895         * scn.adb (Check_End_Of_Line): Removed.
11896         (Error_Long_Line): Removed.
11897         (Determine_License): Use versions of above routines from Scanner.
11898         * scng.adb (Check_End_Of_Line): Moved to spec.
11899         (Error_Long_Line): Removed, no longer used.
11900         * scng.ads (Check_End_Of_Line): Moved here from body.
11902 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11904         * exp_ch7.adb (Build_Cleanup_Statements): Call
11905         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
11906         for protected body.
11907         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
11908          Remove Service_Name variable.
11909         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
11910         factorize code from the above subprograms.
11911         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
11913 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
11915         * einfo.adb (Has_Option): Reimplemented.
11916         * sem_prag.adb (Analyze_Refinement_Clause): Add global
11917         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
11918         External_Constit_Seen and State. Add local variables Body_Ref,
11919         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
11920         avoid a cumbersome while pool. Verify the legality of an external
11921         state and relevant properties.
11922         (Check_External_Property): New routine.
11923         (Check_Matching_State): Remove parameter profile
11924         and update comment on usage.
11925         (Collect_Constituent): Store the
11926         relevant external property of a constituent.
11927         * sem_util.adb (Async_Readers_Enabled): Update the call to
11928         Has_Enabled_Property.
11929         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
11930         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
11931         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
11932         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
11933         Update comment on usage. Reimplement the logic to recognize the various
11934         formats of properties.
11936 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11938         * par-ch5.adb: Minor reformatting.
11940 2014-01-27  Tristan Gingold  <gingold@adacore.com>
11942         * s-tposen.ads: Harmonize style and comments.
11944 2014-01-27  Vincent Celier  <celier@adacore.com>
11946         * projects.texi: Document that shared library projects, by
11947         default, cannot import projects that are not shared library
11948         projects.
11950 2014-01-27  Robert Dewar  <dewar@adacore.com>
11952         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
11953         of Rewrite.
11955 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11957         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
11958         any other exception is raised.
11959         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
11960         still necessary to perform a conversion in order to remove overlong
11961         encodings.
11963 2014-01-27  Robert Dewar  <dewar@adacore.com>
11965         * exp_smem.adb: Minor reformatting.
11967 2014-01-27  Thomas Quinot  <quinot@adacore.com>
11969         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
11971 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11973         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
11974         nodes for operands to the original node for the call, to preserve
11975         Original_Node pointers within the resolved operands, given that
11976         they may have been rewritten as well. Previous approach copied
11977         the operands into a new tree and lost those pointers.
11979 2014-01-27  Claire Dross  <dross@adacore.com>
11982         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
11984 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11986         * sem_util.adb (Check_Internal_Protected_Use): A call through
11987         an anonymous access parameter of the current protected function
11988         is not a potential modification of the current object.
11990 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
11992         * a-cobove.adb (Reserve_Capacity): Procedure raises
11993         Capacity_Error, not Constraint_Error, when request cannot be
11994         satisfied.
11996 2014-01-27  Vincent Celier  <celier@adacore.com>
11998         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
11999         not the Target to itself.
12001 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12003         * exp_ch4.adb (Expand_Concatenate): If the target of the
12004         concatenation is a library-level entity, always use the off-line
12005         version of concatenation, regardless of optimization level. This
12006         is space-efficient, and prevents linking problems when some
12007         units are compiled with different optimization levels.
12009 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12011         * sem_ch5.adb: Code clean up.
12013 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12015         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
12016         when an array or container iterator includes a subtype indication,
12017         which is only legal in an element iterator.
12019 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12021         * exp_ch7.adb: Minor reformatting.
12023 2014-01-27  Robert Dewar  <dewar@adacore.com>
12025         * opt.adb (SPARK_Mode): Default for library units is None rather
12026         than Off.
12027         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
12028         no longer ordered.
12029         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
12030         possibility.
12031         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
12033 2014-01-27  Robert Dewar  <dewar@adacore.com>
12035         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
12036         Suspicious_Labels table if we have identifier; followed by loop
12037         or block.
12038         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
12039         * par.adb (Suspicious_Labels): New table.
12041 2014-01-27  Robert Dewar  <dewar@adacore.com>
12043         * exp_aggr.adb (Check_Bounds): Reason is range check, not
12044         length check.
12046 2014-01-27  Yannick Moy  <moy@adacore.com>
12048         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
12049         reference.
12050         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
12051         function now.
12052         (Add_SPARK_Xrefs): Include references to constants.
12053         * spark_xrefs.ads Document new character 'c' for references to
12054         constants.
12056 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12058         * exp_smem.adb (Add_Write_After): For a function call, insert write as
12059         an after action in a transient scope.
12061 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12063         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
12064         to a shared variable as an OUT formal in a call to an init proc,
12065         the 'Read call must be emitted after, not before, the call.
12067 2014-01-27  Robert Dewar  <dewar@adacore.com>
12069         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
12071 2014-01-27  Robert Dewar  <dewar@adacore.com>
12073         * a-wichha.adb (Character_Set_Version): Change to output proper
12074         value.
12076 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
12078         * einfo.adb (Is_Input_Only_State): Removed.
12079         (Is_Non_Volatile_State): Removed.
12080         (Is_Output_State): Removed.
12081         * einfo.ads (Is_Input_Only_State): Remove attribute and
12082         subprogram. Update related entity.
12083         (Is_Non_Volatile_State):
12084         Remove attribute and subprogram. Update related entity.
12085         (Is_Output_State): Removed attribute and subprogram. Update
12086         related entity.
12087         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
12088         generated code.
12089         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
12090         an object, not just variables.
12091         (Analyze_Object_Contract): New routine.
12092         (Analyze_Variable_Contract): Removed.
12093         (Process_Discriminants): Detect an illegal use of volatile
12094         discriminant in SPARK mode.
12095         * sem_ch5.adb (Analyze_Iterator_Specification):
12096         Detect an illegal use of volatile loop variable.
12097         (Analyze_Loop_Parameter_Specification): Detect an illegal use
12098         of volatile loop variable.
12099         * sem_ch6.adb (Process_Formals): Update the volatile object
12100         detection. Detect an illegal formal of mode IN OUT or OUT in
12101         SPARK mode. Enhance the error messages with references.
12102         * sem_ch12.adb (Instantiate_Object): Update the volatile object
12103         detection. Enhance the error messages with references.
12104         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
12105         messages with references.
12106         (Analyze_Contract_Case): Enhance the error messages with references.
12107         (Analyze_External_Property): Call Check_Duplicate_Property to process
12108         an external property.
12109         (Analyze_External_Property_In_Decl_Part): New routine.
12110         (Analyze_External_State_In_Decl_Part): Removed.
12111         (Analyze_Global_Item): Detect an illegal
12112         use of a volatile constant. Detect an illegal use
12113         of a variable with enabled Effective_Reads. Enhance
12114         the error messages with references. Remove obsolete
12115         checks concerning Input_Only and Output_Only states.
12116         (Analyze_Initialization_Item): Enhance the error messages
12117         with references.
12118         (Analyze_Initializes_In_Decl_Part): Do not
12119         collect the states and variables when the initialization list
12120         is null.
12121         (Analyze_Input_Item): Enhance the error messages with references.
12122         (Analyze_Input_Output): Enhance the error messages with references.
12123         (Analyze_Pragma): Enhance the error messages with references.
12124         (Analyze_Refinement_Clause): Code reformatting.
12125         (Analyze_Refined_Depends_In_Decl_Part):
12126         Rename global variable Global to Reg_Global and update all
12127         occurrences. Add local variables D7 and D8. Update the error
12128         messages with references. Update the call to Collect_Global_Items.
12129         (Analyze_Refined_Global_In_Decl_Part): Add local variables
12130         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
12131         the call to Collect_Global_Items.  Account for a Proof_In state
12132         in null / useless refinement checks. Verify the coverage of
12133         Proof_In states.
12134         (Check_Dependency_Clause): Remove local variable
12135         Out_Constits. Remove the retrieval and removal of constituents
12136         for an Output_Only state. Remove the reporting of unused
12137         Output_Only state constituents.
12138         (Check_Duplicate_Mode): Enhance
12139         the error message with a reference.
12140         (Check_Duplicate_Property): New routine.
12141         (Check_Duplicate_Option): Enhance the error message with a reference.
12142         (Check_External_Properties): Enhance the error message with a reference.
12143         (Check_Function_Return): Enhance the error message with a reference.
12144         (Check_In_Out_States): Update
12145         comment on usage. Add a specialized error message for Proof_In
12146         constituents. Enhance the error message with a reference.
12147         (Check_Input_States): Update comment on usage. Account for
12148         possible Proof_In constituents. Enhance the error message
12149         with a areference.
12150         (Check_Matching_Constituent): Enhance the error message with a
12151         reference.
12152         (Check_Matching_State): Enchance the error message with a reference.
12153         (Check_Mode): Add local variable From_Global. Update the call to
12154         Find_Mode.  Emit more precise error messages concerning extra items
12155         (Check_Mode_Restriction_In_Enclosing_Context): Consider
12156         pragma Refined_Global.  Enhance the error message with a
12157         reference.
12158         (Check_Mode_Restriction_In_Function): Enhance the error message with
12159         a reference.
12160         (Check_Output_States): Update comment on usage. Add local variable
12161         Posted.  Account for possible Proof_In constituents. Produce a detailed
12162         list of missing constituents.
12163         (Check_Proof_In_States): New routine.
12164         (Check_Refined_Global_Item): Handle Proof_In
12165         constituents. Enchance the error message with a reference.
12166         (Collect_Global_Items): Add formal parameters Proof_In_Items
12167         and Has_Proof_In_State. Update the comment on usage. Account
12168         for Proof_In items.
12169         (Create_Or_Modify_Clause): Enchance
12170         the error message with a reference.
12171         (Find_Mode): Add
12172         formal parameter From_Global. Update the comment on usage.
12173         Detect when the mode is governed by pragma [Refined_]Global.
12174         (Output_Constituents): Removed.
12175         (Report_Extra_Constituents):
12176         Report extra Proof_In constituents.
12177         (Report_Unused_Constituents): Removed.
12178         (Usage_Error): Code reformatting. Enhance the error
12179         messages with reference.
12180         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
12181         (Analyze_External_State_In_Decl_Part): Removed.
12182         * sem_res.adb (Resolve_Actuals): Update the volatile object
12183         detection. Enhance the error message with a reference.
12184         (Resolve_Entity_Name): Update the volatile object
12185         detection. Enhance the error message with a reference.
12186         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
12187         (Is_SPARK_Volatile_Object): New routine.
12188         (Has_Volatile_Component): New routine.
12189         * sem_util.ads (Is_Delegate): Alphabetized.
12190         (Is_SPARK_Volatile_Object): New routine.
12191         (Has_Volatile_Component): New routine.
12192         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
12194 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12196         * sem_attr.adb: Resolve fully prefix of 'Update.
12198 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
12200         * gnat_rm.texi: Minor clarifications.
12202 2014-01-27  Robert Dewar  <dewar@adacore.com>
12204         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
12205         about call that is generated as part of an Initial_Condition
12206         check.
12207         * sem_prag.adb: Minor spelling correction.
12209 2014-01-27  Robert Dewar  <dewar@adacore.com>
12211         * sem_prag.adb (Set_Convention_From_Pragma): Check that
12212         convention Ghost can only apply to functions.
12213         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
12215 2014-01-27  Robert Dewar  <dewar@adacore.com>
12217         * gnat_ugn.texi: Add Short_Enums to documentation of
12218         -gnatet/-gnateT.
12220 2014-01-27  Robert Dewar  <dewar@adacore.com>
12222         * sem_prag.adb (Analyze_Input_Item): Correct check for input
12223         item in same package.
12224         * sem_util.ads, sem_util.adb (Within_Scope): New function.
12226 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
12228         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
12229         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
12230         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
12231         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
12232         maintained.
12234 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
12236         * gcc-interface/Makefile.in: Fix oversight.
12238 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
12240         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
12241         conversion from a thin pointer with a shifted value.
12242         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
12243         read-only flag from the values onto the result.
12244         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
12246 2014-01-25  Tristan Gingold  <gingold@adacore.com>
12248         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
12249         for E_Variable with a pragma Linker_Section.
12251 2014-01-25  Robert Dewar  <dewar@adacore.com>
12253         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
12254         with Default_Value aspect is passed in by copy.
12256 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
12258         * set_targ.adb: Set Short_Enums.
12259         * gcc-interface/lang.opt (fshort-enums): New option.
12260         * gcc-interface/misc.c (gnat_handle_option): Handle it.
12261         (gnat_post_options): Do not modify the global settings.
12263 2014-01-24  Robert Dewar  <dewar@adacore.com>
12265         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
12266         function.
12267         (Random_Decimal_Fixed): New generic function.
12268         * s-rannum.ads: Minor comment clarifications.
12270 2014-01-24  Robert Dewar  <dewar@adacore.com>
12272         * back_end.adb: Remove Short_Enums handling (handled in
12273         Ttypes/Get_Targ now) Minor added comments.
12274         * freeze.adb: Change name Short_Enums_On_Target to
12275         Target_Short_Enums.
12276         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
12277         * opt.ads: Minor comment updates.
12278         * sem_ch13.adb: Change name Short_Enums_On_Target to
12279         Target_Short_Enums.
12280         * set_targ.adb: Set Short_Enums from gcc back end.
12281         * set_targ.ads (Short_Enums): New variable.
12282         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
12283         Ttypes/Get_Targ now).
12284         * ttypes.ads (Target_Short_Enums): New constant boolean switch
12286 2014-01-24  Pascal Obry  <obry@adacore.com>
12288         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
12290 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
12292         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
12293         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
12294         stripped off.
12296 2014-01-24  Robert Dewar  <dewar@adacore.com>
12298         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
12300 2014-01-24  Vincent Celier  <celier@adacore.com>
12302         * prj.adb (Add_Aggregated_Project): Do not add a project in
12303         the list if it is already there.
12305 2014-01-24  Yannick Moy  <moy@adacore.com>
12307         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
12308         Correct the search for a subrogram declaration to which a pragma is
12309         attached.
12311 2014-01-24  Bob Duff  <duff@adacore.com>
12313         * gnat_ugn.texi: Document --decimal-grouping and
12314         --based-grouping switches in gnatpp.
12316 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12318         * sinfo.ads: Documentation update.
12320 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12322         * sem_ch3.adb (Constant_Redeclaration): New declaration is
12323         illegal if previous one has an initial expression that is an
12324         aggregate expanded into assignments.
12326 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12328         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
12329         code reorganization to remove spurious warning on a loop with
12330         an array element iterator that has a null range.
12332 2014-01-24  Vincent Celier  <celier@adacore.com>
12334         * make.adb (Binding_Phase): When setting the Ada paths, use
12335         the library ALI dir, not the object dir in libraries.
12337 2014-01-24  Yannick Moy  <moy@adacore.com>
12339         * sinfo.ads: Add documentation of check flag fields.
12341 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12343         * sem_res.adb (Resolve_Actuals): If an actual is a view
12344         conversion of a discriminated object, and the formal type is
12345         discriminated and constrained, apply a discriminant check to
12346         the object itself.
12348 2014-01-24  Robert Dewar  <dewar@adacore.com>
12350         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
12352 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12354         * sem_ch3.adb (Analyze_Declarations): At the end of an
12355         appropriate declarative part, call Freeze_All from the first
12356         declaration in the scope, not from the first unfrozen one. This
12357         is necessary to apply visibility checks to entities with delayed
12358         aspects. Otherwise, in the presence of instantiations and cleanups
12359         that they may generate, the delayed aspects may be analyzed too
12360         late and produce spurious visibility errors.
12361         * sem_attr.adb: Place etype on range.
12362         * sem_ch6.adb: Documentation expression functions.
12364 2014-01-24  Robert Dewar  <dewar@adacore.com>
12366         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
12367         terminology in compiler).
12369 2014-01-24  Robert Dewar  <dewar@adacore.com>
12371         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
12372         categories, now that Ada 95 supports raise expressions.
12374 2014-01-24  Robert Dewar  <dewar@adacore.com>
12376         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
12377         Short_Enums_On_Target.
12378         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
12379         into account.
12380         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
12382 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12384         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
12385         indication is given explicity, check that it matches the array
12386         component type or the container element type of the domain
12387         of iteration.
12389 2014-01-24  Tristan Gingold  <gingold@adacore.com>
12391         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
12392         * gcc-interface/misc.c (flag_short_enums): Declare.
12393         (gnat_post_options): Set it.
12395 2014-01-24  Vincent Celier  <celier@adacore.com>
12397         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
12398         to cache the result when Including_Libraries is False.
12399         * prj-env.ads (Ada_Objects_Path): Update documentation
12400         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
12401         (Get_Object_Directory): Return the Library_Ali_Dir only when
12402         when Including_Libraries is True.
12403         * prj.ads (Get_Object_Directory): Fix and complete documentation
12404         (Project_Data): New component Ada_Objects_Path_No_Libs
12406 2014-01-24  Robert Dewar  <dewar@adacore.com>
12408         * checks.adb (Expr_Known_Valid): Result of fpt operator never
12409         considered valid.
12411 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
12413         * back_end.adb: Minor fix in comment.
12415 2014-01-24  Javier Miranda  <miranda@adacore.com>
12417         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
12418         required to report the error in case of task types.
12420 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12422         * sem_attr.adb: Additional index checking.
12424 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12426         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
12427         expressions in each component association, and for records note
12428         the entity in each association choice, for subsequent resolution.
12429         (Resolve_Attribute, case 'Update): Complete resolution of
12430         expressions in each component association.
12432 2014-01-24  Robert Dewar  <dewar@adacore.com>
12434         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
12435         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
12436         leading to wrong handling of SPARK_Mode for library units).
12438 2014-01-24  Robert Dewar  <dewar@adacore.com>
12440         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
12441         on generic instances (do not consider them to be internally
12442         generated)
12444 2014-01-24  Doug Rupp  <rupp@adacore.com>
12446         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
12447         vice pthread_sigmask.
12449 2014-01-24  Vincent Celier  <celier@adacore.com>
12451         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
12452         not default.
12454 2014-01-24  Vincent Celier  <celier@adacore.com>
12456         * prj-ext.adb (Add): Do not output anything when Silent is True,
12457         whatever the verbosity. When Source is From_External_Attribute,
12458         set the corresponding environment variable if it is not already set.
12459         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
12460         to False
12461         * prj-proc.adb (Process_Expression_For_Associative_Array):
12462         For attribute External, call Prj.Ext.Add with Silent set to
12463         True for the child environment, to avoid useless output in non
12464         default verbosity.
12466 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12468         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
12469         range given by a subtype indication, and force evaluation of
12470         the bounds, as for a simple range.
12471         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
12472         of bounds of slice for various kinds of discrete ranges.
12473         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
12474         Evaluate_Slice_Bounds.
12476 2014-01-24  Bob Duff  <duff@adacore.com>
12478         * s-taskin.ads (Activator): Make this Atomic, because
12479         Activation_Is_Complete reads it, and that can be called
12480         from any task. Previously, this component was only
12481         modified by the activator before activation, and by
12482         Self after activation.
12483         * a-taside.ads, a-taside.adb (Environment_Task,
12484         Activation_Is_Complete): Implement these missing functions.
12486 2014-01-24  Doug Rupp  <rupp@adacore.com>
12488         * init.c: Add a handler section for Android.
12490 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
12492         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
12494 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12496         * sem_ch4.adb (Operator_Check): If one operand is a
12497         Raise_Expression, set its type to that of the other operand.
12498         * sem_res.adb (Resolve_Raise_Expression): new procedure.
12499         (Resolve_Actuals): For an actual that is a Raise_Expression,
12500         set the type to that of the formal.
12501         * sem_type.adb (Find_Unique_Type): If one of the operands is a
12502         Raise_Expression, return type of the other operand.
12504 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12506         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
12507         component of the record has a type with a default aspect, and
12508         the corresponding aggregate component is initiaized with a box,
12509         use the default value in the rewritten aggregate.
12511 2014-01-24  Tristan Gingold  <gingold@adacore.com>
12513         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
12514         s-interr-sigaction.adb,
12515         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
12516         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
12517         to the call to Install_Restricted_Handlers.
12519 2014-01-24  Emmanuel Briot  <briot@adacore.com>
12521         * prj-nmsc.adb (Check_File): Add protection when the source is
12522         not fully initialized.
12524 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
12526         * sem_util.adb (Is_Post_State): In a postcondition, a selected
12527         component that denotes an implicit dereference is a reference
12528         to the post state of the subprogram.
12530 2014-01-24  Robert Dewar  <dewar@adacore.com>
12532         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
12533         for generated subprograms.
12534         (Analyze_Subprogram_Specification): Ditto.
12536 2014-01-24  Vincent Celier  <celier@adacore.com>
12538         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
12539         attributes in package Builder of aggregate and aggregate library
12540         projects.
12541         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
12542         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
12543         Remove parameters.  Change error message from "... externally
12544         build library ..." to "... externally built project ...".
12545         (Process_Naming_Scheme.Check): Do not do any check in aggregate
12546         project, as attribute Library_Dir and Library_Name have already
12547         been detected as forbidden.
12549 2014-01-24  Vincent Celier  <celier@adacore.com>
12551         * prj-env.adb (Find_Project): If cached project path is not in
12552         project directory, look in current directory first and use cached
12553         project path only if project is not found in project directory.
12555 2014-01-24  Robert Dewar  <dewar@adacore.com>
12557         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
12559 2014-01-24  Vincent Celier  <celier@adacore.com>
12561         * projects.texi: Document that aggregate projects are only
12562         supported by gprbuild, but not by gnatmake.  Document that the
12563         only attribute Switches in package Binder of aggregate projects
12564         will be ignored if its index is not others.  Document that
12565         attribute Global_Config_File is allowed in package Binder of
12566         aggregate projects.
12568 2014-01-24  Robert Dewar  <dewar@adacore.com>
12570         * sem_prag.adb: Minor code reorganization.
12571         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
12573 2014-01-24  Pascal Obry  <obry@adacore.com>
12575         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
12576         attribute definition.
12578 2014-01-24  Vincent Celier  <celier@adacore.com>
12580         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
12581         in the Queue the same source (same path, same multi-source index)
12582         from the same project file, to avoid compiling several times
12583         the same source.
12585 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
12587         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
12588         (Has_Gigi_Rep_Item): Likewise.
12589         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
12590         Has_Gigi_Rep_Item for objects.
12591         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
12592         (prepend_one_attribute): ...this.
12593         (prepend_one_attribute_pragma): New function extracted from...
12594         (prepend_attributes): ...here.  Swap the parameters for consistency.
12595         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
12596         prepend_attributes.
12597         <object>: Deal with a pragma Linker_Section on a constant
12598         or variable.  <E_Function>: Deal with a pragma Linker_Section
12599         on a subprogram.
12600         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
12602 2014-01-24  Vincent Celier  <celier@adacore.com>
12604         * opt.ads: Minor comment update.
12606 2014-01-24  Robert Dewar  <dewar@adacore.com>
12608         * sem_prag.adb (Analyze_Input_Output): Add missing error check
12609         for junk operand.
12610         * sem_util.adb (Is_Refined_State): Add defense against junk
12611         tree from error.
12613 2014-01-24  Pascal Obry  <obry@adacore.com>
12615         * projects.texi: Removes Build_Slaves attribute documentation.
12617 2014-01-23  Robert Dewar  <dewar@adacore.com>
12619         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
12620         setting.
12622 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12624         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
12625         applies to expressions that come from source.
12626         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
12627         message.
12628         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
12629         rule regarding potentially unevaluated expressions, to prefix
12630         of attribute.
12632 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12634         * exp_util.adb (Make_Invqriant_Call): If type of expression is
12635         a private extension, get invariant from base type.
12637 2014-01-23  Robert Dewar  <dewar@adacore.com>
12639         * sem_util.adb, sem_attr.adb: Minor reformatting.
12641 2014-01-23  Robert Dewar  <dewar@adacore.com>
12643         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
12644         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
12645         * sem.adb (Semantics): Remove save/restore of
12646         SPARK_Mode[_Pragma]. Not needed since already done in
12647         Save/Restore_Opt_Config_Switches.
12649 2014-01-23  Robert Dewar  <dewar@adacore.com>
12651         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
12652         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
12653         Linker_Section enhancements.
12655 2014-01-23  Tristan Gingold  <gingold@adacore.com>
12657         * gnat_rm.texi: Minor editing.
12659 2014-01-23  Robert Dewar  <dewar@adacore.com>
12661         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
12662         with'ed internal units.
12663         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
12665 2014-01-23  Javier Miranda  <miranda@adacore.com>
12667         * lib-xref.adb (Generate_Reference): As part of processing the
12668         "end-of-spec" reference generate an extra reference to the first
12669         private entity of the package.
12670         * xr_tabls.adb (Add_Reference): No action needed for the extra
12671         'E' reference associated; similar to the processing of the
12672         'e' reference.
12674 2014-01-23  Bob Duff  <duff@adacore.com>
12676         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
12678 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12680         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
12681         predicate to implement rule given in 6.1.1 (20/3).
12682         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
12683         'Old in a postcondition, if it is potentially unevaluated and
12684         it is not an entity name.
12686 2014-01-23  Bob Duff  <duff@adacore.com>
12688         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
12690 2014-01-23  Robert Dewar  <dewar@adacore.com>
12692         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
12693         msg on VMS.
12695 2014-01-23  Bob Duff  <duff@adacore.com>
12697         * g-dynhta.ads: Minor comment fix.
12699 2014-01-23  Yannick Moy  <moy@adacore.com>
12701         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
12702         from spec on body only when not already inherited on spec. Set
12703         SPARK_Mode from context on body without previous spec.  *
12704         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
12705         library-level entities.  Correct retrieval of entity from
12706         declaration, for cases where the declaration is not a unit.
12707         * sem_ch12.adb (Instantiate_Object): Avoid
12708         calling Is_Volatile_Object on an empty node.
12710 2014-01-23  Robert Dewar  <dewar@adacore.com>
12712         * gnatlink.adb (Gnatlink): Check for suspicious executable file
12713         names on windows.
12715 2014-01-23  Robert Dewar  <dewar@adacore.com>
12717         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
12718         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
12719         style errors in instances.
12720         * g-dynhta.ads (Static_HTable): Comment updates.
12722 2014-01-23  Vincent Celier  <celier@adacore.com>
12724         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
12725         to find a configuration project file when Config_File_Name is
12726         No_Configuration_File.
12727         * prj-conf.ads (No_Configuration_File): New constant String.
12728         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
12729         with Config_File_Name set to No_Configuration_File, so that
12730         no existing configuration project file will be used, and the
12731         configuration project will be only created in memory when
12732         Add_Default_GNAT_Naming_Scheme is called.
12733         * projects.texi: Minor reformatting.
12735 2014-01-23  Vincent Celier  <celier@adacore.com>
12737         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
12738         a config project file if On_Load_Config is not null.
12739         * prj-pars.adb: Minor comment changes.
12741 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
12743         * lib-xref.adb (Output_References): Output progenitors of
12744         synchronized tagged types, for source navigation.
12746 2014-01-23  Robert Dewar  <dewar@adacore.com>
12748         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
12749         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
12750         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
12752 2014-01-23  Emmanuel Briot  <briot@adacore.com>
12754         * prj-conf.adb (Get_Or_Create_Configuration_File): call
12755         On_Load_Config later.
12757 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
12759         * sem_ch3.adb (Analyze_Declarations): Do not
12760         generate the spec of the late primitive in ASIS mode. Add two
12761         comments to explain the special cases when the expansion is
12762         not performed.
12764 2014-01-23  Robert Dewar  <dewar@adacore.com>
12766         * sem_util.adb (Note_Possible_Modification): Fix error of
12767         misbehaving for implicit dereference cases in -gnatc mode.
12769 2014-01-23  Emmanuel Briot  <briot@adacore.com>
12771         * prj-pars.adb: Minor reformatting.
12773 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12775         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
12776         body generated for an expression function within a protected body
12777         needs a set of renaming declarations if the expression function
12778         comes from source.
12780 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12782         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
12783         list interface progenitor of a tagged concurrent type, for better
12784         source navigation.
12786 2014-01-22  Robert Dewar  <dewar@adacore.com>
12788         * lib.adb (In_Extended_Main_Code_Unit): Return False for
12789         Standard_Location.
12790         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
12791         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
12792         treatment of Slocs No_Location and Standard_Location.
12793         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
12794         check for entity with Standard_Location Sloc, rather than relying
12795         on Lib routines to do that.
12796         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
12797         that a call cannot occur before a later occuring body within
12798         the same unit.
12800 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12802         * rtsfind.adb: Update comment.
12804 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
12806         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
12807         * sem_ch3.adb (Analyze_Declarations): Add local variable
12808         Body_Seen. Generate the spec of a late controlled
12809         primitive body that is about to freeze its related type.
12810         (Handle_Late_Controlled_Primitive): New routine.
12812 2014-01-22  Robert Dewar  <dewar@adacore.com>
12814         * a-stream.adb: Minor reformatting.
12816 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12818         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
12819         sub-procedure Declared_In_Actual to handle properly the visibility
12820         of actuals in actual packages, that are themselves actuals to a
12821         actual package of the current instance. This mimics properly the
12822         visibility of formals of formal packages declared with a box,
12823         within the corresponding generic unit.
12825 2014-01-22  Robert Dewar  <dewar@adacore.com>
12827         * checks.adb: Do not assume that a volatile variable is valid.
12829 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12831         * g-catiio.ads (Image, Value): Clarify that these functions
12832         operate in the local time zone.  Minor documentation update.
12834 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12836         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
12838 2014-01-22  Robert Dewar  <dewar@adacore.com>
12840         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
12841         Moved to sem_aux.adb.
12843 2014-01-22  Robert Dewar  <dewar@adacore.com>
12845         * vms_data.ads: Minor reformatting.
12847 2014-01-22  Robert Dewar  <dewar@adacore.com>
12849         * debug.adb: Document messages affected by -gnatd.E including
12850         the new ones that relate to late definition of equality.
12851         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
12852         debug flag -gnatd.E is set, then generate warnings rather than
12853         errors.
12854         (Check_Untagged_Equality): In earlier versions of Ada,
12855         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
12857 2014-01-22  Robert Dewar  <dewar@adacore.com>
12859         * sem_prag.adb (Usage_Error): Output additional messages for
12860         unconstrained OUT parameters lacking an input dependency.
12862 2014-01-22  Robert Dewar  <dewar@adacore.com>
12864         * sem_ch4.adb: Minor reformatting.
12866 2014-01-22  Robert Dewar  <dewar@adacore.com>
12868         * restrict.ads: Minor reformatting.
12869         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
12870         forbids a call from within a subprogram to the same subprogram.
12872 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12874         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
12875         stream attributes for Stream_Element_Array.
12876         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
12877         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
12878         defined in the current scope.
12880 2014-01-22  Robert Dewar  <dewar@adacore.com>
12882         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
12884 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12886         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
12888 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12890         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
12891         declaration initialized with a function call, whose type
12892         has variable size, need to remove side effects so that the
12893         initialization expression becomes a dereference of a temporary
12894         reference to the function result.
12896 2014-01-22  Yannick Moy  <moy@adacore.com>
12898         * errout.adb (Initialize): Remove trick to add dummy entry
12899         in Warnings table.
12900         * erroutc.adb (Set_Warnings_Mode_Off,
12901         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
12902         command line switch.
12903         * opt.ads (Warning_Mode): Document behavior
12904         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
12906 2014-01-22  Robert Dewar  <dewar@adacore.com>
12908         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
12910 2014-01-22  Robert Dewar  <dewar@adacore.com>
12912         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
12913         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
12914         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
12915         case Storage_Size): call Check_Pool_Size_Clash.
12917 2014-01-22  Robert Dewar  <dewar@adacore.com>
12919         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
12920         sem_eval.ads: Minor reformatting.
12922 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12924         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
12925         Any_Composite to prevent cascaded errors.
12927 2014-01-22  Yannick Moy  <moy@adacore.com>
12929         * errout.adb (Initialize): Do not insert special entry in Warnings
12930         table in GNATprove_Mode.
12931         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
12932         GNATprove_Mode.
12933         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
12934         warnings anymore.
12936 2014-01-22  Robert Dewar  <dewar@adacore.com>
12938         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
12939         initializes case.
12941 2014-01-22  Robert Dewar  <dewar@adacore.com>
12943         * snames.ads-tmpl: Update header.
12945 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12947         * exp_util.adb (Insert_Actions): When inserting actions on a
12948         short circuit operator that has already been analyzed, do not park
12949         actions in node; instead introduce an N_Expression_With_Actions
12950         and insert actions immediately.
12951         Add guard for unexpected case of climbing up through statement
12952         in Actions list of an N_Expression_With_Actions.
12953         * sem_elab.adb (Insert_Elab_Check): Remove complex
12954         specialized circuitry for the case where the context is already
12955         analyzed, as it is not needed and introduces irregularities in
12956         finalization. Instead rely on the above change to Insert_Actions
12957         to ensure that late insertion on short circuit operators works
12958         as expected.
12960 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12962         * sem_ch4.adb (Operator_Check): Improve error message when an
12963         operand of concatenation is an access type.
12965 2014-01-22  Thomas Quinot  <quinot@adacore.com>
12967         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
12968         cascaded error.
12970 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
12972         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
12973         of an expanded name in a proper body, whose prefix is a package
12974         in the context of the proper body, when there is a homonym of
12975         the package declared in the parent unit.
12977 2014-01-22  Robert Dewar  <dewar@adacore.com>
12979         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
12980         msg if errors found.
12981         (Check_One_Unit): Same change.
12983 2014-01-22  Robert Dewar  <dewar@adacore.com>
12985         * ug_words: Add missing/wrong entries for VMS warning switches.
12986         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
12988 2014-01-22  Jerome Guitton  <guitton@adacore.com>
12990         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
12991         arm.
12993 2014-01-22  Robert Dewar  <dewar@adacore.com>
12995         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
12997 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
12999         * gcc-interface/Makefile.in: Minor fixes.
13001 2014-01-21  Robert Dewar  <dewar@adacore.com>
13003         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
13004         * par-ch5.adb (P_Condition): New version with expression prescanned.
13005         * par.adb (P_Condition): New version with expression prescanned.
13007 2014-01-21  Robert Dewar  <dewar@adacore.com>
13009         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
13010         if Address is not a private type.
13011         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13012         Ignore pragma if System.Address is not a private type.
13014 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13016         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
13017         uninitialized value.
13019 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13021         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
13023 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13025         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
13026         the value of Assertions_Enabled flag when compiling an instance of
13027         an internal unit. This facilitates the use of pre/postconditions
13028         in generic internal units, such as the new elementary function
13029         libraries.
13031 2014-01-21  Robert Dewar  <dewar@adacore.com>
13033         * exp_aggr.adb: Minor reformatting.
13034         * sem_attr.adb: Minor reformatting.
13035         * sem_res.adb: Minor comment addition.
13036         * einfo.adb: Minor comment updates.
13037         * freeze.adb: Minor reformatting and code reorganization.
13039 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13041         * par-ch4.adb (P_If_Expression): Handle more gracefully an
13042         elsif clause that does not have an else part.
13044 2014-01-21  Robert Dewar  <dewar@adacore.com>
13046         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
13047         * gcc-interface/Makefile.in: clean up target pairs.
13049 2014-01-21  Pascal Obry  <obry@adacore.com>
13051         * projects.texi: Minor typo fix.
13053 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13055         * freeze.adb (Check_Component_Storage_Order): If a record type
13056         has an explicit Scalar_Storage_Order attribute definition clause,
13057         reject any component that itself is of a composite type and does
13058         not have one.
13060 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13062         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
13063         can be used to generate proper cross-reference information for
13064         the parent units of proper bodies.
13066 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13068         * exp_pakd.adb (Expand_Packed_Element_Set,
13069         Expand_Packed_Element_Reference): No byte swapping required in
13070         the front-end for the case of a reverse storage order array,
13071         as this is now handled uniformly in the back-end.  However we
13072         still need to swap back an extracted element if it is itself a
13073         nested composite with reverse storage order.
13075 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13077         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
13078         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
13079         include "others".
13081 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13083         * gnat_ugn.texi: Minor updates.
13085 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13087         * exp_pakd.adb: Update comment, minor reformatting.
13089 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13091         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
13092         object check when SPARK_Mode is on.
13093         * sem_ch6.adb (Process_Formals): Trigger the volatile object
13094         check when SPARK_Mode is on.
13095         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
13096         check when SPARK_Mode is on.
13097         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
13098         corresponding pragma of aspect SPARK_Mode in the visible
13099         declarations of a package declaration.
13100         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
13101         check when SPARK_Mode is on.
13102         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
13103         check when SPARK_Mode is on.
13104         (Resolve_Entity_Name): Trigger
13105         the volatile object check when SPARK_Mode is on.
13107 2014-01-21  Robert Dewar  <dewar@adacore.com>
13109         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
13110         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
13112 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13114         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
13115         object is declared, it is rewritten as a renaming of an dynamic
13116         expression that wraps the initial value.  The renaming declaration
13117         is first given an internal name, to prevent collisions with the
13118         entity already declared, and then the name is modified to reflect
13119         the original one. the modification of the name must preserve
13120         the source location of the original, to prevent spurious errors
13121         when compiling with style checks if the declaration involves
13122         more than one entity.
13124 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13126         * aspects.adb Add entries for Async_Readers, Async_Writers,
13127         Effective_Reads and Effective_Writes in table Canonical_Aspect.
13128         * aspects.ads Add entries for Async_Readers, Async_Writers,
13129         Effective_Reads and Effective_Writes in tables Aspect_Id,
13130         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
13131         * atree.adb (Ekind_In): New version with 8 parameters.
13132         (Node34): New routine.
13133         (Set_Node34): New routine.
13134         * atree.ads (Ekind_In): New version with 8 parameters.
13135         (Node34): New routine.
13136         (Set_Node34): New routine.
13137         * einfo.adb Contract is now Node34.
13138         (Contract): Update the assertion and node usage.
13139         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
13140         Effective_Reads and Effective_Writes.
13141         (Set_Contract): Update the assertion and node usage.
13142         (Write_Field24_Name): Remove the output for a contract.
13143         (Write_Field34_Name): Add output for a contract.
13144         * einfo.ads Contract is now Node34. Update the comment on
13145         attribute usage and related node structures.
13146         (Get_Pragma): Update the comment on usage.
13147         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
13148         Effective_Reads and Effective_Writes do not require special
13149         processing by the parser.
13150         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
13151         (Analyze_Declarations): Analyze the contract of a variable at
13152         the end of the declarative region.
13153         (Analyze_Object_Declaration): Create a contract for a variable.
13154         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
13155         of classification pragmas.
13156         (Process_Formals): Detect an illegal
13157         use of a volatile object as a formal in a function.
13158         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
13159         a volatile object as an actual in generic instantiation.
13160         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
13161         Effective_Reads and Effective_Writes in table Sig_Flags.
13162         (Analyze_External_State_In_Decl_Part): New routine.
13163         (Analyze_Global_Item): Detect an illegal use of a volatile object
13164         as a global item of a function.
13165         (Analyze_Pragma): Reimplement
13166         pragma Abstract_State. Add support for pragmas Async_Readers,
13167         Async_Writers, Effective_Reads and Effective_Writes.
13168         (Check_External_Properties): New routine.
13169         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
13170         (Check_External_Properties): New routine.
13171         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
13172         volatile object as an actual in a call.
13173         (Resolve_Entity_Name):
13174         Add local variables Par, Prev and Usage_OK. Detect illegal
13175         contexts of volatile objects.
13176         * sem_util.adb (Add_Contract_Item): Add support for
13177         pragmas associated with the contract of a variable.
13178         (Async_Readers_Enabled): New routine.
13179         (Async_Writers_Enabled): New routine.
13180         (Effective_Reads_Enabled): New routine.
13181         (Effective_Writes_Enabled): New routine.
13182         (Has_Enabled_Property):
13183         New routine.
13184         (Is_Unchecked_Conversion_Instance): New routine.
13185         (Is_Volatile_Object): Add support for entities that may denote
13186         a volatile object.
13187         * sem_util.ads (Add_Contract_Item): Update the
13188         comment on usage.
13189         (Async_Readers_Enabled): New routine.
13190         (Async_Writers_Enabled): New routine.
13191         (Effective_Reads_Enabled): New routine.
13192         (Effective_Writes_Enabled): New routine.
13193         (Is_Unchecked_Conversion_Instance): New routine.
13194         * sinfo.ads Update the comment on the structure of N_Contract.
13195         * snames.ads-tmpl Add predefined names for Async_Readers,
13196         Async_Writers, Effective_Reads and Effective_Writes. Add
13197         pragma ids for Async_Readers, Async_Writers, Effective_Reads
13198         and Effective_Writes.
13200 2014-01-21  Robert Dewar  <dewar@adacore.com>
13202         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
13203         * sem_eval.adb (Compile_Time_Known_Value): Remove special
13204         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
13205         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
13206         (Test_Foldable): Add CRT_Safe parameter
13207         * sem_eval.ads (Compile_Time_Known_Value): Remove special
13208         handling of CRT mode.
13209         (CRT_Safe_Compile_Time_Known_Value): New function.
13211 2014-01-21  Robert Dewar  <dewar@adacore.com>
13213         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
13214         with pragma or aspect that applies to package spec or subprogram
13215         spec.
13217 2014-01-21  Robert Dewar  <dewar@adacore.com>
13219         * exp_aggr.adb: Minor reformatting.
13221 2014-01-21  Johannes Kanig  <kanig@adacore.com>
13223         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
13225 2014-01-21  Bob Duff  <duff@adacore.com>
13227         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
13229 2014-01-21  Steve Baird  <baird@adacore.com>
13231         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
13233 2014-01-21  Vincent Celier  <celier@adacore.com>
13235         * prj-part.adb (Parse_Single_Project): Accept to extend a project
13236         if it has only be imported by an project being extended. When a
13237         project that has only been imported by a project being extended
13238         is imported by another project that is not being extended,
13239         reset the previous indication, so that it will be an error if
13240         this project is extended later.
13241         * prj-tree.adb (Create_Project): Include component From_Extended
13242         in table Projects_HT
13243         * prj-tree.ads (Project_Name_And_Node): New Boolean component
13244         From_Extended
13246 2014-01-21  Robert Dewar  <dewar@adacore.com>
13248         * atree.ads, atree.adb: Add Node33 and Set_Node33.
13249         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
13250         New field (SPARK_Pragma_Inherited): New flag
13251         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
13252         Removed.
13253         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
13254         * opt.ads (SPARK_Mode_Pragma): New global variable.
13255         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
13256         * sem_ch3.adb: Use new SPARK_Mode data structures.
13257         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
13258         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
13259         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
13260         (Pop_Scope): Restore SPARK_Mode_Pragma.
13261         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
13262         new data structures.
13264 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13266         * back_end.adb: Undo previous change, not needed. Minor reformatting.
13268 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13270         * exp_ch5.adb: Fix comment.
13271         * switch-c.adb: Minor comment update.
13272         * exp_ch3.adb: Minor reformatting.
13274 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13276         * back_end.adb (Scan_Compiler_Arguments): Do not store object
13277         filename in gnatprove mode.
13279 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13281         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
13282         suppresses usage of primitive _assign for tagged types).
13283         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
13284         No_Ctrl_Actions for a tagged type that does not require
13285         finalization, as we want to disable usage of _assign (which
13286         may cause undesirable discriminant checks on an uninitialized,
13287         invalid target).
13289 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13291         * sem_prag.adb: Reject invariant'class on completion.
13293 2014-01-21  Javier Miranda  <miranda@adacore.com>
13295         * exp_ch3.adb (Build_Init_Procedure): For
13296         derivations of interfaces, do not move the the initialization
13297         of the _parent field since such assignment is not generated.
13299 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13301         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
13302         with the operator it renames if we are within an expression of
13303         a pre/postcondition, because the expression will be reanalyzed
13304         at a later point, and the analysis of the renaming may affect
13305         the visibility of the operator when in an instance.
13307 2014-01-21  Robert Dewar  <dewar@adacore.com>
13309         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
13310         Add this flag to type conversion nodes and assignment nodes.
13311         * treepr.adb: Deal properly with Flag 1,2,3.
13312         * treeprs.adt: Minor comment update.
13314 2014-01-21  Robert Dewar  <dewar@adacore.com>
13316         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
13317         parameter.
13318         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
13319         parameter, completely rewrite spec.
13321 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13323         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
13324         instance that is inlined, it may have been rewritten as a wrapper
13325         package. In that case the unit that must be made visible is the
13326         related instance of the package.
13328 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13330         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
13331         previous change in codepeer mode.
13333 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13335         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
13336         call to Abort_Undefer, as expected by the runtime.
13337         * s-tasren.adb (Local_Complete_Rendezvous): Replace
13338         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
13339         deferred at this point. Update comments.
13341 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13343         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
13345 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13347         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
13348         remove from doc.
13350 2014-01-21  Robert Dewar  <dewar@adacore.com>
13352         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
13354 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13356         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
13357         this is value is used in Node_Id arithmetic operations.
13358         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
13359         instead of hard-coded unrolled code.
13361 2014-01-21  Yannick Moy  <moy@adacore.com>
13363         * gnat1drv.adb: Minor code cleanup, removing useless code.
13365 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13367         * opt.ads (SPARK_Switches_File_Name): New.
13368         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
13369         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
13370         * gnat_ugn.texi: Document -gnates.
13372 2014-01-21  Yannick Moy  <moy@adacore.com>
13374         * errout.adb (Special_Msg_Delete): Update comment. Remove
13375         special case for GNATprove which should not ignore mismatch
13376         in sizes for representation clauses.
13377         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
13378         which should not ignore pragma Pack.
13380 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13382         * sem_ch4.adb: Code clean up.
13384 2014-01-21  Steve Baird  <baird@adacore.com>
13386         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
13388 2014-01-21  Robert Dewar  <dewar@adacore.com>
13390         * gcc-interface/gigi.h: Get Flags array address.
13391         * gcc-interface/trans.c: Acquire Flags array address.
13392         * atree.adb: Add support for Flags array and Flag0,1,2,3.
13393         * atree.ads: Add support for Flags array and Flag0,1,2,3.
13394         * atree.h: Add support for Flags array and Flag0,1,2,3.
13395         * back_end.adb: Pass Flags array address to gigi.
13397 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13399         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
13400         reference to generated body so that legality checks on stream
13401         attributes are properly applied. If type is tagged and already
13402         frozen, insert generated body at the point of the renaming
13403         declaration.
13405 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13407         * sem_ch12.adb: Code clean up.
13408         * sem_ch8.adb: Minor reformatting
13410 2014-01-20  Robert Dewar  <dewar@adacore.com>
13412         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
13413         converting warnings on inevitable exceptions to errors.
13414         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
13415         converting warnings on inevitable exceptions to errors.
13416         * opt.adb (SPARK_Mode_Config): Handled like other config flags
13417         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
13418         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
13419         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
13420         New flag (Config_Switches_Type): Add SPARK_Mode field
13421         * sem.adb: Minor code reorganization (remove unnecessary with)
13422         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
13423         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
13424         converting warnings on inevitable exceptions to errors.
13425         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
13426         converting warnings on inevitable exceptions to errors.
13427         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
13428         converting warnings on inevitable exceptions to errors.
13429         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
13430         converting warnings on inevitable exceptions to errors.
13431         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
13432         from spec if needed
13433         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
13434         from spec if needed
13435         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
13436         Restore SPARK_Mode
13437         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
13438         converting warnings on inevitable exceptions to errors.
13439         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
13440         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
13441         of Get_SPARK_Mode_Id
13442         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
13443         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
13444         converting warnings on inevitable exceptions to errors.
13445         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
13446         converting warnings on inevitable exceptions to errors.
13447         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
13448         SPARK_Mode_Type
13450 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13452         * sem_ch13.adb: Add semantic information to rewritten type
13453         reference.
13455 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13457         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
13458         are of a type with unknown discriminants, convert both to the
13459         underlying view of the type, so that the proper constraint check
13460         can be applied to the right-hand side.
13462 2014-01-20  Robert Dewar  <dewar@adacore.com>
13464         * atree.adb (Copy_Node): Fix failure to copy last component
13465         (Exchange_Entities): Fix failure to exchange last entity
13467 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13469         * sem_ch12.adb: Code clean up.
13471 2014-01-20  Robert Dewar  <dewar@adacore.com>
13473         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
13475 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13477         * sem_ch4.adb (Analyze_Quantified_Expression): If after
13478         pre-analysis  the loop parameter specification has been
13479         rewritten as a iterator specification, propagate the change to
13480         the quantified expression, for ASIS navigtion needs.
13482 2014-01-20  Vincent Celier  <celier@adacore.com>
13484         * par-ch10.adb: Minor error message change: escape [ and ].
13486 2014-01-20  Robert Dewar  <dewar@adacore.com>
13488         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
13489         * errout.adb: Implement [ and ] insertion characters.
13490         * errout.ads: Document new [ and ] insertion characters.
13491         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
13492         addition of ??? comment.
13493         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
13494         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
13495         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
13496         Make warnings on exceptions into errors in GNATprove mode.
13497         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
13498         in error messages.
13500 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13502         * sem_ch13.adb: Code clean up.
13504 2014-01-20  Robert Dewar  <dewar@adacore.com>
13506         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
13507         messages.
13508         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
13509         error in GNATprove mode.
13511 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13513         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
13514         reference 'Old takes no parameters, and thus can appear as a
13515         prefix of a slice.
13517 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
13519         * exp_aggr.adb: Fix minor typos.
13521 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13523         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
13524         instance the attribute is legal, and its value is determined
13525         statically if the type has no discriminants. This choice is
13526         more useful than rechecking the legality rule in the instance,
13527         is consistent with older usage, and is also consistent with all
13528         existing tests.
13530 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13532         * sem_cat.adb (Validate_Static_Object_Name): Change error into
13533         warning in Relaxed_Semantic_Mode.
13535 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13537         * sem_attr.adb: Code and comments cleanup.
13539 2014-01-20  Yannick Moy  <moy@adacore.com>
13541         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
13542         * errout.adb (Compilation_Errors): Remove special handling in
13543         GNATprove mode.
13544         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
13545         removed debug flags.
13546         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
13547         Global, Initial_Condition, Initializes and Refined_State pragmas and
13548         aspects.
13549         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
13550         SPARK_Strict_Mode): Remove global flags.
13551         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
13552         always performed now, on packages declaring a null state.
13553         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
13554         at providing pedantic mode for bounds of integer types.
13555         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
13556         "some" quantified expression now issued under control of -gnatw.t,
13557         like the other warning on unused bound variable.
13558         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
13559         on removed flag.
13560         (Analyze_Pragma): Remove tests for SPARK 2014
13561         pragmas, not officially allowed by GNAT.
13563 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13565         * sem_prag.adb (Analyze_Pragma): Ensure that
13566         the sole argument of pragmas Abstract_State, Contract_Cases,
13567         Depends, Global and Initializes in in aggregate form.
13568         (Analyze_Refined_Pragma): Ensure that the sole argument of
13569         pragmas Refined_Depends, Refined_Global and Refined_State is in
13570         aggregate form.
13571         (Ensure_Aggregate_Form): New routine.
13573 2014-01-20  Doug Rupp  <rupp@adacore.com>
13575         * sem_attr.adb (Analyze_Attribute): case
13576         Attribute_Constrained => treat all prefixes as legal for Declib
13577         compatibility.
13579 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13581         * sem_prag.adb (Check_Mode): Reimplement the routine.
13582         (Find_Mode): New routine.
13584 2014-01-20  Robert Dewar  <dewar@adacore.com>
13586         * sem_ch4.adb (Operator_Check): Handle additional
13587         Allow_Integer_Address cases.
13589 2014-01-20  Robert Dewar  <dewar@adacore.com>
13591         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
13592         allowed if address is non-private, no longer true.
13593         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13594         Remove check for address being private, causes difficulty when
13595         pragma used in gnat.adc file and is not needed, since we guard
13596         this in Address_Integer_Convert_OK.
13597         * exp_ch7.adb: Minor reformatting.
13598         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
13600 2014-01-20  Robert Dewar  <dewar@adacore.com>
13602         * checks.adb (Apply_Range_Check): Remove gnatprove special
13603         casing of exponentiation.
13604         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
13605         operand for integer case to check range against Natural.
13607 2014-01-20  Robert Dewar  <dewar@adacore.com>
13609         * s-tataat.adb: Minor reformatting.
13611 2014-01-20  Robert Dewar  <dewar@adacore.com>
13613         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
13614         entities, and also fix documentation to remove mention of visible
13615         integer type, since this is not what the implementation does.
13616         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
13617         entities, and also fix documentation to remove mention of visible
13618         integer type, since this is not what the implementation does.
13619         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
13620         function.
13621         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
13622         case for parameter type check.
13623         * sem_res.adb (Resolve): Use new function
13624         Address_Integer_Convert_OK.
13625         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
13626         reformatting throughout.
13627         * sem_util.adb (Address_Integer_Convert_OK): New function.
13628         * sem_util.ads: Minor reformatting (put specs in alpha order)
13629         (Address_Integer_Convert_OK): New function.
13631 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13633         * exp_ch7.adb (Wrap_Transient_Expression):
13634         Insertion extra conditional expression only if
13635         Opt.Suppress_Control_Flow_Optimizations is set.
13637 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13639         * s-tataat.adb (Initialize_Attributes): Abort might already be
13640         deferred in Create_Task.
13642 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13644         * checks.adb (Apply_Scalar_Range_Check): Flag
13645         the exponent as requiring a range check when the expression is
13646         an exponentiation.
13648 2014-01-20  Fedor Rybin  <frybin@adacore.com>
13650         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
13652 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13654         * sem_util.adb (Default_Initialization): New routine.
13655         * sem_util.ads: Add new type Default_Initialization_Kind.
13656         (Default_Initialization): New routine.
13658 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13660         * sem_prag.adb (Check_Mode): Correct all error
13661         message logic dealing with in/in out parameters that may appear
13662         as inputs or have a self reference.
13664 2014-01-20  Robert Dewar  <dewar@adacore.com>
13666         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
13667         * sem_res.adb (Resolve): Fix error causing infinite loop for
13668         integer used as address. Allow addresses as integers.
13670 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13672         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
13674 2014-01-20  Bob Duff  <duff@adacore.com>
13676         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
13677         error when "use all" is not followed by "type".
13679 2014-01-20  Bob Duff  <duff@adacore.com>
13681         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
13682         followed by free.
13684 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13686         * checks.adb (Apply_Address_Clause_Check): If there is an
13687         alignment check on the expression in an address clause, and there
13688         is no local exception propagation, add an additional explanatory
13689         message to clarify the cause of previous warning.
13691 2014-01-20  Robert Dewar  <dewar@adacore.com>
13693         * exp_ch7.adb: Minor reformatting.
13694         * opt.ads: Minor comment updates.
13695         * sem.adb: Minor name change Is_Main_Unit =>
13696         Is_Main_Unit_Or_Main_Unit_Spec.
13697         * sem_ch6.adb: Minor reformatting and code reorganization.
13699 2014-01-20  Bob Duff  <duff@adacore.com>
13701         * gnat_ugn.texi: Update gnatpp switches.
13703 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13705         * exp_ch9.adb: Minor comment edit.
13707 2014-01-20  Robert Dewar  <dewar@adacore.com>
13709         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
13710         only if System.Address is a private type.
13711         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
13712         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13713         Allowed only if type System.Address is private, since otherwise
13714         it makes no sense.
13715         * sem_res.adb: Fix failure to properly Analyze unchecked
13716         conversions that were introduced by Allow_Integer_Address.
13717         * switch-c.adb: Remove -gnates switch.
13718         * usage.adb: Remove -gnates switch.
13719         * gnat_ugn.texi: Remove documentation of -gnates flag.
13721 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13723         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
13724         resolve expression to perform proper name capture.
13726 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13728         * sem.adb (Semantics): When saving/restoring configuration
13729         switches, the spec of a pre- defined unit that is the main unit
13730         must be treated as a predefined unit as well.
13732 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13734         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
13735         expression, insert an extra conditional expression when saving
13736         the value of the expression, for the benefit of control flow
13737         graph based coverage analysis.
13738         * exp_ch3.adb: Minor reformatting.
13740 2014-01-20  Robert Dewar  <dewar@adacore.com>
13742         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
13743         * gnat_rm.texi: Document pragma Allow_Integer_Address.
13744         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
13745         * opt.ads: New flag Allow_Integer_Address.
13746         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
13747         * sem_ch5.adb: Minor reformatting.
13748         * sem_prag.adb: Implement pragma Allow_Integer_Address.
13749         * sem_res.adb (Resolve): Allow integer address value if
13750         switch set.
13751         * sem_util.adb: Minor reformatting.
13752         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
13753         * switch-c.adb: Recognize flag -gnates.
13754         * usage.adb: Document flag -gnates.
13756 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13758         * s-tadeca.adb: Fix minor typos in comment.
13760 2014-01-20  Pascal Obry  <obry@adacore.com>
13762         * s-win32.ads (FreeLibrary): New import.
13764 2014-01-20  Robert Dewar  <dewar@adacore.com>
13766         * sem_res.adb, sem_cat.adb: Minor reformatting.
13767         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
13768         assigning to OUT parameters for the current subprogram scope.
13769         * exp_ch4.adb: Minor reformatting.
13771 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13773         * exp_ch4.adb (Process_Transient_Object,
13774         Find_Enclosing_Contexts): If the top-level if-expression that
13775         generated the transient object is an actual in a call, the proper
13776         Hook_Context is a construct enclosing the call.
13777         * einfo.ads: Indicate that Related_Expression is used to link a
13778         loop variable to the container expression over which the loop
13779         takes place.
13780         (Analyze_Iterator_Specification): Set the Related_Expression of
13781         the loop variable in a container element iterator.
13782         (Note_Possible_Modification): If the variable is the loop
13783         variable in a container element iterator, indicate that the
13784         enclosing container is also modified.
13786 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13788         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
13790 2014-01-20  Robert Dewar  <dewar@adacore.com>
13792         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
13793         Minor reformatting and code clean up.
13795 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13797         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
13798         of objects of private type if Relaxed_RM_Semantics.
13800 2014-01-20  Claire Dross  <dross@adacore.com>
13802         * a-cofove.ads (Vector): Capacity discriminant
13803         should be in range of the index.
13805 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13807         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
13808         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
13809         possible difference between epoch of Ada.Calendar clock and Ada
13810         real-time/tasking clock.
13811         * s-taprop-posix.adb: Minor comment fix.
13813 2014-01-20  Doug Rupp  <rupp@adacore.com>
13815         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
13817 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13819         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
13820         checks on the prefix of attribute 'Old.
13821         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
13822         generation of validity checks on a range that belongs to the
13823         iteration scheme of a quantified expression.
13824         * sem_ch5.adb (One_Bound): Suppress the generation of validity
13825         checks on a bound that belongs to the iteration scheme of a
13826         quantified expression, generate the check in all other cases.
13828 2014-01-20  Bob Duff  <duff@adacore.com>
13830         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
13832 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13834         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
13835         interpretations that do not come from other predefined units,
13836         to prevent spurious ambiguities in the presence of user-defined
13837         operators in the context of (an instance of) a predefined unit.
13839 2014-01-20  Robert Dewar  <dewar@adacore.com>
13841         * gnat_rm.texi: Document that Loop_Variant is included in
13842         Statement_Assertions.
13843         * sem_prag.adb (Check_Kind): Add Loop_Variant to
13844         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
13845         to Statement_Assertions.
13847 2014-01-20  Doug Rupp  <rupp@adacore.com>
13849         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
13850         for errno ENOENT from RTP on NFS mounted file system.
13852 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
13854         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
13855         examine code that does not come from source. The check does not
13856         apply to code generated for constraint checks, and such code may
13857         generate spurious error messages when compiled with expansion
13858         disabled (as in a generic unit) because side effects may not
13859         have been removed.
13860         2) Make error messages more explicit: indicate the component
13861         of the  construct whose value is indeterminate because of a
13862         call to a function with in-out parameter in another component,
13863         when there is no mandated order of execution between the two
13864         components (actuals, aggregate components, alternatives).
13866 2014-01-20  Robert Dewar  <dewar@adacore.com>
13868         * gnat_rm.texi: Minor cleanup.
13870 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13872         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
13873         can now apply to a refined postcondition.
13874         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
13875         variable Result_Seen. Add variables Case_Prag, Post_Prag,
13876         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
13877         whether postconditions and/or constract-cases mention attribute
13878         'Result and introduce a post-state when applied to functions.
13879         (Check_Result_And_Post_State): Removed.
13880         * sem_prag.adb (Analyze_Pragma): Add local variable
13881         Result_Seen. Verify that the expression of pragma Refined_Post
13882         mentions attribute 'Result and introduces a post-state.
13883         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
13885 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13887         * exp_ch7.adb (Is_Subprogram_Call): New routine.
13888         (Process_Transient_Objects): Make variable Must_Hook global with
13889         respect to all locally declared subprograms. Search the context
13890         for at least one subprogram call.
13891         (Requires_Hooking): Removed.
13893 2014-01-20  Claire Dross  <dross@adacore.com>
13895         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
13896         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
13897         External_Axiomatization);
13899 2014-01-20  Robert Dewar  <dewar@adacore.com>
13901         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
13902         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
13903         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
13904         Allow Loop_Entry to be used in these pragmas if they appear in
13905         an appropriate context.
13906         (Placement_Error): Specialize error
13907         message for pragma Assert[_And_Cut] or pragma Assume containing
13908         Loop_Entry attribute.
13909         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
13910         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
13911         and code clean ups.
13913 2014-01-20  Robert Dewar  <dewar@adacore.com>
13915         * gnat1drv.adb: Minor comment update.
13917 2014-01-20  Tristan Gingold  <gingold@adacore.com>
13919         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
13920         variables, comment out unused code.
13921         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
13922         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
13923         * s-excmac-arm.ads: New file.
13925 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13927         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
13928         Drange and Index_Typ. Remove the circuitry which creates a
13929         range check to compare the index type of the array against the
13930         discrete_range.
13931         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
13932         the circuitry which creates a range check to handle a
13933         discrete_range denoted by a subtype indication.
13935 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
13937         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
13938         nodes to get the original sloc range.
13940 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13942         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
13943         entity of a [library level] package.
13945 2014-01-20  Tristan Gingold  <gingold@adacore.com>
13947         * raise-gcc.c (exception_class_eq): New function.
13948         (is_handled_by): Use it to compare exception classes.
13949         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
13950         be called to return URC_CONTINUE_UNWIND.
13951         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
13952         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
13954 2014-01-20  Robert Dewar  <dewar@adacore.com>
13956         * opt.ads: Minor comment update.
13958 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13960         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
13961         constants to the "Local variables" area. Add new constant D. Add
13962         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
13963         to Pref_Typ and update all occurrences. Add circuitry to extract
13964         the discrete_range and the index type and build a range check.
13966 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
13968         * gnat1drv.adb (Adjust_Global_Switches): Enable
13969         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
13970         is set.
13972 2014-01-20  Thomas Quinot  <quinot@adacore.com>
13974         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
13976 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
13978         * sem_ch13.adb (Analyze_Aspect_Specifications):
13979         When aspect SPARK_Mode appears on a package body, insert the
13980         generated pragma at the top of the body declarations.
13982 2014-01-20  Robert Dewar  <dewar@adacore.com>
13984         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
13985         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
13986         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
13987         sem_ch8.adb, exp_dist.adb: Minor reformatting.
13989 2014-01-20  Yannick Moy  <moy@adacore.com>
13991         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
13992         mode.
13994 2014-01-20  Pascal Obry  <obry@adacore.com>
13996         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
13997         write scheme).
13998         * g-arrspl.adb: Adapt all routine to this new implementation.
13999         (Set): Copy the Slice_Set definition before reusing it.
14001 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14003         * sem_prag.adb (Process_Import_Or_Interface): In
14004         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
14005         (Analyze_Pragma): Ditto for pragma Export.
14006         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
14007         Import style.
14009 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14011         * einfo.ads: E_Abstract_State is now part of the entities that
14012         can be overloaded. Update type Overloadable_Kind to reflect the
14013         inclusion of abstract states.
14014         * sem_ch6.adb (New_Overloaded_Entity): A function can now
14015         overload an abstract state.
14016         * sem_prag.adb (Analyze_Constituent): Handle the overloading
14017         of states by functions. Use Entity_Of to obtain the entity of
14018         a constituent.  (Analyze_Global_Item): Handle the overloading of
14019         states by functions.
14020         (Analyze_Initialization_Item): Handle the
14021         overloading of states by functions.  Use Entity_Of to obtain the
14022         entity of an item.
14023         (Analyze_Input_Item): Handle the overloading
14024         of states by functions. Use Entity_Of to obtain the entity of an item.
14025         (Analyze_Input_Output): Handle the overloading of states by functions.
14026         (Analyze_Refinement_Clause): Handle the overloading
14027         of states by functions.  Use Entity_Of to obtain the entity of an item.
14028         (Appears_In): Use Entity_Of to obtain the entity of an element.
14029         (Check_Usage): Use Entity_Of to obtain the entity of
14030         an item. Add a guard to prevent a crash due to a previous error.
14031         (Resolve_State): New routine.
14033 2014-01-20  Yannick Moy  <moy@adacore.com>
14035         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
14036         opt.ads: Minor comments updates.
14038 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14040         * einfo.adb (Non_Limited_View): Applies to abstract states.
14041         (Set_From_Limited_With): Applies to abstract states.
14042         (Set_Non_Limited_View): Applies to abstract states.
14043         (Write_Field17): Output the non-limited view of an abstract state.
14044         * einfo.ads: Update the comment on usage and occurrences in
14045         nodes for attributes From_Limited_With and Non_Limited_View.
14046         * sem_aux.adb (Available_View): This routine can now handle
14047         abstract states.
14048         * sem_aux.ads (Available_View): This routine can now handle
14049         abstract states. Update the comment on usage.
14050         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
14051         of states and variables.
14052         (In_Pragmas_Depends_Or_Global): New routine.
14053         * sem_ch10.adb (Build_Limited_Views): Implement
14054         abstract (limited) views of variables and states.
14055         (Build_Shadow_Entity): This routine is now a procedure. Add
14056         formal parameter Shadow. Update the comment on usage. Add
14057         context-specific decoration for states and variables.
14058         (Decorate_State): New routine.  (Decorate_Variable): New routine.
14059         (Find_And_Process_States): New routine.
14060         (Process_Declarations): Renamed to Process_Declarations_And_States.
14061         (Process_Declarations_And_States): Add formal parameters
14062         Pack and Create_Abstract_Views. Update the comment on usage.
14063         (Process_States): New routine.
14064         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
14065         views of states and variables. Match the abstract view of a state
14066         against its corresponding non-abstract view.
14067         (Is_Matching_Input):
14068         Handle abstract views of states and variables. Match the abstract
14069         view of a state against its corresponding non-abstract view.
14070         (Process_Global_Item): Handle abstract views of states and
14071         variables.
14073 2014-01-20  Bob Duff  <duff@adacore.com>
14075         * sem_ch10.adb (Expand_With_Clause): Don't
14076         recurse on the prefix if the current with-ed name refers to a
14077         package that renames its own parent, eg "package P.Q renames P;".
14079 2014-01-20  Yannick Moy  <moy@adacore.com>
14081         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
14082         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
14083         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
14084         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
14085         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
14086         Expander_Active.
14088 2014-01-20  Yannick Moy  <moy@adacore.com>
14090         * sinfo.ads Update documentation of GNATprove mode.
14092 2014-01-20  Yannick Moy  <moy@adacore.com>
14094         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
14095         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
14096         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
14097         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
14098         GNATprove_Mode.
14099         * sem_ch13.adb: Remove blank.
14100         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
14101         subprograms by alias for renamings, not for inherited primitive
14102         operations.
14103         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
14104         in GNATprove mode.
14105         (Remove_Side_Effects): Apply the removal in
14106         GNATprove mode, for the full analysis of expressions.
14107         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
14108         mode.
14109         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
14110         save/restore actions for Expander_Active flag in GNATprove mode,
14111         similar to what is done in ASIS mode.
14112         * frontend.adb (Frontend): Generic bodies are instantiated in
14113         GNATprove mode.
14114         * gnat1drv.adb (Adjust_Global_Switches): Set operating
14115         mode to Check_Semantics in GNATprove mode, although a light
14116         expansion is still performed.
14117         (Gnat1drv): Set Back_End_Mode to
14118         Declarations_Only in GNATprove mode, and later on special case
14119         the GNATprove mode to continue analysis anyway.
14120         * lib-writ.adb (Write_ALI): Always generate ALI files in
14121         GNATprove mode.
14122         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
14123         Expander_Active.
14124         (SPARK_Mode): Renamed as GNATprove_Mode.
14125         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
14126         tree in GNATprove_Mode.
14127         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
14128         body in GNATprove mode.
14129         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
14130         mode.
14131         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
14132         Make sure side effects are removed in GNATprove mode.
14134 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14136         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
14137         for aliased objects with an unconstrained nominal subtype.
14138         * gcc-interface/trans.c (Call_to_gnu): Likewise.
14139         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
14140         <case N_Op_Minus>: Remove useless code.
14141         (Exception_Handler_to_gnu_zcx): Minor tweaks.
14143 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14145         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
14146         Tidy up.  For a subtype with discriminants and variant part, if a
14147         variant is statically selected and the fields all have a constant
14148         position, put them in order of increasing position.  Likewise if
14149         no variant part but representation clause is present.
14150         * gcc-interface/utils.c (make_packable_type): Robustify.
14151         (maybe_pad_type): Use local variable and tidy up condition.  If no
14152         alignment is specified, use the original one.
14153         (create_type_stub_decl): Minor tweak.
14154         (convert) <case VECTOR_CST>: Fix typo.
14155         <case CONSTRUCTOR>: Deal with padding types around the same type.
14156         Do not punt on missing fields.
14157         (unchecked_convert): Call finish_record_type to lay out the special
14158         record types made for conversions from/to problematic integer types.
14159         Bump the alignment of CONSTRUCTORs before converting them to a more
14160         aligned type.
14162 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14164         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
14165         obsolete code for type_annotate_only mode, simplify code and slightly
14166         improve wording of comments.
14168 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14170         PR ada/59772
14171         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
14172         as intermediate type.
14173         (UI_To_gnu): Likewise.
14175 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
14177         * gnatvsn.ads (Current_Year): Bump to 2014.
14179 2014-01-02  Tobias Burnus  <burnus@net-b.de>
14181         * gnat_ugn.texi: Bump @copying's copyright year.
14183 Copyright (C) 2014 Free Software Foundation, Inc.
14185 Copying and distribution of this file, with or without modification,
14186 are permitted in any medium without royalty provided the copyright
14187 notice and this notice are preserved.