* gcc-interface/utils.c (create_subprog_decl): Move code dealing with
[official-gcc.git] / gcc / ada / ChangeLog
blob916715ad62e1c9c29a17657f2a1fa1c37654c684
1 2014-11-05  Eric Botcazou  <ebotcazou@adacore.com>
3         * gcc-interface/utils.c (create_subprog_decl): Move code dealing with
4         conflicting inlining status of nested subprograms to...
5         * gcc-interface/trans.c (check_inlining_for_nested_subprog): ...here.
6         (Attribute_to_gnu) <Attr_Access>: Call it.
7         (Call_to_gnu): Likewise.
8         (Subprogram_Body_to_gnu): Drop the body if it is an inlined external
9         function that has been marked uninlinable.
11 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
13         * aspects.adb Add an entry for aspect Ghost in table
14         Canonical_Aspect.
15         * aspects.ads Add an entry for aspect Ghost in tables
16         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
17         Implementation_Defined_Aspect.
18         * einfo.adb: Flags 277 and 278 are now in use.
19         (Is_Checked_Ghost_Entity): New routine.
20         (Is_Ghost_Entity): Removed.
21         (Is_Ghost_Subprogram): Removed.
22         (Is_Ignored_Ghost_Entity): New routine.
23         (Set_Is_Checked_Ghost_Entity): New routine.
24         (Set_Is_Ignored_Ghost_Entity): New routine.
25         (Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
26         Is_Ignored_Ghost_Entity.
27         * einfo.ads: Add new flags Is_Checked_Ghost_Entity
28         and Is_Ignored_Ghost_Entity along with usage in nodes.
29         (Is_Checked_Ghost_Entity): New routine and pragma Inline.
30         (Is_Ghost_Entity): Removed along with synthesized flag
31         description and usage in nodes.
32         (Is_Ghost_Subprogram): Removed along with synthesized flag description
33         and usage in nodes.
34         (Is_Ignored_Ghost_Entity): New routine and pragma Inline.
35         (Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
36         (Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
37         * freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
38         volatile.
39         * par-prag.adb Pragma Ghost does not need special handling by
40         the parser.
41         * repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
42         * sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
43         * sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
44         the type as Ghost when its enclosing context is Ghost.
45         (Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
46         its enclosing context is Ghost.
47         (Analyze_Number_Declaration): Mark the number as Ghost when its
48         enclosing context is Ghost.
49         (Analyze_Object_Declaration): Mark the object as Ghost when its
50         enclosing context is Ghost. Verify the Ghost policy between
51         initial declaration and completion of a deferred constant.
52         (Analyze_Object_Contract): A Ghost variable cannot be effectively
53         volatile, imported or exported.
54         (Build_Derived_Record_Type): Mark a type extension as Ghost when it
55         implements a Ghost interface.
56         (Build_Record_Type): Inherit volatility and "ghostness" from
57         the parent type.
58         (Check_Completion): A Ghost entity declared
59         in a non-Ghost package does not require completion in a body.
60         (Implements_Ghost_Interface): New routine.
61         (Process_Full_View): Inherit "ghostness" from the partial view. Verify
62         the Ghost policy between the partial and full views. Verify the
63         completion of a Ghost type extension.
64         * sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
65         * sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
66         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
67         the subprogram as Ghost when its enclosing context is Ghost.
68         (Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
69         when its enclosing context is Ghost. Verify the Ghost policy
70         between the spec and body.
71         (Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
72         enclosing context is Ghost. Verify the Ghost policy between the spec
73         and body.
74         (Check_Conformance): A Ghost subprogram profile and a non-Ghost
75         subprogram profile are not subtype conformant.
76         (Convention_Of): Removed.
77         * sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
78         "ghostness" from the spec. Verify the Ghost policy between
79         the spec and body.
80         (Analyze_Private_Type_Declaration): Mark the type as Ghost when its
81         enclosing context is Ghost.
82         (Requires_Completion_In_Body): New routine.
83         (Unit_Requires_Body): Use Requires_Completion_In_Body.
84         (Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
85         comment on usage and all uses of P in the body. Use
86         Requires_Completion_In_Body.
87         * sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
88         to Pack_Id, update comment on usage and all uses of P in the body.
89         * sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
90         from the renamed excention.
91         (Analyze_Generic_Renaming): Inherit the "ghostness" from the
92         renamed generic subprogram.
93         (Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
94         object.
95         (Analyze_Package_Renaming): Inherit the "ghostness" from the
96         renamed package.
97         (Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
98         renamed subprogram.
99         * sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
100         as Ghost when its enclosing context is Ghost.
101         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
102         Analyze_Generic_Subprogram_Declaration): Mark an exception as
103         Ghost when its enclosing context is Ghost.
104         (Preanalyze_Actuals): Remove obsolete check.
105         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
106         for aspect Ghost.
107         (Check_Aspect_At_Freeze_Point): Aspects
108         Depends and Global do no need special checking at freeze point.
109         (Insert_After_SPARK_Mode): Update comment on usage.
110         * sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
111         * sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
112         (Analyze_Abstract_State): Update the grammar of the pragma. Add
113         formal parameter Pack_Id along with comment on usage. Mark an
114         abstract state as Ghost when its enclosing context is Ghost. Add
115         processing for option Ghost.
116         (Analyze_Constituent): Verify
117         that a Ghost abstract state is refined by Ghost constituents.
118         (Analyze_Pragma): "Ghost" is now a valid policy. Add checks
119         related to the use and placement of Check_Policy Ghost. Add
120         processing for pragma Ghost.
121         (Check_Ghost_Constituent): New routine.
122         (Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
123         (Process_Convention): Remove obsolete check.
124         (Set_Convention_From_Pragma): Remove the processing for convention
125         Ghost.
126         * sem_res.adb (Check_Ghost_Context): New routine.
127         (Resolve_Call): Verify that a reference to a Ghost entity appears in a
128         suitable context. Verify the Ghost polity between point of declaration
129         and point of use.
130         (Resolve_Entity_Name): Verify that a reference to
131         a Ghost entity appears in a suitable context. Verify the Ghost
132         polity between point of declaration and point of use.
133         * sem_util.adb (Check_Ghost_Completion): New routine.
134         (Check_Ghost_Derivation): New routine.
135         (Incomplete_Or_Partial_View): New routine.
136         (Incomplete_Or_Private_View): Removed.
137         (Is_Ghost_Entity): New routine.
138         (Is_Ghost_Statement_Or_Pragma): New routine.
139         (Is_Subject_To_Ghost): New routine.
140         (Policy_In_Effect): New routine.
141         (Set_Is_Ghost_Entity): New routine.
142         (Within_Ghost_Scope): New routine.
143         * sem_util.ads (Check_Ghost_Completion): New routine.
144         (Check_Ghost_Derivation): New routine.
145         (Incomplete_Or_Partial_View): New routine.
146         (Incomplete_Or_Private_View): Removed.
147         (Is_Ghost_Entity): New routine.
148         (Is_Ghost_Statement_Or_Pragma): New routine.
149         (Is_Subject_To_Ghost): New routine.
150         (Policy_In_Effect): New routine.
151         (Set_Is_Ghost_Entity): New routine.
152         (Within_Ghost_Scope): New routine.
153         * snames.adb-tmpl (Get_Convention_Id): Remove the entry for
154         convention Ghost.
155         (Get_Convention_Name): Remove the entry for convention Ghost.
156         * snames.ads-tmpl Remove the convention id for Ghost. Add a
157         pragma id for Ghost.
159 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
161         * gnat_ugn.texi: Add description of --RTS option for ASIS tools.
163 2014-10-31  Olivier Hainque  <hainque@adacore.com>
165         * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
167 2014-10-31  Vincent Celier  <celier@adacore.com>
169         * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
170         * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
171         get the project Display_Name.
172         * prj-tree.adb (Display_Name_Of): New function
173         (Set_Display_Name_Of): New procedure.
174         (Create_Project): Call Set_Display_Name_Of.
175         * prj-tree.ads (Display_Name_Of): New function.
176         (Set_Display_Name_Of): New procedure.
177         (Project_Node_Record): New component Display_Name.
178         (Project_Name_And_Node): Remove component Display_Name.
179         * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
180         Config_File_Path as the Config_File_Name, not just its simple
181         name.
183 2014-10-31  Thomas Quinot  <quinot@adacore.com>
185         * get_scos.adb: Minor reformatting.
187 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
189         * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
190         capture declaration for cursor to prevent spurious errors when
191         several formal iterators that use the same cursoe name appear
192         in the same context.
194 2014-10-31  Vincent Celier  <celier@adacore.com>
196         * prj-proc.adb (Recursive_Process): Make sure that the project
197         display name is never No_Name.
199 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
201         * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
202         message if reference does not come from source, as in the case
203         for the controlling argument of a dispatching call. Error is
204         diagnosed when call is resolved.
205         * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
206         reference in error message.
207         * sem_res.adb (Check_Prefixed_Call): ditto.
209 2014-10-31  Yannick Moy  <moy@adacore.com>
211         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
212         suppress checks when pragma Restrictions (No_Exception) is used in
213         CodePeer or GNATprove mode.
215 2014-10-31  Yannick Moy  <moy@adacore.com>
217         * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
218         checks as not suppressed in GNATprove mode.
220 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
222         * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
223         being pre-analyzed.
224         * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
225         view are those of the base, use rep_item chain of partial view,
226         which may include aspects.
227         * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
228         of base type, to handle properly declared subtypes.
230 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
232         * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
233         is a default storage pool, add a corresponding aspect to the
234         generic unit, to be used at the point of instantiation.
235         (Analyze_Package_Instantiation): If generic unit has aspect
236         specifications, propagate them to instance. If instance has a
237         Default_Storage_Pool aspect, make sure that it overrides the
238         one that may be inherited from the generic.
240 2014-10-31  Vincent Celier  <celier@adacore.com>
242         * prj-attr.adb: Minor removal of attributes of package Linker
243         that have never been used and never been documented.
244         * projects.texi: Add documentation for attribute Runtime.
245         * prj-nmsc.adb (Check_Configuration): Do not report a warning
246         for unknown compilers when the project is externally built.
248 2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>
250         * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
251         Normalized_Pathname doesn't inhibit the custom Selected_Target
252         value.
253         * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
254         Automatically_Generated is correctly set after the first call
255         to Process_Project_And_Apply_Config and not modified after the
256         second call, if any.
258 2014-10-31  Yannick Moy  <moy@adacore.com>
260         * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
261         files.
262         * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
263         vectors, suitable for use in client SPARK code, also more
264         efficient than the standard vectors.
265         * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
266         are used to define formal indefinite vectors in terms of formal
267         definite ones.
268         * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
269         definite vectors, similar to the API of the new indefinite ones. A
270         new formal parameter of the generic unit called Bounded allows
271         to define growable vectors that use dynamic allocation.
273 2014-10-31  Vincent Celier  <celier@adacore.com>
275         * prj-conf.adb (Look_For_Project_Paths): New procedure
276         (Parse_Project_And_Apply_Config): Initially, parse the project
277         files ignoring missing withs. If there are missing withs, extend
278         the project path with directories rooted at the compiler roots,
279         including directories rooted at the runtime roots, if there are
280         non default runtimes, in the PATH orser.
281         * prj-env.adb (Initialize_Default_Project_Path): Do not add
282         any directory from the prefix if the target is "-".
283         * prj-part.adb (Parse): Initialize the tables, as Parse may be
284         call several times by gprbuild.
285         * prj.adb (Update_Ignore_Missing_With): New procedure.
287 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
289         * sem_aux.adb (First_Stored_Discriminant,
290         Has_Completely_Hidden_Discriminant): When scanning the list of
291         discriminants to locate possibly hidden (inherited) discriminants,
292         ignore itypes that may appear in the entity list, when an access
293         discriminants is constrained by an access attribute reference.
295 2014-10-31  Javier Miranda  <miranda@adacore.com>
297         * freeze.adb (Freeze_Record_Type): Add missing
298         check to verify that all the primitives of an interface type
299         are abstract or null procedures.
301 2014-10-31  Vincent Celier  <celier@adacore.com>
303         * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
304         redirects standard output and standard error to two different files.
306 2014-10-31  Bob Duff  <duff@adacore.com>
308         * makeutl.ads: Minor comment fix.
310 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
312         * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
313         Memory_Size): Use Standard'Word_Size so that the value can be changed
314         via a target configuration file.
316 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
318         * exp_ch4.adb: Minor tweak.
320 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
322         * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
323         back-end inlining.
324         (Must_Inline_Subp): Delete.
325         * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
327 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
329         * freeze.adb (Freeze_Entity): A default_pool does not apply to
330         internal access types generated for 'access references.
331         * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
332         not null it must designate a variable.
334 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
336         * inline.adb: Minor reformatting.
338 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
340         * sem_ch3.adb (Build_Derived_Private_Type): If the derived
341         type has access discriminants, create itype references for their
342         anonymous types, so that they are elaborated before the generated
343         bodies for the primitive operations of the type.
345 2014-10-31  Tristan Gingold  <gingold@adacore.com>
347         * prj-conf.adb (Locate_Runtime): Remove procedure.
349 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
351         * inline.adb (Has_Excluded_Declaration): With back-end inlining,
352         only return true for nested packages.
353         (Cannot_Inline): Issue errors/warnings whatever the optimization level
354         for back-end inlining and remove assertion.
356 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
358         * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
359         the desired order of '*' and '/' operations to avoid overflow.
361 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
363         * exp_ch6.adb (Do_Inline): Remove unreachable code.
364         (Do_Inline_Always): Likewise.
366 2014-10-31  Vincent Celier  <celier@adacore.com>
368         * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
369         when library has no Ada interfaces and Library_Standalone is
370         declared.
372 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
374         * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
375         on address clauses in CodePeer mode.
377 2014-10-31  Javier Miranda  <miranda@adacore.com>
379         * inline.adb (Expand_Inlined_Call): Do not skip
380         inlining of calls to subprogram renamings.
382 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
384         * sem_res.adb (Resolve_Entity_Name): Account for
385         the case where the immediate parent of a reference to an entity
386         is a parameter association.
388 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
390         * inline.adb (Check_And_Split_Unconstrained_Function): Do not
391         test for the presence of nested subprograms.
393 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
395         * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
396         * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
397         Default_Storage_Pool.
399 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
401         * sem_ch6.adb: Remove obsolete comment.
403 2014-10-31  Olivier Hainque  <hainque@adacore.com>
405         * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
406         of 4si, as pixels are short.
408 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
410         * sem_res.adb (Resolve_Call): Do not reject a call to a protected
411         operation in the spec of a protected type, when the call appears
412         in a pre/postcondition for another protected operation.
414 2014-10-31  Tristan Gingold  <gingold@adacore.com>
416         * prj-conf.adb: Locate_Runtime: Always search the runtime in
417         project path.
419 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
421         * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
422         change to use correct idiom for back-end inlining.
424 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
426         * freeze.adb (Freeze_Record_Type): Do not check component size
427         if its type is generic.
429 2014-10-31  Bob Duff  <duff@adacore.com>
431         * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
433 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
435         * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
436         * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
437         indexing as well as function calls.  b)  If the context is a
438         selected component and whe are in an instance, remove entity from
439         selector name to force resolution of the node, so that explicit
440         dereferences can be generated in the instance if they were in
441         the generic unit.
443 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
445         * inline.adb (Back_End_Cannot_Inline): Delete.
446         (Add_Inlined_Subprogram): Do not call it.
448 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
450         * exp_ch3.ads (Make_Tag_Assignment): New function, used to
451         re-initialize the tag in a tagged object declaration with
452         initial value.
453         * exp_ch3.adb (Expand_N_Object_Declaration): Use
454         Make_Tag_Assignment to simplify code for a tagged object
455         declaration.
456         * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
457         for the freeze node of an object.
458         * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
459         needed to extend Freeze_Actions for a tagged object declaration.
461 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
463         * gnat_ugn.texi: Further minor improvement to -flto entry.
465 2014-10-31  Gary Dismukes  <dismukes@adacore.com>
467         * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
469 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
471         * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
473 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
475         * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
476         indication is provided, check properly that it covers the element
477         type of of the container type.
479 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
481         * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
482         -based hash table.
484 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
486         * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
487         Has_Following_Address_Clause so that it returns the address
488         clause if present, rather than a boolean value.
489         * sem_ch3.adb (Analyze_Object_Declaration): use
490         Following_Address_Clause.
491         * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
492         is initialized, insert tag assignment after object is frozen,
493         which may be after an address clause that follows the declaration.
495 2014-10-30  Tristan Gingold  <gingold@adacore.com>
497         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
498         system-vxworks-arm.ads, system-freebsd-x86_64.ads,
499         system-linux-hppa.ads, system-linux-s390.ads,
500         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
501         system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
502         system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
503         system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
504         system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
505         system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
506         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
507         system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
508         system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
509         pragma No_Elaboration_Code_All.
511 2014-10-30  Eric Botcazou  <ebotcazou@adacore.com>
513         * gnat_ugn.texi: Minor improvement to -flto entry.
515 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
517         * sem_util.adb (Inherit_Subprogram_Contract):
518         Add a guard to protect against enumeration literal overriding.
519         * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
520         Minor reformatting (add SPARK RM references).
522 2014-10-30  Robert Dewar  <dewar@adacore.com>
524         * exp_dbug.adb, opt.ads: Minor reformatting.
526 2014-10-30  Yannick Moy  <moy@adacore.com>
528         * inline.adb (Has_Single_Return_In_GNATprove_Mode):
529         Return False when return statement is inside one or more blocks.
531 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
533         * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
534         object declaration initialized by a function call that returns
535         an unconstrained result may be rewritted as a renaming of the
536         secondary stack result.
538 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
540         * aspects.adb: Add an entry for aspect Extensions_Visible in
541         table Canonical_Aspect.
542         * aspects.ads: Add entry for aspect Extensions_Visible in
543         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
544         Implementation_Defined_Aspect.
545         * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
546         the list of contract pragmas.
547         * par-prag.adb Pragma Extensions_Visible does not require special
548         processing from the parser.
549         * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
550         implicit class-wide conversion of a formal parameter
551         of a specific tagged type whose related subprogram is
552         subject to pragma Extensions_Visible with value "False".
553         (Check_Abstract_Overriding): Add various overriding checks
554         related to pragma Extensions_Visible.
555         (Derive_Subprogram):
556         A subprogram subject to pragma Extensions_Visible with value
557         False requires overriding if the subprogram has at least one
558         controlling OUT parameter.
559         (Is_EVF_Procedure): New routine.
560         * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
561         a specific tagged type whose related subprogram is subject to
562         pragma Extensions_Visible with value "False" cannot appear in
563         a class-wide conversion.
564         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
565         the assertion to account for pragma Extensions_Visible.
566         (Check_Overriding_Indicator): An overriding subprogram
567         inherits the contact of the overridden subprogram.
568         (New_Overloaded_Entity): An overriding subprogram inherits the
569         contact of the overridden subprogram.
570         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
571         for aspect Extensions_Visible.
572         (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
573         require special processing at the freeze point.
574         * sem_prag.adb Add an entry for pragma Extensions_Visible in
575         table Sig_Flags.
576         (Analyze_Pragma): Ensure that various SPARK
577         pragmas lack identifiers in their arguments. Add processing for
578         pragma Extensions_Visible.
579         (Chain_CTC): Code reformatting.
580         * sem_res.adb (Resolve_Actuals): A formal parameter of a
581         specific tagged type whose related subprogram is subject to
582         pragma Extensions_Visible with value "False" cannot act as an
583         actual in a subprogram with value "True".
584         * sem_util.adb (Add_Classification): New routine.
585         (Add_Contract_Item): Account for pragma Extensions_Visible. Code
586         reformatting.
587         (Add_Contract_Test_Case): New routine.
588         (Add_Pre_Post_Condition): New routine.
589         (Extensions_Visible_Status): New routine.
590         (Inherit_Subprogram_Contract): New routine.
591         (Is_EVF_Expression): New routine.
592         (Is_Specific_Tagged_Type): New routine.
593         * sem_util.ads Add type Extensions_Visible_Mode and document all values.
594         (Add_Contract_Item): Add pragma Extensions_Visible to the
595         comment on usage.
596         (Inherit_Subprogram_Contract): New routine.
597         (Is_EVF_Expression): New routine.
598         (Is_Specific_Tagged_Type): New routine.
599         * sinfo.adb (Is_Inherited): New routine.
600         (Set_Is_Inherited): New routine.
601         * sinfo.ads Add flag Is_Inherited along with its usage in
602         nodes.
603         (Is_Inherited): New routine along with pragma Inline.
604         (Set_Is_Inherited): New routine along with pragma Inline.
605         * snames.ads-tmpl: Add predefined name "Extensions_Visible"
606         and a new Pragma_Id for the pragma.
608 2014-10-30  Vincent Celier  <celier@adacore.com>
610         * prj-proc.adb (Process_Case_Construction): Do not look for
611         the ultimate extending project for a case variable.
613 2014-10-30  Pierre-Marie Derodat  <derodat@adacore.com>
615         * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
616         enumerators.
617         (gnat_encodings): Define a dummy variable for the AAMP back-end.
618         (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
619         for all discrete types whose bounds do not match size and do so
620         only for biased types when -fgnat-encodings=minimal.
621         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
622         parallel types when array bounds are constant while the lower bound is
623         not 1.  Also stop generating them because the bound type is
624         larger than sizetype.
625         * gcc-interface/misc.c (gnat_encodings): New.
627 2014-10-30  Thomas Quinot  <quinot@adacore.com>
629         * opt.adb (Set_Opt_Config_Switches): For an internal unit,
630         always reset Default_SSO to ' '.
632 2014-10-30  Thomas Quinot  <quinot@adacore.com>
634         * freeze.adb (Freeze_Record_Type): Set SSO from default before
635         checking SSO consistency.
637 2014-10-30  Javier Miranda  <miranda@adacore.com>
639         * inline.adb (Check_Package_Body_For_Inlining):
640         Cleanup this subprogram to implement exactly the behavior
641         documented in the spec.
643 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
645         * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
646         Update the position after all insertions have taken place.
648 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
650         * sem_prag.adb (Analyze_Pragma, case License): Do not perform
651         analysis of pragma arguments when in CodePeer mode, pragma has
652         different format on other compilers.
654 2014-10-30  Thomas Quinot  <quinot@adacore.com>
656         * s-os_lib.adb: Minor reformatting.
658 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
660         * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
661         gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
662         Remove redundant enum from machine_mode.
664 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
666         * gcc-interface/trans.c: Adjust include files.
667         * gcc-interface/utils.c: Ditto.
669 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
671         * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
673 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
675         * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
676         support here instead of...
677         Do not set flag_delete_dead_exceptions to 1 unconditionally.
678         (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
679         (gnat_init_gcc_fp): ...here.
681 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
683         * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
685 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
687         * gcc-interface/utils.c (create_var_decl_1): For a variable declared
688         in the unit, set TREE_PUBLIC only if it has static storage duration.
690 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
692         * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
693         of derived packed array types to constrained subtypes only.
695 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
697         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
698         superfluous computation for the max size.
699         <E_Array_Subtype>: Likewise.  Make sure that the max size calculation
700         does not overflow at compile time.
702 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
704         * sem_eval.adb (Check_Non_Static_Context): Do not set
705         Is_Machine_Number on a literal of a fixed-point type.
707 2014-10-23  Robert Dewar  <dewar@adacore.com>
709         * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
711 2014-10-23  Pierre-Marie Derodat  <derodat@adacore.com>
713         * exp_dbug.ads: Update ___XA parallel type specification.
715 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
717         * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
718         chain of the source type.
719         * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
720         reformatting of an error message.
721         * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
722         chain that has been inherited already.
724 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
726         * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
727         in generic context, and generate body in this case as well,
728         to simplify ASIS traversals on the construct.
730 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
732         * sem_ch4.adb (Complete_Object_Operation): Indicate that the
733         scope of the operation (s) is referenced, to prevent spurious
734         warnings about unused units.
736 2014-10-23  Johannes Kanig  <kanig@adacore.com>
738         * errout.adb (Error_Msg_Internal): Copy check flag, increment
739         check msg count.
740         * erroutc.adb (Delete_Msg) adjust check msg count.
741         (Output_Msg_Text) handle check msg case (do nothing).
742         (Prescan_Message) recognize check messages with severity prefixes.
743         * errutil.adb (Error_Msg) handle check flag, adjust counter.
745 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
747         * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
748         type, check for the presence of discriminants in its parent type,
749         against the presence of discriminants in the context type.
751 2014-10-23  Tristan Gingold  <gingold@adacore.com>
753         * adaint.c: __gnat_get_file_names_case_sensitive: Default is
754         true on arm-darwin.
756 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
758         * pprint.adb (Expression_Image): Add handling of quantifiers.
760 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
762         * exp_pakd.adb (Expand_Packed_Element_Reference): If the
763         prefix is a source entity, generate a reference to it before
764         transformation, because rewritten node might not generate a
765         proper reference, leading to spurious warnings.
767 2014-10-23  Tristan Gingold  <gingold@adacore.com>
769         * init.c: Fix thinko in previous patch.
771 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
773         * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
774         Inherit the rep chain of the implicit base type.
775         (Floating_Point_Type_Declaration): Inherit the rep chain of the
776         implicit base type.
777         (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
778         implicit base type.
779         (Signed_Integer_Type_Declaration): Inherit the rep chain of the
780         implicit base type.
781         * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
783 2014-10-23  Pascal Obry  <obry@adacore.com>
785         * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
786         view of the registry.
788 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
790         * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
791         return without expanding expression, to prevent subsequent crash.
792         * freeze.adb: better error message for illegal declaration.
794 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
796         * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
797         substring which represents the time zone on VxWorks.
799 2014-10-23  Vincent Celier  <celier@adacore.com>
801         * gnatls.adb: If --RTS= was not used, check if there is a default
802         runtime. If there is none, in verbose mode, indicate that the
803         default runtime is not available and show only the current
804         directory in the source and the object search paths.
806 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
808         * sem_ch6.adb (Process_Formals): A thunk procedure with a
809         parameter of a limited view does not need a freeze node.
811 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
813         * sem_ch7.adb (Analyze_Package_Body_Helper):
814         The logic which hides local entities from external
815         visibility is now contained in routine Hide_Public_Entities.
816         (Hide_Public_Entities): New routine. Object and subprogram
817         renamings are now hidden from external visibility the same way
818         objects are.
820 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
822         * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
823         does not require freezing, in particular if it denotes a generic
824         function.
826 2014-10-23  Yannick Moy  <moy@adacore.com>
828         * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
829         Disable analysis in GNATprove mode.
831 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
833         * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
835 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
837         * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
838         pragmas in codepeer mode.
840 2014-10-23  Gary Dismukes  <dismukes@adacore.com>
842         * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
844 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
846         * sem_ch12.adb (Inline_Instance_Body): Alphabetize
847         local variables and constants. Add constants Save_SM and Save_SMP
848         to capture SPARK_Mode-related attributes.  Compile the inlined
849         body with the SPARK_Mode of the enclosing context.
851 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
853         * sinfo.adb (Elaboration_Boolean): Removed.
854         (Set_Elaboration_Boolean): Removed.
855         * sinfo.ads Remove attribute Elaboration_Boolean along with its
856         occurrence in nodes.
857         (Elaboration_Boolean): Removed along with pragma Inline.
858         (Set_Elaboration_Boolean): Removed along with pragma Inline.
860 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
862         * sem_ch3.adb (Constant_Redeclaration): Make error message more
863         explicit on a deferred constant whose object_definition is an
864         anonymous array.
866 2014-10-23  Vincent Celier  <celier@adacore.com>
868         * gnatls.adb: Never call Targparm.Get_Target_Parameters.
870 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
872         * sem_ch6.adb (Analyze_Expression_Function): In a generic
873         context do not create a body, and only pre-analyze the expression,
874         which may include incomplete views.
876 2014-10-23  Robert Dewar  <dewar@adacore.com>
878         * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
879         * sem_ch3.adb: Minor reformatting.
881 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
883         * sem_ch12.adb (Analyze_Associations): If an actual for a formal
884         object is a call to a parameterless expression function, add
885         the function to the list of actuals to freeze.
886         * freeze.adb (Check_Expression_Function): Create freeze nodes of
887         outer types that may be references in the body of the expression.
889 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
891         * exp_util.ads, checks.ads: Minor comment reformatting.
893 2014-10-23  Javier Miranda  <miranda@adacore.com>
895         * sem_eval (Test_In_Range): Disable removal of range_check for
896         VM targets.
898 2014-10-23  Robert Dewar  <dewar@adacore.com>
900         * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
901         messages, which got disabled when we unconditionally added an
902         asterisk at the start of the string.
904 2014-10-23  Vincent Celier  <celier@adacore.com>
906         * gnatls.adb: Ensure that "gnatls -l" works even when there is
907         no default runtime.
909 2014-10-23  Eric Botcazou  <ebotcazou@adacore.com>
911         * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
912         untagged and has discriminants, build the implicit full view after
913         building the derived type. Capture original declaration and type
914         here instead of...
915         (Copy_And_Build): ...here.
916         * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
918 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
920         * checks.adb (Ensure_Valid): Update the subprogram
921         profile. Propagate the contex attributes to Insert_Valid_Check.
922         (Insert_Valid_Check): Update the subprogram profile. Propagate
923         the attributes of the context to Duplicate_Subexpr_No_Checks.
924         (Validity_Check_Range): Update the subprogram profile. Propagate
925         the context attribute to Ensure_Valid.
926         * checks.ads (Ensure_Valid): Update the subprogram profile
927         along with the comment on usage.
928         (Insert_Valid_Check): Update the subprogram profile along with the
929         comment on usage.
930         (Validity_Check_Range): Update the subprogram profile along with
931         the comment on usage.
932         * exp_util.adb (Build_Temporary): New routine.
933         (Duplicate_Subexpr_No_Checks): Update the subprogram
934         profile. Propagate the attributes of the context to Remove_Side_Effects.
935         (Remove_Side_Effects): Update the subprogram profile. Update all calls
936         to Make_Temporary to invoke Build_Temporary.
937         * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
938         the subprogram profile along with the comment on usage.
939         (Remove_Side_Effects): Update the subprogram profile along with
940         the comment on usage.
941         * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
942         to the validity check machinery.  Explain the reason for this
943         propagation.
945 2014-10-23  Robert Dewar  <dewar@adacore.com>
947         * a-strsea.adb: Minor reformatting.
949 2014-10-23  Thomas Quinot  <quinot@adacore.com>
951         * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
952         units from consistency check.
953         * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
954         consistency check excludes run-time units.
956 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
958         * a-strsea.adb (Find_Token): Enable constraint checking in this
959         procedure, so that even when compiling with checks suppressed, as is
960         the case for the run-time, an exception is raised in this routine when
961         the input meets the conditions described in RM 2005 A.4.3 (68/1).
963 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
965         * sem_ch3.adb (Build_Derived_Private_Type): When the parent
966         is untagged and has discriminants, build the implicit full
967         view even if the derived type is a completion, and make it
968         the Underlying_Full_View of the type.
969         (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
970         Build_Derived_Type.
971         (Build_Derived_Record_Type): Likewise.
973 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
975         * sem_ch13.adb: Add guard to convention setting.
977 2014-10-20  Robert Dewar  <dewar@adacore.com>
979         * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
980         reformatting.
982 2014-10-20  Robert Dewar  <dewar@adacore.com>
984         * par-prag.adb (Add_List_Pragma_Entry): New procedure.
985         * par.adb (P_Pragma): Document requirement to handle multiple calls.
987 2014-10-20  Robert Dewar  <dewar@adacore.com>
989         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
990         Fix error of bad inheritance of this pragma from with'ed unit.
992 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
994         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
995         inherit convention from parent type, because the subtype may
996         have been declared on a partial view, prior to the pragma on
997         the parent.
999 2014-10-20  Olivier Hainque  <hainque@adacore.com>
1000             Tristan Gingold  <gingold@adacore.com>
1002         * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
1003         Misc clean ups.
1005 2014-10-20  Nicolas Roche  <roche@adacore.com>
1007         * gcc-interface/Make-lang.in: ensure that automatically generated
1008         dependency are referencing generated gnatvsn rather than original
1009         one.
1011 2014-10-20  Gary Dismukes  <dismukes@adacore.com>
1013         * gnat_ugn.texi: Minor reformatting.
1014         * sem_ch3.adb: Minor reformatting.
1016 2014-10-20  Vincent Celier  <celier@adacore.com>
1018         * prj-attr.adb: New project level attribute Runtime.
1019         * prj-conf.adb (Get_Project_Runtimes): New procedure to get
1020         the attributes Runtime declared in the main project, to use
1021         in auto-configuration.
1022         (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
1023         * prj-proc.adb (Runtime_Defaults): New table to store
1024         the default values of attributes Runtime (<language>).
1025         (Set_Default_Runtime_For): New procedure to store the default
1026         value of a Runtime (<language>) in table Runtime_Defaults.
1027         (Expression): Use the value stored in table Runtime_Defaults as
1028         the default for Runtime (<language>).
1029         * prj-proc.ads (Set_Default_Runtime_For): New procedure.
1030         * prj.ads (Attribute_Default_Value): New enumerated value
1031         Runtime_Value.
1033 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1035         * sem_ch3.adb (Analyze_Object_Declaration): If the type is
1036         an unconstrained unchecked_union type, rewrite declaration
1037         as a renaming to prevent attempt to retrieve non- existent
1038         discriminants from expression.
1040 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1042         * gnat_ugn.texi: Minor reformatting.
1044 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1046         * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
1047         arm-darwin.
1048         * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
1049         unused arguments.
1051 2014-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1053         * sem_attr.adb (Analyze_Attribute): Replace
1054         variables CS and PS with Proc_Id and Subp_Id to better illustrate
1055         their purpose. Account for the case where _Postconditions
1056         has not been generated yet and the context is aspect/pragma
1057         Refined_Post. In that scenario the expected prefix of attribute
1058         'Result is the current scope.
1060 2014-10-20  Robert Dewar  <dewar@adacore.com>
1062         * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
1063         in middle of expression with logical operators.
1065 2014-10-20  Robert Dewar  <dewar@adacore.com>
1067         * par-ch13.adb (Possible_Misspelled_Aspect): New function.
1069 2014-10-20  Steve Baird  <baird@adacore.com>
1071         * pprint.adb: Improve Expression_Image function.
1073 2014-10-20  Robert Dewar  <dewar@adacore.com>
1075         * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
1076         * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
1077         * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
1078         * einfo.adb (No_Tagged_Streams_Pragma): New field.
1079         * einfo.ads: Minor reformatting (reorder entries).
1080         (No_Tagged_Streams_Pragma): New field.
1081         * exp_ch3.adb: Minor comment update.
1082         * opt.ads (No_Tagged_Streams): New variable.
1083         * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
1084         * sem.ads (Save_No_Tagged_Streams): New field in scope record.
1085         * sem_attr.adb (Check_Stream_Attribute): Check stream ops
1086         prohibited by No_Tagged_Streams.
1087         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
1088         No_Tagged_Streams_Pragma.
1089         (Analyze_Subtype_Declaration): ditto.
1090         (Build_Derived_Record_Type): ditto.
1091         (Record_Type_Declaration): ditto.
1092         * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
1093         (Push_Scope): Save No_Tagged_Streams.
1094         * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
1095         pragma.
1097 2014-10-20  Robert Dewar  <dewar@adacore.com>
1099         * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
1100         sem_ch13.adb: Minor reformatting.
1102 2014-10-20  Javier Miranda  <miranda@adacore.com>
1104         * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
1105         declaration of a class-wide limited object containing an
1106         initializing expression into a renaming declaration.  Required to
1107         avoid passing such declaration to the backend and also to avoid
1108         generating an extra copy.
1110 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1112         * inline.adb (List_Inlining_Info): Minor tweaks.
1113         (Add_Inlined_Body): Inline the enclosing package
1114         if it is not internally generated, even if it doesn't come
1115         from source.
1117 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1119         * sem_ch4.adb (Process_Function_Call): If the first actual
1120         denotes a discrete type, the mode must be interpreted as a slice
1121         of an array returned by a parameterless call.
1123 2014-10-20  Vasiliy Fofanov  <fofanov@adacore.com>
1125         * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
1126         searching for runtime referenced by a simple name on a project path.
1128 2014-10-20  Olivier Hainque  <hainque@adacore.com>
1130         * vxworks-x86-link.spec: New file.
1131         * system-vxworks-x86.ads: Add pragma Linker_Options to link with
1132         vxworks-x86-link.spec.
1134 2014-10-20  Vincent Celier  <celier@adacore.com>
1136         * opt.ads (Origin_Of_Target): New type.
1137         (Target_Origin): New variable.
1138         * prj-conf.adb (Parse_Project_And_Apply_Config): Record
1139         Target_Value and Target_Origin.  If target was not specified
1140         on the command line with --target=, check if attribute Target
1141         is declared in the main project. If it is and it is not the
1142         native target, parse again the projects so that 'Target get
1143         the new value. Fail if the target has changed again.  Invoke
1144         Process_Project_And_Apply_Config with Do_Phase_1 set to False
1145         is Process_Project_Tree_Phase_1 has already been invoked.
1146         * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
1147         parameter Do_Phase_1, defaulted to True.
1148         * prj-proc.adb (Expression): Check the special values and
1149         defaults for attribute Target.
1151 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1153         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
1154         the subprogram spec of the body in full, because it will be
1155         reanalyzed when the declaration itself is analyzed;  otherwise. a
1156         formal may end up duplicated in the list of formals leading to
1157         spurious conformance errors with an existing declaration.
1159 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1161         * sem_ch13.adb: Improve error recovery on illegal aspect.
1163 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
1165         * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
1166         Fix calling C APIs with no trailing NUL char by calling better
1167         wrappers instead.
1169 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1171         * gnat_ugn.texi: Document that gdb users must be in group
1172         _developer on mac os.
1174 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
1176         * a-tgdico.ads: Fix typo.
1178 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1180         * exp_aggr.adb (Convert_To_Assignments): Do not create a
1181         transient scope for a component whose type requires it, if the
1182         context is an initialization procedure, because the target of
1183         the assignment must be visible outside of the block.
1185 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1187         * tracebak.c: Define PC_ADJUST for arm-darwin.
1188         * env.c: Remove darwin specific code.
1189         * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
1191 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1193         * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
1194         is incomplete rather than private, and full type declaration
1195         has aspects, analyze aspects on the full view rather than
1196         the incomplete view, to prevent freezing anomalies with the
1197         class-wide type.
1199 2014-10-17  Robert Dewar  <dewar@adacore.com>
1201         * exp_ch9.adb (Expand_N_Task_Body): Add defense against
1202         previous errors.
1203         * freeze.adb (Freeze_Entity): Add defense against checking null
1204         scope for generic.
1205         * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
1206         * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
1207         previous errors.
1208         * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
1209         in No_Run_Time mode.
1211 2014-10-17  Robert Dewar  <dewar@adacore.com>
1213         * prj-makr.adb: Minor reformatting.
1215 2014-10-17  Robert Dewar  <dewar@adacore.com>
1217         * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
1218         prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
1220 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1222         * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
1223         is enabled, code will be generated for some composite types
1224         to initialize an object after its declaration. If there is
1225         a subsequent Import pragma for the object, that code must be
1226         removed as specified byw the semantics of the pragma, and to
1227         prevent out-of-order elaboration issues in the back-end.
1229 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1231         * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
1232         wrapping mechanism under debug flag -gnatd.h.
1233         * debug.adb: Claim debug switch -gnatd.h.
1235 2014-10-17  Doug Rupp  <rupp@adacore.com>
1237         * gcc-interface/Makefile.in: Enable the socket runtime bits
1238         for Android.
1240 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1242         * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
1243         not perform the replacement on the expression for an inherited
1244         class-wide invariant if in ASIS_Mode and the type reference is
1245         already the prefix of a 'Class attribute reference: the expression
1246         has already been preanalyzed and the replacement performed when
1247         first encountered on the declaration of the parent type.
1249 2014-10-17  Robert Dewar  <dewar@adacore.com>
1251         * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
1252         Minor reformatting.
1254 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1256         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
1257         subprogram from base type.
1258         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
1259         subprogram for private type, not any of its subtypes.
1260         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
1261         of procedure entity, because a call to it may be generated in
1262         a client unit before the corresponding subprogram declaration
1263         is analyzed.
1265 2014-10-17  Vincent Celier  <celier@adacore.com>
1267         * prj-nmsc.adb (Get_Directories): Do not create directories
1268         when a project is abstract.
1270 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1272         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1273         of iteration is given by an expression that is not an array type,
1274         verify that its type implements an iterator iterface.
1276 2014-10-17  Robert Dewar  <dewar@adacore.com>
1278         * sem_attr.adb (Eval_Attribute): Ensure that attribute
1279         reference is not marked as being a static expression if the
1280         prefix evaluation raises CE.
1282 2014-10-17  Robert Dewar  <dewar@adacore.com>
1284         * exp_pakd.adb: Move bit packed entity tables to spec.
1285         * exp_pakd.ads: Move bit packed entity tables here from body.
1286         * freeze.adb (Freeze_Array_Type): Check that packed array type
1287         is supported.
1288         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
1289         Specialize messages using PRE_Id_Table.
1290         * uintp.ads, uintp.adb (UI_Image): New functional form.
1292 2014-10-17  Robert Dewar  <dewar@adacore.com>
1294         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
1295         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
1296         E_Variable.
1297         * exp_ch3.adb (Default_Initialize_Object): Handle
1298         Suppress_Initialization.
1299         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
1300         procedure (Expand_N_Pragma): Handle Suppress_Initialization
1301         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
1302         (Undo_Initialization): New procedure.
1303         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
1304         This is now allowed for E_Variable case.
1305         * gnat_rm.texi: Document new aspect Suppress_Initialization
1306         Suppress_Initialization aspect/pragma can apply to variable.
1307         * einfo.ads: Minor reformatting.
1309 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
1311         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
1313 2014-10-17  Robert Dewar  <dewar@adacore.com>
1315         * cstand.adb (Create_Standard): Mark Short_Integer as
1316         implementation defined.
1317         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
1318         compiler built with assertions for No_Implementation_Identifiers test.
1320 2014-10-17  Robert Dewar  <dewar@adacore.com>
1322         * aspects.ads: Documentation fix, aspect Lock_Free does have a
1323         corresponding pragma.
1324         * gnat_rm.texi: Document implementation defined boolean aspects
1325         as boolean.
1327 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1329         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
1330         preserve semantic information on the invariant expression
1331         (typically a function call) because it may be inherited by a
1332         type extension in a different unit, and it cannot be resolved
1333         by visibility elsewhere because it may refer to local entities.
1335 2014-10-17  Robert Dewar  <dewar@adacore.com>
1337         * gnat_rm.texi: Document that string literal can be used for
1338         pragma Warnings when operating in Ada 83 mode.
1340 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1342         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
1343         subsidiary function to Freeze_ Expression, used to determine
1344         whether an aggregate for an array of access types also freezes the
1345         designated type, when some aggregate components are allocators.
1347 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1349         * a-strsea.adb (Find_Token): AI05-031 indicates that the
1350         procedure must raise Index_Error when Source is not empty and
1351         the From parameter is not within the range of the Source string.
1353 2014-10-17  Robert Dewar  <dewar@adacore.com>
1355         * sem_prag.adb (Is_Static_String_Expression): Allow string
1356         literal in Ada 83 mode.
1358 2014-10-17  Vincent Celier  <celier@adacore.com>
1360         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
1361         not take into account any compiler command from package IDE.
1363 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1365         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
1366         wrapper must have the same identifiers as those of the formal
1367         subprogram, because calls within the generic may use named
1368         associations.
1370 2014-10-17  Robert Dewar  <dewar@adacore.com>
1372         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
1373         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
1375 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1377         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
1378         specfications from original type declaration to declaration of
1379         implicit base, because original node is rewritten as a subtype
1380         declaration on which type aspects do not belong.
1382 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1384         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
1385         inherits the attributes related to pragma Default_Initial_Condition
1386         from its parent type.
1388 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1390         * a-strsea.adb (Index - versions with a From parameter):
1391         According to AI05-056, the Index functions with a From parameter
1392         return 0 if the source is an empty string.
1394 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1396         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
1397         the consistency checks in ASIS mode.
1399 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
1401         * s-expmod.ads: Minor typo fix.
1403 2014-10-17  Robert Dewar  <dewar@adacore.com>
1405         * sem_util.adb: Minor reformatting.
1407 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1409         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
1410         actuals that are defaulted subprograms of the formal subprogram
1411         declaration.
1413 2014-10-17  Robert Dewar  <dewar@adacore.com>
1415         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
1416         implementation base type.
1417         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
1418         operands are always expanded out into component comparisons.
1420 2014-10-17  Robert Dewar  <dewar@adacore.com>
1422         * s-vallli.adb: Minor comment correction.
1423         * s-valuti.ads: Minor comment reformatting.
1425 2014-10-17  Robert Dewar  <dewar@adacore.com>
1427         * gnat_rm.texi: Document System.Atomic_Counters.
1428         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
1429         list of user- accessible units added as children of System.
1430         * s-atocou.ads: Update comment.
1432 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
1434         * s-expmod.ads: Add comments.
1436 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1438         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
1439         of all attributes related to pragma Default_Initial_Condition.
1440         (Build_Derived_Type): Propagation of all attributes related
1441         to pragma Default_Initial_Condition.
1442         (Process_Full_View): Account for the case where the full view derives
1443         from another private type and propagate the attributes related
1444         to pragma Default_Initial_Condition to the private view.
1445         (Propagate_Default_Init_Cond_Attributes): New routine.
1446         * sem_util.adb: Alphabetize various routines.
1447         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
1448         when calling the default initial condition procedure of a private type.
1449         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
1450         the generation of multiple default initial condition procedures.
1452 2014-10-17  Robert Dewar  <dewar@adacore.com>
1454         * prj-conf.adb: Revert previous change.
1456 2014-10-17  Robert Dewar  <dewar@adacore.com>
1458         * lib-writ.ads, s-valdec.ads: Minor reformatting.
1460 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1462         * sem_ch12.adb: Additional work on function wrappers.
1464 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1466         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
1467         on the renamed object of renamings.
1469 2014-10-17  Vincent Celier  <celier@adacore.com>
1471         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
1472         mode, always use the native target.
1474 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
1476         * gcc-interface/misc.c: Adjust include files.
1478 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1479             Alan Modra  <amodra@gmail.com>
1481         PR ada/63225
1482         * uintp.adb (Vector_To_Uint): Move from here to...
1483         * uintp.ads (UI_Vector): Make public.
1484         (Vector_To_Uint): ...here.
1486 2014-10-10  Robert Dewar  <dewar@adacore.com>
1488         * freeze.adb, sem_attr.adb: Minor reformatting.
1490 2014-10-10  Johannes Kanig  <kanig@adacore.com>
1492         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1493         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
1494         to container type.
1496 2014-10-10  Vincent Celier  <celier@adacore.com>
1498         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
1499         any configuration switches from the project file.
1501 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1503         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
1504         (Build_Function_Wrapper): New function, to construct a wrapper
1505         function for actuals that are functions with an arbitrary
1506         number of parameters. Used in GNATProve mode to simplify proof
1507         propagation in instantiations.
1509 2014-10-10  Robert Dewar  <dewar@adacore.com>
1511         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
1512         code clean up.
1514 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
1516         * sem_res.adb (Is_OK_Volatile_Context): Allow
1517         a volatile object reference to appear as the expression of a
1518         type conversion.
1520 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1522         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
1523         Aspect specification is legal on a local instantiation of a
1524         library-level generic unit.
1526 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
1528         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
1529         if inlining has been enabled via -gnatn and the target is not GCC.
1531 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1533         * freeze.adb (Freeze_Entity): Freezing a subprogram does
1534         not always freeze its profile.  In particular, an attribute
1535         reference that takes the access type does not freeze the types
1536         of the formals.
1538 2014-10-10  Robert Dewar  <dewar@adacore.com>
1540         * errout.adb (Adjust_Name_Case): New procedure.
1541         (Set_Msg_Node): Use Adjust_Name_Case.
1542         * errout.ads (Adjust_Name_Case): New procedure.
1543         * exp_intr.adb (Add_Source_Info): Minor code reorganization
1544         (use Ekind_In).
1545         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
1546         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
1547         and fix up entries in Sig_Flags, and correct logical errors in
1548         function itself.
1549         * sprint.adb (Sprint_Node_Actual): Properly print string for
1550         raise statement.
1552 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1554         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
1555         anonymous array type with delayed aspects, defer freezing of
1556         type until object itself is frozen.
1557         * freeze.adb (Freeze_Entity): When freezing an object of an
1558         anonymous array type with delayed aspects, remove freeze node of
1559         object after freezing type, to prevent out-of-order elaboration
1560         in the back-end. The initialization call for the object has
1561         already been constructed when expanding the object declaration.
1563 2014-10-10  Robert Dewar  <dewar@adacore.com>
1565         * exp_intr.adb (Write_Entity_Name): Moved to outer level
1566         (Write_Entity_Name): Properly handle operator names
1567         (Expand_Source_Info): New procedure.
1568         * exp_intr.ads (Add_Source_Info): New procedure.
1570 2014-10-10  Robert Dewar  <dewar@adacore.com>
1572         * butil.ads: Minor reformatting.
1573         * sem_ch5.adb: Code clean up.
1575 2014-10-10  Robert Dewar  <dewar@adacore.com>
1577         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
1578         Prefix_Exception_Messages.
1579         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
1580         * opt.ads: New flags Prefix_Exception_Message[_Config].
1581         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
1582         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
1583         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
1584         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
1586 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
1588         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
1589         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
1591 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1593         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
1594         contain pragmas generated for loop invariants and type predicates.
1595         Clarify use of this subprogram.
1597 2014-10-10  Yannick Moy  <moy@adacore.com>
1599         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
1600         contracts.
1601         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
1602         SPARK_Mode is Off.
1604 2014-10-10  Vadim Godunko  <godunko@adacore.com>
1606         * a-stwima.adb (To_Sequence): Compute size of result array.
1608 2014-10-10  Javier Miranda  <miranda@adacore.com>
1610         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
1611         sources of the example to avoid a warning when the Ada files are
1612         automatically generated by the binding generator.
1614 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1616         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
1617         Do_Range_Check on the expression of a record component
1618         association when needed, as is done for array components, when
1619         the corresponding type is a scalar type.
1621 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
1623         * a-coinho-shared.adb: Minor typo fix.
1624         * prj-env.ads: Minor reformatting.
1626 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
1628         * sem_res.adb (Resolve_String_Literal): Do not
1629         generate a string literal subtype for the default expression of
1630         a formal parameter in GNATprove mode.
1632 2014-10-10  Yannick Moy  <moy@adacore.com>
1634         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
1636 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1638         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
1639         declaration for loop parameter before rest of loop, and set
1640         entity kind to prevent assignments to it in the user code.
1641         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
1642         loop parameter in an element iteration over o formal container.
1644 2014-10-10  Robert Dewar  <dewar@adacore.com>
1646         * gnat_ugn.texi: Document use of user-level routines to handle
1647         e.g. col major arrays.
1649 2014-10-10  Doug Rupp  <rupp@adacore.com>
1651         * s-osinte-android.adb: Fix misspelling.
1652         * gsocket.h: Tweak the Android quirks.
1654 2014-10-10  Robert Dewar  <dewar@adacore.com>
1656         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
1658 2014-10-10  Robert Dewar  <dewar@adacore.com>
1660         * sem_ch13.adb: Minor code reorganization.
1662 2014-10-10  Pat Rogers  <rogers@adacore.com>
1664         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
1665         for users.
1667 2014-10-10  Vadim Godunko  <godunko@adacore.com>
1669         * a-coinho-shared.adb: Add minor comment.
1670         * a-stzmap.adb (To_Sequence): Compute size of result array.
1672 2014-10-10  Javier Miranda  <miranda@adacore.com>
1674         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
1675         if-stmt to match its current documentation.
1677 2014-10-10  Robert Dewar  <dewar@adacore.com>
1679         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
1680         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
1681         sem_ch6.adb, sem_cat.adb, sem_disp.adb
1682         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
1683         throughout where appropriate.
1685 2014-10-10  Bob Duff  <duff@adacore.com>
1687         * a-coinho-shared.ads: Minor reformatting.
1688         * s-traceb.adb: Minor clean up.
1690 2014-10-10  Robert Dewar  <dewar@adacore.com>
1692         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
1693         * ali.ads (GNATprove_Mode): New component in ALI table.
1694         (GNATprove_Mode_Specified): New global.
1695         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
1696         in GNATProve mode.
1697         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
1698         GNATProve_Mode.
1700 2014-10-10  Javier Miranda  <miranda@adacore.com>
1702         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
1703         (Build_Init_Statement): Ensure that statements
1704         associated with the parent components are located at the beginning
1705         of the returned list of statements.
1707 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1709         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
1710         view of a private type T that has a type invariant is a scalar
1711         or constrained array type, the base type created for the full
1712         view has the same type invariant.
1714 2014-10-10  Robert Dewar  <dewar@adacore.com>
1716         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
1717         reorganization.
1719 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
1721         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
1722         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
1724 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
1726         * gcc-interface/Make-lang.in (check_acats_numbers0,
1727         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
1728         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
1729         check_acats_numbers, check_acats_subdirs): New variables.
1730         (check_acats_targets): Use $(check_acats_subdirs).
1731         (check-acats, check-acats%): Rewritten so that for parallelized
1732         testing each job runs all the chapters files, with
1733         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
1734         directory sequentially and share it.
1735         (check-acats-subtargets): Always print just check-acats.
1737 2014-08-25  Martin Liska  <mliska@suse.cz>
1739         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
1740         new cgraph interface.
1741         (gnat_write_global_declarations): Likewise.
1743 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
1745         * 9drpc.adb: Fix a typo
1746         * s-interr.ads: Likewise
1747         * s-taskin.ads: Likewise
1748         * s-traces.ads: Likewise
1749         * sysdep.c: Likewise
1751 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
1753         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
1754         * gsocket.h Add include of <unistd.h> on RTEMS.
1756 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
1758         * s-osinte-rtems.adb: Correct formatting of line in license block.
1760 2014-08-04  Claire Dross  <dross@adacore.com>
1762         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1763         For an instance, look at the scope before the generic parent.
1765 2014-08-04  Yannick Moy  <moy@adacore.com>
1767         * lib-writ.ads: Update comments.
1768         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
1769         parameters to filter inherited subprograms.
1771 2014-08-04  Robert Dewar  <dewar@adacore.com>
1773         * gnat_rm.texi: Add section on use of address clause for memory
1774         mapped I/O.
1776 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1778         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
1779         particular the subtype created for a generic actual, inherits
1780         invariant information from the base type.
1782 2014-08-04  Robert Dewar  <dewar@adacore.com>
1784         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
1785         * gnat_rm.texi: Add documentation for aspect Obsolescent.
1786         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
1787         Obsolescent.
1788         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
1789         * s-osprim-mingw.adb: Minor reformatting.
1790         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
1791         (Resolve_Indexed_Component): Rework warnings for non-atomic access
1792         (Resolve_Selected_Component): Add warnings for non-atomic access.
1794 2014-08-04  Doug Rupp  <rupp@adacore.com>
1796         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
1797         formal to long_long.
1798         * g-calend.ads (timeval): Bump up size to accomodate sec type.
1799         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
1800         long_long
1801         * s-osprim-posix.adb (timeval): Bump up size to accomodate
1802         new sec type.
1803         (timeval_to_duration): Change sec formal to Long_Long_Integer
1804         * s-osinte-darwin.adb (timeval): Bump up
1805         size to accomodate new sec type.
1806         (timeval_to_duration): Change sec formal to long_long
1807         * s-osinte-android.adb: Likewise.
1808         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
1809         sec formal from long to long long.
1811 2014-08-04  Robert Dewar  <dewar@adacore.com>
1813         * sem_res.adb (Resolve_Qualified_Expression): Make sure
1814         Do_Range_Check flag gets set.
1816 2014-08-04  Robert Dewar  <dewar@adacore.com>
1818         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
1819         * exp_ch3.adb (Build_Array_Init_Proc): Use
1820         Is_Standard_String_Type.
1821         (Expand_Freeze_Array_Type): ditto.
1822         (Get_Simple_Init_Val): ditto.
1823         (Needs_Simple_Initialization): ditto.
1824         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
1825         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
1827 2014-08-04  Pascal Obry  <obry@adacore.com>
1829         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
1830         _stprintf which insert garbage into the wfull_path buffer.
1832 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1834         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
1835         code.
1836         * fe.h: Minor reformatting.
1838 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1840         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
1842 2014-08-04  Robert Dewar  <dewar@adacore.com>
1844         * par-ch13.adb (Get_Aspect_Specifications): Improve error
1845         recovery, fixing a -gnatQ bomb.
1847 2014-08-04  Yannick Moy  <moy@adacore.com>
1849         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
1850         do not generate two Itypes with the same name for an array
1851         definition.
1852         * sinfo.ads: Expand doc on GNATprove mode.
1854 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1856         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
1857         master and storage pool attributes on the root type of an
1858         anonymous access type.
1859         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
1860         and storage pool attributes on the root type of an anonymous
1861         access type.
1863 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1865         * exp_ch3.adb: Minor reformatting.
1866         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
1867         * tracebak.c: Remove use of above files.
1868         * gcc-interface/Makefile.in: Update dependencies.
1870 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
1872         * gcc-interface/utils.c (gnat_set_type_context): Also set the
1873         context for parallel types' TYPE_STUB_DECL.  Do not change
1874         anything if the context is already set for them.
1875         (gnat_pushdecl): Update the comment for calls to
1876         gnat_set_type_context to mention parallel types.
1877         (add_parallel_type): When adding a context-less parallel type to
1878         a type that has a context, propagate the context from the latter
1879         type to the former.
1880         (process_deferred_decl_context): Call gnat_set_type_context
1881         rather than manually setting the type context.
1882         (build_unc_object_type): Call gnat_set_type_context on the
1883         template type.
1885 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1887         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
1888         subtype indication and the case statement has only two choices,
1889         replace subtype indication with its range, because the resulting
1890         membership test cannot have a subtype indication as an operand.
1892 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1894         * exp_ch3.adb: Update comments, minor reformatting.
1896 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1898         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
1899         the default initial condition procedures are build here.
1900         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
1901         analyzed argument of pragma Default_Initial_Condition in some
1902         dummy code as GNATprove mode disables assertions, but still
1903         needs to see the argument.
1905 2014-08-04  Robert Dewar  <dewar@adacore.com>
1907         * exp_ch6.adb, sem_util.adb: Minor reformatting.
1909 2014-08-04  Olivier Hainque  <hainque@adacore.com>
1911         * a-comutr.ads: Set Root_Node_Type'Alignment to
1912         Standard'Maximum_Alignment, so that it is at least as large as
1913         the max default for Tree_Node_Type'Alignment.
1915 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1917         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
1918         of the default initial condition procedure [body].
1919         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
1920         all default initial condition procedures at the end of private
1921         declaration analysis.
1922         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
1923         routine.
1924         (Build_Default_Init_Cond_Procedure_Body): Merged in the
1925         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
1926         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
1927         New routine.
1928         (Build_Default_Init_Cond_Procedure_Body): Removed.
1930 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1932         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
1933         postcondtion.
1934         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
1935         postcondition call.
1937 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1939         * sem_prag.adb (Analyze_Pragma): Ensure that an
1940         internally generated spec for a stand alone body is recognized
1941         as a proper context for pragma SPARK_Mode.
1943 2014-08-04  Robert Dewar  <dewar@adacore.com>
1945         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
1947 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1949         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
1950         when -gnatO has already been specified, for compatibility
1951         with gcc driver.
1952         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
1953         codepeer mode.
1954         * g-expect.ads: Fix typo.
1956 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1958         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
1959         must account for the bounds template if the designated type is
1960         an unconstrained array.
1962 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1964         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
1965         SPARK_Mode in the body.
1966         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
1967         way to verify the consistency of SPARK_Mode between a spec and
1968         a body.
1969         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
1970         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1971         manually.
1972         (Analyze_Subprogram_Instantiation): Remove the call to
1973         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1974         manually.
1975         * sem_prag.adb (Analyze_Pragma): Remove local variable
1976         Inst_Id. SPARK_Mode can no longer be applied to a package or
1977         subprogram instantiation.
1978         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
1979         Removed.
1981 2014-08-04  Robert Dewar  <dewar@adacore.com>
1983         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
1985 2014-08-04  Yannick Moy  <moy@adacore.com>
1987         * sem_ch3.adb (Derive_Type_Declaration,
1988         Process_Discriminants): Remove SPARK-specific legality checks.
1990 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1992         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
1993         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
1994         for HMAC.
1996 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1998         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
1999         compatibility of SPARK_Mode between a spec and a body, use the
2000         SPARK_Mode of the public part.
2001         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
2002         the already available routine to exchange the aspects between
2003         the template and its copy. Analyze the aspects of copy to
2004         ensure that the corresponding pragmas perform their semantic
2005         effects.  The partial analysis of aspects is no longer needed.
2006         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
2007         of the context.
2008         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
2009         the context.
2010         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
2011         instantiation which does not come from source.
2013 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2015         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
2016         SPARK_Mode pragmas to the public and private part of the unit.
2017         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
2018         type cannot have discriminants if the parent type already has
2019         discriminants.
2020         (Process_Discriminants): Ensure that the type of a discriminant is
2021         discrete.
2022         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
2023         SPARK_Mode compatibility between a spec and a body can now be
2024         safely performed while processing a generic.
2025         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
2026         SPARK_Mode compatibility between a spec and a body can now be
2027         safely performed while processing a generic.
2028         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
2029         safely analyzed when processing a generic.
2031 2014-08-04  Nicolas Roche  <roche@adacore.com>
2033         * g-dirope.adb: Minor reformating.
2035 2014-08-04  Robert Dewar  <dewar@adacore.com>
2037         * sem_ch6.adb: Minor reformatting.
2039 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2041         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
2042         Before normalizing these pragmas into a pragma Check, preanalyze
2043         the optional Message argument, (which is subsequently copied)
2044         so that it has the proper semantic information for ASIS use.
2045         * sem_case.adb: Initialize flag earlier.
2046         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
2047         the full source path of a configuration file is requested.
2048         (Read_Source_File): Use Full_Name parameter..
2050 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2052         * opt.ads Alphabetize various global flags. New flag
2053         Ignore_Pragma_SPARK_Mode along with a comment on usage.
2054         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2055         Pragma SPARK_Mode is now allowed in generic units.
2056         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
2057         between the SPARK_Mode of a spec and that of a body when inside
2058         a generic.
2059         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
2060         compatibility between the SPARK_Mode of a spec and that of a
2061         body when inside a generic.
2062         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
2063         Pragma SPARK_Mode is now allowed in generic units.
2064         (Analyze_Package_Instantiation): Save and restore the value of
2065         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2066         the governing SPARK_Mode before analyzing the instance.
2067         (Analyze_Subprogram_Instantiation): Save and restore the value
2068         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2069         the governing SPARK_Mode before analyzing the instance.
2070         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
2071         placement of a source pragma when inserting the generated pragma
2072         for aspect SPARK_Mode.
2073         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
2074         pragma SPARK_Mode to allow for generics and their respective
2075         instantiations.
2076         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
2077         (Set_Ignore_Pragma_SPARK_Mode): New routine.
2079 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2081         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
2082         renaming discriminants in tagged types first.
2083         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
2084         the underlying type of the prefix.
2085         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
2086         (process_freeze_entity): Reset the nodes of all the view of a type,
2087         if any.
2089 2014-08-04  Doug Rupp  <rupp@adacore.com>
2090             Olivier Hainque  <hainque@adacore.com>
2092         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
2093         and remove incorrect EH_MECHANISM macros.
2094         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
2095         EXTRA_LIBGNAT_OBJS.
2097 2014-08-04  Robert Dewar  <dewar@adacore.com>
2099         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
2100         of constructed 'Valid attribute in -gnatVa mode does not appear
2101         to come from source.
2102         * sem_attr.adb (Analyze_Access_Attribute): Don't set
2103         Never_Set_In_Source for non-source reference.
2104         * sem_util.adb: Minor reformatting.
2105         * sem_warn.adb (Check_References): Don't check Address_Taken,
2106         not necessary, see comment.
2108 2014-08-04  Robert Dewar  <dewar@adacore.com>
2110         * sem_util.adb, sem_case.adb: Minor reformatting.
2112 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2114         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
2115         limited view, replace with non-limited view, which is available
2116         at the point of an entry call.
2118 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2120         * exp_ch6.adb (Expand_Call): If the call is to a function in
2121         a run-time unit that is marked Inline_Always, we must suppress
2122         debugging information on it, so that the code that is eventually
2123         inlined will not affect debugging of the user program.
2125 2014-08-04  Robert Dewar  <dewar@adacore.com>
2127         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
2128         fixes.
2130 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2132         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
2133         an aspect Import that specifies a False value.
2135 2014-08-04  Robert Dewar  <dewar@adacore.com>
2137         * gnat_rm.texi: Add section on aspect Invariant'Class.
2139 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2141         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
2142         for better control of cascaded error messages when some choice
2143         in a case statement over a predicated type violates the given
2144         static predicate.
2146 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2148         * sem_ch3.adb (Build_Derived_Type): Modify the
2149         inheritance of the rep chain to ensure that a non-tagged type's
2150         items are not clobbered during the inheritance.
2152 2014-08-04  Robert Dewar  <dewar@adacore.com>
2154         * sem_ch3.adb, einfo.ads: Minor reformatting.
2156 2014-08-04  Yannick Moy  <moy@adacore.com>
2158         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
2159         detection of subprograms that cannot be inlined in GNATprove mode.
2161 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2163         * einfo.adb: Add guard to Returns_Limited_View.
2165 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
2167         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
2168         the secondary stack to respect the alignments of the returned objects.
2170 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2172         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
2173         on function entities whose return type is a limited view.
2174         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
2175         where to place the freeze node for a function that returns the
2176         limited view of a type, when the function is called and frozen
2177         in a different unit.
2179 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2181         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
2182         refactoring.
2184 2014-08-04  Robert Dewar  <dewar@adacore.com>
2186         * gnat_ugn.texi: Clarify documentation on assertions.
2188 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2190         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
2191         if a component association has a box initialization when the
2192         component type has no default initialization, either through an
2193         initial value, an aspect, or an implicit initialization procedure.
2195 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2197         * freeze.adb: Code clean up.
2199 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2201         * sem_ch5.adb: Minor reformatting.
2203 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2205         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
2206         a function can return a limited view of a type declared
2207         elsewhere. In that case the function cannot be frozen at the end
2208         of its enclosing package. If its first use is in a different unit,
2209         it cannot be frozen there, but if the call is legal the full view
2210         of the return type is available and the subprogram can now be
2211         frozen. However the freeze node cannot be inserted at the point
2212         of call, but rather must go in the package holding the function,
2213         so that the backend can process it in the proper context.
2215 2014-08-04  Robert Dewar  <dewar@adacore.com>
2217         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
2219 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2221         * sem_ch4.adb (Operator_Check): Refine previous change.
2223 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2225         * sem_scil.ads: Improve comments.
2226         * sem_ch4.adb (Analyze_Equality_Op): Add support for
2227         Allow_Integer_Address (equality between Address and Integer).
2229 2014-08-04  Yannick Moy  <moy@adacore.com>
2231         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
2232         notation on untagged objects.
2233         * sem.ads: Update comment.
2234         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
2235         not inline subprograms declared in the visible part of a package.
2237 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2239         * exp_ch5.adb: minor reformatting.
2240         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
2241         parameters.
2243 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2245         * s-fatgen.adb: Minor reformatting.
2247 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2249         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
2250         False on .NET.
2252 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2254         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
2255         the loop parameter for element iterators over containers and
2256         arrays, so that improper uses of it are detected in the loop
2257         body when expansion is disabled.
2258         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
2259         generated cursor is that of the analyzed loop parameter.
2261 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2263         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
2264         Flag_Decl. Do not analyze the declaration of the flag as it is
2265         not part of the tree yet, instead add it to the freeze actions
2266         of the C++ type.
2268 2014-08-04  Robert Dewar  <dewar@adacore.com>
2270         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
2271         case of OUT and IN OUT parameter correctly (where Source_Typ is
2272         set), we were missing one case where a check must be applied.
2274 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2276         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
2277         the generated code. Instead of hiding the renaming and using the
2278         wrapper as the proper association, have the subprogram renaming
2279         alias the wrapper.
2280         (Build_Spec): The entity of the wrapper is
2281         now derived from the entity of the related primitive.
2283 2014-08-04  Emmanuel Briot  <briot@adacore.com>
2285         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
2286         using non-capturing groups.
2288 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2290         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
2291         related pragmas before copying the original body, to prevent
2292         spurious errors when the pragmas apply to formals that will not
2293         appear in the inlined body.
2295 2014-08-04  Robert Dewar  <dewar@adacore.com>
2297         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
2298         exp_ch3.adb: Minor reformatting.
2300 2014-08-04  Robert Dewar  <dewar@adacore.com>
2302         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
2304 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2306         * aspects.adb Add an entry in table Canonical_Aspect for
2307         Default_Initial_Condition.
2308         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
2309         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
2310         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
2311         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
2312         Has_Inherited_Default_Init_Cond.
2313         (Default_Init_Cond_Procedure): New routine.
2314         (Has_Default_Init_Cond): New routine.
2315         (Has_Inherited_Default_Init_Cond): New routine.
2316         (Is_Default_Init_Cond_Procedure): New routine.
2317         (Set_Default_Init_Cond_Procedure): New routine.
2318         (Set_Has_Default_Init_Cond): New routine.
2319         (Set_Has_Inherited_Default_Init_Cond): New routine.
2320         (Set_Is_Default_Init_Cond_Procedure): New routine.
2321         (Write_Entity_Flags): Output all the new flags.
2322         * einfo.ads New attributes Default_Init_Cond_Procedure,
2323         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
2324         along with usage in nodes.
2325         (Default_Init_Cond_Procedure): New routine.
2326         (Has_Default_Init_Cond): New routine and pragma Inline.
2327         (Has_Inherited_Default_Init_Cond): New routine and
2328         pragma Inline.
2329         (Is_Default_Init_Cond_Procedure): New routine and
2330         pragma Inline.
2331         (Set_Default_Init_Cond_Procedure): New routine.
2332         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
2333         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
2334         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
2335         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
2336         Next_N. Generate a call to the default initial condition procedure
2337         if the object's type is subject to the pragma.  (Freeze_Type):
2338         Generate the body of the default initial condition procedure or
2339         inherit the spec from a parent type.
2340         * exp_ch7.adb Add with and use clause for Exp_Prag.
2341         (Expand_Pragma_Initial_Condition): Removed.
2342         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
2343         routine.
2344         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
2345         not need special treatment by the parser.
2346         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
2347         attributes related to pragma Default_Initial_Condition to the
2348         derived type.
2349         (Process_Full_View): Propagate the attributes
2350         related to pragma Default_Initial_Condition to the full view.
2351         * sem_ch7.adb (Analyze_Package_Specification): Build the
2352         declaration of the default initial condition procedure for all
2353         types that qualify or inherit the one from the parent type.
2354         * sem_ch13.adb (Analyze_Aspect_Specifications):
2355         Add processing for aspect Default_Initial_Condition.
2356         (Check_Aspect_At_Freeze_Point): Aspect
2357         Default_Initial_Condition does not require delayed analysis.
2358         (Replace_Type_References_Generic): Moved to spec.
2359         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
2360         * sem_prag.adb Add an entry in table Sif_Glags for
2361         Default_Initial_Condition.
2362         (Analyze_Pragma): Pragma
2363         Default_Initial_Condition is now part of assertion
2364         policy. Add processing for pragma Default_Initial_Condition.
2365         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
2366         now recognized as a proper assertion policy.
2367         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
2368         routine.
2369         (Build_Default_Init_Cond_Procedure_Body): New routine.
2370         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
2371         (Inherit_Default_Init_Cond_Procedure): New routine.
2372         * snames.ads-tmpl Add new predefined name and pragma id for
2373         Default_Initial_Condition.
2375 2014-08-04  Vincent Celier  <celier@adacore.com>
2377         * prj-dect.adb (Parse_Case_Construction): It is no longer
2378         an error if the variable for a case construction is not
2379         typed, only if the variable value is not a single string. Call
2380         Parse_Choice_List and End_Case_Construction with the new parameter
2381         to indicate that the variable is typed.
2382         * prj-strt.adb (End_Case_Construction): Only check the labels
2383         if the variable is typed.  If the variable is not typed,
2384         issue a warning when there is no "when others" allternative.
2385         (Parse_Choice_List): Manage the labels only if the variable
2386         is typed.
2387         * prj-strt.ads (End_Case_Construction): New Boolean parameter
2388         String_Type.
2389         (Parse_Choice_List): Ditto.
2391 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2393         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
2395 2014-08-04  Vincent Celier  <celier@adacore.com>
2397         * projects.texi: Update documentation of case constructions with
2398         variables that are not typed.
2400 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2402         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
2403         an Eliminated pragma, indicate that the wrapper is also to be
2404         eliminated, to prevent spurious errors when using gnatelim on
2405         programs that include box-initialization of equality operators
2406         (consequence of AI05-071)..
2408 2014-08-04  Robert Dewar  <dewar@adacore.com>
2410         * checks.adb (Activate_Overflow_Check): Handle floating-point
2411         case correctly.
2412         * checks.ads (Activate_Overflow_Check): Clarify handling of
2413         floating-point cases.
2414         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
2415         flag if we generate an explicit overflow check (for
2416         Check_Float_Overflow mode).
2418 2014-08-04  Robert Dewar  <dewar@adacore.com>
2420         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
2421         prj-attr.adb, prj-attr.ads: Minor reformatting.
2423 2014-08-04  Yannick Moy  <moy@adacore.com>
2425         * expander.adb (Expand): Always perform special
2426         expansion in GNATprove mode, even when doing pre-analysis.
2428 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2430         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
2431         not default. Also list bit order if SSO is specified. Do not
2432         assume that bit order is always equal to scalar storage order.
2434 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2436         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
2437         order to reverse SSO for a type that has an explicit native
2438         Bit_Order.
2440 2014-08-04  Doug Rupp  <rupp@adacore.com>
2442         * cal.c: Macro check for VxWorks7.
2443         * init.c (getpid): Likewise.
2444         * mkdir.c (__gnat_mkdir): Likewise.
2445         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
2447 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2449         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
2450         of an invariant check in the case where No_Initialization is set,
2451         since the object is uninitialized.
2453 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2455         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
2456         name, in addition to a pragma name.
2457         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
2458         Is_Pragma_Name): Adjust accordingly.
2459         * sem_attr.ads, sem_attr.adb, exp_attr.adb
2460         (Attribute_Default_Scalar_Storage_Order): Add handling of new
2461         attribute.
2462         * gnat_rm.texi: Document the above.
2464 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2466         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
2467         mode for now, to revert to previous behavior.
2468         * checks.adb: Revert previous change, no longer needed.
2470 2014-08-04  Robert Dewar  <dewar@adacore.com>
2472         * gnat1drv.adb (Adjust_Global_Switches): Don't set
2473         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2474         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
2475         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2476         * switch-c.adb (Scan_Front_End_Switches): Don't set
2477         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2479 2014-08-04  Vincent Celier  <celier@adacore.com>
2481         * prj-attr.adb: Add new default indications for
2482         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
2483         (Attribute_Default_Of): New function (Initialize): Set the
2484         default for those attributes that have one specified.
2485         * prj-attr.ads (Attribute_Data): New component Default.
2486         * prj-proc.adb (Expression): Take into account the new defaults
2487         for attributes Object_Dir, Exec_Dir and Source_Dirs.
2488         * prj-strt.adb (Attribute_Reference): Set the default for
2489         the attribute.
2490         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
2491         (Set_Default_Of): New procedure.
2492         * prj.adb (The_Dot_String): New global Name_Id variable,
2493         initialized in procedure Initialize.
2494         (Dot_String): New function
2495         (Initialize): Initialize The_Dot_String.
2496         (Reset): Create the string list Shared.Dot_String_List.
2497         * prj.ads (Attribute_Default_Value): New enumeration type.
2498         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
2499         (Dot_String): New function.
2500         (Shared_Project_Tree_Data): New string list component Dot_String_List.
2501         * projects.texi: Document new defaults for attribute Object_Dir,
2502         Exec_Dir and Source_Dirs.
2504 2014-08-04  Robert Dewar  <dewar@adacore.com>
2506         * sem_ch12.adb: Minor reformatting.
2508 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2510         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
2511         expansion in CodePeer_Mode.
2512         (Selected_Range_Checks): Add handling of overflow checks in
2513         CodePeer_Mode.
2515 2014-08-04  Robert Dewar  <dewar@adacore.com>
2517         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2518         Remove special test for Float'First, no longer required.
2519         (Expand_N_Attribute_Reference, case Succ): Remove special test
2520         for Float'First, no longer required.
2521         * s-fatgen.adb (Pred): return infinity unchanged.
2522         (Succ): ditto.
2524 2014-08-04  Claire Dross  <dross@adacore.com>
2526         * sem_ch12.adb (Analyze_Associations): Defaults should only be
2527         used if there is no explicit match.
2528         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2529         Also check for pragma external_axiomatization on generic units.
2531 2014-08-04  Robert Dewar  <dewar@adacore.com>
2533         * checks.adb (Activate_Overflow_Check): Remove
2534         Check_Float_Overflow processing.
2535         (Apply_Scalar_Range_Check): Ditto.
2536         (Generate_Range_Check): Ditto.
2537         * exp_ch4.adb (Expand_N_Op_Add): Add call to
2538         Check_Float_Op_Overflow.
2539         (Expand_N_Op_Divide): ditto.
2540         (Expand_N_Op_Multiply): ditto.
2541         (Expand_N_Op_Subtract): ditto.
2542         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
2543         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
2544         Do_Range_Check is set for floating-point case in -gnatc or
2545         GNATprove mode.
2546         (Analyze_Attribute, case Succ): Make sure
2547         Do_Range_Check is set for floating-point case in -gnatc or
2548         GNATprove mode.
2549         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
2550         flag is set for real to integer conversion in GNATprove or
2551         -gnatc mode.
2553 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2555         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
2556         the expression of an Import or Export aspect as type Boolean
2557         and require it to be static. Add ??? comment. Also, set the
2558         Is_Exported flag when appropriate.
2560 2014-08-04  Robert Dewar  <dewar@adacore.com>
2562         * exp_ch4.adb: Minor reformatting.
2563         * exp_attr.adb: Minor reformatting.
2565 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2567         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
2568         (Unaligned_Valid): Remove now unused subprogram.
2569         * exp_attr.adb (Expand_N_Attribute_Reference, case
2570         Attribute_Valid): If the prefix is in reverse SSO or potentially
2571         unaligned, copy it using a byte copy operation to a temporary
2572         variable.
2573         * einfo.adb: Minor comment fix.
2575 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2577         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
2579 2014-08-04  Robert Dewar  <dewar@adacore.com>
2581         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
2582         * s-fatgen.adb (Pred): Handle Float'First.
2583         (Succ): Handle Float'Last.
2585 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2587         * sem_util.adb (Is_Potentially_Unevaluated): If the original
2588         node of a parent node in the tree is a short-circuit operation,
2589         the node is potentially unevaluated.
2591 2014-08-04  Robert Dewar  <dewar@adacore.com>
2593         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
2594         conversion from a real type to an integer type.
2596 2014-08-04  Yannick Moy  <moy@adacore.com>
2598         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
2599         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
2600         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
2601         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
2602         SPARK_05 instead of SPARK.
2604 2014-08-04  Robert Dewar  <dewar@adacore.com>
2606         * sem.ads: Minor reformatting.
2607         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
2608         reformatting.
2609         (Analyze_Aspect_Specifications, case Convention): Put External_Name
2610         before Link_Name when constructing pragma.
2612 2014-08-04  Yannick Moy  <moy@adacore.com>
2614         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
2615         to True during analysis of a default component expression.
2616         (Semantics): Save and restore In_Default_Expr around analysis.
2617         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
2618         Call new wrapper Preanalyze_Default_Expression.
2619         (Preanalyze_Default_Expression): New wrapper on
2620         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
2621         * sem_res.adb (Resolve_Call): Mark calls inside default
2622         expressions as not inlined in GNATprove mode.
2624 2014-08-04  Robert Dewar  <dewar@adacore.com>
2626         * exp_ch4.adb: Minor reformatting.
2628 2014-08-04  Olivier Hainque  <hainque@adacore.com>
2630         * link.c: remove const on __gnat_objlist_file_supported for AIX
2632 2014-08-04  Robert Dewar  <dewar@adacore.com>
2634         * sem_util.ads: Minor addition of comment.
2636 2014-08-04  Vincent Celier  <celier@adacore.com>
2638         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
2639         all projects, including aggregate and aggregate library projects.
2641 2014-08-04  Yannick Moy  <moy@adacore.com>
2643         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
2645 2014-08-04  Robert Dewar  <dewar@adacore.com>
2647         * sem_eval.adb (Test_In_Range): Always in range for
2648         Is_Known_Valid target type, where input type has smaller or
2649         equal size and does not have biased rep.
2651 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2653         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
2654         a static attribute, and the Static flag must not be set on it
2655         during resolution. It may be constant-folded during expansion,
2656         but if expansion is disabled it is not a static expression.
2658 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2660         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
2661         referenced once resolution has taken place.
2663 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2665         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
2666         compare access levels in the case where the target type is the
2667         anonymous type of an access discriminant, since the level of
2668         such types is defined based on context. Add comment.
2670 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2672         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
2673         cases related to equality.  Remove the special processing
2674         for dispatching abstract subprograms as it is not needed.
2675         (Interpretation_Error): Add a specialized error message for
2676         predefined operators.
2677         (Is_Intrinsic_Equality): New routine.
2678         (Is_Suitable_Candidate): New routine.
2680 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2682         * checks.adb: Minor comment reformatting.
2684 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2686         * restrict.adb (Check_Restriction): For checked max_parameter
2687         restrictions reset Violated flag, so that subsequent violations
2688         are properly detected.
2690 2014-08-04  Robert Dewar  <dewar@adacore.com>
2692         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
2693         mode.
2694         (Process_Discriminants): Fix bad test of GNATprove mode
2696 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2698         * sem_ch12.adb (Instantiate_Formal_Subprogram):
2699         Move variable to their own section. Propagate the source
2700         location of a formal parameter to the corresponding formal of
2701         the subprogram renaming declaration. Code reformatting.
2703 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2705         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
2707 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2709         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
2710         if error already detected.  We may reach this point in spite of
2711         previous errors when compiling with -gnatq, to force all possible
2712         errors (this is the usual ACATS mode).
2714 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2716         * checks.adb (Generate_Range_Check): For the case of converting
2717         a base type with a larger range to a smaller target subtype, only
2718         use unchecked conversions of bounds in the range check followed
2719         by conversion in the case where both types are discrete. In other
2720         cases, convert to the target base type and save in a temporary
2721         followed by the range check.
2722         (Convert_And_Check_Range): New procedure factoring code to save
2723         conversion to a temporary followed by a range check (called two
2724         places in Generate_Range_Check).
2725         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
2726         check-in, to generate range checks for conversions between
2727         any floating-point types rather than limiting it to matching
2728         base types.
2730 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2732         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
2734 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2736         * restrict.adb (Update_Restrictions): For restrictions with a
2737         maximum parameter (e.g. number of protected entries in Ravenscar)
2738         do not compute the maximum of the violation over several objects,
2739         because the restriction is per-object.
2740         (Check_Restriction): After possible message, reset the value
2741         of of a checked max_parameter restriction to zero, to prevent
2742         cascaded errors.
2743         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
2744         (sub)type to determine whether derived type should be on the
2745         list of private dependents of a type whose full view may become
2746         visible subsequently.
2748 2014-08-01  Olivier Hainque  <hainque@adacore.com>
2750         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
2751         $(CXX) instead of ../../xg++ to feed CXX.
2752         (CXX_LFLAGS): Remove. Now unused as the proper flags
2753         are expected to be included in the CXX variable.
2755 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
2757         * gcc-interface/decl.c (elaborate_expression_1): Return the new
2758         variable when debug info is needed and the expression is not
2759         constant.  Tag as external only new variables that are global.
2760         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
2761         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
2762         attributes for IN array parameters when their actual subtype
2763         needs debug info.
2764         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
2765         * gcc-interface/gigi.h (process_deferred_decl_context): New.
2766         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
2767         emit debug info for ignored global declarations.
2768         (struct deferred_decl_context_node,
2769         add_deferred_decl_context, add_deferred_type_context,
2770         compute_deferred_decl_context, defer_or_set_type_context,
2771         deferred_decl_context_queue, get_debug_scope,
2772         get_global_context, process_deferred_decl_context): New.
2773         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
2774         computation machinery to rely on the GNAT Scope attribute.
2776 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2778         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
2780 2014-08-01  Robert Dewar  <dewar@adacore.com>
2782         * sem_ch8.adb, opt.ads Minor comment updates.
2784 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2786         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
2787         from the side effects removal machinery.
2788         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
2789         Renaming_Req. Update the nested call to Remove_Side_Effects.
2790         (Duplicate_Subexpr_No_Checks): Add formal parameter
2791         Renaming_Req. Update the nested call to Remove_Side_Effects.
2792         (Duplicate_Subexpr_Move_Checks): Add formal parameter
2793         Renaming_Req. Update the nested call to Remove_Side_Effects.
2794         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
2795         an object renaming declaration when the caller requests it.
2796         * exp_util.ads (Duplicate_Subexpr): Add formal
2797         parameter Renaming_Req. Update comment on usage.
2798         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
2799         (Duplicate_Subexpr_Move_Checks): Add formal parameter
2800         Renaming_Req.
2802 2014-08-01  Bob Duff  <duff@adacore.com>
2804         * gnat_ugn.texi: Minor updates.
2806 2014-08-01  Robert Dewar  <dewar@adacore.com>
2808         * atree.adb: Minor reformatting.
2810 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2812         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
2813         private extension, get stored constraint, if any, from full view.
2815 2014-08-01  Robert Dewar  <dewar@adacore.com>
2817         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
2818         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
2819         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
2820         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
2821         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2822         Remove code for checking with's, now in sem_ch10.adb, set
2823         Opt.No_Elab_Code_All_Pragma.
2825 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2827         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
2828         access types as well and adjust the subtype mark if there are
2829         no constraints.
2831 2014-08-01  Robert Dewar  <dewar@adacore.com>
2833         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
2835 2014-08-01  Robert Dewar  <dewar@adacore.com>
2837         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
2839 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2841         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
2842         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
2843         of the actuals in the case of untagged record types too.
2844         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
2845         full derivation of a derived private type, extracted from...
2846         (Copy_And_Build): In the case of record types and most
2847         enumeration types, copy the original declaration.  Build the
2848         full derivation according to the approach extracted from...
2849         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
2850         to create the full derivation in all existing cases and also
2851         create it in the no-discriminants/discriminants case instead of
2852         deriving directly from the full view.
2853         (Is_Visible_Component): Remove obsolete code.
2854         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
2856 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2858         * fe.h (GNAT_Mode): New.
2859         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
2860         reverse SSO in GNAT mode.
2862 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2864         * freeze.adb: Minor reformatting.
2866 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2868         * exp_ch3.adb (Default_Initialize_Object): Do not generate
2869         default initialization for an imported object.
2871 2014-08-01  Olivier Hainque  <hainque@adacore.com>
2873         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
2874         to the expected FARPROC type instead of void *.
2875         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
2876         other datastructures.
2877         (__gnat_file_time_name_attr): Adjust accordingly.
2878         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
2879         in line with uses.
2880         (__gnat_check_OWNER_ACL): Declare AccessMode
2881         parameter as ACCESS_MODE instead of DWORD, in line with callers
2882         and uses.
2883         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
2884         unused on win32.  Correct cast of "args" on call to spawnvp.
2885         (add_handle): Cast realloc calls into their destination types.
2886         (win32_wait): Remove declaration and initialization of unused variable.
2887         (__gnat_locate_exec_on_path): Cast alloca calls
2888         into their destination types.
2889         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
2890         their destination types.
2892 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
2894         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
2895         range checks for conversions between floating-point subtypes
2896         when the target and source types are the same.
2898 2014-08-01  Robert Dewar  <dewar@adacore.com>
2900         * exp_aggr.adb: Minor reformatting.
2902 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2904         * sem_ch13.adb (Check_Indexing_Functions): Initialize
2905         Indexing_Found.
2907 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2909         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
2910         ALI file before we call the backend (so that gnat2why can append
2911         to it).
2913 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2915         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
2916         Expand_Packed_Element_Reference): Pass additional Rev_SSO
2917         parameter indicating whether the packed array type has reverse
2918         scalar storage order to the s-pack* Set/Get routines.
2919         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
2920         indicating reverse scalar storage order.
2922 2014-08-01  Robert Dewar  <dewar@adacore.com>
2924         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
2925         for initial component value in -gnatc or GNATprove mode.
2926         (Process_Discriminants): Same fix for default discriminant values.
2927         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
2928         checking subtypes.
2930 2014-08-01  Robert Dewar  <dewar@adacore.com>
2932         * sinfo.ads: Minor comment clarification.
2934 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2936         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
2937         reformatting. Store the generated pragma Import in the related
2938         subprogram as routine Wrap_Imported_Subprogram will need it later.
2939         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
2940         a private type with discriminants is considered to fall in the
2941         category of unconstrained or tagged items.
2943 2014-08-01  Arnaud charlet  <charlet@adacore.com>
2945         * s-os_lib.adb (Open_Append): New functions to open a file for
2946         appending. This binds to the already existing (but not used)
2947         __gnat_open_append.
2948         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
2949         to open a file for appending.
2950         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
2951         to open the ALI file for appending.
2953 2014-08-01  Robert Dewar  <dewar@adacore.com>
2955         * sem_ch8.adb: Minor reformatting.
2957 2014-08-01  Yannick Moy  <moy@adacore.com>
2959         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
2960         pragmas from aspects, which need to be inserted in proper order.
2962 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2964         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
2965         Handle properly a type extension that constrains a discriminated
2966         derived type that renames other discriminants of an ancestor.
2968 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2970         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
2971         s-pack25.adb: Fix minor inconsistencies and typos.
2973 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2975         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
2976         globals and move certain variables to the "local
2977         variable" section. Call Build_Class_Wide_Wrapper when
2978         renaming a default actual subprogram with a class-wide actual.
2979         (Build_Class_Wide_Wrapper): New routine.
2980         (Check_Class_Wide_Actual): Removed.
2981         (Find_Renamed_Entity): Code reformatting.
2982         (Has_Class_Wide_Actual): Alphabetize. Change the
2983         logic of the predicate as the renamed name may not necessarely
2984         denote the correct subprogram.
2986 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2988         * sem_ch7.adb: Fix minor oversight in condition.
2990 2014-08-01  Bob Duff  <duff@adacore.com>
2992         * projects.texi: Minor documentation improvements.
2994 2014-08-01  Robert Dewar  <dewar@adacore.com>
2996         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
2997         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
2998         * lib-load.adb: Initialize No_Elab_Code_All field.
2999         * lib-writ.adb: Initialize No_Elab_Code_All.
3000         * lib.ads, lib.adb: New field No_Elab_Code_All.
3001         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
3002         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
3003         longer exists.
3004         * sem_ch10.adb (Analyze_Context): Processing for
3005         No_Elaboration_Code_All removed.
3006         (Generate_Parent_References): Moved to Sem_Util.
3007         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
3008         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
3009         Sem_Ch10.
3010         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
3011         * targparm.adb: Minor comment updates Add comments on ignoring
3012         pragma No_Elaboration_Code_All.
3014 2014-08-01  Nicolas Roche  <roche@adacore.com>
3016         * adaint.c (__gnat_set_close_on_exec): Ensure that
3017         we can unset "close_on_exec" flag.
3019 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3021         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
3022         the parameter specs of the wrapper program for a primitive operation
3023         of a synchronized type that implements an interface, copy the
3024         null_exclusion indicator as well.
3026 2014-08-01  Robert Dewar  <dewar@adacore.com>
3028         * sem_eval.ads: Minor reformatting.
3030 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3032         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
3033         to go down the chain of private derivations.
3034         * freeze.adb (Freeze_Entity): Fix typo in comment.
3036 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3038         * sem_ch3.adb (Access_Type_Declaration): If designated type is
3039         a limited view, create a master entity (as is already done for
3040         class-wide types) in case the full view designates a type that
3041         contains tasks.
3042         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
3043         and the designated type is a limited view, use the non-limited
3044         view if available.
3046 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3048         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
3049         (DECL_FUNCTION_STUB): Likewise.
3050         (SET_DECL_FUNCTION_STUB): Likewise.
3051         (DECL_PARM_ALT_TYPE): Likewise.
3052         (SET_DECL_PARM_ALT_TYPE): Likewise.
3053         (TYPE_VAX_FLOATING_POINT_P): Delete.
3054         (TYPE_DIGITS_VALUE): Likewise.
3055         (SET_TYPE_DIGITS_VALUE): Likewise.
3056         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
3057         (malloc32_decl): Delete.
3058         (build_vms_descriptor): Likewise.
3059         (build_vms_descriptor32): Likewise.
3060         (fill_vms_descriptor): Likewise.
3061         (convert_vms_descriptor): Likewise.
3062         (TARGET_ABI_OPEN_VMS): Likewise.
3063         (TARGET_MALLOC64): Likewise.
3064         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
3065         (gnat_to_gnu_entity): Call it to add the original type as a parallel
3066         type to the implementation type of a packed array type.
3067         <E_Procedure>: Remove now obsolete kludge.
3068         <E_Exception>: Delete obsolete comment.
3069         <object>: Small tweak.
3070         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
3071         for the descriptor passing mechanism.
3072         (gnat_to_gnu_param): Likewise.
3073         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
3074         (gnat_print_type): Adjust.
3075         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
3076         (vms_builtin_establish_handler_decl): Delete.
3077         (gnat_vms_condition_handler_decl): Likewise.
3078         (establish_gnat_vms_condition_handler): Likewise.
3079         (build_function_stub): Likewise.
3080         (Subprogram_Body_to_gnu): Do not call above functions.
3081         (Call_to_gnu): Remove support for the descriptor passing mechanism.
3082         * gcc-interface/utils.c (make_descriptor_field): Delete.
3083         (build_vms_descriptor32): Likewise.
3084         (build_vms_descriptor): Likewise.
3085         (fill_vms_descriptor): Likewise.
3086         (convert_vms_descriptor64): Likewise.
3087         (convert_vms_descriptor32): Likewise.
3088         (convert_vms_descriptor): Likewise.
3089         * gcc-interface/utils.c (unchecked_convert): Likewise.
3090         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
3092 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3094         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
3095         type and get_unpadded_type for the longest FP type.
3096         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
3097         (convert_with_check): Adjust formatting and remove FIXME.
3099 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3101         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
3102         Do not convert the RM bounds to the base type.
3103         (E_Floating_Point_Subtype): Likewise.
3104         (E_Array_Subtype): Convert the bounds to the base type.
3105         * gcc-interface/trans.c (get_type_length): New function.
3106         (Attribute_to_gnu) <Range_Length>: Call it.
3107         <Length>: Likewise.
3108         (Loop_Statement_to_gnu): Convert the bounds to the base type.
3109         (gnat_to_gnu) <N_In>: Likewise.
3110         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
3111         bounds to the base type.
3112         (create_range_type): Likewise.
3113         (convert): Convert the bounds to the base type for biased types.
3114         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
3115         base type.
3117 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3119         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
3120         incorrect implicit type derivation.
3121         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
3122         to the base type.
3124 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3126         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
3127         prefix of attribute Loop_Entry.
3128         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
3129         Loop_Variant with respect to an enclosing loop (if any).
3130         (Contains_Loop_Entry): Update the parameter profile and all
3131         calls to this routine.
3132         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
3133         for the corresponding body before determining the nature of the
3134         ultimate alias's declarative node.
3136 2014-08-01  Robert Dewar  <dewar@adacore.com>
3138         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
3140 2014-08-01  Robert Dewar  <dewar@adacore.com>
3142         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
3143         constraint error node since it is a list member.
3145 2014-08-01  Robert Dewar  <dewar@adacore.com>
3147         * sem_warn.adb: Minor reformatting.
3149 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3151         * einfo.adb (Underlying_Type): Return the underlying full view
3152         of a private type if present.
3153         * freeze.adb (Freeze_Entity):
3154         Build a single freeze node for partial, full and underlying full
3155         views, if any.
3156         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
3157         missing guard before the access to the Underlying_Full_View.
3158         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
3159         full view if present.
3160         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
3162 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3164         * sem_res.adb (Resolve_Entry_Call): When an entry has
3165         preconditions, the entry call is wrapped in a procedure call
3166         that incorporates the precondition checks. To prevent a double
3167         expansion, with possible duplication of extra formals, that
3168         procedure call must only be pre-analyzed and resolved. Expansion
3169         takes place upon return to the caller Resolve_Call.
3171 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3173         * sem_res.adb (Resolve_Call): Do not perform
3174         GNATprove-specific inlining while within a generic.
3176 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3178         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
3179         case expression with incompatible alternatives, when the first
3180         alternative is overloaded.
3182 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3184         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
3185         to create the name of the parameterless call, rather than
3186         New_Copy, to preserve the tree structure when the name is a
3187         complex expression, e.g. a selected component that denotes a
3188         protected operation, whose prefix is itself a selected component.
3190 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3192         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
3193         Unit_Declaration_Node to retrieve body when inlining, to handle
3194         properly subprogram child units.
3196 2014-08-01  Robert Dewar  <dewar@adacore.com>
3198         * sem_attr.adb: Minor reformatting.
3200 2014-08-01  Vincent Celier  <celier@adacore.com>
3202         * debug.adb: Minor documentation addition for -dn switch.
3204 2014-08-01  Robert Dewar  <dewar@adacore.com>
3206         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
3207         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
3208         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
3209         In several places, use the Is_OK version as suggested by the spec.
3211 2014-08-01  Vincent Celier  <celier@adacore.com>
3213         * gnatcmd.adb: Revert last change which was not correct.
3215 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3217         * freeze.adb (Find_Constant): Ensure that the constant being
3218         inspected is still an object declaration (i.e. not a renaming).
3220 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3222         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
3223         An attribute_reference to Loop_Entry denotes an iterator
3224         specification: its prefix is an object, as is the case for 'Old.
3225         b) If the domain of iteration is an expression whose type has
3226         the Iterable aspect defined, this is an iterator specification.
3228 2014-08-01  Robert Dewar  <dewar@adacore.com>
3230         * gnatcmd.adb: Minor reformatting.
3232 2014-08-01  Robert Dewar  <dewar@adacore.com>
3234         * atree.ads (Info_Messages): New counter.
3235         * err_vars.ads: Minor comment update.
3236         * errout.adb (Delete_Warning_And_Continuations): Deal
3237         with new Info_Messages counter.
3238         (Error_Msg_Internal): ditto.
3239         (Delete_Warning): ditto.
3240         (Initialize): ditto.
3241         (Write_Error_Summary): ditto.
3242         (Output_Messages): ditto.
3243         (To_Be_Removed): ditto.
3244         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
3245         (Compilation_Errors): ditto.
3246         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
3247         (Finalize): ditto.
3248         (Initialize): ditto.
3249         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
3250         * gnat_ugn.texi: Document that -gnatwe does not affect info
3251         messages.
3253 2014-08-01  Robert Dewar  <dewar@adacore.com>
3255         * debug.adb: Document debug switch -gnatd.Z.
3256         * sem.adb (Semantics): Force expansion on in no or configurable
3257         run time mode.
3259 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3261         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
3262         unchecked conversion denotes an iterator specification. Such a
3263         conversion will be inserted in the context of an inlined call
3264         when needed, and its argument is always an object.
3266 2014-08-01  Robert Dewar  <dewar@adacore.com>
3268         * make.adb, makeutl.ads: Minor reformatting.
3269         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
3270         Back_End_Inlining.
3272 2014-08-01  Tristan Gingold  <gingold@adacore.com>
3274         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
3276 2014-08-01  Javier Miranda  <miranda@adacore.com>
3278         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
3279         -gnatd.z.
3280         * debug.adb: Updating documentation.
3281         * exp_ch6.adb (Expand_Call): Remove assertion.
3283 2014-08-01  Robert Dewar  <dewar@adacore.com>
3285         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
3286         sem_res.adb: Minor reformatting.
3288 2014-08-01  Vincent Celier  <celier@adacore.com>
3290         * make.adb (Initialize): Set Keep_Temporary_Files to True when
3291         -dn is specified.
3292         * makeusg.adb: Add line for new switch --keep-temp-files.
3293         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
3294         * opt.ads (Keep_Temporary_Files): Document that it is also used
3295         by gnatmake and gprbuild.
3296         * switch-m.adb: Recognize new switch --keep-temp-files.
3298 2014-08-01  Tristan Gingold  <gingold@adacore.com>
3300         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
3301         * exp_ch9.adb (Make_Task_Create_Call): ... here.
3303 2014-08-01  Vincent Celier  <celier@adacore.com>
3305         * gnat1drv.adb: Do not try to get the target parameters when
3306         invoked with -gnats.
3308 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3310         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
3311         declaration subject to No_Initialization.
3313 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3315         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
3316         is a subtype with dynamic predicates, or a non-static subtype
3317         with predicates.
3318         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
3319         expression if subtype has a dynamic predicate.
3320         (Constrain_Index): Reject subtype indication if subtype mark
3321         has predicates.
3322         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
3323         (Make_Index): If index is a subtype indication, itype inhereits
3324         predicate flags for subsequent testing.
3325         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
3326         procedure Check_Predicate_Use, to reject illegal uses of domains
3327         of iteration that have dynamic predicates.
3328         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
3329         indication to which a predicate applies.
3330         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
3331         prevent cascaded errors when subtype is invalid.
3333 2014-08-01  Robert Dewar  <dewar@adacore.com>
3335         * sem_ch10.adb: Minor reformatting.
3337 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3339         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
3340         because either type may be a subtype of the other.
3342 2014-08-01  Vincent Celier  <celier@adacore.com>
3344         * makeusg.adb: Add documentation for debug switch -dn.
3346 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3348         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
3349         expression with standard operator and type, for pretty-printing
3350         use, when in ASIS_Mode. When generating code dimensional analysis
3351         is not involved and dimension expressions are handled statically,
3352         and other operators are resolved in the usual way.
3354 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3356         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
3357         Parent_Subtype in ASIS mode, leads to several failures.
3358         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
3359         if the prefix is a type extension, check whether component is
3360         declared in the parent type, possibly in a parent unit. Needed
3361         in ASIS mode when Parent_Subtype is not set.
3363 2014-08-01  Robert Dewar  <dewar@adacore.com>
3365         * sem_prag.adb: Minor reformatting.
3366         * s-regpat.adb: Minor reformatting.
3367         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3368         Treat_As_Volatile on constants.
3370 2014-08-01  Tristan Gingold  <gingold@adacore.com>
3372         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
3374 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3376         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
3377         warning on a with_clause created for the renaming of a parent
3378         unit in an explicit with_clause.
3380 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3382         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
3383         Set Is_Imported flag at once, to simplify subsequent legality
3384         checks. Reject the aspect on an object whose declaration has an
3385         explicit initial value.
3386         * sem_prag.adb (Process_Import_Or_Interface): Use original node
3387         to check legality of an initial value for an imported entity.
3388         Set Is_Imported flag in case of error to prevent cascaded errors.
3389         Do not set the Is_Imported flag if the pragma comes from an
3390         aspect, because it is already done when analyzing the aspect.
3392 2014-08-01  Emmanuel Briot  <briot@adacore.com>
3394         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
3396 2014-08-01  Robert Dewar  <dewar@adacore.com>
3398         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
3399         identifier name.
3401 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3403         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
3404         checks when the related variable comes from source.
3405         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
3406         when the related actual parameter comes from source. Update comment.
3407         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
3408         type of an array of pointers when the designated type is
3409         class-wide and its root type is the record being currently frozen.
3411 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3413         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
3414         of renaming declaration created for domain of iteration.
3415         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
3416         for error messages on aggregates whose index subtypes have
3417         predicates. The new placement avoids posting messages on previous
3418         subtype declarations rather than on the aggregate itself.
3419         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
3420         Add_Dispatching_Operation, to handle properly the overriding of
3421         the predefined operations on controlled types, when the partial
3422         view of a type is not visibly controlled.
3424 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
3426         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
3427         appendix.
3429 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3431         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
3432         assertion check as the attribute is defined for all entities.
3433         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
3434         check as the attribute is defined for all entities.
3435         * einfo.ads Update the documentation of attribute
3436         Is_Hidden_Non_Overridden_Subprogram.
3437         * sem_ch7.adb (Install_Package_Entity): No need to check the
3438         entity kind of the Id.
3439         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
3440         usage. Ensure that the homographs are of the same entity kind
3441         and not fully conformant.
3442         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
3444 2014-08-01  Robert Dewar  <dewar@adacore.com>
3446         * inline.adb: Minor code reorganization.
3447         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
3449 2014-08-01  Robert Dewar  <dewar@adacore.com>
3451         * inline.adb, s-os_lib.ads: Minor reformatting.
3453 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3455         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
3456         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
3457         hooks.
3459 2014-08-01  Yannick Moy  <moy@adacore.com>
3461         * inline.adb (Cannot_Inline): Issue info message instead of
3462         warning for subprograms not inlined in GNATprove mode.
3463         * sem_res.adb (Resolve_Call): Take body into account for deciding
3464         whether subprogram can be inlined in GNATprove mode or not.
3466 2014-08-01  Claire Dross  <dross@adacore.com>
3468         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
3469         of Get_First_Parent_With_External_Axiomatization_For_Entity for
3470         shorter.
3471         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
3472         for parameters of packages with external axiomatization.
3474 2014-08-01  Robert Dewar  <dewar@adacore.com>
3476         * sem_res.adb: Minor comment addition.
3478 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3480         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
3481         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
3482         no longer used.
3483         * s-os_lib.ads: Minor reformatting.
3485 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3487         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
3488         completely previous code since only GCC back-ends are prepared
3489         to handle e.g. 'Machine attribute.
3490         * targparm.adb, targparm.ads: Remove remaining refs and
3491         handling of OpenVMS_On_Target, VAX_Float_On_Target and
3492         RTX_RTSS_Kernel_Module_On_Target.
3493         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
3494         no longer used.
3496 2014-08-01  Robert Dewar  <dewar@adacore.com>
3498         * exp_dist.adb, exp_attr.adb: Minor reformatting.
3499         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
3500         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
3501         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
3502         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
3503         improper use of shall.
3505 2014-08-01  Robert Dewar  <dewar@adacore.com>
3507         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
3508         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
3509         exp_ch3.adb: Minor reformatting & code reorganization.
3511 2014-08-01  Robert Dewar  <dewar@adacore.com>
3513         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
3514         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
3515         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
3516         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
3517         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
3518         code.
3519         * gcc-interface/decl.c, gcc-interface/Makefile.in,
3520         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
3522 2014-08-01  Pascal Obry  <obry@adacore.com>
3524         * s-os_lib.ads: Rename File_Size to Large_File_Size.
3526 2014-08-01  Robert Dewar  <dewar@adacore.com>
3528         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
3529         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
3530         a-numaux-libc-x86.ads: Fix bad package header comments.
3531         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
3532         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
3533         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
3534         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
3535         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
3536         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
3537         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
3538         s-os_lib.adb: Remove VMS-specific code.
3540 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3542         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
3543         previous state in CodePeer_Mode.
3545 2014-08-01  Robert Dewar  <dewar@adacore.com>
3547         * hostparm.ads: Put back definition of OpenVMS as False to aid
3548         the transition process.
3549         * sem_ch7.adb: Minor reformatting.
3550         * prj-env.adb: Minor code fix.
3551         * gnat_rm.texi: Complete previous change.
3552         * sem_ch3.adb: Minor reformatting.
3553         * sem_ch6.adb: Minor reformatting.
3554         * sem_elab.adb: Minor reformatting.
3555         * exp_strm.adb: Complete previous change.
3557 2014-08-01  Vincent Celier  <celier@adacore.com>
3559         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
3560         warning when a constant is unreferenced and its type has pragma
3561         Unreferenced_Objects.
3563 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3565         * einfo.adb: Flag2 is now known as
3566         Is_Hidden_Non_Overridden_Subprogram.
3567         (Is_Hidden_Non_Overridden_Subprogram): New routine.
3568         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
3569         (Write_Entity_Fields): Output Flag2.
3570         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
3571         along with occurrences in entities.
3572         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
3573         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
3574         and pragma Inline.
3575         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
3576         declared non-overriden homographs into visibility.
3577         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
3578         implicitly declared non-overriden homographs.
3579         (Hide_Non_Overridden_Subprograms): New routine.
3581 2014-08-01  Robert Dewar  <dewar@adacore.com>
3583         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
3584         VMS-specific code.
3585         * prj-conf.adb: Minor reformatting.
3586         * xr_tabls.adb (Read_File): Restore code which was enabled on
3587         non VMS platforms before.
3588         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
3589         * sem_ch5.adb: Minor reformatting.
3590         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
3591         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
3592         Remove VMS-specific code.
3594 2014-08-01  Vincent Celier  <celier@adacore.com>
3596         * make.adb (Await_Compile): Remove loop that was only needed
3597         for VMS.
3599 2014-08-01  Robert Dewar  <dewar@adacore.com>
3601         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
3602         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
3603         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
3604         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
3605         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
3606         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
3607         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
3608         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
3609         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
3610         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
3611         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
3612         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
3613         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
3614         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
3615         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
3616         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
3617         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
3618         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
3619         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
3620         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3621         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
3622         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
3623         specific code and comments.
3625 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3627         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
3628         Check_Reverse_Iteration, to verify the legality of the Reverse
3629         indicator on various container types, and to detect illegal
3630         reverse iterations on containers that only supoort forward
3631         iteration.
3633 2014-08-01  Vincent Celier  <celier@adacore.com>
3635         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
3636         procedure GNATCmd the relevant declarations from packages VMS_Cmds
3637         and VMS_Conv.
3638         * gnatcmd.ads: Update comments to remove any trace of VMS
3640 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3642         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
3643         defaulted actual that is an operator, before building wrapper
3644         for it in GNATprove mode. Restrict construction of wrapper to
3645         actuals that are operators.
3647 2014-08-01  Vincent Celier  <celier@adacore.com>
3649         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
3650         specific packages no longer needed.
3652 2014-08-01  Pascal Obry  <obry@adacore.com>
3654         * s-os_lib.ads (System.CRTL): Move with clause to body.
3655         (File_Size): New type.
3656         (File_Length64): Use it.
3657         (File_Length): Restore previous spec returning a Long_Integer.
3658         * s-os_lib.adb (System.CRTL): Move with clause here.
3660 2014-08-01  Vincent Celier  <celier@adacore.com>
3662         * mlib-prj.adb: Update comments to remove any mention of VMS.
3664 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3666         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
3667         xgnatugn.adb and ug_words.
3669 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3671         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
3672         expansion can be avoid for Machine, Model and Rounding.
3673         (Is_Inline_Floating_Point_Attribute): Return true for Machine
3674         & Model, as well as Rounding if wrapped in a conversion to an
3675         integer type.
3676         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
3677         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
3678         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
3679         * gcc-interface/misc.c (enumerate_modes): Compute it.
3680         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
3681         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
3682         Machine and Model.
3683         (Attribute_to_gnu) <Attr_Model>: New case.
3684         <Attr_Machine>): Likewise.
3685         (convert_with_check): Test
3686         fp_arith_may_widen variable.
3688 2014-08-01  Pascal Obry  <obry@adacore.com>
3690         * adaint.h (GNAT_FOPEN): New definition for Windows.
3691         (GNAT_OPEN): Likewise.
3692         (GNAT_STAT): Likewise.
3693         (GNAT_FSTAT): Likewise.
3694         (GNAT_LSTAT): Likewise.
3695         (GNAT_STRUCT_STAT): Likewise.
3696         * adaint.c (__gnat_stat): Fix computation of file size for
3697         Windows.
3699 2014-08-01  Vincent Celier  <celier@adacore.com>
3701         * Makefile.rtl: Minor comment update.
3703 2014-08-01  Vincent Celier  <celier@adacore.com>
3705         * Make-generated.in: Remove dependencies for vms-help.
3707 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
3709         * makeutl.ads, opt.ads: Minor grammar fixes.
3710         * makeutl.adb: Minor code reorganization.
3712 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3714         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
3715         gnatsym.adb: Remove gnatsym (VMS only tool).
3717 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
3719         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
3720         conditionalization from gnat_ugn.texi and projects.texi, and updated
3721         (considerably simplified) xgnatugn.adb, to be removed soon.
3723 2014-08-01  Vincent Celier  <celier@adacore.com>
3725         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
3726         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
3727         instead of Debug.Debug_Flag_S.
3728         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
3729         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
3730         error messages.
3731         * makeutl.ads (No_Exit_Message_Option): New constant string
3732         for switch --no-exit-message.
3733         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
3734         * switch-m.adb (Scan_Make_Switches): Recognize new switch
3735         --no-exit-message.
3737 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3739         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
3740         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
3742 2014-08-01  Javier Miranda  <miranda@adacore.com>
3744         * inline.ads (Inlined_Calls, Backend_Calls,
3745         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
3746         moved to inline.adb (Cannot_Inline): Update documentation.
3747         (Check_And_Build_Body_To_Inline): Renamed.
3748         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3749         * inline.adb (Check_Inlining_Restrictions): New local variable.
3750         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
3751         Backend_Not_Inlined_Subps): Declarations moved here
3752         from inline.ads (Number_Of_Statements): Removed.
3753         (Remove_Pragmas): Avoid duplicated version of this subprogram.
3754         (Build_Body_To_Inline): Code cleanup.
3755         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
3756         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
3757         (Check_Body_To_Inline): Removed.
3758         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
3759         (Has_Excluded_Declaration): No action if not
3760         Check_Inlining_Restrictions.
3761         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
3762         (Initialize): Initialize the lists of inlined calls and subprograms.
3763         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3764         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
3765         to Check_And_Build_Body_To_Inline since it has been renamed as
3766         Check_And_Split_Unconstrained_Function
3767         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
3768         package inline.
3769         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
3771 2014-08-01  Vincent Celier  <celier@adacore.com>
3773         * debug.adb: Add documentation for new debug switch -ds.
3774         * make.adb (List_Bad_Compilations): Do not issue any message
3775         when switch -ds is specified.
3776         * makeutl.adb (Fail_Program): Do not issue any message when
3777         -ds is specified.
3778         (Finish_Program): Ditto.
3780 2014-08-01  Robert Dewar  <dewar@adacore.com>
3782         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
3783         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
3784         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
3785         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
3786         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
3787         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
3788         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
3789         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
3790         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
3791         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
3792         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
3793         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
3794         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
3795         s-tratas.ads: Minor fix to copyright notices.
3797 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3799         * sinfo.ads: Remove long obsolete comment.
3800 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3802         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
3803         * sem_ch3.adb: Minor reformatting.
3805 2014-08-01  Pascal Obry  <obry@adacore.com>
3807         * cstreams.c: Only enable large file support on know supported
3808         platforms. Add missing defines/includes.
3810 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3812         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
3813         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
3814         on generic units that contain constructs that forbid subtypes
3815         with predicates.
3816         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
3817         Inherit flags indicating the presence of predicates in subtype
3818         declarations with and without constraints.
3819         (Inherit_Predicate_Flags): Utility for the above.
3820         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
3821         indicate that the actual cannot have predicates, and preserve
3822         warning. In an instance, report error if actual has predicates
3823         and the construct appears in a package declaration.
3824         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
3825         for an actual with predicates, if the corresponding formal
3826         carries No_Predicate_On_Actual or (in the case of a loop)
3827         No_Dynamic_Predicate_On_Actual.
3828         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
3829         Static_Predicate function if the type is non-static (in the
3830         presence of previous errors),
3831         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
3832         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
3833         generic contract on actuals that cannot have predicates.
3835 2014-08-01  Pascal Obry  <obry@adacore.com>
3837         * a-direct.adb (C_Size): Returns an int64.
3838         * osint.adb (System.CRTL): New with clause.
3839         (File_Length.Internal): Returns an int64.
3840         * s-os_lib.ads (File_Length): Returns an int64.
3842 2014-08-01  Robert Dewar  <dewar@adacore.com>
3844         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
3845         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
3846         osint.adb, krunch.adb: Minor reformatting.
3848 2014-08-01  Robert Dewar  <dewar@adacore.com>
3850         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
3851         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
3852         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
3853         Remove VMS-specific code.
3854         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
3856 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3858         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
3859         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
3860         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
3861         mlib.ads, tempdir.adb: Remove VMS handling.
3863 2014-08-01  Pascal Obry  <obry@adacore.com>
3865         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
3866         (__gnat_named_file_length): Likewise.
3867         (__gnat_file_length_attr): Likewise.
3868         * a-direct.adb (C_Size): Use size_t as returned type.
3869         * osint.adb (File_Length): Adjust spec for Internal routine
3870         (returns size_t).
3871         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
3872         (System.CRTL): With claused moved to spec.
3873         * s-os_lib.ads (System.CRTL): With clause moved to here.
3875 2014-08-01  Pascal Obry  <obry@adacore.com>
3877         * adaint.h, adaint.c (__gnat_open): Added.
3878         * s-crtl.ads (open): Import __gnat_open for large file support.
3880 2014-08-01  Robert Dewar  <dewar@adacore.com>
3882         * sem_case.adb (Dup_Choice): Improve message for integer constants.
3884 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3886         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
3888 2014-08-01  Pascal Obry  <obry@adacore.com>
3890         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
3891         * adaint.c (GNAT_OPEN): Uses new macro where needed.
3893 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3895         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
3896         extracted from...
3897         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
3898         * gcc-interface/gigi.h: Update comment.
3900 2014-07-31  Javier Miranda  <miranda@adacore.com>
3902         * debug.adb Remove documentation of -gnatd.k (no longer needed).
3903         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
3904         * inline.ads (Backend_Inlined_Subps): New
3905         Elist.  (Backend_Not_Inlined_Subps): New Elist.
3906         (Has_Excluded_Declaration): Declaration previously located in
3907         * inline.adb (Has_Excluded_Statement): Declaration previously
3908         located in inline.adb
3909         * inline.adb (Has_Single_Return): Moved out of
3910         Build_Body_To_Inline to avoid having duplicated code.
3911         (Number_Of_Statements): New subprogram.
3912         (Register_Backend_Inlined_Subprogram): New subprogram.
3913         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
3914         (Add_Inlined_Subprogram): Register backend inlined subprograms and
3915         also register subprograms that cannot be inlined by the backend.
3916         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
3917         to avoid having duplicated code.  Replace occurrences of
3918         Debug_Flag_Dot_K by Back_End_Inlining.
3919         * sem_res.adb (Resolve_Call): Code cleanup.
3920         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
3921         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
3922         (List_Inlining_Info): Add listing of subprograms passed to the
3923         backend and listing of subprograms that cannot be inlined by
3924         the backend.
3925         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
3926         Debug_Flag_Dot_K by Back_End_Inlining.
3928 2014-07-31  Robert Dewar  <dewar@adacore.com>
3930         * nlists.ads: Minor code fix (remove unwise Inline for
3931         List_Length).
3933 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3935         * einfo.adb: Remove VMS specific code.
3936         * exp_attr.adb: Remove VAX specific code.
3937         * set_targ.adb: Remove handling of VAX_Float.
3938         * sem_vfpt.adb: Remove references to Vax_Native.
3939         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
3941 2014-07-31  Robert Dewar  <dewar@adacore.com>
3943         * sem_ch4.adb: Minor reformatting.
3945 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3947         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
3948         to VMS. Misc clean ups.
3949         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
3951 2014-07-31  Robert Dewar  <dewar@adacore.com>
3953         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
3954         exp_prag.adb, frontend.adb, interfac.ads,
3955         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
3956         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
3957         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
3958         snames.ads-tmpl: Remove obsolete VMS-specific code.
3960 2014-07-31  Robert Dewar  <dewar@adacore.com>
3962         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
3964 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3966         * a-intnam-linux.ads: Minor: update obsolete comments.
3967         * s-taasde.adb: Minor: fix comment header.
3969 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3971         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
3972         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
3973         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
3974         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
3975         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
3976         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
3977         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
3978         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
3979         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
3980         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
3981         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
3982         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
3983         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
3984         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
3985         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
3986         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
3987         * namet.h (Is_Non_Ada_Error): Remove.
3989 2014-07-31  Robert Dewar  <dewar@adacore.com>
3991         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
3992         reformatting.
3994 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3996         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
3997         which demonstrates the expansion of while loops subject to
3998         attribute 'Loop_Entry. The condition of a while loop along with
3999         related condition actions is now wrapped in a function.  Instead
4000         of repeating the condition, the expansion now calls the function.
4002 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4004         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
4005         error when reporting of missing values in a case statement for
4006         a type with a static predicate.
4007         (Check_Choices): Reject a choice given by a subtype to which a
4008         Dynamic_Predicate applies.
4009         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
4010         Has_Dynamic_Predicate_Aspect flag from parent.
4012 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4014         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
4015         cannot apply to a subtype of an incomplete type.
4016         (Is_Static_Choice): Treat an Others_Clause as static. The
4017         staticness of the expression and of the range are checked
4018         elsewhere.
4020 2014-07-31  Pascal Obry  <obry@adacore.com>
4022         * adaint.h (__gnat_ftell64): Added.
4023         (__gnat_fseek64): Added.
4024         (__int64): Added.
4025         * cstreams.c (__int64): Removed.
4027 2014-07-31  Pascal Obry  <obry@adacore.com>
4029         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
4030         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
4031         (ftell64): Always returns a 64bit value.
4032         * cstreams.c (int64): New definition.
4033         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
4034         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
4035         uses ftello() on UNIX.
4036         (__gnat_fseek64): Offset is always a 64bit value. The
4037         implementation now uses fseeko() on UNIX.
4038         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
4039         always use fseek64 to set the offset.
4040         (Size): Simplify code, always use fseek64/ftell64.
4041         * s-direio.ads (Count): Now an int64.
4042         * g-socket.ads (Vector_Element): Adjust definition for Length
4043         to be a size_t. This matches the C definition and avoid using
4044         a 64bit integer on 32bit platforms now that Count is always 64bit.
4045         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
4046         (C_Recvmsg): Change some conversion to account for change in
4047         Vector_Element.
4048         (C_Sendmsg): Likewise.
4050 2014-07-31  Robert Dewar  <dewar@adacore.com>
4052         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
4053         * debug.adb: Remove documentation of -gnatdm flag.
4054         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
4055         -gnatdm flag.
4057 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4059         * lib-writ.adb (Write_Unit_Information): Fix case where U =
4060         No_Unit.
4062 2014-07-31  Claire Dross  <dross@adacore.com>
4064         * exp_util.adb, exp_util.ads
4065         (Get_First_Parent_With_External_Axiomatization_For_Entity):
4066         New routine to find the first parent of an entity with
4067         a pragma Annotate (GNATprove, External_Axiomatization).
4068         (Has_Annotate_Pragma_For_External_Axiomatization): New function
4069         to check if a package has a pragma Annotate (GNATprove,
4070         External_Axiomatization).
4071         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
4072         flag on the entity for the declaration created for a formal
4073         subprogram in an instance. This is a renaming declaration,
4074         or in GNATprove_Mode the declaration of an expression function
4075         that captures the axiomatization of the actual.
4076         * sem_ch6.adb (Analyze_Expression_Function): For a
4077         Generic_Actual_Subprogram, place body immediately after the
4078         declaration because it may be used in a subsequent declaration
4079         in the instance.
4080         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
4081         the actual is a function, not an operator. Handle functions with
4082         one and two parameters and binary and unary operators.
4084 2014-07-31  Pascal Obry  <obry@adacore.com>
4086         * cstreams.c (__gnat_is_regular_file_fd): Removed.
4087         * adaint.c (__gnat_is_regular_file_fd): Added.
4089 2014-07-31  Robert Dewar  <dewar@adacore.com>
4091         * exp_strm.adb: Minor reformatting.
4093 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4095         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
4096         Analyze_Associations, to create a wrapper around operators that
4097         are actuals to formal subprograms. This is done in GNATProve
4098         mode in order to propagate the contracts of the operators to
4099         the body of the instance.
4101 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4103         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
4104         legal if within an aspect specification for a generic subprogram.
4106 2014-07-31  Javier Miranda  <miranda@adacore.com>
4108         * gnat1drv.adb (Back_End_Inlining): Set to false if
4109         Suppress_All_Inlining is set.
4110         * debug.adb: Adding documentation for -gnatd.z.
4111         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
4112         processing to -gnatn1 for calls to Inline_Always routines.
4113         (Add_Inlined_Subprogram): Remove previous patch.
4115 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4117         * sem_ch13.adb (Check_One_Function): Apply properly the static
4118         semantic rules for indexing aspects and the functions they denote.
4120 2014-07-31  Javier Miranda  <miranda@adacore.com>
4122         * debug.adb: Complete documentation of -gnatd.z.
4124 2014-07-31  Bob Duff  <duff@adacore.com>
4126         * gnat_ugn.texi: Minor doc fixes.
4128 2014-07-31  Robert Dewar  <dewar@adacore.com>
4130         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
4131         index value.
4133 2014-07-31  Tristan Gingold  <gingold@adacore.com>
4135         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
4136         (Packed_Bytes1): Make component aliased.
4138 2014-07-31  Robert Dewar  <dewar@adacore.com>
4140         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
4142 2014-07-31  Robert Dewar  <dewar@adacore.com>
4144         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
4145         reformatting.
4147 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4149         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
4150         on array references here, now done more selectively in trans.c.
4152 2014-07-31  Doug Rupp  <rupp@adacore.com>
4154         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
4156 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4158         * sem_util.adb (Is_Effectively_Volatile): New routine.
4160 2014-07-31  Fedor Rybin  <frybin@adacore.com>
4162         * gnat_ugn.texi: Document --test-duration option for gnattest.
4164 2014-07-31  Javier Miranda  <miranda@adacore.com>
4165             Eric Botcazou  <ebotcazou@adacore.com>
4167         * opt.ads (Back_End_Inlining): New variable which controls
4168         activation of inlining by back-end expansion.
4169         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
4170         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
4171         the body to be inlined by the frontend if Back_End_Inlining
4172         is enabled.
4173         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
4174         (Expand_Call): If backend inlining is enabled let the backend to
4175         handle inlined subprograms.
4176         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
4177         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
4178         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
4179         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
4180         enabled.
4181         * debug.adb Document -gnatd.z
4182         * fe.h Import Back_End_Inlining variable.
4183         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
4184         enabled then declare attribute "always inline"
4185         * gcc-interface/decl.c, gcc-interface/trans.c,
4186         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
4188 2014-07-31  Robert Dewar  <dewar@adacore.com>
4190         * a-ngelfu.ads: Minor comment fix.
4192 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4194         * freeze.adb (Freeze_Record_Type): Replace all calls to
4195         Is_SPARK_Volatile with Is_Effectively_Volatile and update
4196         related comments.
4197         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
4198         Replace all calls to Is_SPARK_Volatile with
4199         Is_Effectively_Volatile and update related comments.
4200         * sem_ch5.adb (Analyze_Iterator_Specification,
4201         Analyze_Loop_Parameter_Specification): Replace all calls to
4202         Is_SPARK_Volatile with Is_Effectively_Volatile and update
4203         related comments.
4204         * sem_ch6.adb (Process_Formals): Replace all calls to
4205         Is_SPARK_Volatile with Is_Effectively_Volatile and update
4206         related comments.
4207         * sem_ch12.adb (Instantiate_Object): Replace the call to
4208         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
4209         and update related comment.
4210         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
4211         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
4212         with Is_Effectively_Volatile and update related comments.
4213         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
4214         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
4215         update related comments.
4216         * sem_util.adb (Has_Enabled_Property,
4217         Variable_Has_Enabled_Property): Replace all calls
4218         to Is_SPARK_Volatile with Is_Effectively_Volatile and
4219         update related comments.
4220         (Is_Effectively_Volatile): New routine.
4221         (Is_Effectively_Volatile_Object): New routine.
4222         (Is_SPARK_Volatile): Removed.
4223         (Is_SPARK_Volatile_Object): Removed.
4224         * sem_util.ads (Is_Effectively_Volatile): New routine.
4225         (Is_Effectively_Volatile_Object): New routine.
4226         (Is_SPARK_Volatile): Removed.
4227         (Is_SPARK_Volatile_Object): Removed.
4229 2014-07-31  Pascal Obry  <obry@adacore.com>
4231         * s-fileio.adb (Open): Make sure a shared file gets inserted into
4232         the global list atomically. This ensures that the file descriptor
4233         won't be freed because another tasks is closing the file.
4235 2014-07-31  Robert Dewar  <dewar@adacore.com>
4237         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
4238         generation of _FIRST and _LAST variables even in GNATprove_Mode.
4239         * gnat_ugn.texi: Minor editing.
4240         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
4241         aggregate is marked Comes_From_Source if argument is CFS.
4243 2014-07-31  Pascal Obry  <obry@adacore.com>
4245         * s-fileio.adb: Remove obsolete comment.
4247 2014-07-31  Vincent Celier  <celier@adacore.com>
4249         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
4250         overriding keyword before function to avoid error when compiler
4251         is called with -gnatyO (check overriding indicators).
4253 2014-07-31  Tucker Taft  <taft@adacore.com>
4255         * gnat_ugn.texi: Add a paragraph pointing the reader
4256         to the "plugins" example.
4258 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4260         * freeze.adb (Freeze_Expression): Document the
4261         purpose of the parent chain traversal.
4263 2014-07-31  Robert Dewar  <dewar@adacore.com>
4265         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
4266         unconstrained fpt ops.
4268 2014-07-31  Pascal Obry  <obry@adacore.com>
4270         * s-fileio.adb (Open): Make sure a shared file gets inserted into
4271         the global list atomically. This ensures that the file descriptor
4272         won't be freed because another tasks is closing the file.
4274 2014-07-31  Vincent Celier  <celier@adacore.com>
4276         * projects.texi: Minor spelling error fix.
4278 2014-07-31  Robert Dewar  <dewar@adacore.com>
4280         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
4281         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
4282         information.
4283         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
4284         * restrict.adb (Process_Restriction_Synonyms): Add handling
4285         of No_Elaboration_Code_All.
4286         * restrict.ads (Process_Restriction_Synonyms): Now handles
4287         No_Elaboration_Code_All.
4288         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
4289         No_Elaboration_Code_All.
4290         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4291         Handle setting of No_Elab_Code in unit information. Handle
4292         No_Elaboration_Code_All.
4293         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
4294         pragma processing.
4295         (Name_No_Elaboration_Code_All): New name for pragma processing.
4297 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4299         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4300         types with a null range and use the Esize of the component
4301         instead of its RM_Size to identify appropriate values.
4303 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4305         * freeze.adb Add with and use clause for Aspects.
4306         (Freeze_Expression): Emit an error when a volatile constant lacks
4307         Boolean aspect Import.
4308         (Has_Boolean_Aspect_Import): New routine.
4310 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
4312         * exp_util.adb: Minor reformatting.
4314 2014-07-31  Vincent Celier  <celier@adacore.com>
4316         * errutil.adb (Error_Msg): Make sure that all components of
4317         the error message object are initialized.
4319 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4321         * sem_ch4.adb (Try_Container_Indexing): If the container type is
4322         class-wide, use specific type to locate iteration primitives.
4323         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
4324         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
4325         Minor error message reformating.
4326         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
4327         aspect for a derived type.
4329 2014-07-31  Robert Dewar  <dewar@adacore.com>
4331         * debug.adb: Document debug flag d.X.
4333 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4335         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
4336         * sem_util.adb (Find_Specific_Type): If type is untagged private,
4337         retrieve full view so that primitive operations can be located.
4338         * exp_disp.adb Move Find_Specific_Type to sem_util.
4339         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
4340         Find_Specific_Type to locate primitive equality.
4341         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
4342         type does not require initialization.
4343         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
4344         body all visibility is established, and the enclosing package
4345         declarations must not be installed.
4347 2014-07-31  Yannick Moy  <moy@adacore.com>
4349         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
4350         Make subprogram public.
4352 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4354         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
4355         predicate Discriminated_Size, to distinguish between private
4356         components that depend on discriminants from those whose size
4357         depends on some other non-static expression.
4359 2014-07-31  Nicolas Setton  <setton@adacore.com>
4361         * g-exptty.adb (Close): Fix binding to Waitpid: use the
4362         tty version.
4364 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4366         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
4367         in a discrete range, when 'range was probably intended.
4369 2014-07-31  Robert Dewar  <dewar@adacore.com>
4371         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
4373 2014-07-31  Robert Dewar  <dewar@adacore.com>
4375         * frontend.adb: Minor reformatting.
4376         * sem.adb: Minor reformatting.
4377         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
4378         identifiers on rewrite.
4379         * par.adb: Minor comment updates.
4380         * a-ngelfu.adb (Cos): Minor simplification.
4381         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
4382         and recovery for bad aspect.
4383         * exp_ch3.adb: Code clean up.
4384         * sem_util.ads: Minor comment correction.
4385         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
4386         * sem_ch3.adb: Code clean up.
4387         * binderr.ads: Minor comment correction.
4389 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4391         * exp_disp.adb (Expand_Interface_Conversion): A call whose
4392         prefix is a static conversion to an interface type that is not
4393         class-wide is not dispatching.
4395 2014-07-31  Robert Dewar  <dewar@adacore.com>
4397         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
4398         s-traceb-mastop.adb: Minor reformatting.
4400 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4402         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
4403         expansion, to handle properly visibility of selected components
4404         in instance bodies.
4406 2014-07-31  Robert Dewar  <dewar@adacore.com>
4408         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
4409         * par-ch2.adb (P_Pragma): Set Inside_Depends.
4410         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
4411         Check_Unary_Plus_Or_Minus.
4412         * scans.ads (Inside_Depends): New flag.
4413         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
4414         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
4415         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4416         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
4417         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
4418         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
4419         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4421 2014-07-31  Javier Miranda  <miranda@adacore.com>
4423         * s-vaflop.adb Move the body of function T_To_G before
4424         T_To_D. Required for frontend inlining.
4425         * inline.adb (Has_Excluded_Contract): New subprogram used to
4426         check if a subprogram inlined by the frontend has contracts
4427         which cannot be inlined.
4429 2014-07-31  Bob Duff  <duff@adacore.com>
4431         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
4432         (Call_Chain): Add 1 to number of frames to skip, to account for
4433         the fact that there's one more frame on the stack.
4434         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
4436 2014-07-31  Robert Dewar  <dewar@adacore.com>
4438         * checks.adb (Enable_Overflow_Check): More precise setting of
4439         Do_Overflow_Check flag for division.
4441 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4443         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
4444         array types with implementation type.
4446 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4448         * sem_ch10.adb (Process_State): Remove local variable Name. Add
4449         local variable Decl. Partially declare an abstract state by
4450         generating an entity and storing it in the state declaration.
4451         * sem_prag.adb (Create_Abstract_State): Fully declare a
4452         semi-declared abstract state.
4454 2014-07-31  Robert Dewar  <dewar@adacore.com>
4456         * prj-nmsc.adb: Minor reformatting.
4458 2014-07-31  Bob Duff  <duff@adacore.com>
4460         * s-tasdeb.adb (System.Tasking.Debug): Remove
4461         all usage of the secondary stack from this package.
4463 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4465         * freeze.adb (Freeze_Expression): Update the loop in charge
4466         of finding a proper insertion place for freeze nodes to handle
4467         N_Expression_With_Actions nodes.
4469 2014-07-31  Robert Dewar  <dewar@adacore.com>
4471         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
4472         reformatting.
4474 2014-07-31  Pascal Obry  <obry@adacore.com>
4476         * prj-nmsc.adb: Minor reformatting.
4478 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4480         * sem_util.adb (Has_Preelaborable_Initialization): Check that
4481         type is tagged before checking whether a user-defined Initialize
4482         procedure is present.
4484 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
4486         * a-ngelfu.ads (Sqrt): Augment postcondition.
4488 2014-07-31  Pascal Obry  <obry@adacore.com>
4490         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
4491         directory and ALI directory must be different than all object
4492         and library directories of aggregated projects.
4494 2014-07-31  Vincent Celier  <celier@adacore.com>
4496         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
4497         to package body, as it is not called from outside. Remove argument
4498         Project_Tree, no longer used. When runtime cannot be found,
4499         call Raise_Invalid_Config instead of failing the program.
4501 2014-07-31  Robert Dewar  <dewar@adacore.com>
4503         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
4504         (Overflow_Check).
4505         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
4506         no longer needed.
4508 2014-07-31  Robert Dewar  <dewar@adacore.com>
4510         * gnat_ugn.texi: Document new switch -gnato0.
4511         * sem_ch3.ads: Minor reformatting.
4512         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
4513         (we do not want overflow checks when incrementing elaboration
4514         counters).
4515         * einfo.ads: Minor reformatting.
4517 2014-07-31  Robert Dewar  <dewar@adacore.com>
4519         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
4520         * s-arit64.adb: Minor reformatting.
4522 2014-07-31  Robert Dewar  <dewar@adacore.com>
4524         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
4525         checking is enabled except in GNAT_Mode.
4526         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
4527         (suppress overflow checks).
4529 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4531         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
4532         invariant procedure for an internally generated subtype that is
4533         created for an object of a class-wide type.
4535 2014-07-31  Vincent Celier  <celier@adacore.com>
4537         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
4539 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
4541         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
4542         exp_disp.adb: Minor reformatting.
4544 2014-07-31  Robert Dewar  <dewar@adacore.com>
4546         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
4547         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
4548         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
4549         reformatting.
4551 2014-07-31  Robert Dewar  <dewar@adacore.com>
4553         * sem_ch13.adb: Minor reformatting.
4555 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4557         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
4558         is an unchecked_union, warn that invariants will not be checked
4559         on components that have them.
4561 2014-07-31  Robert Dewar  <dewar@adacore.com>
4563         * freeze.adb (Freeze_Entity): Check for error of
4564         Type_Invariant'Class applied to a untagged type.
4565         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
4566         as null body, so that we perform error checks even if expansion
4567         is off.
4569 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4571         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
4572         is already present, nothing to do.
4573         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
4574         component, check whether the access type has an invariant before
4575         checking the designated type.
4576         (Build_Record_Invariant_Proc): Change suffix of generated
4577         name to prevent ambiguity when record type has invariants
4578         in addition to those of components, and two subprograms are
4579         constructed. Consistent with handling of array types.
4580         (Insert_Component_Invariant_Checks): Build invariant procedure
4581         body when one has not been created yet, in the case of composite
4582         types that are completions and whose full declarations carry
4583         invariants.
4585 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4587         * gnat_rm.texi: Minor doc fixes.
4589 2014-07-30  Robert Dewar  <dewar@adacore.com>
4591         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
4593 2014-07-30  Vincent Celier  <celier@adacore.com>
4595         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
4596         of error message.
4597         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
4598         message to report that a directory cannot be created, to avoid
4599         processing of the directory path that may contains special
4600         insertion characters.
4602 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4604         * a-crdlli.ads: Place declaration of Empty_List after full type
4605         declaration for Curosr, to prevent freezing error.
4607 2014-07-30  Robert Dewar  <dewar@adacore.com>
4609         * get_targ.adb: Minor code reorganization.
4610         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
4611         reformatting.
4613 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4615         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
4616         not Program_Error, when attempting to remove an element not in
4617         the set. This is the given semantics for all set containers.
4619 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4621         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
4622         element is not present in tree return rather than violating
4623         an assertion. Constraint_Error will be raised in the caller if
4624         element is not in the container.
4626 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4628         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
4629         (elab body): Add provision for default target config file.
4630         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
4632 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4634         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
4635         when attempting to remove an element not in the set. This is
4636         the given semantics for all set containers.
4637         * a-cborse.adb (Delete): Attempt removal first, to check for
4638         tampering, before checking whether this is an attempt to
4639         delete a  non-existing element, and in fthe latter case raise
4640         Constraint_Error.
4642 2014-07-30  Vincent Celier  <celier@adacore.com>
4644         * prj-proc.adb (Recursive_Process): Do not create a new
4645         Project_Id if the project is already in the list of projects of
4646         the tree.
4648 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4650         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
4651         whose type is an incomplete formal type.
4652         (Analyze_Return_Type): Reject a return type that is an untagged
4653         imcomplete formal type.
4654         (Process_Formals): Reject a formal parameter whose type is an
4655         untagged formal incomplete type.
4656         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
4657         an untagged formal incomplete type.
4659 2014-07-30  Robert Dewar  <dewar@adacore.com>
4661         * gnat_ugn.texi: Minor spelling correction.
4662         * makeutl.adb: Minor code reorganization.
4663         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4665 2014-07-30  Robert Dewar  <dewar@adacore.com>
4667         * einfo.ads (Has_Unchecked_Union): Document that this is used
4668         to check for illegal Valid_Scalars attribute references.
4669         * exp_attr.adb (Build_Record_VS_Func): New function
4670         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
4671         function.
4672         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
4673         Unchecked_Union Add note on 'Valid_Scalars generating a lot
4674         of code.
4675         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
4676         error on attempt to apply Valid_Scalars to Unchecked_Union type.
4678 2014-07-30  Steve Baird  <baird@adacore.com>
4680         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
4681         of A(I..J)(K) in CodePeer_Mode.
4683 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
4685         * gnat_ugn.texi: Fix typo.
4687 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4689         * lib-writ.ads: document format change.
4691 2014-07-30  Pascal Obry  <obry@adacore.com>
4693         * prj-util.adb (For_Interface_Sources): Do not
4694         include sources from withed externally built projects.
4696 2014-07-30  Robert Dewar  <dewar@adacore.com>
4698         * lib.adb: Minor reformatting.
4699         * prj-util.adb: Minor reformatting.
4701 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4703         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
4704         that depends on discriminants, and which is given by an others
4705         clause, create an explicit subtype with the discriminant values
4706         of the enclosing aggregate, because the backend cannot otherwise
4707         retrieve the actual bounds of the array.
4709 2014-07-30  Fedor Rybin  <frybin@adacore.com>
4711         * gnat_ugn.texi: Improve gnattest documentation.
4713 2014-07-30  Pascal Obry  <obry@adacore.com>
4715         * makeutl.adb (Insert_Project_Sources): Properly handle sources
4716         that are aggregated. We want to include sources not only part
4717         of libraries but also if part of an aggregated project from an
4718         aggregate library.
4719         * prj.adb (For_Project_And_Aggregated_Context): Properly check
4720         state of root project.
4722 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4724         * lib-load.ads: Minor reformatting.
4725         * sinfo.ads (Library_Unit): Update comment.
4726         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
4727         is redundant. Instead used the pragma Node_Id directly as the
4728         element type.
4730 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4732         * lib.adb (Store_Note): Store only notes that do not come from
4733         an instance, and that are in the extended main source unit.
4734         * lib-writ (Write_Unit_Information): Annotations from subunits
4735         must be emitted along with those for the main unit, and they
4736         must carry a specific file name.
4737         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
4738         Unit_Id for the source file containing the pragma, as in the
4739         case of annotations from subunits we might not have a readily
4740         available unit id.
4741         * ali.adb (Scan_ALI): Account for above change in data structure.
4743 2014-07-30  Vincent Celier  <celier@adacore.com>
4745         * makeutl.adb (Insert_Project_Sources): When the library project
4746         is an aggregate Stand-Alone Library, insert in the queue the
4747         Ada interface units, with Closure set to True;
4749 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4751         * sem_util.adb: Fix minor typo.
4752         * makeutl.adb: Minor reformatting.
4754 2014-07-30  Robert Dewar  <dewar@adacore.com>
4756         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
4758 2014-07-30  Yannick Moy  <moy@adacore.com>
4760         * checks.ads: Fix typo in comment.
4762 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
4764         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
4765         entities that materialize range bounds, if any.
4767 2014-07-30  Vincent Celier  <celier@adacore.com>
4769         * projects.texi: Minor spelling fix.
4771 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4773         * checks.adb (Make_Bignum_Block): Use the new secondary stack
4774         build routines to manage the mark.
4775         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
4776         Use the new secodary stack build routines to manage the mark.
4777         (Insert_Actions_In_Scope_Around): Add new formal parameter
4778         Manage_SS along with comment on its usage. Code and comment
4779         reformatting. Mark and release the secondary stack when the
4780         context warrants it.
4781         (Make_Transient_Block): Update the call
4782         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
4783         (Wrap_Transient_Declaration): Remove local variable
4784         Uses_SS. Ensure that the secondary stack is marked and released
4785         when the related object declaration appears in a library level
4786         package or package body. Code and comment reformatting.
4787         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
4788         (Build_SS_Release_Call): New routine.
4790 2014-07-30  Steve Baird  <baird@adacore.com>
4792         * exp_attr.adb: Revert previous change, not needed after all.
4794 2014-07-30  Vincent Celier  <celier@adacore.com>
4796         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
4797         Closure => True for interfaces of Stand-Alone Libraries.
4798         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
4799         Boolean component Closure, defaulted to False.
4801 2014-07-30  Yannick Moy  <moy@adacore.com>
4803         * sem_res.adb: Fix typo in error message.
4805 2014-07-30  Robert Dewar  <dewar@adacore.com>
4807         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
4808         as name suffixes rather than L/H for subtype bounds.
4809         * tbuild.ads: Minor comment improvements and fixes
4810         (Make_External_Name): Document that suffix can start with an
4811         underscore.
4813 2014-07-30  Bob Duff  <duff@adacore.com>
4815         * gnat_ugn.texi: Document --rep-clauses switch.
4817 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4819         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
4820         Default_Component_Value can only be specified for scalar type or
4821         arrays of scalar types respectively.  This legality check must
4822         be performed at the point the aspect is analyzed, in order to
4823         reject aspect specifications that apply to a partial view.
4825 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4827         * freeze.adb: Minor reformatting.
4829 2014-07-30  Robert Dewar  <dewar@adacore.com>
4831         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
4832         codepeer mode.
4834 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4836         * freeze.adb (Check_Expression_Function): At the freeze point
4837         of an expression function, verify that the expression in the
4838         function does not contain references to any deferred constants
4839         that have no completion yet.
4840         (Freeze_Expression, Freeze_Before): call
4841         Check_Expression_Function.
4842         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
4843         * a-ciorse.adb: Add Adjust and Finalize routines for
4844         Reference_Control_Type. Use it in the construction of Reference
4845         and Constant_Reference values.
4847 2014-07-30  Robert Dewar  <dewar@adacore.com>
4849         * exp_aggr.adb: Update comments.
4850         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
4851         reformatting.
4853 2014-07-30  Robert Dewar  <dewar@adacore.com>
4855         * cstand.adb (New_Standard_Entity): New version takes name
4856         string to call Make_Name.
4857         (Create_Standard): Use this routine to set name before setting other
4858         fields.
4860 2014-07-30  Robert Dewar  <dewar@adacore.com>
4862         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
4863         entity reference.
4864         (Expand_Attribute, case Last): Ditto.
4865         * exp_ch3.adb (Constrain_Index): New calling sequence for
4866         Process_Range_Expr_In_Decl.
4867         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
4868         problematical case.
4869         * sem_ch3.adb (Constrain_Index): New calling sequence for
4870         Process_Range_Expr_In_Decl.
4871         (Set_Scalar_Range_For_Subtype): ditto.
4872         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
4873         subtype.
4874         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
4875         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
4876         types if we are not assuming no invalid values.
4878 2014-07-30  Robert Dewar  <dewar@adacore.com>
4880         * clean.adb: Minor reformatting.
4881         * opt.ads: Minor fix to incorrect comment.
4883 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4885         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
4886         subprogram, used by bounded hashed sets, to delete a node at
4887         a given index, whose element may have been improperly updated
4888         through a Reference_Preserving key.
4889         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
4890         * a-cbhase.adb: Add Adjust and Finalize routines for
4891         Reference_Control_Type.
4892         (Delete, Insert): Raise Program_Error, not Constraint_Error,
4893         when operation is illegal.
4894         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
4895         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
4896         private with_clause for Ada.Finalization.
4897         * a-cbmutr.adb: Add Adjust and Finalize routines for
4898         Reference_Control_Type. Use it in the construction of Reference
4899         and Constant_Reference values.
4901 2014-07-30  Robert Dewar  <dewar@adacore.com>
4903         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
4905 2014-07-30  Pascal Obry  <obry@adacore.com>
4907         * clean.adb (Clean_Project): Properly check for directory
4908         existence before trying to enter it.
4910 2014-07-30  Robert Dewar  <dewar@adacore.com>
4912         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
4914 2014-07-30  Robert Dewar  <dewar@adacore.com>
4916         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
4917         missing semicolon after name.
4919 2014-07-30  Pascal Obry  <obry@adacore.com>
4921         * prj.ads (Gprinstall_Flags): New constant.
4922         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
4923         missing library dir if Directories_Must_Exist_In_Projects
4924         is false.
4926 2014-07-30  Bob Duff  <duff@adacore.com>
4928         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
4929         * s-traceb.ads: Updagte comments.
4931 2014-07-30  Robert Dewar  <dewar@adacore.com>
4933         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
4934         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
4935         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
4936         reformatting.
4938 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4940         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
4941         subprogram, used by all versions of hashed sets, to delete a node
4942         whose element has been improperly updated through a Reference_
4943         Preserving key.
4944         * a-cohase.adb: Remove Delete_Node, use new common procedure
4945         Delete_Node_At_Index.
4946         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
4947         * a-cihase.adb: Add Adjust and Finalize routines for
4948         Reference_Control_Type.
4949         (Reference_Preserving_Key): Build aggregate for
4950         Reference_Control_Type
4952 2014-07-30  Yannick Moy  <moy@adacore.com>
4954         * checks.adb, checks.ads (Determine_Range_R): New procedure to
4955         determine the possible range of a floating-point expression.
4957 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4959         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
4960         * a-cborse.adb: Add Adjust and Finalize routines for
4961         Reference_Control_Type.
4962         (Reference_Preserving_Key): Build aggregate for
4963         Reference_Control_Type.
4964         (Delete): Check for tampering, and raise Program_Error (not
4965         Constraint_Error) when attempting to delete an element not in
4966         the set.
4967         (Insert): Ditto.
4969 2014-07-30  Bob Duff  <duff@adacore.com>
4971         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
4972         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
4973         Exception_Information is used to produce useful debugging
4974         information for the programmer. However, it was also used to
4975         implement the stream attributes for type Exception_Occurrence. The
4976         latter requires a stable and portable interface, which meant
4977         that we couldn't include a symbolic traceback. A separate set of
4978         routines was used to provide symbolic tracebacks under program
4979         control (i.e. not automatically). The goal of this ticket is
4980         to provide such automatic tracebacks, so the change here is to
4981         split the two functionalities: Exception_Information gives the
4982         maximally useful information for debugging (i.e. it now includes
4983         a symbolic traceback when a decorator is set, and it can be
4984         improved freely in the future without disturbing streaming).
4985         Untailored_Exception_Information always uses hexadecimal addresses
4986         in the traceback, has a stable and portable output, and is now
4987         used for streaming.
4989 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4991         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
4992         on the target of the assignment to find out whether it
4993         can be directly done by the back-end.
4994         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
4996 2014-07-30  Robert Dewar  <dewar@adacore.com>
4998         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
4999         a-tasatt.adb: Minor reformatting.
5001 2014-07-30  Robert Dewar  <dewar@adacore.com>
5003         * exp_ch4.adb: Minor reformatting.
5005 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5007         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
5008         Reference_Control_Type to generic package, to keep additional
5009         information for Reference_Types that manipulate keys. Add Adjust and
5010         Finalize procedures for this type.
5011         (Finalize): When finalizing a reference_preserving_key, verify
5012         that the key of the new value is equivalent to the key of the
5013         original element, raise Program_Error otherwise.
5014         (Insert): Detect tampering.
5015         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5016         and update Busy and Lock bits to detect tampering.
5017         * a-cohase.ads: Keep with-clause private.
5019 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5021         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
5022         of an equality are of an Unchecked_Union type and lack inferable
5023         discriminants.
5025 2014-07-30  Bob Duff  <duff@adacore.com>
5027         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
5028         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
5029         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
5030         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
5031         we can call them from the runtimes. Leave renamings in place under GNAT.
5033 2014-07-30  Yannick Moy  <moy@adacore.com>
5035         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
5036         inlining in GNATprove mode.
5038 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5040         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
5041         Reference_Control_Type to generic package, to keep additional
5042         information for Reference_Types that manipulate keys. Add Adjust and
5043         Finalize procedures for this type.
5044         (Delete_Node): New procedure called when finalizing a
5045         Reference_Control_Type, to remove a node whose element has been
5046         improperly updated through a Reference.
5047         (Insert): Detect tampering.
5048         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5049         and update Busy and Lock bits to detect tampering.
5051 2014-07-30  Bob Duff  <duff@adacore.com>
5053         * exp_intr.ads: Minor comment fix.
5055 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5057         * exp_prag.adb, a-tags.ads: Minor typo fixes.
5059 2014-07-30  Bob Duff  <duff@adacore.com>
5061         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
5062         a-except.ads, g-traceb.adb, memtrack.adb,
5063         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
5064         Cleanup: Make the three versions of System.Traceback.Call_Chain
5065         have the same interface. Use an array for the Traceback parameter
5066         instead of an Address.  This will enable reduction in code
5067         duplication.
5069 2014-07-30  Pat Rogers  <rogers@adacore.com>
5071         * gnat_ugn.texi: Corrected minor textual error in description
5072         of switch -gnatwl.
5074 2014-07-30  Bob Duff  <duff@adacore.com>
5076         * Makefile.rtl: Sort file names.
5078 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5080         * a-tasatt.adb: Complete previous change: kill spurious warning
5081         on e.g. sparc, and make sure we only use the fast path when the
5082         alignment is compatible.
5084 2014-07-30  Yannick Moy  <moy@adacore.com>
5086         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
5087         coming from source.
5089 2014-07-30  Yannick Moy  <moy@adacore.com>
5091         * inline.adb (Build_Body_To_Inline): Issue more precise messages
5092         for declarations that prevent inlining.
5093         (Cannot_Inline): Change usual start of message to refer to contextual
5094         analysis in GNATprove mode.
5095         * sem_res.adb (Resolve_Call): Change usual start of message to
5096         refer to contextual analysis in GNATprove mode, when inlining
5097         not possible.
5099 2014-07-30  Robert Dewar  <dewar@adacore.com>
5101         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
5102         * inline.adb: Minor reformatting.
5104 2014-07-30  Javier Miranda  <miranda@adacore.com>
5106         * a-tags.ads: Add comments.
5108 2014-07-30  Pat Rogers  <rogers@adacore.com>
5110         * gnat_rm.texi: Minor word error.
5112 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5114         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
5115         created to capture the value of the prefix of 'Old at the
5116         beginning of the current declarative part, to prevent data flow
5117         anomalies in the postcondition procedure that will follow.
5119 2014-07-30  Yannick Moy  <moy@adacore.com>
5121         * debug.adb: Retire debug flag -gnatdQ.
5122         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
5123         on decl, not on body.  Ignore predicate functions.
5124         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
5125         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
5126         body when generating a decl for a body on which SPARK_Mode aspect
5127         is given.
5128         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
5129         attaching pragma to entity, to account for declaration not coming
5130         from source.
5131         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
5132         as not always inlined in GNATprove mode, when called in an
5133         assertion context.
5135 2014-07-30  Vincent Celier  <celier@adacore.com>
5137         * debug.adb: Minor comment update.
5139 2014-07-30  Robert Dewar  <dewar@adacore.com>
5141         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
5142         * sprint.adb (Sprint_Node): Handle N_Contract case.
5143         * exp_prag.adb: Minor reformatting.
5144         * freeze.adb (Freeze_Entity): Check useless postcondition for
5145         No_Return subprogram.
5146         * sem_prag.adb: Minor reformatting.
5148 2014-07-30  Javier Miranda  <miranda@adacore.com>
5150         * a-tags.ads: Complete comments about performance.
5152 2014-07-30  Fedor Rybin  <frybin@adacore.com>
5154         * gnat_ugn.texi: Adding description for --exit-status option to
5155         gnattest section.  Fixing index entry of --passed-tests option
5156         in gnattest section.
5158 2014-07-30  Javier Miranda  <miranda@adacore.com>
5160         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
5161         rtsfind.ads: Remove references to package Interfaces.CPP since this
5162         package is no longer needed.
5164 2014-07-30  Bob Duff  <duff@adacore.com>
5166         * s-taasde.adb (Timer_Queue): Don't use a
5167         build-in-place function call to initialize the Timer_Queue.
5168         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
5169         Turn off polling in these units, because otherwise we get
5170         elaboration circularities with Ada.Exceptions when the -gnatP
5171         switch is used.
5172         * s-tassta.adb (Create_Task): Make sure independent tasks
5173         are created with Parent = Environment_Task. This was not true,
5174         for example, in s-interr.adb, when Interrupt_Manager does "new
5175         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
5176         which is wrong because the master is determined by the access
5177         type, which is at library level.
5178         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
5179         now set correctly by Create_Task.
5180         (Make_Passive): Remove the workaround for the race condition in
5181         Make_Independent.
5182         * frontend.adb (Frontend): Revert to previous method of detecting
5183         temporary configuration pragma files, recognizing such files by
5184         ".tmp" in the name. This is more general than detecting pragmas
5185         Source_File_Name_Project, because it allows any tool to use
5186         this naming convention, no matter the content of the file.
5187         * gnat_ugn.texi: Document this naming convention.
5189 2014-07-30  Robert Dewar  <dewar@adacore.com>
5191         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
5192         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
5193         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
5194         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
5195         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
5196         conversion.
5198 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5200         * sem_ch5.adb: Improve error recovery.
5201         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
5202         before analyzing the body, so that in GNATprove mode there is
5203         no light expansion. Whatever expansion is required by SPARK will
5204         be performed when analysing the inlined code.
5206 2014-07-30  Bob Duff  <duff@adacore.com>
5208         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
5210 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5212         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
5213         verify that it is not hidden by an inner implicit declaration.
5215 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5217         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
5218         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
5219         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
5220         the call returns an unconstrained type: in this case there is
5221         already a transient scope, and we should not establish a new one.
5222         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
5223         True, also insert cleanup actions in the tree.
5224         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
5225         with Clean set True.
5227 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5229         * s-taskin.ads (Direct_Index, Direct_Index_Range,
5230         Direct_Attribute_Element, Direct_Attribute_Array,
5231         Direct_Index_Vector, Direct_Attributes, Is_Defined,
5232         Indirect_Attributes): Removed.  (Atomic_Address,
5233         Attribute_Array, Attributes): New.
5234         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
5235         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
5236         (Finalize_Attributes): Reimplement.
5237         * s-tassta.adb (Create_Task): Remove call to
5238         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
5239         Replace Finalize_Attributes_Link by Finalize_Attributes.
5240         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
5241         Reimplement from scratch, using a simpler and more efficient
5242         implementation.
5243         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
5244         * s-parame.ads, s-parame-hpux.ads,
5245         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
5246         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
5247         Default_Attribute_Count.
5249 2014-07-30  Olivier Hainque  <hainque@adacore.com>
5251         * vxworks-ppc-link.spec: New file. Extra link
5252         instructions for ppc-vxworks.
5253         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
5254         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
5255         * system-vxworks-arm.ads: Likewise.
5256         * gcc-interface/Makefile.in: Enable .spec files.
5258 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5260         * sem_aggr.adb: Minor comment reformatting.
5262 2014-07-30  Robert Dewar  <dewar@adacore.com>
5264         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
5265         * sem_warn.adb (Has_Junk_Name): New function
5266         (Check_References): Use Has_Junk_Name to delete junk warnings
5267         (Check_Unset_Reference): ditto.
5268         (Warn_On_Unreferenced_Entity): ditto.
5269         (Warn_On_Useless_Assignment): ditto.
5271 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5273         * checks.adb (Insert_Valid_Check): Do not check for the packed
5274         array type of a prefix that is an access type.
5276 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5278         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
5279         Unconstrained_Array even if prefix is not frozen yet, as can
5280         occur with a private subtype used as a generic actual.
5282 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5284         * sem_attr.adb: Minor reformatting.
5286 2014-07-30  Pat Rogers  <rogers@adacore.com>
5288         * gnat_rm.texi: Corrected minor wording error in description
5289         of No_Exception_Registration.
5291 2014-07-30  Yannick Moy  <moy@adacore.com>
5293         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
5294         mode. Realphabetize two subprograms.
5295         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
5296         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
5297         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
5298         mode.
5299         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
5300         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
5301         Is_Inline in GNATprove mode.
5302         (Analyze_Subprogram_Specification):
5303         Set Is_Inlined_Always at subprogram entity creation.
5304         * sem_res.adb (Resolve_Call): Do not deal with inlining during
5305         pre-analysis.  Issue warning on call to possibly inlined
5306         subprogram when body not seen.
5308 2014-07-30  Yannick Moy  <moy@adacore.com>
5310         * lib-xref.adb (Generate_Reference): Add special
5311         case for compiler-generated formals in GNATprove mode.
5313 2014-07-30  Yannick Moy  <moy@adacore.com>
5315         * sem_ch6.adb: Add comments.
5317 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5319         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
5321 2014-07-30  Robert Dewar  <dewar@adacore.com>
5323         * sem_aggr.adb, sem_res.adb: Minor reformatting.
5325 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5327         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5328         Bit_Order): Set Reverse_Bit_Order on the base type of the
5329         specified first subtype.
5331 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5333         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
5334         to capture the value of actuals of a limited type rather than
5335         an object declaration, to prevent spurious errors when analyzing
5336         the inlined body.
5338 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5340         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
5341         as an instance, and inhibit semantic checks on already analyzed
5342         code to prevent spurious errors.
5344 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5346         * a-exctra.ads ("="): New function, to restore compatibility.
5348 2014-07-30  Pascal Obry  <obry@adacore.com>
5350         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
5351         routine to use the OS dst setting.
5353 2014-07-30  Pat Rogers  <rogers@adacore.com>
5355         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
5357 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5359         * sem_util.adb (Wrong_Type): Disable some checks equally within
5360         instances and within inlined bodies, to suppress spurious type
5361         errors on already analyzed code.
5362         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
5363         is legal in an inlined body, juts as it is in an instance body.
5365 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5367         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
5368         body the operand of an unchecked conversion may be a literal, in
5369         which case its type is the target type of the conversion. This
5370         is in contrast to conversions in other contexts, where the
5371         operand cannot be a literal and must be resolvable independent
5372         of the context.
5374 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
5376         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
5377         mere scalar constant instead of a reference for a renaming of
5378         scalar literal.
5379         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
5380         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
5382 2014-07-30  Robert Dewar  <dewar@adacore.com>
5384         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
5385         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
5386         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
5387         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
5388         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
5389         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
5390         & code reorganization.
5392 2014-07-30  Bob Duff  <duff@adacore.com>
5394         * s-tassta.adb, sem_util.ads: Minor reformatting.
5396 2014-07-30  Yannick Moy  <moy@adacore.com>
5398         * inline.adb (Build_Body_To_Inline): Detect when
5399         subprogram has multiple returns, or not a single last return
5400         statement, in GNATprove mode.
5401         (Cannot_Inline): Simplify logic to handle case of GNATprove
5402         inlining first.
5404 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5406         * sem_ch6.adb: Stubs are not subject to inlining.
5408 2014-07-30  Bob Duff  <duff@adacore.com>
5410         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
5411         from a procedure to a function, so that it can more easily be
5412         called before the "begin" of a task.
5413         * s-taasde.ads (Delay_Block): Make this type immutably limited,
5414         so we can use a build-in-place function call to initialize
5415         Timer_Queue in the body.
5416         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
5417         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
5418         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
5419         Make_Independent before reaching its "begin", to avoid race
5420         conditions. This causes the activating task to wait until after
5421         Make_Independent is complete before proceeding.  In addition,
5422         we initialize data structures used by independent tasks before
5423         activating those tasks, to avoid possible use of uninitialized data.
5424         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
5425         Minor comment fixes.
5427 2014-07-30  Bob Duff  <duff@adacore.com>
5429         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
5430         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
5431         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
5432         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
5433         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
5435 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5437         * a-tasatt.adb: Remove old comments.
5439 2014-07-30  Yannick Moy  <moy@adacore.com>
5441         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
5442         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
5443         to explain rationale for inlining or not in GNATprove mode.
5444         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
5445         to False when inlining is not possible.
5446         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
5447         flag to indicate that subprogram is fully inlined. To be reversed
5448         if inlining problem is found.
5449         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
5450         call in potentially unevaluated context.
5452 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
5454         * s-tarest.adb, s-tarest.ads: Fix comments.
5456 2014-07-30  Robert Dewar  <dewar@adacore.com>
5458         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
5459         Change No_Scalar_Parts predicate to Scalar_Part_Present and
5460         invert sense of test. This avoids the "not No_xxx" situation
5461         which is always ugly.
5463 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5465         * inline.adb (Expand_Inlined_Call): When generating code for
5466         an internal subprogram the expansion uses the location of the
5467         call, so that gdb can skip over it. In GNATprove mode we want to
5468         preserve slocs of original subprogram when expanding an inlined
5469         call, to obtain better warnings, even though subprogram appears
5470         not to come from source if it is the inlining of a subprogram
5471         body without a previous spec.
5473 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5475         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5476         types with atomic components.
5478 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5480         * Make-generated.in: Remove now unnecessary targets after s-oscons
5481         reorg.
5483 2014-07-30  Yannick Moy  <moy@adacore.com>
5485         * sem_res.adb (Resolve_Call): Use ultimate alias
5486         of callee when available.
5488 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5490         * sem_ch6.adb (Analyze_Expression_Function): To check whether
5491         an expression function is a completion, use the specification of
5492         the previous declaration, not its entity, which may be internally
5493         generated in an inlined context.
5495 2014-07-30  Doug Rupp  <rupp@adacore.com>
5497         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
5498         temp files in /cache directory unless overridden by TMPDIR.
5500 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
5502         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
5503         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
5504         type CPU, so it can never be greater than CPU_Range'Last.
5506 2014-07-30  Bob Duff  <duff@adacore.com>
5508         * s-taskin.ads: Minor comment fix.
5510 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5512         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
5513         clauses.
5515 2014-07-30  Yannick Moy  <moy@adacore.com>
5517         * debug.adb: Free debug flag dQ used for frontend inlining in
5518         GNATprove mode..
5519         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
5520         debug flag..
5522 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5524         * Make-generated.in: Remove generation of s-oscons.ads, only
5525         generate the xoscons utility, in runtime-agnostic rules.
5526         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
5527         no longer supported.
5529 2014-07-30  Bob Duff  <duff@adacore.com>
5531         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
5532         parameter Chain to be used in the allocator case.
5533         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
5534         has tasks, wrap the code in a block that will activate them,
5535         including the usual finalization code to kill them off in case
5536         of exception or abort.
5538 2014-07-30  Robert Dewar  <dewar@adacore.com>
5540         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
5541         Remove renamings (don't work for gdb).
5542         (par): New synonym for p (avoid gdb ambiguities).
5543         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
5545 2014-07-30  Bob Duff  <duff@adacore.com>
5547         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
5548         fixes.
5549         * treepr.ads, treepr.adb (ppp): Make this debugging routine
5550         accept any type covered by Union_Id.
5552 2014-07-30  Robert Dewar  <dewar@adacore.com>
5554         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
5555         analyzing branches.
5556         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
5557         expression case.
5559 2014-07-30  Robert Dewar  <dewar@adacore.com>
5561         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
5562         of predicate aspect on entity other than a type.
5564 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5566         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
5567         when a subprogram body without a previous spec cannot be inlined
5568         in GNATprove mode, because it includes aspects or pragmas that
5569         generate a SPARK contract clause.
5570         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
5571         instance cannot be inlined.
5573 2014-07-30  Robert Dewar  <dewar@adacore.com>
5575         * debug.adb: Document that d7 suppresses compilation time output.
5576         * errout.adb (Write_Header): Include compilation time in
5577         header output.
5578         * exp_intr.adb (Expand_Intrinsic_Call): Add
5579         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
5580         Compilation_Date/Compilation_Time.
5581         * g-souinf.ads (Compilation_Date): New function
5582         (Compilation_Time): New function.
5583         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
5584         * gnat_rm.texi (Compilation_Date): New function
5585         (Compilation_Time): New function.
5586         * opt.ads (Compilation_Time): New variable.
5587         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
5588         * sem_intr.adb (Compilation_Date): New function.
5589         (Compilation_Time): New function.
5590         * snames.ads-tmpl (Name_Compilation_Date): New entry.
5591         (Name_Compilation_Time): New entry.
5593 2014-07-30  Yannick Moy  <moy@adacore.com>
5595         * inline.adb: Add comment.
5597 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5599         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
5600         parameterless attribute, and a postondition can mention an
5601         indexed component or a slice whose prefix is an attribute
5602         reference F'Result.
5604 2014-07-30  Robert Dewar  <dewar@adacore.com>
5606         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
5607         Avoid bomb when printing package Standard.
5609 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5611         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
5612         entity is created at this point, ensure that the name of the
5613         flag is unique, because the subprogram may be overloaded and
5614         other homonyms may also have elaboration flags created on the fly.
5616 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5618         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
5619         (Analyze_Attribute): Major cleanup of attribute
5620         'Update. The logic is now split into two distinct routines
5621         depending on the type of the prefix. The use of <> is now illegal
5622         in attribute 'Update.
5623         (Analyze_Record_Component_Update): New routine.
5624         (Check_Component_Reference): Removed.
5625         (Resolve_Attribute): Remove the return statement and ??? comment
5626         following the processing for attribute 'Update. As a result,
5627         the attribute now freezes its prefix.
5629 2014-07-30  Javier Miranda  <miranda@adacore.com>
5631         * exp_ch4.adb (Apply_Accessibility_Check): Do
5632         not call Base_Address() in VM targets.
5634 2014-07-30  Yannick Moy  <moy@adacore.com>
5636         * gnat1drv.adb (Adjust_Global_Switches): Set
5637         Ineffective_Inline_Warnings to True in GNATprove mode.
5638         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
5639         mode of inlining.
5640         * opt.ads (Ineffective_Inline_Warnings): Add comment that
5641         describes use in GNATprove mode.
5642         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
5643         pragma when applied to the special body created for inlining.
5645 2014-07-30  Robert Dewar  <dewar@adacore.com>
5647         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
5648         Minor reformatting.
5650 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5652         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
5653         not delayed. Update the delay status of most SPARK 2014 aspects.
5654         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
5655         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
5656         to Decorate and Insert_Pragma. Add various comments concerning
5657         the delay status of several SPARK 2014 aspects. The insertion
5658         of Refined_State now uses routine Insert_After_SPARK_Mode.
5659         (Decorate): New routine.
5660         (Decorate_Aspect_And_Pragma): Removed.
5661         (Insert_Delayed_Pragma): Removed.
5662         (Insert_Pragma): New routine.
5664 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5666         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
5667         only a warning, not an error on an attempt to inline a recursive
5668         subprogram.
5670 2014-07-30  Robert Dewar  <dewar@adacore.com>
5672         * g-forstr.adb: Minor code reorganization (use J rather than I
5673         as a variable name).
5674         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
5675         g-forstr.ads: Minor reformatting.
5677 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5679         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
5680         we are debugging the generated code.
5682 2014-07-30  Yannick Moy  <moy@adacore.com>
5684         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
5685         returns True for source pointer for an inlined body.
5687 2014-07-30  Javier Miranda  <miranda@adacore.com>
5689         * exp_ch4.adb (Apply_Accessibility_Check): Add
5690         missing calls to Base_Address().
5692 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5694         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
5695         mode, subprogram bodies without a previous declaration are also
5696         candidates for front-end inlining.
5698 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5700         * aspects.ads Aspects Async_Readers, Async_Writers,
5701         Effective_Reads and Effective_Writes do not need to be delayed.
5702         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
5703         optional Boolean expression when generating the corresponding
5704         pragma for an external property aspect.
5705         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
5706         local constant Obj. Add local constant Obj_Id. Reimplement the
5707         check which ensures that the related variable is in fact volatile.
5708         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
5709         * sem_util.adb (Is_Enabled): New routine.
5710         (Variable_Has_Enabled_Property): Reimplement the detection of
5711         an enabled external property.
5713 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
5715         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
5716         for body stubs.
5718 2014-07-30  Pascal Obry  <obry@adacore.com>
5720         * g-forstr.adb, g-forstr.ads: New.
5721         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
5722         GNAT.Formatted_String.
5724 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5726         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
5727         (Expand_Array_Aggregate): Also enable in-place expansion for
5728         code generated by the compiler.  For an object declaration,
5729         set the kind of the object in addition to its type.  If an
5730         in-place assignment is to be generated and it can be directly
5731         done by the back-end, do not expand the aggregate.
5732         * fe.h (Is_Others_Aggregate): Declare.
5733         * gcc-interface/trans.c
5734         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
5735         aggregate with a single Others choice on the RHS by means of
5736         __builtin_memset.  Tidy up.
5738 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5740         * gnat_rm.texi: minor reformatting.
5742 2014-07-30  Yannick Moy  <moy@adacore.com>
5744         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
5745         in SPARK_Mode Off.
5747 2014-07-30  Robert Dewar  <dewar@adacore.com>
5749         * gnat_rm.texi: Document additional implementation-defined use
5750         of Constrained.
5752 2014-07-30  Robert Dewar  <dewar@adacore.com>
5754         * prj-proc.adb, prj-strt.adb: Update comments.
5756 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5758         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
5760 2014-07-30  Vincent Celier  <celier@adacore.com>
5762         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
5763         parameter No_Extending, defaulted to False. When No_Extending
5764         is True, do not look for an extending project.
5765         (Expression): For a variable reference that is not for the current
5766         project, get its Id calling Imported_Or_Extended_Project_From
5767         with No_Extending set to True.
5768         * prj-strt.adb (Parse_Variable_Reference): If a referenced
5769         variable is not found in the current project, check if it is
5770         defined in one of the projects it extends.
5772 2014-07-30  Robert Dewar  <dewar@adacore.com>
5774         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
5775         some additional cases of internally generated routines.
5777 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5779         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
5780         if the compilation unit is a subunit, extend optional processing
5781         to all subunits of the current one. This allows gnatstub to
5782         supress generation of spurious bodies.
5784 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5786         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
5787         track of the initial element's index within the tree.
5789 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5791         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
5792         (Insert_Child): Add local variable First. Capture the index of the
5793         first node being created to ensure correct cursor construction
5794         later on. Use the three parameter version of Allocate_Node
5795         when creating multiple children as this method allows aspect
5796         Default_Value to take effect (if applicable).
5798 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
5800         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
5801         (Expand_Array_Aggregate): For a safe slice assignment, just set
5802         the target and use the common code path.
5804 2014-07-29  Robert Dewar  <dewar@adacore.com>
5806         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
5807         predicate No_Predicate_Test_On_Arguments, new name is
5808         Predicate_Tests_On_Arguments (with the opposite sense).
5810 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5812         * sem_attr.adb (Resolve_Attribute): Clean up the code for
5813         attribute 'Access. Do not generate an elaboration flag for a
5814         stand alone expression function. The expression of an expression
5815         function is now frozen when the expression function appears as
5816         the prefix of attribute 'Access.
5817         * sem_ch6.adb (Analyze_Expression_Function): Remove local
5818         variable New_Decl and update all references to it after the
5819         rewriting has taken place. Establish the linkages between the
5820         generated spec and body.
5822 2014-07-29  Robert Dewar  <dewar@adacore.com>
5824         * sem_prag.adb (ip, rv): Prevent from being optimized away.
5825         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
5826         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
5827         reformatting.
5829 2014-07-29  Vincent Celier  <celier@adacore.com>
5831         * prj-pp.adb: Minor comment update.
5832         * frontend.adb: If a target dependency info file has been read
5833         through switch -gnateT= add it to the dependencies of the source
5834         being compiled.
5836 2014-07-29  Robert Dewar  <dewar@adacore.com>
5838         * sem_ch3.adb, prj.adb: Minor reformatting.
5840 2014-07-29  Vincent Celier  <celier@adacore.com>
5842         * prj-pp.adb (Pretty_Print.Output_Project_File): New
5843         procedure to output project file names between quotes without
5844         concatenation, even if the line is too long.
5845         (Pretty_Print): Use Output_Project_File for project being extended and
5846         project imported.
5848 2014-07-29  Vincent Celier  <celier@adacore.com>
5850         * gnat_ugn.texi: Document that configuration pragmas files are
5851         added to the dependencies, unless they contain only pragmas
5852         Source_File_Name_Project.
5854 2014-07-29  Robert Dewar  <dewar@adacore.com>
5856         * frontend.adb: Minor reformatting.
5858 2014-07-29  Robert Dewar  <dewar@adacore.com>
5860         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
5861         (Expand_Actuals): Make sure predicate checks are properly applied
5862         for the case of OUT or IN OUT parameters.
5863         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
5864         predicate tests on arguments for Finalize
5865         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
5866         if predicate tests on subprogram arguments should be skipped.
5867         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
5869 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5871         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
5872         clause for the object and the expression is an aggregate, defer
5873         resolution and expansion of the aggregate until the freeze point
5874         of the entity.
5875         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
5876         the parent node is an N_Reference generated during expansion.
5878 2014-07-29  Vincent Celier  <celier@adacore.com>
5880         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
5882 2014-07-29  Robert Dewar  <dewar@adacore.com>
5884         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
5885         prepcomp.ads: Minor reformatting and code clean up.
5886         * exp_ch6.adb (Expand_Actuals): Generate predicate test
5887         unconditionally for case of OUT or IN OUT actual (before this
5888         was generated only for certain subcases, which is wrong, the
5889         test is always needed).
5891 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5893         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
5894         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
5895         until context type is available.
5896         * sem_res.adb (Resolve_Allocator): In the case of a qualified
5897         expression, complete resolution of expression.
5898         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
5899         to apply Ada2012 checks on aliased formals, as well as
5900         accesibility checks when the context of the call is an allocator
5901         or a qualified expression.
5902         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
5903         Moved here from sem_ch3.
5904         (Object_Access_Level): Handle properly aliased formals and
5905         aggregates.
5906         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
5907         now properly performed in sem_res (Resolve_Actuals,
5908         Check_Aliased_Parameter).
5910 2014-07-29  Yannick Moy  <moy@adacore.com>
5912         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
5913         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
5914         function to decide when a subprogram can be inlined in GNATprove mode.
5915         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
5916         condition for possible inlining.
5917         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
5918         for Inline_Always in GNATprove mode.
5919         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
5920         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
5921         * sem_prag.adb Minor change in comments.
5922         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
5923         inside subprograms marked as SPARK_Mode On.
5924         * sinfo.ads: Minor typo fix.
5926 2014-07-29  Vincent Celier  <celier@adacore.com>
5928         * frontend.adb: Add dependency on gnat.adc when taken into account
5929         and on non-temporary configuration pragmas files specified in
5930         switches -gnatec.
5931         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
5932         dependencies on configuration pragmas files.
5934 2014-07-29  Pat Rogers  <rogers@adacore.com>
5936         * gnat_ugn.texi: Minor clarification to the explanation for the
5937         GNATtest -v switch.
5939 2014-07-29  Robert Dewar  <dewar@adacore.com>
5941         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
5942         documentation that explains the need for this extended range
5943         (use by C_Pass_By_Copy).
5945 2014-07-29  Robert Dewar  <dewar@adacore.com>
5947         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
5949 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
5951         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
5952         complexity metrics.
5954 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5956         PR ada/60652
5957         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
5958         CRTSCTS to be visible.
5960 2014-07-29  Bob Duff  <duff@adacore.com>
5962         * g-trasym.adb, g-trasym.ads: Code cleanup.
5964 2014-07-29  Doug Rupp  <rupp@adacore.com>
5966         * sigtramp-vxworks.c: Minor reformatting.
5968 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5970         * gnat_rm.texi: No doc needed for Ada2012 aspect
5971         Implicit_dereference.
5973 2014-07-29  Robert Dewar  <dewar@adacore.com>
5975         * sem_attr.adb (Attribute_12): New array
5976         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
5977         (Check_Ada_2012_Attribute): Removed.
5979 2014-07-29  Doug Rupp  <rupp@adacore.com>
5981         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
5982         PPC, and e500.
5983         * sigtramp-vxworks.c: New file.
5984         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
5986 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5988         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
5989         derived array type, add information about component type, which
5990         was previously missing in ali file.
5991         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
5993 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5995         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
5996         of the subtype created for a record component, do not mark
5997         the subtype as frozen. For one thing, this is anomalous (in
5998         particular, the base type might not itself be frozen yet);
5999         furthermore, proper freezing of the subtype must happen in any
6000         case. So, we just mark the subtype as requiring delayed freezing
6001         (and we'll actually freeze it when generating the init_proc of
6002         the enclosing record).
6003         Also change the name of the constrained record subtype (append a
6004         'C' so that it is clearly different from the unconstrained record
6005         type, "related_idV") to make debugging easier.
6006         (Process_Full_View): When creating a full subtype for a pending
6007         private subtype, re-establish the scope of the private subtype
6008         so that we get proper visibility on outer discriminants.
6009         * exp_ch3.adb (Build_Init_Statements): Freeze any component
6010         subtype that is not frozen yet.
6012 2014-07-29  Vincent Celier  <celier@adacore.com>
6014         * prj-proc.adb (Recursive_Process): Always initialize the
6015         environment when the project is an aggregate project, even when
6016         it is not the root tree.
6017 2014-07-29  Robert Dewar  <dewar@adacore.com>
6019         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
6020         * gnat_rm.texi: Complete list of implementation aspects.
6021         * aspects.ads: Minor comment clarification.
6023 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6025         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
6026         is a null-excluding access type, do not generate a constraint
6027         check if Suppress_Assignment_Checks is set on assignment node.
6028         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
6029         parameter of a null-excluding access type, there is access check
6030         on entry, so set Suppress_Assignment_Checks on generated statement
6031         that assigns actual to parameter block.
6032         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
6034 2014-07-29  Robert Dewar  <dewar@adacore.com>
6036         * gnat_rm.texi: Change theta to @ in documentation of aspect
6037         Dimension_System.
6039 2014-07-29  Robert Dewar  <dewar@adacore.com>
6041         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
6042         are now on pragma.
6043         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
6044         of Uneval_Old_*
6045         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
6046         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
6048 2014-07-29  Javier Miranda  <miranda@adacore.com>
6050         * types.ads Update documentation on how to add new reason codes
6051         for exceptions.
6052         (RT_Exception_Code): Keep values ordered by their
6053         reason code.  Required by the .NET backend.
6054         (RT_CE_Exceptions): Subtype declaration removed.
6055         (RT_PE_Exceptions): Subtype declaration removed.
6056         (RT_SE_Exceptions): Subtype declaration removed.
6057         (Kind): New mapping table of RT_Exception_Codes.
6058         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
6059         new mapping table.
6060         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
6061         mapping table.  (Make_Raise_Program_Error): Updated to use the
6062         new mapping table.
6063         (Make_Raise_Storage_Error): Updated to use the new mapping table.
6064         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
6065         their reason code.
6067 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6069         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
6070         distributed stubs generation.
6071         * exp_ch3.adb: Minor reformatting.
6073 2014-07-29  Yannick Moy  <moy@adacore.com>
6075         * sinfo.ads: Document constraint between frontend and GNATprove.
6077 2014-07-29  Robert Dewar  <dewar@adacore.com>
6079         * a-except.adb: Minor comment clarification.
6081 2014-07-29  Robert Dewar  <dewar@adacore.com>
6083         * gnat_rm.texi: Complete list of implementation attributes.
6084         * snames.ads-tmpl: Clean up list of impl-defined attributes.
6086 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6088         * freeze.adb (Freeze_Record_Type): Perform various
6089         volatility-related checks.
6091 2014-07-29  Robert Dewar  <dewar@adacore.com>
6093         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
6095 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6097         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
6098         the case where the attribute reference appears in a nested scope
6099         from that of the subprogram prefix.
6100         * sem_attr.adb: Minor reformatting.
6102 2014-07-29  Robert Dewar  <dewar@adacore.com>
6104         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
6105         initialization options.
6107 2014-07-29  Robert Dewar  <dewar@adacore.com>
6109         * sinfo.ads: Minor comment addition.
6111 2014-07-29  Bob Duff  <duff@adacore.com>
6113         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
6115 2014-07-29  Doug Rupp  <rupp@adacore.com>
6117         * init.c: Complete previous change.
6119 2014-07-29  Robert Dewar  <dewar@adacore.com>
6121         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
6122         array case.
6124 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6126         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
6127         and the completion will appear in the same declarative part,
6128         create elaboration flag.
6129         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
6130         is a completion of a declaration in the same declarative part,
6131         and the subprogram has had its address taken, add elaboration
6132         check inside the subprogram body, to detect elaboration errors
6133         that may occur through indirect calls.
6135 2014-07-29  Doug Rupp  <rupp@adacore.com>
6137         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
6138         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
6140 2014-07-29  Vincent Celier  <celier@adacore.com>
6142         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
6143         runtime directorie specified with two switches --RTS= designate
6144         the same directory, even when there are no literarily the same.
6146 2014-07-29  Robert Dewar  <dewar@adacore.com>
6148         * gnat_ugn.texi: Minor documentation clarification.
6149         * switch-c.adb: Minor reformatting.
6151 2014-07-29  Robert Dewar  <dewar@adacore.com>
6153         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6154         Fix incorrect RTE call which caused bomb if pragma was in
6155         configuration pragma file.
6157 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
6159         * expect.c (__gnat_expect_poll): Fix typo in previous change.
6160         * g-expect.adb: Update comments.
6162 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6164         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
6165         (Default_Attribute_Count): Bump to 16 on native platforms.
6167 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6169         * sem_res.adb: Add guard to front-end inlining for SPARK.
6171 2014-07-29  Robert Dewar  <dewar@adacore.com>
6173         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
6174         Minor reformatting.
6176 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6178         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
6179         inline in GNATprove mode when subprogran is marked Inline_Always.
6180         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
6181         mode if body to inline is available.
6182         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
6183         effective in GNATprove mode.
6184         * sem_ch10.adb (Analyze_Compilation_Unit): Call
6185         Check_Package_Body_For_Inlining in GNATprove mode, so that body
6186         containing subprograms with Inline_Always can be available before
6187         calls to them.
6189 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6191         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
6192         to Check_Package_Body_For_Inlining, to prevent confusion with other
6193         inlining subprograms.
6195 2014-07-29  Robert Dewar  <dewar@adacore.com>
6197         * opt.ads: Minor comment update.
6198         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
6199         we want setting of Uneval_Old at time of encountering the aspect.
6200         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
6201         of Opt.Uneval_Old.
6202         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
6203         New function (Set_Uneval_Old_Accept): New procedure.
6204         (Set_Uneval_Old_Warn): New procedure.
6205         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
6207 2014-07-29  Robert Dewar  <dewar@adacore.com>
6209         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
6210         * snames.ads-tmpl: Minor reformatting.
6211         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
6212         to give <Error>.  Not clear why this was there, but the compiler
6213         sources do not reference Name_Error, and this interfered with
6214         the circuits for pragma Unevaluated_Use_Of_Old.
6216 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6218         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
6219         types in SPARK 2014 (again).
6220         * sem_res.adb (Is_OK_Volatile_Context): New routine.
6221         (Resolve_Entity_Name): Ensure that a volatile object with
6222         enabled properties Async_Writers or Effectire_Reads appears in
6223         a non-interfering context.
6225 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6227         * sem_ch6.adb: Move Build_Body_To_Inline,
6228         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
6229         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
6230         * inline.ads, inline.adb: Package now contains subprograms that
6231         implement front-end inlining.  No functional changes, no test
6232         needed.
6234 2014-07-29  Robert Dewar  <dewar@adacore.com>
6236         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
6238 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6240         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
6241         is a limited view when the context is a package body, because
6242         there is no subsequent place at which the non-limited view may
6243         become visible.
6244         (Process_Formals): Ditto.
6245         * sinfo.ads, par-ch3.adb: Minor reformatting.
6247 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
6249         * expect.c (__gnat_expect_poll): New parameter dead_process
6250         used to return the dead process among the array of file
6251         descriptors. The Windows, VMS and HPUX implementations now
6252         properly report the dead process via this parameter. Other unixes
6253         don't need it.
6254         * g-expect.adb (Poll): Adapt to the C profile.
6255         (Expect_Internal): Use the new parameter to properly close the
6256         File Descriptor.  This then can be properly reported by the
6257         function First_Dead_Process as is expected.
6259 2014-07-29  Robert Dewar  <dewar@adacore.com>
6261         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
6263 2014-07-29  Robert Dewar  <dewar@adacore.com>
6265         * einfo.adb (Derived_Type_Link): New function
6266         (Set_Derived_Type_Link): New procedure.
6267         (Write_Field31_Name): Output Derived_Type_Link.
6268         * einfo.ads: New field Derived_Type_Link.
6269         * exp_ch6.adb (Expand_Call): Warn if change of representation
6270         needed on call.
6271         * sem_ch13.adb: Minor addition of ??? comment.
6272         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
6273         expensive implicit conversion.
6274         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
6276 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6278         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
6279         to DF_Id. Add new local variable DF_Call. Do not perform any
6280         elaboration-related checks on the call to the partial finalization
6281         routine within an init proc to avoid generating bogus elaboration
6282         warnings on expansion-related code.
6283         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
6284         the top level of the routine.  Ensure that Output_Calls takes
6285         into account flags -gnatel and -gnatwl when emitting warnings
6286         or info messages.
6287         (Check_Internal_Call_Continue): Update the call to Output_Calls.
6288         (Elab_Warning): Moved to the top level of routine Check_A_Call.
6289         (Emit): New routines.
6290         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
6291         comment on usage. Output all warnings or info messages only when the
6292         caller context demands it and the proper elaboration flag is set.
6294 2014-07-29  Yannick Moy  <moy@adacore.com>
6296         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
6297         Check rule about Old appearing in potentially unevaluated
6298         expression everywhere, not only in Post.
6300 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6302         * sem_prag.adb: Update comment.
6303         * a-except.adb, a-except-2005.adb: Minor editing.
6305 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
6307         * exp_dbug.adb (Debug_Renaming_Declaration):
6308         Do not create renaming entities for renamings of non-packed
6309         objects and for exceptions.
6311 2014-07-29  Robert Dewar  <dewar@adacore.com>
6313         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
6314         sem_ch6.adb, par-ch3.adb: Minor reformatting.
6316 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6318         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
6319         subtype indication in an extended return statement when the
6320         return value is an ancestor of the return type of the function,
6321         and that return type is a null record extension.
6323 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6325         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
6326         message produced for the case of a type-related representation
6327         item that is made illegal by 13.10(1).
6328         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
6329         documentation.
6331 2014-07-29  Robert Dewar  <dewar@adacore.com>
6333         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
6334         * erroutc.adb (Output_Error_Msgs): Take wide characters into
6335         account in computing position of error flags.
6336         * sinput.adb (Get_Column_Number): Take wide characters into
6337         account.
6339 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6341         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
6342         in an access type definition can carry a null_exclusion indicator.
6343         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
6344         carries a null_exclusion indicator, verify that the subtype
6345         indication denotes an access type, and create a null-excluding
6346         subtype for it.
6347         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
6348         defined on N_Access_To_Object_Definition to indicate that the
6349         subtype indication carries a null_exclusion indicator.
6351 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6353         * exp_ch6.adb (Add_Extra_Actual): Do not construct
6354         the extra actual by name, generate a reference instead.
6356 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6358         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
6359         Allow_Integer_Address if already set.
6360         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
6361         Fix order, for consistency with Rmsg_xx declarations.
6363 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6365         * sem_ch4.adb (Complete_Object_Operation): If the type of the
6366         candidate subprogram is a limited view, use non-limited view
6367         when available.
6369 2014-07-29  Robert Dewar  <dewar@adacore.com>
6371         * sem_ch13.adb: Minor change in RM reference.
6372         * sem_mech.ads: Minor reformatting.
6373         * einfo.ads: Minor comment fix.
6374         * types.ads: Minor correction to range given for Mechanism_Type.
6375         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
6376         check predicate on way out for OUT or IN OUT parameters.
6377         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
6378         better (P_Range_Constraint): Corresponding fix.
6379         * checks.ads: Minor comment clarification.
6381 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
6383         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
6384         and Treat_As_Volatile flags based on whether the renamed object
6385         is a volatile object.
6387 2014-07-29  Olivier Hainque  <hainque@adacore.com>
6389         * g-debpoo.adb
6390         (Default_Alignment): Rename as Storage_Alignment. This is not
6391         a "default" that can be overriden. Augment comment to clarify
6392         intent and document why we need to manage alignment padding.
6393         (Header_Offset): Set to Header'Object_Size instead of 'Size
6394         rounded up to Storage_Alignment. Storage_Alignment on the
6395         allocation header is not required by our internals so was
6396         overkill. 'Object_Size is enough to ensure proper alignment
6397         of the header address when substracted from a storage address
6398         aligned on Storage_Alignment.
6399         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
6400         this is always added on top of the incoming allocation requests.
6401         (Align): New function, to perform alignment rounding operations.
6402         (Allocate): Add comments on the Storage_Address computation
6403         scheme and adjust so that the alignment padding applies to that
6404         (Storage_Address) only.
6406 2014-07-29  Robert Dewar  <dewar@adacore.com>
6408         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
6409         pragma Unreferenced.
6410         * cstand.adb (Create_Standard): Use E_Array_Type for standard
6411         string types. Make sure index of Any_String/Any_Array is in a list.
6412         * errout.adb: Minor reformatting.
6414 2014-07-29  Robert Dewar  <dewar@adacore.com>
6416         * gnat_ugn.texi: Clean up and correct documentation of warnings.
6417         * usage.adb: Minor corrections to make sure warnings are properly
6418         documented.
6419         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
6420         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
6422 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6424         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
6425         created to match internal sequence numbers between compilations
6426         with/without abort must have its type properly set.
6428 2014-07-29  Robert Dewar  <dewar@adacore.com>
6430         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
6431         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
6432         SSO_Default_Specified.
6433         * ali.ads (ALIs_Record): Add field SSO_Default
6434         (SSO_Default_Specified): New global switch.
6435         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
6436         (Check_Configuration_Consistency): Call this procedure
6437         * einfo.adb (SSO_Set_High_By_Default): New
6438         function (SSO_Set_Low_By_Default): New function
6439         (Set_SSO_Set_High_By_Default): New procedure
6440         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
6441         List new flags
6442         * einfo.ads (SSO_Set_Low_By_Default): New flag
6443         (SSO_Set_High_By_Default): New flag
6444         * freeze.adb (Set_SSO_From_Default): New procedure
6445         (Freeze_Array_Type): Call Set_SSO_From_Default
6446         (Freeze_Record_Type): Call Set_SSO_From_Default
6447         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
6448         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
6449         * lib-writ.ads: Add OL/OH parameters to P line
6450         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
6451         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
6452         New global switch
6453         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
6454         set by default using pragma Default_Scalar_Storage_Order.
6455         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
6456         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
6457         Clear SSO defaults when explicit SSO is inherited.
6458         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
6459         explicit SSO is specified.
6460         (Inherit_Aspects_At_Freeze_Point):
6461         Clear SSO default when inheriting SSO.
6462         * sem_ch3.adb (Set_Default_SSO): New procedure
6463         (Analyze_Private_Extension_Declaration): Set defualt SSO
6464         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
6465         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
6466         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
6467         (Record_Type_Declaration): ditto
6468         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
6469         Save Default_SSO
6470         * sem_prag.adb (Analyze_Pragma, case
6471         Default_Scalar_Storage_Order): Set Default_SSO
6473 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6475         * sem_ch6.adb (Valid_Operator_Definition): Verify that
6476         all parameter have mode IN. This check must be done here for
6477         subprogram instantiations that have operator names, because their
6478         analysis does not follow the same path as that for subprogram
6479         declarations.
6481 2014-07-29  Robert Dewar  <dewar@adacore.com>
6483         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
6484         to make sure that the Etype of a component of the corresponding
6485         record type is present before trying to freeze it.
6486         * sem_ch5.adb: Minor reformatting.
6488 2014-07-29  Robert Dewar  <dewar@adacore.com>
6490         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
6491         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
6492         and then use it when a stream operation is used from a library generic
6493         when the restriction (No_Streams) is active.
6495 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6497         * projects.texi: Fix minor typo.
6499 2014-07-29  Yannick Moy  <moy@adacore.com>
6501         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
6503 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6505         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
6506         CodePeer mode.
6508 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6510         * exp_ch7.adb (Find_Last_Init): Add local variable
6511         Deep_Init_Found. Check the statement immediately following the
6512         declaration if [Deep_]Initialization was not found.
6514 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6516         * exp_util.adb (Is_Aliased): It appears that
6517         'reference-d and renamed objects still play some role in Boolean
6518         expression with actions and cannot be finalized immediately.
6520 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6522         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
6523         Loop names are not part of the full qualification of entity names.
6525 2014-07-29  Robert Dewar  <dewar@adacore.com>
6527         * einfo.adb (Has_Protected): Test base type.
6528         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
6529         that we always properly check No_Protected_Type_Allocators.
6531 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6533         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
6534         loop declarations as well.
6535         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
6536         to an iterator loop, because it may contain local renaming
6537         declarations that require debugging information.
6539 2014-07-29  Robert Dewar  <dewar@adacore.com>
6541         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
6543 2014-07-29  Robert Dewar  <dewar@adacore.com>
6545         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
6546         (Set_Static_Real_Or_String_Predicate): New procedure
6547         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
6548         string predicates (Is_Predicate_Static): Handle static string
6549         predicates.
6550         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
6551         New procedure (Check_Expression_Against_Static_Predicate):
6552         Deal with static string predicates, now fully implemented
6553         (Eval_Relational_Op): Allow string equality/inequality as static
6554         if not comes from source.
6556 2014-07-29  Robert Dewar  <dewar@adacore.com>
6558         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
6559         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
6560         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
6561         handling. Change name of Discrete_Predicate to
6562         Discrete_Static_Predicate, and replace testing of the presence of this
6563         field by testing the flag Has_Static_Expression.
6565 2014-07-29  Robert Dewar  <dewar@adacore.com>
6567         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
6568         * opt.adb: Handle Uneval_Old.
6569         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
6570         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
6571         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
6572         * sem_attr.adb (Uneval_Old_Msg): New procedure.
6573         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
6574         (Pop_Scope): Restore Uneval_Old.
6575         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
6576         Implemented.
6577         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
6578         Add entries for Name_Warn, Name_Allow.
6580 2014-07-29  Robert Dewar  <dewar@adacore.com>
6582         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
6583         to Is_OK_Static_Range.
6584         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
6585         static attributes (Eval_Attribute, case Size): Handle size of
6586         zero properly (Eval_Attribute, case Value_Size): Handle size of
6587         zero properly.
6588         * sem_ch13.adb: Minor reformatting.
6589         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
6590         Is_Static_Range to Is_OK_Static_Range.
6591         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
6592         wrong in several ways (Is_Static_Range): Moved here from spec
6593         (Is_Static_Subtype): Moved here from spec Change some incorrect
6594         Is_Static_Subtype calls to Is_OK_Static_Subtype.
6595         * sem_eval.ads: Add comments to section on
6596         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
6597         Add clarifying comments (Is_Static_Range): Moved to body
6598         (Is_Statically_Unevaluated): New function.
6599         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
6600         Is_Static_Range to Is_OK_Static_Range.
6601         * sinfo.ads: Additional commments for Is_Static_Expression noting
6602         that clients should almost always use Is_OK_Static_Expression
6603         instead. Many other changes throughout front end units to obey
6604         this rule.
6605         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
6606         for enumeration literal.
6607         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
6608         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
6609         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
6610         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
6611         Replace all occurrences of Is_Static_Expression by
6612         Is_OK_Static_Expression.
6614 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6616         * exp_ch4.adb (Process_Transient_Object): Remove constant
6617         In_Cond_Expr, use its initialization expression in place.
6618         * exp_ch7.adb (Process_Declarations): There is no need to check
6619         that a transient object being hooked is controlled as it would
6620         not have been hooked in the first place.
6621         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
6622         objects are not considered aliased when the related context is
6623         a Boolean expression_with_actions.
6624         (Requires_Cleanup_Actions): There is no need to check that a transient
6625         object being hooked is controlled as it would not have been hooked in
6626         the first place.
6628 2014-07-29  Robert Dewar  <dewar@adacore.com>
6630         * errout.adb: Minor reformatting.
6632 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6634         * exp_ch3.adb (Default_Initialize_Object): Add new variables
6635         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
6636         not allowed to ensure the symmetrical generation of symbols.
6637         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
6638         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
6639         temporary when aborts are not allowed to ensure symmertrical
6640         generation of symbols.
6641         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
6642         Dummy. Generate a dummy temporary when aborts are not allowed
6643         to ensure symmertrical generation of symbols.
6645 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6647         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
6648         renaming, indicate that the renamed entity itself needs debug
6649         information. This is necessary if that entity is a temporary,
6650         e.g. part of the expansion of an explicit dereference in an
6651         iterator.
6653 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6655         * errout.adb (Set_Error_Posted): When propagating flag to
6656         an enclosing named association, also propagate to the parent
6657         of that node, so that named and positional associations are
6658         treated consistently.
6660 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6662         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
6663         Do_Range_Check properly on array component expressions that
6664         have a scalar type. In GNATprove mode, only checks on scalar
6665         components must be marked by the front-end.
6667 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6669         * sem_res.adb (Resolve_Type_Conversion): If the type of the
6670         expression is a limited view, use the non-limited view when
6671         available.
6673 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6675         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
6676         case statement as coming from a conditional expression.
6677         (Expand_N_If_Expression): Mark the generated if statement as
6678         coming from a conditional expression.
6679         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
6680         objects found in case statement alternatives when the case
6681         statement is actually a case expression.
6682         (Expand_N_If_Statement):
6683         Do not process controlled objects found in an if statement when
6684         the if statement is actually an if expression.
6685         * sinfo.adb (From_Conditional_Expression): New routine.
6686         (Set_From_Conditional_Expression): New routine.
6687         * sinfo.ads Add new semantic flag From_Conditional_Expression and
6688         update related nodes.
6689         (From_Conditional_Expression): New routine along with pragma Inline.
6690         (Set_From_Conditional_Expression): New routine along with pragma Inline.
6692 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6694         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
6695         formal parameter Obj_Id and update the comment on usage. Renamed
6696         Obj_Typ to Func_Typ and update all occurrences.
6697         (Find_Last_Init): Remove formal parameter Decl and update the comment
6698         on usage.
6699         Remove local constants Obj_Id and Obj_Typ. Remove local variables
6700         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
6701         (Find_Last_Init_In_Block): Remove formal parameter
6702         Init_Typ and update the comment on usage.
6703         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
6704         on usage. Check whether the procedure call is an initialization
6705         procedure of either the object type or the initialization type.
6706         (Is_Init_Proc_Of): New routine.
6707         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
6708         routine. Add new variable Init_Typ. Add circuitry to extract the object
6709         type as well as the initialization type.
6711 2014-07-29  Robert Dewar  <dewar@adacore.com>
6713         * sem_case.adb: Minor reformatting.
6714         * sem_aux.ads: Minor reformatting.
6716 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6718         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
6719         pointer on these fields, even though they are semantic, because
6720         subsequent analysis and expansion of action nades may require
6721         exploring the tree, for example to locate a node to be wrapped
6722         when a function with controlled result is called.
6724 2014-07-29  Claire Dross  <dross@adacore.com>
6726         * sem_aux.adb (Get_Binary_Nkind): Use case on
6727         Name_Id instead of an intermediate string.
6728         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
6729         string.
6731 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
6733         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
6734         about processing sources with preprocessor directives.
6736 2014-07-24  Martin Liska  <mliska@suse.cz>
6738         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
6739         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
6740         (gnat_write_global_declarations): Likewise.
6742 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
6744         * gnat_rm.texi: Clean up for makeinfo 5.2.
6746 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
6748         * gnat_rm.texi (Machine Code Insertions): Clean up.
6750 2014-07-18  Robert Dewar  <dewar@adacore.com>
6752         * exp_ch7.adb: Minor reformatting.
6754 2014-07-18  Claire Dross  <dross@adacore.com>
6756         * sem_aux.ads (Get_Binary_Nkind): New function that returns
6757         the Node_Kind value of an entity defining a binary operator.
6758         (Get_Unary_Nkind): New function that returns the Node_Kind value
6759         of an entity defining a unary operator.
6761 2014-07-18  Pascal Obry  <obry@adacore.com>
6763         * sysdep.c: comment update.
6764         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
6765         platforms where it is known to be supported.
6767 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6769         * sem_dist.adb (Process_Remote_AST_Declaration): Need
6770         to set Fat_Type's Ekind in order to be able to use its
6771         Corresponding_Remote_Type attribute.
6773 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6775         * einfo.adb Last_Aggregate_Assignment is now Node 30.
6776         (Last_Aggregate_Assignment): Include
6777         constants in the assertion. Update the underlying node.
6778         (Set_Last_Aggregate_Assignment): Include constants in the
6779         assertion. Update the underlying node.  (Write_Field11_Name):
6780         Remove the entry for Last_Aggregate_Assignment.
6781         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
6782         * einfo.ads Update the node designation and usage of attribute
6783         Last_Aggregate_Assignment.
6784         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
6785         assignment statement used to initialize a controlled object.
6786         (Late_Expansion): Store the last assignment statement used to
6787         initialize a controlled record or an array of controlled objects.
6788         * exp_ch3.adb (Expand_N_Object_Declaration): Default
6789         initialization of objects is now performed in a separate routine.
6790         (Default_Initialize_Object): New routine.
6791         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
6792         Obj_Id. Update the comment on usage.
6793         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
6794         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
6795         (Is_Init_Call): Add formal parameter Init_Typ. Update the
6796         comment on usage.  Account for the type init proc when trying
6797         to determine whether a statement is an initialization call.
6798         (Make_Adjust_Call): Rename formal parameter For_Parent to
6799         Skip_Self. Update all occurrences of For_Parent. Account for
6800         non-tagged types. Update the call to Make_Call.
6801         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
6802         comment on usage. Update all occurrences of For_Parent.
6803         (Make_Final_Call): Rename formal parameter For_Parent to
6804         Skip_Self. Update all occurrences of For_Parent. Account
6805         for non-tagged types. Update the call to Make_Call.
6806         (Process_Object_Declaration): Most variables and constants are
6807         now local to the routine.
6808         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
6809         For_Parent to Skip_Self. Update the comment on usage.
6810         (Make_Final_Call): Rename formal parameter For_Parent to
6811         Skip_Self. Update the comment on usage.
6813 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6815         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
6816         can be a procedure that is implemented by entry, and have a
6817         formal that is a synchronized interface.  It does not have to
6818         be declared as a protected operation.
6820 2014-07-18  Robert Dewar  <dewar@adacore.com>
6822         * gnat_rm.texi: Remove mention of obsolete attributes
6823         Max[_Interrupt]_Priority, which have never been implemented
6824         (or at the very least were removed long ago if they ever were
6825         implemented.  Add documentation of Max[_Interrupt]_Priority
6826         constants in package System.
6827         * ttypes.ads: Document actual handling of package System,
6828         rather than a historical fantasy version.  Remove mention of
6829         non-existent attributes Max[_Interrupt]_Priority.
6831 2014-07-18  Pascal Obry  <obry@adacore.com>
6833         * a-witeio.adb (Put): No 16-bit character output when text
6834         translation is disabled.
6835         * i-cstrea.ads: Code clean up.
6837 2014-07-18  Robert Dewar  <dewar@adacore.com>
6839         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
6840         static attributes.
6842 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6844         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
6846 2014-07-18  Pascal Obry  <obry@adacore.com>
6848         * adaint.c: Do not include wchar.h on VxWorks.
6849         * mingw32.h: Remove obsolete definition.
6851 2014-07-18  Pascal Obry  <obry@adacore.com>
6853         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
6854         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
6855         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
6856         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
6858 2014-07-18  Pascal Obry  <obry@adacore.com>
6860         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
6861         * a-ztexio.adb: Likewise.
6862         * a-witeio.adb: Likewise.
6863         (Open): Pass file's translation mode to set_text_mode.
6864         * s-ficobl.ads (Content_Encoding): New type.
6865         (Text_Content_Encoding): New subtype.
6866         (AFCB): Rename Is_Text_File to Text_Encoding.
6867         * s-fileio.adb (Open): Handles new text_translation
6868         values. Remove Is_Text_File which is equivalent to Text_Encoding
6869         in Text_Content_Encoding.
6870         * adaint.h (__gnat_set_mode): New routine.
6871         * sysdep.c (__gnat_set_wide_text_mode): Removed.
6872         (__gnat_set_mode): New routine.
6874 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6876         * gcc-interface/decl.c, gcc-interface/trans.c,
6877         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
6878         Is_Packed_Array_Impl_Type.
6880 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6882         * sem_util.adb: Minor typo correction.
6884 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
6886         * gnat_rm.texi: Complete previous change.
6888 2014-07-18  Pascal Obry  <obry@adacore.com>
6890         * s-fileio.adb: Minor style fix.
6892 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6894         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
6895         specification of stream attributes for subtypes that are not
6896         first subtypes, to prevent malformed rep_item chains in the case
6897         of such illegal specifications for discriminated private subtypes.
6898         (Check_Overloaded_Name): Verify that the name is an entity name
6899         before other checks.
6901 2014-07-18  Pascal Obry  <obry@adacore.com>
6903         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
6905 2014-07-18  Robert Dewar  <dewar@adacore.com>
6907         * sem_prag.adb, sem_attr.adb,
6908         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
6910 2014-07-18  Pascal Obry  <obry@adacore.com>
6912         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
6913         * initialize.c (__gnat_wide_text_translation_required): Defined here.
6915 2014-07-18  Pascal Obry  <obry@adacore.com>
6917         * adaint.c (__gnat_fputwc): New routine.
6918         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
6920 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6922         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
6923         (Set_Stores_Attribute_Old_Prefix): New routine.
6924         (Stores_Attribute_Old_Prefix): New routine.
6925         (Write_Entity_Flags):
6926         Output flag Stores_Attribute_Old_Prefix.
6927         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
6928         comment on usage.
6929         (Set_Stores_Attribute_Old_Prefix): New routine
6930         along with pragma Inline.
6931         (Stores_Attribute_Old_Prefix): New
6932         routine along with pragma Inline.
6933         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
6934         constant which captures the result of attribute 'Old's prefix.
6935         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
6936         relocated expression which acted as a prefix of attribute 'Old.
6938 2014-07-18  Bob Duff  <duff@adacore.com>
6940         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
6941         null before dispatching to Deallocate_Subpool.
6942         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
6943         parameter of Default_Subpool_For_Pool to 'in out'.
6944         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
6945         a message to the raise.
6946         * sem_util.adb: Minor reformatting.
6948 2014-07-18  Robert Dewar  <dewar@adacore.com>
6950         * sem_util.adb (Check_Expression_Against_Static_Predicate):
6951         Mark expression as non-static if it fails static predicate check,
6952         and issue additional warning.
6954 2014-07-18  Pascal Obry  <obry@adacore.com>
6956         * a-witeio.adb (Put): Control translation based on
6957         wide_text_translation_required.
6958         * adaint.c (CurrentCCSEncoding): New variable.
6959         * initialize.c (__gnat_initialize): On Windows initialize
6960         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
6961         environment variable.
6962         * mingw32.h (CurrentCCSEncoding): New external.
6963         (__gnat_wide_text_translation_required): Likewise.
6964         * sysdep.c (wide_text_translation_required): New variable.
6965         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
6967 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6969         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
6970         variable Refined_States.  Add global variable Matched_Items.
6971         (Check_Dependency_Clause): Account for dependency
6972         clauses utilizing states with visible null refinements.
6973         (Is_Null_Refined_State): New routine.
6974         (Match_Items): Record each successfully matched item of pragma Depends.
6975         (Record_Item): New routine.
6977 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6979         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6980         Do_Range_Check flag on a dynamic index expression used in a
6981         component association in the argument of Update.
6983 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6985         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
6987 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6989         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
6990         of enclosing blocks, loops and the enclosing function using a
6991         parent-based traversal.
6992         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
6993         stack reclamation if the iterator loop contains a return statement
6994         that uses the stack.
6995         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
6996         patch up the scope stack as the secondary stack management now
6997         takes into account the enclosing function of the iterator loop.
6999 2014-07-18  Robert Dewar  <dewar@adacore.com>
7001         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
7003 2014-07-18  Robert Dewar  <dewar@adacore.com>
7005         * einfo.adb (Has_Static_Predicate): New function.
7006         (Set_Has_Static_Predicate): New procedure.
7007         * einfo.ads (Has_Static_Predicate): New flag.
7008         * sem_ch13.adb (Is_Predicate_Static): New function
7009         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
7010         (Add_Call): Minor change in Sloc of generated expression
7011         (Add_Predicates): Remove setting of Static_Pred, no longer used.
7012         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
7013         replace by use of the entity flag Has_Static_Predicate_Aspect.
7014         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
7015         and issue warning that predicate is not checked for now.
7016         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
7017         spec.
7018         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7019         Carry out check for any case where there is a static predicate,
7020         and output appropriate message.
7021         * sinfo.ads: Minor comment corrections.
7023 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7025         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
7026         from an untagged private type whose full view is tagged, the type
7027         is marked tagged for layout reasons, but it has no dispatch table,
7028         so Set_All_DT_Position must not be called.
7029         * exp_ch13.adb: If the freeze node is for a type internal to a
7030         record declaration, as is the case for a class-wide subtype
7031         of a parent component, the relevant scope is the scope of the
7032         enclosing record.
7034 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7036         * g-memdum.adb, g-memdum.ads: Code clean ups.
7038 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7040         * sem_prag.adb (Check_Dependency_Clause):
7041         Update the comment on usage. Reimplement the mechanism which
7042         attempts to match a single clause of Depends against one or
7043         more clauses of Refined_Depends.
7044         (Input_Match): Removed.
7045         (Inputs_Match): Removed.
7046         (Is_Self_Referential): Removed.
7047         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
7048         (Normalize_Outputs): Rename variable Split to New_Claue and update
7049         all its occurrences.
7050         (Report_Extra_Clauses): Update the comment on usage.
7051         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
7053 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7055         * i-cstrea.ads: Minor reformatting.
7057 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7059         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
7060         secondary stack-related flags to the generated block.
7061         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
7062         once the loop is relocated in a block.
7064 2014-07-18  Robert Dewar  <dewar@adacore.com>
7066         * repinfo.ads: Add documentation on handling of back annotation
7067         for dynamic case.
7069 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7071         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
7072         of full type declaration, denotes previous declaration for
7073         incomplete view of the type.
7074         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
7075         of declaration if one is present.
7076         (Replace_Type): When constructing the signature of an inherited
7077         operation, handle properly the case where the operation has a
7078         formal whose type is an incomplete view.
7079         * sem_util.adb (Collect_Primitive_Operations): Handle properly
7080         the case of an operation declared after an incomplete declaration
7081         for a type T and before the full declaration of T.
7083 2014-07-18  Pascal Obry  <obry@adacore.com>
7085         * i-cstrea.ads: Add documentation for set_wide_text_mode.
7087 2014-07-18  Robert Dewar  <dewar@adacore.com>
7089         * a-witeio.adb: Minor code reorganization.
7090         * i-cstrea.ads: Add comment.
7092 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7094         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
7095         clarifications.
7097 2014-07-18  Robert Dewar  <dewar@adacore.com>
7099         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
7101 2014-07-18  Pascal Obry  <obry@adacore.com>
7103         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
7104         * a-witeio.adb (Put): On platforms where there is translation
7105         done by the OS output the raw text.
7106         (New_Line): Use Put above to properly handle the LM wide characters.
7108 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7110         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
7111         to Absolute_Address.
7113 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
7115         * opt.ads (Suppress_Back_Annotation): Remove as unused.
7116         * fe.h (Back_Annotate_Rep_Info): Likewise.
7117         (Global_Discard_Names): Likewise.
7119 2014-07-18  Robert Dewar  <dewar@adacore.com>
7121         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
7122         parenthesized.
7124 2014-07-18  Vincent Celier  <celier@adacore.com>
7126         * s-osinte-vms.ads: Fix style errors.
7128 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7130         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
7131         NAME_MAX and PATH_MAX.
7133 2014-07-18  Bob Duff  <duff@adacore.com>
7135         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
7136         Build_Record_Or_Elementary_Output_Procedure): For Input and
7137         Output attributes, do not read/write the discriminants if they
7138         have default values; that will be done by Read/Write.
7140 2014-07-18  Robert Dewar  <dewar@adacore.com>
7142         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
7143         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
7144         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
7145         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
7146         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
7148 2014-07-18  Robert Dewar  <dewar@adacore.com>
7150         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
7152 2014-07-18  Vincent Celier  <celier@adacore.com>
7154         * lib-writ.ads: Update documentation about the D lines.
7156 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7158         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
7159         as a parameter, rather than its Chars field, in order to locate
7160         freeze node of type. If the predicate or invariant has references
7161         to types other than the one to which the contract applies, these
7162         types must be frozen, and the corresponding predicate functions
7163         created, before that freeze node.
7165 2014-07-18  Robert Dewar  <dewar@adacore.com>
7167         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
7168         * par_sco.adb: Minor reformatting.
7170 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7172         * exp_ch4.adb (Real_Range_Check): Turn off
7173         the Do_Range_Check flag on the conversion's current Expression
7174         argument rather than on the originally captured Operand node,
7175         as Expression may reflect a rewriting (as in conversions to a
7176         fixed-point type).
7178 2014-07-18  Vincent Celier  <celier@adacore.com>
7180         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
7181         is not a subunit.
7182         * ali.ads (Sdep_Record): New component Unit_Name.
7183         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
7184         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
7185         dependent unit is in a project and the source file name is not
7186         one of its sources.
7188 2014-07-18  Bob Duff  <duff@adacore.com>
7190         * s-addima.ads: Minor: add comment.
7192 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7194         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
7195         of nesting rules for composites with different SSOs.
7197 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7199         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
7200         a proper logical operator.
7201         (Has_Decision): An If_Expression indicates the presence of a decision
7202         although it is not a logical operator.
7204 2014-07-18  Robert Dewar  <dewar@adacore.com>
7206         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
7207         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
7209 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
7211         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
7212         on the null statement.
7214 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7216         * adaint.c: Minor comment rewording.
7217         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
7218         use of errno in this file is thread safe.
7220 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7222         * gnat_ugn.texi: Doc clarification.
7223         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
7224         * sem_ch13.ads: Minor comment update.
7226 2014-07-18  Robert Dewar  <dewar@adacore.com>
7228         * repinfo.ads: Minor comment fix.
7230 2014-07-18  Robert Dewar  <dewar@adacore.com>
7232         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
7233         * sem_prag.adb: Add dummy implementation of
7234         Default_Scalar_Storage_Order.
7235         * snames.ads-tmpl: Add dummy entry for
7236         Default_Scalar_Storage_Order pragma.
7238 2014-07-18  Robert Dewar  <dewar@adacore.com>
7240         * opt.adb (Tree_Read): Read Address_Is_Private,
7241         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
7242         (Tree_Write): Corresponding writes
7243         * opt.ads: Minor comment reformatting and fixes.
7244         * tree_io.ads: Increment ASIS_Version_Number.
7246 2014-07-18  Robert Dewar  <dewar@adacore.com>
7248         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
7249         * types.h: Fix typo.
7251 2014-07-18  Robert Dewar  <dewar@adacore.com>
7253         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
7254         functional change).
7255         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
7256         ASIS trees.
7257         * sem_ch13.adb (Kill_Rep_Clause): New procedure
7258         (Analyze_Attribute_Definition_Clause): Use
7259         Kill_Rep_Clause. This is just a cleanup, no functional effect.
7260         (Analyze_Enumeration_Representation_Clause):
7261         Use Kill_Rep_Clause. This means that enum rep
7262         clauses are now properly removed from -gnatct trees.
7263         (Analyze_Record_Representation_Clause): Same change.
7264         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
7266 2014-07-18  Pascal Obry  <obry@adacore.com>
7268         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
7269         OS_Time from time parts.
7270         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
7272 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7274         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
7275         indexing over containers that are derived types: check whether
7276         signature of found operation has the correct first parameter
7277         before retrieving directly a primitive operation.
7279 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7281         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7282         Do_Range_Check flag on dynamic bounds of a range used in a
7283         component association in the argument of Update.
7285 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7287         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
7288         accesses to errno(3) to be thread safe.
7290 2014-07-18  Vincent Celier  <celier@adacore.com>
7292         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
7293         limited imported project that is an extending project, return
7294         a project being extended if it has the expected name.
7296 2014-07-18  Pascal Obry  <obry@adacore.com>
7298         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
7299         routine to set the last modification time stamp for the given file.
7300         * gnatchop.adb (File_Time_Stamp): Removed.
7301         (Write_Unit): Use
7302         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
7304 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7306         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
7307         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
7308         Moved here, so it can be shared with the resolution of 'Update,
7309         whose argument shares some features with aggregates.
7310         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
7311         Aggregate_Constraint_Checks with the expression of each
7312         association, so that the Do_Range_Check flag is set when needed.
7314 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7316         * sem_ch4.adb (Try_Container_Indexing):  If the container
7317         type is a derived type, the value of the inherited  aspect is
7318         the Reference operation declared for the parent type. However,
7319         Reference is also a primitive operation of the new type, and
7320         the inherited operation has a different signature. We retrieve
7321         the right one from the list of primitive operations of the
7322         derived type.
7324 2014-07-18  Vincent Celier  <celier@adacore.com>
7326         * debug.adb: Update comment.
7328 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7330         * exp_util.adb (Needs_Finalization): There is no reason why a
7331         C type should not benefit from finalization actions.
7333 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7335         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
7336         (FILENAME_MAX): Remove unneeded definition.
7338 2014-07-18  Robert Dewar  <dewar@adacore.com>
7340         * exp_attr.adb, debug.adb: Update comments.
7342 2014-07-18  Vincent Celier  <celier@adacore.com>
7344         * par-ch4.adb (Simple_Expression): Add missing style check
7345         for binary adding operators.
7346         (Term): Add missing style check for multiplying operators.
7348 2014-07-18  Robert Dewar  <dewar@adacore.com>
7350         * impunit.adb: Minor comment correction.
7351         * widechar.adb, s-wchcon.ads: Minor comment corrections.
7353 2014-07-18  Robert Dewar  <dewar@adacore.com>
7355         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
7356         for Build_Static_Predicate (Build_Predicate_Functions):
7357         Don't try to build discrete predicate for real type.
7358         (Build_Predicate_Functions): Report attempt to use
7359         Static_Predicate function on real type as unimplemented.
7360         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7361         Add guard to prevent blow up on predicate for real type.
7363 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7365         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
7366         properly static predicate on enumeration types and modular types
7367         (not subtypes).
7369 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
7371         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
7372         the corresponding source file index.
7373         * get_scos.ads (Get_SCOs): Add a default value for it.
7374         * par_sco.adb (SCO_Record): Fill the corresponding value.
7375         * scos.h: New.
7377 2014-07-18  Vincent Celier  <celier@adacore.com>
7379         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
7380         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
7381         reformatting.
7382         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
7384 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7386         * g-sercom.ads (Set): document possible data loss.
7388 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7390         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
7391         Output, Read, Write): If the restriction No_Streams is active,
7392         replace each occurrence of a stream attribute by an explicit
7393         Raise statement.
7395 2014-07-18  Robert Dewar  <dewar@adacore.com>
7397         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
7398         reformatting.
7400 2014-07-18  Robert Dewar  <dewar@adacore.com>
7402         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
7403         function.
7404         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
7405         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
7406         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
7407         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
7409 2014-07-18  Robert Dewar  <dewar@adacore.com>
7411         * bcheck.adb (Check_Consistent_Restrictions):
7412         Remove obsolete code checking for violation of
7413         No_Standard_Allocators_After_Elaboration (main program)
7414         * bindgen.adb (Gen_Adainit): Handle
7415         No_Standard_Allocators_After_Elaboration
7416         (Gen_Output_File_Ada): ditto.
7417         * exp_ch4.adb (Expand_N_Allocator): Handle
7418         No_Standard_Allocators_After_Elaboration.
7419         * Makefile.rtl: Add entry for s-elaall
7420         * rtsfind.ads: Add entry for Check_Standard_Allocator.
7421         * s-elaall.ads, s-elaall.adb: New files.
7422         * sem_ch4.adb (Analyze_Allocator): Handle
7423         No_Standard_Allocators_After_Elaboration.
7425 2014-07-18  Robert Dewar  <dewar@adacore.com>
7427         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
7428         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
7429         Remove AB parameter from ali files and all uses.
7430         Remove Allocator_In_Body and all uses.
7432 2014-07-18  Robert Dewar  <dewar@adacore.com>
7434         * g-expect-vms.adb: Add comment.
7436 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7438         * par_sco.adb (Is_Logical_Operation): return True for
7439         N_If_Expression.
7441 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7443         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
7444         analysis and resolution of each choice in the associations within
7445         the argument of Update, because they may be variable names.
7447 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7449         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
7450         actions before the generated if statement.
7452 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7454         * gnat_ugn.texi Enhance the documentation of
7455         switches -gnateA and -gnateV.
7457 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7459         * sem_util.adb (Build_Default_Subtype): Add missing condition
7460         so that code matches description: use the full view of the base
7461         only if the base is private and the subtype is not.
7463 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
7465         * exp_disp.adb: Minor reformatting.
7466         * exp_disp.adb: Minor code reorganization.
7468 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7470         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
7471         require an explicit SSO attribute definition clause on a composite type
7472         just because one of its components has one.
7474 2014-07-17  Robert Dewar  <dewar@adacore.com>
7476         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
7477         attribute out of existence if the enclosing pragma is ignored.
7478         * sem_util.adb: Minor reformatting.
7480 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7482         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
7483         array aggregate expanded into assignments when it appears as a
7484         local declaration in an inlined body.
7486 2014-07-17  Doug Rupp  <rupp@adacore.com>
7488         * init.c [__ANDROID__]: Modify for ZCX.
7489         * exp_aggr.adb: Minor reformatting
7490         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
7492 2014-07-17  Robert Dewar  <dewar@adacore.com>
7494         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
7495         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
7496         scng.adb: Remove incorrect usage "allow to" and "allows to".
7498 2014-07-17  Robert Dewar  <dewar@adacore.com>
7500         * exp_dist.adb: Minor reformatting.
7502 2014-07-17  Bob Duff  <duff@adacore.com>
7504         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
7506 2014-07-17  Robert Dewar  <dewar@adacore.com>
7508         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
7509         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
7511 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7513         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
7514         non-bit-packed array, propagate Reverse_Storage_Order to the
7515         packed array type.
7517 2014-07-17  Javier Miranda  <miranda@adacore.com>
7519         * exp_disp.adb: Fix comment.
7520         * exp_pakd.adb: Minor reformatting.
7522 2014-07-17  Robert Dewar  <dewar@adacore.com>
7524         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
7525         entity if none exists (Gen_Elab_Calls): Complain if clash with
7526         No_Multiple_Elaboration.
7527         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
7528         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
7529         if not needed.
7530         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
7531         * sem_ch4.adb: Minor comment updates.
7533 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7535         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
7536         of function call for later use when shared passive objects
7537         are involved.
7539 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7541         * par-ch13.adb (Get_Aspect_Specifications):
7542         Catch a case where the argument of SPARK aspect Refined_State
7543         is not properly parenthesized.
7545 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7547         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
7548         the lifetime of a reference to an Ada 2012 container element.
7549         (Is_Element_Reference): New routine.
7551 2014-07-17  Robert Dewar  <dewar@adacore.com>
7553         * ali.ads: Minor comment fix.
7554         * lib-writ.adb: Minor reformatting.
7556 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7558         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
7559         in ASIS mode, load another subunit only if it a subunit of the
7560         current one, not a sibling that has been reached through the
7561         analysis of an ancestor. This allows the construction of the
7562         ASIS tree for the subunit even when sibling subunits have errors.
7564 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7566         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
7567         prevents the analysis of various contracts when the associated
7568         construct is erroneous.
7569         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
7570         SPARK_Pragma of an illegal or a partially decorated construct.
7572 2014-07-17  Robert Dewar  <dewar@adacore.com>
7574         * s-imguns.ads: Minor reformatting.
7576 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7578         * exp_ch7.adb (Build_Finalization_Master): Move all local
7579         variables to the proper code section. When looking for an existing
7580         finalization master, inspect the ultimate ancestor type of the
7581         full view.
7582         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
7584 2014-07-17  Robert Dewar  <dewar@adacore.com>
7586         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
7587         * gnat_rm.texi: Document Entity argument for pragma Annotate and
7588         Annotate aspect.
7589         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
7590         for Annotate aspect.
7591         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
7592         Entity argument at end.
7593         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
7595 2014-07-17  Tristan Gingold  <gingold@adacore.com>
7597         * s-imguns.ads: Fix minor typo.
7599 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7601         * sprint.adb: Minor reformatting.
7603 2014-07-17  Robert Dewar  <dewar@adacore.com>
7605         * sprint.adb (Write_Itype): Print proper header for string
7606         literal subtype.
7608 2014-07-17  Steve Baird  <baird@adacore.com>
7610         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
7612 2014-07-17  Vincent Celier  <celier@adacore.com>
7614         * gnatbind.adb: Change in message "try ... for more information".
7616 2014-07-17  Robert Dewar  <dewar@adacore.com>
7618         * sprint.adb: Code clean up.
7620 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7622         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
7623         the relevant code section. Add new local constant Obj_Id. When
7624         a limited controlled object is initialized by a function call,
7625         the build-in-place object access function call acts as the last
7626         initialization statement.
7627         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
7628         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
7629         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
7631 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7633         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
7634         propagate intrinsic flag to renamed entity, to allow e.g. renaming
7635         of Unchecked_Conversion.
7636         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
7637         if the declaration has errors.
7639 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7641         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
7642         container is busy before checking whether capacity allows for
7643         a further insertion. Insertion in a busy container that is full
7644         raises Program_Error rather than Capacity_Error. Previous to that
7645         patch which exception was raised varied among container types.
7647 2014-07-17  Robert Dewar  <dewar@adacore.com>
7649         * g-comlin.ads, g-comlin.adb: Minor clean up.
7651 2014-07-17  Bob Duff  <duff@adacore.com>
7653         * gnat_ugn.texi: Update gnatpp doc.
7655 2014-07-17  Robert Dewar  <dewar@adacore.com>
7657         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
7658         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
7659         could do this by actually expanding a real generic.
7660         * a-tags.ads: Add comments about performance.
7661         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
7662         Print Etype of defining identifier, rather than the object
7663         definition. More information.
7665 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7667         * exp_dist.adb: Minor documentation clarification.
7669 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7671         * exp_util.adb (Is_Aliased): Revert previous change.
7673 2014-07-17  Vincent Celier  <celier@adacore.com>
7675         * g-comlin.adb (Try_Help): New procedure.
7676         (Getopt): Use new procedure Try_Help.
7677         * g-comlin.ads (Try_Help): New procedure.
7679 2014-07-17  Bob Duff  <duff@adacore.com>
7681         * gnat_ugn.texi: Minor update.
7683 2014-07-17  Robert Dewar  <dewar@adacore.com>
7685         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
7686         * sinfo.ads: Document restriction on aggregates (must expand to
7687         assignments if one or more assignments needs expansion, e.g. for
7688         controlled types).
7689         * sem_ch13.adb: All warning messages regarding bit order should
7690         be info: messages.
7691         * gnat_ugn.texi: Minor correction of missing @ on @code
7693 2014-07-17  Robert Dewar  <dewar@adacore.com>
7695         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
7696         * s-rident.ads (Partition_Boolean_Restrictions): Add
7697         No_Long_Long_Integer.
7698         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
7699         Long_Integer'Size if restriction No_Long_Long_Integer is active.
7700         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
7701         as the implicit base type for a signed integer type declaration
7702         if restriction No_Long_Long_Integer is active.
7703         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
7704         No_Long_Long_Integer.
7706 2014-07-17  Robert Dewar  <dewar@adacore.com>
7708         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
7709         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
7710         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
7711         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
7712         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
7714 2014-07-17  Robert Dewar  <dewar@adacore.com>
7716         * debug.adb: Remove -gnatdQ.
7717         * exp_disp.adb: Remove -gnatdQ.
7718         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
7719         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
7720         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
7721         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
7722         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
7723         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
7725 2014-07-17  Robert Dewar  <dewar@adacore.com>
7727         * back_end.adb: Minor reformatting and comment additions.
7728         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
7729         function.
7730         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
7731         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
7732         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
7733         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
7734         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
7735         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
7737 2014-07-17  Robert Dewar  <dewar@adacore.com>
7739         * gnat_rm.texi: Minor comment updates.
7741 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7743         * sem_util.adb (Make_Explicit_Dereference): If the expression
7744         being dereferenced is a generalized indexing, reset the overloaded
7745         flag on the generalized indexing call, consistent with the
7746         resetting of the flag on the original indexed component.
7748 2014-07-17  Robert Dewar  <dewar@adacore.com>
7750         * gnat_ugn.texi: Document advise not to mix -gnatV? and
7751         optimization.
7753 2014-07-17  Robert Dewar  <dewar@adacore.com>
7755         * checks.adb (Insert_Valid_Check): Don't insist on a name
7756         for the prefix when we make calls to Force_Evaluation and
7757         Duplicate_Subexpr_No_Checks.
7758         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
7759         (Remove_Side_Effects): Handle all volatile references right
7760         (Side_Effect_Free): Volatile reference is never side effect free
7761         * sinfo.ads (N_Attribute_Reference): Add comments explaining
7762         that in the tree, the prefix can be a general expression.
7764 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7766         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7767         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
7768         * sem_ch7.adb (Analyze_Package_Body_Contract,
7769         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
7771 2014-07-17  Robert Dewar  <dewar@adacore.com>
7773         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
7774         Store_After_Actions_In_Scope.
7776 2014-07-17  Robert Dewar  <dewar@adacore.com>
7778         * sem_aux.ads: Minor comment addition.
7780 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7782         * sem_res.adb (Make_Call_Into_Operator): If the call is already
7783         a rewriting of an operator node, there are no actuals to be
7784         propagated from original node to rewritten node when in ASIS mode.
7786 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7788         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7789         Analyze_Subprogram_Contract): Add new local variable Mode. Save
7790         and restore the SPARK mode of the related construct in a
7791         stack-like fashion.
7792         * sem_ch7.adb (Analyze_Package_Body_Contract,
7793         Analyze_Package_Contract): Add new local variable Mode. Save and
7794         restore the SPARK mode of the related construct in a stack-like fashion.
7795         * sem_util.adb Remove with and use clause for Opt.
7796         (Restore_SPARK_Mode): New routine.
7797         (Save_SPARK_Mode_And_Set): New routine.
7798         * sem_util.ads Add with and use clause for Opt.
7799         (Restore_SPARK_Mode): New routine.
7800         (Save_SPARK_Mode_And_Set): New routine.
7802 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7804         * exp_util.adb (Is_Aliased): Transient objects
7805         within an expression with actions cannot be considered aliased.
7807 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7809         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
7810         introduce a new list (cleanup actions) for each (transient) scope.
7811         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
7812         N_Block_Statement
7813         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
7814         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
7815         processing for Store_xxx_Actions_In_Scope.
7816         (Build_Cleanup_Statements): Allow for a list of additional
7817         cleanup statements to be passed by the caller.
7818         (Expand_Cleanup_Actions): Take custom cleanup actions associated
7819         with an N_Block_Statement into account.
7820         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
7821         reorganization (refactoring only, no behaviour change).
7822         (Make_Transient_Block): Add assertion to ensure that the current
7823         scope is indeed a block (namely, the entity for the transient
7824         block being constructed syntactically, which has already been
7825         established as a scope).  If cleanup actions are present in the
7826         transient scope, transfer them now to the transient block.
7827         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
7828         called function while it is still present as the name in a call
7829         in the tree. This may not be the case later on if the call is
7830         rewritten into a transient block.
7831         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
7832         inserted after calling a protected operation on a shared passive
7833         protected must be performed in a block finalizer, not just
7834         inserted in the tree, so that they are executed even in case of
7835         a normal (RETURN) or abnormal (exception) transfer of control
7836         outside of the current scope.
7837         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
7838         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
7839         Scope_Stack_Entry reorganization.
7841 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7843         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
7844         call for types that do not have an explicit attribute definition
7845         clause for External_Tag, as their default tag may clash with an
7846         explicit tag defined for some other type.
7848 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7850         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
7851         controlled function call with multiple actual parameters that
7852         appears in Object.Operation form.
7854 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7856         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
7857         entity flag.
7858         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7859         External_Tag): No need to set entity flag.
7860         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
7861         Reimplement correctly in terms of Has_Rep_Item.
7863 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7865         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
7866         Start examining the tree at the node passed to
7867         Establish_Transient_Scope (not its parent).
7868         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7869         The access type for the variable storing the reference to
7870         the call must be declared and frozen prior to establishing a
7871         transient scope.
7872         * exp_ch9.adb: Minor reformatting.
7874 2014-07-17  Pascal Obry  <obry@adacore.com>
7876         * s-os_lib.ads: Minor comment update.
7878 2014-07-17  Tristan Gingold  <gingold@adacore.com>
7880         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
7881         indentation.
7882         * socket.c: Remove #warning to avoid warning.
7883         * expect.c: Indent some preprocessor directives to clarify
7884         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
7885         to remove warnings.
7886         * env.c: Fix indentation.  Port to PikeOS.
7887         * gsocket.h: Port to PikeOS.  Remove #warning.
7888         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
7889         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
7890         of stubbed __gnat_setup_parent_communication.
7891         * adaint.c: Port to PikeOS.  Reindent some preprocessor
7892         directives to clarify nested if.  Fix indentation.  Add missing
7893         ATTRIBUTE_UNUSED.
7895 2014-07-17  Robert Dewar  <dewar@adacore.com>
7897         * sem_attr.adb: Minor reformatting.
7899 2014-07-17  Robert Dewar  <dewar@adacore.com>
7901         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
7903 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7905         * sem_case.adb (Check_Choice_Set): If the case expression is the
7906         expression in a predicate, do not recheck coverage against itself,
7907         to prevent spurious errors.
7908         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
7909         expression comes from an aspect specification, to prevent spurious
7910         errors when expression is a case expression in a predicate.
7912 2014-07-17  Pascal Obry  <obry@adacore.com>
7914         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
7915         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
7917 2014-07-17  Vincent Celier  <celier@adacore.com>
7919         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
7920         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
7921         the usage for an erroneous invocation of a gnat tool.
7923 2014-07-16  Vincent Celier  <celier@adacore.com>
7925         * gnatls.adb: Get the target parameters only if -nostdinc was
7926         not specified.
7928 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7930         * checks.adb (Insert_Valid_Check): If the expression is a packed
7931         component of a modular type of the right size the data is always
7932         valid. This os particularly useful if the component is part of
7933         a volatile variable.
7935 2014-07-16  Robert Dewar  <dewar@adacore.com>
7937         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
7939 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7941         * exp_ch7.ads: Minor documentation fix.
7943 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7945         * sem_ch3.adb (Find_Type_Name): Diagnose properly
7946         a private extension completion that is an interface definition
7947         with an interface list.
7949 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
7951         * gnatls.adb (Gnatls): Code clean ups.
7953 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7955         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
7956         * sem.adb (Analyze): Handle N_Compound_Statement.
7957         * sprint.adb (Sprint_Node_Actual): Ditto.
7958         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
7959         procedure to handle N_Compound_Statement.
7960         * exp_aggr.adb (Collect_Initialization_Statements):
7961         Use a proper compound statement node, instead of a bogus
7962         expression-with-actions with a NULL statement as its expression,
7963         to wrap collected initialization statements.
7964         * freeze.ads, freeze.adb
7965         (Explode_Initialization_Compound_Statement): New public procedure,
7966         lifted from Freeze_Entity.
7967         (Freeze_Entity): When freezing
7968         an object with captured initialization statements and without
7969         delayed freezing, explode compount statement.
7970         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
7971         case that used to handle bogus EWAs with NULL statement as
7972         the expression.
7973         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
7974         delayed freezing and captured initialization statements, explode
7975         compound statement.
7977 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
7979         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
7981 2014-07-16  Doug Rupp  <rupp@adacore.com>
7983         * s-interr-hwint.adb: Casing error on parameter.
7985 2014-07-16  Pascal Obry  <obry@adacore.com>
7987         * Makefile.rtl: Add g-rewdat.o dependencies in
7988         GNATRTL_NONTASKING_OBJS.
7990 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7992         * sem_case.adb: Code clean up.
7994 2014-07-16  Vincent Celier  <celier@adacore.com>
7996         * make.adb: Do not read gnat.adc when gnatmake is invoked
7997         with -gnatA.
7999 2014-07-16  Pascal Obry  <obry@adacore.com>
8001         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
8002         implementation of GNAT.Rewrite_Data.
8004 2014-07-16  Vincent Celier  <celier@adacore.com>
8006         * gnatls.adb (Normalize): New function.
8007         (Gnatls): Get the target parameters. On targets other than VMS,
8008         normalize the path names in the source search path, the object search
8009         path and the project search path.
8011 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8013         * sem_case.adb: Avoid self-checking of case expressions in
8014         dynamic predicates.
8016 2014-07-16  Robert Dewar  <dewar@adacore.com>
8018         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
8019         discriminants.
8021 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8023         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
8025 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
8027         * gnat_ugn.texi: Fix typo.
8029 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8031         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
8032         expression if it is the specification of a subtype predicate:
8033         it will be expanded when the return statement is analyzed, or
8034         when a static predicate is transformed into a static expression
8035         for evaluation by the front-end.
8036         * sem_ch13.adb (Get_RList): If the expression for a static
8037         predicate is a case expression, extract the alternatives of the
8038         branches with a True value to create the required statically
8039         evaluable expression.
8041 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8043         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
8044         expression, not the location of the aspect, for all generated
8045         code, so that in particular the call to raise_assert_failure
8046         gets the sloc of the associated condition.
8047         * exp_ch6.adb
8048         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
8049         Set an explicit End_Label on the handled sequence of statements
8050         for the _Postconditions procedure so that the implicit return
8051         statement does not erroneously get associated with code generated
8052         for the last condition in postconditions.
8054 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8056         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
8057         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
8058         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
8059         -gnatw.Z.
8061 2014-07-16  Robert Dewar  <dewar@adacore.com>
8063         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
8064         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
8065         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
8066         not in Access_Kind.
8067         * par-ch4.adb (At_Start_Of_Attribute): New function
8068         (P_Simple_Expression): Better msg for bad attribute prefix.
8069         * scans.ads: Minor reformatting.
8071 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8073         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
8074         static constant, check that in belongs to the corresponding index
8075         subtype, to produce the proer warning when expansion is disabled.
8077 2014-07-16  Robert Dewar  <dewar@adacore.com>
8079         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
8080         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
8081         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
8082         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
8083         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
8084         -gnatw.z/-gnatw.Z
8085         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
8086         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
8087         reformatting.
8089 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8091         * exp_ch7.adb (Process_Declarations): Reinstate the check on
8092         a hook object to ensure that the related transient declaration
8093         is finalizable.
8094         * exp_util.adb (Is_Aliased): Do not consider expresison with
8095         actions as a special context.
8096         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
8097         ensure that the related transient declaration is finalizable.
8099 2014-07-16  Robert Dewar  <dewar@adacore.com>
8101         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
8102         * snames.ads-tmpl: Add Allocation_Check to list of check names.
8103         * types.ads: Add Allocation_Check to list of check names.
8105 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8107         * sem_util.adb (Enter_Name): replace bogus test for presence of
8108         Corresponding_Remote_Type with correct test on Ekind.
8109         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
8110         of calls to Corresponding_ Remote_Type (documentation fix).
8112 2014-07-16  Robert Dewar  <dewar@adacore.com>
8114         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
8115         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
8116         where it applies.
8117         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
8118         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
8120 2014-07-16  Robert Dewar  <dewar@adacore.com>
8122         * gnat_ugn.texi: Document binder switch -Ra.
8123         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
8124         (List_Closure_All).
8125         * opt.ads (List_Closure_All): New switch.
8126         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
8127         List_Closure_All.
8129 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
8131         * gnat_rm.texi: Minor edits, to make case consistent in names
8132         of types and fields.
8134 2014-07-16  Robert Dewar  <dewar@adacore.com>
8136         * gnat_rm.texi: Document erroneous mixing of thin pointers and
8137         unrestricted access
8138         * gnat_ugn.texi: Add note on size of access types about thin
8139         pointers and the use of attribute Unrestricted_Access.
8141 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8143         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
8144         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
8145         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
8146         machinery to detect tampering on bounded vectors.
8148 2014-07-16  Robert Dewar  <dewar@adacore.com>
8150         * gnat_rm.texi: Document that leading/trailing asterisks are
8151         now implied for the pattern match string for pragma Warnings
8152         and Warning_As_Error.
8153         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
8154         (Analyze_Pragma, case Warning_As_Error): Call
8155         Acquire_Warning_Match_String.
8156         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
8158 2014-07-16  Bob Duff  <duff@adacore.com>
8160         * gnat_ugn.texi: Document need for project file
8161         for --incremental switch for gnat2xml.
8163 2014-07-16  Robert Dewar  <dewar@adacore.com>
8165         * gnat_rm.texi: Fix example of non-packable components in packed
8166         records section.
8168 2014-07-16  Robert Dewar  <dewar@adacore.com>
8170         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
8171         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
8172         upper case in exception messages.
8174 2014-07-16  Robert Dewar  <dewar@adacore.com>
8176         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
8177         is renamed Has_Same_Storage.
8178         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
8179         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
8180         descriptions).
8182 2014-07-16  Robert Dewar  <dewar@adacore.com>
8184         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
8185         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
8187 2014-07-16  Robert Dewar  <dewar@adacore.com>
8189         * gnat_ugn.texi: Add note that integrated
8190         preprocessing cannot be applied to configuration pragma files.
8192 2014-07-16  Yannick Moy  <moy@adacore.com>
8194         * sem_attr.adb (Analyze_Attribute/cases Pred
8195         and Succ): Always enable range check on fixed-point types if
8196         not suppressed for the type.
8198 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8200         * sem_util.adb (State_Has_Enabled_Property):
8201         Account for an external property denoted by an others choice.
8203 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8205         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
8206         * exp_ch7.adb (Process_Declarations): There is no need to check
8207         that a transient object being hooked is controlled as it would
8208         not have been hooked in the first place.
8209         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
8210         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
8211         (Is_Aliased): A renaming of a transient controlled object is
8212         not considered aliasing when it occurs within an expression
8213         with actions.
8214         (Requires_Cleanup_Actions): There is no need to
8215         check that a transient object being hooked is controlled as it
8216         would not have been hooked in the first place.
8217         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
8219 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8221         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
8222         the outer level of routine Analyze_Aspect_Specifications. Ensure
8223         that the corresponding pragmas of aspects Initial_Condition and
8224         Initializes are inserted after pragma SPARK_Mode.
8226 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8228         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
8229         properly a choice list with more than one choice, where each
8230         is an aggregate denoting a sequence of array indices for a
8231         multidimentional array. For SPARK use.
8233 2014-07-16  Vadim Godunko  <godunko@adacore.com>
8235         * a-coinho-shared.adb (Adjust): Create
8236         copy of internal shared object and element when source container
8237         is locked.
8238         (Copy): Likewise.
8239         (Query_Element): Likewise.
8240         (Update_Element): Likewise.
8241         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
8242         to get reference for empty holder.
8243         (Reference): Likewise.
8245 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8247         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
8248         from Process_Transient_Oject.
8249         * exp_ch4.ads: Ditto.
8250         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
8251         declaration as an action on the topmost enclosing expression,
8252         not on a possibly conditional subexpreession.
8254 2014-07-16  Vadim Godunko  <godunko@adacore.com>
8256         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
8257         Fix parameter mode of Update_Element.
8259 2014-07-16  Robert Dewar  <dewar@adacore.com>
8261         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
8262         reformatting.
8264 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8266         * a-cohase.ads: Type Iterator must be controlled, so that the
8267         tampering bit is properly set through an iteration.
8268         * a-cohase.adb: Add Finalize operation for type Iterator.
8270 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8272         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
8273         tampering checks.
8275 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8277         * a-coinho-shared.adb: Fix spurious accessibility check.
8279 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
8281         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
8283 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8285         PR ada/61505
8286         * gnat_rm.texi: Fix errors with makeinfo 5.1.
8288 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
8290         PR ada/61505
8291         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
8293 2014-06-13  Yannick Moy  <moy@adacore.com>
8295         * exp_attr.adb: Fix typo in comment.
8296         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
8297         checking in GNATprove_Mode.
8299 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8301         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
8303 2014-06-13  Robert Dewar  <dewar@adacore.com>
8305         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
8306         reformatting.
8308 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8310         * sem_prag.adb (Analyze_Pragma): Add local
8311         variable Missing_Parentheses. Emit an error when a state
8312         declaration with options appears without parentheses. Add a
8313         guard to prevent a bogus error when a state declaration may be
8314         interpreted as an option if a previous declaration with options
8315         was not parenthesized.
8317 2014-06-13  Robert Dewar  <dewar@adacore.com>
8319         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
8320         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
8321         * checks.ads (Alignment_Warnings_Record): New type.
8322         (Alignment_Warnings): New table
8323         (Validate_Alignment_Check_Warnings): New procedure.
8324         * errout.adb (Delete_Warning_And_Continuations): New procedure
8325         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
8326         Warnings_Treated_As_Errors (Finalize): Minor reformatting
8327         * errout.ads (Warning_Msg): New variable
8328         (Delete_Warning_And_Continuations): New procedure
8329         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
8330         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
8332 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8334         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
8336 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8338         * errout.adb (SPARK_Msg_N): New routine.
8339         (SPARK_Msg_NE): New routine.
8340         * errout.ads Add a section on SPARK-related error routines.
8341         (SPARK_Msg_N): New routine.
8342         (SPARK_Msg_NE): New routine.
8343         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
8344         pragma Abstract_State is always inserted after SPARK_Mode.
8345         (Insert_After_SPARK_Mode): New routine.
8346         * sem_prag.adb (Analyze_Abstract_State,
8347         Analyze_Constituent, Analyze_External_Property,
8348         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
8349         Analyze_Global_List, Analyze_Initialization_Item,
8350         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
8351         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
8352         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
8353         Analyze_Refined_Global_In_Decl_Part,
8354         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
8355         Check_Aspect_Specification_Order, Check_Constituent_Usage,
8356         Check_Declaration_Order, Check_Dependency_Clause,
8357         Check_Duplicate_Mode, Check_Duplicate_Option,
8358         Check_Duplicate_Property, Check_External_Properties,
8359         Check_External_Property, Check_Function_Return,
8360         Check_Matching_Constituent, Check_Matching_State,
8361         Check_Mode_Restriction_In_Enclosing_Context,
8362         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
8363         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
8364         Has_Extra_Parentheses, Inconsistent_Mode_Error,
8365         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
8366         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
8367         Report_Unrefined_States, Report_Unused_Constituents,
8368         Report_Unused_States, Role_Error, Usage_Error):
8369         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
8370         to report semantic errors only when SPARK_Mode is on.
8371         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
8372         pragma Depends explicitly, this is now done by the analysis.
8373         (Analyze_Global_In_Decl_List): Do not check the syntax of
8374         pragma Global explicitly, this is now done by the analysis.
8375         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
8376         pragma Initializes explicitly, this is now done by the analysis.
8377         (Analyze_Part_Of): Do not check the syntax of the encapsulating
8378         state, this is now done by the analysis.
8379         (Analyze_Pragma): Do
8380         not check the syntax of a state declaration, this is now done
8381         by the analysis.
8382         (Analyze_Refined_Depends_In_Decl_Part): Do not
8383         check the syntax of pragma Refined_Depends explicitly, this is now
8384         done by the analysis.
8385         (Analyze_Refined_Global_In_Decl_Part): Do
8386         not check the syntax of pragma Refined_Global explicitly, this is
8387         now done by the analysis.
8388         (Analyze_Refined_State_In_Decl_Part):
8389         Do not check the syntax of pragma Refined_State explicitly, this
8390         is now done by the analysis.
8391         (Check_Dependence_List_Syntax): Removed.
8392         (Check_Global_List_Syntax): Removed.
8393         (Check_Initialization_List_Syntax): Removed.
8394         (Check_Item_Syntax): Removed.
8395         (Check_Missing_Part_Of): Do not consider items from an instance.
8396         (Check_Refinement_List_Syntax): Removed.
8397         (Check_State_Declaration_Syntax): Removed.
8398         (Collect_Global_List): Do not raise Program_Error when the input is
8399         malformed.
8400         (Process_Global_List): Do not raise Program_Error when the input
8401         is malformed.
8402         * sem_ch13.adb: Minor reformatting.
8404 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8406         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
8407         that is an interface definition with an interface list.
8408         (Process_Full_View): Move error message on missmatched interfaces
8409         between views to the declaration of full view, for clarity.
8410         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
8411         for clarity.
8413 2014-06-13  Robert Dewar  <dewar@adacore.com>
8415         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
8416         reason to Overflow.
8418 2014-06-13  Robert Dewar  <dewar@adacore.com>
8420         * makeutl.adb: Minor reformatting.
8422 2014-06-13  Gail Schenker  <schenker@adacore.com>
8424         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
8425         associated flag (d.z), no longer needed.
8427 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8429         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
8430         Export aspects, do not check whether a corresponding Convention
8431         aspect has been specified. Convention is optional in Ada2012,
8432         and defaults to Convention_Ada.
8434 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8436         * checks.adb (Apply_Address_Clause_Check): Only issue the new
8437         warning if the propagation warning is issued.
8439 2014-06-13  Thomas Quinot  <quinot@adacore.com>
8441         * exp_ch4.adb: Minor reformatting.
8443 2014-06-13  Robert Dewar  <dewar@adacore.com>
8445         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
8446         Handle float range check case (Expand_N_Attribute_Reference,
8447         case Succ): Handle float range check case.
8448         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
8449         range check case.
8451 2014-06-13  Vincent Celier  <celier@adacore.com>
8453         * makeutl.ads (Compute_Builder_Switches): Change name of
8454         parameter Root_Environment to Env.
8455         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
8456         Env parameter of procedure Get_Or_Create_Configuration_File.
8457         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
8458         of new parameter Env.
8459         * prj-conf.ads (Locate_Runtime): New parameter Env of type
8460         Prj.Tree.Environment.
8462 2014-06-13  Robert Dewar  <dewar@adacore.com>
8464         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
8466 2014-06-13  Robert Dewar  <dewar@adacore.com>
8468         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
8469         reformatting.
8470         * sem_attr.adb: Minor code reformatting and simplification.
8471         * checks.adb: Fix minor typo.
8473 2014-06-13  Emmanuel Briot  <briot@adacore.com>
8475         * g-comlin.adb (Get_Argument): fix expansion
8476         of command line arguments (e.g. "*.adb") when using a custom
8477         parser. The parser was not passed to the recursive call, and
8478         thus we were trying to do the expansion on the default command
8479         line parser.
8481 2014-06-13  Thomas Quinot  <quinot@adacore.com>
8483         * exp_ch9.adb: Minor reformatting.
8485 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8487         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
8488         To determine whether the attribute should be expanded, examine
8489         whether the enclosing postcondition pragma is to be checked,
8490         rather than using the internal flag Assertions_Enabled.
8492 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
8494         * gnat_rm.texi: Minor fixes.
8495         * gnat_ugn.texi: Added a missing "@itemize".
8497 2014-06-13  Robert Dewar  <dewar@adacore.com>
8499         * debug.adb: Remove -gnatd.1 flag documentation.
8500         * layout.adb (Layout_Type): Remove special handling of size
8501         for anonymous access type.
8502         * sem_ch3.adb (Replace_Type): Remove special handling of size
8503         for anonymous access type.
8505 2014-06-13  Robert Dewar  <dewar@adacore.com>
8507         * debug.adb: Document debug flag -gnatd.1.
8508         * layout.adb (Layout_Type): Size change for anonymous access
8509         types under -gnatd.1.
8510         * sem_ch3.adb (Replace_Type): Size change for anonymous access
8511         types under -gnatd.1.
8513 2014-06-13  Robert Dewar  <dewar@adacore.com>
8515         * layout.adb (Layout_Type): Anonymous access types designating
8516         unconstrained arrays are always thin pointers.
8517         * sem_ch3.adb (Replace_Type): Anonymous access types designating
8518         unconstrained arrays are always thin pointers.
8520 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8522         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
8523         to resolve the prefix of an attribute that is an entity name
8524         and may be a parameterless call.  Minor code reorganization.
8526 2014-06-13  Robert Dewar  <dewar@adacore.com>
8528         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
8529         Removed.
8530         * opt.ads (Compiler_Unit): New flag.
8531         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
8532         for null statement sequence (not allowed in compiler unit).
8533         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
8534         parsing.
8535         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
8536         calling sequence.
8537         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
8538         Check_Compiler_Unit.
8539         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
8540         Check_Compiler_Unit (this construct is not allowed in compiler
8541         units).
8542         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
8543         Set Opt.Compiler_Unit.
8545 2014-06-13  Geert Bosch  <bosch@adacore.com>
8547         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
8548         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
8549         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
8551 2014-06-13  Robert Dewar  <dewar@adacore.com>
8553         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
8555 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8557         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
8558         types in SPARK as it is poorly placed and poorly formulated. The
8559         check was flagging ALL volatile entities as illegal in SPARK.
8560         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
8561         types as illegal in SPARK.
8563 2014-06-13  Robert Dewar  <dewar@adacore.com>
8565         * sem_cat.adb: Minor reformatting.
8567 2014-06-13  Yannick Moy  <moy@adacore.com>
8569         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
8571 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
8573         * gnat_rm.texi: Add detail on SPARK_05 restriction.
8575 2014-06-13  Bob Duff  <duff@adacore.com>
8577         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
8578         Add assertions requiring the secondary stack to be initialized.
8579         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
8580         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
8581         secondary stack is initialized before calling Init_Tasking_Soft_Links,
8582         by adding pragmas Elaborate_Body.
8584 2014-06-13  Thomas Quinot  <quinot@adacore.com>
8586         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
8587         kludge disabling new legality check.
8589 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8591         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
8592         volatile types.
8593         (Freeze_Type): Volatile types are now illegal in SPARK.
8595 2014-06-13  Robert Dewar  <dewar@adacore.com>
8597         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
8598         * gnat_rm.texi: Document aspect Thread_Local_Storage.
8600 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8602         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
8603         value is a temporary that renames an aggregate is legal in a
8604         preelaborated unit. Illegalities, if any will be detected in
8605         the aggregate components.
8607 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8609         * einfo.ads: Minor reformatting an comment expansion.
8611 2014-06-13  Robert Dewar  <dewar@adacore.com>
8613         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
8614         Tbuild.
8615         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
8616         Back_End.
8617         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
8618         * sem_warn.adb: Minor reformatting.
8620 2014-06-13  Doug Rupp  <rupp@adacore.com>
8622         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
8623         files with rfm=udf.
8625 2014-06-13  Yannick Moy  <moy@adacore.com>
8627         * sem_warn.adb (Check_Unset_References): Take
8628         case of Refined_Post into account in Within_Postcondition check.
8630 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8632         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
8633         SPARK.
8635 2014-06-13  Yannick Moy  <moy@adacore.com>
8637         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
8638         Aspect_Export): Consider that variables may be set outside the program.
8640 2014-06-13  Robert Dewar  <dewar@adacore.com>
8642         * back_end.adb (Make_Id): New function.
8643         (Make_SC): New function.
8644         (Set_RND): New procedure.
8645         * back_end.ads (Make_Id): New function.
8646         (Make_SC): New function.
8647         (Set_RND): New procedure.
8648         * einfo.ads: Minor comment updates.
8649         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
8650         * gnat1drv.adb (Gnat1drv): New calling sequence for
8651         Get_Target_Parameters.
8652         (Gnat1drv): Move Atree.Initialize here from Frontend.
8653         * targparm.adb (Get_Target_Parameters): New calling
8654         sequence (Get_Target_Parameters): Handle pragma Restriction
8655         (No_Dependence,..)
8656         * targparm.ads (Get_Target_Parameters): New calling sequence.
8658 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
8660         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
8661         loop if the pragma does not come from source, so that an implicit
8662         pragma Import only applies to the first declaration, avoiding
8663         possible conflicts with earlier explicit and implicit declarations
8664         due to multiple Provide_Shift_Operators pragmas.
8665         (Set_Imported): Remove previous fix that bypassed pragma duplication
8666         error.
8667         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
8668         of Provide_Shift_Operators.
8670 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
8672         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
8673         string pointer directly to set_decl_section_name.
8675 2014-06-11  Robert Dewar  <dewar@adacore.com>
8677         * sem_ch13.adb: Minor reformatting.
8679 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8681         * sem_prag.adb (Check_Clause_Syntax): Add new
8682         local variable Outputs. Account for the case where multiple
8683         output items appear as an aggregate.
8685 2014-06-11  Robert Dewar  <dewar@adacore.com>
8687         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8688         with ?j? not ??.
8690 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8692         * einfo.ads: Minor reformatting.
8694 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8696         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8697         new variable First_Node. Update the position after all insertions have
8698         taken place to First_Node.
8700 2014-06-11  Robert Dewar  <dewar@adacore.com>
8702         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8703         * layout.adb (Layout_Type): Remove test of -gnatd.1.
8705 2014-06-11  Robert Dewar  <dewar@adacore.com>
8707         * sem_ch13.adb: Minor reformatting.
8709 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8711         * sem_prag.adb (Check_Clause_Syntax): Add new
8712         local variable Outputs. Account for the case where multiple
8713         output items appear as an aggregate.
8715 2014-06-11  Robert Dewar  <dewar@adacore.com>
8717         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8718         with ?j? not ??.
8720 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8722         * einfo.ads: Minor reformatting.
8724 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8726         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8727         new variable First_Node. Update the position after all insertions have
8728         taken place to First_Node.
8730 2014-06-11  Robert Dewar  <dewar@adacore.com>
8732         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8733         * layout.adb (Layout_Type): Remove test of -gnatd.1.
8735 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8737         * freeze.ads: Minor reformatting.
8738         * checks.adb (Determine_Range): Do not attempt to determine
8739         the range of a deferred constant whose full view has not been
8740         seen yet.
8741         * sem_res.adb (Resolve): Remove undesirable guard against
8742         resolving expressions from expression functions.
8744 2014-06-11  Robert Dewar  <dewar@adacore.com>
8746         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
8747         access types.
8748         * layout.adb (Layout_Type): Make anonymous access types for
8749         subprogram formal types and return types always thin. For now
8750         only enabled if -gnatd.1 set.
8752 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8754         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8755         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
8756         subprogram must be a null procedure.
8758 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8760         * sem_prag.adb (Analyze_Input_Item): Allow formal
8761         parameters to appear as input_items in an initialization_list
8762         of pragma Initializes. Encapsulation now applies to states and
8763         variables only (as it should). Add RM references to key errors.
8764         * sem_prag.adb (Set_Imported): Suppress errors
8765         about preceding Imports when the pragma does not come from source,
8766         which can happen through use of pragma Provide_Shift_Operators.
8768 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8770         * sem_ch3.adb: Minor reformatting.
8771         * einfo.ads (Full_View): Minor comment update.
8773 2014-06-11  Robert Dewar  <dewar@adacore.com>
8775         * einfo.adb (Is_Independent): New flag.
8776         * einfo.ads (Is_Independent): New flag.
8777         (Has_Independent_Components): Clean up and fix comments.
8778         * sem_prag.adb (Fix_Error): Deal with changing argument
8779         [of] to entity [for].
8780         (Analyze_Pragma, case Independent): Set Is_Independent flag
8781         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
8782         in all components of specified record.
8784 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8786         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
8787         Set proper Etype on bounds of dummy type created for analysis
8788         of the generic.
8790 2014-06-11  Robert Dewar  <dewar@adacore.com>
8792         * debug.adb: Minor comment fix (add missing section of dot
8793         numeric flags).
8795 2014-06-11  Robert Dewar  <dewar@adacore.com>
8797         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
8798         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
8799         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
8800         * errout.adb (Output_Messages): Avoid duplicate output for
8801         library level instance.
8802         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
8803         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
8804         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
8805         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
8806         accomodate largest modulus value.
8807         * gnat_ugn.texi: Minor updates.
8809 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8811         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
8812         load body of generic package or its parent, if body is optional
8813         and the unit does not require a body.
8815 2014-06-11  Robert Dewar  <dewar@adacore.com>
8817         * gnat_rm.texi: Document System.Unsigned_Types.
8818         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
8819         * s-unstyp.ads: Update comments (this is now user available unit).
8821 2014-06-11  Robert Dewar  <dewar@adacore.com>
8823         * make.adb, sem_res.adb: Minor reformatting.
8825 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8827         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
8828         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
8829         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
8830         Preelaborate_05 to just Preelaborate in runtime units, and similarly
8831         change Pure_05 to just Pure.
8833 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8835         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
8836         analysis if error has been posted on subprogram body.
8838 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8840         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8841         rule given in RM 13.1 (8/1) for operational attributes to stream
8842         attributes: the attribute must apply to a first subtype. Fixes
8843         missing errors in ACATS test bdd2004.
8845 2014-06-11  Robert Dewar  <dewar@adacore.com>
8847         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
8848         record type if restriction No_Implicit_Conditionals is active.
8849         (Expand_N_Object_Declaration): Don't allow default initialization
8850         for variant record type if restriction No_Implicit_Condition is active.
8851         (Build_Variant_Record_Equality): Don't build for variant
8852         record type if restriction No_Implicit_Conditionals is active.
8853         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
8854         No_Implicit_Conditionals.
8855         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
8857 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
8859         * i-cstrin.ads: Update comments.
8861 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8863         * sem_res.adb (Resolve_Selected_Component): Handle properly a
8864         selected component whose prefix is overloaded, when none of the
8865         interpretations matches the expected type.
8867 2014-06-11  Bob Duff  <duff@adacore.com>
8869         * make.adb (Wait_For_Available_Slot): Give a more
8870         informative error message; if the ALI file is not found, print
8871         the full path of what it's looking for.
8873 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
8875         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
8876         option to specify the result file encoding.
8878 2014-06-11  Robert Dewar  <dewar@adacore.com>
8880         * errout.ads, sem_ch12.adb: Minor reformatting.
8881         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
8882         * lib-xref.adb: Minor reformatting.
8883         * restrict.adb: Minor code reorganization (put routines in
8884         alpha order).
8886 2014-06-11  Yannick Moy  <moy@adacore.com>
8888         * einfo.ads: Minor typo in comment
8890 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8892         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
8893         formal private types and private type extensions, to indicate
8894         variable in a generic unit whose uninitialized use suggest that
8895         actual type should be fully initialized.
8896         Needs_Initialized_Actual:  removed, functionaity replaced by
8897         the above.
8898         * lib-xref.adb (Generate_Reference): Generate a reference for
8899         variables of a formal type when the unit is not the main unit,
8900         to enable appropriate warnings in an instance.
8901         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
8902         of variable in a generic unit that suggests that actual type
8903         should be full initialized.
8904         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
8905         and do not emot warning, which now only appears in an instance.
8907 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
8909         * gnat_ugn.texi: Fix minor typo.
8911 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8913         * sem_ch3.adb Add with and use clause for Sem_Ch10.
8914         (Analyze_Declarations): Code reformatting. Analyze the contract
8915         of a subprogram body stub at the end of the declarative region.
8916         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
8917         now a variable. Do not process the body if its contract is not
8918         available. Account for subprogram body stubs when extracting
8919         the corresponding spec.
8920         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
8921         on usage.
8922         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
8923         New routine.
8924         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
8925         Account for subprogram body stubs when extracting the
8926         corresponding spec.
8927         (Analyze_Global_In_Decl_List):
8928         Account for subprogram body stubs when extracting the
8929         corresponding spec.
8930         (Analyze_Refined_Depends_In_Decl_Part):
8931         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
8932         of the related body. Spec_Is now a variable. Account for
8933         subprogram body stubs when extracting the corresponding spec.
8934         (Analyze_Refined_Global_In_Decl_Part): Use
8935         Find_Related_Subprogram_Or_Body to retrieve the declaration
8936         of the related body. Spec_Is now a variable. Account for
8937         subprogram body stubs when extracting the corresponding spec.
8938         (Collect_Subprogram_Inputs_Output): Account for subprogram body
8939         stubs when extracting the corresponding spec.
8941 2014-06-11  Vincent Celier  <celier@adacore.com>
8943         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
8944         -lgnarl or -lgnat.
8946 2014-06-11  Robert Dewar  <dewar@adacore.com>
8948         * debug.adb: Add debug flag -gnatd.q.
8949         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
8950         -gnatd.q set.
8951         * styleg.adb (Check_Xtra_Parens): Message should be a style
8952         message.
8953         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
8954         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
8955         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
8956         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
8958 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
8960         * gnat_rm.texi: Revised chapter on Implementation Defined
8961         Characteristics.
8963 2014-06-11  Geert Bosch  <bosch@adacore.com>
8965         * s-exctab.adb: avoid race conditions in exception registration.
8967 2014-06-11  Robert Dewar  <dewar@adacore.com>
8969         * errout.adb (Warn_Insertion): New function.
8970         (Error_Msg): Use Warn_Insertion and Prescan_Message.
8971         (Error_Msg_Internal): Set Info field of error object.
8972         (Error_Msg_NEL): Use Prescan_Message.
8973         (Set_Msg_Text): Don't store info: at start of message.
8974         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
8975         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
8976         * errout.ads: Document new ?$? and >$> insertion sequences
8977         Document use of "(style)" and "info: "
8978         * erroutc.adb (dmsg): Print several missing fields
8979         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
8980         Deal with new tagging of info messages
8981         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
8982         Add field Info (Prescan_Message): New procedure, this procedure
8983         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
8984         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
8985         sem_elab.adb: Follow new rules for info message (info belongs
8986         only at the start of a message, and only in the first message,
8987         not in any of the continuations).
8988         * gnat_ugn.texi: Document full set of warning tags.
8990 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
8992         * sem_util.adb: Minor typo fix.
8994 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8996         * sem_warn.adb (Check_References): Do not emit spurious warnings
8997         on uninitialzed variable of a formal private type if variable
8998         is not read.
9000 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
9002         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
9003         set_decl_section_name accessor.
9005 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
9007         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
9008         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
9009         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9011 2014-05-21  Robert Dewar  <dewar@adacore.com>
9013         * layout.adb: Minor reformatting.
9014         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
9015         dummy procedure ip.
9017 2014-05-21  Robert Dewar  <dewar@adacore.com>
9019         * restrict.ads (Implementation_Restriction): Add entry for
9020         No_Fixed_IO.
9021         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
9022         Ada.[Wide_[Wide_]Text_IO.
9023         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
9024         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
9025         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
9026         Wide_Wide_Value if restriction No_Fixed_IO is set.
9027         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
9029 2014-05-21  Robert Dewar  <dewar@adacore.com>
9031         * gnatcmd.adb: Minor error msg changes (no upper case letter
9032         at start).
9033         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
9034         reformatting.
9036 2014-05-21  Robert Dewar  <dewar@adacore.com>
9038         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
9039         via generic formals.
9040         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
9041         -gnatd.G is set.
9043 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9045         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
9046         more accurately describe that this subprogram needs to come into
9047         play also in cases where no byte swapping is involved, because
9048         it also takes care of some required shifts (left-justification
9049         of values).
9051 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9053         * freeze.adb (Check_Component_Storage_Order): Indicate whether
9054         a Scalar_Storage_Order attribute definition is present for the
9055         component's type.
9056         (Freeze_Record_Type): Suppress junk warnings
9057         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
9058         definitions.
9060 2014-05-21  Robert Dewar  <dewar@adacore.com>
9062         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
9063         to Kill_Elaboration_Checks.
9065 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9067         * layout.adb (Assoc_Add): Suppress the optimization of the (E
9068         - C1) + C2 case, when the expression type is unsigned and C1 <
9069         C2, to avoid creating a negative literal when folding.
9071 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9073         * freeze.adb (Freeze_Record_Type): Update the use of
9074         Is_SPARK_Volatile.
9075         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
9076         Is_SPARK_Volatile.
9077         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
9078         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
9079         of Is_SPARK_Volatile.
9080         (Analyze_Loop_Parameter_Specification):
9081         Update the use of Is_SPARK_Volatile.
9082         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
9083         formal parameter when its type is volatile.
9084         * sem_prag.adb (Analyze_Global_Item): Update the use of
9085         Is_SPARK_Volatile.
9086         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
9087         determines whether an entity is a volatile source SPARK object.
9088         * sem_util.adb (Has_Enabled_Property): Accout for external
9089         properties being set on objects other than abstract states
9090         and variables. An example would be a formal parameter.
9091         (Is_SPARK_Volatile): New routine.
9092         (Is_SPARK_Volatile_Object):
9093         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
9094         when checking entities and/or types.
9095         * sem_util.ads (Is_SPARK_Volatile): New routine.
9097 2014-05-21  Robert Dewar  <dewar@adacore.com>
9099         * sem_warn.adb: Minor fix to warning messages (use ?? instead
9100         of ?).
9102 2014-05-21  Vincent Celier  <celier@adacore.com>
9104         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
9105         switch --version and --help.
9107 2014-05-21  Robert Dewar  <dewar@adacore.com>
9109         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
9111 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9113         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
9114         iterator variable when the domain of iteration is a formal
9115         container and this is an element iterator.
9117 2014-05-21  Bob Duff  <duff@adacore.com>
9119         * sem_ch12.adb: Minor reformatting.
9121 2014-05-21  Robert Dewar  <dewar@adacore.com>
9123         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
9125 2014-05-21  Robert Dewar  <dewar@adacore.com>
9127         * sem_elab.adb: Minor reformatting.
9128         * s-taprop.ads: Minor comment fix.
9129         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
9130         Kill_Elaboration_Checks.
9131         * errout.adb, erroutc.adb: Minor reformatting.
9133 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9135         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
9136         component. No byte swapping occurs, but this procedure also takes
9137         care of appropriately justifying the argument.
9139 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9141         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
9142         New routine.
9143         (Analyze_Subprogram_Body_Helper): Move the
9144         analysis of aspect specifications and the processing of the
9145         subprogram body contract after inlining has taken place.
9146         (Diagnose_Misplaced_Aspect_Specifications): Removed.
9148 2014-05-21  Javier Miranda  <miranda@adacore.com>
9150         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
9152 2014-05-21  Robert Dewar  <dewar@adacore.com>
9154         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
9155         continuations any more.
9157 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9159         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
9160         present in formal_Private_Definitions and on private extension
9161         declarations of a formal derived type. Set when the use of the
9162         formal type in a generic suggests that the actual should be a
9163         fully initialized type.
9164         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
9165         to indicate that an entity of a generic type has default
9166         initialization, and that the corresponing actual type in any
9167         subsequent instantiation should be fully initialized.
9168         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
9169         to emit a warning if the actual for a generic type on which
9170         Needs_Initialized_Actual is set is not a fully initialized type.
9172 2014-05-21  Robert Dewar  <dewar@adacore.com>
9174         * sem_elab.adb, prj-dect.adb: Minor reformatting.
9176 2014-05-21  Robert Dewar  <dewar@adacore.com>
9178         * erroutc.ads: Minor comment addition.
9180 2014-05-21  Robert Dewar  <dewar@adacore.com>
9182         * errout.ads: Add documentation for use of >*> tag.
9183         * restrict.adb: Make sure we use >*> tag for restriction warnings.
9185 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9187         * debug.adb: Add case of illegal overriding_indicator for a
9188         protected subprogram body to description of -gnatd.E switch.
9189         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
9190         for cases of giving overriding_indicators on protected subprogram
9191         bodies, but change this to a warning if -gnatd.E is enabled. No
9192         longer give a style warning about missing indicators on protected
9193         subprogram bodies.
9195 2014-05-21  Robert Dewar  <dewar@adacore.com>
9197         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
9198         sem_elab.ads: Minor reformatting.
9199         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
9200         parameter optional.
9202 2014-05-21  Pascal Obry  <obry@adacore.com>
9204         * prj-dect.adb: Allow package Install in aggregate project.
9206 2014-05-21  Robert Dewar  <dewar@adacore.com>
9208         * sem_ch13.adb (Analyze_Aspect_Specifications):
9209         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
9210         * sem_prag.adb: Minor comment improvements.
9212 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9214         * sem_ch12.adb (Install_Body): When checking whether freezing of
9215         instantiation must be delayed, verify that the common enclosing
9216         subprogram to generic and instance is in fact an overloadable
9217         entity.
9219 2014-05-21  Vincent Celier  <celier@adacore.com>
9221         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
9222         mains with the same name and fail if there is more than one.
9223         * prj.ads, prj.adb (Find_All_Sources): New function
9225 2014-05-21  Robert Dewar  <dewar@adacore.com>
9227         * sem_ch13.adb: Minor reformatting.
9228         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
9229         * sem_prag.adb: Minor error message improvement.
9231 2014-05-21  Yannick Moy  <moy@adacore.com>
9233         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
9234         (Enclosing_Subprogram_Or_Package): Only return a library-level
9235         package.
9237 2014-05-21  Javier Miranda  <miranda@adacore.com>
9239         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
9240         to the full view of the parent type when processing a derived type
9241         which is the full view of a private type not defined in a generic
9242         unit which is derived from a private type with discriminants
9243         whose full view is a non-tagged record type.
9245 2014-05-21  Javier Miranda  <miranda@adacore.com>
9247         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
9248         Complete previous patch.
9250 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9252         PR ada/9535
9253         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
9254         Provide a behaviour more consistent with underlying datagram
9255         socket: do not attempt to loop over Send_Socket/Receive_Socket
9256         iterating along the buffer.
9258 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9260         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
9261         or a tagged type is not labelled as volatile. Ensure that a
9262         non-volatile type has no volatile components.
9263         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
9264         Obj_Typ. Code reformatting.  Ensure that a discriminated or
9265         tagged object is not labelled as volatile.
9266         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
9267         pragma Volatile applies to a full type declaration or an object
9268         declaration when SPARK mode is on.
9270 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
9272         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
9273         providing options needed for compiling the argument source for
9274         the situation when a project file can be used as a tool parameter.
9276 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9278         * gnat_rm.texi: Minor typo fix.
9280 2014-05-21  Robert Dewar  <dewar@adacore.com>
9282         * stand.adb (Tree_Read): Read missing entities.
9283         (Tree_Write): Write missing entities.
9285 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
9287         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
9288         section in gnatmetric chapter.
9290 2014-05-21  Robert Dewar  <dewar@adacore.com>
9292         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
9293         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
9294         post-call copy write back (see detailed comment in code).
9295         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
9296         Exp_Ch6.
9297         * tbuild.ads: Minor reformatting.
9299 2014-05-21  Robert Dewar  <dewar@adacore.com>
9301         * stand.ads: Add warning about adding new entities and
9302         Tree_Read/Tree_Write.
9304 2014-05-21  Robert Dewar  <dewar@adacore.com>
9306         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
9307         references to restricted entities within the units in which they
9308         are declared.
9310 2014-05-21  Robert Dewar  <dewar@adacore.com>
9312         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
9313         simplify the needed test, and also deal with failure to catch
9314         situations with non-standard names.
9315         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
9316         (Source_File_Is_Subunit): Removed, no longer used.
9318 2014-05-21  Javier Miranda  <miranda@adacore.com>
9320         * exp_ch4.adb
9321         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
9322         renaming of an access to interface object there is no need to
9323         generate extra code to reference the tag.
9325 2014-05-21  Robert Dewar  <dewar@adacore.com>
9327         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
9328         Warnings (Off, string).
9330 2014-05-21  Robert Dewar  <dewar@adacore.com>
9332         * osint.adb: Fix three error messages to say invalid instead
9333         of erroneous.
9334         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
9335         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
9336         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
9338 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9340         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
9341         sem_ch9.ads: Move discriminant manipulation routines for analysis of
9342         aspect specifications from sem_ch9 to sem_ch13, where they belong.
9344 2014-05-21  Robert Dewar  <dewar@adacore.com>
9346         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
9347         Clearly document -gnatyg (GNAT style switches).
9348         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
9349         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
9350         available for VMS after all.
9351         * warnsw.adb: Reorganize to eliminate duplicated code
9352         (Restore_Warnings): Add a couple of missing entries
9353         (Save_Warnings): Add a couple of missing entries.
9354         * warnsw.ads: Add missing entries to Warning_Record (not clear
9355         what the impact is).
9357 2014-05-21  Robert Dewar  <dewar@adacore.com>
9359         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
9360         warning) case.
9361         * errout.ads: Document ?*? (restriction warning) insertion.
9362         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
9363         warning) case.
9364         * erroutc.ads: Document use of * for restriction warning tag.
9365         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
9367 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9369         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
9370         make discriminants immediately visible when analyzing an aspect
9371         of a subtype declaration.
9372         (Uninstall_Discriminants): Do not apply to the entity in a
9373         subtype declaration.
9375 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9377         * sem_util.adb: Code clean up.
9379 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
9381         * gnat_ugn.texi: Document -Werror.
9383 2014-05-21  Bob Duff  <duff@adacore.com>
9385         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
9386         This was returning False if the Object is a constant view. Fix
9387         it to return True in that case, because it might be a view of
9388         a variable.
9389         (Has_Discriminant_Dependent_Constraint): Fix latent
9390         bug; this function was crashing when passed a discriminant.
9392 2014-05-21  Robert Dewar  <dewar@adacore.com>
9394         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
9395         * s-arit64.adb: Minor code reorganization.
9396         * sem_prag.adb: Minor comment fix (remove erroneous use of the
9397         term erroneous).
9399 2014-05-21  Robert Dewar  <dewar@adacore.com>
9401         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
9402         computing new table size.
9404 2014-05-21  Robert Dewar  <dewar@adacore.com>
9406         * einfo.ads: Minor reformatting.
9407         * ceinfo.adb: Deal with slight format change of einfo.ads.
9409 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9411         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
9412         implementation of the SPARK 2014 rule concerning private child
9413         units (LRM 7.2.6).
9415 2014-05-21  Vincent Celier  <celier@adacore.com>
9417         * makeusg.adb: Add switch -d to usage.
9419 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9421         * sem_util.adb (Find_Actual): If an actual that is the prefix
9422         of an enclosing prefixed call has been rewritten, use Nkind
9423         and Sloc to identify the corresponding formal, when handling
9424         deferred references.
9426 2014-05-21  Robert Dewar  <dewar@adacore.com>
9428         * debug.adb: Document -gnatd.z switch.
9429         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
9431 2014-05-21  Robert Dewar  <dewar@adacore.com>
9433         * einfo.ads (Can_Never_Be_Null): Minor comment update.
9434         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
9435         error message change.
9436         * s-arit64.adb ("abs"): New function. Use expression functions
9437         for the simple conversions and arithmetic.
9439 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9441         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
9442         set function_start_locus.
9444 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9446         * utils.c (gnat_write_global_declarations): Adjust the flags put on
9447         dummy_global.
9449 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9451         * gcc-interface/decl.c (change_qualified_type): New static function.
9452         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
9453         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
9454         <E_Array_Subtype>: Likewise.
9455         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
9456         (gnat_to_gnu_component_type): Likewise.
9457         (gnat_to_gnu_param): Likewise.
9459 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9461         * fe.h (Set_Present_Expr): Move around.
9462         (End_Location): New macro.
9463         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
9465 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9467         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
9468         lieu of more verbose construct.
9469         * gcc-interface/trans.c (Call_to_gnu): Likewise.
9470         (gnat_to_gnu): Likewise.  Remove obsolete code.
9472 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9474         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
9475         consider that regular packed arrays can never be superflat.
9477 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
9479         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
9480         annotation.
9481         * gcc-interface/decl.c (annotate_value): Adjust.
9482         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
9483         (push_range_check_info): Likewise.
9484         (Loop_Statement_to_gnu): Likewise.
9485         (Subprogram_Body_to_gnu): Likewise.
9486         (Compilation_Unit_to_gnu): Likewise.
9487         (start_stmt_group): Likewise.
9488         * gcc-interface/utils.c (init_gnat_utils): Likewise.
9489         (gnat_pushlevel): Likewise.
9490         (maybe_pad_type): Likewise.
9492 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
9494         * seh_init.c: Fix copyright year.
9496 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9498         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
9499         are defined.  Move include windows.h before system.h.
9500         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
9501         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
9503 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
9505         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
9506         to the appropriate type.
9507         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
9508         (pos_to_constructor): Likewise.
9510 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
9512         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
9514 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
9515             Mike Stump  <mikestump@comcast.net>
9516             Richard Sandiford  <rdsandiford@googlemail.com>
9518         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
9519         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
9520         (annotate_value): Use wide-int interfaces.
9521         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
9523 2014-04-28  Richard Henderson  <rth@redhat.com>
9525         * gcc-interface/Makefile.in: Support aarch64-linux.
9527 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
9529         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
9530         add 'Suffix' parameter and adjust comment.
9531         (Get_External_Name_With_Suffix): Delete.
9532         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
9533         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
9534         'Suffix' parameter.
9535         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
9536         Call Get_External_Name instead of Get_External_Name_With_Suffix.
9537         (Get_Secondary_DT_External_Name): Likewise.
9538         * exp_cg.adb (Write_Call_Info): Likewise.
9539         * exp_disp.adb (Export_DT): Likewise.
9540         (Import_DT): Likewise.
9541         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
9542         parameter with False default.
9543         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
9544         * types.h (Fat_Pointer): Rename into...
9545         (String_Pointer): ...this.  Add comment on interfacing rules.
9546         * fe.h (Compiler_Abort): Adjust for above renaming.
9547         (Error_Msg_N): Likewise.
9548         (Error_Msg_NE): Likewise.
9549         (Get_External_Name): Likewise.  Add third parameter.
9550         (Get_External_Name_With_Suffix): Delete.
9551         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
9552         (create_concat_name): Adjust call to Get_External_Name, remove call to
9553         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
9554         * gcc-interface/trans.c (post_error): Likewise.
9555         (post_error_ne): Likewise.
9556         * gcc-interface/misc.c (internal_error_function): Likewise.
9558 2014-04-28  Richard Biener  <rguenther@suse.de>
9560         PR middle-end/60092
9561         * gcc-interface/utils.c: Define flag_isoc11.
9563 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9565         * gnatvsn.ads (Library_Version): Bump to 4.10.
9567 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
9569         Revert
9570         2014-04-22  Richard Henderson  <rth@redhat.com>
9572         * gcc-interface/Makefile.in: Support aarch64-linux.
9574         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9576         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9577         (Error_Msg_N): Likewise.
9578         (Error_Msg_NE): Likewise.
9579         (Get_External_Name_With_Suffix): Likewise.
9580         * types.h (Fat_Pointer): Delete.
9581         (String_Pointer): New type.
9582         (DECLARE_STRING_POINTER): New macro.
9583         * gcc-interface/decl.c (create_concat_name): Adjust.
9584         * gcc-interface/trans.c (post_error): Likewise.
9585         (post_error_ne): Likewise.
9586         * gcc-interface/misc.c (internal_error_function): Likewise.
9588 2014-04-22  Richard Henderson  <rth@redhat.com>
9590         * gcc-interface/Makefile.in: Support aarch64-linux.
9592         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
9593         (__gnat_alternate_stack): Enable for all linux except ia64.
9595 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9597         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9598         (Error_Msg_N): Likewise.
9599         (Error_Msg_NE): Likewise.
9600         (Get_External_Name_With_Suffix): Likewise.
9601         * types.h (Fat_Pointer): Delete.
9602         (String_Pointer): New type.
9603         (DECLARE_STRING_POINTER): New macro.
9604         * gcc-interface/decl.c (create_concat_name): Adjust.
9605         * gcc-interface/trans.c (post_error): Likewise.
9606         (post_error_ne): Likewise.
9607         * gcc-interface/misc.c (internal_error_function): Likewise.
9609 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9610             Pierre-Marie de Rodat  <derodat@adacore.com>
9612         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
9613         scalar constant instead of a reference for renaming of scalar literal.
9614         Do not create a new object for constant renaming except for a function
9615         call.  Make sure a VAR_DECL is created for the renaming pointer.
9616         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
9617         (fold_constant_decl_in_expr): New function.
9618         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
9619         For a constant renaming, try to fold a constant DECL in the result.
9620         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
9621         (Identifier_to_gnu): Reference the renamed object of constant renaming
9622         pointers directly.
9623         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
9624         invalidate constant renaming pointers.
9626 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9628         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
9629         (build_vector_type_for_size): New function.
9630         (build_vector_type_for_array): Likewise.
9631         (unchecked_convert): Build an intermediate vector type to convert
9632         from a generic array type to a vector type.
9633         (handle_vector_size_attribute): Reimplement.
9634         (handle_vector_type_attribute): Likewise.
9636 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9638         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
9639         Is_OK_Static_Expression in lieu of Is_Static_Expression to
9640         detect valid arguments.
9642 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9644         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
9646 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
9648         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
9649         (components_to_record): Likewise.
9650         * gcc-interface/utils.c (make_aligning_type): Likewise.
9651         (maybe_pad_type): Likewise.
9652         (finish_record_type): Likewise.
9653         (rest_of_record_type_compilation): Likewise.
9655 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
9657         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
9658         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
9659         for Ivdep hint.
9660         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
9661         hint for Loop_Optimize.
9662         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
9663         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9664         with new Ivdep hint.
9665         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
9666         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9667         with new Ivdep hint.
9668         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
9670 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
9671             Robert Dewar  <dewar@adacore.com>
9673         * opt.ads (Suppress_Back_Annotation): Remove as unused.
9674         * fe.h (Back_Annotate_Rep_Info): Likewise.
9675         (Global_Discard_Names): Likewise.
9676         (List_Representation_Info): Declare.
9677         * types.h (Uint_Minus_1): Likewise.
9678         * repinfo.ads: Document back-annotation change.
9679         * gcc-interface/gigi.h (init_gnat_decl): Declare.
9680         (destroy_gnat_decl): Likewise.
9681         * gcc-interface/decl.c (annotate_value): Do not create the cache of
9682         annotated values here but...
9683         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
9684         in ASIS mode.
9685         (init_gnat_decl): ...here instead.  New function.
9686         (destroy_gnat_decl): Likewise.
9687         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
9688         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
9690 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
9692         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
9693         offset for the field, if any.
9695 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
9696             Svante Signell  <svante.signell@gmail.com>
9698         PR ada/54040
9699         PR ada/59346
9700         * s-osinte-x32.adb: New file.
9701         * s-linux.ads (Time): New section.
9702         * s-linux-alpha.ads (Time): Likewise.
9703         * s-linux-android.ads (Time: Likewise.
9704         * s-linux-hppa.ads (Time): Likewise.
9705         * s-linux-mipsel.ads (Time): Likewise.
9706         * s-linux-sparc.ads (Time): Likewise.
9707         * s-linux-x32.ads (Time): Likewise.
9708         * s-osprim-x32.ads (timespec): Adjust.
9709         (Clock): Likewise.
9710         (To_Timespec): Likewise.
9711         * s-osinte-linux.ads (Time): Define local subtypes for those defined
9712         in System.Linux.
9713         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
9714         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
9715         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
9716         * s-osinte-solaris-posix.ads (timespec): Likewise.
9717         * s-osinte-posix.adb (To_Timespec): Likewise.
9718         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
9720 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
9722         PR ada/60411
9723         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
9724         * s-linux-android.ads: New file.
9725         * s-intman-android.adb: Likewise.
9726         * s-osinte-android.ads: Adjust.
9727         * sigtramp-armdroid.c: Likewise.
9728         * sigtramp.h: Add Android support.
9730 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
9732         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
9734 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
9736         PR ada/60703
9737         * system-linux-alpha.ads: Adjust for Ada 2005.
9738         * system-linux-mips.ads: Likewise.
9739         * system-linux-mips64el.ads: Likewise.
9740         * system-linux-mipsel.ads: Likewise.
9741         * system-linux-s390.ads: Likewise.
9742         * system-linux-s390x.ads: Likewise.
9743         * system-linux-sparc.ads: Likewise.
9744         * system-linux-sparcv9.ads: Likewise.
9745         * system-rtems.ads: Likewise.
9746         * system-vxworks-arm.ads: Likewise.
9748 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
9750         PR ada/39172
9751         * gcc-interface/Makefile.in (target_cpu_default): Revert
9752         2013-10-11 change.
9754 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9756         PR ada/51483
9757         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
9758         it to set the RM size.  Use directly 'size' for the Esize.
9759         (Create_Back_End_Float_Types): Adjust call to above.
9760         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
9761         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
9762         (Write_Target_Dependent_Values): Adjust comment.
9763         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
9764         deal with it.
9765         (Write_Target_Dependent_Values): Write the precision in lieu of size.
9766         (Initialization): Read the precision in lieu of size and compute the
9767         size from the precision and the alignment.
9768         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
9769         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
9770         types for vector modes, pass the size in addition to the precision.
9772 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
9774         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
9776 2014-03-07  Doug Rupp  <rupp@adacore.com>
9778         PR ada/60411
9779         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
9780         (Support_64_Bit_Divides): Removed, no longer used.
9781         (ZCX_By_Default): Enabled.
9783 2014-02-25  Doug Rupp  <rupp@adacore.com>
9785         * gcc-interface/Makefile.in (arm-linux):
9786         (EH_MECHANISM): Use ARM unwinder (-arm)
9787         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
9788         s-excmac-arm.ads.
9789         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
9790         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
9791         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
9792         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
9793         Add dependencies for sigtramp-armvxw.o.
9795 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9797         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
9799 2014-02-25  Robert Dewar  <dewar@adacore.com>
9801         * rtsfind.adb (Is_RTE): Protect against entity with no scope
9802         field (previously this call blew up on the Standard entity).
9803         * sem_attr.adb (Analyze_Attribute, case Access): Remove
9804         test for No_Abort_Statements, this is now handled in
9805         Set_Entity_With_Checks.
9806         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
9807         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
9808         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
9809         Set_Entity_With_Checks.
9810         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
9811         Add checks for No_Abort_Statements.
9813 2014-02-25  Robert Dewar  <dewar@adacore.com>
9815         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
9816         Check_Restriction is OK.
9818 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9820         * sem_ch3.adb (Process_Full_View): Better error message when
9821         the full view of  a private type without discriminants is an
9822         unconstrained type.
9823         * sem_ch7.adb (Uninstall_Declarations): Ditto.
9825 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9827         * sigtramp-armvxw.c: Also restore r0.
9829 2014-02-25  Robert Dewar  <dewar@adacore.com>
9831         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
9832         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
9833         set unconditionally.
9834         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
9835         any more (Output_Msg_Text): Rewritten with new convention on
9836         output of warnings that are treated as errors.
9837         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
9838         if Warn is False.
9839         * gnat_rm.texi: Updates to documentation on pragma
9840         Warning_As_Error.
9841         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
9842         set Warning_Doc_Switch.
9843         * lib-writ.ads: Add documentation note on ALI file generation
9844         for C.
9845         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
9846         (belongs in Sem).
9847         * sem_attr.adb (Resolve_Attribute, case Access):
9848         Abort_Task'Access violates the No_Abort_Statements restriction.
9849         * sem_res.adb (Resolve_Call): Check restriction
9850         No_Abort_Statements for call to Abort_Task or a renaming of it.
9852 2014-02-25  Robert Dewar  <dewar@adacore.com>
9854         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
9855         type name as index.
9856         * lib.ads: Minor reformatting.
9857         * einfo.ads: Minor reformatting.
9859 2014-02-25  Doug Rupp  <rupp@adacore.com>
9861         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
9862         use Short_Descriptor(S) as the argument passing mechanism.
9864 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9866         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
9868 2014-02-25  Robert Dewar  <dewar@adacore.com>
9870         * atree.ads (Warnings_Treated_As_Errors): New variable.
9871         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
9872         error object (Initialize): Initialize Warnings_As_Errors_Count
9873         (Write_Error_Summary): Include count of warnings treated as errors.
9874         * erroutc.adb (Warning_Treated_As_Error): New function.
9875         (Matches): Function moved to outer level of package.
9876         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
9877         (Warning_Treated_As_Error): New function.
9878         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
9879         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
9880         * opt.ads (Config_Switches_Type): Add entry for
9881         Warnings_As_Errors_Count.
9882         (Warnings_As_Errors_Count): New variable.
9883         (Warnings_As_Errors): New array.
9884         * par-prag.adb: Add dummy entry for Warning_As_Error.
9885         * sem_prag.adb (Analyze_Pragma): Implement new pragma
9886         Warning_As_Error.
9887         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
9889 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9891         * sigtramp.h: Fix minor inaccuracy.
9893 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
9895         * gnat_ugn.texi: Added description of kill command.
9897 2014-02-25  Robert Dewar  <dewar@adacore.com>
9899         * gnat_rm.texi (Address_Clauses): Add a section discussing the
9900         problem of address clauses causing unexpected initialization,
9901         including the effect of Initialize_Scalars.
9903 2014-02-25  Robert Dewar  <dewar@adacore.com>
9905         * errout.adb: Various changes for better msgs for anonmous access
9906         subprogram types.
9907         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
9908         argument.
9909         (Buffer_Remove): Version with character argument.
9910         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
9911         of mismatching conventions for access-to-subprogram case.
9912         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
9913         access types in record.
9914         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
9915         types, including in records.
9917 2014-02-25  Doug Rupp  <rupp@adacore.com>
9919         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
9920         enhancements and corrections.
9922 2014-02-25  Robert Dewar  <dewar@adacore.com>
9924         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
9926 2014-02-25  Robert Dewar  <dewar@adacore.com>
9928         * gnat_rm.texi: First set of documentation additions for
9929         predefined RM units.
9930         * checks.adb: Minor reformatting.
9931         * sem_elab.adb (Check_Task_Activation): Minor fix to error
9932         message.
9933         * sem_util.adb: Minor reformatting.
9935 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
9937         * usage.adb (Usage): Add help on -gnateC.
9938         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
9939         * opt.ads (Generate_CodePeer_Messages): New flag.
9940         * gnat_ugn.texi: Document new switch -gnateC.
9942 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
9944         * gnat_rm.texi: Corrected minor typos in Implementation Defined
9945         Aspects.
9946         * opt.ads: Minor reformatting.
9948 2014-02-25  Robert Dewar  <dewar@adacore.com>
9950         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
9951         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
9952         of -gnatel/-gnateL.
9953         * opt.ads (Warn_Info_Messages): New flag.
9954         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
9955         messages.
9956         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
9957         messages.
9958         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
9959         * usage.adb: Add documentation of -gnatel/-gnateL Update
9960         documentation of -gnatwl/-gnatwL.
9961         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
9962         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
9964 2014-02-25  Robert Dewar  <dewar@adacore.com>
9966         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
9967         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
9968         * interfac.ads: Minor code reorganization (add pragma
9969         Compiler_Unit_Warning).
9970         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
9971         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
9972         Has_Shift_Operator flag.
9973         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
9974         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
9975         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
9976         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
9977         Add entry for Name_Amount.
9978         * checks.adb (Selected_Range_Checks): When checking for a null
9979         range, make sure we use the base type, and not the subtype for
9980         deciding a range is null.
9981         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
9982         for suspicious loop bound which is outside the range of the
9983         loop subtype.
9984         * gnat_ugn.texi: Add documentation section "Determining the
9985         Chosen Elaboration Order"
9986         * sem_ch13.adb (UC_Entry): Add field Act_Unit
9987         (Validate_Unchecked_Conversion): Store Act_Unit
9988         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
9989         * treepr.adb: Minor reformatting.
9991 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
9993         * usage.adb: Minor: fix typo.
9995 2014-02-25  Robert Dewar  <dewar@adacore.com>
9997         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
9998         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
9999         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
10000         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
10001         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
10002         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
10003         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
10004         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
10005         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
10006         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
10007         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
10008         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
10009         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
10010         Compiler_Unit_Warning, change Compiler_Unit everywhere to
10011         Compiler_Unit_Warning.
10013 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
10015         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
10016         in ASIS mode aggregates that are used as aspect definitions.
10018 2014-02-25  Robert Dewar  <dewar@adacore.com>
10020         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
10021         reformatting.
10023 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10025         * freeze.adb (Freeze_Entity): If the return type of a function
10026         is a limited view, and the non-limited view has not been seen yet,
10027         defer freezing to some later point.
10029 2014-02-25  Robert Dewar  <dewar@adacore.com>
10031         * sem_ch3.adb: Minor reformatting.
10033 2014-02-25  Robert Dewar  <dewar@adacore.com>
10035         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
10036         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
10037         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
10038         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
10039         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
10040         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
10041         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
10042         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
10043         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
10044         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
10045         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
10046         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
10047         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
10048         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
10049         snames.ads-tmpl: Change Compiler_Unit everywhere to
10050         Compiler_Unit_Warning.
10052 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10054         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
10055         (Collect_Body_Postconditions_In_Decls): New routine.
10056         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
10057         postcondition aspects or pragmas that appear on a subprogram
10058         body stub.
10059         (Collect_Spec_Preconditions): Factor out code. Handle
10060         precondition aspects or pragmas that appear on a subprogram
10061         body stub.
10062         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
10063         aspects that apply to a subprogram body stub is no longer delayed,
10064         the aspects are analyzed on the spot.
10065         (SPARK_Aspect_Error):
10066         Aspects that apply to a subprogram declaration cannot appear in
10067         a subunit.
10068         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
10069         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
10070         is now a local variable. Code cleanup. Analysis related to
10071         the aspects of a subprogram body stub is now carried out by
10072         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
10073         and/or pragmas of a subprogram body stub to the proper body
10074         as this is no longer needed. Do not analyze the aspects of a
10075         subprogram stub when the corresponding source unit is missing.
10076         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
10077         on a stub.
10078         (Analyze_Task_Body_Stub): Flag the illegal use of
10079         aspects on a stub.
10080         (Optional_Subunit): Add local variable Unum.
10081         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
10082         pragma when it applies to a subprogram body stub.
10083         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
10084         Depends and Global can now apply to a subprogram body stub as
10085         long as it acts as its own spec.
10086         (Analyze_Refined_Pragma):
10087         Code reformatting. Refinement pragmas cannot apply to a subunit.
10089 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10091         * einfo.ads Update the usage of flag
10092         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
10093         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
10094         now starts with the letter 'C'. This makes reading expanded
10095         code easier.
10096         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
10097         Iter_Loop. Signal that an Ada 2012 iterator loop requires
10098         secondary stack management when creating a transient scope for
10099         an element reference.
10100         * exp_util.adb (Process_Statements_For_Controlled_Objects):
10101         When wrapping the statements of a loop, pass the E_Loop entity
10102         to the wrapping machinery.
10103         (Wrap_Statements_In_Block): Add
10104         formal parameter Scop along with comment on usage. Add local
10105         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
10106         block as requiring secondary stack management when the block is
10107         created inside an Ada 2012 iterator loop. This ensures that any
10108         reference objects are reclaimed on each iteration of the loop.
10109         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
10110         tasked with the handling of container iterators as requiring
10111         secondary stack management. This ensures that iterators are
10112         reclaimed when the loop terminates or is exited in any fashion.
10113         * sem_util.adb (Add_Block_Identifier): New routine.
10114         (Find_Enclosing_Iterator_Loop): New routine.
10115         * sem_util.ads (Add_Block_Identifier): New routine.
10116         (Find_Enclosing_Iterator_Loop): New routine.
10118 2014-02-25  Robert Dewar  <dewar@adacore.com>
10120         * sinfo.ads: Minor reformatting.
10122 2014-02-25  Tristan Gingold  <gingold@adacore.com>
10124         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
10126 2014-02-25  Pascal Obry  <obry@adacore.com>
10128         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
10130 2014-02-25  Tristan Gingold  <gingold@adacore.com>
10132         * sem_ch10.adb: Minor comment fix.
10134 2014-02-25  Bob Duff  <duff@adacore.com>
10136         * s-tasdeb.adb: Misc cleanup of this package,
10137         including printing addresses in hexadecimal.
10138         (Write): Fix minor bug when taking 'Address of an empty string.
10140 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10142         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
10143         public child unit when it does not refer to the abstract state
10144         of a public ancestor.
10146 2014-02-25  Yannick Moy  <moy@adacore.com>
10148         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
10149         Validity_Checks in GNATprove and CodePeer modes.
10151 2014-02-25  Pascal Obry  <obry@adacore.com>
10153         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
10154         Artifacts attribute.
10156 2014-02-25  Yannick Moy  <moy@adacore.com>
10158         * sem_prag.adb: Minor reformatting to get consistent messages.
10160 2014-02-25  Robert Dewar  <dewar@adacore.com>
10162         * checks.adb: Minor reformatting.
10163         * sinfo.ads (Do_Range_Check): Document that this flag is never
10164         passed to the back end.
10166 2014-02-25  Yannick Moy  <moy@adacore.com>
10168         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
10169         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
10171 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10173         * sem_res.adb (Appears_In_Check): New routine.
10174         (Resolve_Entity_Name): Remove local variables Prev and
10175         Usage_OK. Par is now a constant. Remove the parent chain traversal
10176         as the placement of a volatile object with enabled property
10177         Async_Writers and/or Effective_Reads must appear immediately
10178         within a legal construct.
10180 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10182         * checks.adb (Apply_Selected_Range_Checks):
10183         Alphabetize local constants and variables. Add comments.
10184         Always insert a range check that requires runtime evaluation into
10185         the tree.
10187 2014-02-25  Robert Dewar  <dewar@adacore.com>
10189         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
10191 2014-02-25  Bob Duff  <duff@adacore.com>
10193         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
10194         iterations while waiting for independent tasks to terminate;
10195         if an independent task does not terminate, we do not want to
10196         hang here. In that case, the thread will be terminated when the
10197         process exits.
10198         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
10200 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10202         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
10203         used to perform pre-analysis of the expression for SPARK
10204         aspects that have a non-standard syntax, such as GLobal and
10205         Initializes. The procedure applies to the original expression
10206         in an aspect specification, prior to the analysis of the
10207         corresponding pragma, in order to provide semantic information
10208         for ASIS navigation purposes.
10209         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
10210         Call new subprogram.
10212 2014-02-25  Yannick Moy  <moy@adacore.com>
10214         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
10216 2014-02-25  Doug Rupp  <rupp@adacore.com>
10218         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
10219         (__gnat_adjust_context_for_raise): Bump the PC by 2.
10221 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10223         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
10224         misplaced IS, add a statement sequence to improper body only if
10225         one has not been parsed already.
10227 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10229         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
10230         mismatch when multidimensional array is updated with a single
10231         index.
10233 2014-02-25  Yannick Moy  <moy@adacore.com>
10235         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
10236         sem_ch6.adb: Mark most references to SPARK RM in error messages
10237         for removal.
10239 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10241         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
10242         appears in a list of basic declarations, complete the tree with
10243         an empty statement list, to prevent cascaded errors and crashes
10244         if semantic analysis is attempted.
10246 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10248         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
10249         value.
10250         * erroutc.adb: Minor reformatting.
10252 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10254         * sem_prag.adb (Check_Clause_Syntax): Account
10255         for a solitary input item in a dependency list.
10257 2014-02-24  Yannick Moy  <moy@adacore.com>
10259         * gnat1drv.adb (Adjust_Global_Switches): Do not
10260         use validity checks at all in GNATprove_Mode.
10262 2014-02-24  Robert Dewar  <dewar@adacore.com>
10264         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
10265         atree.adb, atree.ads: Minor reformatting.
10267 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10269         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
10270         global and dependence refinement when SPARK_Mode is off.
10271         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
10272         state refinement when SPARK_Mode is off.
10273         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
10274         variable Decl. Insert the generated pragma for Refined_State
10275         after a potential pragma SPARK_Mode.
10276         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
10277         constant Deps. Remove local variable Expr. Check the syntax
10278         of pragma Depends when SPARK_Mode is off. Factor out the
10279         processing for extra parenthesis around individual clauses.
10280         (Analyze_Global_In_Decl_List): Items is now a constant. Check
10281         the syntax of pragma Global when SPARK_Mode is off.
10282         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
10283         Initializes when SPARK_Mode is off.
10284         (Analyze_Part_Of): Check
10285         the syntax of the encapsulating state when SPARK_Mode is off.
10286         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
10287         SPARK_Mode is off. Move the declaration order check with respect
10288         to pragma Initializes to the end of the processing. Do not verify
10289         the declaration order for pragma Initial_Condition when SPARK_Mode
10290         is off. Do not complain about a useless package refinement when
10291         SPARK_Mode is off.
10292         (Analyze_Refined_Depends_In_Decl_Part): Refs
10293         is now a constant. Check the syntax of pragma Refined_Depends
10294         when SPARK_Mode is off.
10295         (Analyze_Refined_Global_In_Decl_Part):
10296         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
10297         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
10298         Refined_State when SPARK_Mode is off.
10299         (Check_Dependence_List_Syntax): New routine.
10300         (Check_Global_List_Syntax): New routine.
10301         (Check_Initialization_List_Syntax): New routine.
10302         (Check_Item_Syntax): New routine.
10303         (Check_State_Declaration_Syntax): New routine.
10304         (Check_Refinement_List_Syntax): New routine.
10305         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
10307 2014-02-24  Robert Dewar  <dewar@adacore.com>
10309         * a-tags.adb, s-os_lib.adb: Minor reformatting.
10311 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10313         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
10314         strerror message, not just numeric errno value.
10316 2014-02-24  Doug Rupp  <rupp@adacore.com>
10318         * raise-gcc.c (exception_class_eq): Make endian neutral.
10320 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10322         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
10323         flag, and reset Etype and Analyzed attributes unconditionally
10324         when copying a tree that may be partly analyzed.
10325         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
10326         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
10327         within a subprogram body and applies to it, remove it from the
10328         body before making a copy of it, to prevent spurious errors when
10329         analyzing the copied body.
10331 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10333         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
10334         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
10335         vxWorks.h has been included.  Also ensure that file attributes
10336         related definitions are output even in cases where socket support
10337         is not enabled.
10338         * a-tags.adb: Code clean up.
10339         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
10340         instead of -I to add the main ada source directory to the header
10341         search path, in order to avoid conflict between our own "types.h"
10342         and VxWork's <types.h>.
10344 2014-02-24  Robert Dewar  <dewar@adacore.com>
10346         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
10347         * debug.adb: Remove documentation of -gnatd.X, no longer used.
10348         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
10350 2014-02-24  Bob Duff  <duff@adacore.com>
10352         * gnat_ugn.texi: Improve documentation of gnatpp.
10354 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10356         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
10357         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
10358         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
10359         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
10360         a chars_ptr, because on Windows this is a renaming of
10361         Socket_Error_Message.
10363 2014-02-24  Robert Dewar  <dewar@adacore.com>
10365         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
10366         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
10367         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
10368         reorganization.
10370 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10372         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
10373         that the source directory containing s-oscons-tmplt.c is on the
10374         include path, so that all internal header files are available.
10376 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10378         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
10379         domain of iteration is an attribute reference 'Old, this is an
10380         Ada 2012 iterator and the loop must be rewritten as such.
10382 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10384         * s-fileio.adb (Errno_Message): Remove, use shared version from
10385         s-os_lib instead.
10386         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
10387         * g-stseme (Socket_Error_Message): Reimplement in terms of new
10388         s-os_lib function.
10389         * g-socthi.ads, g-socthi.adb: Change profile of
10390         Socket_Error_Message to return String to allow the above.
10391         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
10392         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
10393         * g-socthi-vxworks.ads: Update to account for the above profile
10394         change.
10395         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
10396         * s-crtl.ads (strncpy): New procedure.
10397         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
10398         Use import from s-crtl.
10399         * a-envvar.adb, osint.adb: Use imports of C runtime functions
10400         from s-crtl instead of re-importing locally.
10402 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10404         * sem_prag.adb (Analyze_Global_Item): Emit the
10405         variable related checks concerning volatile objects only when
10406         SPARK_Mode is on.
10408 2014-02-24  Robert Dewar  <dewar@adacore.com>
10410         * sem_ch5.adb (Analyze_Iterator_Specification): use
10411         Error_Msg_Ada_2012_Feature.
10413 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
10415         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
10416         No_Local_Timing_Events and No_Specific_Termination_Handlers
10417         must be set, according to the Ravenscar profile definition
10418         in D.13(6/3).
10420 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10422         * sem_ch6.adb (Analyze_Expression_Function): If this is a
10423         completion, freeze return type and its designated type if needed.
10425 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10427         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10428         'Address): When moving initialization statements to a freeze
10429         entity, keep them under a single node (i.e. do not unwrap
10430         expressions with actions), and set the Initialization_Statements
10431         attribute again so that processing of a later pragma Import can
10432         still remove them.
10434 2014-02-24  Claire Dross  <dross@adacore.com>
10436         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
10437         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
10438         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
10439         Left/Right to First_To_Previous/Current_To_Last.
10441 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10443         * adaint.h (struct file_attributes): New component "error"
10444         (__gnat_error_attributes): Accessor for the above.
10445         * adaint.c (__gnat_error_attributes): New subprogram
10446         (__gnat_stat): Fix returned value (expect errno value)
10447         (__gnat_stat_to_attr): Add management of error component (set to
10448         stat errno value, except for missing files where it is set to 0,
10449         and exists is set to 0).
10450         * osint.ads (File_Attributes_Size): Update per change above,
10451         also clarify documentation.
10452         * s-filatt.ads: New file, binding to file attributes related
10453         functions.
10454         * Makefile.rtl (s-filatt): New runtime unit.
10455         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
10456         to library function if not available on target).
10457         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
10458         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
10459         SIZEOF_struct_dirent_alloc): New constants.
10460         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
10461         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
10462         Perform appropriate error checking if stat fails (do not just
10463         ignore existing files if stat fails)
10464         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
10465         dependencies.
10467 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10469         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
10470         the use of volatile objects as global items in a function to
10471         the variable related checks section.
10472         * sem_util.adb (Async_Readers_Enabled): Directly call
10473         Has_Enabled_Property.
10474         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
10475         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
10476         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
10477         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
10478         Update the comment on usage. State_Has_Enabled_Property how handles
10479         the original logic of the routine. Add processing for variables.
10480         (State_Has_Enabled_Property): New routine.
10481         (Variable_Has_Enabled_Property): New routine.
10483 2014-02-24  Robert Dewar  <dewar@adacore.com>
10485         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
10486         Minor reformatting.
10487         * atree.ads, atree.adb (Node35): New function.
10488         (Set_Node35): New procedure.
10489         * debug.adb: Define new debug flag -gnatd.X.
10490         * einfo.ads, einfo.adb (Import_Pragma): New field.
10491         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
10492         really active yet, has to be activated with -gnatd.X.
10493         * sem_prag.adb (Set_Imported): Set new Import_Pragma
10494         field (Set_Imported): Don't set Is_Public (see
10495         Freeze.Wrap_Imported_Subprogram)
10496         * par-ch3.adb (P_Component_List): Handle unexpected null component.
10498 2014-02-24  Yannick Moy  <moy@adacore.com>
10500         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
10501         * gnat_rm.texi: Correct documentation of attribute Update.
10503 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10505         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
10506         iterator in older versions of Ada.
10508 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
10510         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
10511         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
10513 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10515         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
10516         indexed_components that are instances of Ada 2012 container
10517         indexing operations. Analysis and resolution of such nodes
10518         is performed on the attribute, and the original source is
10519         preserved for ASIS operations. If expansion is enabled, the
10520         indexed component is replaced by the value of this attribute,
10521         which is in a call to an Indexing aspect, in most case wrapped
10522         in a dereference operation.
10523         * sem_ch4.adb (Analyze_Indexed_Component): Create
10524         Generalized_Indexing attribute when appropriate.
10525         (Analyze_Call): If prefix is not overloadable and has an indexing
10526         aspect, transform into an indexed component so it can be analyzed
10527         as a potential container indexing.
10528         (Analyze_Expression): If node is an indexed component with a
10529         Generalized_ Indexing, do not re-analyze.
10530         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
10531         of an indexed_component that has been transformed into a container
10532         indexing operation.
10533         (Resolve_Indexed_Component): Call the above when required.
10534         (Resolve): Do not insert an explicit dereference operation on
10535         an indexed_component whose type has an implicit dereference:
10536         the operation is inserted when resolving the related
10537         Generalized_Indexing.
10539 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
10541         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
10542         Environment.
10544 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10546         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
10547         error messages.
10548         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
10549         Merge the expected and available mode errors.
10550         (Report_Unused_Constituents): Remove leading spaces in error messages.
10551         (Report_Unused_States): Remove leading spaces in error messages.
10553 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10555         * par_sco.adb (Traverse_One): Refine categorization of statement
10556         SCOs.
10558 2014-02-24  Robert Dewar  <dewar@adacore.com>
10560         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
10561         Pure_05, Pure_12 and Preelaborate_05.
10562         * gnat_rm.texi: Update accordingly.
10563         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
10564         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
10565         Recognize one argument form of these pragmas only in GNAT mode
10566         (-gnatg).
10568 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10570         * s-dimmks.ads: Replace symbol for temperature, previously the
10571         Greek letter Theta, by the ASCII @ sign.
10572         * s-diflio.ads: ditto.
10574 2014-02-24  Robert Dewar  <dewar@adacore.com>
10576         * exp_ch4.adb: Minor code reorganization (use OR for boolean
10577         variables).
10578         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
10580 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
10582         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
10583         so that references to gnatmem and ASIS tools do not appear in the FSF
10584         edition of the GNAT User's Guide.
10586 2014-02-24  Yannick Moy  <moy@adacore.com>
10588         * freeze.adb (Freeze_Entity): Do not issue warning
10589         for pre/post being ignored on imported subprogram in GNATprove
10590         mode.
10592 2014-02-24  Robert Dewar  <dewar@adacore.com>
10594         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
10595         stand.ads, sem_eval.adb: Minor reformatting.
10597 2014-02-24  Yannick Moy  <moy@adacore.com>
10599         * sem_prag.adb: Minor rewording in error message.
10601 2014-02-24  Johannes Kanig  <kanig@adacore.com>
10603         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
10604         GNATprove_mode, gnat2why doesn't need nor use these types.
10606 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
10608         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
10609         target, in the case of signed integer exponentiation that uses a
10610         run-time routine, always select the Exp_* versions, since overflow
10611         checking is automatically done by AAMP arithmetic instructions.
10613 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10615         * sem_ch13.adb (Analyze_Aspect_Specifications):
10616         When the related context is a package instace, insert pragma
10617         Abstract_State after all internally-generated renamings related
10618         to the instance "header".
10620 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10622         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
10623         subprograms.
10624         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
10625         call to an abstract subprogram is legal if it appears in a
10626         pre/postcondition of another abstract operation.
10628 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
10630         * gnat_ugn.texi: Misc updates.
10632 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10634         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
10636 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
10638         * layout.adb (Layout_Variant_Record): Instantiate
10639         Generic_Check_Choices and call Check_Choices before calling
10640         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
10641         set to prevent generating incorrect discriminant-checking
10642         functions for 'others' variants (functions that unconditionally
10643         return True rather than accounting for the values covered by the
10644         'others' choice).
10645         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
10646         Formal_Derived_Matching.
10647         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
10648         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
10649         Formal_Derived_Matching formal to Subtypes_Statically_Match.
10650         (Subtypes_Statically_Match): Suppress the Object_Size matching
10651         test in the case where Formal_Derived_Matching is True.
10652         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
10653         True for Formal_Derived_Matching_Formal on the call to
10654         Subtypes_Statically_Compatible.
10656 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
10658         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
10660 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
10662         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
10663         Look through a conversion between original and packable version to get
10664         the base object.
10665         (build_component_ref): Rework comment and fix formatting.
10667 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
10669         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
10670         project-specific options.
10672 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10674         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
10675         not Constraint_Error.
10676         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
10677         * sem_ch5.adb: Code clean up.
10679 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10681         * sem_prag.adb (Usage_Error): Remove local
10682         constant Typ. Remove the specialized diagnostics for unconstrained
10683         or tagged items as those are not part of the explicit input set
10684         of the related subprogram and should not be flagged.
10686 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10688         * sem_attr.adb: Add guard to preserve all errors.
10690 2014-02-20  Vincent Celier  <celier@adacore.com>
10692         * switch-m.adb (Normalize_Compiler_Switches): Take into account
10693         switches that are recorded in ALI files: -gnateA, -gnateE,
10694         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
10696 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10698         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
10699         of an element iterator form over a formal container with an
10700         Iterable aspect.
10701         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
10702         to create declaration and loop statements for both forms of
10703         container iterators.
10704         (Expand_Formal_Container_Element_Iterator): New procedure
10705         to handle loops of the form  "for E of C" when C is a formal
10706         container.
10707         (Expand_Formal_Container_Iterator): Code cleanup.
10709 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10711         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
10712         (Analyze_Contract_Case): Remove the use of
10713         "may". Replace "aspect Contract_Cases" to avoid categorization
10714         of aspect vs pragma.
10715         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
10716         (Analyze_Global_Item): Remove
10717         the use of "formal", specify the subprogram.  Split the
10718         error message about a state with visible refinement into
10719         two. Remove the use of "global" from "volatile global item".
10720         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
10721         is on one line.
10722         (Analyze_Input_Output): Update the call to
10723         Check_Mode. Specify the duplicated item. Reword the error
10724         message concerning an input of a null output list. Use "\"
10725         for error message continuation.
10726         (Analyze_Part_Of): Remove
10727         the use of "may". Use "\" for error message continuation.
10728         (Analyze_Refined_Depends_In_Decl_Part): Update the error
10729         message concerning a useless refinement to match the format
10730         of Refined_Global.
10731         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
10732         concerning a useless refinement.
10733         (Analyze_Refinement_Clause): Use "\" for error message continuation.
10734         (Check_Constituent_Usage): Use "\" for error message continuation.
10735         (Check_Dependency_Clause): Use "\" for error message continuation.
10736         (Check_Matching_Constituent): Use "\" for error message continuation.
10737         (Check_Missing_Part_Of): Use "\" for error message continuation.
10738         (Check_Mode): Renamed to
10739         Check_Role. Update the comment on usage. Redo the error reporting
10740         to use Role_Error.
10741         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
10742         message continuation.
10743         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
10744         with comment on usage. Update all occurrences of Is_Input and Is_Output.
10745         (Inconsistent_Mode_Error): Use "\" for error message continuation.
10746         (Input_Match): Use "\" for error message continuation.
10747         (Role_Error): New routine.
10748         (Set_Convention_From_Pragma): Use "\" for error message continuation.
10749         (Usage_Error): Add local variable Error_Msg. Build specialized error
10750         message showcasing the offending item kind. Redo the diagnostics for
10751         unconstrained types.
10753 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10755         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
10756         to determine whether a type is a container type, rather than
10757         examining only its type declaration, so that subtypes and derived
10758         types are handled properly.
10760 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
10762         * gnat_ugn.texi: gnatmetric: add description of project-specific
10763         options.
10765 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10767         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
10768         all choices in an association for a record type have the same
10769         type, as is done for record aggregates.
10771 2014-02-20  Robert Dewar  <dewar@adacore.com>
10773         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
10774         Unmodified rather than Warnings (Off). Make comments
10775         uniform in the four affected units.
10777 2014-02-20  Robert Dewar  <dewar@adacore.com>
10779         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10780         Object_Size): For non-scalar types allow any value that is a
10781         multiple of 8.
10782         * gnat_rm.texi: Document Object_Size for composites more clearly.
10784 2014-02-20  Yannick Moy  <moy@adacore.com>
10786         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
10788 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10790         * stand.ads: Raise_Type: new predefined entity, used as the type
10791         of a Raise_Expression prior to resolution.
10792         * cstand.adb: Build entity for Raise_Type.
10793         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
10794         initial type of the node.
10795         * sem_type.adb (Covers): Raise_Type is compatible with all
10796         other types.
10797         * sem_res.adb (Resolve): Remove special handling of Any_Type on
10798         Raise_Expression nodes.
10799         (Resolve_Raise_Expression): Signal ambiguity if the type of the
10800         context is still Raise_Type.
10802 2014-02-20  Robert Dewar  <dewar@adacore.com>
10804         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
10805         mismatching predicates.
10806         * sem_ch6.adb (Check_Conformance): Give better messages on
10807         predicate mismatch.
10808         * sem_eval.adb (Predicates_Match): Move to spec.
10809         * sem_eval.ads (Predicates_Match): Moved here from body.
10811 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10813         * a-cbmutr.adb: Use default value in Insert_Child.
10815 2014-02-20  Vincent Celier  <celier@adacore.com>
10817         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
10818         Stringt.Initialize in all project aware tools.
10820 2014-02-20  Doug Rupp  <rupp@adacore.com>
10822         * gnat_ugn.texi: Document gnatbind -X option.
10823         * vms_data.ads: Minor warnings documentation reformatting.
10825 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10827         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
10828         procedure for a base type.
10830 2014-02-20  Robert Dewar  <dewar@adacore.com>
10832         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
10833         expression with type info.
10834         * sem_ch13.adb: Minor reformatting.
10835         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
10836         False if predicates do not match on the two types.
10838 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
10840         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
10841         In Relaxed_RM_Semantics mode, allow any static integer value,
10842         for compatibility with other compilers.
10844 2014-02-20  Vincent Celier  <celier@adacore.com>
10846         * errutil.adb (Initialize): Properly initialize entry in table
10847         Warnings when warnings are suppressed.
10849 2014-02-20  Robert Dewar  <dewar@adacore.com>
10851         * s-os_lib.ads: Add warning about non-portability of Rename_File.
10852         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
10853         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
10854         * gnat_ugn.texi: Document no warnings on junk variable names.
10855         * layout.adb: Minor code reorganization (use Ekind_In).
10856         * stringt.adb: Move initialization of Null_String_Id to Initialize
10857         routine.
10859 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10861         * sem_ch13.adb: Initialize optional Element_Id.
10863 2014-02-20  Robert Dewar  <dewar@adacore.com>
10865         * s-os_lib.ads (Rename_File): Minor commment addition.
10867 2014-02-20  Thomas Quinot  <quinot@adacore.com>
10869         * einfo.ads: Minor reformatting.
10871 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10873         * aspects.adb (Exchange_Aspects): New routine.
10874         * aspects.ads (Exchange_Aspects): New routine.
10875         * atree.adb (Rewrite): Do not check whether the save node has
10876         aspects as it never will, instead check the node about to be clobbered.
10877         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
10878         entities of generic packages.
10879         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
10880         pointer of an aspect specification list after rewriting takes place.
10881         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
10882         specifications of the generic template and the copy used for analysis.
10883         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
10884         the aspect specifications of the generic template and the
10885         copy used for analysis.
10886         (Analyze_Package_Instantiation): Propagate the aspect specifications
10887         from the generic template to the instantiation.
10888         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
10889         specifications from the generic template to the instantiation.
10890         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
10891         Abstract_State, Initializes and Initial_Condition when they
10892         apply to a package instantiation.
10894 2014-02-20  Robert Dewar  <dewar@adacore.com>
10896         * stringt.adb: Add call to Initialize in package initialization.
10898 2014-02-20  Robert Dewar  <dewar@adacore.com>
10900         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
10901         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
10902         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
10903         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
10904         reformatting.
10906 2014-02-20  Bob Duff  <duff@adacore.com>
10908         * s-os_lib.ads: Minor: Remove incorrect comment.
10910 2014-02-20  Robert Dewar  <dewar@adacore.com>
10912         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
10914 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10916         * a-cborma.adb (Assign): When creating a node without a specified
10917         element, insert an uninitialized element in the map, because
10918         the instance may provide an element type with a default
10919         initialization, e.g a scalar with a Default_Value aspect.
10920         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
10921         (Insert): In the version without explicit element, provide an
10922         uninitialized element, as above.
10923         * a-cbdlli.adb (Append): In the version without explicit element,
10924         provide an uninitalized element, as above.
10925         (Allocate): Remove unused version.
10927 2014-02-20  Robert Dewar  <dewar@adacore.com>
10929         * sem_elab.adb: Minor code reorganization (use Nkind_In).
10930         * stringt.adb: Remove temporary pragma Warnings (Off).
10931         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
10932         of Null_String_Id.
10934 2014-02-20  Matthew Heaney  <heaney@adacore.com>
10936         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
10937         index.
10939 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10941         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
10942         properly the cursor type for subsequent volatile testing in SPARK
10943         mode, when domain is a formal container with an Iterabe aspect.
10945 2014-02-20  Robert Dewar  <dewar@adacore.com>
10947         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
10948         (Set_Specific_Warning_Off): Add Reason argument.
10949         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
10950         (Set_Specific_Warning_Off): Add Reason argument.
10951         * erroutc.adb (Warnings_Entry): Add Reason field
10952         (Specific_Warning_Entry): Add Reason field.
10953         (Warnings_Suppressed): return String_Id for Reason.
10954         (Warning_Specifically_Suppressed): return String_Id for Reason.
10955         * erroutc.ads (Warnings_Entry): Add Reason field.
10956         (Specific_Warning_Entry): Add Reason field.
10957         (Set_Specific_Warning_Off): Add Reason argument.
10958         (Set_Warnings_Mode_Off): Add Reason argument.
10959         (Warnings_Suppressed): return String_Id for Reason.
10960         (Warning_Specifically_Suppressed): return String_Id for Reason.
10961         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
10962         (Warning_Specifically_Suppressed): returns String_Id for Reason
10963         * gnat_rm.texi: Document that Warning parameter is string literal
10964         or a concatenation of string literals.
10965         * par-prag.adb: New handling for Reason argument.
10966         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
10967         for Reason argument.
10968         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
10969         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
10970         * stringt.adb: Set Null_String_Id.
10971         * stringt.ads (Null_String_Id): New constant.
10973 2014-02-20  Robert Dewar  <dewar@adacore.com>
10975         * einfo.ads: Minor comment addition: Etype of package is
10976         Standard_Void_Type.
10977         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
10978         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
10979         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
10980         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
10981         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
10982         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10983         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
10984         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
10985         Replace all calls with calls to New_Occurrence_Of.
10987 2014-02-20  Robert Dewar  <dewar@adacore.com>
10989         * par-util.adb (Ignore, case of right paren): Make this a
10990         serious error.
10992 2014-02-19  Robert Dewar  <dewar@adacore.com>
10994         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
10995         * debug.adb: Remove -gnatd.X switch, no longer used.
10996         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
10997         now always made.
10999 2014-02-19  Bob Duff  <duff@adacore.com>
11001         * g-socket.ads: Minor: Correct some comments.
11003 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11005         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
11007 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11009         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
11010         an error on out of range priorities if Relaxed_RM_Semantics.
11011         * sem_prag.adb (Analyze_Pragma): Ditto.
11013 2014-02-19  Bob Duff  <duff@adacore.com>
11015         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
11016         where F denotes the renaming of an enumeration literal, and
11017         issue a specialized error message.
11019 2014-02-19  Matthew Heaney  <heaney@adacore.com>
11021         * a-chtgop.ads (Checked_Index): New operation.
11022         (Next): Changed mode of hash table.
11023         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
11024         (Generic_Read, Reserve_Capacity): Ditto.
11025         (Generic_Equal): Detect tampering.
11026         (Next): Changed mode of hash table, detect tampering.
11027         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
11028         operation.
11029         (Find): Changed mode of hash table.
11030         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
11031         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
11032         tampering.
11033         (Find): Changed mode of hash table, check for tampering.
11034         (Generic_Replace_Element): Check for tampering.
11035         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
11036         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
11037         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
11038         Detect tampering.
11039         (Find, Generic_Replace_Element): Check for tampering.
11040         * a-chtgbo.ads (Checked_Index): New operation.
11041         * a-chtgbo.adb (Checked_Index): New operation
11042         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
11043         (Generic_Read, Next): Ditto.
11044         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
11045         table (Difference, Intersection): Use variable view of
11046         source, detect tampering (Find, Is_Subset, Overlap): Use
11047         variable view of container (Symmetric_Difference, Union):
11048         Detect tampering (Vet): Use Checked_Index to detect tampering
11049         (Constant_Reference, Element, Find): Use variable view of
11050         container.
11051         (Update_Element_Preserving_Key): Detect tampering.
11052         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
11053         of container.
11054         (Is_Subset): Ditto.
11055         (Equivalent_Sets, Overlap): Use Node's Next component.
11056         (Vet): Use Checked_Index to detect tampering.
11057         (Constant_Reference, Element, Find): Use variable view of container.
11058         (Update_Element_Preserving_Key): Detect tampering.
11059         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
11060         Element, Find): Use variable view of container.
11061         (Reference): Rename hash table component.
11062         (Vet): Use Checked_Index to detect tampering.
11064 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11066         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
11067         of -nostdinc.
11069 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11071         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
11072         against calls without Def_Id.
11074 2014-02-19  Claire Dross  <dross@adacore.com>
11076         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11077         a-cofove.ads: Add global annotations to subprograms.
11079 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11081         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
11082         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
11083         Initial_Condition no longer requires the presence of pragma
11084         Initialized. Do not try to diagnose whether all variables mentioned in
11085         pragma Initializes also appear in Initial_Condition.
11086         (Collect_Variables): Removed.
11087         (Match_Variable): Removed.
11088         (Match_Variables): Removed.
11089         (Report_Unused_Variables): Removed.
11091 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11093         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
11095 2014-02-19  Robert Dewar  <dewar@adacore.com>
11097         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
11098         reformatting.
11100 2014-02-19  Vincent Celier  <celier@adacore.com>
11102         * prj-part.adb (Parse_Single_Project): Use the fully resolved
11103         project path, with all symbolic links resolved, to check if the
11104         same project is imported with a different unresolved path.
11105         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
11106         changed to Resolved_Path to reflect that all symbolic links
11107         are resolved.
11109 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11111         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
11112         from sem_ch13, for use elsewhere.
11113         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
11114         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
11115         cursor type on the loop variable when the iteration is over o
11116         formal container.
11118 2014-02-19  Vincent Celier  <celier@adacore.com>
11120         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
11121         for an empty Target (Check_Target): Never fail when an empty
11122         target is declared in the configuration project.
11124 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11126         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
11127         the pragma comes fron a predicate aspect and the context is a
11128         record declaration within the scope that declares the type.
11130 2014-02-19  Robert Dewar  <dewar@adacore.com>
11132         * gnat_rm.texi: Minor clarifications.
11133         * expander.adb, sem_aggr.adb: Add comments.
11135 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11137         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
11138         applies to a subprogram body, the name is the current scope,
11139         rather than being declared in the current scope.
11140         (Analyze_Pragma, case No_Return): Handle properly a No_Return
11141         aspect applied to a subprogram body.
11143 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11145         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
11146         of overloaded subprograms, and fix bug in handling of primitive
11147         operation Element.
11149 2014-02-19  Pascal Obry  <obry@adacore.com>
11151         * s-os_lib.adb: Minor reformatting.
11153 2014-02-19  Yannick Moy  <moy@adacore.com>
11155         * expander.adb (Expand): Do nothing inside generics.
11156         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
11157         generics.
11159 2014-02-19  Yannick Moy  <moy@adacore.com>
11161         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
11163 2014-02-19  Robert Dewar  <dewar@adacore.com>
11165         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
11166         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
11167         longer needed).
11169 2014-02-19  Claire Dross  <dross@adacore.com>
11171         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11172         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
11174 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11176         * sem_ch3.adb (Analyze_Declarations): Analyze
11177         a package contract at the end of the private declarations (if
11178         applicable), otherwise analyze it and the end of the visible
11179         declarations.
11181 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11183         * style.adb (Missing_Overriding): If subprogram is an
11184         instantiation, place warning on the instance node itself,
11185         without mention of the original generic. Do not emit message
11186         if explicit Ada version is older than the introduction of the
11187         overriding indicator.
11189 2014-02-19  Yannick Moy  <moy@adacore.com>
11191         * gnat_rm.texi: Doc clarifications.
11193 2014-02-19  Yannick Moy  <moy@adacore.com>
11195         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
11196         inside a generic.
11198 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11200         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
11201         specified First primitive, rather than by name.
11202         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
11203         and extend error checking for missing primitives and incorrect
11204         signatures.
11206 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11208         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
11209         errors when a Synchronization aspect on an overriding protected
11210         operation does not match the given aspect on the overridden
11211         operation of an ancestor interface.
11213 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11215         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
11216         (Check_Loop_Pragma_Placement): Update
11217         comment on usage. Remove local variables Orig_Stmt and
11218         Within_Same_Sequence. Check that the current Loop_Invariant or
11219         Loop_Variant pragma is grouped together with other such pragmas.
11220         (Is_Loop_Pragma): New routine.
11221         (Prev_In_Loop): Removed.
11223 2014-02-19  Robert Dewar  <dewar@adacore.com>
11225         * par-ch6.adb (P_Return): For extended return, end column lines
11226         up with RETURN.
11227         * par.adb: Minor documentation clarification.
11229 2014-02-19  Yannick Moy  <moy@adacore.com>
11231         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
11232         that Loop_Invariant and Loop_Variant appear consecutively.
11233         * gnat_rm.texi Update documentation of Loop_Invariant and
11234         Loop_Variant pragmas.
11236 2014-02-19  Robert Dewar  <dewar@adacore.com>
11238         * debug.adb: Document -gnatd.X.
11239         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
11240         first token
11241         (Check_Then_Column): Ditto.
11242         * styleg.adb (Check_Then): Allow THEN on line after IF.
11243         (Check_Then): Check THEN placement under control of -gnatd.X
11244         * styleg.ads (Check_Then): Now called even if THEN is not first
11245         token on line.
11246         * stylesw.ads (Style_Check_If_Then_Layout): Document new
11247         relaxed rules.
11248         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
11250 2014-02-19  Robert Dewar  <dewar@adacore.com>
11252         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
11253         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
11254         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
11255         vms_conv.adb: Fix bad layout of IF statements
11257 2014-02-19  Robert Dewar  <dewar@adacore.com>
11259         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
11261 2014-02-19  Robert Dewar  <dewar@adacore.com>
11263         * exp_util.adb: Update comments.
11265 2014-02-19  Doug Rupp  <rupp@adacore.com>
11267         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
11268         * init.c (__gl_float_format): [VMS] New global.
11269         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
11270         representation in effect.
11272 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11274         * exp_ch6.adb Add with and use clause for Exp_Prag.
11275         (Expand_Contract_Cases): Relocated to Exp_Prag.
11276         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
11277         * exp_prag.adb Add with and use clauses for Checks and Validsw.
11278         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
11279         structure of the expanded code to showcase the evaluation of
11280         attribute 'Old prefixes. Add local variable Old_Evals. Expand
11281         any attribute 'Old references found within a consequence. Add
11282         circuitry to evaluate the prefixes of attribute 'Old that
11283         belong to a selected consequence.
11284         (Expand_Old_In_Consequence): New routine.
11285         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
11286         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
11287         potentially unevaluated prefix is always evaluated.
11289 2014-02-19  Robert Dewar  <dewar@adacore.com>
11291         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
11292         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
11293         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
11294         handling for the case of Modify_Tree_For_C, this approach did
11295         not work.
11296         * exp_util.adb (Matching_Standard_Type): New function
11297         (Side_Effect_Free): New top level functions (from
11298         Remove_Side_Effects).
11299         * exp_util.ads (Side_Effect_Free): New top level functions
11300         (moved from body).
11301         * sinfo.ads: Minor comment updates.
11303 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11305         * exp_ch6.adb (Expand_Simple_Function_Return): If return
11306         type is unconstrained and uses the secondary stack, mark the
11307         enclosing function accordingly, to ensure that the value is not
11308         prematurely removed.
11310 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11312         * par.adb Alphabetize the routines in Par.Sync.
11313         (Resync_Past_Malformed_Aspect): New routine.
11314         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
11315         variables. Code and comment reformatting. Detect missing
11316         parentheses on aspects [Refined_]Global and [Refined_]Depends
11317         with a non-null definition.
11318         * par-sync.adb: Alphabetize all routines in this separate unit.
11319         (Resync_Past_Malformed_Aspect): New routine.
11321 2014-02-19  Robert Dewar  <dewar@adacore.com>
11323         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
11324         if Esize values do not match.
11326 2014-02-19  Yannick Moy  <moy@adacore.com>
11328         * sinfo.ads: Minor comment update.
11330 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11332         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
11334 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11336         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
11337         that has the No_Ctrl_Actions flag is a suitable node to be
11338         wrapped if the assigned expression has no finalization actions.
11339         * sem_eval.adb (Eval_Entity_Name): For a compile time known
11340         boolean value, mark the corresponding condition SCO as constant.
11342 2014-02-19  Robert Dewar  <dewar@adacore.com>
11344         * exp_util.adb: Minor reformatting.
11345         * exp_util.ads (Matching_Standard_Type): New function.
11346         * exp_ch7.adb: Minor reformatting.
11348 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11350         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
11351         to find declaration for Cursor, to handle properly the case of
11352         a discriminated iterable type.
11354 2014-02-19  Vincent Celier  <celier@adacore.com>
11356         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
11357         imported library projects with the library ALI dirs, when setting
11358         the object paths.
11359         * prj-env.ads (Ada_Objects_Path): Correct comments about
11360         argument Including_Libraries.
11362 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
11364         * gnat_rm.texi: Minor spelling fixes.
11366 2014-02-19  Doug Rupp  <rupp@adacore.com>
11368         * init.c: Remove unneeded code.
11369         * fe.h (Float_Format): New macro
11370         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
11372 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11374         * sem_prag.adb (Check_Refined_Global_Item):
11375         A state or variable acts as a constituent only it is part of an
11376         encapsulating state and the state has visible refinement.
11378 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11380         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
11381         postcondition for a function when the expression does not mention
11382         'Result but the function has in-out parameters.
11384 2014-02-19  Robert Dewar  <dewar@adacore.com>
11386         * gnat_rm.texi: Add documentation on Value_Size forcing biased
11387         representation.
11389 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11391         * lib-xref.ads Remove the small table of letter and symbol usage as we
11392         already have one.
11394 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11396         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
11397         messages depending on the offending misplaced aspect specifications.
11398         (Diagnose_Misplaced_Aspect_Specifications): New routine.
11400 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11402         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
11403         for iterable aspect primitives.
11404         (Resolve_Iterable_Operation): Use expected signature of iterable
11405         aspect to resolve primitive when overloading is present.
11406         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
11407         (Check_Signature): Removed.
11409 2014-02-19  Yannick Moy  <moy@adacore.com>
11411         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
11412         subunit in GNATprove_Mode.
11413         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
11415 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11417         * lib-xref.ads Alphabetize the contents of table
11418         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
11419         for E_Abstract_State. List all letters and symbols in use.
11420         * sem_prag.adb (Analyze_Abstract_State): Update all calls
11421         to Create_Abstract_State to reflect the new signature.
11422         (Create_Abstract_State): Change subprogram profile and update
11423         the comment on usage. Use the proper location of the state
11424         declaration when creating a new abstract state entity. Do not
11425         generate an external name, but simply reuse the name coming from
11426         the state declaration.
11428 2014-02-19  Robert Dewar  <dewar@adacore.com>
11430         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
11431         declarations get properly inserted in Modify_Tree_For_C mode.
11432         * sinfo.ads: Minor comment addition.
11434 2014-02-19  Robert Dewar  <dewar@adacore.com>
11436         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
11437         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
11439 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11441         * style.adb (Missing_Overriding): Warning does not apply in
11442         language versions prior to Ada 2005.
11443         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
11444         * sem_attr.adb: Add Attribute_Iterable where needed.
11445         * exp_attr.adb: ditto.
11446         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
11447         handle loops and quantified expressions over types that have an
11448         iterable aspect.  Called from Expand_Iterator_Loop.
11449         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
11450         with Iterable aspect.
11451         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
11452         subprograms specified in the Iterable aspect have the proper
11453         signature involving container and cursor.
11454         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
11455         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
11456         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
11457         New procedure to retrieve one of the primitives First, Last,
11458         or Has_Element, from the value of the iterable aspect of a
11459         formal container.
11460         (Is_Container_Element): Predicate to recognize expressions
11461         that denote an element of one of the predefined containers,
11462         for possible optimization.  This subprogram is not currently
11463         used, pending ARG discussions on the legality of the proposed
11464         optimization. Worth preserving for eventual use.
11465         (Is_Iterator): Recognize formal container types.
11466         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
11468 2014-02-19  Robert Dewar  <dewar@adacore.com>
11470         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
11471         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
11472         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
11473         declarations from list of actions.
11474         * output.ads, output.adb (Delete_Last_Char): New procedure.
11475         * sinfo.ads: Document handling of Mod and expression with actions
11476         in Modify_Tree_For_C mode.
11478 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11480         * par-ch9.adb (P_Task): Add a null statement to produce a
11481         well-formed task body when due to a previous syntax error the
11482         statement list is empty.
11484 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11486         * sem_prag.adb (Check_Dependency_Clause): Account
11487         for the case where a state with a non-null refinement matches a
11488         null output list. Comment reformatting.
11489         (Inputs_Match): Copy a solitary input to avoid an assertion failure
11490         when trying to match the same input in multiple clauses.
11492 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
11494         * sem_attr.adb: Minor typo fix.
11496 2014-02-18  Robert Dewar  <dewar@adacore.com>
11498         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
11499         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
11500         (Create_Standard): Create new unsigned types.
11501         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
11502         mode (Expand_N_Reference): Removed, problematic and not needed
11503         for now.
11504         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
11505         not needed for now.
11506         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
11507         * expander.adb: Remove call to Expand_N_Reference (problematic,
11508         and not needed now).
11509         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
11510         * stand.adb: Read and write unsigned type entities.
11511         * stand.ads: Add new unsigned types.
11513 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
11515         * sem_ch4.adb (Analyze_Call): Do not mark a function call
11516         as being inside an assertion expression as the flag is now removed.
11517         (Check_Ghost_Subprogram_Call): Do not query the
11518         In_Assertion_Expression flag as it is now removed, instead use
11519         a predicate function.
11520         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
11521         In_Assertion_Expression flag as it is now removed, instead use
11522         a predicate function.
11523         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
11524         * sem_util.adb Add with and use clause for Sem_Prag.
11525         (In_Assertion_Expression_Pragma): New routine.
11526         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
11527         * sinfo.adb (In_Assertion_Expression): Removed.
11528         (Set_In_Assertion_Expression): Removed.
11529         * sinfo.ads Remove flag In_Assertion_Expression along with its
11530         use in nodes.
11531         (In_Assertion_Expression): Removed along with
11532         pragma Inline.  (Set_In_Assertion_Expression): Removed along
11533         with pragma Inline.
11535 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
11537         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
11538         used together with '-r', '-rf' or '-rnb' options.
11540 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
11542         * sem_attr.adb (Analyze_Attribute): Comment
11543         and code reformatting. Use separate routines to check the
11544         legality of attribute 'Old in certain pragmas. Verify
11545         the use of 'Old, 'Result and locally declared entities
11546         within the prefix of 'Old.
11547         (Check_References_In_Prefix): New routine.
11548         (Check_Use_In_Contract_Cases): New routine.
11549         (Check_Use_In_Test_Case): New routine.
11551 2014-02-18  Vincent Celier  <celier@adacore.com>
11553         * sem_aux.adb (Is_By_Reference_Type): For each components of
11554         a record type, check also if the component is volatile as it
11555         may have an aspect that makes it volatile. If it is, then the
11556         record type is a by reference type.
11558 2014-02-18  Robert Dewar  <dewar@adacore.com>
11560         * exp_attr.adb: Minor reformatting.
11561         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
11562         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
11563         as another case where we don't generate N_Reference nodes for
11564         primitive types.
11565         * expander.adb (Expand): Add call to Expand_N_Reference.
11567 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11569         * sem_prag.adb (Analyze_Refined_Pragma): Remove
11570         local variable Pack_Spec. Refinement pragmas may now apply to
11571         bodies of both visible and private subprograms.
11573 2014-02-06  Robert Dewar  <dewar@adacore.com>
11575         * exp_attr.adb (Expand_Loop_Entry_Attribute):
11576         Minor change (Attr => N) (Expand_Pred_Succ): New name
11577         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
11578         Max): Expand into if expression if Modify_Tree_For_C mode.
11579         (Expand_N_Attribute_Reference, case Min): ditto
11580         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
11581         Max attributes.
11583 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11585         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
11586         predicate check if this is an internal declaration with
11587         No_Initialization set, as for an expanded aggregate component.
11589 2014-02-06  Doug Rupp  <rupp@adacore.com>
11591         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
11592         conditions with severity of "SUCCESS" or "INFORMATIONAL".
11594 2014-02-06  Yannick Moy  <moy@adacore.com>
11596         * sem_prag.adb (Analyze_Pragma): Analyze pragma
11597         Debug rewritten node before rewriting it as a null statement in
11598         GNATprove mode.
11600 2014-02-06  Robert Dewar  <dewar@adacore.com>
11602         * sem_attr.adb (Min_Max): New procedure.
11603         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
11604         procedure.
11606 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
11608         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
11609         gnatmetric/gnatpp.
11611 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11613         * sem_prag.adb (Analyze_Abstract_State): Update
11614         all calls to Create_Abstract_State to pass the proper state
11615         "declaration".
11616         (Create_Abstract_State): Add new formal parameter
11617         State_Decl along with comment on usage. Establish a link between
11618         the abstract state entity and the state declaration.
11620 2014-02-06  Robert Dewar  <dewar@adacore.com>
11622         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
11623         comparison of unordered enumeration type.
11624         (Analyze_Attribute, case Max): Check for improper comparison of
11625         unordered enumeration type.
11626         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
11627         sem_util.adb.
11628         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
11629         Moved here from Sem_Res.
11631 2014-02-06  Robert Dewar  <dewar@adacore.com>
11633         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
11634         reformatting.
11636 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11638         * sem_ch6.adb (Process_Formals): Error message reformatting.
11640 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11642         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
11643         variable Spec. Do not inherit the null indicator from the
11644         subprogram body when generating the spec.
11646 2014-02-06  Robert Dewar  <dewar@adacore.com>
11648         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
11649         mixed case.
11651 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11653         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
11654         when the function has a foreign convention, but not if only the
11655         limited return type has such a convention.
11657 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11659         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
11660         variable Spec. Comment reformatting. Use Copy_Separate_Tree
11661         rather than New_Copy_Tree when building the corresponding
11662         subprogram declaration.
11664 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11666         * sem_prag.adb (Analyze_Global_Item): Remove
11667         the mode-related checks on abstract states with enabled external
11668         properties.
11669         (Property_Error): Removed.
11671 2014-02-06  Javier Miranda  <miranda@adacore.com>
11673         * lib-xref.adb (Generate_Reference): When
11674         generating the reference to the first private entity take care
11675         of handling swapped entities.
11677 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
11679         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11680         gnatmetric.
11682 2014-02-06  Robert Dewar  <dewar@adacore.com>
11684         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
11685         than the word size when operating in Modify_Tree_For_C mode.
11686         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
11688 2014-02-06  Robert Dewar  <dewar@adacore.com>
11690         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
11691         compare is case insensitive.
11692         * gnat_rm.texi: Document that string compare for Warnings Off
11693         is now case insensitive.
11695 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11697         * gnat_rm.texi: Small wording tweak.
11699 2014-02-06  Pascal Obry  <obry@adacore.com>
11701         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
11702         and Included_Artifact_Patterns attribute definitions.
11704 2014-02-06  Yannick Moy  <moy@adacore.com>
11706         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
11707         SPARK_Mode pragma component for all subprograms, including stubs.
11709 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11711         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
11712         the configuration options of the enclosing context in a
11713         stack-like fasion.
11714         (Analyze_Subprogram_Body_Stub): Maintain the
11715         configuration options of the enclosing context in a stack-like
11716         fashion.
11718 2014-02-06  Robert Dewar  <dewar@adacore.com>
11720         * debug.adb: -gnatd.u sets Modify_Tree_For C
11721         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
11722         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
11723         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
11724         * exp_intr.adb (Expand_Shift): Call expander so we do
11725         Modify_Tree_For_C expansions.
11726         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11727         if -gnatd.u set.
11729 2014-02-06  Fedor Rybin  <frybin@adacore.com>
11731         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
11732         after the phase 1 of the processing of each aggregated project
11733         to get access to project trees of aggregated projects.
11734         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
11735         If specified, On_New_Tree_Loaded is called after each aggregated
11736         project has been processed succesfully.
11737         (Process): new parameter On_New_Tree_Loaded.
11738         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
11739         callback added after processing of each aggregated project.
11740         (Recursive_Process): new parameter On_New_Tree_Loaded.
11741         (Process): new parameter On_New_Tree_Loaded.
11742         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
11743         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
11744         On_New_Tree_Loaded.
11745         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
11746         On_New_Tree_Loaded.
11748 2014-02-06  Bob Duff  <duff@adacore.com>
11750         * gnat_ugn.texi: Implement --insert-blank-lines and
11751         --preserve-blank-lines switches.
11753 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
11755         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11756         gnatelim.
11758 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11760         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
11761         of the pragma on individual objects.
11763 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11765         * einfo.adb Node29 is now used as BIP_Initialization_Call.
11766         (BIP_Initialization_Call): New routine.
11767         (Set_BIP_Initialization_Call): New routine.
11768         (Write_Field29_Name): Add an entry for constants and variables.
11769         * einfo.ads Add new attribute BIP_Initialization_Call and update
11770         its usage in nodes.
11771         (BIP_Initialization_Call): New routine along with pragma Inline.
11772         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
11773         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
11774         Add local declaration Res_Decl. Capture the build-in-place
11775         initialization call when the related object declaration has
11776         created a transient block.
11777         * exp_ch7.adb (Process_Transient_Objects): Add local variable
11778         Fin_Insrt. Recognize a scenario where an object declaration acts
11779         as a transient context and is initialized by a build-in-place
11780         function call.
11782 2014-02-06  Pascal Obry  <obry@adacore.com>
11784         * prj-util.adb (For_Interface_Sources): Fix handling of required
11785         bodies for aggregate libs.
11787 2014-02-06  Robert Dewar  <dewar@adacore.com>
11789         * nlists.ads: Minor comment clarifications.
11791 2014-02-06  Robert Dewar  <dewar@adacore.com>
11793         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11794         if gnatd.V set.
11795         * opt.ads (Modify_Tree_For_C): New flag.
11796         * output.ads, output.adb (Last_Char): New function.
11798 2014-02-06  Pascal Obry  <obry@adacore.com>
11800         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
11801         share/gpr for cross-builds.
11803 2014-02-06  Robert Dewar  <dewar@adacore.com>
11805         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
11806         Minor reformatting and code clean ups.
11808 2014-02-06  Pascal Obry  <obry@adacore.com>
11810         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
11811         * prj.ads: Minor typo fix in comment.
11813 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11815         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
11816         local variable Expr. Flag clauses with extra parenthesis as this
11817         is not allowed by the syntax of the pragma. Code reformatting.
11819 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11821         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
11822         variables. Rename variabme Tnn to Temp. Do not create a temporary
11823         if assertions are disabled. Find enclosing routine _Postconditions
11824         and insert the temporary that captures the value of the prefix
11825         before the routine.
11826         * exp_ch6.adb (Build_Postconditions_Procedure):
11827         Insert the generated _Postconditions routine
11828         before the first source declaration of the related
11829         subprogram.
11830         (Insert_After_Last_Declaration): Removed.
11831         (Insert_Before_First_Source_Declaration): New routine.
11833 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11835         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
11836         Utility to determine whether current expansion is for the body
11837         of a predefined primitive operation.
11838         (Make_Predicate_Check): Use Within_Internal_Subpgram
11839         * checks.adb (Apply_Predicate_Check): Use
11840         Within_Internal_Subprogram
11841         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
11843 2014-02-06  Pascal Obry  <obry@adacore.com>
11845         * prj.ads, prj-util.adb: Minor reformatting.
11847 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11849         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
11850         Take into account the Split_PPC flag to ensure that conjuncts
11851         in a composite postcondition aspect are tested in source order.
11853 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11855         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
11856         use of SPARK_Mode.
11857         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
11858         illegal use of SPARK_Mode.
11859         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
11860         * sem_prag.adb (Analyze_Pragma): Code reformatting.
11861         * sem_util.adb Add with and use clause for Aspects.
11862         (Check_SPARK_Mode_In_Generic): New routine.
11863         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
11865 2014-02-06  Thomas Quinot  <quinot@adacore.com>
11867         * a-calend.adb (Formatting_Operations.Split): Ensure that
11868         Time_Error is raised for invalid time values.
11870 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
11872         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
11873         in GNATprove_Mode.
11875 2014-02-06  Robert Dewar  <dewar@adacore.com>
11877         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
11878         * exp_ch3.adb (Build_Dcheck_Function): Set
11879         Is_Discriminant_Check_Function.
11881 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11883         * exp_ch7.adb (Is_Subprogram_Call): Inspect
11884         the original tree in certain cases where a construct has been
11885         factored out and replaced by a reference to a temporary.
11887 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11889         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
11890         parameters when propagating predicate function to full view.
11891         (Find_Type_Of_Object): Freeze base type of object type to catch
11892         premature use of discriminated private type without a full view.
11894 2014-02-06  Robert Dewar  <dewar@adacore.com>
11896         * sprint.adb: Minor reformatting.
11898 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11900         * exp_ch4.adb (Process_Transient_Object): Add local variable
11901         Temp_Ins. When the transient object is initialized by an
11902         aggregate, the hook must capture the object after the last
11903         component assignment takes place.
11904         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
11905         routine Is_Subprogram_Call.
11906         (Is_Subprogram_Call): Inspect an
11907         aggregate that has been heavily expanded for subprogram calls.
11908         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
11909         and Temp_Ins.  Remove the nested declare block and adjust the
11910         indentation. When the transient object is initialized by an
11911         aggregate, the hook must capture the object after the last
11912         component assignment takes place.
11914 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11916         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
11917         external states with enabled properties that do not match the
11918         global mode.
11919         (Property_Error): New routine.
11920         * sem_res.adb (Property_Error): New routine.
11921         (Resolve_Actuals): Detect illegal uses of external variables with
11922         enabled properties in procedure calls that do not match the mode of
11923         the corresponding formal parameter.
11925 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11927         * sem_util.adb (Has_Enabled_Property): Rename
11928         formal parameter Prop_Nam to Property. Update the comment on usage
11929         and all occurrences in the body. Add local variable Prop_Nam. When
11930         inspecting a property with an expression, the property name
11931         appears as the first choice of the component association.
11933 2014-02-04  Robert Dewar  <dewar@adacore.com>
11935         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
11937 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11939         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
11940         for consistency with other messages.
11942 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11944         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
11945         iterator, indicate that the element is a constant if the container
11946         type does not have a variable indexing aspect.
11947         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
11948         marked as constant, do not reset its Ekind, to ensure that
11949         container elements in an element loop are not modified if the
11950         container (e.g. a hashed set) only has a constant indexing aspect.
11952 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
11954         * g-souinf.ads: Subprograms in this unit are actually not pure.
11955         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
11956         * einfo.ads (Is_Pure): Update doc to match implementation.
11958 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11960         * exp_ch13.adb: Minor spelling fix.
11962 2014-02-04  Robert Dewar  <dewar@adacore.com>
11964         * opt.ads: Minor comment update.
11966 2014-02-04  Robert Dewar  <dewar@adacore.com>
11968         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
11969         instead of Replace.
11971 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11973         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
11974         on null expressions if component type is non-null, when the
11975         corresponding association covers an empty range of index values.
11977 2014-02-04  Robert Dewar  <dewar@adacore.com>
11979         * sinfo.ads: Further comments on N_Expression_With_Actions node.
11981 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
11983         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
11984         variables Out_Items and Ref_Global. Remove local constant
11985         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
11986         and D8. Remove the useless collection of global items as this
11987         was a leftover from an earlier version of the routine. Move
11988         several routines out to avoid deep nesting and indentation.
11989         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
11990         parameter Do_Checks to Post_Errors. Update the comment on usage.
11991         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
11992         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
11993         to Post_Errors. Update the comment on usage. Account for the
11994         case where a self referential state may have a null input_list.
11995         (Is_Self_Referential): New routine.
11997 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11999         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
12000         entity renames an expression, as in the case of an object of
12001         an unconstrained type initialized by a function call, defer the
12002         rewriting of the expression to the expander.
12003         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
12004         'Alignment): If the entity renames an expression, introduce
12005         temporary to capture value, and rewrite original declaration to
12006         use temporary.
12008 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12010         * g-comlin.adb: Minor typo fix.
12012 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12014         * freeze.adb (Freeze_All): Types derived from a formal
12015         access_to_classwide type do not have a finalization master.
12017 2014-02-04  Robert Dewar  <dewar@adacore.com>
12019         * sprint.adb: Minor reformatting.
12021 2014-02-04  Robert Dewar  <dewar@adacore.com>
12023         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
12024         cases where Actions is a null list.
12025         * sinfo.ads (N_Expression_With_Actions): Actions can be
12026         temporarily empty during semantic analysis, but must be non-empty
12027         in the final expanded tree.
12029 2014-01-31  Robert Dewar  <dewar@adacore.com>
12031         * exp_ch9.adb: Minor reformatting.
12033 2014-01-31  Emmanuel Briot  <briot@adacore.com>
12035         * g-comlin.adb (Set_Command_Line): Take the switches
12036         configuration from the Command_Line_Config.
12038 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12040         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
12041         refinement clause.
12043 2014-01-31  Vincent Celier  <celier@adacore.com>
12045         * projects.texi: Add more documentation about others used as an
12046         index in indexed attributes.
12048 2014-01-31  Robert Dewar  <dewar@adacore.com>
12050         * gnat_ugn.texi: Minor update.
12051         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
12052         * exp_util.adb: Minor reformatting.
12054 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12056         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
12057         depends on data that is not private to the protected object,
12058         and potentially modifiable in unsynchronized fashion.
12060 2014-01-31  Yannick Moy  <moy@adacore.com>
12062         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
12063         GNATprove_Mode.
12065 2014-01-31  Robert Dewar  <dewar@adacore.com>
12067         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
12068         for Unknown_Package.
12069         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
12071 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12073         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
12074         the logic that generates a runtime check to determine the
12075         controlled status of the object about to be allocated or
12076         deallocated. Class-wide types now always use a runtime check
12077         even if they appear as generic actuals.
12078         (Find_Object): Detect
12079         a special case that involves interface class-wide types because
12080         the object appears as a complex expression.
12082 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12084         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
12085         subprogram with an incomplete untagged formals on the list of
12086         private dependents, to verify that the type is properly completed
12087         in the private part.
12088         * sem_attr.adb: Code clean up.
12090 2014-01-31  Robert Dewar  <dewar@adacore.com>
12092         * exp_ch6.adb: Minor reformatting.
12094 2014-01-31  Vincent Celier  <celier@adacore.com>
12096         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
12097         when Pkg is unknown.
12099 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12101         * sem_res.adb (Resolve_Entity_Name): Comment
12102         reformatting. Allow volatile objects in various generated checks.
12104 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12106         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
12107         component association, set the etype of the identifier, for
12108         SPARK use.
12110 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12112         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
12113         declared in a package, not checks can apply to the subprogram.
12115 2014-01-31  Robert Dewar  <dewar@adacore.com>
12117         * erroutc.adb (Validate_Specific_Warnings): Warnings are
12118         controlled -gnatw.W.
12119         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
12120         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
12122 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
12124         * exp_disp.adb: Update comments.
12126 2014-01-31  Yannick Moy  <moy@adacore.com>
12128         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
12129         Save_Global_References): Guard access to expression in aspect.
12131 2014-01-31  Yannick Moy  <moy@adacore.com>
12133         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
12134         Issue an error when the pragma is applied to a generic unit,
12135         a generic declaration, or inside a generic.
12137 2014-01-31  Yannick Moy  <moy@adacore.com>
12139         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
12140         entity.
12142 2014-01-31  Robert Dewar  <dewar@adacore.com>
12144         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
12145         reformatting.
12147 2014-01-31  Tristan Gingold  <gingold@adacore.com>
12149         * exp_disp.adb: Add a historic note.
12151 2014-01-31  Robert Dewar  <dewar@adacore.com>
12153         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
12154         Process_Deferred_References.
12156 2014-01-31  Yannick Moy  <moy@adacore.com>
12158         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
12159         ineffective pragma Warnings(Off) in GNATprove_Mode.
12161 2014-01-31  Bob Duff  <duff@adacore.com>
12163         * s-taskin.ads: Minor comment fix.
12164         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
12165         just direct dependents. If this is actually an abort, each task
12166         will take care of aborting its dependents, so all dependents will
12167         get aborted, as before. However, when this is called the second
12168         time from Vulnerable_Complete_Master "for convenience" (i.e. to
12169         kill off tasks waiting at terminate alternatives), aborting
12170         indirect dependents is wrong, because it causes some unrelated
12171         tasks to get aborted.
12173 2014-01-31  Robert Dewar  <dewar@adacore.com>
12175         * sem_ch4.adb: Minor reformatting.
12177 2014-01-31  Robert Dewar  <dewar@adacore.com>
12179         * exp_ch2.adb: New calling sequence for Is_LHS.
12180         * frontend.adb: Add call to Process_Deferred_References.
12181         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
12182         (Deferred_References): New table.
12183         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
12184         entries.
12185         (Find_Expanded_Name): Ditto.
12186         * sem_res.adb: New calling sequence for Is_LHS.
12187         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
12188         * sem_warn.adb: Call Process_Deferred_References before issuing
12189         warnings.
12191 2014-01-31  Tristan Gingold  <gingold@adacore.com>
12193         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
12194         use of System_Tasking_Protected_Objects_Single_Entry.
12195         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
12196         of Protected_Single_Entry_Call.
12197         (Expand_N_Timed_Entry_Call): Remove single_entry case.
12198         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
12199         single_entry case.
12200         (Make_Disp_Timed_Select_Body): Likewise.
12201         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
12202         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
12203         Self_Id parameter.
12204         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
12205         (Wait_For_Completion_With_Timeout): Remove.
12206         (Protected_Single_Entry_Call): Remove Mode parameter
12207         (always Simple_Call).
12208         (Service_Entry): Remove Self_Id constant (not used anymore).
12209         (Timed_Protected_Single_Entry_Call): Remove.
12210         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
12211         (Protected_Single_Entry_Call): Remove Mode parameter.
12213 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12215         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
12216         * einfo.ads (Get_Pragma): Update the comment on special pragmas
12217         handled by this routine.
12218         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
12219         to the contract of the related subprogram body.
12220         * sem_util.adb (Add_Contract_Item): Handle the insertion of
12221         pragma Refined_Post into the contract of a subprogram body.
12222         * sinfo.ads Update the documentation of node N_Contract.
12223         * sem_res.adb (Resolve_Entity_Name): Add a guard
12224         to detect abstract states and variables only when checking the
12225         SPARK 2014 rules concerning volatile object placement.
12227 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12229         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
12230         null is compatible with any access type.
12232 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12234         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
12235         placement is not in a package.
12237 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12239         * sem_util.adb (Has_Enabled_Property): Compare the character field of
12240         the sole property.
12242 2014-01-29  Robert Dewar  <dewar@adacore.com>
12244         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
12245         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
12246         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
12248 2014-01-29  Robert Dewar  <dewar@adacore.com>
12250         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
12251         * sem_warn.adb (Check_References): Suppress warnings if inside
12252         Initial_Condition pragma.
12254 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12256         * sem_prag.adb (Check_Missing_Part_Of): List all values of
12257         State_Space_Kind for readability reasons. Do not emit an error on
12258         a private item when the enclosing package lacks aspect/pragma
12259         Abstract_State. Do not emit an error on a private package
12260         instantiation when the corresponding generic template lacks
12261         visible state.
12262         (Has_Visible_State): New routine.
12263         * sem_util.adb (Find_Placement_In_State_Space): The visible
12264         declarations of any kind of child units in general act as proper
12265         placement location.
12267 2014-01-29  Robert Dewar  <dewar@adacore.com>
12269         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
12270         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
12271         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
12272         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
12273         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
12274         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
12275         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
12276         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
12277         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
12278         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
12279         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
12280         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
12281         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
12282         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
12283         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
12284         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
12285         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
12286         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
12287         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
12288         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
12289         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
12290         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
12291         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
12292         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
12293         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
12294         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
12295         s-regpat.adb, s-secsta.adb, s-stalib.ads,
12296         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
12297         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
12298         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
12299         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
12300         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
12302 2014-01-29  Robert Dewar  <dewar@adacore.com>
12304         * expander.adb: Minor reformatting.
12306 2014-01-29  Javier Miranda  <miranda@adacore.com>
12308         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
12309         previous patch.
12311 2014-01-29  Javier Miranda  <miranda@adacore.com>
12313         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
12314         that checks if an interface types defines the predefined "="
12315         function because the compiler was erroneously not generating the
12316         predefined "=" primitive as soon as the name of some interface
12317         primitive is "=" (formals were not checked).
12319 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12321         * expander.adb (Expander): In GNATprove mode, do not process
12322         transient scopes: they are in general not created in this mode,
12323         and an attempt to examine them will lead to constraint errors when
12324         processing configuration pragmas that have analyzable expressions.
12326 2014-01-29  Vincent Celier  <celier@adacore.com>
12328         * clean.adb (Gnatclean): Fail if main project is an aggregate
12329         project or if there is an aggregate library project in the
12330         project tree.
12331         * gnatcmd.adb: Fail if the main project is an aggregate project
12332         or if there is an aggegate library project in the project tree.
12333         * make.adb (Initialize): : Fail if main project is an aggregate
12334         project or if there is an aggregate library project in the
12335         project tree.
12336         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
12337         * prj-makr.adb (Initialize): Fail if the main project is an
12338         aggregate project or an aggregate library project.
12340 2014-01-29  Vincent Celier  <celier@adacore.com>
12342         * prj-part.adb (Check_Import_Aggregate): New procedure
12343         to check if an imported project is an aggregate project.
12344         (Parse_Single_Project): Call Check_Import_Aggregate
12345         * projects.texi: Document that aggregate projects cannot be
12346         extended or imported.
12348 2014-01-29  Robert Dewar  <dewar@adacore.com>
12350         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
12351         reformatting and code clean up.
12352         * gnat_ugn.texi: Add documentation section on Atomic Variables
12353         and Optimization.
12355 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12357         * einfo.adb Flag264 is now unused.
12358         (Has_Body_References): Removed.
12359         (Set_Has_Body_References): Removed.
12360         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
12361         * einfo.ads Update the comment on usage of attribute
12362         Body_References. Remove attribute Has_Body_References and its
12363         usage in nodes.
12364         (Has_Body_References): Removed along with pragma Inline.
12365         (Set_Has_Body_References): Removed along with pragma Inline.
12366         * sem_prag.adb (Analyze_Global_Item): Move the call to
12367         Record_Possible_Body_Reference in the state related checks
12368         section. Add a comment intended function.
12369         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
12370         in the state related checks section. Add a comment intended function.
12371         (Analyze_Refinement_Clause): Cleanup the illegal body reference
12372         reporting. Add a comment on timing of error reporting.
12373         (Record_Possible_Body_Reference): Reimplement the routine.
12375 2014-01-29  Vincent Celier  <celier@adacore.com>
12377         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
12378         unit-based languages.
12379         (Mains.Complete_Mains.Do_Complete): Use the source file project
12380         tree when calling Find_File_Add_Extension. Use the correct
12381         project name when reporting an error.
12383 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12385         * aspects.adb Add an entry for aspect Part_Of in table
12386         Canonical_Aspect.
12387         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
12388         Aspect_Argument, Aspect_Names and Aspect_Delay.
12389         * atree.h Define Elist9.
12390         * atree.adb (Elist9): New routine.
12391         (Set_Elist9): New routine.
12392         * atree.ads (Elist9): New routine.
12393         (Set_Elist9): New routine.
12394         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
12395         the list of node usage.  Remove Refined_State from the list of
12396         node usage.
12397         (Encapsulating_State): New routine.
12398         (Get_Pragma):
12399         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
12400         (Refined_State): Removed.
12401         (Set_Encapsulating_State): New routine.
12402         (Set_Part_Of_Constituents): New routine.
12403         (Set_Refined_State): Removed.
12404         (Write_Field9_Name): Add an entry
12405         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
12406         Encapsulating_State. Remove the entry for Refined_State.
12407         * einfo.ads Add new attributes Encapsulating_State
12408         and Part_Of_Constituents alond with their usage in
12409         entities. Remove attribute Refined_State along with its
12410         usage in entities.
12411         (Encapsulating_State): New routine and
12412         pragma Inline.  (Get_Pragma): Update the comment on usage.
12413         (Part_Of_Constituents): New routine and pragma Inline.
12414         (Refined_State): Removed along with pragma Inline.
12415         (Set_Encapsulating_State): New routine and pragma Inline.
12416         (Set_Part_Of_Constituents): New routine and pragma Inline.
12417         (Set_Refined_State): Removed along with pragma Inline.
12418         * par-prag.adb Pragma Part_Of does not need any special processing
12419         by the parser.
12420         * sem_ch3.adb (Analyze_Declarations): Remove local variables
12421         Body_Id and Prag. Call separate routines to analyze the
12422         contract of a package [body].
12423         (Analyze_Object_Contract):
12424         Update the comment on usage. Remove local variables
12425         Items and Nam. Use Get_Pragma rather than traversing the
12426         classification list.  Verify whether the lack of indicator
12427         Part_Of agrees with the placement of the variable in state space.
12428         (Analyze_Object_Declaration): Initialize the encapsulating state
12429         of a variable.  (Requires_State_Refinement): Moved to sem_util.
12430         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
12431         (Analyze_Package_Contract): New routine.
12432         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
12433         (Analyze_Package_Contract): New routine.
12434         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
12435         state and Part_Of constituents.
12436         * sem_ch13.adb (Analyze_Aspect_Specifications):
12437         Add processing for aspect Part_Of. Update all
12438         calls to Decorate_Delayed_Aspect_And_Pragma.
12439         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
12440         not need any special processing at freeze time.
12441         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
12442         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
12443         update the associated comment.
12444         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
12445         (Analyze_Abstract_State): Add new global variable State_Id. Remove
12446         local constants Errors and Loc. Remove local variables Is_Null
12447         and State_Nam. Create the entity of the abstract state on the
12448         spot, before all remaining checks are performed. Verify that a
12449         missing Part_Of option agrees with the placement of the abstract
12450         state within the state space.
12451         (Analyze_Depends_In_Decl_Part):
12452         Add new global variables Constits_Seen and States_Seen. Check
12453         that a state and a corresponding constituent do not appear
12454         in pragma [Refined_]Depends.
12455         (Analyze_Global_In_Decl_Part):
12456         Add new global variables Constits_Seen and States_Seen. Check
12457         that a state and a corresponding constituent do not appear
12458         in pragma [Refined_]Global.
12459         (Analyze_Global_Item):
12460         Remove the now obsolete code that deals with Part_Of.
12461         Add the entity of the global item to the list of processed
12462         items.  (Analyze_Initializes_In_Decl_Part): Add new global
12463         variables Constits_Seen and States_Seen. Check that a state
12464         and a corresponding constituent do not appear in pragma
12465         Initializes.
12466         (Analyze_Initialization_Item): Add the entity
12467         of the initialization item to the list of processed items.
12468         (Analyze_Input_Item): Add the entity of the initialization
12469         item to the list of processed items.
12470         (Analyze_Input_Output):
12471         Remove the now obsolete code that deals with Part_Of.  Add the
12472         entity of the input/output to the list of processed items.
12473         (Analyze_Part_Of): New routine.
12474         (Analyze_Part_Of_Option): Remove
12475         local constant Par_State. Add local constant Encaps and local
12476         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
12477         the option. Turn the related state into a Part_Of constituent
12478         if the option is legal.
12479         (Analyze_Pragma): Add processing
12480         for pragma Part_Of.
12481         (Analyze_Refined_State_In_Decl_Part):
12482         Remove global constants Pack_Body and Spec_Id. Remove
12483         global variables Abstr_States and Hidden_States. Add new
12484         global variables Available_States, Body_Id, Body_States and
12485         Spec_Id. Add new local constant Body_Decl. Reimplement the
12486         logic that extracts the states available for refinement from
12487         the related package and the body hidden states of the said
12488         package.
12489         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
12490         (Check_Applicable_Policy): Alphabetize body.
12491         (Check_Dependency_Clause): Replace Refined_State
12492         with Encapsulating_State.
12493         (Check_Matching_Constituent):
12494         Reimplement the logic that determines whether an item is a valid
12495         / invalid constituent of the current refined state. Return when
12496         a construct does not denote a valid abstract state. Extract the
12497         list of Part_Of constituents for further analysis. Check that all
12498         Part_Of constituents of a state have been used in its refinement.
12499         (Check_Matching_State): Update the comment on usage. Operate
12500         on the list of available states.
12501         (Check_Missing_Part_Of): New routine.
12502         (Check_Refined_Global_Item): Replace Refined_State
12503         with Encapsulating_State.
12504         (Check_State_And_Constituent_Use): New routine.
12505         (Create_Abstract_State): New routine.
12506         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
12507         (Is_Part_Of): Removed.
12508         (Collect_Body_States): New routine.
12509         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
12510         (Collect_Hidden_States): Removed.
12511         (Report_Unrefined_States): Change the profile of the procedure along
12512         with the comment on usage.
12513         (Report_Unused_Constituents): New routine.
12514         (Report_Unused_Hidden_States): Removed.
12515         (Report_Unused_States): New routine.
12516         * sem_prag.ads (Check_Missing_Part_Of): New routine.
12517         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
12518         appear in the classification pragmas of a package instantiation
12519         or a variable.
12520         (Find_Placement_In_State_Space): New routine.
12521         (Is_Child): Removed.
12522         (Is_Child_Or_Sibling): Remove formal
12523         parameter Private_Child. Remove the private child checks.
12524         (Requires_State_Refinement): Moved from sem_ch3.
12525         * sem_util.ads Add new type State_Space_Kind along with
12526         comment on its usage and values.
12527         (Add_Contract_Item): Update the comment on usage.
12528         (Find_Body_Discriminal): Alphabetize spec.
12529         (Find_Placement_In_State_Space): New routine.
12530         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
12531         and update the comment on usage.
12532         (Requires_State_Refinement): Moved from sem_ch3.
12533         * sinfo.ads: Update the documentation of N_Contract.
12534         * snames.ads-tmpl The predefined name for Part_Of is now used
12535         to denote a pragma. Add Pragma_Id for Part_Of.
12537 2014-01-29  Emmanuel Briot  <briot@adacore.com>
12539         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
12540         machine as needed.
12541         (Dump): New subprogram.
12543 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12545         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
12546         Expand_Entry_Declaration to factorize code.
12548 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12550         * checks.adb: minor clarification.
12551         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
12552         search for primitive operations to the entities that immediately
12553         follow the type declaration.
12555 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12557         * exp_ch9.adb (Build_Protected_Entry): Do not call
12558         Complete_Entry_Body anymore.
12559         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
12560         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
12562 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
12564         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
12565         string when the Name input bigger than allowed. Adapt the function
12566         specification.
12568 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12570         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
12571         if expression is within a case_expression of if_expression.
12573 2014-01-29  Robert Dewar  <dewar@adacore.com>
12575         * exp_ch9.adb, inline.ads: Minor reformatting.
12577 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12579         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
12581 2014-01-29  Yannick Moy  <moy@adacore.com>
12583         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
12584         SPARK_Mode_Pragma components to be able to analyze generic
12585         instance.
12586         * sem_ch12.adb (Analyze_Package_Instantiation,
12587         Inline_Instance_Body, Need_Subprogram_Instance_Body,
12588         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
12589         for future analysis of the instance.
12590         (Instantiate_Package_Body,
12591         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
12592         from instantiation to analyze the instance.
12594 2014-01-29  Robert Dewar  <dewar@adacore.com>
12596         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
12597         reorganization.
12599 2014-01-29  Yannick Moy  <moy@adacore.com>
12601         * gnat_rm.texi: Update description of SPARK_Mode pragma.
12603 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12605         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
12607 2014-01-29  Thomas Quinot  <quinot@adacore.com>
12609         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
12611 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12613         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
12614         resulting string is an internal entity. and thus requires no
12615         initialization. This is relevant when Initialize_ Scalars is
12616         enabled, because the resultant spurious initialization may lead to
12617         secondary stack anomalies that produce a mangled name for a task.
12619 2014-01-29  Yannick Moy  <moy@adacore.com>
12621         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
12622         not inherited from spec anymore. Check consistency
12623         rules after processing of declarations.
12624         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
12625         from spec anymore. Check consistency rules after processing of
12626         declarations.
12627         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
12628         packages.
12629         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
12630         consistency rules.
12632 2014-01-27  Robert Dewar  <dewar@adacore.com>
12634         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
12635         to unordered msg.
12636         (Resolve_Range): Add type name/location to unordered msg.
12638 2014-01-27  Claire Dross  <dross@adacore.com>
12640         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
12641         Capacity) is only called with Capacity >= Length (Source) and
12642         Capacity in Capacity_Range.
12643         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
12644         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
12645         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
12646         in the code is this is not the case.
12648 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12650         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
12651         selected component in an instance where the component of the
12652         actual is not visibile at instantiation.
12654 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12656         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
12657         has a dynamic predicate, generate freeze node for Actual_Subtype
12658         at once, because the declaration of the corresponding predicate
12659         function will make reference to it.
12661 2014-01-27  Tristan Gingold  <gingold@adacore.com>
12663         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
12665 2014-01-27  Robert Dewar  <dewar@adacore.com>
12667         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
12668         for 2**X optimization.
12670 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12672         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
12673         explicitly whether value is in range of Character, because the
12674         library is typically compiled with range checks disabled, and
12675         we cannot rely on the implicit check on the argument of 'Val.
12677 2014-01-27  Vincent Celier  <celier@adacore.com>
12679         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
12680         not the Target to itself.
12682 2014-01-27  Robert Dewar  <dewar@adacore.com>
12684         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
12685         changes to avoid incorrect use of unordered enum types.
12687 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12689         * sem_ch4.adb: Minor reformatting.
12691 2014-01-27  Robert Dewar  <dewar@adacore.com>
12693         * scn.adb (Check_End_Of_Line): Removed.
12694         (Error_Long_Line): Removed.
12695         (Determine_License): Use versions of above routines from Scanner.
12696         * scng.adb (Check_End_Of_Line): Moved to spec.
12697         (Error_Long_Line): Removed, no longer used.
12698         * scng.ads (Check_End_Of_Line): Moved here from body.
12700 2014-01-27  Tristan Gingold  <gingold@adacore.com>
12702         * exp_ch7.adb (Build_Cleanup_Statements): Call
12703         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
12704         for protected body.
12705         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
12706          Remove Service_Name variable.
12707         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
12708         factorize code from the above subprograms.
12709         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
12711 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
12713         * einfo.adb (Has_Option): Reimplemented.
12714         * sem_prag.adb (Analyze_Refinement_Clause): Add global
12715         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
12716         External_Constit_Seen and State. Add local variables Body_Ref,
12717         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
12718         avoid a cumbersome while pool. Verify the legality of an external
12719         state and relevant properties.
12720         (Check_External_Property): New routine.
12721         (Check_Matching_State): Remove parameter profile
12722         and update comment on usage.
12723         (Collect_Constituent): Store the
12724         relevant external property of a constituent.
12725         * sem_util.adb (Async_Readers_Enabled): Update the call to
12726         Has_Enabled_Property.
12727         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
12728         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
12729         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
12730         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
12731         Update comment on usage. Reimplement the logic to recognize the various
12732         formats of properties.
12734 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12736         * par-ch5.adb: Minor reformatting.
12738 2014-01-27  Tristan Gingold  <gingold@adacore.com>
12740         * s-tposen.ads: Harmonize style and comments.
12742 2014-01-27  Vincent Celier  <celier@adacore.com>
12744         * projects.texi: Document that shared library projects, by
12745         default, cannot import projects that are not shared library
12746         projects.
12748 2014-01-27  Robert Dewar  <dewar@adacore.com>
12750         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
12751         of Rewrite.
12753 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12755         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
12756         any other exception is raised.
12757         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
12758         still necessary to perform a conversion in order to remove overlong
12759         encodings.
12761 2014-01-27  Robert Dewar  <dewar@adacore.com>
12763         * exp_smem.adb: Minor reformatting.
12765 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12767         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
12769 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12771         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
12772         nodes for operands to the original node for the call, to preserve
12773         Original_Node pointers within the resolved operands, given that
12774         they may have been rewritten as well. Previous approach copied
12775         the operands into a new tree and lost those pointers.
12777 2014-01-27  Claire Dross  <dross@adacore.com>
12780         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
12782 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12784         * sem_util.adb (Check_Internal_Protected_Use): A call through
12785         an anonymous access parameter of the current protected function
12786         is not a potential modification of the current object.
12788 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12790         * a-cobove.adb (Reserve_Capacity): Procedure raises
12791         Capacity_Error, not Constraint_Error, when request cannot be
12792         satisfied.
12794 2014-01-27  Vincent Celier  <celier@adacore.com>
12796         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
12797         not the Target to itself.
12799 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12801         * exp_ch4.adb (Expand_Concatenate): If the target of the
12802         concatenation is a library-level entity, always use the off-line
12803         version of concatenation, regardless of optimization level. This
12804         is space-efficient, and prevents linking problems when some
12805         units are compiled with different optimization levels.
12807 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12809         * sem_ch5.adb: Code clean up.
12811 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12813         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
12814         when an array or container iterator includes a subtype indication,
12815         which is only legal in an element iterator.
12817 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12819         * exp_ch7.adb: Minor reformatting.
12821 2014-01-27  Robert Dewar  <dewar@adacore.com>
12823         * opt.adb (SPARK_Mode): Default for library units is None rather
12824         than Off.
12825         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
12826         no longer ordered.
12827         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
12828         possibility.
12829         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
12831 2014-01-27  Robert Dewar  <dewar@adacore.com>
12833         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
12834         Suspicious_Labels table if we have identifier; followed by loop
12835         or block.
12836         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
12837         * par.adb (Suspicious_Labels): New table.
12839 2014-01-27  Robert Dewar  <dewar@adacore.com>
12841         * exp_aggr.adb (Check_Bounds): Reason is range check, not
12842         length check.
12844 2014-01-27  Yannick Moy  <moy@adacore.com>
12846         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
12847         reference.
12848         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
12849         function now.
12850         (Add_SPARK_Xrefs): Include references to constants.
12851         * spark_xrefs.ads Document new character 'c' for references to
12852         constants.
12854 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12856         * exp_smem.adb (Add_Write_After): For a function call, insert write as
12857         an after action in a transient scope.
12859 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12861         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
12862         to a shared variable as an OUT formal in a call to an init proc,
12863         the 'Read call must be emitted after, not before, the call.
12865 2014-01-27  Robert Dewar  <dewar@adacore.com>
12867         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
12869 2014-01-27  Robert Dewar  <dewar@adacore.com>
12871         * a-wichha.adb (Character_Set_Version): Change to output proper
12872         value.
12874 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
12876         * einfo.adb (Is_Input_Only_State): Removed.
12877         (Is_Non_Volatile_State): Removed.
12878         (Is_Output_State): Removed.
12879         * einfo.ads (Is_Input_Only_State): Remove attribute and
12880         subprogram. Update related entity.
12881         (Is_Non_Volatile_State):
12882         Remove attribute and subprogram. Update related entity.
12883         (Is_Output_State): Removed attribute and subprogram. Update
12884         related entity.
12885         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
12886         generated code.
12887         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
12888         an object, not just variables.
12889         (Analyze_Object_Contract): New routine.
12890         (Analyze_Variable_Contract): Removed.
12891         (Process_Discriminants): Detect an illegal use of volatile
12892         discriminant in SPARK mode.
12893         * sem_ch5.adb (Analyze_Iterator_Specification):
12894         Detect an illegal use of volatile loop variable.
12895         (Analyze_Loop_Parameter_Specification): Detect an illegal use
12896         of volatile loop variable.
12897         * sem_ch6.adb (Process_Formals): Update the volatile object
12898         detection. Detect an illegal formal of mode IN OUT or OUT in
12899         SPARK mode. Enhance the error messages with references.
12900         * sem_ch12.adb (Instantiate_Object): Update the volatile object
12901         detection. Enhance the error messages with references.
12902         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
12903         messages with references.
12904         (Analyze_Contract_Case): Enhance the error messages with references.
12905         (Analyze_External_Property): Call Check_Duplicate_Property to process
12906         an external property.
12907         (Analyze_External_Property_In_Decl_Part): New routine.
12908         (Analyze_External_State_In_Decl_Part): Removed.
12909         (Analyze_Global_Item): Detect an illegal
12910         use of a volatile constant. Detect an illegal use
12911         of a variable with enabled Effective_Reads. Enhance
12912         the error messages with references. Remove obsolete
12913         checks concerning Input_Only and Output_Only states.
12914         (Analyze_Initialization_Item): Enhance the error messages
12915         with references.
12916         (Analyze_Initializes_In_Decl_Part): Do not
12917         collect the states and variables when the initialization list
12918         is null.
12919         (Analyze_Input_Item): Enhance the error messages with references.
12920         (Analyze_Input_Output): Enhance the error messages with references.
12921         (Analyze_Pragma): Enhance the error messages with references.
12922         (Analyze_Refinement_Clause): Code reformatting.
12923         (Analyze_Refined_Depends_In_Decl_Part):
12924         Rename global variable Global to Reg_Global and update all
12925         occurrences. Add local variables D7 and D8. Update the error
12926         messages with references. Update the call to Collect_Global_Items.
12927         (Analyze_Refined_Global_In_Decl_Part): Add local variables
12928         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
12929         the call to Collect_Global_Items.  Account for a Proof_In state
12930         in null / useless refinement checks. Verify the coverage of
12931         Proof_In states.
12932         (Check_Dependency_Clause): Remove local variable
12933         Out_Constits. Remove the retrieval and removal of constituents
12934         for an Output_Only state. Remove the reporting of unused
12935         Output_Only state constituents.
12936         (Check_Duplicate_Mode): Enhance
12937         the error message with a reference.
12938         (Check_Duplicate_Property): New routine.
12939         (Check_Duplicate_Option): Enhance the error message with a reference.
12940         (Check_External_Properties): Enhance the error message with a reference.
12941         (Check_Function_Return): Enhance the error message with a reference.
12942         (Check_In_Out_States): Update
12943         comment on usage. Add a specialized error message for Proof_In
12944         constituents. Enhance the error message with a reference.
12945         (Check_Input_States): Update comment on usage. Account for
12946         possible Proof_In constituents. Enhance the error message
12947         with a areference.
12948         (Check_Matching_Constituent): Enhance the error message with a
12949         reference.
12950         (Check_Matching_State): Enchance the error message with a reference.
12951         (Check_Mode): Add local variable From_Global. Update the call to
12952         Find_Mode.  Emit more precise error messages concerning extra items
12953         (Check_Mode_Restriction_In_Enclosing_Context): Consider
12954         pragma Refined_Global.  Enhance the error message with a
12955         reference.
12956         (Check_Mode_Restriction_In_Function): Enhance the error message with
12957         a reference.
12958         (Check_Output_States): Update comment on usage. Add local variable
12959         Posted.  Account for possible Proof_In constituents. Produce a detailed
12960         list of missing constituents.
12961         (Check_Proof_In_States): New routine.
12962         (Check_Refined_Global_Item): Handle Proof_In
12963         constituents. Enchance the error message with a reference.
12964         (Collect_Global_Items): Add formal parameters Proof_In_Items
12965         and Has_Proof_In_State. Update the comment on usage. Account
12966         for Proof_In items.
12967         (Create_Or_Modify_Clause): Enchance
12968         the error message with a reference.
12969         (Find_Mode): Add
12970         formal parameter From_Global. Update the comment on usage.
12971         Detect when the mode is governed by pragma [Refined_]Global.
12972         (Output_Constituents): Removed.
12973         (Report_Extra_Constituents):
12974         Report extra Proof_In constituents.
12975         (Report_Unused_Constituents): Removed.
12976         (Usage_Error): Code reformatting. Enhance the error
12977         messages with reference.
12978         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
12979         (Analyze_External_State_In_Decl_Part): Removed.
12980         * sem_res.adb (Resolve_Actuals): Update the volatile object
12981         detection. Enhance the error message with a reference.
12982         (Resolve_Entity_Name): Update the volatile object
12983         detection. Enhance the error message with a reference.
12984         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
12985         (Is_SPARK_Volatile_Object): New routine.
12986         (Has_Volatile_Component): New routine.
12987         * sem_util.ads (Is_Delegate): Alphabetized.
12988         (Is_SPARK_Volatile_Object): New routine.
12989         (Has_Volatile_Component): New routine.
12990         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
12992 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12994         * sem_attr.adb: Resolve fully prefix of 'Update.
12996 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
12998         * gnat_rm.texi: Minor clarifications.
13000 2014-01-27  Robert Dewar  <dewar@adacore.com>
13002         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
13003         about call that is generated as part of an Initial_Condition
13004         check.
13005         * sem_prag.adb: Minor spelling correction.
13007 2014-01-27  Robert Dewar  <dewar@adacore.com>
13009         * sem_prag.adb (Set_Convention_From_Pragma): Check that
13010         convention Ghost can only apply to functions.
13011         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
13013 2014-01-27  Robert Dewar  <dewar@adacore.com>
13015         * gnat_ugn.texi: Add Short_Enums to documentation of
13016         -gnatet/-gnateT.
13018 2014-01-27  Robert Dewar  <dewar@adacore.com>
13020         * sem_prag.adb (Analyze_Input_Item): Correct check for input
13021         item in same package.
13022         * sem_util.ads, sem_util.adb (Within_Scope): New function.
13024 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
13026         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
13027         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
13028         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
13029         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
13030         maintained.
13032 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13034         * gcc-interface/Makefile.in: Fix oversight.
13036 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13038         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
13039         conversion from a thin pointer with a shifted value.
13040         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
13041         read-only flag from the values onto the result.
13042         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
13044 2014-01-25  Tristan Gingold  <gingold@adacore.com>
13046         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
13047         for E_Variable with a pragma Linker_Section.
13049 2014-01-25  Robert Dewar  <dewar@adacore.com>
13051         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
13052         with Default_Value aspect is passed in by copy.
13054 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13056         * set_targ.adb: Set Short_Enums.
13057         * gcc-interface/lang.opt (fshort-enums): New option.
13058         * gcc-interface/misc.c (gnat_handle_option): Handle it.
13059         (gnat_post_options): Do not modify the global settings.
13061 2014-01-24  Robert Dewar  <dewar@adacore.com>
13063         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
13064         function.
13065         (Random_Decimal_Fixed): New generic function.
13066         * s-rannum.ads: Minor comment clarifications.
13068 2014-01-24  Robert Dewar  <dewar@adacore.com>
13070         * back_end.adb: Remove Short_Enums handling (handled in
13071         Ttypes/Get_Targ now) Minor added comments.
13072         * freeze.adb: Change name Short_Enums_On_Target to
13073         Target_Short_Enums.
13074         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
13075         * opt.ads: Minor comment updates.
13076         * sem_ch13.adb: Change name Short_Enums_On_Target to
13077         Target_Short_Enums.
13078         * set_targ.adb: Set Short_Enums from gcc back end.
13079         * set_targ.ads (Short_Enums): New variable.
13080         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
13081         Ttypes/Get_Targ now).
13082         * ttypes.ads (Target_Short_Enums): New constant boolean switch
13084 2014-01-24  Pascal Obry  <obry@adacore.com>
13086         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
13088 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
13090         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
13091         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
13092         stripped off.
13094 2014-01-24  Robert Dewar  <dewar@adacore.com>
13096         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
13098 2014-01-24  Vincent Celier  <celier@adacore.com>
13100         * prj.adb (Add_Aggregated_Project): Do not add a project in
13101         the list if it is already there.
13103 2014-01-24  Yannick Moy  <moy@adacore.com>
13105         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
13106         Correct the search for a subrogram declaration to which a pragma is
13107         attached.
13109 2014-01-24  Bob Duff  <duff@adacore.com>
13111         * gnat_ugn.texi: Document --decimal-grouping and
13112         --based-grouping switches in gnatpp.
13114 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13116         * sinfo.ads: Documentation update.
13118 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13120         * sem_ch3.adb (Constant_Redeclaration): New declaration is
13121         illegal if previous one has an initial expression that is an
13122         aggregate expanded into assignments.
13124 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13126         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
13127         code reorganization to remove spurious warning on a loop with
13128         an array element iterator that has a null range.
13130 2014-01-24  Vincent Celier  <celier@adacore.com>
13132         * make.adb (Binding_Phase): When setting the Ada paths, use
13133         the library ALI dir, not the object dir in libraries.
13135 2014-01-24  Yannick Moy  <moy@adacore.com>
13137         * sinfo.ads: Add documentation of check flag fields.
13139 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13141         * sem_res.adb (Resolve_Actuals): If an actual is a view
13142         conversion of a discriminated object, and the formal type is
13143         discriminated and constrained, apply a discriminant check to
13144         the object itself.
13146 2014-01-24  Robert Dewar  <dewar@adacore.com>
13148         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
13150 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13152         * sem_ch3.adb (Analyze_Declarations): At the end of an
13153         appropriate declarative part, call Freeze_All from the first
13154         declaration in the scope, not from the first unfrozen one. This
13155         is necessary to apply visibility checks to entities with delayed
13156         aspects. Otherwise, in the presence of instantiations and cleanups
13157         that they may generate, the delayed aspects may be analyzed too
13158         late and produce spurious visibility errors.
13159         * sem_attr.adb: Place etype on range.
13160         * sem_ch6.adb: Documentation expression functions.
13162 2014-01-24  Robert Dewar  <dewar@adacore.com>
13164         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
13165         terminology in compiler).
13167 2014-01-24  Robert Dewar  <dewar@adacore.com>
13169         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
13170         categories, now that Ada 95 supports raise expressions.
13172 2014-01-24  Robert Dewar  <dewar@adacore.com>
13174         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
13175         Short_Enums_On_Target.
13176         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
13177         into account.
13178         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
13180 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13182         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
13183         indication is given explicity, check that it matches the array
13184         component type or the container element type of the domain
13185         of iteration.
13187 2014-01-24  Tristan Gingold  <gingold@adacore.com>
13189         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
13190         * gcc-interface/misc.c (flag_short_enums): Declare.
13191         (gnat_post_options): Set it.
13193 2014-01-24  Vincent Celier  <celier@adacore.com>
13195         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
13196         to cache the result when Including_Libraries is False.
13197         * prj-env.ads (Ada_Objects_Path): Update documentation
13198         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
13199         (Get_Object_Directory): Return the Library_Ali_Dir only when
13200         when Including_Libraries is True.
13201         * prj.ads (Get_Object_Directory): Fix and complete documentation
13202         (Project_Data): New component Ada_Objects_Path_No_Libs
13204 2014-01-24  Robert Dewar  <dewar@adacore.com>
13206         * checks.adb (Expr_Known_Valid): Result of fpt operator never
13207         considered valid.
13209 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13211         * back_end.adb: Minor fix in comment.
13213 2014-01-24  Javier Miranda  <miranda@adacore.com>
13215         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
13216         required to report the error in case of task types.
13218 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13220         * sem_attr.adb: Additional index checking.
13222 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13224         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
13225         expressions in each component association, and for records note
13226         the entity in each association choice, for subsequent resolution.
13227         (Resolve_Attribute, case 'Update): Complete resolution of
13228         expressions in each component association.
13230 2014-01-24  Robert Dewar  <dewar@adacore.com>
13232         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
13233         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
13234         leading to wrong handling of SPARK_Mode for library units).
13236 2014-01-24  Robert Dewar  <dewar@adacore.com>
13238         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
13239         on generic instances (do not consider them to be internally
13240         generated)
13242 2014-01-24  Doug Rupp  <rupp@adacore.com>
13244         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
13245         vice pthread_sigmask.
13247 2014-01-24  Vincent Celier  <celier@adacore.com>
13249         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
13250         not default.
13252 2014-01-24  Vincent Celier  <celier@adacore.com>
13254         * prj-ext.adb (Add): Do not output anything when Silent is True,
13255         whatever the verbosity. When Source is From_External_Attribute,
13256         set the corresponding environment variable if it is not already set.
13257         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
13258         to False
13259         * prj-proc.adb (Process_Expression_For_Associative_Array):
13260         For attribute External, call Prj.Ext.Add with Silent set to
13261         True for the child environment, to avoid useless output in non
13262         default verbosity.
13264 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13266         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
13267         range given by a subtype indication, and force evaluation of
13268         the bounds, as for a simple range.
13269         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
13270         of bounds of slice for various kinds of discrete ranges.
13271         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
13272         Evaluate_Slice_Bounds.
13274 2014-01-24  Bob Duff  <duff@adacore.com>
13276         * s-taskin.ads (Activator): Make this Atomic, because
13277         Activation_Is_Complete reads it, and that can be called
13278         from any task. Previously, this component was only
13279         modified by the activator before activation, and by
13280         Self after activation.
13281         * a-taside.ads, a-taside.adb (Environment_Task,
13282         Activation_Is_Complete): Implement these missing functions.
13284 2014-01-24  Doug Rupp  <rupp@adacore.com>
13286         * init.c: Add a handler section for Android.
13288 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
13290         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
13292 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13294         * sem_ch4.adb (Operator_Check): If one operand is a
13295         Raise_Expression, set its type to that of the other operand.
13296         * sem_res.adb (Resolve_Raise_Expression): new procedure.
13297         (Resolve_Actuals): For an actual that is a Raise_Expression,
13298         set the type to that of the formal.
13299         * sem_type.adb (Find_Unique_Type): If one of the operands is a
13300         Raise_Expression, return type of the other operand.
13302 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13304         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
13305         component of the record has a type with a default aspect, and
13306         the corresponding aggregate component is initiaized with a box,
13307         use the default value in the rewritten aggregate.
13309 2014-01-24  Tristan Gingold  <gingold@adacore.com>
13311         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
13312         s-interr-sigaction.adb,
13313         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
13314         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
13315         to the call to Install_Restricted_Handlers.
13317 2014-01-24  Emmanuel Briot  <briot@adacore.com>
13319         * prj-nmsc.adb (Check_File): Add protection when the source is
13320         not fully initialized.
13322 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13324         * sem_util.adb (Is_Post_State): In a postcondition, a selected
13325         component that denotes an implicit dereference is a reference
13326         to the post state of the subprogram.
13328 2014-01-24  Robert Dewar  <dewar@adacore.com>
13330         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
13331         for generated subprograms.
13332         (Analyze_Subprogram_Specification): Ditto.
13334 2014-01-24  Vincent Celier  <celier@adacore.com>
13336         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
13337         attributes in package Builder of aggregate and aggregate library
13338         projects.
13339         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
13340         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
13341         Remove parameters.  Change error message from "... externally
13342         build library ..." to "... externally built project ...".
13343         (Process_Naming_Scheme.Check): Do not do any check in aggregate
13344         project, as attribute Library_Dir and Library_Name have already
13345         been detected as forbidden.
13347 2014-01-24  Vincent Celier  <celier@adacore.com>
13349         * prj-env.adb (Find_Project): If cached project path is not in
13350         project directory, look in current directory first and use cached
13351         project path only if project is not found in project directory.
13353 2014-01-24  Robert Dewar  <dewar@adacore.com>
13355         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
13357 2014-01-24  Vincent Celier  <celier@adacore.com>
13359         * projects.texi: Document that aggregate projects are only
13360         supported by gprbuild, but not by gnatmake.  Document that the
13361         only attribute Switches in package Binder of aggregate projects
13362         will be ignored if its index is not others.  Document that
13363         attribute Global_Config_File is allowed in package Binder of
13364         aggregate projects.
13366 2014-01-24  Robert Dewar  <dewar@adacore.com>
13368         * sem_prag.adb: Minor code reorganization.
13369         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
13371 2014-01-24  Pascal Obry  <obry@adacore.com>
13373         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
13374         attribute definition.
13376 2014-01-24  Vincent Celier  <celier@adacore.com>
13378         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
13379         in the Queue the same source (same path, same multi-source index)
13380         from the same project file, to avoid compiling several times
13381         the same source.
13383 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13385         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
13386         (Has_Gigi_Rep_Item): Likewise.
13387         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
13388         Has_Gigi_Rep_Item for objects.
13389         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
13390         (prepend_one_attribute): ...this.
13391         (prepend_one_attribute_pragma): New function extracted from...
13392         (prepend_attributes): ...here.  Swap the parameters for consistency.
13393         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
13394         prepend_attributes.
13395         <object>: Deal with a pragma Linker_Section on a constant
13396         or variable.  <E_Function>: Deal with a pragma Linker_Section
13397         on a subprogram.
13398         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
13400 2014-01-24  Vincent Celier  <celier@adacore.com>
13402         * opt.ads: Minor comment update.
13404 2014-01-24  Robert Dewar  <dewar@adacore.com>
13406         * sem_prag.adb (Analyze_Input_Output): Add missing error check
13407         for junk operand.
13408         * sem_util.adb (Is_Refined_State): Add defense against junk
13409         tree from error.
13411 2014-01-24  Pascal Obry  <obry@adacore.com>
13413         * projects.texi: Removes Build_Slaves attribute documentation.
13415 2014-01-23  Robert Dewar  <dewar@adacore.com>
13417         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
13418         setting.
13420 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13422         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
13423         applies to expressions that come from source.
13424         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
13425         message.
13426         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
13427         rule regarding potentially unevaluated expressions, to prefix
13428         of attribute.
13430 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13432         * exp_util.adb (Make_Invqriant_Call): If type of expression is
13433         a private extension, get invariant from base type.
13435 2014-01-23  Robert Dewar  <dewar@adacore.com>
13437         * sem_util.adb, sem_attr.adb: Minor reformatting.
13439 2014-01-23  Robert Dewar  <dewar@adacore.com>
13441         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
13442         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
13443         * sem.adb (Semantics): Remove save/restore of
13444         SPARK_Mode[_Pragma]. Not needed since already done in
13445         Save/Restore_Opt_Config_Switches.
13447 2014-01-23  Robert Dewar  <dewar@adacore.com>
13449         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
13450         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
13451         Linker_Section enhancements.
13453 2014-01-23  Tristan Gingold  <gingold@adacore.com>
13455         * gnat_rm.texi: Minor editing.
13457 2014-01-23  Robert Dewar  <dewar@adacore.com>
13459         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
13460         with'ed internal units.
13461         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
13463 2014-01-23  Javier Miranda  <miranda@adacore.com>
13465         * lib-xref.adb (Generate_Reference): As part of processing the
13466         "end-of-spec" reference generate an extra reference to the first
13467         private entity of the package.
13468         * xr_tabls.adb (Add_Reference): No action needed for the extra
13469         'E' reference associated; similar to the processing of the
13470         'e' reference.
13472 2014-01-23  Bob Duff  <duff@adacore.com>
13474         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
13476 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13478         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
13479         predicate to implement rule given in 6.1.1 (20/3).
13480         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
13481         'Old in a postcondition, if it is potentially unevaluated and
13482         it is not an entity name.
13484 2014-01-23  Bob Duff  <duff@adacore.com>
13486         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
13488 2014-01-23  Robert Dewar  <dewar@adacore.com>
13490         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
13491         msg on VMS.
13493 2014-01-23  Bob Duff  <duff@adacore.com>
13495         * g-dynhta.ads: Minor comment fix.
13497 2014-01-23  Yannick Moy  <moy@adacore.com>
13499         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
13500         from spec on body only when not already inherited on spec. Set
13501         SPARK_Mode from context on body without previous spec.  *
13502         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
13503         library-level entities.  Correct retrieval of entity from
13504         declaration, for cases where the declaration is not a unit.
13505         * sem_ch12.adb (Instantiate_Object): Avoid
13506         calling Is_Volatile_Object on an empty node.
13508 2014-01-23  Robert Dewar  <dewar@adacore.com>
13510         * gnatlink.adb (Gnatlink): Check for suspicious executable file
13511         names on windows.
13513 2014-01-23  Robert Dewar  <dewar@adacore.com>
13515         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
13516         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
13517         style errors in instances.
13518         * g-dynhta.ads (Static_HTable): Comment updates.
13520 2014-01-23  Vincent Celier  <celier@adacore.com>
13522         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
13523         to find a configuration project file when Config_File_Name is
13524         No_Configuration_File.
13525         * prj-conf.ads (No_Configuration_File): New constant String.
13526         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
13527         with Config_File_Name set to No_Configuration_File, so that
13528         no existing configuration project file will be used, and the
13529         configuration project will be only created in memory when
13530         Add_Default_GNAT_Naming_Scheme is called.
13531         * projects.texi: Minor reformatting.
13533 2014-01-23  Vincent Celier  <celier@adacore.com>
13535         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
13536         a config project file if On_Load_Config is not null.
13537         * prj-pars.adb: Minor comment changes.
13539 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13541         * lib-xref.adb (Output_References): Output progenitors of
13542         synchronized tagged types, for source navigation.
13544 2014-01-23  Robert Dewar  <dewar@adacore.com>
13546         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
13547         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
13548         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
13550 2014-01-23  Emmanuel Briot  <briot@adacore.com>
13552         * prj-conf.adb (Get_Or_Create_Configuration_File): call
13553         On_Load_Config later.
13555 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
13557         * sem_ch3.adb (Analyze_Declarations): Do not
13558         generate the spec of the late primitive in ASIS mode. Add two
13559         comments to explain the special cases when the expansion is
13560         not performed.
13562 2014-01-23  Robert Dewar  <dewar@adacore.com>
13564         * sem_util.adb (Note_Possible_Modification): Fix error of
13565         misbehaving for implicit dereference cases in -gnatc mode.
13567 2014-01-23  Emmanuel Briot  <briot@adacore.com>
13569         * prj-pars.adb: Minor reformatting.
13571 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13573         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
13574         body generated for an expression function within a protected body
13575         needs a set of renaming declarations if the expression function
13576         comes from source.
13578 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13580         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
13581         list interface progenitor of a tagged concurrent type, for better
13582         source navigation.
13584 2014-01-22  Robert Dewar  <dewar@adacore.com>
13586         * lib.adb (In_Extended_Main_Code_Unit): Return False for
13587         Standard_Location.
13588         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
13589         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
13590         treatment of Slocs No_Location and Standard_Location.
13591         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
13592         check for entity with Standard_Location Sloc, rather than relying
13593         on Lib routines to do that.
13594         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
13595         that a call cannot occur before a later occuring body within
13596         the same unit.
13598 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13600         * rtsfind.adb: Update comment.
13602 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
13604         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
13605         * sem_ch3.adb (Analyze_Declarations): Add local variable
13606         Body_Seen. Generate the spec of a late controlled
13607         primitive body that is about to freeze its related type.
13608         (Handle_Late_Controlled_Primitive): New routine.
13610 2014-01-22  Robert Dewar  <dewar@adacore.com>
13612         * a-stream.adb: Minor reformatting.
13614 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13616         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
13617         sub-procedure Declared_In_Actual to handle properly the visibility
13618         of actuals in actual packages, that are themselves actuals to a
13619         actual package of the current instance. This mimics properly the
13620         visibility of formals of formal packages declared with a box,
13621         within the corresponding generic unit.
13623 2014-01-22  Robert Dewar  <dewar@adacore.com>
13625         * checks.adb: Do not assume that a volatile variable is valid.
13627 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13629         * g-catiio.ads (Image, Value): Clarify that these functions
13630         operate in the local time zone.  Minor documentation update.
13632 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13634         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
13636 2014-01-22  Robert Dewar  <dewar@adacore.com>
13638         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
13639         Moved to sem_aux.adb.
13641 2014-01-22  Robert Dewar  <dewar@adacore.com>
13643         * vms_data.ads: Minor reformatting.
13645 2014-01-22  Robert Dewar  <dewar@adacore.com>
13647         * debug.adb: Document messages affected by -gnatd.E including
13648         the new ones that relate to late definition of equality.
13649         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
13650         debug flag -gnatd.E is set, then generate warnings rather than
13651         errors.
13652         (Check_Untagged_Equality): In earlier versions of Ada,
13653         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
13655 2014-01-22  Robert Dewar  <dewar@adacore.com>
13657         * sem_prag.adb (Usage_Error): Output additional messages for
13658         unconstrained OUT parameters lacking an input dependency.
13660 2014-01-22  Robert Dewar  <dewar@adacore.com>
13662         * sem_ch4.adb: Minor reformatting.
13664 2014-01-22  Robert Dewar  <dewar@adacore.com>
13666         * restrict.ads: Minor reformatting.
13667         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
13668         forbids a call from within a subprogram to the same subprogram.
13670 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13672         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
13673         stream attributes for Stream_Element_Array.
13674         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
13675         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
13676         defined in the current scope.
13678 2014-01-22  Robert Dewar  <dewar@adacore.com>
13680         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
13682 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13684         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
13686 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13688         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
13689         declaration initialized with a function call, whose type
13690         has variable size, need to remove side effects so that the
13691         initialization expression becomes a dereference of a temporary
13692         reference to the function result.
13694 2014-01-22  Yannick Moy  <moy@adacore.com>
13696         * errout.adb (Initialize): Remove trick to add dummy entry
13697         in Warnings table.
13698         * erroutc.adb (Set_Warnings_Mode_Off,
13699         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
13700         command line switch.
13701         * opt.ads (Warning_Mode): Document behavior
13702         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
13704 2014-01-22  Robert Dewar  <dewar@adacore.com>
13706         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
13708 2014-01-22  Robert Dewar  <dewar@adacore.com>
13710         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
13711         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
13712         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
13713         case Storage_Size): call Check_Pool_Size_Clash.
13715 2014-01-22  Robert Dewar  <dewar@adacore.com>
13717         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
13718         sem_eval.ads: Minor reformatting.
13720 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13722         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
13723         Any_Composite to prevent cascaded errors.
13725 2014-01-22  Yannick Moy  <moy@adacore.com>
13727         * errout.adb (Initialize): Do not insert special entry in Warnings
13728         table in GNATprove_Mode.
13729         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
13730         GNATprove_Mode.
13731         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
13732         warnings anymore.
13734 2014-01-22  Robert Dewar  <dewar@adacore.com>
13736         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
13737         initializes case.
13739 2014-01-22  Robert Dewar  <dewar@adacore.com>
13741         * snames.ads-tmpl: Update header.
13743 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13745         * exp_util.adb (Insert_Actions): When inserting actions on a
13746         short circuit operator that has already been analyzed, do not park
13747         actions in node; instead introduce an N_Expression_With_Actions
13748         and insert actions immediately.
13749         Add guard for unexpected case of climbing up through statement
13750         in Actions list of an N_Expression_With_Actions.
13751         * sem_elab.adb (Insert_Elab_Check): Remove complex
13752         specialized circuitry for the case where the context is already
13753         analyzed, as it is not needed and introduces irregularities in
13754         finalization. Instead rely on the above change to Insert_Actions
13755         to ensure that late insertion on short circuit operators works
13756         as expected.
13758 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13760         * sem_ch4.adb (Operator_Check): Improve error message when an
13761         operand of concatenation is an access type.
13763 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13765         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
13766         cascaded error.
13768 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13770         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
13771         of an expanded name in a proper body, whose prefix is a package
13772         in the context of the proper body, when there is a homonym of
13773         the package declared in the parent unit.
13775 2014-01-22  Robert Dewar  <dewar@adacore.com>
13777         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
13778         msg if errors found.
13779         (Check_One_Unit): Same change.
13781 2014-01-22  Robert Dewar  <dewar@adacore.com>
13783         * ug_words: Add missing/wrong entries for VMS warning switches.
13784         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
13786 2014-01-22  Jerome Guitton  <guitton@adacore.com>
13788         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
13789         arm.
13791 2014-01-22  Robert Dewar  <dewar@adacore.com>
13793         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
13795 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
13797         * gcc-interface/Makefile.in: Minor fixes.
13799 2014-01-21  Robert Dewar  <dewar@adacore.com>
13801         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
13802         * par-ch5.adb (P_Condition): New version with expression prescanned.
13803         * par.adb (P_Condition): New version with expression prescanned.
13805 2014-01-21  Robert Dewar  <dewar@adacore.com>
13807         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
13808         if Address is not a private type.
13809         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13810         Ignore pragma if System.Address is not a private type.
13812 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13814         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
13815         uninitialized value.
13817 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13819         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
13821 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13823         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
13824         the value of Assertions_Enabled flag when compiling an instance of
13825         an internal unit. This facilitates the use of pre/postconditions
13826         in generic internal units, such as the new elementary function
13827         libraries.
13829 2014-01-21  Robert Dewar  <dewar@adacore.com>
13831         * exp_aggr.adb: Minor reformatting.
13832         * sem_attr.adb: Minor reformatting.
13833         * sem_res.adb: Minor comment addition.
13834         * einfo.adb: Minor comment updates.
13835         * freeze.adb: Minor reformatting and code reorganization.
13837 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13839         * par-ch4.adb (P_If_Expression): Handle more gracefully an
13840         elsif clause that does not have an else part.
13842 2014-01-21  Robert Dewar  <dewar@adacore.com>
13844         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
13845         * gcc-interface/Makefile.in: clean up target pairs.
13847 2014-01-21  Pascal Obry  <obry@adacore.com>
13849         * projects.texi: Minor typo fix.
13851 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13853         * freeze.adb (Check_Component_Storage_Order): If a record type
13854         has an explicit Scalar_Storage_Order attribute definition clause,
13855         reject any component that itself is of a composite type and does
13856         not have one.
13858 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13860         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
13861         can be used to generate proper cross-reference information for
13862         the parent units of proper bodies.
13864 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13866         * exp_pakd.adb (Expand_Packed_Element_Set,
13867         Expand_Packed_Element_Reference): No byte swapping required in
13868         the front-end for the case of a reverse storage order array,
13869         as this is now handled uniformly in the back-end.  However we
13870         still need to swap back an extracted element if it is itself a
13871         nested composite with reverse storage order.
13873 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13875         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
13876         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
13877         include "others".
13879 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13881         * gnat_ugn.texi: Minor updates.
13883 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13885         * exp_pakd.adb: Update comment, minor reformatting.
13887 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13889         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
13890         object check when SPARK_Mode is on.
13891         * sem_ch6.adb (Process_Formals): Trigger the volatile object
13892         check when SPARK_Mode is on.
13893         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
13894         check when SPARK_Mode is on.
13895         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
13896         corresponding pragma of aspect SPARK_Mode in the visible
13897         declarations of a package declaration.
13898         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
13899         check when SPARK_Mode is on.
13900         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
13901         check when SPARK_Mode is on.
13902         (Resolve_Entity_Name): Trigger
13903         the volatile object check when SPARK_Mode is on.
13905 2014-01-21  Robert Dewar  <dewar@adacore.com>
13907         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
13908         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
13910 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13912         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
13913         object is declared, it is rewritten as a renaming of an dynamic
13914         expression that wraps the initial value.  The renaming declaration
13915         is first given an internal name, to prevent collisions with the
13916         entity already declared, and then the name is modified to reflect
13917         the original one. the modification of the name must preserve
13918         the source location of the original, to prevent spurious errors
13919         when compiling with style checks if the declaration involves
13920         more than one entity.
13922 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13924         * aspects.adb Add entries for Async_Readers, Async_Writers,
13925         Effective_Reads and Effective_Writes in table Canonical_Aspect.
13926         * aspects.ads Add entries for Async_Readers, Async_Writers,
13927         Effective_Reads and Effective_Writes in tables Aspect_Id,
13928         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
13929         * atree.adb (Ekind_In): New version with 8 parameters.
13930         (Node34): New routine.
13931         (Set_Node34): New routine.
13932         * atree.ads (Ekind_In): New version with 8 parameters.
13933         (Node34): New routine.
13934         (Set_Node34): New routine.
13935         * einfo.adb Contract is now Node34.
13936         (Contract): Update the assertion and node usage.
13937         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
13938         Effective_Reads and Effective_Writes.
13939         (Set_Contract): Update the assertion and node usage.
13940         (Write_Field24_Name): Remove the output for a contract.
13941         (Write_Field34_Name): Add output for a contract.
13942         * einfo.ads Contract is now Node34. Update the comment on
13943         attribute usage and related node structures.
13944         (Get_Pragma): Update the comment on usage.
13945         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
13946         Effective_Reads and Effective_Writes do not require special
13947         processing by the parser.
13948         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
13949         (Analyze_Declarations): Analyze the contract of a variable at
13950         the end of the declarative region.
13951         (Analyze_Object_Declaration): Create a contract for a variable.
13952         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
13953         of classification pragmas.
13954         (Process_Formals): Detect an illegal
13955         use of a volatile object as a formal in a function.
13956         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
13957         a volatile object as an actual in generic instantiation.
13958         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
13959         Effective_Reads and Effective_Writes in table Sig_Flags.
13960         (Analyze_External_State_In_Decl_Part): New routine.
13961         (Analyze_Global_Item): Detect an illegal use of a volatile object
13962         as a global item of a function.
13963         (Analyze_Pragma): Reimplement
13964         pragma Abstract_State. Add support for pragmas Async_Readers,
13965         Async_Writers, Effective_Reads and Effective_Writes.
13966         (Check_External_Properties): New routine.
13967         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
13968         (Check_External_Properties): New routine.
13969         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
13970         volatile object as an actual in a call.
13971         (Resolve_Entity_Name):
13972         Add local variables Par, Prev and Usage_OK. Detect illegal
13973         contexts of volatile objects.
13974         * sem_util.adb (Add_Contract_Item): Add support for
13975         pragmas associated with the contract of a variable.
13976         (Async_Readers_Enabled): New routine.
13977         (Async_Writers_Enabled): New routine.
13978         (Effective_Reads_Enabled): New routine.
13979         (Effective_Writes_Enabled): New routine.
13980         (Has_Enabled_Property):
13981         New routine.
13982         (Is_Unchecked_Conversion_Instance): New routine.
13983         (Is_Volatile_Object): Add support for entities that may denote
13984         a volatile object.
13985         * sem_util.ads (Add_Contract_Item): Update the
13986         comment on usage.
13987         (Async_Readers_Enabled): New routine.
13988         (Async_Writers_Enabled): New routine.
13989         (Effective_Reads_Enabled): New routine.
13990         (Effective_Writes_Enabled): New routine.
13991         (Is_Unchecked_Conversion_Instance): New routine.
13992         * sinfo.ads Update the comment on the structure of N_Contract.
13993         * snames.ads-tmpl Add predefined names for Async_Readers,
13994         Async_Writers, Effective_Reads and Effective_Writes. Add
13995         pragma ids for Async_Readers, Async_Writers, Effective_Reads
13996         and Effective_Writes.
13998 2014-01-21  Robert Dewar  <dewar@adacore.com>
14000         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
14001         * sem_eval.adb (Compile_Time_Known_Value): Remove special
14002         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
14003         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
14004         (Test_Foldable): Add CRT_Safe parameter
14005         * sem_eval.ads (Compile_Time_Known_Value): Remove special
14006         handling of CRT mode.
14007         (CRT_Safe_Compile_Time_Known_Value): New function.
14009 2014-01-21  Robert Dewar  <dewar@adacore.com>
14011         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
14012         with pragma or aspect that applies to package spec or subprogram
14013         spec.
14015 2014-01-21  Robert Dewar  <dewar@adacore.com>
14017         * exp_aggr.adb: Minor reformatting.
14019 2014-01-21  Johannes Kanig  <kanig@adacore.com>
14021         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
14023 2014-01-21  Bob Duff  <duff@adacore.com>
14025         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
14027 2014-01-21  Steve Baird  <baird@adacore.com>
14029         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
14031 2014-01-21  Vincent Celier  <celier@adacore.com>
14033         * prj-part.adb (Parse_Single_Project): Accept to extend a project
14034         if it has only be imported by an project being extended. When a
14035         project that has only been imported by a project being extended
14036         is imported by another project that is not being extended,
14037         reset the previous indication, so that it will be an error if
14038         this project is extended later.
14039         * prj-tree.adb (Create_Project): Include component From_Extended
14040         in table Projects_HT
14041         * prj-tree.ads (Project_Name_And_Node): New Boolean component
14042         From_Extended
14044 2014-01-21  Robert Dewar  <dewar@adacore.com>
14046         * atree.ads, atree.adb: Add Node33 and Set_Node33.
14047         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
14048         New field (SPARK_Pragma_Inherited): New flag
14049         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
14050         Removed.
14051         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
14052         * opt.ads (SPARK_Mode_Pragma): New global variable.
14053         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
14054         * sem_ch3.adb: Use new SPARK_Mode data structures.
14055         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
14056         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
14057         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
14058         (Pop_Scope): Restore SPARK_Mode_Pragma.
14059         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
14060         new data structures.
14062 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14064         * back_end.adb: Undo previous change, not needed. Minor reformatting.
14066 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14068         * exp_ch5.adb: Fix comment.
14069         * switch-c.adb: Minor comment update.
14070         * exp_ch3.adb: Minor reformatting.
14072 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14074         * back_end.adb (Scan_Compiler_Arguments): Do not store object
14075         filename in gnatprove mode.
14077 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14079         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
14080         suppresses usage of primitive _assign for tagged types).
14081         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
14082         No_Ctrl_Actions for a tagged type that does not require
14083         finalization, as we want to disable usage of _assign (which
14084         may cause undesirable discriminant checks on an uninitialized,
14085         invalid target).
14087 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14089         * sem_prag.adb: Reject invariant'class on completion.
14091 2014-01-21  Javier Miranda  <miranda@adacore.com>
14093         * exp_ch3.adb (Build_Init_Procedure): For
14094         derivations of interfaces, do not move the the initialization
14095         of the _parent field since such assignment is not generated.
14097 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14099         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
14100         with the operator it renames if we are within an expression of
14101         a pre/postcondition, because the expression will be reanalyzed
14102         at a later point, and the analysis of the renaming may affect
14103         the visibility of the operator when in an instance.
14105 2014-01-21  Robert Dewar  <dewar@adacore.com>
14107         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
14108         Add this flag to type conversion nodes and assignment nodes.
14109         * treepr.adb: Deal properly with Flag 1,2,3.
14110         * treeprs.adt: Minor comment update.
14112 2014-01-21  Robert Dewar  <dewar@adacore.com>
14114         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
14115         parameter.
14116         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
14117         parameter, completely rewrite spec.
14119 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14121         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
14122         instance that is inlined, it may have been rewritten as a wrapper
14123         package. In that case the unit that must be made visible is the
14124         related instance of the package.
14126 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14128         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
14129         previous change in codepeer mode.
14131 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14133         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
14134         call to Abort_Undefer, as expected by the runtime.
14135         * s-tasren.adb (Local_Complete_Rendezvous): Replace
14136         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
14137         deferred at this point. Update comments.
14139 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14141         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
14143 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14145         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
14146         remove from doc.
14148 2014-01-21  Robert Dewar  <dewar@adacore.com>
14150         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
14152 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14154         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
14155         this is value is used in Node_Id arithmetic operations.
14156         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
14157         instead of hard-coded unrolled code.
14159 2014-01-21  Yannick Moy  <moy@adacore.com>
14161         * gnat1drv.adb: Minor code cleanup, removing useless code.
14163 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14165         * opt.ads (SPARK_Switches_File_Name): New.
14166         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
14167         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
14168         * gnat_ugn.texi: Document -gnates.
14170 2014-01-21  Yannick Moy  <moy@adacore.com>
14172         * errout.adb (Special_Msg_Delete): Update comment. Remove
14173         special case for GNATprove which should not ignore mismatch
14174         in sizes for representation clauses.
14175         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
14176         which should not ignore pragma Pack.
14178 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14180         * sem_ch4.adb: Code clean up.
14182 2014-01-21  Steve Baird  <baird@adacore.com>
14184         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
14186 2014-01-21  Robert Dewar  <dewar@adacore.com>
14188         * gcc-interface/gigi.h: Get Flags array address.
14189         * gcc-interface/trans.c: Acquire Flags array address.
14190         * atree.adb: Add support for Flags array and Flag0,1,2,3.
14191         * atree.ads: Add support for Flags array and Flag0,1,2,3.
14192         * atree.h: Add support for Flags array and Flag0,1,2,3.
14193         * back_end.adb: Pass Flags array address to gigi.
14195 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14197         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
14198         reference to generated body so that legality checks on stream
14199         attributes are properly applied. If type is tagged and already
14200         frozen, insert generated body at the point of the renaming
14201         declaration.
14203 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14205         * sem_ch12.adb: Code clean up.
14206         * sem_ch8.adb: Minor reformatting
14208 2014-01-20  Robert Dewar  <dewar@adacore.com>
14210         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
14211         converting warnings on inevitable exceptions to errors.
14212         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14213         converting warnings on inevitable exceptions to errors.
14214         * opt.adb (SPARK_Mode_Config): Handled like other config flags
14215         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
14216         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
14217         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
14218         New flag (Config_Switches_Type): Add SPARK_Mode field
14219         * sem.adb: Minor code reorganization (remove unnecessary with)
14220         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
14221         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14222         converting warnings on inevitable exceptions to errors.
14223         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14224         converting warnings on inevitable exceptions to errors.
14225         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
14226         converting warnings on inevitable exceptions to errors.
14227         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14228         converting warnings on inevitable exceptions to errors.
14229         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
14230         from spec if needed
14231         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
14232         from spec if needed
14233         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
14234         Restore SPARK_Mode
14235         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
14236         converting warnings on inevitable exceptions to errors.
14237         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
14238         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
14239         of Get_SPARK_Mode_Id
14240         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
14241         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
14242         converting warnings on inevitable exceptions to errors.
14243         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
14244         converting warnings on inevitable exceptions to errors.
14245         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
14246         SPARK_Mode_Type
14248 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14250         * sem_ch13.adb: Add semantic information to rewritten type
14251         reference.
14253 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14255         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
14256         are of a type with unknown discriminants, convert both to the
14257         underlying view of the type, so that the proper constraint check
14258         can be applied to the right-hand side.
14260 2014-01-20  Robert Dewar  <dewar@adacore.com>
14262         * atree.adb (Copy_Node): Fix failure to copy last component
14263         (Exchange_Entities): Fix failure to exchange last entity
14265 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14267         * sem_ch12.adb: Code clean up.
14269 2014-01-20  Robert Dewar  <dewar@adacore.com>
14271         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
14273 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14275         * sem_ch4.adb (Analyze_Quantified_Expression): If after
14276         pre-analysis  the loop parameter specification has been
14277         rewritten as a iterator specification, propagate the change to
14278         the quantified expression, for ASIS navigtion needs.
14280 2014-01-20  Vincent Celier  <celier@adacore.com>
14282         * par-ch10.adb: Minor error message change: escape [ and ].
14284 2014-01-20  Robert Dewar  <dewar@adacore.com>
14286         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
14287         * errout.adb: Implement [ and ] insertion characters.
14288         * errout.ads: Document new [ and ] insertion characters.
14289         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
14290         addition of ??? comment.
14291         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
14292         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
14293         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
14294         Make warnings on exceptions into errors in GNATprove mode.
14295         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
14296         in error messages.
14298 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14300         * sem_ch13.adb: Code clean up.
14302 2014-01-20  Robert Dewar  <dewar@adacore.com>
14304         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
14305         messages.
14306         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
14307         error in GNATprove mode.
14309 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14311         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
14312         reference 'Old takes no parameters, and thus can appear as a
14313         prefix of a slice.
14315 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14317         * exp_aggr.adb: Fix minor typos.
14319 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14321         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
14322         instance the attribute is legal, and its value is determined
14323         statically if the type has no discriminants. This choice is
14324         more useful than rechecking the legality rule in the instance,
14325         is consistent with older usage, and is also consistent with all
14326         existing tests.
14328 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14330         * sem_cat.adb (Validate_Static_Object_Name): Change error into
14331         warning in Relaxed_Semantic_Mode.
14333 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14335         * sem_attr.adb: Code and comments cleanup.
14337 2014-01-20  Yannick Moy  <moy@adacore.com>
14339         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
14340         * errout.adb (Compilation_Errors): Remove special handling in
14341         GNATprove mode.
14342         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
14343         removed debug flags.
14344         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
14345         Global, Initial_Condition, Initializes and Refined_State pragmas and
14346         aspects.
14347         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
14348         SPARK_Strict_Mode): Remove global flags.
14349         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
14350         always performed now, on packages declaring a null state.
14351         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
14352         at providing pedantic mode for bounds of integer types.
14353         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
14354         "some" quantified expression now issued under control of -gnatw.t,
14355         like the other warning on unused bound variable.
14356         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
14357         on removed flag.
14358         (Analyze_Pragma): Remove tests for SPARK 2014
14359         pragmas, not officially allowed by GNAT.
14361 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14363         * sem_prag.adb (Analyze_Pragma): Ensure that
14364         the sole argument of pragmas Abstract_State, Contract_Cases,
14365         Depends, Global and Initializes in in aggregate form.
14366         (Analyze_Refined_Pragma): Ensure that the sole argument of
14367         pragmas Refined_Depends, Refined_Global and Refined_State is in
14368         aggregate form.
14369         (Ensure_Aggregate_Form): New routine.
14371 2014-01-20  Doug Rupp  <rupp@adacore.com>
14373         * sem_attr.adb (Analyze_Attribute): case
14374         Attribute_Constrained => treat all prefixes as legal for Declib
14375         compatibility.
14377 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14379         * sem_prag.adb (Check_Mode): Reimplement the routine.
14380         (Find_Mode): New routine.
14382 2014-01-20  Robert Dewar  <dewar@adacore.com>
14384         * sem_ch4.adb (Operator_Check): Handle additional
14385         Allow_Integer_Address cases.
14387 2014-01-20  Robert Dewar  <dewar@adacore.com>
14389         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
14390         allowed if address is non-private, no longer true.
14391         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14392         Remove check for address being private, causes difficulty when
14393         pragma used in gnat.adc file and is not needed, since we guard
14394         this in Address_Integer_Convert_OK.
14395         * exp_ch7.adb: Minor reformatting.
14396         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
14398 2014-01-20  Robert Dewar  <dewar@adacore.com>
14400         * checks.adb (Apply_Range_Check): Remove gnatprove special
14401         casing of exponentiation.
14402         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
14403         operand for integer case to check range against Natural.
14405 2014-01-20  Robert Dewar  <dewar@adacore.com>
14407         * s-tataat.adb: Minor reformatting.
14409 2014-01-20  Robert Dewar  <dewar@adacore.com>
14411         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
14412         entities, and also fix documentation to remove mention of visible
14413         integer type, since this is not what the implementation does.
14414         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
14415         entities, and also fix documentation to remove mention of visible
14416         integer type, since this is not what the implementation does.
14417         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
14418         function.
14419         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
14420         case for parameter type check.
14421         * sem_res.adb (Resolve): Use new function
14422         Address_Integer_Convert_OK.
14423         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
14424         reformatting throughout.
14425         * sem_util.adb (Address_Integer_Convert_OK): New function.
14426         * sem_util.ads: Minor reformatting (put specs in alpha order)
14427         (Address_Integer_Convert_OK): New function.
14429 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14431         * exp_ch7.adb (Wrap_Transient_Expression):
14432         Insertion extra conditional expression only if
14433         Opt.Suppress_Control_Flow_Optimizations is set.
14435 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14437         * s-tataat.adb (Initialize_Attributes): Abort might already be
14438         deferred in Create_Task.
14440 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14442         * checks.adb (Apply_Scalar_Range_Check): Flag
14443         the exponent as requiring a range check when the expression is
14444         an exponentiation.
14446 2014-01-20  Fedor Rybin  <frybin@adacore.com>
14448         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
14450 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14452         * sem_util.adb (Default_Initialization): New routine.
14453         * sem_util.ads: Add new type Default_Initialization_Kind.
14454         (Default_Initialization): New routine.
14456 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14458         * sem_prag.adb (Check_Mode): Correct all error
14459         message logic dealing with in/in out parameters that may appear
14460         as inputs or have a self reference.
14462 2014-01-20  Robert Dewar  <dewar@adacore.com>
14464         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
14465         * sem_res.adb (Resolve): Fix error causing infinite loop for
14466         integer used as address. Allow addresses as integers.
14468 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14470         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
14472 2014-01-20  Bob Duff  <duff@adacore.com>
14474         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
14475         error when "use all" is not followed by "type".
14477 2014-01-20  Bob Duff  <duff@adacore.com>
14479         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
14480         followed by free.
14482 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14484         * checks.adb (Apply_Address_Clause_Check): If there is an
14485         alignment check on the expression in an address clause, and there
14486         is no local exception propagation, add an additional explanatory
14487         message to clarify the cause of previous warning.
14489 2014-01-20  Robert Dewar  <dewar@adacore.com>
14491         * exp_ch7.adb: Minor reformatting.
14492         * opt.ads: Minor comment updates.
14493         * sem.adb: Minor name change Is_Main_Unit =>
14494         Is_Main_Unit_Or_Main_Unit_Spec.
14495         * sem_ch6.adb: Minor reformatting and code reorganization.
14497 2014-01-20  Bob Duff  <duff@adacore.com>
14499         * gnat_ugn.texi: Update gnatpp switches.
14501 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14503         * exp_ch9.adb: Minor comment edit.
14505 2014-01-20  Robert Dewar  <dewar@adacore.com>
14507         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
14508         only if System.Address is a private type.
14509         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
14510         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14511         Allowed only if type System.Address is private, since otherwise
14512         it makes no sense.
14513         * sem_res.adb: Fix failure to properly Analyze unchecked
14514         conversions that were introduced by Allow_Integer_Address.
14515         * switch-c.adb: Remove -gnates switch.
14516         * usage.adb: Remove -gnates switch.
14517         * gnat_ugn.texi: Remove documentation of -gnates flag.
14519 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14521         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
14522         resolve expression to perform proper name capture.
14524 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14526         * sem.adb (Semantics): When saving/restoring configuration
14527         switches, the spec of a pre- defined unit that is the main unit
14528         must be treated as a predefined unit as well.
14530 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14532         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
14533         expression, insert an extra conditional expression when saving
14534         the value of the expression, for the benefit of control flow
14535         graph based coverage analysis.
14536         * exp_ch3.adb: Minor reformatting.
14538 2014-01-20  Robert Dewar  <dewar@adacore.com>
14540         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
14541         * gnat_rm.texi: Document pragma Allow_Integer_Address.
14542         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
14543         * opt.ads: New flag Allow_Integer_Address.
14544         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
14545         * sem_ch5.adb: Minor reformatting.
14546         * sem_prag.adb: Implement pragma Allow_Integer_Address.
14547         * sem_res.adb (Resolve): Allow integer address value if
14548         switch set.
14549         * sem_util.adb: Minor reformatting.
14550         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
14551         * switch-c.adb: Recognize flag -gnates.
14552         * usage.adb: Document flag -gnates.
14554 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14556         * s-tadeca.adb: Fix minor typos in comment.
14558 2014-01-20  Pascal Obry  <obry@adacore.com>
14560         * s-win32.ads (FreeLibrary): New import.
14562 2014-01-20  Robert Dewar  <dewar@adacore.com>
14564         * sem_res.adb, sem_cat.adb: Minor reformatting.
14565         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
14566         assigning to OUT parameters for the current subprogram scope.
14567         * exp_ch4.adb: Minor reformatting.
14569 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14571         * exp_ch4.adb (Process_Transient_Object,
14572         Find_Enclosing_Contexts): If the top-level if-expression that
14573         generated the transient object is an actual in a call, the proper
14574         Hook_Context is a construct enclosing the call.
14575         * einfo.ads: Indicate that Related_Expression is used to link a
14576         loop variable to the container expression over which the loop
14577         takes place.
14578         (Analyze_Iterator_Specification): Set the Related_Expression of
14579         the loop variable in a container element iterator.
14580         (Note_Possible_Modification): If the variable is the loop
14581         variable in a container element iterator, indicate that the
14582         enclosing container is also modified.
14584 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14586         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
14588 2014-01-20  Robert Dewar  <dewar@adacore.com>
14590         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
14591         Minor reformatting and code clean up.
14593 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14595         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
14596         of objects of private type if Relaxed_RM_Semantics.
14598 2014-01-20  Claire Dross  <dross@adacore.com>
14600         * a-cofove.ads (Vector): Capacity discriminant
14601         should be in range of the index.
14603 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14605         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
14606         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
14607         possible difference between epoch of Ada.Calendar clock and Ada
14608         real-time/tasking clock.
14609         * s-taprop-posix.adb: Minor comment fix.
14611 2014-01-20  Doug Rupp  <rupp@adacore.com>
14613         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
14615 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14617         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
14618         checks on the prefix of attribute 'Old.
14619         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
14620         generation of validity checks on a range that belongs to the
14621         iteration scheme of a quantified expression.
14622         * sem_ch5.adb (One_Bound): Suppress the generation of validity
14623         checks on a bound that belongs to the iteration scheme of a
14624         quantified expression, generate the check in all other cases.
14626 2014-01-20  Bob Duff  <duff@adacore.com>
14628         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
14630 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14632         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
14633         interpretations that do not come from other predefined units,
14634         to prevent spurious ambiguities in the presence of user-defined
14635         operators in the context of (an instance of) a predefined unit.
14637 2014-01-20  Robert Dewar  <dewar@adacore.com>
14639         * gnat_rm.texi: Document that Loop_Variant is included in
14640         Statement_Assertions.
14641         * sem_prag.adb (Check_Kind): Add Loop_Variant to
14642         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
14643         to Statement_Assertions.
14645 2014-01-20  Doug Rupp  <rupp@adacore.com>
14647         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
14648         for errno ENOENT from RTP on NFS mounted file system.
14650 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14652         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
14653         examine code that does not come from source. The check does not
14654         apply to code generated for constraint checks, and such code may
14655         generate spurious error messages when compiled with expansion
14656         disabled (as in a generic unit) because side effects may not
14657         have been removed.
14658         2) Make error messages more explicit: indicate the component
14659         of the  construct whose value is indeterminate because of a
14660         call to a function with in-out parameter in another component,
14661         when there is no mandated order of execution between the two
14662         components (actuals, aggregate components, alternatives).
14664 2014-01-20  Robert Dewar  <dewar@adacore.com>
14666         * gnat_rm.texi: Minor cleanup.
14668 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14670         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
14671         can now apply to a refined postcondition.
14672         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
14673         variable Result_Seen. Add variables Case_Prag, Post_Prag,
14674         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
14675         whether postconditions and/or constract-cases mention attribute
14676         'Result and introduce a post-state when applied to functions.
14677         (Check_Result_And_Post_State): Removed.
14678         * sem_prag.adb (Analyze_Pragma): Add local variable
14679         Result_Seen. Verify that the expression of pragma Refined_Post
14680         mentions attribute 'Result and introduces a post-state.
14681         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
14683 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14685         * exp_ch7.adb (Is_Subprogram_Call): New routine.
14686         (Process_Transient_Objects): Make variable Must_Hook global with
14687         respect to all locally declared subprograms. Search the context
14688         for at least one subprogram call.
14689         (Requires_Hooking): Removed.
14691 2014-01-20  Claire Dross  <dross@adacore.com>
14693         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
14694         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
14695         External_Axiomatization);
14697 2014-01-20  Robert Dewar  <dewar@adacore.com>
14699         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
14700         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
14701         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
14702         Allow Loop_Entry to be used in these pragmas if they appear in
14703         an appropriate context.
14704         (Placement_Error): Specialize error
14705         message for pragma Assert[_And_Cut] or pragma Assume containing
14706         Loop_Entry attribute.
14707         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
14708         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
14709         and code clean ups.
14711 2014-01-20  Robert Dewar  <dewar@adacore.com>
14713         * gnat1drv.adb: Minor comment update.
14715 2014-01-20  Tristan Gingold  <gingold@adacore.com>
14717         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
14718         variables, comment out unused code.
14719         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
14720         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
14721         * s-excmac-arm.ads: New file.
14723 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14725         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
14726         Drange and Index_Typ. Remove the circuitry which creates a
14727         range check to compare the index type of the array against the
14728         discrete_range.
14729         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
14730         the circuitry which creates a range check to handle a
14731         discrete_range denoted by a subtype indication.
14733 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
14735         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
14736         nodes to get the original sloc range.
14738 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14740         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
14741         entity of a [library level] package.
14743 2014-01-20  Tristan Gingold  <gingold@adacore.com>
14745         * raise-gcc.c (exception_class_eq): New function.
14746         (is_handled_by): Use it to compare exception classes.
14747         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
14748         be called to return URC_CONTINUE_UNWIND.
14749         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
14750         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
14752 2014-01-20  Robert Dewar  <dewar@adacore.com>
14754         * opt.ads: Minor comment update.
14756 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14758         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
14759         constants to the "Local variables" area. Add new constant D. Add
14760         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
14761         to Pref_Typ and update all occurrences. Add circuitry to extract
14762         the discrete_range and the index type and build a range check.
14764 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14766         * gnat1drv.adb (Adjust_Global_Switches): Enable
14767         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
14768         is set.
14770 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14772         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
14774 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14776         * sem_ch13.adb (Analyze_Aspect_Specifications):
14777         When aspect SPARK_Mode appears on a package body, insert the
14778         generated pragma at the top of the body declarations.
14780 2014-01-20  Robert Dewar  <dewar@adacore.com>
14782         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
14783         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
14784         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
14785         sem_ch8.adb, exp_dist.adb: Minor reformatting.
14787 2014-01-20  Yannick Moy  <moy@adacore.com>
14789         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
14790         mode.
14792 2014-01-20  Pascal Obry  <obry@adacore.com>
14794         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
14795         write scheme).
14796         * g-arrspl.adb: Adapt all routine to this new implementation.
14797         (Set): Copy the Slice_Set definition before reusing it.
14799 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14801         * sem_prag.adb (Process_Import_Or_Interface): In
14802         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
14803         (Analyze_Pragma): Ditto for pragma Export.
14804         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
14805         Import style.
14807 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14809         * einfo.ads: E_Abstract_State is now part of the entities that
14810         can be overloaded. Update type Overloadable_Kind to reflect the
14811         inclusion of abstract states.
14812         * sem_ch6.adb (New_Overloaded_Entity): A function can now
14813         overload an abstract state.
14814         * sem_prag.adb (Analyze_Constituent): Handle the overloading
14815         of states by functions. Use Entity_Of to obtain the entity of
14816         a constituent.  (Analyze_Global_Item): Handle the overloading of
14817         states by functions.
14818         (Analyze_Initialization_Item): Handle the
14819         overloading of states by functions.  Use Entity_Of to obtain the
14820         entity of an item.
14821         (Analyze_Input_Item): Handle the overloading
14822         of states by functions. Use Entity_Of to obtain the entity of an item.
14823         (Analyze_Input_Output): Handle the overloading of states by functions.
14824         (Analyze_Refinement_Clause): Handle the overloading
14825         of states by functions.  Use Entity_Of to obtain the entity of an item.
14826         (Appears_In): Use Entity_Of to obtain the entity of an element.
14827         (Check_Usage): Use Entity_Of to obtain the entity of
14828         an item. Add a guard to prevent a crash due to a previous error.
14829         (Resolve_State): New routine.
14831 2014-01-20  Yannick Moy  <moy@adacore.com>
14833         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
14834         opt.ads: Minor comments updates.
14836 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14838         * einfo.adb (Non_Limited_View): Applies to abstract states.
14839         (Set_From_Limited_With): Applies to abstract states.
14840         (Set_Non_Limited_View): Applies to abstract states.
14841         (Write_Field17): Output the non-limited view of an abstract state.
14842         * einfo.ads: Update the comment on usage and occurrences in
14843         nodes for attributes From_Limited_With and Non_Limited_View.
14844         * sem_aux.adb (Available_View): This routine can now handle
14845         abstract states.
14846         * sem_aux.ads (Available_View): This routine can now handle
14847         abstract states. Update the comment on usage.
14848         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
14849         of states and variables.
14850         (In_Pragmas_Depends_Or_Global): New routine.
14851         * sem_ch10.adb (Build_Limited_Views): Implement
14852         abstract (limited) views of variables and states.
14853         (Build_Shadow_Entity): This routine is now a procedure. Add
14854         formal parameter Shadow. Update the comment on usage. Add
14855         context-specific decoration for states and variables.
14856         (Decorate_State): New routine.  (Decorate_Variable): New routine.
14857         (Find_And_Process_States): New routine.
14858         (Process_Declarations): Renamed to Process_Declarations_And_States.
14859         (Process_Declarations_And_States): Add formal parameters
14860         Pack and Create_Abstract_Views. Update the comment on usage.
14861         (Process_States): New routine.
14862         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
14863         views of states and variables. Match the abstract view of a state
14864         against its corresponding non-abstract view.
14865         (Is_Matching_Input):
14866         Handle abstract views of states and variables. Match the abstract
14867         view of a state against its corresponding non-abstract view.
14868         (Process_Global_Item): Handle abstract views of states and
14869         variables.
14871 2014-01-20  Bob Duff  <duff@adacore.com>
14873         * sem_ch10.adb (Expand_With_Clause): Don't
14874         recurse on the prefix if the current with-ed name refers to a
14875         package that renames its own parent, eg "package P.Q renames P;".
14877 2014-01-20  Yannick Moy  <moy@adacore.com>
14879         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
14880         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
14881         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
14882         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
14883         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
14884         Expander_Active.
14886 2014-01-20  Yannick Moy  <moy@adacore.com>
14888         * sinfo.ads Update documentation of GNATprove mode.
14890 2014-01-20  Yannick Moy  <moy@adacore.com>
14892         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
14893         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
14894         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
14895         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
14896         GNATprove_Mode.
14897         * sem_ch13.adb: Remove blank.
14898         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
14899         subprograms by alias for renamings, not for inherited primitive
14900         operations.
14901         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
14902         in GNATprove mode.
14903         (Remove_Side_Effects): Apply the removal in
14904         GNATprove mode, for the full analysis of expressions.
14905         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
14906         mode.
14907         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
14908         save/restore actions for Expander_Active flag in GNATprove mode,
14909         similar to what is done in ASIS mode.
14910         * frontend.adb (Frontend): Generic bodies are instantiated in
14911         GNATprove mode.
14912         * gnat1drv.adb (Adjust_Global_Switches): Set operating
14913         mode to Check_Semantics in GNATprove mode, although a light
14914         expansion is still performed.
14915         (Gnat1drv): Set Back_End_Mode to
14916         Declarations_Only in GNATprove mode, and later on special case
14917         the GNATprove mode to continue analysis anyway.
14918         * lib-writ.adb (Write_ALI): Always generate ALI files in
14919         GNATprove mode.
14920         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
14921         Expander_Active.
14922         (SPARK_Mode): Renamed as GNATprove_Mode.
14923         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
14924         tree in GNATprove_Mode.
14925         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
14926         body in GNATprove mode.
14927         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
14928         mode.
14929         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
14930         Make sure side effects are removed in GNATprove mode.
14932 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14934         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
14935         for aliased objects with an unconstrained nominal subtype.
14936         * gcc-interface/trans.c (Call_to_gnu): Likewise.
14937         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
14938         <case N_Op_Minus>: Remove useless code.
14939         (Exception_Handler_to_gnu_zcx): Minor tweaks.
14941 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14943         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
14944         Tidy up.  For a subtype with discriminants and variant part, if a
14945         variant is statically selected and the fields all have a constant
14946         position, put them in order of increasing position.  Likewise if
14947         no variant part but representation clause is present.
14948         * gcc-interface/utils.c (make_packable_type): Robustify.
14949         (maybe_pad_type): Use local variable and tidy up condition.  If no
14950         alignment is specified, use the original one.
14951         (create_type_stub_decl): Minor tweak.
14952         (convert) <case VECTOR_CST>: Fix typo.
14953         <case CONSTRUCTOR>: Deal with padding types around the same type.
14954         Do not punt on missing fields.
14955         (unchecked_convert): Call finish_record_type to lay out the special
14956         record types made for conversions from/to problematic integer types.
14957         Bump the alignment of CONSTRUCTORs before converting them to a more
14958         aligned type.
14960 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14962         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
14963         obsolete code for type_annotate_only mode, simplify code and slightly
14964         improve wording of comments.
14966 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14968         PR ada/59772
14969         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
14970         as intermediate type.
14971         (UI_To_gnu): Likewise.
14973 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
14975         * gnatvsn.ads (Current_Year): Bump to 2014.
14977 2014-01-02  Tobias Burnus  <burnus@net-b.de>
14979         * gnat_ugn.texi: Bump @copying's copyright year.
14981 Copyright (C) 2014 Free Software Foundation, Inc.
14983 Copying and distribution of this file, with or without modification,
14984 are permitted in any medium without royalty provided the copyright
14985 notice and this notice are preserved.