Make std::vector<bool> meet C++11 allocator requirements.
[official-gcc.git] / gcc / ada / ChangeLog
blob1a12ce3f451bc6b613c703531d884a3f95777895
1 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
3         * aspects.adb Add an entry for aspect Ghost in table
4         Canonical_Aspect.
5         * aspects.ads Add an entry for aspect Ghost in tables
6         Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names and
7         Implementation_Defined_Aspect.
8         * einfo.adb: Flags 277 and 278 are now in use.
9         (Is_Checked_Ghost_Entity): New routine.
10         (Is_Ghost_Entity): Removed.
11         (Is_Ghost_Subprogram): Removed.
12         (Is_Ignored_Ghost_Entity): New routine.
13         (Set_Is_Checked_Ghost_Entity): New routine.
14         (Set_Is_Ignored_Ghost_Entity): New routine.
15         (Write_Entity_Flags): Output flags Is_Checked_Ghost_Entity and
16         Is_Ignored_Ghost_Entity.
17         * einfo.ads: Add new flags Is_Checked_Ghost_Entity
18         and Is_Ignored_Ghost_Entity along with usage in nodes.
19         (Is_Checked_Ghost_Entity): New routine and pragma Inline.
20         (Is_Ghost_Entity): Removed along with synthesized flag
21         description and usage in nodes.
22         (Is_Ghost_Subprogram): Removed along with synthesized flag description
23         and usage in nodes.
24         (Is_Ignored_Ghost_Entity): New routine and pragma Inline.
25         (Set_Is_Checked_Ghost_Entity): New routine and pragma Inline.
26         (Set_Is_Ignored_Ghost_Entity): New routine and pragma Inline.
27         * freeze.adb (Freeze_Entity): A Ghost type cannot be effectively
28         volatile.
29         * par-prag.adb Pragma Ghost does not need special handling by
30         the parser.
31         * repinfo.adb (List_Mechanisms): Remove the entry for convention Ghost.
32         * sem_attr.adb (Analyze_Access_Attribute): Remove obsolete check.
33         * sem_ch3.adb (Analyze_Full_Type_Declaration): Mark
34         the type as Ghost when its enclosing context is Ghost.
35         (Analyze_Incomplete_Type_Decl): Mark the type as Ghost when
36         its enclosing context is Ghost.
37         (Analyze_Number_Declaration): Mark the number as Ghost when its
38         enclosing context is Ghost.
39         (Analyze_Object_Declaration): Mark the object as Ghost when its
40         enclosing context is Ghost. Verify the Ghost policy between
41         initial declaration and completion of a deferred constant.
42         (Analyze_Object_Contract): A Ghost variable cannot be effectively
43         volatile, imported or exported.
44         (Build_Derived_Record_Type): Mark a type extension as Ghost when it
45         implements a Ghost interface.
46         (Build_Record_Type): Inherit volatility and "ghostness" from
47         the parent type.
48         (Check_Completion): A Ghost entity declared
49         in a non-Ghost package does not require completion in a body.
50         (Implements_Ghost_Interface): New routine.
51         (Process_Full_View): Inherit "ghostness" from the partial view. Verify
52         the Ghost policy between the partial and full views. Verify the
53         completion of a Ghost type extension.
54         * sem_ch4.adb (Check_Ghost_Subprogram_Call): Removed.
55         * sem_ch5.adb (Analyze_Assignment): Analyze the left hand side first.
56         * sem_ch6.adb (Analyze_Abstract_Subprogram_Declaration): Mark
57         the subprogram as Ghost when its enclosing context is Ghost.
58         (Analyze_Generic_Subprogram_Body): Mark the generic body as Ghost
59         when its enclosing context is Ghost. Verify the Ghost policy
60         between the spec and body.
61         (Analyze_Subprogram_Body_Helper): Mark the body as Ghost when its
62         enclosing context is Ghost. Verify the Ghost policy between the spec
63         and body.
64         (Check_Conformance): A Ghost subprogram profile and a non-Ghost
65         subprogram profile are not subtype conformant.
66         (Convention_Of): Removed.
67         * sem_ch7.adb (Analyze_Package_Body_Helper): Inherit the
68         "ghostness" from the spec. Verify the Ghost policy between
69         the spec and body.
70         (Analyze_Private_Type_Declaration): Mark the type as Ghost when its
71         enclosing context is Ghost.
72         (Requires_Completion_In_Body): New routine.
73         (Unit_Requires_Body): Use Requires_Completion_In_Body.
74         (Unit_Requires_Body_Info): Rename formal parameter P to Pack_Id, update
75         comment on usage and all uses of P in the body. Use
76         Requires_Completion_In_Body.
77         * sem_ch7.ads (Unit_Requires_Body): Rename formal parameter P
78         to Pack_Id, update comment on usage and all uses of P in the body.
79         * sem_ch8.adb (Analyze_Exception_Renaming): Inherit the "ghostness"
80         from the renamed excention.
81         (Analyze_Generic_Renaming): Inherit the "ghostness" from the
82         renamed generic subprogram.
83         (Analyze_Object_Renaming): Inherit the "ghostness" from the renamed
84         object.
85         (Analyze_Package_Renaming): Inherit the "ghostness" from the
86         renamed package.
87         (Analyze_Subprogram_Renaming): Inherit the "ghostness" from the
88         renamed subprogram.
89         * sem_ch11.adb (Analyze_Exception_Declaration): Mark an exception
90         as Ghost when its enclosing context is Ghost.
91         * sem_ch12.adb (Analyze_Generic_Package_Declaration,
92         Analyze_Generic_Subprogram_Declaration): Mark an exception as
93         Ghost when its enclosing context is Ghost.
94         (Preanalyze_Actuals): Remove obsolete check.
95         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
96         for aspect Ghost.
97         (Check_Aspect_At_Freeze_Point): Aspects
98         Depends and Global do no need special checking at freeze point.
99         (Insert_After_SPARK_Mode): Update comment on usage.
100         * sem_mech.adb (Set_Mechanisms): Remove the entry for convention Ghost.
101         * sem_prag.adb Add an entry for pragma Ghost in table Sig_Flags.
102         (Analyze_Abstract_State): Update the grammar of the pragma. Add
103         formal parameter Pack_Id along with comment on usage. Mark an
104         abstract state as Ghost when its enclosing context is Ghost. Add
105         processing for option Ghost.
106         (Analyze_Constituent): Verify
107         that a Ghost abstract state is refined by Ghost constituents.
108         (Analyze_Pragma): "Ghost" is now a valid policy. Add checks
109         related to the use and placement of Check_Policy Ghost. Add
110         processing for pragma Ghost.
111         (Check_Ghost_Constituent): New routine.
112         (Is_Valid_Assertion_Kind): "Ghost" is now a valid assertion.
113         (Process_Convention): Remove obsolete check.
114         (Set_Convention_From_Pragma): Remove the processing for convention
115         Ghost.
116         * sem_res.adb (Check_Ghost_Context): New routine.
117         (Resolve_Call): Verify that a reference to a Ghost entity appears in a
118         suitable context. Verify the Ghost polity between point of declaration
119         and point of use.
120         (Resolve_Entity_Name): Verify that a reference to
121         a Ghost entity appears in a suitable context. Verify the Ghost
122         polity between point of declaration and point of use.
123         * sem_util.adb (Check_Ghost_Completion): New routine.
124         (Check_Ghost_Derivation): New routine.
125         (Incomplete_Or_Partial_View): New routine.
126         (Incomplete_Or_Private_View): Removed.
127         (Is_Ghost_Entity): New routine.
128         (Is_Ghost_Statement_Or_Pragma): New routine.
129         (Is_Subject_To_Ghost): New routine.
130         (Policy_In_Effect): New routine.
131         (Set_Is_Ghost_Entity): New routine.
132         (Within_Ghost_Scope): New routine.
133         * sem_util.ads (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         * snames.adb-tmpl (Get_Convention_Id): Remove the entry for
144         convention Ghost.
145         (Get_Convention_Name): Remove the entry for convention Ghost.
146         * snames.ads-tmpl Remove the convention id for Ghost. Add a
147         pragma id for Ghost.
149 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
151         * gnat_ugn.texi: Add description of --RTS option for ASIS tools.
153 2014-10-31  Olivier Hainque  <hainque@adacore.com>
155         * gcc-interface/Makefile.in (arm-vxworks): Update target pairs.
157 2014-10-31  Vincent Celier  <celier@adacore.com>
159         * prj-part.adb (Parse_Single_Project): Call Set_Display_Name_Of.
160         * prj-proc.adb (Recursive_Process): Call Display_Name_Of to
161         get the project Display_Name.
162         * prj-tree.adb (Display_Name_Of): New function
163         (Set_Display_Name_Of): New procedure.
164         (Create_Project): Call Set_Display_Name_Of.
165         * prj-tree.ads (Display_Name_Of): New function.
166         (Set_Display_Name_Of): New procedure.
167         (Project_Node_Record): New component Display_Name.
168         (Project_Name_And_Node): Remove component Display_Name.
169         * prj-conf.adb (Parse_Project_And_Apply_Config): Use the full
170         Config_File_Path as the Config_File_Name, not just its simple
171         name.
173 2014-10-31  Thomas Quinot  <quinot@adacore.com>
175         * get_scos.adb: Minor reformatting.
177 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
179         * exp_ch5.adb (Expand_Formal_Container_Loop): Create block to
180         capture declaration for cursor to prevent spurious errors when
181         several formal iterators that use the same cursoe name appear
182         in the same context.
184 2014-10-31  Vincent Celier  <celier@adacore.com>
186         * prj-proc.adb (Recursive_Process): Make sure that the project
187         display name is never No_Name.
189 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
191         * sem_attr.adb (Analyze_Access_Attribute): Do not emit error
192         message if reference does not come from source, as in the case
193         for the controlling argument of a dispatching call. Error is
194         diagnosed when call is resolved.
195         * sem_ch4.adb (Complete_Object_Operation); Fix incorrect RM
196         reference in error message.
197         * sem_res.adb (Check_Prefixed_Call): ditto.
199 2014-10-31  Yannick Moy  <moy@adacore.com>
201         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings): Do not
202         suppress checks when pragma Restrictions (No_Exception) is used in
203         CodePeer or GNATprove mode.
205 2014-10-31  Yannick Moy  <moy@adacore.com>
207         * gnat1drv.adb (Adjust_Global_Switches): Explicitly mark language
208         checks as not suppressed in GNATprove mode.
210 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
212         * sem_elab.adb (Check_Elab_Call): Nothing to check if call is
213         being pre-analyzed.
214         * sem_ch3.adb (Complete_Private_Subtype): If all rep items of full
215         view are those of the base, use rep_item chain of partial view,
216         which may include aspects.
217         * sem_cat.adb (Is_non_Remote_Access_Type): Use underlying type
218         of base type, to handle properly declared subtypes.
220 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
222         * sem_ch12.adb (Analyze_Generic_Package_Declaration): If there
223         is a default storage pool, add a corresponding aspect to the
224         generic unit, to be used at the point of instantiation.
225         (Analyze_Package_Instantiation): If generic unit has aspect
226         specifications, propagate them to instance. If instance has a
227         Default_Storage_Pool aspect, make sure that it overrides the
228         one that may be inherited from the generic.
230 2014-10-31  Vincent Celier  <celier@adacore.com>
232         * prj-attr.adb: Minor removal of attributes of package Linker
233         that have never been used and never been documented.
234         * projects.texi: Add documentation for attribute Runtime.
235         * prj-nmsc.adb (Check_Configuration): Do not report a warning
236         for unknown compilers when the project is externally built.
238 2014-10-31  Vasiliy Fofanov  <fofanov@adacore.com>
240         * prj-conf.adb (Do_Autoconf): Refactor the code so that empty
241         Normalized_Pathname doesn't inhibit the custom Selected_Target
242         value.
243         * prj-conf.adb (Parse_Project_And_Apply_Config): Make sure that
244         Automatically_Generated is correctly set after the first call
245         to Process_Project_And_Apply_Config and not modified after the
246         second call, if any.
248 2014-10-31  Yannick Moy  <moy@adacore.com>
250         * Makefile.rtl, gnat_rm.texi, impunit.adb: Add mention of new library
251         files.
252         * a-cfinve.adb, a-cfinve.ads: New unit for formal indefinite
253         vectors, suitable for use in client SPARK code, also more
254         efficient than the standard vectors.
255         * a-coboho.adb, a-coboho.ads New unit for bounded holders, that
256         are used to define formal indefinite vectors in terms of formal
257         definite ones.
258         * a-cofove.adb, a-cofove.ads: Simplification of the API of formal
259         definite vectors, similar to the API of the new indefinite ones. A
260         new formal parameter of the generic unit called Bounded allows
261         to define growable vectors that use dynamic allocation.
263 2014-10-31  Vincent Celier  <celier@adacore.com>
265         * prj-conf.adb (Look_For_Project_Paths): New procedure
266         (Parse_Project_And_Apply_Config): Initially, parse the project
267         files ignoring missing withs. If there are missing withs, extend
268         the project path with directories rooted at the compiler roots,
269         including directories rooted at the runtime roots, if there are
270         non default runtimes, in the PATH orser.
271         * prj-env.adb (Initialize_Default_Project_Path): Do not add
272         any directory from the prefix if the target is "-".
273         * prj-part.adb (Parse): Initialize the tables, as Parse may be
274         call several times by gprbuild.
275         * prj.adb (Update_Ignore_Missing_With): New procedure.
277 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
279         * sem_aux.adb (First_Stored_Discriminant,
280         Has_Completely_Hidden_Discriminant): When scanning the list of
281         discriminants to locate possibly hidden (inherited) discriminants,
282         ignore itypes that may appear in the entity list, when an access
283         discriminants is constrained by an access attribute reference.
285 2014-10-31  Javier Miranda  <miranda@adacore.com>
287         * freeze.adb (Freeze_Record_Type): Add missing
288         check to verify that all the primitives of an interface type
289         are abstract or null procedures.
291 2014-10-31  Vincent Celier  <celier@adacore.com>
293         * s-os_lib.adb, s-os_lib.ads: New function Non_Blocking_Spawn that
294         redirects standard output and standard error to two different files.
296 2014-10-31  Bob Duff  <duff@adacore.com>
298         * makeutl.ads: Minor comment fix.
300 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
302         * system-linux-x86_64.ads, system-mingw-x86_64.ads (Word_Size,
303         Memory_Size): Use Standard'Word_Size so that the value can be changed
304         via a target configuration file.
306 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
308         * exp_ch4.adb: Minor tweak.
310 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
312         * sem_ch12.adb (Analyze_Package_Instantiation): Do not inline with
313         back-end inlining.
314         (Must_Inline_Subp): Delete.
315         * sem_util.ads, sem_util.adb (Must_Inline): Likewise.
317 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
319         * freeze.adb (Freeze_Entity): A default_pool does not apply to
320         internal access types generated for 'access references.
321         * sem_prag (Analyze_Pragma, case Default_Pool): If the name is
322         not null it must designate a variable.
324 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
326         * inline.adb: Minor reformatting.
328 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
330         * sem_ch3.adb (Build_Derived_Private_Type): If the derived
331         type has access discriminants, create itype references for their
332         anonymous types, so that they are elaborated before the generated
333         bodies for the primitive operations of the type.
335 2014-10-31  Tristan Gingold  <gingold@adacore.com>
337         * prj-conf.adb (Locate_Runtime): Remove procedure.
339 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
341         * inline.adb (Has_Excluded_Declaration): With back-end inlining,
342         only return true for nested packages.
343         (Cannot_Inline): Issue errors/warnings whatever the optimization level
344         for back-end inlining and remove assertion.
346 2014-10-31  Sergey Rybin  <rybin@adacore.com frybin>
348         * table.adb (Tree_Read, Tree_Write): Use parentheses to specify
349         the desired order of '*' and '/' operations to avoid overflow.
351 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
353         * exp_ch6.adb (Do_Inline): Remove unreachable code.
354         (Do_Inline_Always): Likewise.
356 2014-10-31  Vincent Celier  <celier@adacore.com>
358         * prj-nmsc.adb (Check_Stand_Alone_Library): Change error message
359         when library has no Ada interfaces and Library_Standalone is
360         declared.
362 2014-10-31  Arnaud Charlet  <charlet@adacore.com>
364         * sem_ch13.adb (Check_Constant_Address_Clause): Disable checks
365         on address clauses in CodePeer mode.
367 2014-10-31  Javier Miranda  <miranda@adacore.com>
369         * inline.adb (Expand_Inlined_Call): Do not skip
370         inlining of calls to subprogram renamings.
372 2014-10-31  Hristian Kirtchev  <kirtchev@adacore.com>
374         * sem_res.adb (Resolve_Entity_Name): Account for
375         the case where the immediate parent of a reference to an entity
376         is a parameter association.
378 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
380         * inline.adb (Check_And_Split_Unconstrained_Function): Do not
381         test for the presence of nested subprograms.
383 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
385         * aspects.ads, aspects.adb: Add aspect Default_Storage_Pool.
386         * sem_ch13.adb (Analyze_One_Aspect): Generate pragma for aspect
387         Default_Storage_Pool.
389 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
391         * sem_ch6.adb: Remove obsolete comment.
393 2014-10-31  Olivier Hainque  <hainque@adacore.com>
395         * g-allein.ads: bind vec_sld for pixels to 8hi vsldoi instead
396         of 4si, as pixels are short.
398 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
400         * sem_res.adb (Resolve_Call): Do not reject a call to a protected
401         operation in the spec of a protected type, when the call appears
402         in a pre/postcondition for another protected operation.
404 2014-10-31  Tristan Gingold  <gingold@adacore.com>
406         * prj-conf.adb: Locate_Runtime: Always search the runtime in
407         project path.
409 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
411         * inline.adb (Check_Package_Body_For_Inlining): Adjust previous
412         change to use correct idiom for back-end inlining.
414 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
416         * freeze.adb (Freeze_Record_Type): Do not check component size
417         if its type is generic.
419 2014-10-31  Bob Duff  <duff@adacore.com>
421         * gnat_rm.texi: Fix documentation w.r.t -gnatw.w.
423 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
425         * sem_ch4.adb (Try_Container_Indexing): Use Check_Implicit_Dereference.
426         * sem_util.adb (Check_Implicit_Dereference): a) Handle generalized
427         indexing as well as function calls.  b)  If the context is a
428         selected component and whe are in an instance, remove entity from
429         selector name to force resolution of the node, so that explicit
430         dereferences can be generated in the instance if they were in
431         the generic unit.
433 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
435         * inline.adb (Back_End_Cannot_Inline): Delete.
436         (Add_Inlined_Subprogram): Do not call it.
438 2014-10-31  Ed Schonberg  <schonberg@adacore.com>
440         * exp_ch3.ads (Make_Tag_Assignment): New function, used to
441         re-initialize the tag in a tagged object declaration with
442         initial value.
443         * exp_ch3.adb (Expand_N_Object_Declaration): Use
444         Make_Tag_Assignment to simplify code for a tagged object
445         declaration.
446         * exp_ch13.adb (Expand_Freeze_Entity): Analyze freeze actions
447         for the freeze node of an object.
448         * freeze.adb (Check_Address_Clause): Use Make_Tag_Assignment when
449         needed to extend Freeze_Actions for a tagged object declaration.
451 2014-10-31  Eric Botcazou  <ebotcazou@adacore.com>
453         * gnat_ugn.texi: Further minor improvement to -flto entry.
455 2014-10-31  Gary Dismukes  <dismukes@adacore.com>
457         * g-dynhta.adb, g-dynhta.ads: Minor typo fixes and reformatting.
459 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
461         * exp_ch3.adb (Expand_N_Object_Declaration): Code cleanup.
463 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
465         * sem_ch5.adb (Analyze_Iterator_Specification): If a subtype
466         indication is provided, check properly that it covers the element
467         type of of the container type.
469 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
471         * g-dynhta.ads, g-dynhta.adb: Add the implementation of a load facto
472         -based hash table.
474 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
476         * exp_util.ads, exp_util.adb (Following_Address_Clause): Modify
477         Has_Following_Address_Clause so that it returns the address
478         clause if present, rather than a boolean value.
479         * sem_ch3.adb (Analyze_Object_Declaration): use
480         Following_Address_Clause.
481         * exp_ch3.adb (Expand_N_Object_Declaration): When a tagged object
482         is initialized, insert tag assignment after object is frozen,
483         which may be after an address clause that follows the declaration.
485 2014-10-30  Tristan Gingold  <gingold@adacore.com>
487         * system-darwin-x86.ads, system-linux-s390x.ads, system-linux-alpha.ads,
488         system-vxworks-arm.ads, system-freebsd-x86_64.ads,
489         system-linux-hppa.ads, system-linux-s390.ads,
490         system-solaris-sparcv9.ads, system-mingw.ads, system-linux-ia64.ads,
491         system-vxworks-sparcv9.ads, system-linux-ppc.ads, system-aix64.ads,
492         system-linux-sh4.ads, system-solaris-x86.ads, system-linux-x86_64.ads,
493         system-linux-x86.ads, system-vxworks-ppc.ads, system-hpux.ads,
494         system-linux-armel.ads, system-darwin-ppc.ads, system-solaris-sparc.ads,
495         system-vxworks-m68k.ads, system-hpux-ia64.ads, system.ads,
496         system-solaris-x86_64.ads, system-mingw-x86_64.ads,
497         system-vxworks-mips.ads, system-linux-sparc.ads, system-freebsd-x86.ads,
498         system-aix.ads, system-darwin-x86_64.ads, system-vxworks-x86.ads: Add
499         pragma No_Elaboration_Code_All.
501 2014-10-30  Eric Botcazou  <ebotcazou@adacore.com>
503         * gnat_ugn.texi: Minor improvement to -flto entry.
505 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
507         * sem_util.adb (Inherit_Subprogram_Contract):
508         Add a guard to protect against enumeration literal overriding.
509         * sem_ch3.adb, sem_ch4.adb, sem_res.adb, sem_util.adb:
510         Minor reformatting (add SPARK RM references).
512 2014-10-30  Robert Dewar  <dewar@adacore.com>
514         * exp_dbug.adb, opt.ads: Minor reformatting.
516 2014-10-30  Yannick Moy  <moy@adacore.com>
518         * inline.adb (Has_Single_Return_In_GNATprove_Mode):
519         Return False when return statement is inside one or more blocks.
521 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
523         * exp_ch7.adb (Is_Subprogram_Call): Account for the case where an
524         object declaration initialized by a function call that returns
525         an unconstrained result may be rewritted as a renaming of the
526         secondary stack result.
528 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
530         * aspects.adb: Add an entry for aspect Extensions_Visible in
531         table Canonical_Aspect.
532         * aspects.ads: Add entry for aspect Extensions_Visible in
533         tables Aspect_Argument, Aspect_Delay, Aspect_Id, Aspect_Names,
534         Implementation_Defined_Aspect.
535         * einfo.adb (Get_Pragma): Include pragma Extensions_Visible in
536         the list of contract pragmas.
537         * par-prag.adb Pragma Extensions_Visible does not require special
538         processing from the parser.
539         * sem_ch3.adb (Analyze_Object_Declaration): Prevent an
540         implicit class-wide conversion of a formal parameter
541         of a specific tagged type whose related subprogram is
542         subject to pragma Extensions_Visible with value "False".
543         (Check_Abstract_Overriding): Add various overriding checks
544         related to pragma Extensions_Visible.
545         (Derive_Subprogram):
546         A subprogram subject to pragma Extensions_Visible with value
547         False requires overriding if the subprogram has at least one
548         controlling OUT parameter.
549         (Is_EVF_Procedure): New routine.
550         * sem_ch4.adb (Analyze_Type_Conversion): A formal parameter of
551         a specific tagged type whose related subprogram is subject to
552         pragma Extensions_Visible with value "False" cannot appear in
553         a class-wide conversion.
554         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove
555         the assertion to account for pragma Extensions_Visible.
556         (Check_Overriding_Indicator): An overriding subprogram
557         inherits the contact of the overridden subprogram.
558         (New_Overloaded_Entity): An overriding subprogram inherits the
559         contact of the overridden subprogram.
560         * sem_ch13.adb (Analyze_Aspect_Specifications): Add processing
561         for aspect Extensions_Visible.
562         (Check_Aspect_At_Freeze_Point): Aspect Extensions_Visible does not
563         require special processing at the freeze point.
564         * sem_prag.adb Add an entry for pragma Extensions_Visible in
565         table Sig_Flags.
566         (Analyze_Pragma): Ensure that various SPARK
567         pragmas lack identifiers in their arguments. Add processing for
568         pragma Extensions_Visible.
569         (Chain_CTC): Code reformatting.
570         * sem_res.adb (Resolve_Actuals): A formal parameter of a
571         specific tagged type whose related subprogram is subject to
572         pragma Extensions_Visible with value "False" cannot act as an
573         actual in a subprogram with value "True".
574         * sem_util.adb (Add_Classification): New routine.
575         (Add_Contract_Item): Account for pragma Extensions_Visible. Code
576         reformatting.
577         (Add_Contract_Test_Case): New routine.
578         (Add_Pre_Post_Condition): New routine.
579         (Extensions_Visible_Status): New routine.
580         (Inherit_Subprogram_Contract): New routine.
581         (Is_EVF_Expression): New routine.
582         (Is_Specific_Tagged_Type): New routine.
583         * sem_util.ads Add type Extensions_Visible_Mode and document all values.
584         (Add_Contract_Item): Add pragma Extensions_Visible to the
585         comment on usage.
586         (Inherit_Subprogram_Contract): New routine.
587         (Is_EVF_Expression): New routine.
588         (Is_Specific_Tagged_Type): New routine.
589         * sinfo.adb (Is_Inherited): New routine.
590         (Set_Is_Inherited): New routine.
591         * sinfo.ads Add flag Is_Inherited along with its usage in
592         nodes.
593         (Is_Inherited): New routine along with pragma Inline.
594         (Set_Is_Inherited): New routine along with pragma Inline.
595         * snames.ads-tmpl: Add predefined name "Extensions_Visible"
596         and a new Pragma_Id for the pragma.
598 2014-10-30  Vincent Celier  <celier@adacore.com>
600         * prj-proc.adb (Process_Case_Construction): Do not look for
601         the ultimate extending project for a case variable.
603 2014-10-30  Pierre-Marie Derodat  <derodat@adacore.com>
605         * exp_dbug.adb, opt.ads (GNAT_Encodings): Import from C. Define
606         enumerators.
607         (gnat_encodings): Define a dummy variable for the AAMP back-end.
608         (Get_Encoded_Name): When -fgnat-encodings=all|gdb, encode names
609         for all discrete types whose bounds do not match size and do so
610         only for biased types when -fgnat-encodings=minimal.
611         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not create ___XA
612         parallel types when array bounds are constant while the lower bound is
613         not 1.  Also stop generating them because the bound type is
614         larger than sizetype.
615         * gcc-interface/misc.c (gnat_encodings): New.
617 2014-10-30  Thomas Quinot  <quinot@adacore.com>
619         * opt.adb (Set_Opt_Config_Switches): For an internal unit,
620         always reset Default_SSO to ' '.
622 2014-10-30  Thomas Quinot  <quinot@adacore.com>
624         * freeze.adb (Freeze_Record_Type): Set SSO from default before
625         checking SSO consistency.
627 2014-10-30  Javier Miranda  <miranda@adacore.com>
629         * inline.adb (Check_Package_Body_For_Inlining):
630         Cleanup this subprogram to implement exactly the behavior
631         documented in the spec.
633 2014-10-30  Hristian Kirtchev  <kirtchev@adacore.com>
635         * a-comutr.adb, a-cimutr.adb (Insert_Child): Add new variable First.
636         Update the position after all insertions have taken place.
638 2014-10-30  Ed Schonberg  <schonberg@adacore.com>
640         * sem_prag.adb (Analyze_Pragma, case License): Do not perform
641         analysis of pragma arguments when in CodePeer mode, pragma has
642         different format on other compilers.
644 2014-10-30  Thomas Quinot  <quinot@adacore.com>
646         * s-os_lib.adb: Minor reformatting.
648 2014-10-29  Richard Sandiford  <richard.sandiford@arm.com>
650         * gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
651         gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
652         Remove redundant enum from machine_mode.
654 2014-10-28  Andrew MacLeod  <amacleod@redhat.com>
656         * gcc-interface/trans.c: Adjust include files.
657         * gcc-interface/utils.c: Ditto.
659 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
661         * gcc-interface/utils.c (create_subprog_decl): Adjust condition.
663 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
665         * gcc-interface/misc.c (gnat_init_options_struct): Parameterize errno
666         support here instead of...
667         Do not set flag_delete_dead_exceptions to 1 unconditionally.
668         (gnat_init_gcc_eh): Set flag_delete_dead_exceptions to 1.
669         (gnat_init_gcc_fp): ...here.
671 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
673         * gcc-interface/trans.c (gnat_to_gnu) <N_Real_Literal>: Minor tweaks.
675 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
677         * gcc-interface/utils.c (create_var_decl_1): For a variable declared
678         in the unit, set TREE_PUBLIC only if it has static storage duration.
680 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
682         * gcc-interface/decl.c (gnat_to_gnu_entity): Apply special treatment
683         of derived packed array types to constrained subtypes only.
685 2014-10-27  Eric Botcazou  <ebotcazou@adacore.com>
687         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Type>: Remove
688         superfluous computation for the max size.
689         <E_Array_Subtype>: Likewise.  Make sure that the max size calculation
690         does not overflow at compile time.
692 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
694         * sem_eval.adb (Check_Non_Static_Context): Do not set
695         Is_Machine_Number on a literal of a fixed-point type.
697 2014-10-23  Robert Dewar  <dewar@adacore.com>
699         * mlib-prj.adb, sem_ch4.adb, exp_ch3.adb: Minor reformatting.
701 2014-10-23  Pierre-Marie Derodat  <derodat@adacore.com>
703         * exp_dbug.ads: Update ___XA parallel type specification.
705 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
707         * sem_ch3.adb (Copy_Array_Subtype_Attributes): Inherit the rep
708         chain of the source type.
709         * sem_ch13.adb (Analyze_Aspect_Specifications): Minor
710         reformatting of an error message.
711         * sem_util.adb (Inherit_Rep_Item_Chain): Do not inherit a rep
712         chain that has been inherited already.
714 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
716         * sem_ch6.adb (Analyze_Expression_Function): Simplify analysis
717         in generic context, and generate body in this case as well,
718         to simplify ASIS traversals on the construct.
720 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
722         * sem_ch4.adb (Complete_Object_Operation): Indicate that the
723         scope of the operation (s) is referenced, to prevent spurious
724         warnings about unused units.
726 2014-10-23  Johannes Kanig  <kanig@adacore.com>
728         * errout.adb (Error_Msg_Internal): Copy check flag, increment
729         check msg count.
730         * erroutc.adb (Delete_Msg) adjust check msg count.
731         (Output_Msg_Text) handle check msg case (do nothing).
732         (Prescan_Message) recognize check messages with severity prefixes.
733         * errutil.adb (Error_Msg) handle check flag, adjust counter.
735 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
737         * sem_eval.adb (Subtypes_Statically_Match): For a generic actual
738         type, check for the presence of discriminants in its parent type,
739         against the presence of discriminants in the context type.
741 2014-10-23  Tristan Gingold  <gingold@adacore.com>
743         * adaint.c: __gnat_get_file_names_case_sensitive: Default is
744         true on arm-darwin.
746 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
748         * pprint.adb (Expression_Image): Add handling of quantifiers.
750 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
752         * exp_pakd.adb (Expand_Packed_Element_Reference): If the
753         prefix is a source entity, generate a reference to it before
754         transformation, because rewritten node might not generate a
755         proper reference, leading to spurious warnings.
757 2014-10-23  Tristan Gingold  <gingold@adacore.com>
759         * init.c: Fix thinko in previous patch.
761 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
763         * sem_ch3.adb (Decimal_Fixed_Point_Type_Declaration):
764         Inherit the rep chain of the implicit base type.
765         (Floating_Point_Type_Declaration): Inherit the rep chain of the
766         implicit base type.
767         (Ordinary_Fixed_Point_Type_Declaration): Inherit the rep chain of the
768         implicit base type.
769         (Signed_Integer_Type_Declaration): Inherit the rep chain of the
770         implicit base type.
771         * sem_util.ads, sem_util.adb (Inherit_Rep_Item_Chain): New routine.
773 2014-10-23  Pascal Obry  <obry@adacore.com>
775         * g-regist.adb, g-regist.ads: Add support for reading 32bit or 64bit
776         view of the registry.
778 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
780         * exp_ch3.adb (Expand_N_Object_Declaration): If type is abstract,
781         return without expanding expression, to prevent subsequent crash.
782         * freeze.adb: better error message for illegal declaration.
784 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
786         * sysdep.c (__gnat_localtime_tzoff): Properly delimit the
787         substring which represents the time zone on VxWorks.
789 2014-10-23  Vincent Celier  <celier@adacore.com>
791         * gnatls.adb: If --RTS= was not used, check if there is a default
792         runtime. If there is none, in verbose mode, indicate that the
793         default runtime is not available and show only the current
794         directory in the source and the object search paths.
796 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
798         * sem_ch6.adb (Process_Formals): A thunk procedure with a
799         parameter of a limited view does not need a freeze node.
801 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
803         * sem_ch7.adb (Analyze_Package_Body_Helper):
804         The logic which hides local entities from external
805         visibility is now contained in routine Hide_Public_Entities.
806         (Hide_Public_Entities): New routine. Object and subprogram
807         renamings are now hidden from external visibility the same way
808         objects are.
810 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
812         * sem_attr.adb (Analyze_Attribute): The prefix of attribute Elaborated
813         does not require freezing, in particular if it denotes a generic
814         function.
816 2014-10-23  Yannick Moy  <moy@adacore.com>
818         * sem_prag.adb (Analyze_Pragma/Pragma_Inline & Pragma_Inline_Always):
819         Disable analysis in GNATprove mode.
821 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
823         * mlib-prj.adb: Remove obsolete references to libdecgnat (VMS only).
825 2014-10-23  Arnaud Charlet  <charlet@adacore.com>
827         * gnat1drv.adb (Adjust_Global_Switches): Ignore style check
828         pragmas in codepeer mode.
830 2014-10-23  Gary Dismukes  <dismukes@adacore.com>
832         * gnat_rm.texi: Minor syntax fix for pragma Annotate (missing ',').
834 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
836         * sem_ch12.adb (Inline_Instance_Body): Alphabetize
837         local variables and constants. Add constants Save_SM and Save_SMP
838         to capture SPARK_Mode-related attributes.  Compile the inlined
839         body with the SPARK_Mode of the enclosing context.
841 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
843         * sinfo.adb (Elaboration_Boolean): Removed.
844         (Set_Elaboration_Boolean): Removed.
845         * sinfo.ads Remove attribute Elaboration_Boolean along with its
846         occurrence in nodes.
847         (Elaboration_Boolean): Removed along with pragma Inline.
848         (Set_Elaboration_Boolean): Removed along with pragma Inline.
850 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
852         * sem_ch3.adb (Constant_Redeclaration): Make error message more
853         explicit on a deferred constant whose object_definition is an
854         anonymous array.
856 2014-10-23  Vincent Celier  <celier@adacore.com>
858         * gnatls.adb: Never call Targparm.Get_Target_Parameters.
860 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
862         * sem_ch6.adb (Analyze_Expression_Function): In a generic
863         context do not create a body, and only pre-analyze the expression,
864         which may include incomplete views.
866 2014-10-23  Robert Dewar  <dewar@adacore.com>
868         * sem_type.adb: Minor code reorganization (use Nkind_In, Ekind_In).
869         * sem_ch3.adb: Minor reformatting.
871 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
873         * sem_ch12.adb (Analyze_Associations): If an actual for a formal
874         object is a call to a parameterless expression function, add
875         the function to the list of actuals to freeze.
876         * freeze.adb (Check_Expression_Function): Create freeze nodes of
877         outer types that may be references in the body of the expression.
879 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
881         * exp_util.ads, checks.ads: Minor comment reformatting.
883 2014-10-23  Javier Miranda  <miranda@adacore.com>
885         * sem_eval (Test_In_Range): Disable removal of range_check for
886         VM targets.
888 2014-10-23  Robert Dewar  <dewar@adacore.com>
890         * erroutc.adb (Validate_Specific_Warnings): Fix test for -W
891         messages, which got disabled when we unconditionally added an
892         asterisk at the start of the string.
894 2014-10-23  Vincent Celier  <celier@adacore.com>
896         * gnatls.adb: Ensure that "gnatls -l" works even when there is
897         no default runtime.
899 2014-10-23  Eric Botcazou  <ebotcazou@adacore.com>
901         * sem_ch3.adb (Build_Derived_Private_Type): When the parent is
902         untagged and has discriminants, build the implicit full view after
903         building the derived type. Capture original declaration and type
904         here instead of...
905         (Copy_And_Build): ...here.
906         * sem_type.adb (Full_View_Covers): Handle the Underlying_Full_View.
908 2014-10-23  Hristian Kirtchev  <kirtchev@adacore.com>
910         * checks.adb (Ensure_Valid): Update the subprogram
911         profile. Propagate the contex attributes to Insert_Valid_Check.
912         (Insert_Valid_Check): Update the subprogram profile. Propagate
913         the attributes of the context to Duplicate_Subexpr_No_Checks.
914         (Validity_Check_Range): Update the subprogram profile. Propagate
915         the context attribute to Ensure_Valid.
916         * checks.ads (Ensure_Valid): Update the subprogram profile
917         along with the comment on usage.
918         (Insert_Valid_Check): Update the subprogram profile along with the
919         comment on usage.
920         (Validity_Check_Range): Update the subprogram profile along with
921         the comment on usage.
922         * exp_util.adb (Build_Temporary): New routine.
923         (Duplicate_Subexpr_No_Checks): Update the subprogram
924         profile. Propagate the attributes of the context to Remove_Side_Effects.
925         (Remove_Side_Effects): Update the subprogram profile. Update all calls
926         to Make_Temporary to invoke Build_Temporary.
927         * exp_util.ads (Duplicate_Subexpr_No_Checks): Update
928         the subprogram profile along with the comment on usage.
929         (Remove_Side_Effects): Update the subprogram profile along with
930         the comment on usage.
931         * sem_ch3.adb (Process_Range_Expr_In_Decl): Pass the subtype
932         to the validity check machinery.  Explain the reason for this
933         propagation.
935 2014-10-23  Robert Dewar  <dewar@adacore.com>
937         * a-strsea.adb: Minor reformatting.
939 2014-10-23  Thomas Quinot  <quinot@adacore.com>
941         * bcheck.adb (Check_Consistent_SSO_Default): Exclude internal
942         units from consistency check.
943         * gnat_rm.texi (Default_Scalar_Storage_Order): Document that
944         consistency check excludes run-time units.
946 2014-10-23  Ed Schonberg  <schonberg@adacore.com>
948         * a-strsea.adb (Find_Token): Enable constraint checking in this
949         procedure, so that even when compiling with checks suppressed, as is
950         the case for the run-time, an exception is raised in this routine when
951         the input meets the conditions described in RM 2005 A.4.3 (68/1).
953 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
955         * sem_ch3.adb (Build_Derived_Private_Type): When the parent
956         is untagged and has discriminants, build the implicit full
957         view even if the derived type is a completion, and make it
958         the Underlying_Full_View of the type.
959         (Copy_And_Build): Fix Is_Completion actual parameter in the calls to
960         Build_Derived_Type.
961         (Build_Derived_Record_Type): Likewise.
963 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
965         * sem_ch13.adb: Add guard to convention setting.
967 2014-10-20  Robert Dewar  <dewar@adacore.com>
969         * sem_ch3.adb, prj-proc.adb, prj-proc.ads, prj-conf.adb: Minor
970         reformatting.
972 2014-10-20  Robert Dewar  <dewar@adacore.com>
974         * par-prag.adb (Add_List_Pragma_Entry): New procedure.
975         * par.adb (P_Pragma): Document requirement to handle multiple calls.
977 2014-10-20  Robert Dewar  <dewar@adacore.com>
979         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
980         Fix error of bad inheritance of this pragma from with'ed unit.
982 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
984         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Point): For a subtype,
985         inherit convention from parent type, because the subtype may
986         have been declared on a partial view, prior to the pragma on
987         the parent.
989 2014-10-20  Olivier Hainque  <hainque@adacore.com>
990             Tristan Gingold  <gingold@adacore.com>
992         * gcc-interface/Makefile.in: Handle arm-darwin and VxWorks 7.
993         Misc clean ups.
995 2014-10-20  Nicolas Roche  <roche@adacore.com>
997         * gcc-interface/Make-lang.in: ensure that automatically generated
998         dependency are referencing generated gnatvsn rather than original
999         one.
1001 2014-10-20  Gary Dismukes  <dismukes@adacore.com>
1003         * gnat_ugn.texi: Minor reformatting.
1004         * sem_ch3.adb: Minor reformatting.
1006 2014-10-20  Vincent Celier  <celier@adacore.com>
1008         * prj-attr.adb: New project level attribute Runtime.
1009         * prj-conf.adb (Get_Project_Runtimes): New procedure to get
1010         the attributes Runtime declared in the main project, to use
1011         in auto-configuration.
1012         (Get_Or_Create_Configuration_File): Call Get_Project_Runtimes.
1013         * prj-proc.adb (Runtime_Defaults): New table to store
1014         the default values of attributes Runtime (<language>).
1015         (Set_Default_Runtime_For): New procedure to store the default
1016         value of a Runtime (<language>) in table Runtime_Defaults.
1017         (Expression): Use the value stored in table Runtime_Defaults as
1018         the default for Runtime (<language>).
1019         * prj-proc.ads (Set_Default_Runtime_For): New procedure.
1020         * prj.ads (Attribute_Default_Value): New enumerated value
1021         Runtime_Value.
1023 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1025         * sem_ch3.adb (Analyze_Object_Declaration): If the type is
1026         an unconstrained unchecked_union type, rewrite declaration
1027         as a renaming to prevent attempt to retrieve non- existent
1028         discriminants from expression.
1030 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1032         * gnat_ugn.texi: Minor reformatting.
1034 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1036         * init.c (__gnat_is_stack_guard): Don't use mach_vm_region_recurse on
1037         arm-darwin.
1038         * raise-gcc.c: Add ATTRIBUTE_UNUSED to remove warnings for
1039         unused arguments.
1041 2014-10-20  Hristian Kirtchev  <kirtchev@adacore.com>
1043         * sem_attr.adb (Analyze_Attribute): Replace
1044         variables CS and PS with Proc_Id and Subp_Id to better illustrate
1045         their purpose. Account for the case where _Postconditions
1046         has not been generated yet and the context is aspect/pragma
1047         Refined_Post. In that scenario the expected prefix of attribute
1048         'Result is the current scope.
1050 2014-10-20  Robert Dewar  <dewar@adacore.com>
1052         * par-ch4.adb (P_Expression): Handle extraneous comma/semicolon
1053         in middle of expression with logical operators.
1055 2014-10-20  Robert Dewar  <dewar@adacore.com>
1057         * par-ch13.adb (Possible_Misspelled_Aspect): New function.
1059 2014-10-20  Steve Baird  <baird@adacore.com>
1061         * pprint.adb: Improve Expression_Image function.
1063 2014-10-20  Robert Dewar  <dewar@adacore.com>
1065         * gnat_rm.texi: Document No_Tagged_Streams pragma and aspect.
1066         * snames.ads-tmpl: Add entry for pragma No_Tagged_Streams.
1067         * aspects.ads, aspects.adb: Add aspect No_Tagged_Streams.
1068         * einfo.adb (No_Tagged_Streams_Pragma): New field.
1069         * einfo.ads: Minor reformatting (reorder entries).
1070         (No_Tagged_Streams_Pragma): New field.
1071         * exp_ch3.adb: Minor comment update.
1072         * opt.ads (No_Tagged_Streams): New variable.
1073         * par-prag.adb: Add dummy entry for pragma No_Tagged_Streams.
1074         * sem.ads (Save_No_Tagged_Streams): New field in scope record.
1075         * sem_attr.adb (Check_Stream_Attribute): Check stream ops
1076         prohibited by No_Tagged_Streams.
1077         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set
1078         No_Tagged_Streams_Pragma.
1079         (Analyze_Subtype_Declaration): ditto.
1080         (Build_Derived_Record_Type): ditto.
1081         (Record_Type_Declaration): ditto.
1082         * sem_ch8.adb (Pop_Scope): Restore No_Tagged_Streams.
1083         (Push_Scope): Save No_Tagged_Streams.
1084         * sem_prag.adb (Analyze_Pragma, case No_Tagged_Streams): Implement new
1085         pragma.
1087 2014-10-20  Robert Dewar  <dewar@adacore.com>
1089         * sem_ch3.adb, prj-proc.adb, sem_ch4.adb, prj-env.adb, lib.ads,
1090         sem_ch13.adb: Minor reformatting.
1092 2014-10-20  Javier Miranda  <miranda@adacore.com>
1094         * exp_ch3.adb (Expand_N_Object_Declaration): Expand the
1095         declaration of a class-wide limited object containing an
1096         initializing expression into a renaming declaration.  Required to
1097         avoid passing such declaration to the backend and also to avoid
1098         generating an extra copy.
1100 2014-10-20  Eric Botcazou  <ebotcazou@adacore.com>
1102         * inline.adb (List_Inlining_Info): Minor tweaks.
1103         (Add_Inlined_Body): Inline the enclosing package
1104         if it is not internally generated, even if it doesn't come
1105         from source.
1107 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1109         * sem_ch4.adb (Process_Function_Call): If the first actual
1110         denotes a discrete type, the mode must be interpreted as a slice
1111         of an array returned by a parameterless call.
1113 2014-10-20  Vasiliy Fofanov  <fofanov@adacore.com>
1115         * prj-env.ads, prj-env.adb (Get_Runtime_Path): No longer inhibit
1116         searching for runtime referenced by a simple name on a project path.
1118 2014-10-20  Olivier Hainque  <hainque@adacore.com>
1120         * vxworks-x86-link.spec: New file.
1121         * system-vxworks-x86.ads: Add pragma Linker_Options to link with
1122         vxworks-x86-link.spec.
1124 2014-10-20  Vincent Celier  <celier@adacore.com>
1126         * opt.ads (Origin_Of_Target): New type.
1127         (Target_Origin): New variable.
1128         * prj-conf.adb (Parse_Project_And_Apply_Config): Record
1129         Target_Value and Target_Origin.  If target was not specified
1130         on the command line with --target=, check if attribute Target
1131         is declared in the main project. If it is and it is not the
1132         native target, parse again the projects so that 'Target get
1133         the new value. Fail if the target has changed again.  Invoke
1134         Process_Project_And_Apply_Config with Do_Phase_1 set to False
1135         is Process_Project_Tree_Phase_1 has already been invoked.
1136         * prj-conf.ads (Process_Project_And_Apply_Config): New Boolean
1137         parameter Do_Phase_1, defaulted to True.
1138         * prj-proc.adb (Expression): Check the special values and
1139         defaults for attribute Target.
1141 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1143         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Do not analyze
1144         the subprogram spec of the body in full, because it will be
1145         reanalyzed when the declaration itself is analyzed;  otherwise. a
1146         formal may end up duplicated in the list of formals leading to
1147         spurious conformance errors with an existing declaration.
1149 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1151         * sem_ch13.adb: Improve error recovery on illegal aspect.
1153 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
1155         * set_targ.adb (Write_Target_Dependent_Values, Write_Line):
1156         Fix calling C APIs with no trailing NUL char by calling better
1157         wrappers instead.
1159 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1161         * gnat_ugn.texi: Document that gdb users must be in group
1162         _developer on mac os.
1164 2014-10-20  Arnaud Charlet  <charlet@adacore.com>
1166         * a-tgdico.ads: Fix typo.
1168 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1170         * exp_aggr.adb (Convert_To_Assignments): Do not create a
1171         transient scope for a component whose type requires it, if the
1172         context is an initialization procedure, because the target of
1173         the assignment must be visible outside of the block.
1175 2014-10-20  Tristan Gingold  <gingold@adacore.com>
1177         * tracebak.c: Define PC_ADJUST for arm-darwin.
1178         * env.c: Remove darwin specific code.
1179         * raise-gcc.c (__gnat_Unwind_ForcedUnwind): Error on arm-darwin.
1181 2014-10-20  Ed Schonberg  <schonberg@adacore.com>
1183         * sem_ch3.adb (Analyze_Full_Type_Declaration): If previous view
1184         is incomplete rather than private, and full type declaration
1185         has aspects, analyze aspects on the full view rather than
1186         the incomplete view, to prevent freezing anomalies with the
1187         class-wide type.
1189 2014-10-17  Robert Dewar  <dewar@adacore.com>
1191         * exp_ch9.adb (Expand_N_Task_Body): Add defense against
1192         previous errors.
1193         * freeze.adb (Freeze_Entity): Add defense against checking null
1194         scope for generic.
1195         * restrict.adb (Tasking_Allowed): Add test for No_Run_Time mode.
1196         * sem_ch13.adb (Freeze_Entity_Checks): Add defense against
1197         previous errors.
1198         * sem_ch9.adb (Analyze_Task_Type_Declaration): Give error if
1199         in No_Run_Time mode.
1201 2014-10-17  Robert Dewar  <dewar@adacore.com>
1203         * prj-makr.adb: Minor reformatting.
1205 2014-10-17  Robert Dewar  <dewar@adacore.com>
1207         * gnatcmd.adb, make.adb, prj-part.adb, gnatlink.adb, prj-nmsc.adb,
1208         prj-conf.adb, prj-env.adb: Use Is_Directory_Separator where possible.
1210 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1212         * exp_prag.adb (Undo_Initialization): If Initialize_Scalars
1213         is enabled, code will be generated for some composite types
1214         to initialize an object after its declaration. If there is
1215         a subsequent Import pragma for the object, that code must be
1216         removed as specified byw the semantics of the pragma, and to
1217         prevent out-of-order elaboration issues in the back-end.
1219 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1221         * exp_ch4.adb (Expand_N_Op_Concat): Keep concatenation operator
1222         wrapping mechanism under debug flag -gnatd.h.
1223         * debug.adb: Claim debug switch -gnatd.h.
1225 2014-10-17  Doug Rupp  <rupp@adacore.com>
1227         * gcc-interface/Makefile.in: Enable the socket runtime bits
1228         for Android.
1230 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1232         * sem_ch13.adb (Add_Invariants, Replace_Type_References): Do
1233         not perform the replacement on the expression for an inherited
1234         class-wide invariant if in ASIS_Mode and the type reference is
1235         already the prefix of a 'Class attribute reference: the expression
1236         has already been preanalyzed and the replacement performed when
1237         first encountered on the declaration of the parent type.
1239 2014-10-17  Robert Dewar  <dewar@adacore.com>
1241         * sem_ch5.adb, sem_ch7.adb, prj-nmsc.adb, sem_ch13.adb, exp_ch3.adb:
1242         Minor reformatting.
1244 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1246         * exp_ch3.adb (Build_Component_Invariant_Call): Retrieve Invariant
1247         subprogram from base type.
1248         * sem_ch7.adb (Analyze_Package_Specification): Build invariant
1249         subprogram for private type, not any of its subtypes.
1250         * sem_ch13.adb (Build_Invariant_Procedure_Declaration): Set type
1251         of procedure entity, because a call to it may be generated in
1252         a client unit before the corresponding subprogram declaration
1253         is analyzed.
1255 2014-10-17  Vincent Celier  <celier@adacore.com>
1257         * prj-nmsc.adb (Get_Directories): Do not create directories
1258         when a project is abstract.
1260 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1262         * sem_ch5.adb (Analyze_Iterator_Specification): If the domain
1263         of iteration is given by an expression that is not an array type,
1264         verify that its type implements an iterator iterface.
1266 2014-10-17  Robert Dewar  <dewar@adacore.com>
1268         * sem_attr.adb (Eval_Attribute): Ensure that attribute
1269         reference is not marked as being a static expression if the
1270         prefix evaluation raises CE.
1272 2014-10-17  Robert Dewar  <dewar@adacore.com>
1274         * exp_pakd.adb: Move bit packed entity tables to spec.
1275         * exp_pakd.ads: Move bit packed entity tables here from body.
1276         * freeze.adb (Freeze_Array_Type): Check that packed array type
1277         is supported.
1278         * rtsfind.adb (PRE_Id_Table): New table (Entity_Not_Defined):
1279         Specialize messages using PRE_Id_Table.
1280         * uintp.ads, uintp.adb (UI_Image): New functional form.
1282 2014-10-17  Robert Dewar  <dewar@adacore.com>
1284         * aspects.ads, aspects.adb: Add Suppress_Initialization aspect.
1285         * einfo.ads, einfo.adb (Suppress_Initialization): Now applies to
1286         E_Variable.
1287         * exp_ch3.adb (Default_Initialize_Object): Handle
1288         Suppress_Initialization.
1289         * exp_prag.adb (Expand_Pragma_Suppress_Initialization): New
1290         procedure (Expand_N_Pragma): Handle Suppress_Initialization
1291         (Expand_Pragma_Import_Or_Interface): Use Undo_Initialization
1292         (Undo_Initialization): New procedure.
1293         * sem_prag.adb (Analyze_Pragma, case Suppress_Initialization):
1294         This is now allowed for E_Variable case.
1295         * gnat_rm.texi: Document new aspect Suppress_Initialization
1296         Suppress_Initialization aspect/pragma can apply to variable.
1297         * einfo.ads: Minor reformatting.
1299 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
1301         * spark_xrefs.ads: Add documentation pointer to Flow_Computed_Globals.
1303 2014-10-17  Robert Dewar  <dewar@adacore.com>
1305         * cstand.adb (Create_Standard): Mark Short_Integer as
1306         implementation defined.
1307         * sem_util.adb (Set_Entity_With_Checks): Avoid blow up for
1308         compiler built with assertions for No_Implementation_Identifiers test.
1310 2014-10-17  Robert Dewar  <dewar@adacore.com>
1312         * aspects.ads: Documentation fix, aspect Lock_Free does have a
1313         corresponding pragma.
1314         * gnat_rm.texi: Document implementation defined boolean aspects
1315         as boolean.
1317 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1319         * sem_ch13.adb (Add_Invariants): For a class-wide type invariant,
1320         preserve semantic information on the invariant expression
1321         (typically a function call) because it may be inherited by a
1322         type extension in a different unit, and it cannot be resolved
1323         by visibility elsewhere because it may refer to local entities.
1325 2014-10-17  Robert Dewar  <dewar@adacore.com>
1327         * gnat_rm.texi: Document that string literal can be used for
1328         pragma Warnings when operating in Ada 83 mode.
1330 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1332         * freeze.adb (Find_Aggregate_Component_Desig_Type): New
1333         subsidiary function to Freeze_ Expression, used to determine
1334         whether an aggregate for an array of access types also freezes the
1335         designated type, when some aggregate components are allocators.
1337 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1339         * a-strsea.adb (Find_Token): AI05-031 indicates that the
1340         procedure must raise Index_Error when Source is not empty and
1341         the From parameter is not within the range of the Source string.
1343 2014-10-17  Robert Dewar  <dewar@adacore.com>
1345         * sem_prag.adb (Is_Static_String_Expression): Allow string
1346         literal in Ada 83 mode.
1348 2014-10-17  Vincent Celier  <celier@adacore.com>
1350         * prj-conf.adb (Get_Config_Switches): In CodePeer mode, do
1351         not take into account any compiler command from package IDE.
1353 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1355         * sem_ch12.adb (Build_Function_Wrapper): The formals of the
1356         wrapper must have the same identifiers as those of the formal
1357         subprogram, because calls within the generic may use named
1358         associations.
1360 2014-10-17  Robert Dewar  <dewar@adacore.com>
1362         * sem_ch3.adb, a-strsea.adb: Minor reformatting.
1363         * par-ch6.adb (P_Subprogram): Fix bad handling of null procedures.
1365 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1367         * sem_ch3.adb (Build_Derived_Enumeration_Type): Propagate aspect
1368         specfications from original type declaration to declaration of
1369         implicit base, because original node is rewritten as a subtype
1370         declaration on which type aspects do not belong.
1372 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1374         * sem_ch3.adb (Propagate_Default_Init_Cond_Attributes): A derived type
1375         inherits the attributes related to pragma Default_Initial_Condition
1376         from its parent type.
1378 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1380         * a-strsea.adb (Index - versions with a From parameter):
1381         According to AI05-056, the Index functions with a From parameter
1382         return 0 if the source is an empty string.
1384 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1386         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Disable
1387         the consistency checks in ASIS mode.
1389 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
1391         * s-expmod.ads: Minor typo fix.
1393 2014-10-17  Robert Dewar  <dewar@adacore.com>
1395         * sem_util.adb: Minor reformatting.
1397 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1399         * sem_ch12.adb (Build_Function_Wrapper): Build wrappers for
1400         actuals that are defaulted subprograms of the formal subprogram
1401         declaration.
1403 2014-10-17  Robert Dewar  <dewar@adacore.com>
1405         * exp_ch4.adb (Expand_N_Op_Eq): Make sure we deal with the
1406         implementation base type.
1407         * sinfo.ads: Add a note for N_Op_Eq and N_Op_Ne that record
1408         operands are always expanded out into component comparisons.
1410 2014-10-17  Robert Dewar  <dewar@adacore.com>
1412         * s-vallli.adb: Minor comment correction.
1413         * s-valuti.ads: Minor comment reformatting.
1415 2014-10-17  Robert Dewar  <dewar@adacore.com>
1417         * gnat_rm.texi: Document System.Atomic_Counters.
1418         * impunit.adb: Add System.Atomic_Counters (s-atocou.ads) to the
1419         list of user- accessible units added as children of System.
1420         * s-atocou.ads: Update comment.
1422 2014-10-17  Arnaud Charlet  <charlet@adacore.com>
1424         * s-expmod.ads: Add comments.
1426 2014-10-17  Hristian Kirtchev  <kirtchev@adacore.com>
1428         * sem_ch3.adb (Build_Derived_Record_Type): Remove the propagation
1429         of all attributes related to pragma Default_Initial_Condition.
1430         (Build_Derived_Type): Propagation of all attributes related
1431         to pragma Default_Initial_Condition.
1432         (Process_Full_View): Account for the case where the full view derives
1433         from another private type and propagate the attributes related
1434         to pragma Default_Initial_Condition to the private view.
1435         (Propagate_Default_Init_Cond_Attributes): New routine.
1436         * sem_util.adb: Alphabetize various routines.
1437         (Build_Default_Init_Cond_Call): Use an unchecked type conversion
1438         when calling the default initial condition procedure of a private type.
1439         (Build_Default_Init_Cond_Procedure_Declaration): Prevent
1440         the generation of multiple default initial condition procedures.
1442 2014-10-17  Robert Dewar  <dewar@adacore.com>
1444         * prj-conf.adb: Revert previous change.
1446 2014-10-17  Robert Dewar  <dewar@adacore.com>
1448         * lib-writ.ads, s-valdec.ads: Minor reformatting.
1450 2014-10-17  Ed Schonberg  <schonberg@adacore.com>
1452         * sem_ch12.adb: Additional work on function wrappers.
1454 2014-10-17  Eric Botcazou  <ebotcazou@adacore.com>
1456         * exp_util.adb (Possible_Bit_Aligned_Component): Also recurse
1457         on the renamed object of renamings.
1459 2014-10-17  Vincent Celier  <celier@adacore.com>
1461         * prj-conf.adb (Parse_Project_And_Apply_Config): In CodePeer
1462         mode, always use the native target.
1464 2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
1466         * gcc-interface/misc.c: Adjust include files.
1468 2014-10-13  Eric Botcazou  <ebotcazou@adacore.com>
1469             Alan Modra  <amodra@gmail.com>
1471         PR ada/63225
1472         * uintp.adb (Vector_To_Uint): Move from here to...
1473         * uintp.ads (UI_Vector): Make public.
1474         (Vector_To_Uint): ...here.
1476 2014-10-10  Robert Dewar  <dewar@adacore.com>
1478         * freeze.adb, sem_attr.adb: Minor reformatting.
1480 2014-10-10  Johannes Kanig  <kanig@adacore.com>
1482         * a-cfdlli.ads, a-cfhama.ads, a-cfhase.ads, a-cforma.ads,
1483         a-cforse.ads, a-cofove.ads: add "Default_Initial_Condition"
1484         to container type.
1486 2014-10-10  Vincent Celier  <celier@adacore.com>
1488         * prj-conf.adb (Do_Autoconf): In Codepeer mode, do not try to get
1489         any configuration switches from the project file.
1491 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1493         * sem_ch12.adb (Build_Wrapper): Renamed as Build_Operator_Wrapper.
1494         (Build_Function_Wrapper): New function, to construct a wrapper
1495         function for actuals that are functions with an arbitrary
1496         number of parameters. Used in GNATProve mode to simplify proof
1497         propagation in instantiations.
1499 2014-10-10  Robert Dewar  <dewar@adacore.com>
1501         * freeze.adb, gnat1drv.adb, sem_ch13.adb: Minor reformatting and
1502         code clean up.
1504 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
1506         * sem_res.adb (Is_OK_Volatile_Context): Allow
1507         a volatile object reference to appear as the expression of a
1508         type conversion.
1510 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1512         * sem_ch13.adb (Analyze_Aspect_Specifications, Library_Unit_Aspects):
1513         Aspect specification is legal on a local instantiation of a
1514         library-level generic unit.
1516 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
1518         * gnat1drv.adb (Adjust_Global_Switches): Set Front_End_Inlining
1519         if inlining has been enabled via -gnatn and the target is not GCC.
1521 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1523         * freeze.adb (Freeze_Entity): Freezing a subprogram does
1524         not always freeze its profile.  In particular, an attribute
1525         reference that takes the access type does not freeze the types
1526         of the formals.
1528 2014-10-10  Robert Dewar  <dewar@adacore.com>
1530         * errout.adb (Adjust_Name_Case): New procedure.
1531         (Set_Msg_Node): Use Adjust_Name_Case.
1532         * errout.ads (Adjust_Name_Case): New procedure.
1533         * exp_intr.adb (Add_Source_Info): Minor code reorganization
1534         (use Ekind_In).
1535         (Write_Entity_Name): Use Errout.Adjust_Name_Case.
1536         * sem_prag.adb (Is_Non_Significant_Pragma_Reference): Review
1537         and fix up entries in Sig_Flags, and correct logical errors in
1538         function itself.
1539         * sprint.adb (Sprint_Node_Actual): Properly print string for
1540         raise statement.
1542 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1544         * sem_ch3.adb (Analyze_Object_Declaration): For an object of an
1545         anonymous array type with delayed aspects, defer freezing of
1546         type until object itself is frozen.
1547         * freeze.adb (Freeze_Entity): When freezing an object of an
1548         anonymous array type with delayed aspects, remove freeze node of
1549         object after freezing type, to prevent out-of-order elaboration
1550         in the back-end. The initialization call for the object has
1551         already been constructed when expanding the object declaration.
1553 2014-10-10  Robert Dewar  <dewar@adacore.com>
1555         * exp_intr.adb (Write_Entity_Name): Moved to outer level
1556         (Write_Entity_Name): Properly handle operator names
1557         (Expand_Source_Info): New procedure.
1558         * exp_intr.ads (Add_Source_Info): New procedure.
1560 2014-10-10  Robert Dewar  <dewar@adacore.com>
1562         * butil.ads: Minor reformatting.
1563         * sem_ch5.adb: Code clean up.
1565 2014-10-10  Robert Dewar  <dewar@adacore.com>
1567         * exp_ch11.adb (Expand_N_Raise_Statement): Handle
1568         Prefix_Exception_Messages.
1569         * opt.adb: Handle new flags Prefix_Exception_Message[_Config].
1570         * opt.ads: New flags Prefix_Exception_Message[_Config].
1571         * par-prag.adb: New dummy entry for pragma Prefix_Exception_Messages.
1572         * snames.ads-tmpl: Add entries for new pragma Prefix_Exception_Messages.
1573         * sem_prag.adb: Implement new pragma Prefix_Exception_Messages
1574         * gnat_rm.texi: Document pragma Prefix_Exception_Messages.
1576 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
1578         * sinfo.ads, gnat_ugn.texi, a-except.adb, a-except-2005.adb,
1579         raise-gcc.c Spelling changes (prolog => prologue, epilog => epilogue).
1581 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1583         * sem_ch5.adb (Is_Wrapped_In_Block): Handle properly blocks that
1584         contain pragmas generated for loop invariants and type predicates.
1585         Clarify use of this subprogram.
1587 2014-10-10  Yannick Moy  <moy@adacore.com>
1589         * sem_prag.adb (Analyze_Global_Item): Accept formal objects in Global
1590         contracts.
1591         * errout.adb, errout.ads (SPARK_Msg_NE): Issue error unless
1592         SPARK_Mode is Off.
1594 2014-10-10  Vadim Godunko  <godunko@adacore.com>
1596         * a-stwima.adb (To_Sequence): Compute size of result array.
1598 2014-10-10  Javier Miranda  <miranda@adacore.com>
1600         * gnat_ugn.texi (Interfacing with C++ at the Class Level): Update the
1601         sources of the example to avoid a warning when the Ada files are
1602         automatically generated by the binding generator.
1604 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1606         * sem_attr.adb (Resolve_Attribute, case 'Update): Set
1607         Do_Range_Check on the expression of a record component
1608         association when needed, as is done for array components, when
1609         the corresponding type is a scalar type.
1611 2014-10-10  Gary Dismukes  <dismukes@adacore.com>
1613         * a-coinho-shared.adb: Minor typo fix.
1614         * prj-env.ads: Minor reformatting.
1616 2014-10-10  Hristian Kirtchev  <kirtchev@adacore.com>
1618         * sem_res.adb (Resolve_String_Literal): Do not
1619         generate a string literal subtype for the default expression of
1620         a formal parameter in GNATprove mode.
1622 2014-10-10  Yannick Moy  <moy@adacore.com>
1624         * errout.adb (SPARK_Msg_N): Issue error unless SPARK_Mode is Off.
1626 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1628         * exp_ch5.adb (Expand_Formal_Container_Element_Loop): Analyze
1629         declaration for loop parameter before rest of loop, and set
1630         entity kind to prevent assignments to it in the user code.
1631         * sem_ch3.adb (Analyze_Object_Contract): No contracts apply to the
1632         loop parameter in an element iteration over o formal container.
1634 2014-10-10  Robert Dewar  <dewar@adacore.com>
1636         * gnat_ugn.texi: Document use of user-level routines to handle
1637         e.g. col major arrays.
1639 2014-10-10  Doug Rupp  <rupp@adacore.com>
1641         * s-osinte-android.adb: Fix misspelling.
1642         * gsocket.h: Tweak the Android quirks.
1644 2014-10-10  Robert Dewar  <dewar@adacore.com>
1646         * errout.ads (SPARK_Msg_N): Fix spec to match change in body.
1648 2014-10-10  Robert Dewar  <dewar@adacore.com>
1650         * sem_ch13.adb: Minor code reorganization.
1652 2014-10-10  Pat Rogers  <rogers@adacore.com>
1654         * gnat_rm.texi: Text now indicates pragma No_Run_Time is not
1655         for users.
1657 2014-10-10  Vadim Godunko  <godunko@adacore.com>
1659         * a-coinho-shared.adb: Add minor comment.
1660         * a-stzmap.adb (To_Sequence): Compute size of result array.
1662 2014-10-10  Javier Miranda  <miranda@adacore.com>
1664         * exp_ch3.adb (Build_Init_Procedure): Complete the condition of an
1665         if-stmt to match its current documentation.
1667 2014-10-10  Robert Dewar  <dewar@adacore.com>
1669         * sem_ch7.adb, einfo.adb, einfo.ads, sem_prag.adb, sem_ch12.adb,
1670         freeze.adb, sem_util.adb, sem_res.adb, exp_ch6.adb, exp_ch13.adb,
1671         sem_ch6.adb, sem_cat.adb, sem_disp.adb
1672         (Is_Subprogram_Or_Generic_Subprogram): New primitive. Use this primitive
1673         throughout where appropriate.
1675 2014-10-10  Bob Duff  <duff@adacore.com>
1677         * a-coinho-shared.ads: Minor reformatting.
1678         * s-traceb.adb: Minor clean up.
1680 2014-10-10  Robert Dewar  <dewar@adacore.com>
1682         * ali.adb (Scan_ALI): Read and process new GP flag on ALI P line.
1683         * ali.ads (GNATprove_Mode): New component in ALI table.
1684         (GNATprove_Mode_Specified): New global.
1685         * gnatbind.adb (Gnatbind): Give fatal error if any file compiled
1686         in GNATProve mode.
1687         * lib-writ.ads, lib-writ.adb (GP): New flag on P line for
1688         GNATProve_Mode.
1690 2014-10-10  Javier Miranda  <miranda@adacore.com>
1692         * exp_ch3.adb (Build_Init_Procedure): Adding assertion.
1693         (Build_Init_Statement): Ensure that statements
1694         associated with the parent components are located at the beginning
1695         of the returned list of statements.
1697 2014-10-10  Ed Schonberg  <schonberg@adacore.com>
1699         * sem_ch13.adb (Inherit_Aspects_At_Freeze_Node): If the full
1700         view of a private type T that has a type invariant is a scalar
1701         or constrained array type, the base type created for the full
1702         view has the same type invariant.
1704 2014-10-10  Robert Dewar  <dewar@adacore.com>
1706         * exp_util.ads, sem_ch12.adb, exp_util.adb, i-fortra.ads: Minor code
1707         reorganization.
1709 2014-09-22  Eric Botcazou  <ebotcazou@adacore.com>
1711         * gcc-interface/decl.c (gnat_to_gnu_entity): Adjust comment.
1712         * gcc-interface/utils.c (gnat_write_global_declarations): Fix typo.
1714 2014-09-15  Jakub Jelinek  <jakub@redhat.com>
1716         * gcc-interface/Make-lang.in (check_acats_numbers0,
1717         check_acats_numbers1, check_acats_numbers2, check_acats_numbers3,
1718         check_acats_numbers4, check_acats_numbers5, check_acats_numbers6,
1719         check_acats_numbers, check_acats_subdirs): New variables.
1720         (check_acats_targets): Use $(check_acats_subdirs).
1721         (check-acats, check-acats%): Rewritten so that for parallelized
1722         testing each job runs all the chapters files, with
1723         GCC_RUNTEST_PARALLELIZE_DIR set in environment.  Prepare the support
1724         directory sequentially and share it.
1725         (check-acats-subtargets): Always print just check-acats.
1727 2014-08-25  Martin Liska  <mliska@suse.cz>
1729         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Adjust to
1730         new cgraph interface.
1731         (gnat_write_global_declarations): Likewise.
1733 2014-08-13  Sylvestre Ledru  <sylvestre@debian.org>
1735         * 9drpc.adb: Fix a typo
1736         * s-interr.ads: Likewise
1737         * s-taskin.ads: Likewise
1738         * s-traces.ads: Likewise
1739         * sysdep.c: Likewise
1741 2014-08-12  Joel Sherrill <joel.sherrill@oarcorp.com>
1743         * socket.c: For RTEMS, use correct prototype of gethostbyname_r().
1744         * gsocket.h Add include of <unistd.h> on RTEMS.
1746 2014-08-11  Joel Sherrill <joel.sherrill@oarcorp.com>
1748         * s-osinte-rtems.adb: Correct formatting of line in license block.
1750 2014-08-04  Claire Dross  <dross@adacore.com>
1752         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
1753         For an instance, look at the scope before the generic parent.
1755 2014-08-04  Yannick Moy  <moy@adacore.com>
1757         * lib-writ.ads: Update comments.
1758         * sem_disp.ads, sem_disp.adb (Inherited_Subprograms): Add
1759         parameters to filter inherited subprograms.
1761 2014-08-04  Robert Dewar  <dewar@adacore.com>
1763         * gnat_rm.texi: Add section on use of address clause for memory
1764         mapped I/O.
1766 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1768         * sem_ch3.adb (Analyze_Subtype_Declaration): A subtype, in
1769         particular the subtype created for a generic actual, inherits
1770         invariant information from the base type.
1772 2014-08-04  Robert Dewar  <dewar@adacore.com>
1774         * aspects.ads, aspects.adb: Add entries for aspect Obsolescent.
1775         * gnat_rm.texi: Add documentation for aspect Obsolescent.
1776         * sem_ch13.adb (Analyze_Aspect_Specifications): Implement aspect
1777         Obsolescent.
1778         (Check_Aspect_At_Freeze_Point): Add dummy entry for pragma Obsolescent.
1779         * s-osprim-mingw.adb: Minor reformatting.
1780         * sem_res.adb (Is_Atomic_Ref_With_Address): New function
1781         (Resolve_Indexed_Component): Rework warnings for non-atomic access
1782         (Resolve_Selected_Component): Add warnings for non-atomic access.
1784 2014-08-04  Doug Rupp  <rupp@adacore.com>
1786         * g-calend.adb (timeval_to_duration, duration_to_timeval): Change sec
1787         formal to long_long.
1788         * g-calend.ads (timeval): Bump up size to accomodate sec type.
1789         * s-taprop-linux.adb (timeval_to_duration): Change sec formal to
1790         long_long
1791         * s-osprim-posix.adb (timeval): Bump up size to accomodate
1792         new sec type.
1793         (timeval_to_duration): Change sec formal to Long_Long_Integer
1794         * s-osinte-darwin.adb (timeval): Bump up
1795         size to accomodate new sec type.
1796         (timeval_to_duration): Change sec formal to long_long
1797         * s-osinte-android.adb: Likewise.
1798         * cal.c (__gnat_timeal_to_duration, __gnat_duration_to_timeval): Change
1799         sec formal from long to long long.
1801 2014-08-04  Robert Dewar  <dewar@adacore.com>
1803         * sem_res.adb (Resolve_Qualified_Expression): Make sure
1804         Do_Range_Check flag gets set.
1806 2014-08-04  Robert Dewar  <dewar@adacore.com>
1808         * einfo.ads, einfo.adb (Is_Standard_String_Type): New function.
1809         * exp_ch3.adb (Build_Array_Init_Proc): Use
1810         Is_Standard_String_Type.
1811         (Expand_Freeze_Array_Type): ditto.
1812         (Get_Simple_Init_Val): ditto.
1813         (Needs_Simple_Initialization): ditto.
1814         * sem_eval.adb (Eval_String_Literal): Use Is_Standard_String_Type.
1815         * sem_warn.adb (Is_Suspicious_Type): Use Is_Standard_String_Type.
1817 2014-08-04  Pascal Obry  <obry@adacore.com>
1819         * adaint.c (__gnat_try_lock): Use _tcscpy and _tcscat instead of
1820         _stprintf which insert garbage into the wfull_path buffer.
1822 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1824         * cal.c: Remove old VMS/nucleus code. Remove obsolete vxworks
1825         code.
1826         * fe.h: Minor reformatting.
1828 2014-08-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1830         * cstreams.c: (_LARGEFILE_SOURCE): Guard definition.
1832 2014-08-04  Robert Dewar  <dewar@adacore.com>
1834         * par-ch13.adb (Get_Aspect_Specifications): Improve error
1835         recovery, fixing a -gnatQ bomb.
1837 2014-08-04  Yannick Moy  <moy@adacore.com>
1839         * sem_ch3.adb (Analyze_Object_Declaration): In GNATprove mode,
1840         do not generate two Itypes with the same name for an array
1841         definition.
1842         * sinfo.ads: Expand doc on GNATprove mode.
1844 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1846         * exp_ch3.adb (Expand_Freeze_Record_Type): Set the finalization
1847         master and storage pool attributes on the root type of an
1848         anonymous access type.
1849         * exp_ch4.adb (Expand_N_Allocator): Set the finalization master
1850         and storage pool attributes on the root type of an anonymous
1851         access type.
1853 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1855         * exp_ch3.adb: Minor reformatting.
1856         * tb-alvms.c, tb-alvxw.c, tb-ivms.c: Removed.
1857         * tracebak.c: Remove use of above files.
1858         * gcc-interface/Makefile.in: Update dependencies.
1860 2014-08-04  Pierre-Marie Derodat  <derodat@adacore.com>
1862         * gcc-interface/utils.c (gnat_set_type_context): Also set the
1863         context for parallel types' TYPE_STUB_DECL.  Do not change
1864         anything if the context is already set for them.
1865         (gnat_pushdecl): Update the comment for calls to
1866         gnat_set_type_context to mention parallel types.
1867         (add_parallel_type): When adding a context-less parallel type to
1868         a type that has a context, propagate the context from the latter
1869         type to the former.
1870         (process_deferred_decl_context): Call gnat_set_type_context
1871         rather than manually setting the type context.
1872         (build_unc_object_type): Call gnat_set_type_context on the
1873         template type.
1875 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1877         * exp_ch5.adb (Expand_N_Case_Statement): If a choice is a
1878         subtype indication and the case statement has only two choices,
1879         replace subtype indication with its range, because the resulting
1880         membership test cannot have a subtype indication as an operand.
1882 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1884         * exp_ch3.adb: Update comments, minor reformatting.
1886 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1888         * sem_ch3.adb (Analyze_Declarations): Explain why the bodies of
1889         the default initial condition procedures are build here.
1890         * sem_util.adb (Build_Default_Init_Cond_Procedure): Wrap the
1891         analyzed argument of pragma Default_Initial_Condition in some
1892         dummy code as GNATprove mode disables assertions, but still
1893         needs to see the argument.
1895 2014-08-04  Robert Dewar  <dewar@adacore.com>
1897         * exp_ch6.adb, sem_util.adb: Minor reformatting.
1899 2014-08-04  Olivier Hainque  <hainque@adacore.com>
1901         * a-comutr.ads: Set Root_Node_Type'Alignment to
1902         Standard'Maximum_Alignment, so that it is at least as large as
1903         the max default for Tree_Node_Type'Alignment.
1905 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1907         * exp_ch3.adb (Freeze_Type): Remove the generation and inheritance
1908         of the default initial condition procedure [body].
1909         * sem_ch3.adb (Analyze_Declarations): Create the bodies of
1910         all default initial condition procedures at the end of private
1911         declaration analysis.
1912         * sem_util.adb (Build_Default_Init_Cond_Procedure_Bodies): New
1913         routine.
1914         (Build_Default_Init_Cond_Procedure_Body): Merged in the
1915         processing of routine Build_Default_Init_Cond_Procedure_Bodies.
1916         * sem_util.ads (Build_Default_Init_Cond_Procedure_Bodies):
1917         New routine.
1918         (Build_Default_Init_Cond_Procedure_Body): Removed.
1920 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
1922         * sem_elab.adb (Check_Elab_Call): Do not check a call to a
1923         postcondtion.
1924         * exp_ch6.adb (Expand_Call): Clarify handling of inserted
1925         postcondition call.
1927 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1929         * sem_prag.adb (Analyze_Pragma): Ensure that an
1930         internally generated spec for a stand alone body is recognized
1931         as a proper context for pragma SPARK_Mode.
1933 2014-08-04  Robert Dewar  <dewar@adacore.com>
1935         * erroutc.adb (Delete_Msg): Do not decrement Warnings_Treated_As_Errors.
1937 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
1939         * adabkend.adb (Scan_Back_End_Switches): Ignore extra -o
1940         when -gnatO has already been specified, for compatibility
1941         with gcc driver.
1942         (Scan_Compiler_Args): Do not call Set_Output_Object_File_Name in
1943         codepeer mode.
1944         * g-expect.ads: Fix typo.
1946 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1948         * exp_ch4.adb (Insert_Dereference_Action): the actual Size
1949         must account for the bounds template if the designated type is
1950         an unconstrained array.
1952 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1954         * a-cfhama.adb, a-cfhase.adb, a-cforma.adb, a-cforse.adb Add
1955         SPARK_Mode in the body.
1956         * sem_ch7.adb (Analyze_Package_Body_Helper): Restore the original
1957         way to verify the consistency of SPARK_Mode between a spec and
1958         a body.
1959         * sem_ch12.adb (Analyze_Package_Instantiation): Remove the call
1960         to Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1961         manually.
1962         (Analyze_Subprogram_Instantiation): Remove the call to
1963         Set_Ignore_Pragma_SPARK_Mode. Set flag Ignore_Pragma_SPARK_Mode
1964         manually.
1965         * sem_prag.adb (Analyze_Pragma): Remove local variable
1966         Inst_Id. SPARK_Mode can no longer be applied to a package or
1967         subprogram instantiation.
1968         * sem_util.adb, sem_util.ads (Set_Ignore_Pragma_SPARK_Mode):
1969         Removed.
1971 2014-08-04  Robert Dewar  <dewar@adacore.com>
1973         * sem_prag.adb, osint.adb, osint.ads: Minor reformatting.
1975 2014-08-04  Yannick Moy  <moy@adacore.com>
1977         * sem_ch3.adb (Derive_Type_Declaration,
1978         Process_Discriminants): Remove SPARK-specific legality checks.
1980 2014-08-04  Thomas Quinot  <quinot@adacore.com>
1982         * g-sechas.ads, g-sechas.adb (HMAC_Initial_Context): New subprogram.
1983         * gnat_rm.texi (GNAT.MD5/SHA1/SHA224/SHA256/SHA512): Document support
1984         for HMAC.
1986 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
1988         * sem_ch7.adb (Analyze_Package_Body_Helper): When verifying the
1989         compatibility of SPARK_Mode between a spec and a body, use the
1990         SPARK_Mode of the public part.
1991         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Use
1992         the already available routine to exchange the aspects between
1993         the template and its copy. Analyze the aspects of copy to
1994         ensure that the corresponding pragmas perform their semantic
1995         effects.  The partial analysis of aspects is no longer needed.
1996         (Analyze_Package_Instantiation): Save and restore the SPARK_Mode
1997         of the context.
1998         (Analyze_Subprogram_Instantiation): Save and restore the SPARK_Mode of
1999         the context.
2000         * sem_prag.adb (Analyze_Pragma): Do not bypass a subprogram
2001         instantiation which does not come from source.
2003 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2005         * a-cfhama.ads, a-cfhase.ads, a-cforma.ads, a-cforse.ads Add
2006         SPARK_Mode pragmas to the public and private part of the unit.
2007         * sem_ch3.adb (Derive_Type_Declaration): Ensure that a derived
2008         type cannot have discriminants if the parent type already has
2009         discriminants.
2010         (Process_Discriminants): Ensure that the type of a discriminant is
2011         discrete.
2012         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The check on
2013         SPARK_Mode compatibility between a spec and a body can now be
2014         safely performed while processing a generic.
2015         * sem_ch7.adb (Analyze_Package_Body_Helper): The check on
2016         SPARK_Mode compatibility between a spec and a body can now be
2017         safely performed while processing a generic.
2018         * sem_prag.adb (Analyze_Pragma): Pragma SPARK_Mode can now be
2019         safely analyzed when processing a generic.
2021 2014-08-04  Nicolas Roche  <roche@adacore.com>
2023         * g-dirope.adb: Minor reformating.
2025 2014-08-04  Robert Dewar  <dewar@adacore.com>
2027         * sem_ch6.adb: Minor reformatting.
2029 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2031         * sem_prag.adb (Analyze_Pragma, case Assert and related pragmas):
2032         Before normalizing these pragmas into a pragma Check, preanalyze
2033         the optional Message argument, (which is subsequently copied)
2034         so that it has the proper semantic information for ASIS use.
2035         * sem_case.adb: Initialize flag earlier.
2036         * osint.adb, osint.ads (Find_File): Add parameter Full_Name, used when
2037         the full source path of a configuration file is requested.
2038         (Read_Source_File): Use Full_Name parameter..
2040 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2042         * opt.ads Alphabetize various global flags. New flag
2043         Ignore_Pragma_SPARK_Mode along with a comment on usage.
2044         * sem_ch6.adb (Analyze_Generic_Subprogram_Body):
2045         Pragma SPARK_Mode is now allowed in generic units.
2046         (Analyze_Subprogram_Body_Helper): Do not verify the compatibility
2047         between the SPARK_Mode of a spec and that of a body when inside
2048         a generic.
2049         * sem_ch7.adb (Analyze_Package_Body_Helper): Do not verify the
2050         compatibility between the SPARK_Mode of a spec and that of a
2051         body when inside a generic.
2052         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration):
2053         Pragma SPARK_Mode is now allowed in generic units.
2054         (Analyze_Package_Instantiation): Save and restore the value of
2055         flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2056         the governing SPARK_Mode before analyzing the instance.
2057         (Analyze_Subprogram_Instantiation): Save and restore the value
2058         of flag Ignore_ Pragma_SPARK_Mode in a stack-like fasion. Set
2059         the governing SPARK_Mode before analyzing the instance.
2060         * sem_ch13.adb (Analyze_Aspect_Specifications): Emulate the
2061         placement of a source pragma when inserting the generated pragma
2062         for aspect SPARK_Mode.
2063         * sem_prag.adb (Analyze_Pragma): Reimplement the handling of
2064         pragma SPARK_Mode to allow for generics and their respective
2065         instantiations.
2066         * sem_util.ads, sem_util.adb (Check_SPARK_Mode_In_Generic): Removed.
2067         (Set_Ignore_Pragma_SPARK_Mode): New routine.
2069 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2071         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Component>: Deal with
2072         renaming discriminants in tagged types first.
2073         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Test
2074         the underlying type of the prefix.
2075         (Pragma_to_gnu, case Pragma_Warning): Ignore Reason => "..."
2076         (process_freeze_entity): Reset the nodes of all the view of a type,
2077         if any.
2079 2014-08-04  Doug Rupp  <rupp@adacore.com>
2080             Olivier Hainque  <hainque@adacore.com>
2082         * gcc-interface/Makefile.in (x86 VxWorks): Add filter-out for vxworks7
2083         and remove incorrect EH_MECHANISM macros.
2084         Add sigtramp.h to EXTRA_LIBGNAT_SRCS when we add sigtramp-vxworks.o to
2085         EXTRA_LIBGNAT_OBJS.
2087 2014-08-04  Robert Dewar  <dewar@adacore.com>
2089         * exp_attr.adb (Expand_N_Attribute_Reference): Make sure prefix
2090         of constructed 'Valid attribute in -gnatVa mode does not appear
2091         to come from source.
2092         * sem_attr.adb (Analyze_Access_Attribute): Don't set
2093         Never_Set_In_Source for non-source reference.
2094         * sem_util.adb: Minor reformatting.
2095         * sem_warn.adb (Check_References): Don't check Address_Taken,
2096         not necessary, see comment.
2098 2014-08-04  Robert Dewar  <dewar@adacore.com>
2100         * sem_util.adb, sem_case.adb: Minor reformatting.
2102 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2104         * exp_ch9.adb (Extract_Entry): If the synchronized object is a
2105         limited view, replace with non-limited view, which is available
2106         at the point of an entry call.
2108 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2110         * exp_ch6.adb (Expand_Call): If the call is to a function in
2111         a run-time unit that is marked Inline_Always, we must suppress
2112         debugging information on it, so that the code that is eventually
2113         inlined will not affect debugging of the user program.
2115 2014-08-04  Robert Dewar  <dewar@adacore.com>
2117         * inline.adb, einfo.ads, s-tassta.adb, s-tarest.adb: Minor comment
2118         fixes.
2120 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2122         * sem_prag.adb (Process_Import_Or_Interface): Handle properly
2123         an aspect Import that specifies a False value.
2125 2014-08-04  Robert Dewar  <dewar@adacore.com>
2127         * gnat_rm.texi: Add section on aspect Invariant'Class.
2129 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2131         * sem_case.adb (Check_Choice_Set): New flag Predicate_Error,
2132         for better control of cascaded error messages when some choice
2133         in a case statement over a predicated type violates the given
2134         static predicate.
2136 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2138         * sem_ch3.adb (Build_Derived_Type): Modify the
2139         inheritance of the rep chain to ensure that a non-tagged type's
2140         items are not clobbered during the inheritance.
2142 2014-08-04  Robert Dewar  <dewar@adacore.com>
2144         * sem_ch3.adb, einfo.ads: Minor reformatting.
2146 2014-08-04  Yannick Moy  <moy@adacore.com>
2148         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Fix
2149         detection of subprograms that cannot be inlined in GNATprove mode.
2151 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2153         * einfo.adb: Add guard to Returns_Limited_View.
2155 2014-08-04  Jose Ruiz  <ruiz@adacore.com>
2157         * s-tassta.adb, s-tarest.adb (Task_Wrapper): Force maximum alignment of
2158         the secondary stack to respect the alignments of the returned objects.
2160 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2162         * einfo.ads, einfo.adb (Returns_Limited_View): New flag defined
2163         on function entities whose return type is a limited view.
2164         * freeze.adb (Freeze_Entity): Use Returns_Limited_View to determine
2165         where to place the freeze node for a function that returns the
2166         limited view of a type, when the function is called and frozen
2167         in a different unit.
2169 2014-08-04  Eric Botcazou  <ebotcazou@adacore.com>
2171         * sem_ch3.adb (Build_Derived_Private_Type): Minor code
2172         refactoring.
2174 2014-08-04  Robert Dewar  <dewar@adacore.com>
2176         * gnat_ugn.texi: Clarify documentation on assertions.
2178 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2180         * sem_aggr.adb (Resolve_Record_Aggregate, Get_Value): Warn
2181         if a component association has a box initialization when the
2182         component type has no default initialization, either through an
2183         initial value, an aspect, or an implicit initialization procedure.
2185 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2187         * freeze.adb: Code clean up.
2189 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2191         * sem_ch5.adb: Minor reformatting.
2193 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2195         * freeze.adb (Late_Freeze_Subprogram): Following AI05-151,
2196         a function can return a limited view of a type declared
2197         elsewhere. In that case the function cannot be frozen at the end
2198         of its enclosing package. If its first use is in a different unit,
2199         it cannot be frozen there, but if the call is legal the full view
2200         of the return type is available and the subprogram can now be
2201         frozen. However the freeze node cannot be inserted at the point
2202         of call, but rather must go in the package holding the function,
2203         so that the backend can process it in the proper context.
2205 2014-08-04  Robert Dewar  <dewar@adacore.com>
2207         * exp_ch5.adb, sem_ch5.adb, einfo.ads: Minor reformatting.
2209 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2211         * sem_ch4.adb (Operator_Check): Refine previous change.
2213 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2215         * sem_scil.ads: Improve comments.
2216         * sem_ch4.adb (Analyze_Equality_Op): Add support for
2217         Allow_Integer_Address (equality between Address and Integer).
2219 2014-08-04  Yannick Moy  <moy@adacore.com>
2221         * a-cfhama.adb, a-cforse.adb: Minor fixes to avoid using prefix
2222         notation on untagged objects.
2223         * sem.ads: Update comment.
2224         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Do
2225         not inline subprograms declared in the visible part of a package.
2227 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2229         * exp_ch5.adb: minor reformatting.
2230         * einfo.ads, einfo.adb (Is_Processed_Transient): Applies to loop
2231         parameters.
2233 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2235         * s-fatgen.adb: Minor reformatting.
2237 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2239         * exp_util.adb (Is_Possibly_Unaligned_Object): Always return
2240         False on .NET.
2242 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2244         * sem_ch5.adb (Analyze_Loop_Statement): Set properly the kind of
2245         the loop parameter for element iterators over containers and
2246         arrays, so that improper uses of it are detected in the loop
2247         body when expansion is disabled.
2248         * exp_ch5.adb (Expand_Iterator_Loop): The entity kind of the
2249         generated cursor is that of the analyzed loop parameter.
2251 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2253         * exp_ch3.adb (Build_CPP_Init_Procedure): Remove
2254         Flag_Decl. Do not analyze the declaration of the flag as it is
2255         not part of the tree yet, instead add it to the freeze actions
2256         of the C++ type.
2258 2014-08-04  Robert Dewar  <dewar@adacore.com>
2260         * checks.adb (Apply_Scalar_Range_Check): Make sure we handle
2261         case of OUT and IN OUT parameter correctly (where Source_Typ is
2262         set), we were missing one case where a check must be applied.
2264 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2266         * sem_ch8.adb (Build_Class_Wide_Wrapper): Update the comment on
2267         the generated code. Instead of hiding the renaming and using the
2268         wrapper as the proper association, have the subprogram renaming
2269         alias the wrapper.
2270         (Build_Spec): The entity of the wrapper is
2271         now derived from the entity of the related primitive.
2273 2014-08-04  Emmanuel Briot  <briot@adacore.com>
2275         * s-regpat.adb: s-regpat.adb (Parse): fix incorrect link when
2276         using non-capturing groups.
2278 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2280         * inline.adb (Build_Body_To_Inline): Remove Unmodified and
2281         related pragmas before copying the original body, to prevent
2282         spurious errors when the pragmas apply to formals that will not
2283         appear in the inlined body.
2285 2014-08-04  Robert Dewar  <dewar@adacore.com>
2287         * exp_prag.adb, sem_ch7.adb, einfo.adb, sem_prag.adb, sem_util.adb,
2288         exp_ch3.adb: Minor reformatting.
2290 2014-08-04  Robert Dewar  <dewar@adacore.com>
2292         * prj-strt.adb, prj-strt.ads, sem_attr.adb: Minor reformatting.
2294 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2296         * aspects.adb Add an entry in table Canonical_Aspect for
2297         Default_Initial_Condition.
2298         * aspects.ads Add an entry in tables Aspect_Id, Aspect_Argument,
2299         Aspect_Names and Aspect_Delay for Default_Initial_Condition.
2300         * einfo.adb Flag3 is now Has_Default_Init_Cond. Flag132
2301         is now Is_Default_Init_Cond_ Procedure. Flag133 is now
2302         Has_Inherited_Default_Init_Cond.
2303         (Default_Init_Cond_Procedure): New routine.
2304         (Has_Default_Init_Cond): New routine.
2305         (Has_Inherited_Default_Init_Cond): New routine.
2306         (Is_Default_Init_Cond_Procedure): New routine.
2307         (Set_Default_Init_Cond_Procedure): New routine.
2308         (Set_Has_Default_Init_Cond): New routine.
2309         (Set_Has_Inherited_Default_Init_Cond): New routine.
2310         (Set_Is_Default_Init_Cond_Procedure): New routine.
2311         (Write_Entity_Flags): Output all the new flags.
2312         * einfo.ads New attributes Default_Init_Cond_Procedure,
2313         Has_Inherited_Default_Init_Cond and Is_Default_Init_Cond_Procedure
2314         along with usage in nodes.
2315         (Default_Init_Cond_Procedure): New routine.
2316         (Has_Default_Init_Cond): New routine and pragma Inline.
2317         (Has_Inherited_Default_Init_Cond): New routine and
2318         pragma Inline.
2319         (Is_Default_Init_Cond_Procedure): New routine and
2320         pragma Inline.
2321         (Set_Default_Init_Cond_Procedure): New routine.
2322         (Set_Has_Default_Init_Cond): New routine and pragma Inline.
2323         (Set_Has_Inherited_Default_Init_Cond): New routine and pragma Inline.
2324         (Set_Is_Default_Init_Cond_Procedure): New routine and pragma Inline.
2325         * exp_ch3.adb (Expand_N_Object_Declaration): New constant
2326         Next_N. Generate a call to the default initial condition procedure
2327         if the object's type is subject to the pragma.  (Freeze_Type):
2328         Generate the body of the default initial condition procedure or
2329         inherit the spec from a parent type.
2330         * exp_ch7.adb Add with and use clause for Exp_Prag.
2331         (Expand_Pragma_Initial_Condition): Removed.
2332         * exp_prag.ads, exp_prag.adb (Expand_Pragma_Initial_Condition): New
2333         routine.
2334         * par-prag.adb (Prag): Pragma Default_Initial_Condition does
2335         not need special treatment by the parser.
2336         * sem_ch3.adb (Build_Derived_Record_Type): Propagate the
2337         attributes related to pragma Default_Initial_Condition to the
2338         derived type.
2339         (Process_Full_View): Propagate the attributes
2340         related to pragma Default_Initial_Condition to the full view.
2341         * sem_ch7.adb (Analyze_Package_Specification): Build the
2342         declaration of the default initial condition procedure for all
2343         types that qualify or inherit the one from the parent type.
2344         * sem_ch13.adb (Analyze_Aspect_Specifications):
2345         Add processing for aspect Default_Initial_Condition.
2346         (Check_Aspect_At_Freeze_Point): Aspect
2347         Default_Initial_Condition does not require delayed analysis.
2348         (Replace_Type_References_Generic): Moved to spec.
2349         * sem_ch13.ads (Replace_Type_References_Generic): Moved from body.
2350         * sem_prag.adb Add an entry in table Sif_Glags for
2351         Default_Initial_Condition.
2352         (Analyze_Pragma): Pragma
2353         Default_Initial_Condition is now part of assertion
2354         policy. Add processing for pragma Default_Initial_Condition.
2355         (Is_Valid_Assertion_Kind): Pragma Default_Initial_Condition is
2356         now recognized as a proper assertion policy.
2357         * sem_util.ads, sem_util.adb (Build_Default_Init_Cond_Call): New
2358         routine.
2359         (Build_Default_Init_Cond_Procedure_Body): New routine.
2360         (Build_Default_Init_Cond_Procedure_Declaration): New routine.
2361         (Inherit_Default_Init_Cond_Procedure): New routine.
2362         * snames.ads-tmpl Add new predefined name and pragma id for
2363         Default_Initial_Condition.
2365 2014-08-04  Vincent Celier  <celier@adacore.com>
2367         * prj-dect.adb (Parse_Case_Construction): It is no longer
2368         an error if the variable for a case construction is not
2369         typed, only if the variable value is not a single string. Call
2370         Parse_Choice_List and End_Case_Construction with the new parameter
2371         to indicate that the variable is typed.
2372         * prj-strt.adb (End_Case_Construction): Only check the labels
2373         if the variable is typed.  If the variable is not typed,
2374         issue a warning when there is no "when others" allternative.
2375         (Parse_Choice_List): Manage the labels only if the variable
2376         is typed.
2377         * prj-strt.ads (End_Case_Construction): New Boolean parameter
2378         String_Type.
2379         (Parse_Choice_List): Ditto.
2381 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2383         * sem_ch5.adb: Additional fix to Check_Predicate_Use.
2385 2014-08-04  Vincent Celier  <celier@adacore.com>
2387         * projects.texi: Update documentation of case constructions with
2388         variables that are not typed.
2390 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2392         * sem_ch8.adb (Build_Class_Wide_Wrapper): If the operator carries
2393         an Eliminated pragma, indicate that the wrapper is also to be
2394         eliminated, to prevent spurious errors when using gnatelim on
2395         programs that include box-initialization of equality operators
2396         (consequence of AI05-071)..
2398 2014-08-04  Robert Dewar  <dewar@adacore.com>
2400         * checks.adb (Activate_Overflow_Check): Handle floating-point
2401         case correctly.
2402         * checks.ads (Activate_Overflow_Check): Clarify handling of
2403         floating-point cases.
2404         * exp_util.adb (Check_Float_Op_Overflow): Reset Do_Overflow_Check
2405         flag if we generate an explicit overflow check (for
2406         Check_Float_Overflow mode).
2408 2014-08-04  Robert Dewar  <dewar@adacore.com>
2410         * prj-proc.adb, prj-part.adb, prj-strt.adb, prj.adb, prj.ads,
2411         prj-attr.adb, prj-attr.ads: Minor reformatting.
2413 2014-08-04  Yannick Moy  <moy@adacore.com>
2415         * expander.adb (Expand): Always perform special
2416         expansion in GNATprove mode, even when doing pre-analysis.
2418 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2420         * repinfo.adb (List_Scalar_Storage_Order): List bit order if
2421         not default. Also list bit order if SSO is specified. Do not
2422         assume that bit order is always equal to scalar storage order.
2424 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2426         * freeze.adb (Set_SSO_From_Default): Do not set scalar storage
2427         order to reverse SSO for a type that has an explicit native
2428         Bit_Order.
2430 2014-08-04  Doug Rupp  <rupp@adacore.com>
2432         * cal.c: Macro check for VxWorks7.
2433         * init.c (getpid): Likewise.
2434         * mkdir.c (__gnat_mkdir): Likewise.
2435         * sysdep.c (__gnat_is_file_not_found_error): Likewise.
2437 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2439         * exp_ch3.adb (Expand_N_Object_Declaration): Inhibit generation
2440         of an invariant check in the case where No_Initialization is set,
2441         since the object is uninitialized.
2443 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2445         * snames.ads-tmpl (Default_Scalar_Storage_Order): Now an attribute
2446         name, in addition to a pragma name.
2447         * snames.adb-tmpl (Get_Pragma_Id, Is_Configuration_Pragma_Name,
2448         Is_Pragma_Name): Adjust accordingly.
2449         * sem_attr.ads, sem_attr.adb, exp_attr.adb
2450         (Attribute_Default_Scalar_Storage_Order): Add handling of new
2451         attribute.
2452         * gnat_rm.texi: Document the above.
2454 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2456         * exp_util.adb (Check_Float_Op_Overflow): No-op in codepeer
2457         mode for now, to revert to previous behavior.
2458         * checks.adb: Revert previous change, no longer needed.
2460 2014-08-04  Robert Dewar  <dewar@adacore.com>
2462         * gnat1drv.adb (Adjust_Global_Switches): Don't set
2463         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2464         * sem_prag.adb (Analyze_Pragma, case Check_Float_Overflow): Don't
2465         set Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2466         * switch-c.adb (Scan_Front_End_Switches): Don't set
2467         Check_Float_Overflow if Machine_Oveflows_On_Target is True.
2469 2014-08-04  Vincent Celier  <celier@adacore.com>
2471         * prj-attr.adb: Add new default indications for
2472         attributes Object_Dir, Exec_Dir, Source_Dirs and Target.
2473         (Attribute_Default_Of): New function (Initialize): Set the
2474         default for those attributes that have one specified.
2475         * prj-attr.ads (Attribute_Data): New component Default.
2476         * prj-proc.adb (Expression): Take into account the new defaults
2477         for attributes Object_Dir, Exec_Dir and Source_Dirs.
2478         * prj-strt.adb (Attribute_Reference): Set the default for
2479         the attribute.
2480         * prj-tree.ads, prj-tree.adb (Default_Of): New function.
2481         (Set_Default_Of): New procedure.
2482         * prj.adb (The_Dot_String): New global Name_Id variable,
2483         initialized in procedure Initialize.
2484         (Dot_String): New function
2485         (Initialize): Initialize The_Dot_String.
2486         (Reset): Create the string list Shared.Dot_String_List.
2487         * prj.ads (Attribute_Default_Value): New enumeration type.
2488         (Project_Qualifier): Change enumeration value Dry to Abstract_Project.
2489         (Dot_String): New function.
2490         (Shared_Project_Tree_Data): New string list component Dot_String_List.
2491         * projects.texi: Document new defaults for attribute Object_Dir,
2492         Exec_Dir and Source_Dirs.
2494 2014-08-04  Robert Dewar  <dewar@adacore.com>
2496         * sem_ch12.adb: Minor reformatting.
2498 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2500         * exp_util.adb, checks.adb (Check_Float_Op_Overflow): Add special
2501         expansion in CodePeer_Mode.
2502         (Selected_Range_Checks): Add handling of overflow checks in
2503         CodePeer_Mode.
2505 2014-08-04  Robert Dewar  <dewar@adacore.com>
2507         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
2508         Remove special test for Float'First, no longer required.
2509         (Expand_N_Attribute_Reference, case Succ): Remove special test
2510         for Float'First, no longer required.
2511         * s-fatgen.adb (Pred): return infinity unchanged.
2512         (Succ): ditto.
2514 2014-08-04  Claire Dross  <dross@adacore.com>
2516         * sem_ch12.adb (Analyze_Associations): Defaults should only be
2517         used if there is no explicit match.
2518         * exp_util.adb (Get_First_Parent_With_Ext_Axioms_For_Entity):
2519         Also check for pragma external_axiomatization on generic units.
2521 2014-08-04  Robert Dewar  <dewar@adacore.com>
2523         * checks.adb (Activate_Overflow_Check): Remove
2524         Check_Float_Overflow processing.
2525         (Apply_Scalar_Range_Check): Ditto.
2526         (Generate_Range_Check): Ditto.
2527         * exp_ch4.adb (Expand_N_Op_Add): Add call to
2528         Check_Float_Op_Overflow.
2529         (Expand_N_Op_Divide): ditto.
2530         (Expand_N_Op_Multiply): ditto.
2531         (Expand_N_Op_Subtract): ditto.
2532         * exp_util.ads, exp_util.adb (Check_Float_Op_Overflow): New procedure.
2533         * sem_attr.adb (Analyze_Attribute, case Pred): Make sure
2534         Do_Range_Check is set for floating-point case in -gnatc or
2535         GNATprove mode.
2536         (Analyze_Attribute, case Succ): Make sure
2537         Do_Range_Check is set for floating-point case in -gnatc or
2538         GNATprove mode.
2539         * sem_res.adb (Resolve_Type_Conversion): Make sure Do_Range_Check
2540         flag is set for real to integer conversion in GNATprove or
2541         -gnatc mode.
2543 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2545         * sem_ch13.adb (Analyze_Aspect_Specifications): Resolve
2546         the expression of an Import or Export aspect as type Boolean
2547         and require it to be static. Add ??? comment. Also, set the
2548         Is_Exported flag when appropriate.
2550 2014-08-04  Robert Dewar  <dewar@adacore.com>
2552         * exp_ch4.adb: Minor reformatting.
2553         * exp_attr.adb: Minor reformatting.
2555 2014-08-04  Thomas Quinot  <quinot@adacore.com>
2557         * s-fatgen.ads, s-fatgen.adb (S, P): New visible type declarations
2558         (Unaligned_Valid): Remove now unused subprogram.
2559         * exp_attr.adb (Expand_N_Attribute_Reference, case
2560         Attribute_Valid): If the prefix is in reverse SSO or potentially
2561         unaligned, copy it using a byte copy operation to a temporary
2562         variable.
2563         * einfo.adb: Minor comment fix.
2565 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2567         * freeze.adb (Freeze_Entity): Do not freeze formal subprograms.
2569 2014-08-04  Robert Dewar  <dewar@adacore.com>
2571         * s-imgrea.adb (Image_Floating_Point): Don't add space before +Inf.
2572         * s-fatgen.adb (Pred): Handle Float'First.
2573         (Succ): Handle Float'Last.
2575 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2577         * sem_util.adb (Is_Potentially_Unevaluated): If the original
2578         node of a parent node in the tree is a short-circuit operation,
2579         the node is potentially unevaluated.
2581 2014-08-04  Robert Dewar  <dewar@adacore.com>
2583         * sem_res.adb (Resolve_Type_Conversion): Set Do_Range_Check on
2584         conversion from a real type to an integer type.
2586 2014-08-04  Yannick Moy  <moy@adacore.com>
2588         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_ch7.adb, sem_ch9.adb,
2589         sem_ch12.adb, sem_util.adb, sem_util.ads, sem_res.adb, sem_attr.adb,
2590         exp_ch6.adb, sem_ch4.adb, restrict.adb, restrict.ads, sem_ch6.adb,
2591         sem_ch8.adb, sem_ch11.adb: Update some subprogram names to refer to
2592         SPARK_05 instead of SPARK.
2594 2014-08-04  Robert Dewar  <dewar@adacore.com>
2596         * sem.ads: Minor reformatting.
2597         * sem_ch13.adb (Analyze_Aspect_External_Or_Link_Name): Minor
2598         reformatting.
2599         (Analyze_Aspect_Specifications, case Convention): Put External_Name
2600         before Link_Name when constructing pragma.
2602 2014-08-04  Yannick Moy  <moy@adacore.com>
2604         * sem.adb, sem.ads (In_Default_Expr): Global flag that is set
2605         to True during analysis of a default component expression.
2606         (Semantics): Save and restore In_Default_Expr around analysis.
2607         * sem_ch3.adb, sem_ch3.ads (Analyze_Component_Declaration):
2608         Call new wrapper Preanalyze_Default_Expression.
2609         (Preanalyze_Default_Expression): New wrapper on
2610         Preanalyze_Spec_Expression which sets and restores In_Default_Expr.
2611         * sem_res.adb (Resolve_Call): Mark calls inside default
2612         expressions as not inlined in GNATprove mode.
2614 2014-08-04  Robert Dewar  <dewar@adacore.com>
2616         * exp_ch4.adb: Minor reformatting.
2618 2014-08-04  Olivier Hainque  <hainque@adacore.com>
2620         * link.c: remove const on __gnat_objlist_file_supported for AIX
2622 2014-08-04  Robert Dewar  <dewar@adacore.com>
2624         * sem_util.ads: Minor addition of comment.
2626 2014-08-04  Vincent Celier  <celier@adacore.com>
2628         * prj-dect.adb (Check_Package_Allowed): Allow package IDE in
2629         all projects, including aggregate and aggregate library projects.
2631 2014-08-04  Yannick Moy  <moy@adacore.com>
2633         * back_end.adb (Call_Back_End): Do not call gigi in GNATprove mode.
2635 2014-08-04  Robert Dewar  <dewar@adacore.com>
2637         * sem_eval.adb (Test_In_Range): Always in range for
2638         Is_Known_Valid target type, where input type has smaller or
2639         equal size and does not have biased rep.
2641 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2643         * sem_attr.adb (Eval_Attribute): Constrained is not treated as
2644         a static attribute, and the Static flag must not be set on it
2645         during resolution. It may be constant-folded during expansion,
2646         but if expansion is disabled it is not a static expression.
2648 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2650         * sem_ch8.adb (Build_Class_Wide_Wrapper): Mark the primitive as
2651         referenced once resolution has taken place.
2653 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2655         * exp_ch4.adb (Expand_N_Type_Conversion): Don't
2656         compare access levels in the case where the target type is the
2657         anonymous type of an access discriminant, since the level of
2658         such types is defined based on context. Add comment.
2660 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2662         * sem_ch8.adb (Build_Class_Wide_Wrapper): Handle various special
2663         cases related to equality.  Remove the special processing
2664         for dispatching abstract subprograms as it is not needed.
2665         (Interpretation_Error): Add a specialized error message for
2666         predefined operators.
2667         (Is_Intrinsic_Equality): New routine.
2668         (Is_Suitable_Candidate): New routine.
2670 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2672         * checks.adb: Minor comment reformatting.
2674 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2676         * restrict.adb (Check_Restriction): For checked max_parameter
2677         restrictions reset Violated flag, so that subsequent violations
2678         are properly detected.
2680 2014-08-04  Robert Dewar  <dewar@adacore.com>
2682         * sem_ch3.adb (Check_Initialization): Fix bad test of GNATprove
2683         mode.
2684         (Process_Discriminants): Fix bad test of GNATprove mode
2686 2014-08-04  Hristian Kirtchev  <kirtchev@adacore.com>
2688         * sem_ch12.adb (Instantiate_Formal_Subprogram):
2689         Move variable to their own section. Propagate the source
2690         location of a formal parameter to the corresponding formal of
2691         the subprogram renaming declaration. Code reformatting.
2693 2014-08-04  Arnaud Charlet  <charlet@adacore.com>
2695         * g-trasym-vms-ia64.adb, g-trasym-vms-alpha.adb: Removed.
2697 2014-08-04  Ed Schonberg  <schonberg@adacore.com>
2699         * exp_aggr.adb (Expand_Array_Aggregate): Do not attempt expansion
2700         if error already detected.  We may reach this point in spite of
2701         previous errors when compiling with -gnatq, to force all possible
2702         errors (this is the usual ACATS mode).
2704 2014-08-04  Gary Dismukes  <dismukes@adacore.com>
2706         * checks.adb (Generate_Range_Check): For the case of converting
2707         a base type with a larger range to a smaller target subtype, only
2708         use unchecked conversions of bounds in the range check followed
2709         by conversion in the case where both types are discrete. In other
2710         cases, convert to the target base type and save in a temporary
2711         followed by the range check.
2712         (Convert_And_Check_Range): New procedure factoring code to save
2713         conversion to a temporary followed by a range check (called two
2714         places in Generate_Range_Check).
2715         * exp_ch4.adb (Expand_N_Type_Conversion): Relax previous
2716         check-in, to generate range checks for conversions between
2717         any floating-point types rather than limiting it to matching
2718         base types.
2720 2014-08-02  Trevor Saunders  <tsaunders@mozilla.com>
2722         * gcc-interface/trans.c: Use hash_set instead of pointer_set.
2724 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2726         * restrict.adb (Update_Restrictions): For restrictions with a
2727         maximum parameter (e.g. number of protected entries in Ravenscar)
2728         do not compute the maximum of the violation over several objects,
2729         because the restriction is per-object.
2730         (Check_Restriction): After possible message, reset the value
2731         of of a checked max_parameter restriction to zero, to prevent
2732         cascaded errors.
2733         * sem_ch3.adb (Build_Derived_Private_Type): Use base of parent
2734         (sub)type to determine whether derived type should be on the
2735         list of private dependents of a type whose full view may become
2736         visible subsequently.
2738 2014-08-01  Olivier Hainque  <hainque@adacore.com>
2740         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS, native): use
2741         $(CXX) instead of ../../xg++ to feed CXX.
2742         (CXX_LFLAGS): Remove. Now unused as the proper flags
2743         are expected to be included in the CXX variable.
2745 2014-08-01  Pierre-Marie Derodat  <derodat@adacore.com>
2747         * gcc-interface/decl.c (elaborate_expression_1): Return the new
2748         variable when debug info is needed and the expression is not
2749         constant.  Tag as external only new variables that are global.
2750         (gnat_to_gnu_entity): Call it after the GNU declaration is saved.
2751         * gcc-interface/trans.c (Attribute_to_gnu): Do not cache
2752         attributes for IN array parameters when their actual subtype
2753         needs debug info.
2754         (Compilation_Unit_to_gnu): Call it to process all remaining nodes.
2755         * gcc-interface/gigi.h (process_deferred_decl_context): New.
2756         * gcc-interface/utils.c (gnat_write_global_declarations): Do not
2757         emit debug info for ignored global declarations.
2758         (struct deferred_decl_context_node,
2759         add_deferred_decl_context, add_deferred_type_context,
2760         compute_deferred_decl_context, defer_or_set_type_context,
2761         deferred_decl_context_queue, get_debug_scope,
2762         get_global_context, process_deferred_decl_context): New.
2763         (gnat_pushdecl): Re-implement the DECL_CONTEXT and TYPE_CONTEXT
2764         computation machinery to rely on the GNAT Scope attribute.
2766 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2768         * gcc-interface/utils2.c (build_simple_component_ref): Add guard.
2770 2014-08-01  Robert Dewar  <dewar@adacore.com>
2772         * sem_ch8.adb, opt.ads Minor comment updates.
2774 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2776         * exp_intr.adb (Expand_Unc_Deallocation): Request a renaming
2777         from the side effects removal machinery.
2778         * exp_util.adb (Duplicate_Subexpr): Add formal parameter
2779         Renaming_Req. Update the nested call to Remove_Side_Effects.
2780         (Duplicate_Subexpr_No_Checks): Add formal parameter
2781         Renaming_Req. Update the nested call to Remove_Side_Effects.
2782         (Duplicate_Subexpr_Move_Checks): Add formal parameter
2783         Renaming_Req. Update the nested call to Remove_Side_Effects.
2784         (Remove_Side_Effects): Add formal parameter Renaming_Req. Generate
2785         an object renaming declaration when the caller requests it.
2786         * exp_util.ads (Duplicate_Subexpr): Add formal
2787         parameter Renaming_Req. Update comment on usage.
2788         (Duplicate_Subexpr_No_Checks): Add formal parameter Renaming_Req.
2789         (Duplicate_Subexpr_Move_Checks): Add formal parameter
2790         Renaming_Req.
2792 2014-08-01  Bob Duff  <duff@adacore.com>
2794         * gnat_ugn.texi: Minor updates.
2796 2014-08-01  Robert Dewar  <dewar@adacore.com>
2798         * atree.adb: Minor reformatting.
2800 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2802         * exp_aggr.adb (Init_Hidden_Discriminants): If some ancestor is a
2803         private extension, get stored constraint, if any, from full view.
2805 2014-08-01  Robert Dewar  <dewar@adacore.com>
2807         * opt.ads (No_Elab_Code_All_Pragma): New global variable.
2808         * sem_ch10.adb (Check_No_Elab_Code_All): New procedure
2809         (Analyze_Compilation_Unit): Call Check_No_Elab_Code_All
2810         (Analyze_Subunit_Context): Call Check_No_Elab_Code_All.
2811         * sem_prag.adb (Analyze_Pragma, case No_Elaboration_Code_All):
2812         Remove code for checking with's, now in sem_ch10.adb, set
2813         Opt.No_Elab_Code_All_Pragma.
2815 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2817         * sem_ch3.adb (Copy_And_Build): Copy the declaration for
2818         access types as well and adjust the subtype mark if there are
2819         no constraints.
2821 2014-08-01  Robert Dewar  <dewar@adacore.com>
2823         * sem_eval.adb (Test_In_Range): Return Unknown if error posted.
2825 2014-08-01  Robert Dewar  <dewar@adacore.com>
2827         * sem_ch3.adb, einfo.ads, exp_ch4.adb: Code clean ups.
2829 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2831         * einfo.ads (Has_Private_Ancestor): Remove obsolete usage.
2832         * exp_ch4.adb (Expand_Composite_Equality): Add conversion
2833         of the actuals in the case of untagged record types too.
2834         * sem_ch3.adb (Build_Full_Derivation): New procedure to create the
2835         full derivation of a derived private type, extracted from...
2836         (Copy_And_Build): In the case of record types and most
2837         enumeration types, copy the original declaration.  Build the
2838         full derivation according to the approach extracted from...
2839         (Build_Derived_Private_Type): ...here.  Call Build_Full_Derivation
2840         to create the full derivation in all existing cases and also
2841         create it in the no-discriminants/discriminants case instead of
2842         deriving directly from the full view.
2843         (Is_Visible_Component): Remove obsolete code.
2844         * sem_aggr.adb (Resolve_Record_Aggregate): Likewise.
2846 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2848         * fe.h (GNAT_Mode): New.
2849         * gcc-interface/decl.c (gnat_to_gnu_entity): Do not error out on
2850         reverse SSO in GNAT mode.
2852 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2854         * freeze.adb: Minor reformatting.
2856 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2858         * exp_ch3.adb (Default_Initialize_Object): Do not generate
2859         default initialization for an imported object.
2861 2014-08-01  Olivier Hainque  <hainque@adacore.com>
2863         * seh_init.c (__gnat_map_SEH): Cast argument of IsBadCodePtr
2864         to the expected FARPROC type instead of void *.
2865         * adaint.c (f2t): Expect __time64_t * as second argument, in line with
2866         other datastructures.
2867         (__gnat_file_time_name_attr): Adjust accordingly.
2868         (__gnat_check_OWNER_ACL): Declare pSD as PSECURITY_DESCRIPTOR,
2869         in line with uses.
2870         (__gnat_check_OWNER_ACL): Declare AccessMode
2871         parameter as ACCESS_MODE instead of DWORD, in line with callers
2872         and uses.
2873         (__gnat_set_executable): Add ATTRIBUTE_UNUSED on mode,
2874         unused on win32.  Correct cast of "args" on call to spawnvp.
2875         (add_handle): Cast realloc calls into their destination types.
2876         (win32_wait): Remove declaration and initialization of unused variable.
2877         (__gnat_locate_exec_on_path): Cast alloca calls
2878         into their destination types.
2879         * initialize.c (append_arg, __gnat_initialize): Cast xmalloc calls into
2880         their destination types.
2882 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
2884         * exp_ch4.adb (Expand_N_Type_Conversion): Expand
2885         range checks for conversions between floating-point subtypes
2886         when the target and source types are the same.
2888 2014-08-01  Robert Dewar  <dewar@adacore.com>
2890         * exp_aggr.adb: Minor reformatting.
2892 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2894         * sem_ch13.adb (Check_Indexing_Functions): Initialize
2895         Indexing_Found.
2897 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
2899         * gnat1drv.adb (Gnat1drv): In gnatprove mode, we now write the
2900         ALI file before we call the backend (so that gnat2why can append
2901         to it).
2903 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2905         * exp_pakd.adb (Expand_Bit_Packed_Element_Set,
2906         Expand_Packed_Element_Reference): Pass additional Rev_SSO
2907         parameter indicating whether the packed array type has reverse
2908         scalar storage order to the s-pack* Set/Get routines.
2909         * s-pack*.ad* (Get, Set, GetU, SetU): New formal Rev_SSO
2910         indicating reverse scalar storage order.
2912 2014-08-01  Robert Dewar  <dewar@adacore.com>
2914         * sem_ch3.adb (Check_Initialization): Set Do_Range_Check
2915         for initial component value in -gnatc or GNATprove mode.
2916         (Process_Discriminants): Same fix for default discriminant values.
2917         * sem_eval.adb (Test_In_Range): Improve accuracy of results by
2918         checking subtypes.
2920 2014-08-01  Robert Dewar  <dewar@adacore.com>
2922         * sinfo.ads: Minor comment clarification.
2924 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2926         * sem_ch13.adb (Analyze_Aspect_Specifications): Code
2927         reformatting. Store the generated pragma Import in the related
2928         subprogram as routine Wrap_Imported_Subprogram will need it later.
2929         * sem_prag.adb (Is_Unconstrained_Or_Tagged_Item): An item of
2930         a private type with discriminants is considered to fall in the
2931         category of unconstrained or tagged items.
2933 2014-08-01  Arnaud charlet  <charlet@adacore.com>
2935         * s-os_lib.adb (Open_Append): New functions to open a file for
2936         appending. This binds to the already existing (but not used)
2937         __gnat_open_append.
2938         * osint.ads, osint.adb (Open_File_To_Append_And_Check): New procedure
2939         to open a file for appending.
2940         * osint-c.ads, osint-c.adb (Open_Output_Library_Info): New procedure
2941         to open the ALI file for appending.
2943 2014-08-01  Robert Dewar  <dewar@adacore.com>
2945         * sem_ch8.adb: Minor reformatting.
2947 2014-08-01  Yannick Moy  <moy@adacore.com>
2949         * sem_ch13.adb (Insert_Pragma): Add special case for precondition
2950         pragmas from aspects, which need to be inserted in proper order.
2952 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
2954         * exp_aggr.adb (Expand_Record_Aggregate, Init_Hidden_Discriminants):
2955         Handle properly a type extension that constrains a discriminated
2956         derived type that renames other discriminants of an ancestor.
2958 2014-08-01  Thomas Quinot  <quinot@adacore.com>
2960         * s-pack06.adb, s-pack10.adb, s-pack03.ads, s-pack12.adb, s-pack14.ads,
2961         s-pack25.adb: Fix minor inconsistencies and typos.
2963 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
2965         * sem_ch8.adb (Analyze_Subprogram_Renaming): Alphabetize
2966         globals and move certain variables to the "local
2967         variable" section. Call Build_Class_Wide_Wrapper when
2968         renaming a default actual subprogram with a class-wide actual.
2969         (Build_Class_Wide_Wrapper): New routine.
2970         (Check_Class_Wide_Actual): Removed.
2971         (Find_Renamed_Entity): Code reformatting.
2972         (Has_Class_Wide_Actual): Alphabetize. Change the
2973         logic of the predicate as the renamed name may not necessarely
2974         denote the correct subprogram.
2976 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
2978         * sem_ch7.adb: Fix minor oversight in condition.
2980 2014-08-01  Bob Duff  <duff@adacore.com>
2982         * projects.texi: Minor documentation improvements.
2984 2014-08-01  Robert Dewar  <dewar@adacore.com>
2986         * aspects.ads, aspects.adb: Add aspect No_Elaboration_Code_All.
2987         * gnat_rm.texi: Document No_Elaboration_Code_All pragma and aspect.
2988         * lib-load.adb: Initialize No_Elab_Code_All field.
2989         * lib-writ.adb: Initialize No_Elab_Code_All.
2990         * lib.ads, lib.adb: New field No_Elab_Code_All.
2991         * par-prag.adb: Add dummy entry for pragma No_Elaboration_Code_All.
2992         * restrict.ads, restrict.adb: Restriction No_Elaboration_Code_All no
2993         longer exists.
2994         * sem_ch10.adb (Analyze_Context): Processing for
2995         No_Elaboration_Code_All removed.
2996         (Generate_Parent_References): Moved to Sem_Util.
2997         * sem_prag.adb: Add processing for pragma No_Elaboration_Code_All.
2998         * sem_util.ads, sem_util.adb (Get_Parent_Entity): Moved here from
2999         Sem_Ch10.
3000         * snames.ads-tmpl: Add entry for pragma No_Elaboration_Code_All.
3001         * targparm.adb: Minor comment updates Add comments on ignoring
3002         pragma No_Elaboration_Code_All.
3004 2014-08-01  Nicolas Roche  <roche@adacore.com>
3006         * adaint.c (__gnat_set_close_on_exec): Ensure that
3007         we can unset "close_on_exec" flag.
3009 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3011         * exp_ch9.adb (Build_Wrapper_Spec, Replicate_Formals): When building
3012         the parameter specs of the wrapper program for a primitive operation
3013         of a synchronized type that implements an interface, copy the
3014         null_exclusion indicator as well.
3016 2014-08-01  Robert Dewar  <dewar@adacore.com>
3018         * sem_eval.ads: Minor reformatting.
3020 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3022         * exp_ch3.adb (Build_Initialization_Call): Call Underlying_Type
3023         to go down the chain of private derivations.
3024         * freeze.adb (Freeze_Entity): Fix typo in comment.
3026 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3028         * sem_ch3.adb (Access_Type_Declaration): If designated type is
3029         a limited view, create a master entity (as is already done for
3030         class-wide types) in case the full view designates a type that
3031         contains tasks.
3032         * sem_ch8.adb (Find_Selected_Component): If prefix is a dereference
3033         and the designated type is a limited view, use the non-limited
3034         view if available.
3036 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3038         * gcc-interface/ada-tree.h (DECL_BY_DESCRIPTOR_P): Delete.
3039         (DECL_FUNCTION_STUB): Likewise.
3040         (SET_DECL_FUNCTION_STUB): Likewise.
3041         (DECL_PARM_ALT_TYPE): Likewise.
3042         (SET_DECL_PARM_ALT_TYPE): Likewise.
3043         (TYPE_VAX_FLOATING_POINT_P): Delete.
3044         (TYPE_DIGITS_VALUE): Likewise.
3045         (SET_TYPE_DIGITS_VALUE): Likewise.
3046         * gcc-interface/gigi.h (standard_datatypes): Remove ADT_malloc32_decl.
3047         (malloc32_decl): Delete.
3048         (build_vms_descriptor): Likewise.
3049         (build_vms_descriptor32): Likewise.
3050         (fill_vms_descriptor): Likewise.
3051         (convert_vms_descriptor): Likewise.
3052         (TARGET_ABI_OPEN_VMS): Likewise.
3053         (TARGET_MALLOC64): Likewise.
3054         * gcc-interface/decl.c (add_parallel_type_for_packed_array): New.
3055         (gnat_to_gnu_entity): Call it to add the original type as a parallel
3056         type to the implementation type of a packed array type.
3057         <E_Procedure>: Remove now obsolete kludge.
3058         <E_Exception>: Delete obsolete comment.
3059         <object>: Small tweak.
3060         <E_Subprogram_Type>: Remove support for stub subprograms, as well as
3061         for the descriptor passing mechanism.
3062         (gnat_to_gnu_param): Likewise.
3063         * gcc-interface/misc.c (gnat_init_gcc_fp): Remove special case.
3064         (gnat_print_type): Adjust.
3065         * gcc-interface/trans.c (gigi): Remove obsolete initializations.
3066         (vms_builtin_establish_handler_decl): Delete.
3067         (gnat_vms_condition_handler_decl): Likewise.
3068         (establish_gnat_vms_condition_handler): Likewise.
3069         (build_function_stub): Likewise.
3070         (Subprogram_Body_to_gnu): Do not call above functions.
3071         (Call_to_gnu): Remove support for the descriptor passing mechanism.
3072         * gcc-interface/utils.c (make_descriptor_field): Delete.
3073         (build_vms_descriptor32): Likewise.
3074         (build_vms_descriptor): Likewise.
3075         (fill_vms_descriptor): Likewise.
3076         (convert_vms_descriptor64): Likewise.
3077         (convert_vms_descriptor32): Likewise.
3078         (convert_vms_descriptor): Likewise.
3079         * gcc-interface/utils.c (unchecked_convert): Likewise.
3080         * gcc-interface/utils2.c (maybe_wrap_malloc): Remove obsolete stuff.
3082 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3084         * gcc-interface/trans.c (gigi): Use gnat_to_gnu_type for the exception
3085         type and get_unpadded_type for the longest FP type.
3086         (Attribute_to_gnu) <Machine>: Compare the precision of the types.
3087         (convert_with_check): Adjust formatting and remove FIXME.
3089 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3091         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Signed_Integer_Subtype>:
3092         Do not convert the RM bounds to the base type.
3093         (E_Floating_Point_Subtype): Likewise.
3094         (E_Array_Subtype): Convert the bounds to the base type.
3095         * gcc-interface/trans.c (get_type_length): New function.
3096         (Attribute_to_gnu) <Range_Length>: Call it.
3097         <Length>: Likewise.
3098         (Loop_Statement_to_gnu): Convert the bounds to the base type.
3099         (gnat_to_gnu) <N_In>: Likewise.
3100         * gcc-interface/utils.c (make_type_from_size): Do not convert the RM
3101         bounds to the base type.
3102         (create_range_type): Likewise.
3103         (convert): Convert the bounds to the base type for biased types.
3104         * gcc-interface/utils2.c (compare_arrays): Convert the bounds to the
3105         base type.
3107 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3109         * gcc-interface/trans.c (gnat_to_gnu) <N_Selected_Component>: Remove
3110         incorrect implicit type derivation.
3111         * gcc-interface/utils.c (max_size) <tcc_reference>: Convert the bounds
3112         to the base type.
3114 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3116         * sem_attr.adb (Analyze_Attribute): Preanalyze and resolve the
3117         prefix of attribute Loop_Entry.
3118         * sem_prag.adb (Analyze_Pragma): Verify the placement of pragma
3119         Loop_Variant with respect to an enclosing loop (if any).
3120         (Contains_Loop_Entry): Update the parameter profile and all
3121         calls to this routine.
3122         * sem_res.adb (Resolve_Call): Code reformatting. Do not ask
3123         for the corresponding body before determining the nature of the
3124         ultimate alias's declarative node.
3126 2014-08-01  Robert Dewar  <dewar@adacore.com>
3128         * gnat1drv.adb, sem_ch4.adb: Minor reformatting.
3130 2014-08-01  Robert Dewar  <dewar@adacore.com>
3132         * sem_eval.adb (Rewrite_In_Raise_CE): Don't try to reuse inner
3133         constraint error node since it is a list member.
3135 2014-08-01  Robert Dewar  <dewar@adacore.com>
3137         * sem_warn.adb: Minor reformatting.
3139 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3141         * einfo.adb (Underlying_Type): Return the underlying full view
3142         of a private type if present.
3143         * freeze.adb (Freeze_Entity):
3144         Build a single freeze node for partial, full and underlying full
3145         views, if any.
3146         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Private_Type>: Add a
3147         missing guard before the access to the Underlying_Full_View.
3148         * gcc-interface/trans.c (process_freeze_entity): Deal with underlying
3149         full view if present.
3150         * gcc-interface/utils.c (make_dummy_type): Avoid superfluous work.
3152 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3154         * sem_res.adb (Resolve_Entry_Call): When an entry has
3155         preconditions, the entry call is wrapped in a procedure call
3156         that incorporates the precondition checks. To prevent a double
3157         expansion, with possible duplication of extra formals, that
3158         procedure call must only be pre-analyzed and resolved. Expansion
3159         takes place upon return to the caller Resolve_Call.
3161 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3163         * sem_res.adb (Resolve_Call): Do not perform
3164         GNATprove-specific inlining while within a generic.
3166 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3168         * sem_ch4.adb (Analyze_Case_Expression): Handle properly a
3169         case expression with incompatible alternatives, when the first
3170         alternative is overloaded.
3172 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3174         * sem_res.adb (Check_Parameterless_Call): Use Relocate_Node
3175         to create the name of the parameterless call, rather than
3176         New_Copy, to preserve the tree structure when the name is a
3177         complex expression, e.g. a selected component that denotes a
3178         protected operation, whose prefix is itself a selected component.
3180 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3182         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Use
3183         Unit_Declaration_Node to retrieve body when inlining, to handle
3184         properly subprogram child units.
3186 2014-08-01  Robert Dewar  <dewar@adacore.com>
3188         * sem_attr.adb: Minor reformatting.
3190 2014-08-01  Vincent Celier  <celier@adacore.com>
3192         * debug.adb: Minor documentation addition for -dn switch.
3194 2014-08-01  Robert Dewar  <dewar@adacore.com>
3196         * sem_aggr.adb, exp_ch9.adb, sem_prag.adb, sem_util.adb,
3197         sem_attr.adb, sem_eval.ads, sem_cat.adb, sem_ch13.adb: Improve
3198         documentation of Is_Static_Expression vs Is_OK_Static_Expression.
3199         In several places, use the Is_OK version as suggested by the spec.
3201 2014-08-01  Vincent Celier  <celier@adacore.com>
3203         * gnatcmd.adb: Revert last change which was not correct.
3205 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3207         * freeze.adb (Find_Constant): Ensure that the constant being
3208         inspected is still an object declaration (i.e. not a renaming).
3210 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3212         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): a)
3213         An attribute_reference to Loop_Entry denotes an iterator
3214         specification: its prefix is an object, as is the case for 'Old.
3215         b) If the domain of iteration is an expression whose type has
3216         the Iterable aspect defined, this is an iterator specification.
3218 2014-08-01  Robert Dewar  <dewar@adacore.com>
3220         * gnatcmd.adb: Minor reformatting.
3222 2014-08-01  Robert Dewar  <dewar@adacore.com>
3224         * atree.ads (Info_Messages): New counter.
3225         * err_vars.ads: Minor comment update.
3226         * errout.adb (Delete_Warning_And_Continuations): Deal
3227         with new Info_Messages counter.
3228         (Error_Msg_Internal): ditto.
3229         (Delete_Warning): ditto.
3230         (Initialize): ditto.
3231         (Write_Error_Summary): ditto.
3232         (Output_Messages): ditto.
3233         (To_Be_Removed): ditto.
3234         * erroutc.adb (Delete_Msg): Deal with Info_Messages counter.
3235         (Compilation_Errors): ditto.
3236         * errutil.adb (Error_Msg): Deal with Info_Messages counter.
3237         (Finalize): ditto.
3238         (Initialize): ditto.
3239         * sem_prag.adb (Analyze_Pragma): Minor comment addition.
3240         * gnat_ugn.texi: Document that -gnatwe does not affect info
3241         messages.
3243 2014-08-01  Robert Dewar  <dewar@adacore.com>
3245         * debug.adb: Document debug switch -gnatd.Z.
3246         * sem.adb (Semantics): Force expansion on in no or configurable
3247         run time mode.
3249 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3251         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): An
3252         unchecked conversion denotes an iterator specification. Such a
3253         conversion will be inserted in the context of an inlined call
3254         when needed, and its argument is always an object.
3256 2014-08-01  Robert Dewar  <dewar@adacore.com>
3258         * make.adb, makeutl.ads: Minor reformatting.
3259         * debug.adb, opt.ads: Clarify documentation of Front_End_Inlining and
3260         Back_End_Inlining.
3262 2014-08-01  Tristan Gingold  <gingold@adacore.com>
3264         * gnatcmd.adb (GNATCmd): Set AAMP_On_Target using command name.
3266 2014-08-01  Javier Miranda  <miranda@adacore.com>
3268         * gnat1drv.adb (Adjust_Global_Switches): Reverse meaning of
3269         -gnatd.z.
3270         * debug.adb: Updating documentation.
3271         * exp_ch6.adb (Expand_Call): Remove assertion.
3273 2014-08-01  Robert Dewar  <dewar@adacore.com>
3275         * sem_aggr.adb, sem_ch3.adb, sem_ch5.adb, sem_util.adb,
3276         sem_res.adb: Minor reformatting.
3278 2014-08-01  Vincent Celier  <celier@adacore.com>
3280         * make.adb (Initialize): Set Keep_Temporary_Files to True when
3281         -dn is specified.
3282         * makeusg.adb: Add line for new switch --keep-temp-files.
3283         * makeutl.ads (Keep_Temp_Files_Option): New constant String.
3284         * opt.ads (Keep_Temporary_Files): Document that it is also used
3285         by gnatmake and gprbuild.
3286         * switch-m.adb: Recognize new switch --keep-temp-files.
3288 2014-08-01  Tristan Gingold  <gingold@adacore.com>
3290         * sem_ch9.adb (Analyze_Task_Type_Declaration): Move code from ...
3291         * exp_ch9.adb (Make_Task_Create_Call): ... here.
3293 2014-08-01  Vincent Celier  <celier@adacore.com>
3295         * gnat1drv.adb: Do not try to get the target parameters when
3296         invoked with -gnats.
3298 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3300         * exp_ch7.adb (Find_Last_Init): Nothing to do for an object
3301         declaration subject to No_Initialization.
3303 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3305         * sem_aggr.adb (Resolve_Array_Aggregate): Reject choice that
3306         is a subtype with dynamic predicates, or a non-static subtype
3307         with predicates.
3308         * sem_ch3.adb (Analyze_Number_Declaration): Reject qualified
3309         expression if subtype has a dynamic predicate.
3310         (Constrain_Index): Reject subtype indication if subtype mark
3311         has predicates.
3312         (Inerit_Predicate_Flags): Inherit Has_Predicates as well.
3313         (Make_Index): If index is a subtype indication, itype inhereits
3314         predicate flags for subsequent testing.
3315         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): New
3316         procedure Check_Predicate_Use, to reject illegal uses of domains
3317         of iteration that have dynamic predicates.
3318         * sem_res.adb (Resolve_Slice): Reject slices given by a subtype
3319         indication to which a predicate applies.
3320         * sem_util.adb (Bad_Predicated_Subtype_Use): Add guard to
3321         prevent cascaded errors when subtype is invalid.
3323 2014-08-01  Robert Dewar  <dewar@adacore.com>
3325         * sem_ch10.adb: Minor reformatting.
3327 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3329         * sem_ch6.adb (Same_Generic_Actual): Make function symmetric,
3330         because either type may be a subtype of the other.
3332 2014-08-01  Vincent Celier  <celier@adacore.com>
3334         * makeusg.adb: Add documentation for debug switch -dn.
3336 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3338         * sem_dim.adb (Process_Minus, Process_Divide): Label dimension
3339         expression with standard operator and type, for pretty-printing
3340         use, when in ASIS_Mode. When generating code dimensional analysis
3341         is not involved and dimension expressions are handled statically,
3342         and other operators are resolved in the usual way.
3344 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3346         * sem_ch3.adb (Build_Derived_Record_Type): Remove setting of
3347         Parent_Subtype in ASIS mode, leads to several failures.
3348         * sem_ch4.adb (Analyze_Selected_Component): In an instance,
3349         if the prefix is a type extension, check whether component is
3350         declared in the parent type, possibly in a parent unit. Needed
3351         in ASIS mode when Parent_Subtype is not set.
3353 2014-08-01  Robert Dewar  <dewar@adacore.com>
3355         * sem_prag.adb: Minor reformatting.
3356         * s-regpat.adb: Minor reformatting.
3357         * sem_ch3.adb (Analyze_Object_Declaration): Do not set
3358         Treat_As_Volatile on constants.
3360 2014-08-01  Tristan Gingold  <gingold@adacore.com>
3362         * exp_ch9.adb (Make_Task_Create_Call): Improve error message.
3364 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3366         * sem_ch10.adb (Analyze_Compilation_Unit): Do not place a
3367         warning on a with_clause created for the renaming of a parent
3368         unit in an explicit with_clause.
3370 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3372         * sem_ch13.adb (Analyze_Aspect_Specifications, case Aspect_Import):
3373         Set Is_Imported flag at once, to simplify subsequent legality
3374         checks. Reject the aspect on an object whose declaration has an
3375         explicit initial value.
3376         * sem_prag.adb (Process_Import_Or_Interface): Use original node
3377         to check legality of an initial value for an imported entity.
3378         Set Is_Imported flag in case of error to prevent cascaded errors.
3379         Do not set the Is_Imported flag if the pragma comes from an
3380         aspect, because it is already done when analyzing the aspect.
3382 2014-08-01  Emmanuel Briot  <briot@adacore.com>
3384         * g-regpat.adb (Parse): Add support for non-capturing parenthesis.
3386 2014-08-01  Robert Dewar  <dewar@adacore.com>
3388         * sem_ch7.adb, einfo.adb, einfo.ads, sem_ch13.adb: Minor change of
3389         identifier name.
3391 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3393         * sem_ch3.adb (Analyze_Object_Contract): Enable the volatility
3394         checks when the related variable comes from source.
3395         * sem_res.adb (Resolve_Actuals): Enable the volatility checks
3396         when the related actual parameter comes from source. Update comment.
3397         * freeze.adb (Freeze_Record_Type): Do not freeze the designated
3398         type of an array of pointers when the designated type is
3399         class-wide and its root type is the record being currently frozen.
3401 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3403         * sem_ch5.adb (Analyze_Iterator_Specification): Preserve Ekind
3404         of renaming declaration created for domain of iteration.
3405         * sem_aggr.adb (Resolve_Array_Aggregate): Better placement
3406         for error messages on aggregates whose index subtypes have
3407         predicates. The new placement avoids posting messages on previous
3408         subtype declarations rather than on the aggregate itself.
3409         * sem_disp.adb (Is_Inherited_Public_Operation): New predicate for
3410         Add_Dispatching_Operation, to handle properly the overriding of
3411         the predefined operations on controlled types, when the partial
3412         view of a type is not visibly controlled.
3414 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
3416         * gnat_ugn.texi: Add tutorial on portable fixed-point types as an
3417         appendix.
3419 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3421         * einfo.adb (Is_Hidden_Non_Overridden_Subprogram): Remove the
3422         assertion check as the attribute is defined for all entities.
3423         (Set_Is_Hidden_Non_Overridden_Subprogram): Remove the assertion
3424         check as the attribute is defined for all entities.
3425         * einfo.ads Update the documentation of attribute
3426         Is_Hidden_Non_Overridden_Subprogram.
3427         * sem_ch7.adb (Install_Package_Entity): No need to check the
3428         entity kind of the Id.
3429         * sem_ch13.adb (Hide_Matching_Homograph): Update the comment on
3430         usage. Ensure that the homographs are of the same entity kind
3431         and not fully conformant.
3432         (Hide_Non_Overridden_Subprograms): Update the comment on usage.
3434 2014-08-01  Robert Dewar  <dewar@adacore.com>
3436         * inline.adb: Minor code reorganization.
3437         * sem_ch12.adb, s-tasdeb.ads: Minor reformatting.
3439 2014-08-01  Robert Dewar  <dewar@adacore.com>
3441         * inline.adb, s-os_lib.ads: Minor reformatting.
3443 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3445         * s-tasdeb.ads, s-tasdeb.adb (Master_Hook, Master_Completed_Hook): New.
3446         * s-tassta.adb (Task_Wrapper, Vulnerable_Complete_Master): Call new
3447         hooks.
3449 2014-08-01  Yannick Moy  <moy@adacore.com>
3451         * inline.adb (Cannot_Inline): Issue info message instead of
3452         warning for subprograms not inlined in GNATprove mode.
3453         * sem_res.adb (Resolve_Call): Take body into account for deciding
3454         whether subprogram can be inlined in GNATprove mode or not.
3456 2014-08-01  Claire Dross  <dross@adacore.com>
3458         * exp_util.ads (Get_First_Parent_With_Ext_Axioms_For_Entity): Renaming
3459         of Get_First_Parent_With_External_Axiomatization_For_Entity for
3460         shorter.
3461         * sem_ch12.adb (Analyze_Associations): Only call Build_Wrapper
3462         for parameters of packages with external axiomatization.
3464 2014-08-01  Robert Dewar  <dewar@adacore.com>
3466         * sem_res.adb: Minor comment addition.
3468 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3470         * s-crtl.ads, i-cstrea.ads, adaint.c, adaint.h, osint.adb,
3471         s-fileio.adb (__gnat_fopen, __gnat_freopen): Remove vms_form parameter,
3472         no longer used.
3473         * s-os_lib.ads: Minor reformatting.
3475 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3477         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Restore more
3478         completely previous code since only GCC back-ends are prepared
3479         to handle e.g. 'Machine attribute.
3480         * targparm.adb, targparm.ads: Remove remaining refs and
3481         handling of OpenVMS_On_Target, VAX_Float_On_Target and
3482         RTX_RTSS_Kernel_Module_On_Target.
3483         * hostparm.ads (OpenVMS, Max_Debug_Name_Length): Removed,
3484         no longer used.
3486 2014-08-01  Robert Dewar  <dewar@adacore.com>
3488         * exp_dist.adb, exp_attr.adb: Minor reformatting.
3489         * sem_ch3.adb, mlib-tgt-specific-hpux.adb, a-direct.ads,
3490         a-synbar-posix.adb, exp_ch9.adb, sem_ch10.adb, sem_prag.adb,
3491         sem_ch12.adb, sem.ads, sem_res.adb, s-exctra.adb, s-soflin.ads,
3492         g-alveop.ads, sem_ch8.adb, vxaddr2line.adb, sem_cat.ads: Remove
3493         improper use of shall.
3495 2014-08-01  Robert Dewar  <dewar@adacore.com>
3497         * sem_aggr.adb, exp_atag.adb, layout.adb, nlists.adb, nlists.ads,
3498         exp_attr.adb, exp_ch9.adb, par-ch12.adb, exp_aggr.adb,
3499         exp_ch3.adb: Minor reformatting & code reorganization.
3501 2014-08-01  Robert Dewar  <dewar@adacore.com>
3503         * gnat_rm.texi: Remove VMS specific rules for pragma Ident.
3504         * Makefile.rtl, adaint.c, gnat_rm.texi, s-asthan.adb, s-asthan.ads,
3505         s-filofl.ads, s-fishfl.ads, s-fvadfl.ads, s-fvaffl.ads, s-fvagfl.ads,
3506         s-po32gl.adb, s-po32gl.ads, s-vaflop.adb, s-vaflop.ads, s-vmexta.adb,
3507         s-vmexta.ads, sem_vfpt.adb, sem_vfpt.ads, socket.c: Remove VMS specific
3508         code.
3509         * gcc-interface/decl.c, gcc-interface/Makefile.in,
3510         gcc-interface/Make-lang.in: Ditto. Also remove refs to rTX.
3512 2014-08-01  Pascal Obry  <obry@adacore.com>
3514         * s-os_lib.ads: Rename File_Size to Large_File_Size.
3516 2014-08-01  Robert Dewar  <dewar@adacore.com>
3518         * a-numaux-vxworks.ads, a-numaux-x86.adb, a-numaux-x86.ads,
3519         a-numaux-darwin.adb, a-numaux-darwin.ads, a-numaux.ads,
3520         a-numaux-libc-x86.ads: Fix bad package header comments.
3521         * elists.ads, elists.adb (Append_New_Elmt): New procedure.
3522         * gnat_rm.texi, a-calend.adb, gnatcmd.adb, einfo.adb, einfo.ads,
3523         checks.adb, sem_prag.adb, sem_prag.ads, rtsfind.ads, freeze.adb,
3524         sem_util.adb, sem_attr.adb, exp_dbug.adb, exp_dbug.ads, gnat1drv.adb,
3525         targparm.adb, targparm.ads, exp_ch6.adb, switch-b.adb, s-shasto.ads,
3526         stand.ads, s-auxdec.ads, opt.adb, opt.ads, mlib-tgt.ads, s-fatgen.adb,
3527         s-fatgen.ads, system.ads, snames.ads-tmpl, s-stalib.ads,
3528         s-os_lib.adb: Remove VMS-specific code.
3530 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3532         * exp_attr.adb (Is_Inline_Floating_Point_Attribute): Revert to
3533         previous state in CodePeer_Mode.
3535 2014-08-01  Robert Dewar  <dewar@adacore.com>
3537         * hostparm.ads: Put back definition of OpenVMS as False to aid
3538         the transition process.
3539         * sem_ch7.adb: Minor reformatting.
3540         * prj-env.adb: Minor code fix.
3541         * gnat_rm.texi: Complete previous change.
3542         * sem_ch3.adb: Minor reformatting.
3543         * sem_ch6.adb: Minor reformatting.
3544         * sem_elab.adb: Minor reformatting.
3545         * exp_strm.adb: Complete previous change.
3547 2014-08-01  Vincent Celier  <celier@adacore.com>
3549         * sem_warn.adb (Warn_On_Unreferenced_Entity): Do not issue a
3550         warning when a constant is unreferenced and its type has pragma
3551         Unreferenced_Objects.
3553 2014-08-01  Hristian Kirtchev  <kirtchev@adacore.com>
3555         * einfo.adb: Flag2 is now known as
3556         Is_Hidden_Non_Overridden_Subprogram.
3557         (Is_Hidden_Non_Overridden_Subprogram): New routine.
3558         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine.
3559         (Write_Entity_Fields): Output Flag2.
3560         * einfo.ads: New attribute Is_Hidden_Non_Overridden_Subprogram
3561         along with occurrences in entities.
3562         (Is_Hidden_Non_Overridden_Subprogram): New routine and pragma Inline.
3563         (Set_Is_Hidden_Non_Overridden_Subprogram): New routine
3564         and pragma Inline.
3565         * sem_ch7.adb (Install_Package_Entity): Do not enter implicitly
3566         declared non-overriden homographs into visibility.
3567         * sem_ch13.adb (Freeze_Entity_Checks): Hide all
3568         implicitly declared non-overriden homographs.
3569         (Hide_Non_Overridden_Subprograms): New routine.
3571 2014-08-01  Robert Dewar  <dewar@adacore.com>
3573         * snames.ads-tmpl, s-os_lib.adb, s-os_lib.ads, s-fileio.adb: Remove
3574         VMS-specific code.
3575         * prj-conf.adb: Minor reformatting.
3576         * xr_tabls.adb (Read_File): Restore code which was enabled on
3577         non VMS platforms before.
3578         * prj-env.adb (Initialize_Default_Project_Path): Ditto.
3579         * sem_ch5.adb: Minor reformatting.
3580         * lib-writ.adb, lib-writ.ads, bindgen.adb, sem_vfpt.adb,
3581         sem_vfpt.ads, ali.adb, ali.ads, opt.ads, bcheck.adb, exp_strm.adb:
3582         Remove VMS-specific code.
3584 2014-08-01  Vincent Celier  <celier@adacore.com>
3586         * make.adb (Await_Compile): Remove loop that was only needed
3587         for VMS.
3589 2014-08-01  Robert Dewar  <dewar@adacore.com>
3591         * a-calcon.ads, a-direct.adb, a-dirval-mingw.adb, a-dirval.adb,
3592         a-dirval.ads, a-except-2005.adb, a-excpol-abort.adb,
3593         a-numaux-darwin.ads, a-numaux.ads, bindgen.adb, bindusg.adb,
3594         einfo.adb, einfo.ads, err_vars.ads, errout.ads, errutil.adb,
3595         exp_ch3.adb, exp_ch4.adb, exp_ch7.adb, exp_ch7.ads, fname-uf.adb,
3596         fname.adb, fname.ads, freeze.adb, g-debpoo.adb, g-dirope.ads,
3597         g-excact.ads, g-expect.ads, g-socket.adb, g-socket.ads, g-sothco.ads,
3598         g-traceb.ads, gnat_rm.texi, gnatlink.adb, gnatls.adb, i-cstrea.adb,
3599         krunch.adb, krunch.ads, layout.adb, lib-util.adb, make.adb,
3600         mlib.adb, osint-b.adb, osint-b.ads, osint-c.adb, osint.adb,
3601         osint.ads, output.ads, par.adb, prj-conf.adb, prj-env.adb,
3602         prj-makr.adb, prj-nmsc.adb, prj.adb, prj.ads, repinfo.adb, rtsfind.adb,
3603         rtsfind.ads, s-excmac-gcc.ads, s-fatgen.adb, s-mastop.ads,
3604         s-parame-ae653.ads, s-parame-hpux.ads, s-parame-vxworks.ads,
3605         s-parame.ads, s-soflin.ads, s-stoele.adb, s-tasini.adb,
3606         s-taspri-dummy.ads, s-taspri-hpux-dce.ads, s-taspri-mingw.ads,
3607         s-taspri-posix-noaltstack.ads, s-taspri-posix.ads,
3608         s-taspri-solaris.ads, s-taspri-vxworks.ads, s-trasym.ads,
3609         sem_ch12.adb, sem_ch4.adb, sem_eval.adb, sem_intr.adb, sem_mech.adb,
3610         sem_mech.ads, sem_prag.adb, sem_res.adb, sem_util.adb, sem_util.ads,
3611         sinfo.adb, sinfo.ads, sinput-c.adb, symbols.ads, targparm.adb,
3612         treepr.adb, types.ads, xr_tabls.adb, xr_tabls.ads: Remove VMS
3613         specific code and comments.
3615 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3617         * sem_ch5.adb (Analyze_Iterator_Specification): New procedure
3618         Check_Reverse_Iteration, to verify the legality of the Reverse
3619         indicator on various container types, and to detect illegal
3620         reverse iterations on containers that only supoort forward
3621         iteration.
3623 2014-08-01  Vincent Celier  <celier@adacore.com>
3625         * gnatcmd.adb: Remove the VMS specific stuff.  Integrate in
3626         procedure GNATCmd the relevant declarations from packages VMS_Cmds
3627         and VMS_Conv.
3628         * gnatcmd.ads: Update comments to remove any trace of VMS
3630 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3632         * sem_ch12.adb: sem_ch12.adb (Build_Wrapper): Capture entity for
3633         defaulted actual that is an operator, before building wrapper
3634         for it in GNATprove mode. Restrict construction of wrapper to
3635         actuals that are operators.
3637 2014-08-01  Vincent Celier  <celier@adacore.com>
3639         * vms_conv.adb, vms_conv.ads, vms_data.ads, vms_cmds.ads: Remove VMS
3640         specific packages no longer needed.
3642 2014-08-01  Pascal Obry  <obry@adacore.com>
3644         * s-os_lib.ads (System.CRTL): Move with clause to body.
3645         (File_Size): New type.
3646         (File_Length64): Use it.
3647         (File_Length): Restore previous spec returning a Long_Integer.
3648         * s-os_lib.adb (System.CRTL): Move with clause here.
3650 2014-08-01  Vincent Celier  <celier@adacore.com>
3652         * mlib-prj.adb: Update comments to remove any mention of VMS.
3654 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3656         * ug_words, xgnatugn.adb, gcc-interface/Make-lang.in: Remove
3657         xgnatugn.adb and ug_words.
3659 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3661         * exp_attr.adb (Expand_N_Attribute_Reference): Check whether
3662         expansion can be avoid for Machine, Model and Rounding.
3663         (Is_Inline_Floating_Point_Attribute): Return true for Machine
3664         & Model, as well as Rounding if wrapped in a conversion to an
3665         integer type.
3666         * sem_res.adb (Simplify_Type_Conversion): Deal with Rounding as well.
3667         * gcc-interface/gigi.h (fp_arith_may_widen): Declare.
3668         * gcc-interface/utils.c (fp_arith_may_widen): New global variable.
3669         * gcc-interface/misc.c (enumerate_modes): Compute it.
3670         * gcc-interface/trans.c (FP_ARITH_MAY_WIDEN): Delete.
3671         (lvalue_required_for_attribute_p): Deal with Descriptor_Size,
3672         Machine and Model.
3673         (Attribute_to_gnu) <Attr_Model>: New case.
3674         <Attr_Machine>): Likewise.
3675         (convert_with_check): Test
3676         fp_arith_may_widen variable.
3678 2014-08-01  Pascal Obry  <obry@adacore.com>
3680         * adaint.h (GNAT_FOPEN): New definition for Windows.
3681         (GNAT_OPEN): Likewise.
3682         (GNAT_STAT): Likewise.
3683         (GNAT_FSTAT): Likewise.
3684         (GNAT_LSTAT): Likewise.
3685         (GNAT_STRUCT_STAT): Likewise.
3686         * adaint.c (__gnat_stat): Fix computation of file size for
3687         Windows.
3689 2014-08-01  Vincent Celier  <celier@adacore.com>
3691         * Makefile.rtl: Minor comment update.
3693 2014-08-01  Vincent Celier  <celier@adacore.com>
3695         * Make-generated.in: Remove dependencies for vms-help.
3697 2014-08-01  Gary Dismukes  <dismukes@adacore.com>
3699         * makeutl.ads, opt.ads: Minor grammar fixes.
3700         * makeutl.adb: Minor code reorganization.
3702 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3704         * gcc-interface/Makefile.in, gcc-interface/Make-lang.in,
3705         gnatsym.adb: Remove gnatsym (VMS only tool).
3707 2014-08-01  Ben Brosgol  <brosgol@adacore.com>
3709         * gnat_ugn.texi, projects.texi, xgnatugn.adb: Removed all VMS
3710         conditionalization from gnat_ugn.texi and projects.texi, and updated
3711         (considerably simplified) xgnatugn.adb, to be removed soon.
3713 2014-08-01  Vincent Celier  <celier@adacore.com>
3715         * debug.adb: Remove doc for gnatmake/gprbuild switch -ds.
3716         * make.adb (List_Bad_Compilations): Use Opt.No_Exit_Message
3717         instead of Debug.Debug_Flag_S.
3718         * makeutl.adb (Finish_Program, Fail_Program): Use Opt flag
3719         No_Exit_Message instead of Debug.Debug_Flag_S to suppress exit
3720         error messages.
3721         * makeutl.ads (No_Exit_Message_Option): New constant string
3722         for switch --no-exit-message.
3723         * opt.ads (No_Exit_Message): New Boolean flag, defaulted to False.
3724         * switch-m.adb (Scan_Make_Switches): Recognize new switch
3725         --no-exit-message.
3727 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3729         * exp_vfpt.adb, exp_vfpt.ads: Removed, no longer used.
3730         * gcc-interface/Make-lang.in: Remove exp_vfpt.o
3732 2014-08-01  Javier Miranda  <miranda@adacore.com>
3734         * inline.ads (Inlined_Calls, Backend_Calls,
3735         Backend_Inlined_Subps, Backend_Not_Inlined_Subps): Declarations
3736         moved to inline.adb (Cannot_Inline): Update documentation.
3737         (Check_And_Build_Body_To_Inline): Renamed.
3738         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3739         * inline.adb (Check_Inlining_Restrictions): New local variable.
3740         (Inlined_Calls, Backend_Calls, Backend_Inlined_Subps,
3741         Backend_Not_Inlined_Subps): Declarations moved here
3742         from inline.ads (Number_Of_Statements): Removed.
3743         (Remove_Pragmas): Avoid duplicated version of this subprogram.
3744         (Build_Body_To_Inline): Code cleanup.
3745         (Build_Body_To_Inline.Has_Excluded_Statament): Removed.
3746         (Check_And_Build_Body_To_Inline): Renamed. Code cleanup.
3747         (Check_Body_To_Inline): Removed.
3748         (Generate_Body_To_Inline): Renamed as Generate_Subprogram_Body.
3749         (Has_Excluded_Declaration): No action if not
3750         Check_Inlining_Restrictions.
3751         (Has_Excluded_Statement): No action if not Check_Inlining_Restrictions.
3752         (Initialize): Initialize the lists of inlined calls and subprograms.
3753         (List_Inlining_Info): Subprogram moved here from package exp_ch6.
3754         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Update call
3755         to Check_And_Build_Body_To_Inline since it has been renamed as
3756         Check_And_Split_Unconstrained_Function
3757         * exp_ch6.ad[sb] (List_Inlining_Info): Subprogram moved to
3758         package inline.
3759         * gnat1drv.adb Update call to Inline.List_Inlining_Info.
3761 2014-08-01  Vincent Celier  <celier@adacore.com>
3763         * debug.adb: Add documentation for new debug switch -ds.
3764         * make.adb (List_Bad_Compilations): Do not issue any message
3765         when switch -ds is specified.
3766         * makeutl.adb (Fail_Program): Do not issue any message when
3767         -ds is specified.
3768         (Finish_Program): Ditto.
3770 2014-08-01  Robert Dewar  <dewar@adacore.com>
3772         * s-exnint.adb, s-exnint.ads, s-wwdwch.ads, s-carsi8.ads,
3773         s-casi32.ads, indepsw.adb, a-timoau.ads, s-explli.adb, s-explli.ads,
3774         s-casi16.ads, s-powtab.ads, g-wistsp.ads, a-ztmoau.adb,
3775         indepsw-gnu.adb, s-imgllb.ads, types.adb, gnat.ads, s-proinf.adb,
3776         indepsw-aix.adb, s-caun64.ads, s-imgllw.ads, s-traces-default.adb,
3777         s-vxwork-x86.ads, s-expllu.adb, s-exnlli.adb, s-exnlli.ads,
3778         s-traces.adb, widechar.ads, stand.adb, s-expint.adb,
3779         s-tratas-default.adb, s-expint.ads, s-geveop.ads, s-caun32.ads,
3780         s-expuns.adb, s-mantis.adb, s-mantis.ads, s-caun16.ads, s-tasinf.adb,
3781         s-memcop.ads, s-dsaser.ads, s-imgbiu.ads, a-szmzco.ads, g-strspl.ads,
3782         s-casi64.ads, g-zstspl.ads, indepsw-mingw.adb, tree_io.adb,
3783         s-boarop.ads, uname.ads, s-fore.adb, s-fore.ads, g-timsta.adb,
3784         g-timsta.ads, s-assert.adb, s-vector.ads, s-tratas.adb,
3785         s-tratas.ads: Minor fix to copyright notices.
3787 2014-08-01  Eric Botcazou  <ebotcazou@adacore.com>
3789         * sinfo.ads: Remove long obsolete comment.
3790 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3792         * sem_util.adb: Add guard to setting of No_Predicate_On_Actual.
3793         * sem_ch3.adb: Minor reformatting.
3795 2014-08-01  Pascal Obry  <obry@adacore.com>
3797         * cstreams.c: Only enable large file support on know supported
3798         platforms. Add missing defines/includes.
3800 2014-08-01  Ed Schonberg  <schonberg@adacore.com>
3802         * einfo.ads, einfo.adb New flags No_Predicate_On_Actual and
3803         No_Dynamic_Predicate_On_Actual, to enforce the generic contract
3804         on generic units that contain constructs that forbid subtypes
3805         with predicates.
3806         * sem_ch3.adb (Analyze_Subtype_Declaration, Process_Subtype):
3807         Inherit flags indicating the presence of predicates in subtype
3808         declarations with and without constraints.
3809         (Inherit_Predicate_Flags): Utility for the above.
3810         * sem_util.adb (Bad_Predicated_Subtype_Use): In a generic context,
3811         indicate that the actual cannot have predicates, and preserve
3812         warning. In an instance, report error if actual has predicates
3813         and the construct appears in a package declaration.
3814         * sem_ch12.adb (Diagnose_Predicated_Actual): Report error
3815         for an actual with predicates, if the corresponding formal
3816         carries No_Predicate_On_Actual or (in the case of a loop)
3817         No_Dynamic_Predicate_On_Actual.
3818         * sem_ch13.adb (Build_Predicate_Functions); Do not build a
3819         Static_Predicate function if the type is non-static (in the
3820         presence of previous errors),
3821         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Set flag
3822         No_Dynamic_Predicate_On_Actual in a generic context, to enforce
3823         generic contract on actuals that cannot have predicates.
3825 2014-08-01  Pascal Obry  <obry@adacore.com>
3827         * a-direct.adb (C_Size): Returns an int64.
3828         * osint.adb (System.CRTL): New with clause.
3829         (File_Length.Internal): Returns an int64.
3830         * s-os_lib.ads (File_Length): Returns an int64.
3832 2014-08-01  Robert Dewar  <dewar@adacore.com>
3834         * gnatchop.adb, gnatcmd.adb, make.adb, mlib-prj.adb, bindgen.adb,
3835         mlib.ads, butil.adb, clean.adb, binde.adb, gnatls.adb, gnatname.adb,
3836         osint.adb, krunch.adb: Minor reformatting.
3838 2014-08-01  Robert Dewar  <dewar@adacore.com>
3840         * inline.adb, inline.ads, fe.h, einfo.adb, einfo.ads, sem_util.adb,
3841         sem_util.ads, exp_ch4.adb, exp_ch11.adb, exp_ch6.adb, cstand.adb,
3842         sem_mech.adb, sem_ch6.adb, sem_ch8.adb, sem_ch11.adb, snames.ads-tmpl:
3843         Remove VMS-specific code.
3844         * gcc-interface/decl.c, gcc-interface/trans.c: Ditto.
3846 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3848         * binde.adb, bindgen.adb, butil.adb, clean.adb, gnatbind.adb,
3849         gnatchop.adb, gnatcmd.adb, gnatls.adb, gnatname.adb, krunch.adb,
3850         make.adb, makeutl.adb, memtrack.adb, mlib-prj.adb, mlib.adb,
3851         mlib.ads, tempdir.adb: Remove VMS handling.
3853 2014-08-01  Pascal Obry  <obry@adacore.com>
3855         * adaint.h, adaint.c (__gnat_file_length): Returns an __int64.
3856         (__gnat_named_file_length): Likewise.
3857         (__gnat_file_length_attr): Likewise.
3858         * a-direct.adb (C_Size): Use size_t as returned type.
3859         * osint.adb (File_Length): Adjust spec for Internal routine
3860         (returns size_t).
3861         * s-os_lib.adb (File_Length): Now returns a CRTL.size_t.
3862         (System.CRTL): With claused moved to spec.
3863         * s-os_lib.ads (System.CRTL): With clause moved to here.
3865 2014-08-01  Pascal Obry  <obry@adacore.com>
3867         * adaint.h, adaint.c (__gnat_open): Added.
3868         * s-crtl.ads (open): Import __gnat_open for large file support.
3870 2014-08-01  Robert Dewar  <dewar@adacore.com>
3872         * sem_case.adb (Dup_Choice): Improve message for integer constants.
3874 2014-08-01  Arnaud Charlet  <charlet@adacore.com>
3876         * gnatlink.adb: Remove special handling of VMS, RTX and JVM.
3878 2014-08-01  Pascal Obry  <obry@adacore.com>
3880         * adaint.h (GNAT_OPEN): Defines as open64 where supported.
3881         * adaint.c (GNAT_OPEN): Uses new macro where needed.
3883 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
3885         * gcc-interface/utils.c (lookup_and_insert_pad_type): New function
3886         extracted from...
3887         (maybe_pad_type): ...here.  Call it to canonicalize the pad type.
3888         * gcc-interface/gigi.h: Update comment.
3890 2014-07-31  Javier Miranda  <miranda@adacore.com>
3892         * debug.adb Remove documentation of -gnatd.k (no longer needed).
3893         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Code cleanup.
3894         * inline.ads (Backend_Inlined_Subps): New
3895         Elist.  (Backend_Not_Inlined_Subps): New Elist.
3896         (Has_Excluded_Declaration): Declaration previously located in
3897         * inline.adb (Has_Excluded_Statement): Declaration previously
3898         located in inline.adb
3899         * inline.adb (Has_Single_Return): Moved out of
3900         Build_Body_To_Inline to avoid having duplicated code.
3901         (Number_Of_Statements): New subprogram.
3902         (Register_Backend_Inlined_Subprogram): New subprogram.
3903         (Register_Backend_Not_Inlined_Subprogram): New subprogram.
3904         (Add_Inlined_Subprogram): Register backend inlined subprograms and
3905         also register subprograms that cannot be inlined by the backend.
3906         (Has_Excluded_Declaration): Moved out of Build_Body_To_Inline
3907         to avoid having duplicated code.  Replace occurrences of
3908         Debug_Flag_Dot_K by Back_End_Inlining.
3909         * sem_res.adb (Resolve_Call): Code cleanup.
3910         * exp_ch6.adb (Expand_Call): Complete previous patch. Replace
3911         occurrence of Debug_Flag_Dot_K by Back_End_Inlining.
3912         (List_Inlining_Info): Add listing of subprograms passed to the
3913         backend and listing of subprograms that cannot be inlined by
3914         the backend.
3915         * sem_ch12.adb, sem_ch3.adb Replace occurrences of
3916         Debug_Flag_Dot_K by Back_End_Inlining.
3918 2014-07-31  Robert Dewar  <dewar@adacore.com>
3920         * nlists.ads: Minor code fix (remove unwise Inline for
3921         List_Length).
3923 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3925         * einfo.adb: Remove VMS specific code.
3926         * exp_attr.adb: Remove VAX specific code.
3927         * set_targ.adb: Remove handling of VAX_Float.
3928         * sem_vfpt.adb: Remove references to Vax_Native.
3929         * sem_attr.adb (Is_VAX_Float): Remove ref to VAX_Native.
3931 2014-07-31  Robert Dewar  <dewar@adacore.com>
3933         * sem_ch4.adb: Minor reformatting.
3935 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3937         * gcc-interface/trans.c, gcc-interface/misc.c: Remove references
3938         to VMS. Misc clean ups.
3939         * gcc-interface/Makefile.in (gnatlib-shared-vms): Remove.
3941 2014-07-31  Robert Dewar  <dewar@adacore.com>
3943         * cstand.adb, einfo.adb, einfo.ads, errout.adb, exp_attr.adb,
3944         exp_prag.adb, frontend.adb, interfac.ads,
3945         par-prag.adb, s-auxdec.ads, s-filofl.ads, s-fishfl.ads, s-fvadfl.ads,
3946         s-fvaffl.ads, s-fvagfl.ads, s-vaflop.ads, sem_attr.adb, sem_attr.ads,
3947         sem_ch13.adb, sem_ch3.adb, sem_ch8.adb, sem_prag.adb, snames.adb-tmpl,
3948         snames.ads-tmpl: Remove obsolete VMS-specific code.
3950 2014-07-31  Robert Dewar  <dewar@adacore.com>
3952         * sem_ch3.adb, sem_ch13.adb: Minor reformatting.
3954 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3956         * a-intnam-linux.ads: Minor: update obsolete comments.
3957         * s-taasde.adb: Minor: fix comment header.
3959 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
3961         * s-auxdec-vms-ia64.adb, s-parame-vms-alpha.ads, s-asthan-vms-alpha.adb,
3962         s-tpopde-vms.adb, s-mastop-vms.adb, s-tpopde-vms.ads, s-taprop-vms.adb,
3963         mlib-tgt-vms_common.adb, mlib-tgt-vms_common.ads, s-inmaop-vms.adb,
3964         g-enblsp-vms-alpha.adb, s-ransee-vms.adb, s-osprim-vms.adb,
3965         s-osprim-vms.ads, g-socthi-vms.adb, g-socthi-vms.ads, system-vms_64.ads,
3966         s-osinte-vms.adb, s-osinte-vms.ads, g-eacodu-vms.adb,
3967         s-vaflop-vms-alpha.adb, s-parame-vms-ia64.ads, a-dirval-vms.adb,
3968         a-caldel-vms.adb, mlib-tgt-specific-vms-alpha.adb, s-tasdeb-vms.adb,
3969         symbols-vms.adb, a-intnam-vms.ads, g-expect-vms.adb,
3970         symbols-processing-vms-alpha.adb, mlib-tgt-specific-vms-ia64.adb,
3971         s-traent-vms.adb, s-traent-vms.ads, i-cstrea-vms.adb, a-numaux-vms.ads,
3972         symbols-processing-vms-ia64.adb, s-interr-vms.adb, s-memory-vms_64.adb,
3973         s-memory-vms_64.ads, g-enblsp-vms-ia64.adb, s-taspri-vms.ads,
3974         s-auxdec-vms_64.ads, s-intman-vms.adb, s-intman-vms.ads,
3975         s-tpopsp-vms.adb, s-asthan-vms-ia64.adb, a-calend-vms.adb,
3976         a-calend-vms.ads, system-vms-ia64.ads, s-auxdec-vms-alpha.adb: Removed.
3977         * namet.h (Is_Non_Ada_Error): Remove.
3979 2014-07-31  Robert Dewar  <dewar@adacore.com>
3981         * exp_util.adb, lib-writ.adb, sem_ch12.adb, s-direio.adb: Minor
3982         reformatting.
3984 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
3986         * exp_attr.adb (Expand_Loop_Entry_Attribute): Update the comment
3987         which demonstrates the expansion of while loops subject to
3988         attribute 'Loop_Entry. The condition of a while loop along with
3989         related condition actions is now wrapped in a function.  Instead
3990         of repeating the condition, the expansion now calls the function.
3992 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
3994         * sem_case.adb (Check_Against_Predicate): Correct off-by-one
3995         error when reporting of missing values in a case statement for
3996         a type with a static predicate.
3997         (Check_Choices): Reject a choice given by a subtype to which a
3998         Dynamic_Predicate applies.
3999         * sem_ch3.adb (Analyze_Subtype_Declaration): Inherit
4000         Has_Dynamic_Predicate_Aspect flag from parent.
4002 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4004         * sem_ch13.adb (Analyze_Aspect_Specifications): A predicate
4005         cannot apply to a subtype of an incomplete type.
4006         (Is_Static_Choice): Treat an Others_Clause as static. The
4007         staticness of the expression and of the range are checked
4008         elsewhere.
4010 2014-07-31  Pascal Obry  <obry@adacore.com>
4012         * adaint.h (__gnat_ftell64): Added.
4013         (__gnat_fseek64): Added.
4014         (__int64): Added.
4015         * cstreams.c (__int64): Removed.
4017 2014-07-31  Pascal Obry  <obry@adacore.com>
4019         * a-stream.ads (Stream_Element_Offset): Now a signed 64bit type.
4020         * i-cstrea.ads, s-crtl.ads (fseek64): Offset is always a 64bit value.
4021         (ftell64): Always returns a 64bit value.
4022         * cstreams.c (int64): New definition.
4023         (_FILE_OFFSET_BITS): Set to 64 to enable 64bit offset support.
4024         (__gnat_ftell64): Always returns a 64bit value. The implemenation now
4025         uses ftello() on UNIX.
4026         (__gnat_fseek64): Offset is always a 64bit value. The
4027         implementation now uses fseeko() on UNIX.
4028         * a-ststio.adb, s-direio.adb (Set_Position): Simplify code,
4029         always use fseek64 to set the offset.
4030         (Size): Simplify code, always use fseek64/ftell64.
4031         * s-direio.ads (Count): Now an int64.
4032         * g-socket.ads (Vector_Element): Adjust definition for Length
4033         to be a size_t. This matches the C definition and avoid using
4034         a 64bit integer on 32bit platforms now that Count is always 64bit.
4035         * g-socthi-mingw.adb (Ada.Streams): Removed as not used anymore.
4036         (C_Recvmsg): Change some conversion to account for change in
4037         Vector_Element.
4038         (C_Sendmsg): Likewise.
4040 2014-07-31  Robert Dewar  <dewar@adacore.com>
4042         * cstand.adb (Create_Standard): Remove handling of -gnatdm flag.
4043         * debug.adb: Remove documentation of -gnatdm flag.
4044         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of
4045         -gnatdm flag.
4047 2014-07-31  Arnaud Charlet  <charlet@adacore.com>
4049         * lib-writ.adb (Write_Unit_Information): Fix case where U =
4050         No_Unit.
4052 2014-07-31  Claire Dross  <dross@adacore.com>
4054         * exp_util.adb, exp_util.ads
4055         (Get_First_Parent_With_External_Axiomatization_For_Entity):
4056         New routine to find the first parent of an entity with
4057         a pragma Annotate (GNATprove, External_Axiomatization).
4058         (Has_Annotate_Pragma_For_External_Axiomatization): New function
4059         to check if a package has a pragma Annotate (GNATprove,
4060         External_Axiomatization).
4061         * einfo.ads, einfo.adb (Is_Generic_Actual_Subprogram): New
4062         flag on the entity for the declaration created for a formal
4063         subprogram in an instance. This is a renaming declaration,
4064         or in GNATprove_Mode the declaration of an expression function
4065         that captures the axiomatization of the actual.
4066         * sem_ch6.adb (Analyze_Expression_Function): For a
4067         Generic_Actual_Subprogram, place body immediately after the
4068         declaration because it may be used in a subsequent declaration
4069         in the instance.
4070         * sem_ch12.adb (Build_Wrapper): Add code to handle instances where
4071         the actual is a function, not an operator. Handle functions with
4072         one and two parameters and binary and unary operators.
4074 2014-07-31  Pascal Obry  <obry@adacore.com>
4076         * cstreams.c (__gnat_is_regular_file_fd): Removed.
4077         * adaint.c (__gnat_is_regular_file_fd): Added.
4079 2014-07-31  Robert Dewar  <dewar@adacore.com>
4081         * exp_strm.adb: Minor reformatting.
4083 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4085         * sem_ch12.adb (Build_Wrapper): New procedure, subsidiary to
4086         Analyze_Associations, to create a wrapper around operators that
4087         are actuals to formal subprograms. This is done in GNATProve
4088         mode in order to propagate the contracts of the operators to
4089         the body of the instance.
4091 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4093         * sem_attr.adb (Analyze_Attribute, case 'Old):  The reference is
4094         legal if within an aspect specification for a generic subprogram.
4096 2014-07-31  Javier Miranda  <miranda@adacore.com>
4098         * gnat1drv.adb (Back_End_Inlining): Set to false if
4099         Suppress_All_Inlining is set.
4100         * debug.adb: Adding documentation for -gnatd.z.
4101         * inline.adb (Add_Inlined_Body): Extend the -gnatn2
4102         processing to -gnatn1 for calls to Inline_Always routines.
4103         (Add_Inlined_Subprogram): Remove previous patch.
4105 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4107         * sem_ch13.adb (Check_One_Function): Apply properly the static
4108         semantic rules for indexing aspects and the functions they denote.
4110 2014-07-31  Javier Miranda  <miranda@adacore.com>
4112         * debug.adb: Complete documentation of -gnatd.z.
4114 2014-07-31  Bob Duff  <duff@adacore.com>
4116         * gnat_ugn.texi: Minor doc fixes.
4118 2014-07-31  Robert Dewar  <dewar@adacore.com>
4120         * sem_aggr.adb (Resolve_Array_Aggregate): Fix posting of missing
4121         index value.
4123 2014-07-31  Tristan Gingold  <gingold@adacore.com>
4125         * s-unstyp.ads (Packed_Byte): Make this type universal aliasing.
4126         (Packed_Bytes1): Make component aliased.
4128 2014-07-31  Robert Dewar  <dewar@adacore.com>
4130         * s-unstyp.ads, s-fileio.adb: Minor reformatting.
4132 2014-07-31  Robert Dewar  <dewar@adacore.com>
4134         * inline.adb, gnat1drv.adb, exp_ch6.adb, s-fileio.adb: Minor
4135         reformatting.
4137 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4139         * gcc-interface/utils2.c ((build_binary_op): Don't set TREE_THIS_NOTRAP
4140         on array references here, now done more selectively in trans.c.
4142 2014-07-31  Doug Rupp  <rupp@adacore.com>
4144         * gcc-interface/misc.c (gnat_init_gcc_fp(): Set flag_errno_math to 0.
4146 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4148         * sem_util.adb (Is_Effectively_Volatile): New routine.
4150 2014-07-31  Fedor Rybin  <frybin@adacore.com>
4152         * gnat_ugn.texi: Document --test-duration option for gnattest.
4154 2014-07-31  Javier Miranda  <miranda@adacore.com>
4155             Eric Botcazou  <ebotcazou@adacore.com>
4157         * opt.ads (Back_End_Inlining): New variable which controls
4158         activation of inlining by back-end expansion.
4159         * gnat1drv.adb (Adjust_Global_Switches): Initialize Back_End_Inlining
4160         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not build
4161         the body to be inlined by the frontend if Back_End_Inlining
4162         is enabled.
4163         * exp_ch6.adb (Register_Backend_Call): Moved to inline.adb.
4164         (Expand_Call): If backend inlining is enabled let the backend to
4165         handle inlined subprograms.
4166         * inline.ads (Register_Backend_Call): Moved here from exp_ch6
4167         * inline.adb (Register_Backend_Call): Moved here from exp_ch6.
4168         (Add_Inlined_Subprogram): Add subprograms when Back_End_Inlining is set.
4169         (Must_Inline): Do not return Inline_Call if Back_End_Inlining is
4170         enabled.
4171         * debug.adb Document -gnatd.z
4172         * fe.h Import Back_End_Inlining variable.
4173         * gcc-interface/utils.c (create_subprog_decl): If Back_End_Inlining is
4174         enabled then declare attribute "always inline"
4175         * gcc-interface/decl.c, gcc-interface/trans.c,
4176         gcc-interface/gigi.h: Add handling of Inline_Always pragma.
4178 2014-07-31  Robert Dewar  <dewar@adacore.com>
4180         * a-ngelfu.ads: Minor comment fix.
4182 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4184         * freeze.adb (Freeze_Record_Type): Replace all calls to
4185         Is_SPARK_Volatile with Is_Effectively_Volatile and update
4186         related comments.
4187         * sem_ch3.adb (Analyze_Object_Contract, Process_Discriminants):
4188         Replace all calls to Is_SPARK_Volatile with
4189         Is_Effectively_Volatile and update related comments.
4190         * sem_ch5.adb (Analyze_Iterator_Specification,
4191         Analyze_Loop_Parameter_Specification): Replace all calls to
4192         Is_SPARK_Volatile with Is_Effectively_Volatile and update
4193         related comments.
4194         * sem_ch6.adb (Process_Formals): Replace all calls to
4195         Is_SPARK_Volatile with Is_Effectively_Volatile and update
4196         related comments.
4197         * sem_ch12.adb (Instantiate_Object): Replace the call to
4198         Is_SPARK_Volatile_Object with Is_Effectively_Volatile_Object
4199         and update related comment.
4200         * sem_prag.adb (Analyze_External_Property_In_Decl_Part,
4201         Analyze_Global_Item): Replace all calls to Is_SPARK_Volatile
4202         with Is_Effectively_Volatile and update related comments.
4203         * sem_res.adb (Resolve_Actuals, Resolve_Entity_Name): Replace
4204         all calls to Is_SPARK_Volatile with Is_Effectively_Volatile and
4205         update related comments.
4206         * sem_util.adb (Has_Enabled_Property,
4207         Variable_Has_Enabled_Property): Replace all calls
4208         to Is_SPARK_Volatile with Is_Effectively_Volatile and
4209         update related comments.
4210         (Is_Effectively_Volatile): New routine.
4211         (Is_Effectively_Volatile_Object): New routine.
4212         (Is_SPARK_Volatile): Removed.
4213         (Is_SPARK_Volatile_Object): Removed.
4214         * sem_util.ads (Is_Effectively_Volatile): New routine.
4215         (Is_Effectively_Volatile_Object): New routine.
4216         (Is_SPARK_Volatile): Removed.
4217         (Is_SPARK_Volatile_Object): Removed.
4219 2014-07-31  Pascal Obry  <obry@adacore.com>
4221         * s-fileio.adb (Open): Make sure a shared file gets inserted into
4222         the global list atomically. This ensures that the file descriptor
4223         won't be freed because another tasks is closing the file.
4225 2014-07-31  Robert Dewar  <dewar@adacore.com>
4227         * sem_ch3.adb (Process_Range_Expr_In_Decl): Add comments on
4228         generation of _FIRST and _LAST variables even in GNATprove_Mode.
4229         * gnat_ugn.texi: Minor editing.
4230         * sem_prag.adb (Ensure_Aggregate_Form): Make sure generated
4231         aggregate is marked Comes_From_Source if argument is CFS.
4233 2014-07-31  Pascal Obry  <obry@adacore.com>
4235         * s-fileio.adb: Remove obsolete comment.
4237 2014-07-31  Vincent Celier  <celier@adacore.com>
4239         * a-strbou.ads ("=" (Bounded_String, Bounded_String): Add
4240         overriding keyword before function to avoid error when compiler
4241         is called with -gnatyO (check overriding indicators).
4243 2014-07-31  Tucker Taft  <taft@adacore.com>
4245         * gnat_ugn.texi: Add a paragraph pointing the reader
4246         to the "plugins" example.
4248 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4250         * freeze.adb (Freeze_Expression): Document the
4251         purpose of the parent chain traversal.
4253 2014-07-31  Robert Dewar  <dewar@adacore.com>
4255         * checks.ads, checks.adb (Activate_Overflow_Check): Do not set flag for
4256         unconstrained fpt ops.
4258 2014-07-31  Pascal Obry  <obry@adacore.com>
4260         * s-fileio.adb (Open): Make sure a shared file gets inserted into
4261         the global list atomically. This ensures that the file descriptor
4262         won't be freed because another tasks is closing the file.
4264 2014-07-31  Vincent Celier  <celier@adacore.com>
4266         * projects.texi: Minor spelling error fix.
4268 2014-07-31  Robert Dewar  <dewar@adacore.com>
4270         * gnat_rm.texi: Document No_Elaboration_Code_All restriction.
4271         * lib-writ.adb, lib-load.adb: Initialize No_Elab_Code field in unit
4272         information.
4273         * lib.ads, lib.adb (No_Elab_Code): New field in unit information.
4274         * restrict.adb (Process_Restriction_Synonyms): Add handling
4275         of No_Elaboration_Code_All.
4276         * restrict.ads (Process_Restriction_Synonyms): Now handles
4277         No_Elaboration_Code_All.
4278         * sem_ch10.adb (Analyze_Context): Enforce transitive with for
4279         No_Elaboration_Code_All.
4280         * sem_prag.adb (Process_Restrictions_Or_Restriction_Warnings):
4281         Handle setting of No_Elab_Code in unit information. Handle
4282         No_Elaboration_Code_All.
4283         * snames.ads-tmpl (Name_No_Elaboration_Code): New name for
4284         pragma processing.
4285         (Name_No_Elaboration_Code_All): New name for pragma processing.
4287 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4289         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
4290         types with a null range and use the Esize of the component
4291         instead of its RM_Size to identify appropriate values.
4293 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4295         * freeze.adb Add with and use clause for Aspects.
4296         (Freeze_Expression): Emit an error when a volatile constant lacks
4297         Boolean aspect Import.
4298         (Has_Boolean_Aspect_Import): New routine.
4300 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
4302         * exp_util.adb: Minor reformatting.
4304 2014-07-31  Vincent Celier  <celier@adacore.com>
4306         * errutil.adb (Error_Msg): Make sure that all components of
4307         the error message object are initialized.
4309 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4311         * sem_ch4.adb (Try_Container_Indexing): If the container type is
4312         class-wide, use specific type to locate iteration primitives.
4313         * sem_ch13.adb (Check_Indexing_Functions): Add legality checks for
4314         rules in RM 4.1.6 (Illegal_Indexing): New diagnostic procedure.
4315         Minor error message reformating.
4316         * exp_ch5.adb (Expand_Iterator_Loop): Handle properly Iterator
4317         aspect for a derived type.
4319 2014-07-31  Robert Dewar  <dewar@adacore.com>
4321         * debug.adb: Document debug flag d.X.
4323 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4325         * sem_util.ads (Find_Specific_Type): Moved here from exp_disp.adb.
4326         * sem_util.adb (Find_Specific_Type): If type is untagged private,
4327         retrieve full view so that primitive operations can be located.
4328         * exp_disp.adb Move Find_Specific_Type to sem_util.
4329         * exp_ch4.adb (Expand_N_Op_Eq): If operands are class-wide, use
4330         Find_Specific_Type to locate primitive equality.
4331         * exp_util.adb (Make_CW_Equivalent_Type): A class_wide equivalent
4332         type does not require initialization.
4333         * exp_attr.adb (Compile_Stream_Body_In_Scope): Within an instance
4334         body all visibility is established, and the enclosing package
4335         declarations must not be installed.
4337 2014-07-31  Yannick Moy  <moy@adacore.com>
4339         * sem_parg.adb, sem_prag.ads (Collect_Subprogram_Inputs_Outputs):
4340         Make subprogram public.
4342 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4344         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): New
4345         predicate Discriminated_Size, to distinguish between private
4346         components that depend on discriminants from those whose size
4347         depends on some other non-static expression.
4349 2014-07-31  Nicolas Setton  <setton@adacore.com>
4351         * g-exptty.adb (Close): Fix binding to Waitpid: use the
4352         tty version.
4354 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4356         * sem_ch3.adb (Make_Index): Reject properly the use of 'Length
4357         in a discrete range, when 'range was probably intended.
4359 2014-07-31  Robert Dewar  <dewar@adacore.com>
4361         * sem_warn.adb, sem_warn.ads (Has_Junk_Name): Moved from body to spec.
4363 2014-07-31  Robert Dewar  <dewar@adacore.com>
4365         * frontend.adb: Minor reformatting.
4366         * sem.adb: Minor reformatting.
4367         * sem_ch6.adb (Analyze_Null_Procedure): Set proper sloc for
4368         identifiers on rewrite.
4369         * par.adb: Minor comment updates.
4370         * a-ngelfu.adb (Cos): Minor simplification.
4371         * par-ch13.adb (Get_Aspect_Specifications): Improve messages
4372         and recovery for bad aspect.
4373         * exp_ch3.adb: Code clean up.
4374         * sem_util.ads: Minor comment correction.
4375         * sem_ch13.adb (Check_Array_Type): Properly handle large types.
4376         * sem_ch3.adb: Code clean up.
4377         * binderr.ads: Minor comment correction.
4379 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4381         * exp_disp.adb (Expand_Interface_Conversion): A call whose
4382         prefix is a static conversion to an interface type that is not
4383         class-wide is not dispatching.
4385 2014-07-31  Robert Dewar  <dewar@adacore.com>
4387         * inline.adb, s-traceb.adb, s-traceb-hpux.adb, memtrack.adb,
4388         s-traceb-mastop.adb: Minor reformatting.
4390 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4392         * exp_ch3.adb (Expand_Record_Extension): In ASIS_Mode perform
4393         expansion, to handle properly visibility of selected components
4394         in instance bodies.
4396 2014-07-31  Robert Dewar  <dewar@adacore.com>
4398         * par-ch13.adb (Get_Aspect_Specifications): Set Inside_Depends.
4399         * par-ch2.adb (P_Pragma): Set Inside_Depends.
4400         * par-ch4.adb (P_Simple_Expression): Pass Inside_Depends to
4401         Check_Unary_Plus_Or_Minus.
4402         * scans.ads (Inside_Depends): New flag.
4403         * scng.adb (Scan): Pass Inside_Depends to Check_Arrow.
4404         * style.ads: Add Inside_Depends parameter to Check_Arrow Add
4405         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4406         * styleg.adb (Check_Arrow): Handle Inside_Depends case.
4407         (Check_Unary_Plus_Or_Minus): Handle Inside_Depends case.
4408         * styleg.ads: Add Inside_Depends parameter to Check_Arrow Add.
4409         Inside_Depends parameter to Check_Unary_Plus_Or_Minus.
4411 2014-07-31  Javier Miranda  <miranda@adacore.com>
4413         * s-vaflop.adb Move the body of function T_To_G before
4414         T_To_D. Required for frontend inlining.
4415         * inline.adb (Has_Excluded_Contract): New subprogram used to
4416         check if a subprogram inlined by the frontend has contracts
4417         which cannot be inlined.
4419 2014-07-31  Bob Duff  <duff@adacore.com>
4421         * s-traceb.adb, s-traceb-hpux.adb, s-traceb-mastop.adb:
4422         (Call_Chain): Add 1 to number of frames to skip, to account for
4423         the fact that there's one more frame on the stack.
4424         * gcc-interface/Makefile.in (s-traceb.o): Adjust rules.
4426 2014-07-31  Robert Dewar  <dewar@adacore.com>
4428         * checks.adb (Enable_Overflow_Check): More precise setting of
4429         Do_Overflow_Check flag for division.
4431 2014-07-31  Eric Botcazou  <ebotcazou@adacore.com>
4433         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject packed
4434         array types with implementation type.
4436 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4438         * sem_ch10.adb (Process_State): Remove local variable Name. Add
4439         local variable Decl. Partially declare an abstract state by
4440         generating an entity and storing it in the state declaration.
4441         * sem_prag.adb (Create_Abstract_State): Fully declare a
4442         semi-declared abstract state.
4444 2014-07-31  Robert Dewar  <dewar@adacore.com>
4446         * prj-nmsc.adb: Minor reformatting.
4448 2014-07-31  Bob Duff  <duff@adacore.com>
4450         * s-tasdeb.adb (System.Tasking.Debug): Remove
4451         all usage of the secondary stack from this package.
4453 2014-07-31  Hristian Kirtchev  <kirtchev@adacore.com>
4455         * freeze.adb (Freeze_Expression): Update the loop in charge
4456         of finding a proper insertion place for freeze nodes to handle
4457         N_Expression_With_Actions nodes.
4459 2014-07-31  Robert Dewar  <dewar@adacore.com>
4461         * sem_util.adb, a-ngelfu.ads, prj-nmsc.adb, prj-conf.adb: Minor
4462         reformatting.
4464 2014-07-31  Pascal Obry  <obry@adacore.com>
4466         * prj-nmsc.adb: Minor reformatting.
4468 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4470         * sem_util.adb (Has_Preelaborable_Initialization): Check that
4471         type is tagged before checking whether a user-defined Initialize
4472         procedure is present.
4474 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
4476         * a-ngelfu.ads (Sqrt): Augment postcondition.
4478 2014-07-31  Pascal Obry  <obry@adacore.com>
4480         * prj-nmsc.adb (Check_Library_Attributes): An aggegate library
4481         directory and ALI directory must be different than all object
4482         and library directories of aggregated projects.
4484 2014-07-31  Vincent Celier  <celier@adacore.com>
4486         * prj-pars.adb, prj-conf.ads, prj-conf.adb (Locate_Runtime): Move spec
4487         to package body, as it is not called from outside. Remove argument
4488         Project_Tree, no longer used. When runtime cannot be found,
4489         call Raise_Invalid_Config instead of failing the program.
4491 2014-07-31  Robert Dewar  <dewar@adacore.com>
4493         * bindgen.adb (Gen_Output_File_Ada): Generate pragma Suppress
4494         (Overflow_Check).
4495         * gnatlink.adb (Process_Args): Remove generation of -gnato0,
4496         no longer needed.
4498 2014-07-31  Robert Dewar  <dewar@adacore.com>
4500         * gnat_ugn.texi: Document new switch -gnato0.
4501         * sem_ch3.ads: Minor reformatting.
4502         * gnatlink.adb (Process_Args): Compile bind file with -gnato0
4503         (we do not want overflow checks when incrementing elaboration
4504         counters).
4505         * einfo.ads: Minor reformatting.
4507 2014-07-31  Robert Dewar  <dewar@adacore.com>
4509         * exp_ch5.adb, freeze.adb, exp_ch3.adb: Minor comment correction.
4510         * s-arit64.adb: Minor reformatting.
4512 2014-07-31  Robert Dewar  <dewar@adacore.com>
4514         * gnat1drv.adb (Adjust_Global_Switches): Default for overflow
4515         checking is enabled except in GNAT_Mode.
4516         * switch-c.adb (Scan_Front_End_Switches): Implement -gnato0
4517         (suppress overflow checks).
4519 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4521         * exp_ch3.adb (Expand_Freeze_Record_Type): Do not build an
4522         invariant procedure for an internally generated subtype that is
4523         created for an object of a class-wide type.
4525 2014-07-31  Vincent Celier  <celier@adacore.com>
4527         * prj-nmsc.adb, errutil.adb: Make code similar to Errout.
4529 2014-07-31  Gary Dismukes  <dismukes@adacore.com>
4531         * gnat_rm.texi, sem_aux.ads, einfo.ads, sem_util.ads, sem_ch6.adb,
4532         exp_disp.adb: Minor reformatting.
4534 2014-07-31  Robert Dewar  <dewar@adacore.com>
4536         * exp_ch5.adb, sem_ch3.adb, exp_ch7.adb, exp_util.adb, exp_ch9.adb,
4537         sem_ch7.adb, checks.adb, s-exctra.adb, exp_ch6.adb, exp_disp.adb,
4538         exp_dist.adb, sem_ch13.adb, exp_strm.adb, exp_ch3.adb: Minor
4539         reformatting.
4541 2014-07-31  Robert Dewar  <dewar@adacore.com>
4543         * sem_ch13.adb: Minor reformatting.
4545 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4547         * exp_ch3.adb (Build_Invariant_Checks): If the enclosing record
4548         is an unchecked_union, warn that invariants will not be checked
4549         on components that have them.
4551 2014-07-31  Robert Dewar  <dewar@adacore.com>
4553         * freeze.adb (Freeze_Entity): Check for error of
4554         Type_Invariant'Class applied to a untagged type.
4555         * sem_ch6.adb (Analyze_Null_Procedure): Unconditionally rewrite
4556         as null body, so that we perform error checks even if expansion
4557         is off.
4559 2014-07-31  Ed Schonberg  <schonberg@adacore.com>
4561         * sem_ch13.adb (Build_Invariant_Procedure): If body of procedure
4562         is already present, nothing to do.
4563         * exp_ch3.adb (Build_Component_Invariant_Call): For an access
4564         component, check whether the access type has an invariant before
4565         checking the designated type.
4566         (Build_Record_Invariant_Proc): Change suffix of generated
4567         name to prevent ambiguity when record type has invariants
4568         in addition to those of components, and two subprograms are
4569         constructed. Consistent with handling of array types.
4570         (Insert_Component_Invariant_Checks): Build invariant procedure
4571         body when one has not been created yet, in the case of composite
4572         types that are completions and whose full declarations carry
4573         invariants.
4575 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4577         * gnat_rm.texi: Minor doc fixes.
4579 2014-07-30  Robert Dewar  <dewar@adacore.com>
4581         * a-rbtgbo.adb, sem_ch13.adb: Minor reformatting.
4583 2014-07-30  Vincent Celier  <celier@adacore.com>
4585         * errutil.adb (Set_Msg_Text): Process tilde ('~'): no processing
4586         of error message.
4587         * prj-nmsc.adb (Locate_Directory): Use a tilde ('~') in the
4588         message to report that a directory cannot be created, to avoid
4589         processing of the directory path that may contains special
4590         insertion characters.
4592 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4594         * a-crdlli.ads: Place declaration of Empty_List after full type
4595         declaration for Curosr, to prevent freezing error.
4597 2014-07-30  Robert Dewar  <dewar@adacore.com>
4599         * get_targ.adb: Minor code reorganization.
4600         * prj-proc.adb, prj-proc.ads, get_targ.ads, sem_ch6.adb: Minor
4601         reformatting.
4603 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4605         * a-cbhase.adb: a-cbhase.adb (Insert): Raise Constraint_Error,
4606         not Program_Error, when attempting to remove an element not in
4607         the set. This is the given semantics for all set containers.
4609 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4611         * a-rbtgbo.adb (Delete_Node_Sans_Free): If
4612         element is not present in tree return rather than violating
4613         an assertion. Constraint_Error will be raised in the caller if
4614         element is not in the container.
4616 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
4618         * set_targ.adb (Read_Target_Dependent_Values): New subprogram.
4619         (elab body): Add provision for default target config file.
4620         * get_targ.ads, get_targ.adb (Get_Back_End_Config_File): New subprogram.
4622 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4624         * a-cbhase.adb (Delete): Raise Constraint_Error, not Program_Error,
4625         when attempting to remove an element not in the set. This is
4626         the given semantics for all set containers.
4627         * a-cborse.adb (Delete): Attempt removal first, to check for
4628         tampering, before checking whether this is an attempt to
4629         delete a  non-existing element, and in fthe latter case raise
4630         Constraint_Error.
4632 2014-07-30  Vincent Celier  <celier@adacore.com>
4634         * prj-proc.adb (Recursive_Process): Do not create a new
4635         Project_Id if the project is already in the list of projects of
4636         the tree.
4638 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4640         * sem_ch6.adb (Analyze_Function_Return): Reject a return expression
4641         whose type is an incomplete formal type.
4642         (Analyze_Return_Type): Reject a return type that is an untagged
4643         imcomplete formal type.
4644         (Process_Formals): Reject a formal parameter whose type is an
4645         untagged formal incomplete type.
4646         * sem_res.adb (Resolve_Actuals): Reject an actual whose type is
4647         an untagged formal incomplete type.
4649 2014-07-30  Robert Dewar  <dewar@adacore.com>
4651         * gnat_ugn.texi: Minor spelling correction.
4652         * makeutl.adb: Minor code reorganization.
4653         * exp_ch4.adb, exp_aggr.adb, exp_ch3.adb: Minor reformatting.
4655 2014-07-30  Robert Dewar  <dewar@adacore.com>
4657         * einfo.ads (Has_Unchecked_Union): Document that this is used
4658         to check for illegal Valid_Scalars attribute references.
4659         * exp_attr.adb (Build_Record_VS_Func): New function
4660         (Expand_N_Attribute_Reference, case Valid_Scalars): Call this
4661         function.
4662         * gnat_rm.texi: Document 'Valid_Scalars cannot be applied to
4663         Unchecked_Union Add note on 'Valid_Scalars generating a lot
4664         of code.
4665         * sem_attr.adb (Analyze_Attribute, case Valid_Scalars): Give
4666         error on attempt to apply Valid_Scalars to Unchecked_Union type.
4668 2014-07-30  Steve Baird  <baird@adacore.com>
4670         * exp_ch4.adb (Expand_N_Indexed_Component): Disable optimized handling
4671         of A(I..J)(K) in CodePeer_Mode.
4673 2014-07-30  Ben Brosgol  <brosgol@adacore.com>
4675         * gnat_ugn.texi: Fix typo.
4677 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4679         * lib-writ.ads: document format change.
4681 2014-07-30  Pascal Obry  <obry@adacore.com>
4683         * prj-util.adb (For_Interface_Sources): Do not
4684         include sources from withed externally built projects.
4686 2014-07-30  Robert Dewar  <dewar@adacore.com>
4688         * lib.adb: Minor reformatting.
4689         * prj-util.adb: Minor reformatting.
4691 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4693         * exp_aggr.adb (Build_Record_Aggr_Code): For an array component
4694         that depends on discriminants, and which is given by an others
4695         clause, create an explicit subtype with the discriminant values
4696         of the enclosing aggregate, because the backend cannot otherwise
4697         retrieve the actual bounds of the array.
4699 2014-07-30  Fedor Rybin  <frybin@adacore.com>
4701         * gnat_ugn.texi: Improve gnattest documentation.
4703 2014-07-30  Pascal Obry  <obry@adacore.com>
4705         * makeutl.adb (Insert_Project_Sources): Properly handle sources
4706         that are aggregated. We want to include sources not only part
4707         of libraries but also if part of an aggregated project from an
4708         aggregate library.
4709         * prj.adb (For_Project_And_Aggregated_Context): Properly check
4710         state of root project.
4712 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4714         * lib-load.ads: Minor reformatting.
4715         * sinfo.ads (Library_Unit): Update comment.
4716         * lib.ads (Notes): Simplify. The Unit component in Notes_Entry
4717         is redundant. Instead used the pragma Node_Id directly as the
4718         element type.
4720 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4722         * lib.adb (Store_Note): Store only notes that do not come from
4723         an instance, and that are in the extended main source unit.
4724         * lib-writ (Write_Unit_Information): Annotations from subunits
4725         must be emitted along with those for the main unit, and they
4726         must carry a specific file name.
4727         * ali.ads (Notes_Record): Use a File_Name_Type instead of a
4728         Unit_Id for the source file containing the pragma, as in the
4729         case of annotations from subunits we might not have a readily
4730         available unit id.
4731         * ali.adb (Scan_ALI): Account for above change in data structure.
4733 2014-07-30  Vincent Celier  <celier@adacore.com>
4735         * makeutl.adb (Insert_Project_Sources): When the library project
4736         is an aggregate Stand-Alone Library, insert in the queue the
4737         Ada interface units, with Closure set to True;
4739 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4741         * sem_util.adb: Fix minor typo.
4742         * makeutl.adb: Minor reformatting.
4744 2014-07-30  Robert Dewar  <dewar@adacore.com>
4746         * exp_ch7.adb, checks.adb, makeutl.adb, makeutl.ads: Minor reformatting.
4748 2014-07-30  Yannick Moy  <moy@adacore.com>
4750         * checks.ads: Fix typo in comment.
4752 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
4754         * sem_util.adb (Set_Debug_Info_Needed): For scalar types, recurse on
4755         entities that materialize range bounds, if any.
4757 2014-07-30  Vincent Celier  <celier@adacore.com>
4759         * projects.texi: Minor spelling fix.
4761 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
4763         * checks.adb (Make_Bignum_Block): Use the new secondary stack
4764         build routines to manage the mark.
4765         * exp_ch7.adb (Create_Finalizer, Expand_Cleanup_Actions):
4766         Use the new secodary stack build routines to manage the mark.
4767         (Insert_Actions_In_Scope_Around): Add new formal parameter
4768         Manage_SS along with comment on its usage. Code and comment
4769         reformatting. Mark and release the secondary stack when the
4770         context warrants it.
4771         (Make_Transient_Block): Update the call
4772         to Insert_Actions_In_Scope_Around to account for parameter Manage_SS.
4773         (Wrap_Transient_Declaration): Remove local variable
4774         Uses_SS. Ensure that the secondary stack is marked and released
4775         when the related object declaration appears in a library level
4776         package or package body. Code and comment reformatting.
4777         * exp_util.ads, exp_util.adb (Build_SS_Mark_Call): New routine.
4778         (Build_SS_Release_Call): New routine.
4780 2014-07-30  Steve Baird  <baird@adacore.com>
4782         * exp_attr.adb: Revert previous change, not needed after all.
4784 2014-07-30  Vincent Celier  <celier@adacore.com>
4786         * makeutl.adb (Queue.Insert_Project_Sources): Insert with
4787         Closure => True for interfaces of Stand-Alone Libraries.
4788         * makeutl.ads (Source_Info (Format => Gprbuild)): Add new
4789         Boolean component Closure, defaulted to False.
4791 2014-07-30  Yannick Moy  <moy@adacore.com>
4793         * sem_res.adb: Fix typo in error message.
4795 2014-07-30  Robert Dewar  <dewar@adacore.com>
4797         * sem_ch3.adb (Process_Range_Expr_In_Decl): Use _FIRST/_LAST
4798         as name suffixes rather than L/H for subtype bounds.
4799         * tbuild.ads: Minor comment improvements and fixes
4800         (Make_External_Name): Document that suffix can start with an
4801         underscore.
4803 2014-07-30  Bob Duff  <duff@adacore.com>
4805         * gnat_ugn.texi: Document --rep-clauses switch.
4807 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4809         * sem_ch13.adb (Analyze_Aspect_Specifications): Default_Value and
4810         Default_Component_Value can only be specified for scalar type or
4811         arrays of scalar types respectively.  This legality check must
4812         be performed at the point the aspect is analyzed, in order to
4813         reject aspect specifications that apply to a partial view.
4815 2014-07-30  Thomas Quinot  <quinot@adacore.com>
4817         * freeze.adb: Minor reformatting.
4819 2014-07-30  Robert Dewar  <dewar@adacore.com>
4821         * exp_attr.adb (Expand_Attribute, case First/Last): Don't expand in
4822         codepeer mode.
4824 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4826         * freeze.adb (Check_Expression_Function): At the freeze point
4827         of an expression function, verify that the expression in the
4828         function does not contain references to any deferred constants
4829         that have no completion yet.
4830         (Freeze_Expression, Freeze_Before): call
4831         Check_Expression_Function.
4832         * a-ciorse.ads: Add Reference_Control_Type to detect tampering.
4833         * a-ciorse.adb: Add Adjust and Finalize routines for
4834         Reference_Control_Type. Use it in the construction of Reference
4835         and Constant_Reference values.
4837 2014-07-30  Robert Dewar  <dewar@adacore.com>
4839         * exp_aggr.adb: Update comments.
4840         * a-chtgbo.adb, a-chtgbo.ads, a-cbhase.adb, a-cbhase.ads: Minor
4841         reformatting.
4843 2014-07-30  Robert Dewar  <dewar@adacore.com>
4845         * cstand.adb (New_Standard_Entity): New version takes name
4846         string to call Make_Name.
4847         (Create_Standard): Use this routine to set name before setting other
4848         fields.
4850 2014-07-30  Robert Dewar  <dewar@adacore.com>
4852         * exp_attr.adb (Expand_Attribute, case First): Rewrite simple
4853         entity reference.
4854         (Expand_Attribute, case Last): Ditto.
4855         * exp_ch3.adb (Constrain_Index): New calling sequence for
4856         Process_Range_Expr_In_Decl.
4857         (Expand_N_Object_Declaration): Avoid setting Is_Known_Valid in one
4858         problematical case.
4859         * sem_ch3.adb (Constrain_Index): New calling sequence for
4860         Process_Range_Expr_In_Decl.
4861         (Set_Scalar_Range_For_Subtype): ditto.
4862         (Process_Range_Expr_In_Decl): Create constants to hold bounds for
4863         subtype.
4864         * sem_ch3.ads (Process_Range_Expr_In_Decl): Add Subtyp parameter.
4865         * sem_eval.adb (Compile_Time_Compare): Make sure we use base
4866         types if we are not assuming no invalid values.
4868 2014-07-30  Robert Dewar  <dewar@adacore.com>
4870         * clean.adb: Minor reformatting.
4871         * opt.ads: Minor fix to incorrect comment.
4873 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4875         * a-chtgbo.ads, a-chtgbo.adb (Delete_Node_At_Index): New
4876         subprogram, used by bounded hashed sets, to delete a node at
4877         a given index, whose element may have been improperly updated
4878         through a Reference_Preserving key.
4879         * a-cbhase.ads: Add Reference_Control_Type to package Generic_Keys.
4880         * a-cbhase.adb: Add Adjust and Finalize routines for
4881         Reference_Control_Type.
4882         (Delete, Insert): Raise Program_Error, not Constraint_Error,
4883         when operation is illegal.
4884         (Reference_Preserving_Key): Build aggregate for Reference_Control_Type
4885         * a-cmbutr.ads: Add Reference_Control_Type to detect tampering. Add
4886         private with_clause for Ada.Finalization.
4887         * a-cbmutr.adb: Add Adjust and Finalize routines for
4888         Reference_Control_Type. Use it in the construction of Reference
4889         and Constant_Reference values.
4891 2014-07-30  Robert Dewar  <dewar@adacore.com>
4893         * sem_ch3.adb, sem_ch3.ads: Minor code reorganization.
4895 2014-07-30  Pascal Obry  <obry@adacore.com>
4897         * clean.adb (Clean_Project): Properly check for directory
4898         existence before trying to enter it.
4900 2014-07-30  Robert Dewar  <dewar@adacore.com>
4902         * sem_ch3.ads, prj.ads, prj-nmsc.adb: Minor reformatting.
4904 2014-07-30  Robert Dewar  <dewar@adacore.com>
4906         * par-ch5.adb (P_Sequence_Of_Statements): Properly handle
4907         missing semicolon after name.
4909 2014-07-30  Pascal Obry  <obry@adacore.com>
4911         * prj.ads (Gprinstall_Flags): New constant.
4912         * prj-nmsc.adb (Check_Library_Attributes): Do not fails for
4913         missing library dir if Directories_Must_Exist_In_Projects
4914         is false.
4916 2014-07-30  Bob Duff  <duff@adacore.com>
4918         * a-except-2005.adb, a-except.adb: Remove obsolete comments.
4919         * s-traceb.ads: Updagte comments.
4921 2014-07-30  Robert Dewar  <dewar@adacore.com>
4923         * checks.adb, a-cihase.adb, a-cihase.ads, a-chtgop.adb, a-chtgop.ads,
4924         a-except.adb, a-except-2005.adb, a-cborse.adb, a-cborse.ads,
4925         a-exexda.adb, a-elchha.adb, exp_aggr.adb, a-cohase.adb: Minor
4926         reformatting.
4928 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4930         * a-chtgop.ads, a-chtgop.adb (Delete_Node_At_Index): New
4931         subprogram, used by all versions of hashed sets, to delete a node
4932         whose element has been improperly updated through a Reference_
4933         Preserving key.
4934         * a-cohase.adb: Remove Delete_Node, use new common procedure
4935         Delete_Node_At_Index.
4936         * a-cihase.ads: Add Reference_Control_Type to package Generic_Keys.
4937         * a-cihase.adb: Add Adjust and Finalize routines for
4938         Reference_Control_Type.
4939         (Reference_Preserving_Key): Build aggregate for
4940         Reference_Control_Type
4942 2014-07-30  Yannick Moy  <moy@adacore.com>
4944         * checks.adb, checks.ads (Determine_Range_R): New procedure to
4945         determine the possible range of a floating-point expression.
4947 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4949         * a-cborse.ads: Add Reference_Control_Type to package Generic_Keys.
4950         * a-cborse.adb: Add Adjust and Finalize routines for
4951         Reference_Control_Type.
4952         (Reference_Preserving_Key): Build aggregate for
4953         Reference_Control_Type.
4954         (Delete): Check for tampering, and raise Program_Error (not
4955         Constraint_Error) when attempting to delete an element not in
4956         the set.
4957         (Insert): Ditto.
4959 2014-07-30  Bob Duff  <duff@adacore.com>
4961         * a-elchha.adb, a-except-2005.adb, a-except.adb, a-exexda.adb,
4962         * a-exextr.adb, a-exstat.adb, exp_intr.ads, s-tassta.adb:
4963         Exception_Information is used to produce useful debugging
4964         information for the programmer. However, it was also used to
4965         implement the stream attributes for type Exception_Occurrence. The
4966         latter requires a stable and portable interface, which meant
4967         that we couldn't include a symbolic traceback. A separate set of
4968         routines was used to provide symbolic tracebacks under program
4969         control (i.e. not automatically). The goal of this ticket is
4970         to provide such automatic tracebacks, so the change here is to
4971         split the two functionalities: Exception_Information gives the
4972         maximally useful information for debugging (i.e. it now includes
4973         a symbolic traceback when a decorator is set, and it can be
4974         improved freely in the future without disturbing streaming).
4975         Untailored_Exception_Information always uses hexadecimal addresses
4976         in the traceback, has a stable and portable output, and is now
4977         used for streaming.
4979 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
4981         * exp_aggr.adb (Expand_Array_Aggregate): Add missing test
4982         on the target of the assignment to find out whether it
4983         can be directly done by the back-end.
4984         * exp_util.adb (Is_Possibly_Unaligned_Slice): Remove obscure test.
4986 2014-07-30  Robert Dewar  <dewar@adacore.com>
4988         * inline.adb, a-coorse.adb, a-coorse.ads, a-cohase.adb, a-cohase.ads,
4989         a-tasatt.adb: Minor reformatting.
4991 2014-07-30  Robert Dewar  <dewar@adacore.com>
4993         * exp_ch4.adb: Minor reformatting.
4995 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
4997         * a-coorse.adb, a-coorse.ads (Generic_Keys): Add a
4998         Reference_Control_Type to generic package, to keep additional
4999         information for Reference_Types that manipulate keys. Add Adjust and
5000         Finalize procedures for this type.
5001         (Finalize): When finalizing a reference_preserving_key, verify
5002         that the key of the new value is equivalent to the key of the
5003         original element, raise Program_Error otherwise.
5004         (Insert): Detect tampering.
5005         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5006         and update Busy and Lock bits to detect tampering.
5007         * a-cohase.ads: Keep with-clause private.
5009 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5011         * exp_ch4.adb (Expand_N_Op_Eq): Emit a warning when the operands
5012         of an equality are of an Unchecked_Union type and lack inferable
5013         discriminants.
5015 2014-07-30  Bob Duff  <duff@adacore.com>
5017         * g-exctra.adb, g-exctra.ads, s-exctra.adb, s-exctra.ads, Makefile.rtl,
5018         g-trasym.adb, g-trasym.ads, s-trasym.adb, s-trasym.ads: Move
5019         GNAT.Traceback.Symbolic and GNAT.Exception_Traces into the System
5020         hierarchy (System.Traceback.Symbolic and System.Exception_Traces), so
5021         we can call them from the runtimes. Leave renamings in place under GNAT.
5023 2014-07-30  Yannick Moy  <moy@adacore.com>
5025         * inline.adb (Check_And_Build_Body_To_Inline): Include code for
5026         inlining in GNATprove mode.
5028 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5030         * a-cohase.adb, a-cohase.ads (Generic_Keys): Add a
5031         Reference_Control_Type to generic package, to keep additional
5032         information for Reference_Types that manipulate keys. Add Adjust and
5033         Finalize procedures for this type.
5034         (Delete_Node): New procedure called when finalizing a
5035         Reference_Control_Type, to remove a node whose element has been
5036         improperly updated through a Reference.
5037         (Insert): Detect tampering.
5038         (Reference_Preserving_Key): Build proper Reference_Control_Type,
5039         and update Busy and Lock bits to detect tampering.
5041 2014-07-30  Bob Duff  <duff@adacore.com>
5043         * exp_intr.ads: Minor comment fix.
5045 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5047         * exp_prag.adb, a-tags.ads: Minor typo fixes.
5049 2014-07-30  Bob Duff  <duff@adacore.com>
5051         * a-excach.adb, a-excach-cert.adb, a-except-2005.ads,
5052         a-except.ads, g-traceb.adb, memtrack.adb,
5053         s-traceb.adb, s-traceb.ads, s-traceb-hpux.adb, s-traceb-mastop.adb:
5054         Cleanup: Make the three versions of System.Traceback.Call_Chain
5055         have the same interface. Use an array for the Traceback parameter
5056         instead of an Address.  This will enable reduction in code
5057         duplication.
5059 2014-07-30  Pat Rogers  <rogers@adacore.com>
5061         * gnat_ugn.texi: Corrected minor textual error in description
5062         of switch -gnatwl.
5064 2014-07-30  Bob Duff  <duff@adacore.com>
5066         * Makefile.rtl: Sort file names.
5068 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5070         * a-tasatt.adb: Complete previous change: kill spurious warning
5071         on e.g. sparc, and make sure we only use the fast path when the
5072         alignment is compatible.
5074 2014-07-30  Yannick Moy  <moy@adacore.com>
5076         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Mark new Spec_Id as
5077         coming from source.
5079 2014-07-30  Yannick Moy  <moy@adacore.com>
5081         * inline.adb (Build_Body_To_Inline): Issue more precise messages
5082         for declarations that prevent inlining.
5083         (Cannot_Inline): Change usual start of message to refer to contextual
5084         analysis in GNATprove mode.
5085         * sem_res.adb (Resolve_Call): Change usual start of message to
5086         refer to contextual analysis in GNATprove mode, when inlining
5087         not possible.
5089 2014-07-30  Robert Dewar  <dewar@adacore.com>
5091         * sem_res.adb, sem_ch6.adb: Minor code reorganization.
5092         * inline.adb: Minor reformatting.
5094 2014-07-30  Javier Miranda  <miranda@adacore.com>
5096         * a-tags.ads: Add comments.
5098 2014-07-30  Pat Rogers  <rogers@adacore.com>
5100         * gnat_rm.texi: Minor word error.
5102 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5104         * exp_prag.adb (Expand_Old): Insert declarationss of temporaries
5105         created to capture the value of the prefix of 'Old at the
5106         beginning of the current declarative part, to prevent data flow
5107         anomalies in the postcondition procedure that will follow.
5109 2014-07-30  Yannick Moy  <moy@adacore.com>
5111         * debug.adb: Retire debug flag -gnatdQ.
5112         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Check SPARK_Mode
5113         on decl, not on body.  Ignore predicate functions.
5114         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove use of
5115         debug flag -gnatdQ.  Correctly analyze SPARK_Mode on decl and
5116         body when generating a decl for a body on which SPARK_Mode aspect
5117         is given.
5118         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Reorder tests for
5119         attaching pragma to entity, to account for declaration not coming
5120         from source.
5121         * sem_res.adb (Resolve_Call): Issue warning and flag subprogram
5122         as not always inlined in GNATprove mode, when called in an
5123         assertion context.
5125 2014-07-30  Vincent Celier  <celier@adacore.com>
5127         * debug.adb: Minor comment update.
5129 2014-07-30  Robert Dewar  <dewar@adacore.com>
5131         * s-tasuti.adb, s-tassta.adb: Minor reformatting.
5132         * sprint.adb (Sprint_Node): Handle N_Contract case.
5133         * exp_prag.adb: Minor reformatting.
5134         * freeze.adb (Freeze_Entity): Check useless postcondition for
5135         No_Return subprogram.
5136         * sem_prag.adb: Minor reformatting.
5138 2014-07-30  Javier Miranda  <miranda@adacore.com>
5140         * a-tags.ads: Complete comments about performance.
5142 2014-07-30  Fedor Rybin  <frybin@adacore.com>
5144         * gnat_ugn.texi: Adding description for --exit-status option to
5145         gnattest section.  Fixing index entry of --passed-tests option
5146         in gnattest section.
5148 2014-07-30  Javier Miranda  <miranda@adacore.com>
5150         * Makefile.rtl, gnat_rm.texi, i-cpp.adb, i-cpp.ads, impunit.adb,
5151         rtsfind.ads: Remove references to package Interfaces.CPP since this
5152         package is no longer needed.
5154 2014-07-30  Bob Duff  <duff@adacore.com>
5156         * s-taasde.adb (Timer_Queue): Don't use a
5157         build-in-place function call to initialize the Timer_Queue.
5158         * s-traent.adb, s-traent.ads, s-traent-vms.adb, s-traent-vms.ads:
5159         Turn off polling in these units, because otherwise we get
5160         elaboration circularities with Ada.Exceptions when the -gnatP
5161         switch is used.
5162         * s-tassta.adb (Create_Task): Make sure independent tasks
5163         are created with Parent = Environment_Task. This was not true,
5164         for example, in s-interr.adb, when Interrupt_Manager does "new
5165         Server_Task"; the Server_Task had Parent = Interrupt_Manager,
5166         which is wrong because the master is determined by the access
5167         type, which is at library level.
5168         * s-tasuti.adb (Make_Independent): Avoid setting Parent; it is
5169         now set correctly by Create_Task.
5170         (Make_Passive): Remove the workaround for the race condition in
5171         Make_Independent.
5172         * frontend.adb (Frontend): Revert to previous method of detecting
5173         temporary configuration pragma files, recognizing such files by
5174         ".tmp" in the name. This is more general than detecting pragmas
5175         Source_File_Name_Project, because it allows any tool to use
5176         this naming convention, no matter the content of the file.
5177         * gnat_ugn.texi: Document this naming convention.
5179 2014-07-30  Robert Dewar  <dewar@adacore.com>
5181         * exp_ch7.adb, s-tataat.adb, s-tataat.ads, s-parame-vms-alpha.ads,
5182         inline.adb, s-parame-hpux.ads, exp_smem.adb, s-tasini.adb,
5183         s-tasini.ads, s-parame-vms-ia64.ads, s-parame.ads, s-taskin.ads,
5184         s-parame-vxworks.ads, a-tasatt.adb, a-tasatt.ads: Minor reformatting.
5185         * a-suenco.adb (Convert): Handle overlong encodings in UTF8-UTF8
5186         conversion.
5188 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5190         * sem_ch5.adb: Improve error recovery.
5191         * inline.adb (Build_Body_To_Inline): Set Full_Analysis to false
5192         before analyzing the body, so that in GNATprove mode there is
5193         no light expansion. Whatever expansion is required by SPARK will
5194         be performed when analysing the inlined code.
5196 2014-07-30  Bob Duff  <duff@adacore.com>
5198         * s-tataat.adb, s-tataat.ads, a-tasatt.adb: Minor comment fixes.
5200 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5202         * sem_ch5.adb (Analyze_Loop_Statement): If loop has a label,
5203         verify that it is not hidden by an inner implicit declaration.
5205 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5207         * sem.ads (Scope_Table_Entry): New component Locked_Shared_Objects.
5208         * sem_ch8.adb (Push_Scope): Initialize Locked_Shared_Objects.
5209         * exp_smem.adb (Add_Shared_Var_Lock_Procs): Handle the case where
5210         the call returns an unconstrained type: in this case there is
5211         already a transient scope, and we should not establish a new one.
5212         * exp_ch7.adb (Insert_Actions_In_Scope_Around): New formal Clean. If
5213         True, also insert cleanup actions in the tree.
5214         (Wrap_Transient_Declaration): Call Insert_Actions_In_Scope_Around
5215         with Clean set True.
5217 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5219         * s-taskin.ads (Direct_Index, Direct_Index_Range,
5220         Direct_Attribute_Element, Direct_Attribute_Array,
5221         Direct_Index_Vector, Direct_Attributes, Is_Defined,
5222         Indirect_Attributes): Removed.  (Atomic_Address,
5223         Attribute_Array, Attributes): New.
5224         * s-tasini.ads, s-tasini.adb (Proc_T, Initialize_Attributes,
5225         Finalize_Attributes_Link, Initialize_Attributes_Link): Removed.
5226         (Finalize_Attributes): Reimplement.
5227         * s-tassta.adb (Create_Task): Remove call to
5228         Initialize_Attributes_Link (Free_Task, Vulnerable_Free_Task):
5229         Replace Finalize_Attributes_Link by Finalize_Attributes.
5230         * a-tasatt.ads, a-tasatt.adb, s-tataat.ads, s-tataat.adb:
5231         Reimplement from scratch, using a simpler and more efficient
5232         implementation.
5233         * s-tporft.adb (Register_Foreign_Thread): Remove now obsolete comment.
5234         * s-parame.ads, s-parame-hpux.ads,
5235         * s-parame-vms-alpha.ads, s-parame-vms-ia64.ads,
5236         * s-parame-vxworks.ads (Max_Attribute_Count): New, replace
5237         Default_Attribute_Count.
5239 2014-07-30  Olivier Hainque  <hainque@adacore.com>
5241         * vxworks-ppc-link.spec: New file. Extra link
5242         instructions for ppc-vxworks.
5243         * vxworks-crtbe-link.spec: Likewise, for ZCX related support.
5244         * system-vxworks-ppc.ads: Adjust linker options to use spec files.
5245         * system-vxworks-arm.ads: Likewise.
5246         * gcc-interface/Makefile.in: Enable .spec files.
5248 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5250         * sem_aggr.adb: Minor comment reformatting.
5252 2014-07-30  Robert Dewar  <dewar@adacore.com>
5254         * sem_util.ads, sem_util.adb (Is_Junk_Name): Removed.
5255         * sem_warn.adb (Has_Junk_Name): New function
5256         (Check_References): Use Has_Junk_Name to delete junk warnings
5257         (Check_Unset_Reference): ditto.
5258         (Warn_On_Unreferenced_Entity): ditto.
5259         (Warn_On_Useless_Assignment): ditto.
5261 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5263         * checks.adb (Insert_Valid_Check): Do not check for the packed
5264         array type of a prefix that is an access type.
5266 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5268         * sem_attr.adb (Eval_Attribute): Evaluate the GNAT attribute
5269         Unconstrained_Array even if prefix is not frozen yet, as can
5270         occur with a private subtype used as a generic actual.
5272 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5274         * sem_attr.adb: Minor reformatting.
5276 2014-07-30  Pat Rogers  <rogers@adacore.com>
5278         * gnat_rm.texi: Corrected minor wording error in description
5279         of No_Exception_Registration.
5281 2014-07-30  Yannick Moy  <moy@adacore.com>
5283         * einfo.ads, einfo.adb: New flag Is_Inlined_Always for use in GNATprove
5284         mode. Realphabetize two subprograms.
5285         * inline.adb (Cannot_Inline): Use Is_Inlined_Always in GNATprove mode.
5286         (Can_Be_Inlined_In_GNATprove_Mode): Adapt to possible Empty Body_Id.
5287         (Check_And_Build_Body_To_Inline): Use Is_Inlined_Always in GNATprove
5288         mode.
5289         (Expand_Inline_Call): Use Is_Inlined_Always in GNATprove mode.
5290         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Do not use
5291         Is_Inline in GNATprove mode.
5292         (Analyze_Subprogram_Specification):
5293         Set Is_Inlined_Always at subprogram entity creation.
5294         * sem_res.adb (Resolve_Call): Do not deal with inlining during
5295         pre-analysis.  Issue warning on call to possibly inlined
5296         subprogram when body not seen.
5298 2014-07-30  Yannick Moy  <moy@adacore.com>
5300         * lib-xref.adb (Generate_Reference): Add special
5301         case for compiler-generated formals in GNATprove mode.
5303 2014-07-30  Yannick Moy  <moy@adacore.com>
5305         * sem_ch6.adb: Add comments.
5307 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5309         * s-os_lib.ads (GM_Time_Of): Clarify documentation.
5311 2014-07-30  Robert Dewar  <dewar@adacore.com>
5313         * sem_aggr.adb, sem_res.adb: Minor reformatting.
5315 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5317         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
5318         Bit_Order): Set Reverse_Bit_Order on the base type of the
5319         specified first subtype.
5321 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5323         * inline.adb (Expand_Inlined_Call): Use a renaming declaration
5324         to capture the value of actuals of a limited type rather than
5325         an object declaration, to prevent spurious errors when analyzing
5326         the inlined body.
5328 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5330         * sem_ch4.adb (Analyze_Type_Conversion): Treat an inlined body
5331         as an instance, and inhibit semantic checks on already analyzed
5332         code to prevent spurious errors.
5334 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5336         * a-exctra.ads ("="): New function, to restore compatibility.
5338 2014-07-30  Pascal Obry  <obry@adacore.com>
5340         * adaint.c (__gnat_to_os_time): Set isdst to -1 for the mktime
5341         routine to use the OS dst setting.
5343 2014-07-30  Pat Rogers  <rogers@adacore.com>
5345         * gnat_ugn.texi: Minor correction to description of -gnatw.K.
5347 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5349         * sem_util.adb (Wrong_Type): Disable some checks equally within
5350         instances and within inlined bodies, to suppress spurious type
5351         errors on already analyzed code.
5352         * sem_aggr.adb (Check_Expr_OK_In_Limited_Aggregate): Expression
5353         is legal in an inlined body, juts as it is in an instance body.
5355 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5357         * sem_res.adb (Resolve_Unchecked_Conversion): Within an inlined
5358         body the operand of an unchecked conversion may be a literal, in
5359         which case its type is the target type of the conversion. This
5360         is in contrast to conversions in other contexts, where the
5361         operand cannot be a literal and must be resolvable independent
5362         of the context.
5364 2014-07-30  Pierre-Marie Derodat  <derodat@adacore.com>
5366         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a
5367         mere scalar constant instead of a reference for a renaming of
5368         scalar literal.
5369         * gcc-interface/utils.c (renaming_from_generic_instantiation_p): New.
5370         * gcc-interface/gigi.h (renaming_from_generic_instantiation_p): New.
5372 2014-07-30  Robert Dewar  <dewar@adacore.com>
5374         * s-tasuti.adb, s-tasuti.ads, einfo.ads, sem_prag.adb, s-taasde.adb,
5375         g-socthi-vms.adb, s-taprop-mingw.adb, s-interr.adb, s-interr-hwint.adb,
5376         g-decstr.adb, s-tasdeb-vms.adb, g-expect-vms.adb, makeutl.adb,
5377         s-interr-vms.adb, g-socthi.adb, exp_aggr.adb, s-tasdeb.adb,
5378         g-awk.adb, gnatls.adb, s-taspri-posix.ads, g-catiio.adb,
5379         s-interr-sigaction.adb, s-os_lib.adb, s-fileio.adb: Minor reformatting
5380         & code reorganization.
5382 2014-07-30  Bob Duff  <duff@adacore.com>
5384         * s-tassta.adb, sem_util.ads: Minor reformatting.
5386 2014-07-30  Yannick Moy  <moy@adacore.com>
5388         * inline.adb (Build_Body_To_Inline): Detect when
5389         subprogram has multiple returns, or not a single last return
5390         statement, in GNATprove mode.
5391         (Cannot_Inline): Simplify logic to handle case of GNATprove
5392         inlining first.
5394 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5396         * sem_ch6.adb: Stubs are not subject to inlining.
5398 2014-07-30  Bob Duff  <duff@adacore.com>
5400         * s-tasuti.ads, s-tasuti.adb (Make_Independent): Change this
5401         from a procedure to a function, so that it can more easily be
5402         called before the "begin" of a task.
5403         * s-taasde.ads (Delay_Block): Make this type immutably limited,
5404         so we can use a build-in-place function call to initialize
5405         Timer_Queue in the body.
5406         * a-rttiev.adb, s-asthan-vms-alpha.adb, s-asthan-vms-ia64.adb,
5407         * s-interr.adb, s-interr-hwint.adb, s-interr-sigaction.adb,
5408         * s-interr-vms.adb, s-taasde.adb: Each independent task now calls
5409         Make_Independent before reaching its "begin", to avoid race
5410         conditions. This causes the activating task to wait until after
5411         Make_Independent is complete before proceeding.  In addition,
5412         we initialize data structures used by independent tasks before
5413         activating those tasks, to avoid possible use of uninitialized data.
5414         * s-interr.ads, s-intman.ads, s-taspri-posix.ads, s-tasdeb.ads:
5415         Minor comment fixes.
5417 2014-07-30  Bob Duff  <duff@adacore.com>
5419         * a-exctra.ads, s-traent-vms.ads, s-traent.ads (Tracebacks_Array): Move
5420         the declaration of Tracebacks_Array from Ada.Exceptions.Traceback to
5421         System.Traceback_Entries (s-traent.ads and s-traent-vms.ads).  Add
5422         subtypes renaming Tracebacks_Array in Ada.Exceptions.Traceback.
5423         * g-debpoo.adb: Refer to Tracebacks_Array in its new home.
5425 2014-07-30  Arnaud Charlet  <charlet@adacore.com>
5427         * a-tasatt.adb: Remove old comments.
5429 2014-07-30  Yannick Moy  <moy@adacore.com>
5431         * einfo.ads (Is_Inlined): Document new use in GNATprove mode.
5432         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): Add comments
5433         to explain rationale for inlining or not in GNATprove mode.
5434         (Expand_Inlined_Call): In GNATprove mode, set Is_Inlined flag
5435         to False when inlining is not possible.
5436         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set Is_Inlined
5437         flag to indicate that subprogram is fully inlined. To be reversed
5438         if inlining problem is found.
5439         * sem_res.adb (Resolve_Call): Set Is_Inlined flag to False when
5440         call in potentially unevaluated context.
5442 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
5444         * s-tarest.adb, s-tarest.ads: Fix comments.
5446 2014-07-30  Robert Dewar  <dewar@adacore.com>
5448         * exp_attr.adb, checks.adb, sem_util.adb, sem_util.ads, sem_attr.adb:
5449         Change No_Scalar_Parts predicate to Scalar_Part_Present and
5450         invert sense of test. This avoids the "not No_xxx" situation
5451         which is always ugly.
5453 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5455         * inline.adb (Expand_Inlined_Call): When generating code for
5456         an internal subprogram the expansion uses the location of the
5457         call, so that gdb can skip over it. In GNATprove mode we want to
5458         preserve slocs of original subprogram when expanding an inlined
5459         call, to obtain better warnings, even though subprogram appears
5460         not to come from source if it is the inlining of a subprogram
5461         body without a previous spec.
5463 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5465         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): Reject array
5466         types with atomic components.
5468 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5470         * Make-generated.in: Remove now unnecessary targets after s-oscons
5471         reorg.
5473 2014-07-30  Yannick Moy  <moy@adacore.com>
5475         * sem_res.adb (Resolve_Call): Use ultimate alias
5476         of callee when available.
5478 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5480         * sem_ch6.adb (Analyze_Expression_Function): To check whether
5481         an expression function is a completion, use the specification of
5482         the previous declaration, not its entity, which may be internally
5483         generated in an inlined context.
5485 2014-07-30  Doug Rupp  <rupp@adacore.com>
5487         * adaint.c (__gnat_tmp_name) [__ANDROID__]: Default to putting
5488         temp files in /cache directory unless overridden by TMPDIR.
5490 2014-07-30  Jose Ruiz  <ruiz@adacore.com>
5492         * s-tassta.adb, s-tarest.adb (Initialize, Create_Task,
5493         Create_Restricted_Task): Remove redundant check. Number_Of_CPUs returns
5494         type CPU, so it can never be greater than CPU_Range'Last.
5496 2014-07-30  Bob Duff  <duff@adacore.com>
5498         * s-taskin.ads: Minor comment fix.
5500 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5502         * g-socket.adb: Remove now useless WITH, USE, and USE TYPE
5503         clauses.
5505 2014-07-30  Yannick Moy  <moy@adacore.com>
5507         * debug.adb: Free debug flag dQ used for frontend inlining in
5508         GNATprove mode..
5509         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Remove test of
5510         debug flag..
5512 2014-07-30  Thomas Quinot  <quinot@adacore.com>
5514         * Make-generated.in: Remove generation of s-oscons.ads, only
5515         generate the xoscons utility, in runtime-agnostic rules.
5516         * gcc-interface/Makefile.in: Clean up rules. Remove VMS parts,
5517         no longer supported.
5519 2014-07-30  Bob Duff  <duff@adacore.com>
5521         * exp_ch6.adb (Add_Task_Actuals_To_Build_In_Place_Call): New
5522         parameter Chain to be used in the allocator case.
5523         (Make_Build_In_Place_Call_In_Allocator): If the allocated object
5524         has tasks, wrap the code in a block that will activate them,
5525         including the usual finalization code to kill them off in case
5526         of exception or abort.
5528 2014-07-30  Robert Dewar  <dewar@adacore.com>
5530         * treepr.adb, treepr.ads; Reorganize documentation for new pp routines
5531         Remove renamings (don't work for gdb).
5532         (par): New synonym for p (avoid gdb ambiguities).
5533         * inline.adb, sem_ch6.adb, sem_ch13.adb: Minor reformatting.
5535 2014-07-30  Bob Duff  <duff@adacore.com>
5537         * exp_ch9.ads, sem_prag.adb, exp_ch4.adb, sem_ch13.adb: Minor comment
5538         fixes.
5539         * treepr.ads, treepr.adb (ppp): Make this debugging routine
5540         accept any type covered by Union_Id.
5542 2014-07-30  Robert Dewar  <dewar@adacore.com>
5544         * sem_ch4.adb (Analyze_If_Expression): Resolve condition before
5545         analyzing branches.
5546         * sem_eval.adb (Out_Of_Range): Check for statically unevaluated
5547         expression case.
5549 2014-07-30  Robert Dewar  <dewar@adacore.com>
5551         * sem_ch13.adb (Analyze_Aspect, predicate cases): Diagnose use
5552         of predicate aspect on entity other than a type.
5554 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5556         * sem_ch6.adb (Body_Has_Contract): New predicate to determine
5557         when a subprogram body without a previous spec cannot be inlined
5558         in GNATprove mode, because it includes aspects or pragmas that
5559         generate a SPARK contract clause.
5560         * inline.adb (Can_Be_Inlined_In_GNATprove_Mode): A subprogram
5561         instance cannot be inlined.
5563 2014-07-30  Robert Dewar  <dewar@adacore.com>
5565         * debug.adb: Document that d7 suppresses compilation time output.
5566         * errout.adb (Write_Header): Include compilation time in
5567         header output.
5568         * exp_intr.adb (Expand_Intrinsic_Call): Add
5569         Compilation_Date/Compilation_Time (Expand_Source_Info): Expand
5570         Compilation_Date/Compilation_Time.
5571         * g-souinf.ads (Compilation_Date): New function
5572         (Compilation_Time): New function.
5573         * gnat1drv.adb (Gnat1drv): Set Opt.Compilation_Time.
5574         * gnat_rm.texi (Compilation_Date): New function
5575         (Compilation_Time): New function.
5576         * opt.ads (Compilation_Time): New variable.
5577         * s-os_lib.ads, s-os_lib.adb (Current_Time_String): New function.
5578         * sem_intr.adb (Compilation_Date): New function.
5579         (Compilation_Time): New function.
5580         * snames.ads-tmpl (Name_Compilation_Date): New entry.
5581         (Name_Compilation_Time): New entry.
5583 2014-07-30  Yannick Moy  <moy@adacore.com>
5585         * inline.adb: Add comment.
5587 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5589         * par-ch4.adb (Is_Parameterless_Attribute): 'Result is a
5590         parameterless attribute, and a postondition can mention an
5591         indexed component or a slice whose prefix is an attribute
5592         reference F'Result.
5594 2014-07-30  Robert Dewar  <dewar@adacore.com>
5596         * sprint.adb (Sprint_Node_Actual, case Object_Declaration):
5597         Avoid bomb when printing package Standard.
5599 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5601         * sem_elab.adb (Check_Internal_Call_Continue): If an elaboration
5602         entity is created at this point, ensure that the name of the
5603         flag is unique, because the subprogram may be overloaded and
5604         other homonyms may also have elaboration flags created on the fly.
5606 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5608         * sem_attr.adb (Analyze_Array_Component_Update): New routine.
5609         (Analyze_Attribute): Major cleanup of attribute
5610         'Update. The logic is now split into two distinct routines
5611         depending on the type of the prefix. The use of <> is now illegal
5612         in attribute 'Update.
5613         (Analyze_Record_Component_Update): New routine.
5614         (Check_Component_Reference): Removed.
5615         (Resolve_Attribute): Remove the return statement and ??? comment
5616         following the processing for attribute 'Update. As a result,
5617         the attribute now freezes its prefix.
5619 2014-07-30  Javier Miranda  <miranda@adacore.com>
5621         * exp_ch4.adb (Apply_Accessibility_Check): Do
5622         not call Base_Address() in VM targets.
5624 2014-07-30  Yannick Moy  <moy@adacore.com>
5626         * gnat1drv.adb (Adjust_Global_Switches): Set
5627         Ineffective_Inline_Warnings to True in GNATprove mode.
5628         * inline.adb (Cannot_Inline): Prepare new semantics for GNATprove
5629         mode of inlining.
5630         * opt.ads (Ineffective_Inline_Warnings): Add comment that
5631         describes use in GNATprove mode.
5632         * sem_prag.adb (Analyze_Pragma|SPARK_Mode): Ignore
5633         pragma when applied to the special body created for inlining.
5635 2014-07-30  Robert Dewar  <dewar@adacore.com>
5637         * inline.adb, exp_ch4.adb, sinput.adb, sem_ch6.adb, sem_ch13.adb:
5638         Minor reformatting.
5640 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5642         * aspects.ads Add a comment explaining why SPARK 2014 aspects are
5643         not delayed. Update the delay status of most SPARK 2014 aspects.
5644         * sem_ch13.adb (Analyze_Aspect_Specifications): Update all calls
5645         to Decorate_Aspect_And_Pragma and Insert_Delayed_Pragma to refert
5646         to Decorate and Insert_Pragma. Add various comments concerning
5647         the delay status of several SPARK 2014 aspects. The insertion
5648         of Refined_State now uses routine Insert_After_SPARK_Mode.
5649         (Decorate): New routine.
5650         (Decorate_Aspect_And_Pragma): Removed.
5651         (Insert_Delayed_Pragma): Removed.
5652         (Insert_Pragma): New routine.
5654 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5656         * inline.adb (Expand_Inlined_Call): In GNATprove mode, emit
5657         only a warning, not an error on an attempt to inline a recursive
5658         subprogram.
5660 2014-07-30  Robert Dewar  <dewar@adacore.com>
5662         * g-forstr.adb: Minor code reorganization (use J rather than I
5663         as a variable name).
5664         * gnat_rm.texi, sem_prag.adb, sem_util.adb, sem_ch13.adb,
5665         g-forstr.ads: Minor reformatting.
5667 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5669         * sprint.adb (Set_Debug_Sloc): Also reset the end location if
5670         we are debugging the generated code.
5672 2014-07-30  Yannick Moy  <moy@adacore.com>
5674         * sinput.ads, sinput.adb (Comes_From_Inlined_Body): New function that
5675         returns True for source pointer for an inlined body.
5677 2014-07-30  Javier Miranda  <miranda@adacore.com>
5679         * exp_ch4.adb (Apply_Accessibility_Check): Add
5680         missing calls to Base_Address().
5682 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5684         * sem_ch6.adb (Hanalyze_Subprogram_Body_Helper): In GNATprove
5685         mode, subprogram bodies without a previous declaration are also
5686         candidates for front-end inlining.
5688 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5690         * aspects.ads Aspects Async_Readers, Async_Writers,
5691         Effective_Reads and Effective_Writes do not need to be delayed.
5692         * sem_ch13.adb (Analyze_Aspect_Specifications): Propagate the
5693         optional Boolean expression when generating the corresponding
5694         pragma for an external property aspect.
5695         * sem_prag.adb (Analyze_External_Property_In_Decl_Part): Remove
5696         local constant Obj. Add local constant Obj_Id. Reimplement the
5697         check which ensures that the related variable is in fact volatile.
5698         (Analyze_Pragma): Reimplement the analysis of external property pragmas.
5699         * sem_util.adb (Is_Enabled): New routine.
5700         (Variable_Has_Enabled_Property): Reimplement the detection of
5701         an enabled external property.
5703 2014-07-30  Sergey Rybin  <rybin@adacore.com frybin>
5705         * gnat_ugn.texi, vms_data.ads: gnatstub: describe generating subunits
5706         for body stubs.
5708 2014-07-30  Pascal Obry  <obry@adacore.com>
5710         * g-forstr.adb, g-forstr.ads: New.
5711         * gnat_rm.texi, impunit.adb Makefile.rtl: Add new unit
5712         GNAT.Formatted_String.
5714 2014-07-30  Eric Botcazou  <ebotcazou@adacore.com>
5716         * exp_aggr.adb (Aggr_Assignment_OK_For_Backend): New predicate.
5717         (Expand_Array_Aggregate): Also enable in-place expansion for
5718         code generated by the compiler.  For an object declaration,
5719         set the kind of the object in addition to its type.  If an
5720         in-place assignment is to be generated and it can be directly
5721         done by the back-end, do not expand the aggregate.
5722         * fe.h (Is_Others_Aggregate): Declare.
5723         * gcc-interface/trans.c
5724         (gnat_to_gnu) <N_Assignment_Statement>: Add support for an
5725         aggregate with a single Others choice on the RHS by means of
5726         __builtin_memset.  Tidy up.
5728 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5730         * gnat_rm.texi: minor reformatting.
5732 2014-07-30  Yannick Moy  <moy@adacore.com>
5734         * sem_ch6.adb (Analyze_Subprogram_Helper_Body): Remove body to inline
5735         in SPARK_Mode Off.
5737 2014-07-30  Robert Dewar  <dewar@adacore.com>
5739         * gnat_rm.texi: Document additional implementation-defined use
5740         of Constrained.
5742 2014-07-30  Robert Dewar  <dewar@adacore.com>
5744         * prj-proc.adb, prj-strt.adb: Update comments.
5746 2014-07-30  Gary Dismukes  <dismukes@adacore.com>
5748         * sinfo.ads, einfo.ads, checks.ads: Minor typo fix and reformatting.
5750 2014-07-30  Vincent Celier  <celier@adacore.com>
5752         * prj-proc.adb (Imported_Or_Extended_Project_From): New Boolean
5753         parameter No_Extending, defaulted to False. When No_Extending
5754         is True, do not look for an extending project.
5755         (Expression): For a variable reference that is not for the current
5756         project, get its Id calling Imported_Or_Extended_Project_From
5757         with No_Extending set to True.
5758         * prj-strt.adb (Parse_Variable_Reference): If a referenced
5759         variable is not found in the current project, check if it is
5760         defined in one of the projects it extends.
5762 2014-07-30  Robert Dewar  <dewar@adacore.com>
5764         * sem_util.adb (Predicate_Tests_On_Arguments): Omit tests for
5765         some additional cases of internally generated routines.
5767 2014-07-30  Ed Schonberg  <schonberg@adacore.com>
5769         * sem_ch10.adb (Analyze_Proper_Body): When compiling for ASIS,
5770         if the compilation unit is a subunit, extend optional processing
5771         to all subunits of the current one. This allows gnatstub to
5772         supress generation of spurious bodies.
5774 2014-07-30  Hristian Kirtchev  <kirtchev@adacore.com>
5776         * a-cbmutr.adb (Insert_Child): Use local variable First to keep
5777         track of the initial element's index within the tree.
5779 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5781         * a-cbmutr.adb (Allocate_Node): Remove the two parameter version.
5782         (Insert_Child): Add local variable First. Capture the index of the
5783         first node being created to ensure correct cursor construction
5784         later on. Use the three parameter version of Allocate_Node
5785         when creating multiple children as this method allows aspect
5786         Default_Value to take effect (if applicable).
5788 2014-07-29  Eric Botcazou  <ebotcazou@adacore.com>
5790         * exp_aggr.adb (Safe_Slice_Assignment): Remove.
5791         (Expand_Array_Aggregate): For a safe slice assignment, just set
5792         the target and use the common code path.
5794 2014-07-29  Robert Dewar  <dewar@adacore.com>
5796         * sem_util.adb, sem_util.ads, sem_res.adb, exp_ch6.adb: Invert
5797         predicate No_Predicate_Test_On_Arguments, new name is
5798         Predicate_Tests_On_Arguments (with the opposite sense).
5800 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
5802         * sem_attr.adb (Resolve_Attribute): Clean up the code for
5803         attribute 'Access. Do not generate an elaboration flag for a
5804         stand alone expression function. The expression of an expression
5805         function is now frozen when the expression function appears as
5806         the prefix of attribute 'Access.
5807         * sem_ch6.adb (Analyze_Expression_Function): Remove local
5808         variable New_Decl and update all references to it after the
5809         rewriting has taken place. Establish the linkages between the
5810         generated spec and body.
5812 2014-07-29  Robert Dewar  <dewar@adacore.com>
5814         * sem_prag.adb (ip, rv): Prevent from being optimized away.
5815         * gnatls.adb (gnatls): Set E_Fatal exit status if ali file not found.
5816         * s-imgllb.adb, s-imgllw.adb, s-imgwiu.adb, s-imgbiu.adb: Minor
5817         reformatting.
5819 2014-07-29  Vincent Celier  <celier@adacore.com>
5821         * prj-pp.adb: Minor comment update.
5822         * frontend.adb: If a target dependency info file has been read
5823         through switch -gnateT= add it to the dependencies of the source
5824         being compiled.
5826 2014-07-29  Robert Dewar  <dewar@adacore.com>
5828         * sem_ch3.adb, prj.adb: Minor reformatting.
5830 2014-07-29  Vincent Celier  <celier@adacore.com>
5832         * prj-pp.adb (Pretty_Print.Output_Project_File): New
5833         procedure to output project file names between quotes without
5834         concatenation, even if the line is too long.
5835         (Pretty_Print): Use Output_Project_File for project being extended and
5836         project imported.
5838 2014-07-29  Vincent Celier  <celier@adacore.com>
5840         * gnat_ugn.texi: Document that configuration pragmas files are
5841         added to the dependencies, unless they contain only pragmas
5842         Source_File_Name_Project.
5844 2014-07-29  Robert Dewar  <dewar@adacore.com>
5846         * frontend.adb: Minor reformatting.
5848 2014-07-29  Robert Dewar  <dewar@adacore.com>
5850         * exp_ch6.adb (Add_Call_By_Copy_Code): Minor reformatting
5851         (Expand_Actuals): Make sure predicate checks are properly applied
5852         for the case of OUT or IN OUT parameters.
5853         * sem_res.adb: Minor reformatting (Resolve_Actuals): Skip
5854         predicate tests on arguments for Finalize
5855         * sem_util.adb (No_Predicate_Test_On_Arguments): Returns True
5856         if predicate tests on subprogram arguments should be skipped.
5857         * sem_util.ads (No_Predicate_Test_On_Arguments): New function
5859 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5861         * sem_ch3.adb (Analyze_Object_Declaration): If there is an address
5862         clause for the object and the expression is an aggregate, defer
5863         resolution and expansion of the aggregate until the freeze point
5864         of the entity.
5865         * sem_aggr.adb (Resolve_Aggregate): An others_clause is legal if
5866         the parent node is an N_Reference generated during expansion.
5868 2014-07-29  Vincent Celier  <celier@adacore.com>
5870         * prj.adb (Add_To_Buffer): Effectively double the size of the buffer.
5872 2014-07-29  Robert Dewar  <dewar@adacore.com>
5874         * frontend.adb, inline.adb, sem_util.adb, sem_res.adb,
5875         prepcomp.ads: Minor reformatting and code clean up.
5876         * exp_ch6.adb (Expand_Actuals): Generate predicate test
5877         unconditionally for case of OUT or IN OUT actual (before this
5878         was generated only for certain subcases, which is wrong, the
5879         test is always needed).
5881 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5883         * sem_ch3.adb: Move Has_Defaulted_Discriminants to sem_util.
5884         * sem_ch4.adb (Analyze_Allocator): Defer resolution of expression
5885         until context type is available.
5886         * sem_res.adb (Resolve_Allocator): In the case of a qualified
5887         expression, complete resolution of expression.
5888         (Check_Aliased_Parameter): New procedure within Resolve_Actuals,
5889         to apply Ada2012 checks on aliased formals, as well as
5890         accesibility checks when the context of the call is an allocator
5891         or a qualified expression.
5892         * sem_util.ads, sem_util.adb (Has_Defaulted_Discriminants):
5893         Moved here from sem_ch3.
5894         (Object_Access_Level): Handle properly aliased formals and
5895         aggregates.
5896         * exp_ch6.adb (Expand_Call): Remove check on aliased parameters,
5897         now properly performed in sem_res (Resolve_Actuals,
5898         Check_Aliased_Parameter).
5900 2014-07-29  Yannick Moy  <moy@adacore.com>
5902         * debug.adb Enable GNATprove inlining under debug flag -gnatdQ for now.
5903         * inline.ads, inline.adb (Can_Be_Inlined_In_GNATprove_Mode): New
5904         function to decide when a subprogram can be inlined in GNATprove mode.
5905         (Check_And_Build_Body_To_Inline): Include GNATprove_Mode as a
5906         condition for possible inlining.
5907         * sem_ch10.adb (Analyze_Compilation_Unit): Remove special case
5908         for Inline_Always in GNATprove mode.
5909         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build inlined
5910         body for subprograms in GNATprove mode, under debug flag -gnatdQ.
5911         * sem_prag.adb Minor change in comments.
5912         * sem_res.adb (Resolve_Call): Only perform GNATprove inlining
5913         inside subprograms marked as SPARK_Mode On.
5914         * sinfo.ads: Minor typo fix.
5916 2014-07-29  Vincent Celier  <celier@adacore.com>
5918         * frontend.adb: Add dependency on gnat.adc when taken into account
5919         and on non-temporary configuration pragmas files specified in
5920         switches -gnatec.
5921         * prepcomp.ads, prepcomp.adb (Add_Dependency): New procedure to add
5922         dependencies on configuration pragmas files.
5924 2014-07-29  Pat Rogers  <rogers@adacore.com>
5926         * gnat_ugn.texi: Minor clarification to the explanation for the
5927         GNATtest -v switch.
5929 2014-07-29  Robert Dewar  <dewar@adacore.com>
5931         * types.ads (Mechanism_Type): Change range back to -18 .. Int'Last with
5932         documentation that explains the need for this extended range
5933         (use by C_Pass_By_Copy).
5935 2014-07-29  Robert Dewar  <dewar@adacore.com>
5937         * gnat_rm.texi, sem_prag.adb: Minor reformatting.
5939 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
5941         * gnat_ugn.texi: gnatmetric: clarify documentation for cyclomatic
5942         complexity metrics.
5944 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5946         PR ada/60652
5947         * s-oscons-tmplt.c: For Linux, define _BSD_SOURCE in order for
5948         CRTSCTS to be visible.
5950 2014-07-29  Bob Duff  <duff@adacore.com>
5952         * g-trasym.adb, g-trasym.ads: Code cleanup.
5954 2014-07-29  Doug Rupp  <rupp@adacore.com>
5956         * sigtramp-vxworks.c: Minor reformatting.
5958 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5960         * gnat_rm.texi: No doc needed for Ada2012 aspect
5961         Implicit_dereference.
5963 2014-07-29  Robert Dewar  <dewar@adacore.com>
5965         * sem_attr.adb (Attribute_12): New array
5966         (Analyze_Attribute): Check impl-defined Ada 2012 attributes.
5967         (Check_Ada_2012_Attribute): Removed.
5969 2014-07-29  Doug Rupp  <rupp@adacore.com>
5971         * init.c (vxworks6): Call sigtramp for RTP (as well as DKM) for ARM,
5972         PPC, and e500.
5973         * sigtramp-vxworks.c: New file.
5974         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: removed files.
5976 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
5978         * lib-xref.adb (Output_Refs, Check_Type_Reference): For a
5979         derived array type, add information about component type, which
5980         was previously missing in ali file.
5981         * gnat_rm.texi: Add documentation for Atomic_Always_Lock_Free.
5983 2014-07-29  Thomas Quinot  <quinot@adacore.com>
5985         * sem_ch3.adb (Constrain_Corresponding_Record): For the case
5986         of the subtype created for a record component, do not mark
5987         the subtype as frozen. For one thing, this is anomalous (in
5988         particular, the base type might not itself be frozen yet);
5989         furthermore, proper freezing of the subtype must happen in any
5990         case. So, we just mark the subtype as requiring delayed freezing
5991         (and we'll actually freeze it when generating the init_proc of
5992         the enclosing record).
5993         Also change the name of the constrained record subtype (append a
5994         'C' so that it is clearly different from the unconstrained record
5995         type, "related_idV") to make debugging easier.
5996         (Process_Full_View): When creating a full subtype for a pending
5997         private subtype, re-establish the scope of the private subtype
5998         so that we get proper visibility on outer discriminants.
5999         * exp_ch3.adb (Build_Init_Statements): Freeze any component
6000         subtype that is not frozen yet.
6002 2014-07-29  Vincent Celier  <celier@adacore.com>
6004         * prj-proc.adb (Recursive_Process): Always initialize the
6005         environment when the project is an aggregate project, even when
6006         it is not the root tree.
6007 2014-07-29  Robert Dewar  <dewar@adacore.com>
6009         * exp_ch5.adb, exp_ch9.adb: Minor comment additions.
6010         * gnat_rm.texi: Complete list of implementation aspects.
6011         * aspects.ads: Minor comment clarification.
6013 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6015         * exp_ch5.adb (Expand_N_Assignment_Statement): If the target type
6016         is a null-excluding access type, do not generate a constraint
6017         check if Suppress_Assignment_Checks is set on assignment node.
6018         * exp_ch9.adb (Build_Simple_Entry_Call): If actual is an out
6019         parameter of a null-excluding access type, there is access check
6020         on entry, so set Suppress_Assignment_Checks on generated statement
6021         that assigns actual to parameter block.
6022         * sinfo.ads: Document additional use of Suppress_Assignment_Checks.
6024 2014-07-29  Robert Dewar  <dewar@adacore.com>
6026         * gnat_rm.texi: Change theta to @ in documentation of aspect
6027         Dimension_System.
6029 2014-07-29  Robert Dewar  <dewar@adacore.com>
6031         * sem_attr.adb (Uneval_Old_Msg): Flags Uneval_Old_Accept/Warn
6032         are now on pragma.
6033         * sem_ch13.adb (Analyze_Aspect_Specifications): Remove setting
6034         of Uneval_Old_*
6035         * sem_prag.adb (Analyze_Pragma): Set Uneval_Old_* flags
6036         * sinfo.ads, sinfo.adb: Move Uneval_Old_Accept/Warn to N_Pragma node.
6038 2014-07-29  Javier Miranda  <miranda@adacore.com>
6040         * types.ads Update documentation on how to add new reason codes
6041         for exceptions.
6042         (RT_Exception_Code): Keep values ordered by their
6043         reason code.  Required by the .NET backend.
6044         (RT_CE_Exceptions): Subtype declaration removed.
6045         (RT_PE_Exceptions): Subtype declaration removed.
6046         (RT_SE_Exceptions): Subtype declaration removed.
6047         (Kind): New mapping table of RT_Exception_Codes.
6048         * exp_ch11.adb (Get_RT_Exception_Entity): Updated to use the
6049         new mapping table.
6050         * tbuild.adb (Make_Raise_Storage_Error): Updated to use the new
6051         mapping table.  (Make_Raise_Program_Error): Updated to use the
6052         new mapping table.
6053         (Make_Raise_Storage_Error): Updated to use the new mapping table.
6054         * a-except.adb Keep Rcheck_CE_xxx entities ordered according to
6055         their reason code.
6057 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6059         * gnat_rm.texi: Document internal attributes used for PolyORB/DSA
6060         distributed stubs generation.
6061         * exp_ch3.adb: Minor reformatting.
6063 2014-07-29  Yannick Moy  <moy@adacore.com>
6065         * sinfo.ads: Document constraint between frontend and GNATprove.
6067 2014-07-29  Robert Dewar  <dewar@adacore.com>
6069         * a-except.adb: Minor comment clarification.
6071 2014-07-29  Robert Dewar  <dewar@adacore.com>
6073         * gnat_rm.texi: Complete list of implementation attributes.
6074         * snames.ads-tmpl: Clean up list of impl-defined attributes.
6076 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6078         * freeze.adb (Freeze_Record_Type): Perform various
6079         volatility-related checks.
6081 2014-07-29  Robert Dewar  <dewar@adacore.com>
6083         * sem_ch3.adb, sem_eval.adb: Minor reformatting.
6085 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6087         * sem_attr.adb: sem_attr.adb (Access_Attribute): Handle properly
6088         the case where the attribute reference appears in a nested scope
6089         from that of the subprogram prefix.
6090         * sem_attr.adb: Minor reformatting.
6092 2014-07-29  Robert Dewar  <dewar@adacore.com>
6094         * gnat_ugn.texi: Clarify documentation of Initialize_Scalar
6095         initialization options.
6097 2014-07-29  Robert Dewar  <dewar@adacore.com>
6099         * sinfo.ads: Minor comment addition.
6101 2014-07-29  Bob Duff  <duff@adacore.com>
6103         * sem_eval.adb, sem_ch13.adb: Minor reformatting.
6105 2014-07-29  Doug Rupp  <rupp@adacore.com>
6107         * init.c: Complete previous change.
6109 2014-07-29  Robert Dewar  <dewar@adacore.com>
6111         * exp_ch4.adb (Expand_N_If_Expression): Deal with unconstrained
6112         array case.
6114 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6116         * sem_attr.adb (Access_Attribute): If the prefix is a subprogram
6117         and the completion will appear in the same declarative part,
6118         create elaboration flag.
6119         * exp_util.adb (Set_Elaboration_Flag): If the subprogram body
6120         is a completion of a declaration in the same declarative part,
6121         and the subprogram has had its address taken, add elaboration
6122         check inside the subprogram body, to detect elaboration errors
6123         that may occur through indirect calls.
6125 2014-07-29  Doug Rupp  <rupp@adacore.com>
6127         * sigtramp-armvxw.c: Enhance to handle RTP trampolining.
6128         * init.c: Remove guard on sigtramp for ARM VxWorks RTP.
6130 2014-07-29  Vincent Celier  <celier@adacore.com>
6132         * switch-c.adb (Scan_Front_End_Switches): Do not fail when two
6133         runtime directorie specified with two switches --RTS= designate
6134         the same directory, even when there are no literarily the same.
6136 2014-07-29  Robert Dewar  <dewar@adacore.com>
6138         * gnat_ugn.texi: Minor documentation clarification.
6139         * switch-c.adb: Minor reformatting.
6141 2014-07-29  Robert Dewar  <dewar@adacore.com>
6143         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
6144         Fix incorrect RTE call which caused bomb if pragma was in
6145         configuration pragma file.
6147 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
6149         * expect.c (__gnat_expect_poll): Fix typo in previous change.
6150         * g-expect.adb: Update comments.
6152 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6154         * s-parame-hpux.ads, s-parame-vms-ia64.ads, s-parame.ads
6155         (Default_Attribute_Count): Bump to 16 on native platforms.
6157 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6159         * sem_res.adb: Add guard to front-end inlining for SPARK.
6161 2014-07-29  Robert Dewar  <dewar@adacore.com>
6163         * sem_ch10.adb, debug.adb, sem_prag.adb, sem_res.adb, sem_ch6.adb:
6164         Minor reformatting.
6166 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6168         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Build body to
6169         inline in GNATprove mode when subprogran is marked Inline_Always.
6170         * sem_res.adb (Resolve_Call): Expand call in place in GNATProve
6171         mode if body to inline is available.
6172         * sem_prag.adb (Analyze_Pragma, case Inline_Always): Make pragma
6173         effective in GNATprove mode.
6174         * sem_ch10.adb (Analyze_Compilation_Unit): Call
6175         Check_Package_Body_For_Inlining in GNATprove mode, so that body
6176         containing subprograms with Inline_Always can be available before
6177         calls to them.
6179 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6181         * inline.ads, inline.adb, sem_ch10.adb: Rename Check_Body_For_Inlining
6182         to Check_Package_Body_For_Inlining, to prevent confusion with other
6183         inlining subprograms.
6185 2014-07-29  Robert Dewar  <dewar@adacore.com>
6187         * opt.ads: Minor comment update.
6188         * sem_attr.adb (Uneval_Old_Msg): Deal with case of aspect, where
6189         we want setting of Uneval_Old at time of encountering the aspect.
6190         * sem_ch13.adb (Analyze_Aspect_Specifications): Capture setting
6191         of Opt.Uneval_Old.
6192         * sinfo.adb (Uneval_Old_Accept): New function (Uneval_Old_Warn):
6193         New function (Set_Uneval_Old_Accept): New procedure.
6194         (Set_Uneval_Old_Warn): New procedure.
6195         * sinfo.ads: Uneval_Old_Accept: New flag Uneval_Old_Warn: New flag.
6197 2014-07-29  Robert Dewar  <dewar@adacore.com>
6199         * sinfo.ads, inline.adb, inline.ads, sem_ch6.adb: Minor reformatting.
6200         * snames.ads-tmpl: Minor reformatting.
6201         * xsnamest.adb (XSnamesT): Remove special casing of Name_Error
6202         to give <Error>.  Not clear why this was there, but the compiler
6203         sources do not reference Name_Error, and this interfered with
6204         the circuits for pragma Unevaluated_Use_Of_Old.
6206 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6208         * sem_prag.adb (Process_Atomic_Shared_Volatile): Allow volatile
6209         types in SPARK 2014 (again).
6210         * sem_res.adb (Is_OK_Volatile_Context): New routine.
6211         (Resolve_Entity_Name): Ensure that a volatile object with
6212         enabled properties Async_Writers or Effectire_Reads appears in
6213         a non-interfering context.
6215 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6217         * sem_ch6.adb: Move Build_Body_To_Inline,
6218         Check_And_Buid_Body_To_Inline, and Cannot_Inline to package Inline.
6219         * exp_ch6.adb: Mode Expand_Inlined_Body to package Inline.
6220         * inline.ads, inline.adb: Package now contains subprograms that
6221         implement front-end inlining.  No functional changes, no test
6222         needed.
6224 2014-07-29  Robert Dewar  <dewar@adacore.com>
6226         * exp_dbug.adb, g-expect.adb, sem_elab.adb: Minor typo fix.
6228 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6230         * sem_ch6.adb (Analyze_Return_Type): Reject a return type that
6231         is a limited view when the context is a package body, because
6232         there is no subsequent place at which the non-limited view may
6233         become visible.
6234         (Process_Formals): Ditto.
6235         * sinfo.ads, par-ch3.adb: Minor reformatting.
6237 2014-07-29  Jerome Lambourg  <lambourg@adacore.com>
6239         * expect.c (__gnat_expect_poll): New parameter dead_process
6240         used to return the dead process among the array of file
6241         descriptors. The Windows, VMS and HPUX implementations now
6242         properly report the dead process via this parameter. Other unixes
6243         don't need it.
6244         * g-expect.adb (Poll): Adapt to the C profile.
6245         (Expect_Internal): Use the new parameter to properly close the
6246         File Descriptor.  This then can be properly reported by the
6247         function First_Dead_Process as is expected.
6249 2014-07-29  Robert Dewar  <dewar@adacore.com>
6251         * gnat_ugn.texi: Minor clarification of -gnatQ switch.
6253 2014-07-29  Robert Dewar  <dewar@adacore.com>
6255         * einfo.adb (Derived_Type_Link): New function
6256         (Set_Derived_Type_Link): New procedure.
6257         (Write_Field31_Name): Output Derived_Type_Link.
6258         * einfo.ads: New field Derived_Type_Link.
6259         * exp_ch6.adb (Expand_Call): Warn if change of representation
6260         needed on call.
6261         * sem_ch13.adb: Minor addition of ??? comment.
6262         (Rep_Item_Too_Late): Warn on case that is legal but could cause an
6263         expensive implicit conversion.
6264         * sem_ch3.adb (Build_Derived_Type): Set Derived_Type_Link if needed.
6266 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6268         * exp_ch3.adb (Build_Init_Procedure): Renamed Local_DF_Id
6269         to DF_Id. Add new local variable DF_Call. Do not perform any
6270         elaboration-related checks on the call to the partial finalization
6271         routine within an init proc to avoid generating bogus elaboration
6272         warnings on expansion-related code.
6273         * sem_elab.adb (Check_A_Call): Move constant Access_Case to
6274         the top level of the routine.  Ensure that Output_Calls takes
6275         into account flags -gnatel and -gnatwl when emitting warnings
6276         or info messages.
6277         (Check_Internal_Call_Continue): Update the call to Output_Calls.
6278         (Elab_Warning): Moved to the top level of routine Check_A_Call.
6279         (Emit): New routines.
6280         (Output_Calls): Add new formal parameter Check_Elab_Flag along with a
6281         comment on usage. Output all warnings or info messages only when the
6282         caller context demands it and the proper elaboration flag is set.
6284 2014-07-29  Yannick Moy  <moy@adacore.com>
6286         * sem_attr.adb (Analyze_Attribute/Attribute_Old):
6287         Check rule about Old appearing in potentially unevaluated
6288         expression everywhere, not only in Post.
6290 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6292         * sem_prag.adb: Update comment.
6293         * a-except.adb, a-except-2005.adb: Minor editing.
6295 2014-07-29  Pierre-Marie Derodat  <derodat@adacore.com>
6297         * exp_dbug.adb (Debug_Renaming_Declaration):
6298         Do not create renaming entities for renamings of non-packed
6299         objects and for exceptions.
6301 2014-07-29  Robert Dewar  <dewar@adacore.com>
6303         * sem_ch3.adb, sinfo.ads, types.ads, sem_prag.adb, a-except-2005.adb,
6304         sem_ch6.adb, par-ch3.adb: Minor reformatting.
6306 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6308         * sem_ch6.adb (Check_Return_Subtype_Indication): Reject a return
6309         subtype indication in an extended return statement when the
6310         return value is an ancestor of the return type of the function,
6311         and that return type is a null record extension.
6313 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6315         * sem_ch13.adb (Rep_Item_Too_Late): Specialize/clarify error
6316         message produced for the case of a type-related representation
6317         item that is made illegal by 13.10(1).
6318         * gnat_rm.texi (Scalar_Storage_Order): Minor change in
6319         documentation.
6321 2014-07-29  Robert Dewar  <dewar@adacore.com>
6323         * gnat_ugn.texi: Add section on Wide_Wide_Character encodings.
6324         * erroutc.adb (Output_Error_Msgs): Take wide characters into
6325         account in computing position of error flags.
6326         * sinput.adb (Get_Column_Number): Take wide characters into
6327         account.
6329 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6331         * par-ch3.adb (P_Access_Type_Definition): The subtype indication
6332         in an access type definition can carry a null_exclusion indicator.
6333         * sem_ch3.adb (Access_Type_Declaration): If the subtype indication
6334         carries a null_exclusion indicator, verify that the subtype
6335         indication denotes an access type, and create a null-excluding
6336         subtype for it.
6337         * sinfo.ads, sinfo.adb: New attribute Null_Excluding_Subtype,
6338         defined on N_Access_To_Object_Definition to indicate that the
6339         subtype indication carries a null_exclusion indicator.
6341 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6343         * exp_ch6.adb (Add_Extra_Actual): Do not construct
6344         the extra actual by name, generate a reference instead.
6346 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6348         * sem_prag.adb (Analyze_Pragma): Do not crash analyzing
6349         Allow_Integer_Address if already set.
6350         * a-except-2005.adb (Rcheck_PE_Stream_Operation_Not_Allowed):
6351         Fix order, for consistency with Rmsg_xx declarations.
6353 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6355         * sem_ch4.adb (Complete_Object_Operation): If the type of the
6356         candidate subprogram is a limited view, use non-limited view
6357         when available.
6359 2014-07-29  Robert Dewar  <dewar@adacore.com>
6361         * sem_ch13.adb: Minor change in RM reference.
6362         * sem_mech.ads: Minor reformatting.
6363         * einfo.ads: Minor comment fix.
6364         * types.ads: Minor correction to range given for Mechanism_Type.
6365         * exp_ch6.adb (Add_Invariant_And_Predicate_Checks): Do not
6366         check predicate on way out for OUT or IN OUT parameters.
6367         * par-ch3.adb (P_Constraint_Opt): Handle missing RANGE keyword
6368         better (P_Range_Constraint): Corresponding fix.
6369         * checks.ads: Minor comment clarification.
6371 2014-07-29  Gary Dismukes  <dismukes@adacore.com>
6373         * sem_ch8.adb (Analyze_Object_Renaming): Set the Is_Volatile
6374         and Treat_As_Volatile flags based on whether the renamed object
6375         is a volatile object.
6377 2014-07-29  Olivier Hainque  <hainque@adacore.com>
6379         * g-debpoo.adb
6380         (Default_Alignment): Rename as Storage_Alignment. This is not
6381         a "default" that can be overriden. Augment comment to clarify
6382         intent and document why we need to manage alignment padding.
6383         (Header_Offset): Set to Header'Object_Size instead of 'Size
6384         rounded up to Storage_Alignment. Storage_Alignment on the
6385         allocation header is not required by our internals so was
6386         overkill. 'Object_Size is enough to ensure proper alignment
6387         of the header address when substracted from a storage address
6388         aligned on Storage_Alignment.
6389         (Minimum_Allocation): Rename as Extra_Allocation, conveying that
6390         this is always added on top of the incoming allocation requests.
6391         (Align): New function, to perform alignment rounding operations.
6392         (Allocate): Add comments on the Storage_Address computation
6393         scheme and adjust so that the alignment padding applies to that
6394         (Storage_Address) only.
6396 2014-07-29  Robert Dewar  <dewar@adacore.com>
6398         * exp_ch3.adb (Default_Initialize_Object): Remove incorrect
6399         pragma Unreferenced.
6400         * cstand.adb (Create_Standard): Use E_Array_Type for standard
6401         string types. Make sure index of Any_String/Any_Array is in a list.
6402         * errout.adb: Minor reformatting.
6404 2014-07-29  Robert Dewar  <dewar@adacore.com>
6406         * gnat_ugn.texi: Clean up and correct documentation of warnings.
6407         * usage.adb: Minor corrections to make sure warnings are properly
6408         documented.
6409         * warnsw.adb (Set_Warning_Switch): Remove redundant return statement.
6410         (WA_Warnings): Add Warn_On_Suspicious_Modulus_Value.
6412 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6414         * exp_ch3.adb (Expand_N_Object_Declaration): The dummy block
6415         created to match internal sequence numbers between compilations
6416         with/without abort must have its type properly set.
6418 2014-07-29  Robert Dewar  <dewar@adacore.com>
6420         * ali.adb (Initialize_ALI): Initialize SSO_Default_Specified
6421         (Scan_ALI): Set SSO_Default in ALIs_Record (Scan_ALI): Set
6422         SSO_Default_Specified.
6423         * ali.ads (ALIs_Record): Add field SSO_Default
6424         (SSO_Default_Specified): New global switch.
6425         * bcheck.adb (Check_Consistent_SSO_Default): New procedure
6426         (Check_Configuration_Consistency): Call this procedure
6427         * einfo.adb (SSO_Set_High_By_Default): New
6428         function (SSO_Set_Low_By_Default): New function
6429         (Set_SSO_Set_High_By_Default): New procedure
6430         (Set_SSO_Set_Low_By_Default): New procedure (Write_Entity_Flags):
6431         List new flags
6432         * einfo.ads (SSO_Set_Low_By_Default): New flag
6433         (SSO_Set_High_By_Default): New flag
6434         * freeze.adb (Set_SSO_From_Default): New procedure
6435         (Freeze_Array_Type): Call Set_SSO_From_Default
6436         (Freeze_Record_Type): Call Set_SSO_From_Default
6437         * gnat_rm.texi: Document pragma Default_Scalar_Storage_Order
6438         * lib-writ.adb (Write_ALI): Set OL/OH in P line as needed
6439         * lib-writ.ads: Add OL/OH parameters to P line
6440         * opt.adb: Set Default_SSO, Default_SSO_Config as appropriate
6441         * opt.ads (Default_SSO): New global switch (Default_SSO_Config):
6442         New global switch
6443         * repinfo.adb (List_Scalar_Storage_Order): List SSO when it is
6444         set by default using pragma Default_Scalar_Storage_Order.
6445         * sem.ads (Scope_Stack_Entry): Add component Save_Default_SSO
6446         * sem_ch13.adb (Inherit_Delayed_Rep_Aspects):
6447         Clear SSO defaults when explicit SSO is inherited.
6448         (Analyze_Attribute_Definition_Clause): Clear SSO defaults when
6449         explicit SSO is specified.
6450         (Inherit_Aspects_At_Freeze_Point):
6451         Clear SSO default when inheriting SSO.
6452         * sem_ch3.adb (Set_Default_SSO): New procedure
6453         (Analyze_Private_Extension_Declaration): Set defualt SSO
6454         (Array_Type_Declaration): ditto (Build_Derived_Array_Type): ditto
6455         (Build_Derived_Private_Type): ditto (Build_Derived_Record_Type):
6456         ditto (Build_Derived_Type): ditto (Make_Class_Wide_Type): ditto
6457         (Record_Type_Declaration): ditto
6458         * sem_ch8.adb (Pop_Scope): Restore Default_SSO (Push_Scope):
6459         Save Default_SSO
6460         * sem_prag.adb (Analyze_Pragma, case
6461         Default_Scalar_Storage_Order): Set Default_SSO
6463 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6465         * sem_ch6.adb (Valid_Operator_Definition): Verify that
6466         all parameter have mode IN. This check must be done here for
6467         subprogram instantiations that have operator names, because their
6468         analysis does not follow the same path as that for subprogram
6469         declarations.
6471 2014-07-29  Robert Dewar  <dewar@adacore.com>
6473         * freeze.adb (Freeze_Entity, Concurrent_Type case): Add a guard
6474         to make sure that the Etype of a component of the corresponding
6475         record type is present before trying to freeze it.
6476         * sem_ch5.adb: Minor reformatting.
6478 2014-07-29  Robert Dewar  <dewar@adacore.com>
6480         * exp_attr.adb, types.ads, types.h, exp_ch11.adb, a-except.adb,
6481         a-except-2005.adb: Add new reason code PE_Stream_Operation_Not_Allowed,
6482         and then use it when a stream operation is used from a library generic
6483         when the restriction (No_Streams) is active.
6485 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6487         * projects.texi: Fix minor typo.
6489 2014-07-29  Yannick Moy  <moy@adacore.com>
6491         * sem_attr.adb (Analyze_Attribute): Fix generation of warning.
6493 2014-07-29  Arnaud Charlet  <charlet@adacore.com>
6495         * sem_ch5.adb (Check_Unreachable_Code): Do not remove code in
6496         CodePeer mode.
6498 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6500         * exp_ch7.adb (Find_Last_Init): Add local variable
6501         Deep_Init_Found. Check the statement immediately following the
6502         declaration if [Deep_]Initialization was not found.
6504 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6506         * exp_util.adb (Is_Aliased): It appears that
6507         'reference-d and renamed objects still play some role in Boolean
6508         expression with actions and cannot be finalized immediately.
6510 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6512         * exp_dbug.adb (Qualify_Needed):  For debugging purposes,
6513         Loop names are not part of the full qualification of entity names.
6515 2014-07-29  Robert Dewar  <dewar@adacore.com>
6517         * einfo.adb (Has_Protected): Test base type.
6518         * sem_ch4.adb (Analyze_Allocator): Reorganize code to make sure
6519         that we always properly check No_Protected_Type_Allocators.
6521 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6523         * sem_util.ads, sem_util.adb (Defining_Entity): Now applies to
6524         loop declarations as well.
6525         * exp_ch5.adb (Expand_Loop_Statement): Apply Qualify_Entity_Names
6526         to an iterator loop, because it may contain local renaming
6527         declarations that require debugging information.
6529 2014-07-29  Robert Dewar  <dewar@adacore.com>
6531         * sem_util.ads, exp_util.adb, sem_attr.adb: Minor reformatting.
6533 2014-07-29  Robert Dewar  <dewar@adacore.com>
6535         * einfo.ads, einfo.adb (Static_Real_Or_String_Predicate): New function
6536         (Set_Static_Real_Or_String_Predicate): New procedure
6537         * sem_ch13.adb (Build_Predicate_Functions): Accomodate static
6538         string predicates (Is_Predicate_Static): Handle static string
6539         predicates.
6540         * sem_eval.adb (Real_Or_String_Static_Predicate_Matches):
6541         New procedure (Check_Expression_Against_Static_Predicate):
6542         Deal with static string predicates, now fully implemented
6543         (Eval_Relational_Op): Allow string equality/inequality as static
6544         if not comes from source.
6546 2014-07-29  Robert Dewar  <dewar@adacore.com>
6548         * sem_aggr.adb, exp_ch5.adb, sem_ch5.adb, exp_util.adb, einfo.adb,
6549         einfo.ads, sem_util.adb, sem_attr.adb, sem_case.adb, sem_eval.adb,
6550         sem_eval.ads, sem_ch13.adb: General cleanup of static predicate
6551         handling. Change name of Discrete_Predicate to
6552         Discrete_Static_Predicate, and replace testing of the presence of this
6553         field by testing the flag Has_Static_Expression.
6555 2014-07-29  Robert Dewar  <dewar@adacore.com>
6557         * gnat_rm.texi: Document pragma Unevaluated_Use_Of_Old.
6558         * opt.adb: Handle Uneval_Old.
6559         * opt.ads (Uneval_Old, Uneval_Old_Config): New variables.
6560         * par-prag.adb: Add dummy entry for pragma Unevaluated_Use_Of_Old.
6561         * sem.ads (Save_Uneval_Old): New field in Scope_Stack_Entry.
6562         * sem_attr.adb (Uneval_Old_Msg): New procedure.
6563         * sem_ch8.adb (Push_Scope): Save Uneval_Old.
6564         (Pop_Scope): Restore Uneval_Old.
6565         * sem_prag.adb (Analyze_Pragma, case Unevaluated_Use_Of_Old):
6566         Implemented.
6567         * snames.ads-tmpl: Add entries for pragma Unevaluated_Use_Of_Old
6568         Add entries for Name_Warn, Name_Allow.
6570 2014-07-29  Robert Dewar  <dewar@adacore.com>
6572         * sem_aggr.adb (Resolve_Array_Aggregate): Change Is_Static_Range
6573         to Is_OK_Static_Range.
6574         * sem_attr.adb (Eval_Attribute): Make sure we properly flag
6575         static attributes (Eval_Attribute, case Size): Handle size of
6576         zero properly (Eval_Attribute, case Value_Size): Handle size of
6577         zero properly.
6578         * sem_ch13.adb: Minor reformatting.
6579         * sem_ch3.adb (Process_Range_Expr_In_Decl): Change
6580         Is_Static_Range to Is_OK_Static_Range.
6581         * sem_eval.adb (Eval_Case_Expression): Total rewrite, was
6582         wrong in several ways (Is_Static_Range): Moved here from spec
6583         (Is_Static_Subtype): Moved here from spec Change some incorrect
6584         Is_Static_Subtype calls to Is_OK_Static_Subtype.
6585         * sem_eval.ads: Add comments to section on
6586         Is_Static_Expression/Raises_Constraint_Error (Is_OK_Static_Range):
6587         Add clarifying comments (Is_Static_Range): Moved to body
6588         (Is_Statically_Unevaluated): New function.
6589         * sem_util.ads, sem_util.adb (Is_Preelaborable_Expression): Change
6590         Is_Static_Range to Is_OK_Static_Range.
6591         * sinfo.ads: Additional commments for Is_Static_Expression noting
6592         that clients should almost always use Is_OK_Static_Expression
6593         instead. Many other changes throughout front end units to obey
6594         this rule.
6595         * tbuild.ads, tbuild.adb (New_Occurrence_Of): Set Is_Static_Expression
6596         for enumeration literal.
6597         * exp_ch5.adb, sem_intr.adb, sem_ch5.adb, exp_attr.adb, exp_ch9.adb,
6598         lib-writ.adb, sem_ch9.adb, einfo.ads, checks.adb, checks.ads,
6599         sem_prag.adb, sem_ch12.adb, freeze.adb, sem_res.adb, exp_ch4.adb,
6600         exp_ch6.adb, sem_ch4.adb, sem_ch6.adb, exp_aggr.adb, sem_cat.adb:
6601         Replace all occurrences of Is_Static_Expression by
6602         Is_OK_Static_Expression.
6604 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6606         * exp_ch4.adb (Process_Transient_Object): Remove constant
6607         In_Cond_Expr, use its initialization expression in place.
6608         * exp_ch7.adb (Process_Declarations): There is no need to check
6609         that a transient object being hooked is controlled as it would
6610         not have been hooked in the first place.
6611         * exp_util.adb (Is_Aliased): 'Reference-d or renamed transient
6612         objects are not considered aliased when the related context is
6613         a Boolean expression_with_actions.
6614         (Requires_Cleanup_Actions): There is no need to check that a transient
6615         object being hooked is controlled as it would not have been hooked in
6616         the first place.
6618 2014-07-29  Robert Dewar  <dewar@adacore.com>
6620         * errout.adb: Minor reformatting.
6622 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6624         * exp_ch3.adb (Default_Initialize_Object): Add new variables
6625         Abrt_Blk and Dummy. Generate a dummy temporary when aborts are
6626         not allowed to ensure the symmetrical generation of symbols.
6627         * exp_ch7.adb (Build_Object_Declarations): Remove variables A_Expr
6628         and E_Decl. Add new variables Decl and Dummy. Generate a dummy
6629         temporary when aborts are not allowed to ensure symmertrical
6630         generation of symbols.
6631         * exp_intr.adb (Expand_Unc_Deallocation): Add new variable
6632         Dummy. Generate a dummy temporary when aborts are not allowed
6633         to ensure symmertrical generation of symbols.
6635 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6637         * exp_dbug.adb (Debug_Renaming_Declaration): For an object
6638         renaming, indicate that the renamed entity itself needs debug
6639         information. This is necessary if that entity is a temporary,
6640         e.g. part of the expansion of an explicit dereference in an
6641         iterator.
6643 2014-07-29  Thomas Quinot  <quinot@adacore.com>
6645         * errout.adb (Set_Error_Posted): When propagating flag to
6646         an enclosing named association, also propagate to the parent
6647         of that node, so that named and positional associations are
6648         treated consistently.
6650 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6652         * sem_attr.adb (Resolve_Attribute, case 'Update):  Set
6653         Do_Range_Check properly on array component expressions that
6654         have a scalar type. In GNATprove mode, only checks on scalar
6655         components must be marked by the front-end.
6657 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6659         * sem_res.adb (Resolve_Type_Conversion): If the type of the
6660         expression is a limited view, use the non-limited view when
6661         available.
6663 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6665         * exp_ch4.adb (Expand_N_Case_Expression): Mark the generated
6666         case statement as coming from a conditional expression.
6667         (Expand_N_If_Expression): Mark the generated if statement as
6668         coming from a conditional expression.
6669         * exp_ch5.adb (Expand_N_Case_Statement): Do not process controlled
6670         objects found in case statement alternatives when the case
6671         statement is actually a case expression.
6672         (Expand_N_If_Statement):
6673         Do not process controlled objects found in an if statement when
6674         the if statement is actually an if expression.
6675         * sinfo.adb (From_Conditional_Expression): New routine.
6676         (Set_From_Conditional_Expression): New routine.
6677         * sinfo.ads Add new semantic flag From_Conditional_Expression and
6678         update related nodes.
6679         (From_Conditional_Expression): New routine along with pragma Inline.
6680         (Set_From_Conditional_Expression): New routine along with pragma Inline.
6682 2014-07-29  Hristian Kirtchev  <kirtchev@adacore.com>
6684         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Remove
6685         formal parameter Obj_Id and update the comment on usage. Renamed
6686         Obj_Typ to Func_Typ and update all occurrences.
6687         (Find_Last_Init): Remove formal parameter Decl and update the comment
6688         on usage.
6689         Remove local constants Obj_Id and Obj_Typ. Remove local variables
6690         Init_Typ and Is_Conc. Remove the extraction of the initialization type.
6691         (Find_Last_Init_In_Block): Remove formal parameter
6692         Init_Typ and update the comment on usage.
6693         (Is_Init_Call): Remove formal parameter Init_Typ and update the comment
6694         on usage. Check whether the procedure call is an initialization
6695         procedure of either the object type or the initialization type.
6696         (Is_Init_Proc_Of): New routine.
6697         (Process_Object_Declaration): Obj_Id and Obj_Typ are now global to this
6698         routine. Add new variable Init_Typ. Add circuitry to extract the object
6699         type as well as the initialization type.
6701 2014-07-29  Robert Dewar  <dewar@adacore.com>
6703         * sem_case.adb: Minor reformatting.
6704         * sem_aux.ads: Minor reformatting.
6706 2014-07-29  Ed Schonberg  <schonberg@adacore.com>
6708         * sinfo.adb (Set_Else_Actions, Set_Then_Actions): Set parent
6709         pointer on these fields, even though they are semantic, because
6710         subsequent analysis and expansion of action nades may require
6711         exploring the tree, for example to locate a node to be wrapped
6712         when a function with controlled result is called.
6714 2014-07-29  Claire Dross  <dross@adacore.com>
6716         * sem_aux.adb (Get_Binary_Nkind): Use case on
6717         Name_Id instead of an intermediate string.
6718         (Get_Unary_Nkind): Use case on Name_Id instead of an intermediate
6719         string.
6721 2014-07-29  Sergey Rybin  <rybin@adacore.com frybin>
6723         * gnat_ugn.texi (gnatelim, gnatstub, gnatmetric): Add note
6724         about processing sources with preprocessor directives.
6726 2014-07-24  Martin Liska  <mliska@suse.cz>
6728         * gcc-interface/trans.c (finalize_nrv): Adjust function call.
6729         * gcc-interface/utils.c (rest_of_subprog_body_compilation): Likewise.
6730         (gnat_write_global_declarations): Likewise.
6732 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
6734         * gnat_rm.texi: Clean up for makeinfo 5.2.
6736 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
6738         * gnat_rm.texi (Machine Code Insertions): Clean up.
6740 2014-07-18  Robert Dewar  <dewar@adacore.com>
6742         * exp_ch7.adb: Minor reformatting.
6744 2014-07-18  Claire Dross  <dross@adacore.com>
6746         * sem_aux.ads (Get_Binary_Nkind): New function that returns
6747         the Node_Kind value of an entity defining a binary operator.
6748         (Get_Unary_Nkind): New function that returns the Node_Kind value
6749         of an entity defining a unary operator.
6751 2014-07-18  Pascal Obry  <obry@adacore.com>
6753         * sysdep.c: comment update.
6754         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
6755         platforms where it is known to be supported.
6757 2014-07-18  Thomas Quinot  <quinot@adacore.com>
6759         * sem_dist.adb (Process_Remote_AST_Declaration): Need
6760         to set Fat_Type's Ekind in order to be able to use its
6761         Corresponding_Remote_Type attribute.
6763 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6765         * einfo.adb Last_Aggregate_Assignment is now Node 30.
6766         (Last_Aggregate_Assignment): Include
6767         constants in the assertion. Update the underlying node.
6768         (Set_Last_Aggregate_Assignment): Include constants in the
6769         assertion. Update the underlying node.  (Write_Field11_Name):
6770         Remove the entry for Last_Aggregate_Assignment.
6771         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
6772         * einfo.ads Update the node designation and usage of attribute
6773         Last_Aggregate_Assignment.
6774         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
6775         assignment statement used to initialize a controlled object.
6776         (Late_Expansion): Store the last assignment statement used to
6777         initialize a controlled record or an array of controlled objects.
6778         * exp_ch3.adb (Expand_N_Object_Declaration): Default
6779         initialization of objects is now performed in a separate routine.
6780         (Default_Initialize_Object): New routine.
6781         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
6782         Obj_Id. Update the comment on usage.
6783         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
6784         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
6785         (Is_Init_Call): Add formal parameter Init_Typ. Update the
6786         comment on usage.  Account for the type init proc when trying
6787         to determine whether a statement is an initialization call.
6788         (Make_Adjust_Call): Rename formal parameter For_Parent to
6789         Skip_Self. Update all occurrences of For_Parent. Account for
6790         non-tagged types. Update the call to Make_Call.
6791         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
6792         comment on usage. Update all occurrences of For_Parent.
6793         (Make_Final_Call): Rename formal parameter For_Parent to
6794         Skip_Self. Update all occurrences of For_Parent. Account
6795         for non-tagged types. Update the call to Make_Call.
6796         (Process_Object_Declaration): Most variables and constants are
6797         now local to the routine.
6798         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
6799         For_Parent to Skip_Self. Update the comment on usage.
6800         (Make_Final_Call): Rename formal parameter For_Parent to
6801         Skip_Self. Update the comment on usage.
6803 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6805         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
6806         can be a procedure that is implemented by entry, and have a
6807         formal that is a synchronized interface.  It does not have to
6808         be declared as a protected operation.
6810 2014-07-18  Robert Dewar  <dewar@adacore.com>
6812         * gnat_rm.texi: Remove mention of obsolete attributes
6813         Max[_Interrupt]_Priority, which have never been implemented
6814         (or at the very least were removed long ago if they ever were
6815         implemented.  Add documentation of Max[_Interrupt]_Priority
6816         constants in package System.
6817         * ttypes.ads: Document actual handling of package System,
6818         rather than a historical fantasy version.  Remove mention of
6819         non-existent attributes Max[_Interrupt]_Priority.
6821 2014-07-18  Pascal Obry  <obry@adacore.com>
6823         * a-witeio.adb (Put): No 16-bit character output when text
6824         translation is disabled.
6825         * i-cstrea.ads: Code clean up.
6827 2014-07-18  Robert Dewar  <dewar@adacore.com>
6829         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
6830         static attributes.
6832 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6834         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
6836 2014-07-18  Pascal Obry  <obry@adacore.com>
6838         * adaint.c: Do not include wchar.h on VxWorks.
6839         * mingw32.h: Remove obsolete definition.
6841 2014-07-18  Pascal Obry  <obry@adacore.com>
6843         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
6844         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
6845         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
6846         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
6848 2014-07-18  Pascal Obry  <obry@adacore.com>
6850         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
6851         * a-ztexio.adb: Likewise.
6852         * a-witeio.adb: Likewise.
6853         (Open): Pass file's translation mode to set_text_mode.
6854         * s-ficobl.ads (Content_Encoding): New type.
6855         (Text_Content_Encoding): New subtype.
6856         (AFCB): Rename Is_Text_File to Text_Encoding.
6857         * s-fileio.adb (Open): Handles new text_translation
6858         values. Remove Is_Text_File which is equivalent to Text_Encoding
6859         in Text_Content_Encoding.
6860         * adaint.h (__gnat_set_mode): New routine.
6861         * sysdep.c (__gnat_set_wide_text_mode): Removed.
6862         (__gnat_set_mode): New routine.
6864 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
6866         * gcc-interface/decl.c, gcc-interface/trans.c,
6867         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
6868         Is_Packed_Array_Impl_Type.
6870 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6872         * sem_util.adb: Minor typo correction.
6874 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
6876         * gnat_rm.texi: Complete previous change.
6878 2014-07-18  Pascal Obry  <obry@adacore.com>
6880         * s-fileio.adb: Minor style fix.
6882 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6884         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
6885         specification of stream attributes for subtypes that are not
6886         first subtypes, to prevent malformed rep_item chains in the case
6887         of such illegal specifications for discriminated private subtypes.
6888         (Check_Overloaded_Name): Verify that the name is an entity name
6889         before other checks.
6891 2014-07-18  Pascal Obry  <obry@adacore.com>
6893         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
6895 2014-07-18  Robert Dewar  <dewar@adacore.com>
6897         * sem_prag.adb, sem_attr.adb,
6898         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
6900 2014-07-18  Pascal Obry  <obry@adacore.com>
6902         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
6903         * initialize.c (__gnat_wide_text_translation_required): Defined here.
6905 2014-07-18  Pascal Obry  <obry@adacore.com>
6907         * adaint.c (__gnat_fputwc): New routine.
6908         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
6910 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6912         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
6913         (Set_Stores_Attribute_Old_Prefix): New routine.
6914         (Stores_Attribute_Old_Prefix): New routine.
6915         (Write_Entity_Flags):
6916         Output flag Stores_Attribute_Old_Prefix.
6917         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
6918         comment on usage.
6919         (Set_Stores_Attribute_Old_Prefix): New routine
6920         along with pragma Inline.
6921         (Stores_Attribute_Old_Prefix): New
6922         routine along with pragma Inline.
6923         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
6924         constant which captures the result of attribute 'Old's prefix.
6925         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
6926         relocated expression which acted as a prefix of attribute 'Old.
6928 2014-07-18  Bob Duff  <duff@adacore.com>
6930         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
6931         null before dispatching to Deallocate_Subpool.
6932         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
6933         parameter of Default_Subpool_For_Pool to 'in out'.
6934         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
6935         a message to the raise.
6936         * sem_util.adb: Minor reformatting.
6938 2014-07-18  Robert Dewar  <dewar@adacore.com>
6940         * sem_util.adb (Check_Expression_Against_Static_Predicate):
6941         Mark expression as non-static if it fails static predicate check,
6942         and issue additional warning.
6944 2014-07-18  Pascal Obry  <obry@adacore.com>
6946         * a-witeio.adb (Put): Control translation based on
6947         wide_text_translation_required.
6948         * adaint.c (CurrentCCSEncoding): New variable.
6949         * initialize.c (__gnat_initialize): On Windows initialize
6950         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
6951         environment variable.
6952         * mingw32.h (CurrentCCSEncoding): New external.
6953         (__gnat_wide_text_translation_required): Likewise.
6954         * sysdep.c (wide_text_translation_required): New variable.
6955         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
6957 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6959         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
6960         variable Refined_States.  Add global variable Matched_Items.
6961         (Check_Dependency_Clause): Account for dependency
6962         clauses utilizing states with visible null refinements.
6963         (Is_Null_Refined_State): New routine.
6964         (Match_Items): Record each successfully matched item of pragma Depends.
6965         (Record_Item): New routine.
6967 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
6969         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
6970         Do_Range_Check flag on a dynamic index expression used in a
6971         component association in the argument of Update.
6973 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
6975         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
6977 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
6979         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
6980         of enclosing blocks, loops and the enclosing function using a
6981         parent-based traversal.
6982         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
6983         stack reclamation if the iterator loop contains a return statement
6984         that uses the stack.
6985         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
6986         patch up the scope stack as the secondary stack management now
6987         takes into account the enclosing function of the iterator loop.
6989 2014-07-18  Robert Dewar  <dewar@adacore.com>
6991         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
6993 2014-07-18  Robert Dewar  <dewar@adacore.com>
6995         * einfo.adb (Has_Static_Predicate): New function.
6996         (Set_Has_Static_Predicate): New procedure.
6997         * einfo.ads (Has_Static_Predicate): New flag.
6998         * sem_ch13.adb (Is_Predicate_Static): New function
6999         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
7000         (Add_Call): Minor change in Sloc of generated expression
7001         (Add_Predicates): Remove setting of Static_Pred, no longer used.
7002         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
7003         replace by use of the entity flag Has_Static_Predicate_Aspect.
7004         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
7005         and issue warning that predicate is not checked for now.
7006         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
7007         spec.
7008         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7009         Carry out check for any case where there is a static predicate,
7010         and output appropriate message.
7011         * sinfo.ads: Minor comment corrections.
7013 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7015         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
7016         from an untagged private type whose full view is tagged, the type
7017         is marked tagged for layout reasons, but it has no dispatch table,
7018         so Set_All_DT_Position must not be called.
7019         * exp_ch13.adb: If the freeze node is for a type internal to a
7020         record declaration, as is the case for a class-wide subtype
7021         of a parent component, the relevant scope is the scope of the
7022         enclosing record.
7024 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7026         * g-memdum.adb, g-memdum.ads: Code clean ups.
7028 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7030         * sem_prag.adb (Check_Dependency_Clause):
7031         Update the comment on usage. Reimplement the mechanism which
7032         attempts to match a single clause of Depends against one or
7033         more clauses of Refined_Depends.
7034         (Input_Match): Removed.
7035         (Inputs_Match): Removed.
7036         (Is_Self_Referential): Removed.
7037         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
7038         (Normalize_Outputs): Rename variable Split to New_Claue and update
7039         all its occurrences.
7040         (Report_Extra_Clauses): Update the comment on usage.
7041         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
7043 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7045         * i-cstrea.ads: Minor reformatting.
7047 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7049         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
7050         secondary stack-related flags to the generated block.
7051         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
7052         once the loop is relocated in a block.
7054 2014-07-18  Robert Dewar  <dewar@adacore.com>
7056         * repinfo.ads: Add documentation on handling of back annotation
7057         for dynamic case.
7059 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7061         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
7062         of full type declaration, denotes previous declaration for
7063         incomplete view of the type.
7064         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
7065         of declaration if one is present.
7066         (Replace_Type): When constructing the signature of an inherited
7067         operation, handle properly the case where the operation has a
7068         formal whose type is an incomplete view.
7069         * sem_util.adb (Collect_Primitive_Operations): Handle properly
7070         the case of an operation declared after an incomplete declaration
7071         for a type T and before the full declaration of T.
7073 2014-07-18  Pascal Obry  <obry@adacore.com>
7075         * i-cstrea.ads: Add documentation for set_wide_text_mode.
7077 2014-07-18  Robert Dewar  <dewar@adacore.com>
7079         * a-witeio.adb: Minor code reorganization.
7080         * i-cstrea.ads: Add comment.
7082 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7084         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
7085         clarifications.
7087 2014-07-18  Robert Dewar  <dewar@adacore.com>
7089         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
7091 2014-07-18  Pascal Obry  <obry@adacore.com>
7093         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
7094         * a-witeio.adb (Put): On platforms where there is translation
7095         done by the OS output the raw text.
7096         (New_Line): Use Put above to properly handle the LM wide characters.
7098 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7100         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
7101         to Absolute_Address.
7103 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
7105         * opt.ads (Suppress_Back_Annotation): Remove as unused.
7106         * fe.h (Back_Annotate_Rep_Info): Likewise.
7107         (Global_Discard_Names): Likewise.
7109 2014-07-18  Robert Dewar  <dewar@adacore.com>
7111         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
7112         parenthesized.
7114 2014-07-18  Vincent Celier  <celier@adacore.com>
7116         * s-osinte-vms.ads: Fix style errors.
7118 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7120         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
7121         NAME_MAX and PATH_MAX.
7123 2014-07-18  Bob Duff  <duff@adacore.com>
7125         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
7126         Build_Record_Or_Elementary_Output_Procedure): For Input and
7127         Output attributes, do not read/write the discriminants if they
7128         have default values; that will be done by Read/Write.
7130 2014-07-18  Robert Dewar  <dewar@adacore.com>
7132         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
7133         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
7134         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
7135         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
7136         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
7138 2014-07-18  Robert Dewar  <dewar@adacore.com>
7140         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
7142 2014-07-18  Vincent Celier  <celier@adacore.com>
7144         * lib-writ.ads: Update documentation about the D lines.
7146 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7148         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
7149         as a parameter, rather than its Chars field, in order to locate
7150         freeze node of type. If the predicate or invariant has references
7151         to types other than the one to which the contract applies, these
7152         types must be frozen, and the corresponding predicate functions
7153         created, before that freeze node.
7155 2014-07-18  Robert Dewar  <dewar@adacore.com>
7157         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
7158         * par_sco.adb: Minor reformatting.
7160 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
7162         * exp_ch4.adb (Real_Range_Check): Turn off
7163         the Do_Range_Check flag on the conversion's current Expression
7164         argument rather than on the originally captured Operand node,
7165         as Expression may reflect a rewriting (as in conversions to a
7166         fixed-point type).
7168 2014-07-18  Vincent Celier  <celier@adacore.com>
7170         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
7171         is not a subunit.
7172         * ali.ads (Sdep_Record): New component Unit_Name.
7173         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
7174         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
7175         dependent unit is in a project and the source file name is not
7176         one of its sources.
7178 2014-07-18  Bob Duff  <duff@adacore.com>
7180         * s-addima.ads: Minor: add comment.
7182 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7184         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
7185         of nesting rules for composites with different SSOs.
7187 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7189         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
7190         a proper logical operator.
7191         (Has_Decision): An If_Expression indicates the presence of a decision
7192         although it is not a logical operator.
7194 2014-07-18  Robert Dewar  <dewar@adacore.com>
7196         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
7197         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
7199 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
7201         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
7202         on the null statement.
7204 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7206         * adaint.c: Minor comment rewording.
7207         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
7208         use of errno in this file is thread safe.
7210 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
7212         * gnat_ugn.texi: Doc clarification.
7213         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
7214         * sem_ch13.ads: Minor comment update.
7216 2014-07-18  Robert Dewar  <dewar@adacore.com>
7218         * repinfo.ads: Minor comment fix.
7220 2014-07-18  Robert Dewar  <dewar@adacore.com>
7222         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
7223         * sem_prag.adb: Add dummy implementation of
7224         Default_Scalar_Storage_Order.
7225         * snames.ads-tmpl: Add dummy entry for
7226         Default_Scalar_Storage_Order pragma.
7228 2014-07-18  Robert Dewar  <dewar@adacore.com>
7230         * opt.adb (Tree_Read): Read Address_Is_Private,
7231         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
7232         (Tree_Write): Corresponding writes
7233         * opt.ads: Minor comment reformatting and fixes.
7234         * tree_io.ads: Increment ASIS_Version_Number.
7236 2014-07-18  Robert Dewar  <dewar@adacore.com>
7238         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
7239         * types.h: Fix typo.
7241 2014-07-18  Robert Dewar  <dewar@adacore.com>
7243         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
7244         functional change).
7245         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
7246         ASIS trees.
7247         * sem_ch13.adb (Kill_Rep_Clause): New procedure
7248         (Analyze_Attribute_Definition_Clause): Use
7249         Kill_Rep_Clause. This is just a cleanup, no functional effect.
7250         (Analyze_Enumeration_Representation_Clause):
7251         Use Kill_Rep_Clause. This means that enum rep
7252         clauses are now properly removed from -gnatct trees.
7253         (Analyze_Record_Representation_Clause): Same change.
7254         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
7256 2014-07-18  Pascal Obry  <obry@adacore.com>
7258         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
7259         OS_Time from time parts.
7260         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
7262 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7264         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
7265         indexing over containers that are derived types: check whether
7266         signature of found operation has the correct first parameter
7267         before retrieving directly a primitive operation.
7269 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7271         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
7272         Do_Range_Check flag on dynamic bounds of a range used in a
7273         component association in the argument of Update.
7275 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7277         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
7278         accesses to errno(3) to be thread safe.
7280 2014-07-18  Vincent Celier  <celier@adacore.com>
7282         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
7283         limited imported project that is an extending project, return
7284         a project being extended if it has the expected name.
7286 2014-07-18  Pascal Obry  <obry@adacore.com>
7288         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
7289         routine to set the last modification time stamp for the given file.
7290         * gnatchop.adb (File_Time_Stamp): Removed.
7291         (Write_Unit): Use
7292         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
7294 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7296         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
7297         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
7298         Moved here, so it can be shared with the resolution of 'Update,
7299         whose argument shares some features with aggregates.
7300         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
7301         Aggregate_Constraint_Checks with the expression of each
7302         association, so that the Do_Range_Check flag is set when needed.
7304 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7306         * sem_ch4.adb (Try_Container_Indexing):  If the container
7307         type is a derived type, the value of the inherited  aspect is
7308         the Reference operation declared for the parent type. However,
7309         Reference is also a primitive operation of the new type, and
7310         the inherited operation has a different signature. We retrieve
7311         the right one from the list of primitive operations of the
7312         derived type.
7314 2014-07-18  Vincent Celier  <celier@adacore.com>
7316         * debug.adb: Update comment.
7318 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7320         * exp_util.adb (Needs_Finalization): There is no reason why a
7321         C type should not benefit from finalization actions.
7323 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7325         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
7326         (FILENAME_MAX): Remove unneeded definition.
7328 2014-07-18  Robert Dewar  <dewar@adacore.com>
7330         * exp_attr.adb, debug.adb: Update comments.
7332 2014-07-18  Vincent Celier  <celier@adacore.com>
7334         * par-ch4.adb (Simple_Expression): Add missing style check
7335         for binary adding operators.
7336         (Term): Add missing style check for multiplying operators.
7338 2014-07-18  Robert Dewar  <dewar@adacore.com>
7340         * impunit.adb: Minor comment correction.
7341         * widechar.adb, s-wchcon.ads: Minor comment corrections.
7343 2014-07-18  Robert Dewar  <dewar@adacore.com>
7345         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
7346         for Build_Static_Predicate (Build_Predicate_Functions):
7347         Don't try to build discrete predicate for real type.
7348         (Build_Predicate_Functions): Report attempt to use
7349         Static_Predicate function on real type as unimplemented.
7350         * sem_util.adb (Check_Expression_Against_Static_Predicate):
7351         Add guard to prevent blow up on predicate for real type.
7353 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7355         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
7356         properly static predicate on enumeration types and modular types
7357         (not subtypes).
7359 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
7361         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
7362         the corresponding source file index.
7363         * get_scos.ads (Get_SCOs): Add a default value for it.
7364         * par_sco.adb (SCO_Record): Fill the corresponding value.
7365         * scos.h: New.
7367 2014-07-18  Vincent Celier  <celier@adacore.com>
7369         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
7370         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
7371         reformatting.
7372         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
7374 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7376         * g-sercom.ads (Set): document possible data loss.
7378 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7380         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
7381         Output, Read, Write): If the restriction No_Streams is active,
7382         replace each occurrence of a stream attribute by an explicit
7383         Raise statement.
7385 2014-07-18  Robert Dewar  <dewar@adacore.com>
7387         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
7388         reformatting.
7390 2014-07-18  Robert Dewar  <dewar@adacore.com>
7392         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
7393         function.
7394         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
7395         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
7396         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
7397         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
7399 2014-07-18  Robert Dewar  <dewar@adacore.com>
7401         * bcheck.adb (Check_Consistent_Restrictions):
7402         Remove obsolete code checking for violation of
7403         No_Standard_Allocators_After_Elaboration (main program)
7404         * bindgen.adb (Gen_Adainit): Handle
7405         No_Standard_Allocators_After_Elaboration
7406         (Gen_Output_File_Ada): ditto.
7407         * exp_ch4.adb (Expand_N_Allocator): Handle
7408         No_Standard_Allocators_After_Elaboration.
7409         * Makefile.rtl: Add entry for s-elaall
7410         * rtsfind.ads: Add entry for Check_Standard_Allocator.
7411         * s-elaall.ads, s-elaall.adb: New files.
7412         * sem_ch4.adb (Analyze_Allocator): Handle
7413         No_Standard_Allocators_After_Elaboration.
7415 2014-07-18  Robert Dewar  <dewar@adacore.com>
7417         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
7418         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
7419         Remove AB parameter from ali files and all uses.
7420         Remove Allocator_In_Body and all uses.
7422 2014-07-18  Robert Dewar  <dewar@adacore.com>
7424         * g-expect-vms.adb: Add comment.
7426 2014-07-18  Thomas Quinot  <quinot@adacore.com>
7428         * par_sco.adb (Is_Logical_Operation): return True for
7429         N_If_Expression.
7431 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7433         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
7434         analysis and resolution of each choice in the associations within
7435         the argument of Update, because they may be variable names.
7437 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7439         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
7440         actions before the generated if statement.
7442 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
7444         * gnat_ugn.texi Enhance the documentation of
7445         switches -gnateA and -gnateV.
7447 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
7449         * sem_util.adb (Build_Default_Subtype): Add missing condition
7450         so that code matches description: use the full view of the base
7451         only if the base is private and the subtype is not.
7453 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
7455         * exp_disp.adb: Minor reformatting.
7456         * exp_disp.adb: Minor code reorganization.
7458 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7460         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
7461         require an explicit SSO attribute definition clause on a composite type
7462         just because one of its components has one.
7464 2014-07-17  Robert Dewar  <dewar@adacore.com>
7466         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
7467         attribute out of existence if the enclosing pragma is ignored.
7468         * sem_util.adb: Minor reformatting.
7470 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7472         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
7473         array aggregate expanded into assignments when it appears as a
7474         local declaration in an inlined body.
7476 2014-07-17  Doug Rupp  <rupp@adacore.com>
7478         * init.c [__ANDROID__]: Modify for ZCX.
7479         * exp_aggr.adb: Minor reformatting
7480         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
7482 2014-07-17  Robert Dewar  <dewar@adacore.com>
7484         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
7485         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
7486         scng.adb: Remove incorrect usage "allow to" and "allows to".
7488 2014-07-17  Robert Dewar  <dewar@adacore.com>
7490         * exp_dist.adb: Minor reformatting.
7492 2014-07-17  Bob Duff  <duff@adacore.com>
7494         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
7496 2014-07-17  Robert Dewar  <dewar@adacore.com>
7498         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
7499         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
7501 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7503         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
7504         non-bit-packed array, propagate Reverse_Storage_Order to the
7505         packed array type.
7507 2014-07-17  Javier Miranda  <miranda@adacore.com>
7509         * exp_disp.adb: Fix comment.
7510         * exp_pakd.adb: Minor reformatting.
7512 2014-07-17  Robert Dewar  <dewar@adacore.com>
7514         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
7515         entity if none exists (Gen_Elab_Calls): Complain if clash with
7516         No_Multiple_Elaboration.
7517         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
7518         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
7519         if not needed.
7520         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
7521         * sem_ch4.adb: Minor comment updates.
7523 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7525         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
7526         of function call for later use when shared passive objects
7527         are involved.
7529 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7531         * par-ch13.adb (Get_Aspect_Specifications):
7532         Catch a case where the argument of SPARK aspect Refined_State
7533         is not properly parenthesized.
7535 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7537         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
7538         the lifetime of a reference to an Ada 2012 container element.
7539         (Is_Element_Reference): New routine.
7541 2014-07-17  Robert Dewar  <dewar@adacore.com>
7543         * ali.ads: Minor comment fix.
7544         * lib-writ.adb: Minor reformatting.
7546 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7548         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
7549         in ASIS mode, load another subunit only if it a subunit of the
7550         current one, not a sibling that has been reached through the
7551         analysis of an ancestor. This allows the construction of the
7552         ASIS tree for the subunit even when sibling subunits have errors.
7554 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7556         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
7557         prevents the analysis of various contracts when the associated
7558         construct is erroneous.
7559         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
7560         SPARK_Pragma of an illegal or a partially decorated construct.
7562 2014-07-17  Robert Dewar  <dewar@adacore.com>
7564         * s-imguns.ads: Minor reformatting.
7566 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7568         * exp_ch7.adb (Build_Finalization_Master): Move all local
7569         variables to the proper code section. When looking for an existing
7570         finalization master, inspect the ultimate ancestor type of the
7571         full view.
7572         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
7574 2014-07-17  Robert Dewar  <dewar@adacore.com>
7576         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
7577         * gnat_rm.texi: Document Entity argument for pragma Annotate and
7578         Annotate aspect.
7579         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
7580         for Annotate aspect.
7581         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
7582         Entity argument at end.
7583         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
7585 2014-07-17  Tristan Gingold  <gingold@adacore.com>
7587         * s-imguns.ads: Fix minor typo.
7589 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7591         * sprint.adb: Minor reformatting.
7593 2014-07-17  Robert Dewar  <dewar@adacore.com>
7595         * sprint.adb (Write_Itype): Print proper header for string
7596         literal subtype.
7598 2014-07-17  Steve Baird  <baird@adacore.com>
7600         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
7602 2014-07-17  Vincent Celier  <celier@adacore.com>
7604         * gnatbind.adb: Change in message "try ... for more information".
7606 2014-07-17  Robert Dewar  <dewar@adacore.com>
7608         * sprint.adb: Code clean up.
7610 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7612         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
7613         the relevant code section. Add new local constant Obj_Id. When
7614         a limited controlled object is initialized by a function call,
7615         the build-in-place object access function call acts as the last
7616         initialization statement.
7617         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
7618         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
7619         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
7621 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7623         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
7624         propagate intrinsic flag to renamed entity, to allow e.g. renaming
7625         of Unchecked_Conversion.
7626         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
7627         if the declaration has errors.
7629 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7631         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
7632         container is busy before checking whether capacity allows for
7633         a further insertion. Insertion in a busy container that is full
7634         raises Program_Error rather than Capacity_Error. Previous to that
7635         patch which exception was raised varied among container types.
7637 2014-07-17  Robert Dewar  <dewar@adacore.com>
7639         * g-comlin.ads, g-comlin.adb: Minor clean up.
7641 2014-07-17  Bob Duff  <duff@adacore.com>
7643         * gnat_ugn.texi: Update gnatpp doc.
7645 2014-07-17  Robert Dewar  <dewar@adacore.com>
7647         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
7648         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
7649         could do this by actually expanding a real generic.
7650         * a-tags.ads: Add comments about performance.
7651         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
7652         Print Etype of defining identifier, rather than the object
7653         definition. More information.
7655 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7657         * exp_dist.adb: Minor documentation clarification.
7659 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7661         * exp_util.adb (Is_Aliased): Revert previous change.
7663 2014-07-17  Vincent Celier  <celier@adacore.com>
7665         * g-comlin.adb (Try_Help): New procedure.
7666         (Getopt): Use new procedure Try_Help.
7667         * g-comlin.ads (Try_Help): New procedure.
7669 2014-07-17  Bob Duff  <duff@adacore.com>
7671         * gnat_ugn.texi: Minor update.
7673 2014-07-17  Robert Dewar  <dewar@adacore.com>
7675         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
7676         * sinfo.ads: Document restriction on aggregates (must expand to
7677         assignments if one or more assignments needs expansion, e.g. for
7678         controlled types).
7679         * sem_ch13.adb: All warning messages regarding bit order should
7680         be info: messages.
7681         * gnat_ugn.texi: Minor correction of missing @ on @code
7683 2014-07-17  Robert Dewar  <dewar@adacore.com>
7685         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
7686         * s-rident.ads (Partition_Boolean_Restrictions): Add
7687         No_Long_Long_Integer.
7688         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
7689         Long_Integer'Size if restriction No_Long_Long_Integer is active.
7690         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
7691         as the implicit base type for a signed integer type declaration
7692         if restriction No_Long_Long_Integer is active.
7693         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
7694         No_Long_Long_Integer.
7696 2014-07-17  Robert Dewar  <dewar@adacore.com>
7698         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
7699         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
7700         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
7701         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
7702         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
7704 2014-07-17  Robert Dewar  <dewar@adacore.com>
7706         * debug.adb: Remove -gnatdQ.
7707         * exp_disp.adb: Remove -gnatdQ.
7708         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
7709         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
7710         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
7711         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
7712         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
7713         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
7715 2014-07-17  Robert Dewar  <dewar@adacore.com>
7717         * back_end.adb: Minor reformatting and comment additions.
7718         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
7719         function.
7720         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
7721         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
7722         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
7723         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
7724         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
7725         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
7727 2014-07-17  Robert Dewar  <dewar@adacore.com>
7729         * gnat_rm.texi: Minor comment updates.
7731 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7733         * sem_util.adb (Make_Explicit_Dereference): If the expression
7734         being dereferenced is a generalized indexing, reset the overloaded
7735         flag on the generalized indexing call, consistent with the
7736         resetting of the flag on the original indexed component.
7738 2014-07-17  Robert Dewar  <dewar@adacore.com>
7740         * gnat_ugn.texi: Document advise not to mix -gnatV? and
7741         optimization.
7743 2014-07-17  Robert Dewar  <dewar@adacore.com>
7745         * checks.adb (Insert_Valid_Check): Don't insist on a name
7746         for the prefix when we make calls to Force_Evaluation and
7747         Duplicate_Subexpr_No_Checks.
7748         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
7749         (Remove_Side_Effects): Handle all volatile references right
7750         (Side_Effect_Free): Volatile reference is never side effect free
7751         * sinfo.ads (N_Attribute_Reference): Add comments explaining
7752         that in the tree, the prefix can be a general expression.
7754 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7756         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7757         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
7758         * sem_ch7.adb (Analyze_Package_Body_Contract,
7759         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
7761 2014-07-17  Robert Dewar  <dewar@adacore.com>
7763         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
7764         Store_After_Actions_In_Scope.
7766 2014-07-17  Robert Dewar  <dewar@adacore.com>
7768         * sem_aux.ads: Minor comment addition.
7770 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7772         * sem_res.adb (Make_Call_Into_Operator): If the call is already
7773         a rewriting of an operator node, there are no actuals to be
7774         propagated from original node to rewritten node when in ASIS mode.
7776 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7778         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
7779         Analyze_Subprogram_Contract): Add new local variable Mode. Save
7780         and restore the SPARK mode of the related construct in a
7781         stack-like fashion.
7782         * sem_ch7.adb (Analyze_Package_Body_Contract,
7783         Analyze_Package_Contract): Add new local variable Mode. Save and
7784         restore the SPARK mode of the related construct in a stack-like fashion.
7785         * sem_util.adb Remove with and use clause for Opt.
7786         (Restore_SPARK_Mode): New routine.
7787         (Save_SPARK_Mode_And_Set): New routine.
7788         * sem_util.ads Add with and use clause for Opt.
7789         (Restore_SPARK_Mode): New routine.
7790         (Save_SPARK_Mode_And_Set): New routine.
7792 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7794         * exp_util.adb (Is_Aliased): Transient objects
7795         within an expression with actions cannot be considered aliased.
7797 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7799         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
7800         introduce a new list (cleanup actions) for each (transient) scope.
7801         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
7802         N_Block_Statement
7803         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
7804         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
7805         processing for Store_xxx_Actions_In_Scope.
7806         (Build_Cleanup_Statements): Allow for a list of additional
7807         cleanup statements to be passed by the caller.
7808         (Expand_Cleanup_Actions): Take custom cleanup actions associated
7809         with an N_Block_Statement into account.
7810         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
7811         reorganization (refactoring only, no behaviour change).
7812         (Make_Transient_Block): Add assertion to ensure that the current
7813         scope is indeed a block (namely, the entity for the transient
7814         block being constructed syntactically, which has already been
7815         established as a scope).  If cleanup actions are present in the
7816         transient scope, transfer them now to the transient block.
7817         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
7818         called function while it is still present as the name in a call
7819         in the tree. This may not be the case later on if the call is
7820         rewritten into a transient block.
7821         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
7822         inserted after calling a protected operation on a shared passive
7823         protected must be performed in a block finalizer, not just
7824         inserted in the tree, so that they are executed even in case of
7825         a normal (RETURN) or abnormal (exception) transfer of control
7826         outside of the current scope.
7827         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
7828         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
7829         Scope_Stack_Entry reorganization.
7831 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7833         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
7834         call for types that do not have an explicit attribute definition
7835         clause for External_Tag, as their default tag may clash with an
7836         explicit tag defined for some other type.
7838 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
7840         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
7841         controlled function call with multiple actual parameters that
7842         appears in Object.Operation form.
7844 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7846         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
7847         entity flag.
7848         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
7849         External_Tag): No need to set entity flag.
7850         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
7851         Reimplement correctly in terms of Has_Rep_Item.
7853 2014-07-17  Thomas Quinot  <quinot@adacore.com>
7855         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
7856         Start examining the tree at the node passed to
7857         Establish_Transient_Scope (not its parent).
7858         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
7859         The access type for the variable storing the reference to
7860         the call must be declared and frozen prior to establishing a
7861         transient scope.
7862         * exp_ch9.adb: Minor reformatting.
7864 2014-07-17  Pascal Obry  <obry@adacore.com>
7866         * s-os_lib.ads: Minor comment update.
7868 2014-07-17  Tristan Gingold  <gingold@adacore.com>
7870         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
7871         indentation.
7872         * socket.c: Remove #warning to avoid warning.
7873         * expect.c: Indent some preprocessor directives to clarify
7874         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
7875         to remove warnings.
7876         * env.c: Fix indentation.  Port to PikeOS.
7877         * gsocket.h: Port to PikeOS.  Remove #warning.
7878         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
7879         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
7880         of stubbed __gnat_setup_parent_communication.
7881         * adaint.c: Port to PikeOS.  Reindent some preprocessor
7882         directives to clarify nested if.  Fix indentation.  Add missing
7883         ATTRIBUTE_UNUSED.
7885 2014-07-17  Robert Dewar  <dewar@adacore.com>
7887         * sem_attr.adb: Minor reformatting.
7889 2014-07-17  Robert Dewar  <dewar@adacore.com>
7891         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
7893 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
7895         * sem_case.adb (Check_Choice_Set): If the case expression is the
7896         expression in a predicate, do not recheck coverage against itself,
7897         to prevent spurious errors.
7898         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
7899         expression comes from an aspect specification, to prevent spurious
7900         errors when expression is a case expression in a predicate.
7902 2014-07-17  Pascal Obry  <obry@adacore.com>
7904         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
7905         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
7907 2014-07-17  Vincent Celier  <celier@adacore.com>
7909         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
7910         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
7911         the usage for an erroneous invocation of a gnat tool.
7913 2014-07-16  Vincent Celier  <celier@adacore.com>
7915         * gnatls.adb: Get the target parameters only if -nostdinc was
7916         not specified.
7918 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7920         * checks.adb (Insert_Valid_Check): If the expression is a packed
7921         component of a modular type of the right size the data is always
7922         valid. This os particularly useful if the component is part of
7923         a volatile variable.
7925 2014-07-16  Robert Dewar  <dewar@adacore.com>
7927         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
7929 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7931         * exp_ch7.ads: Minor documentation fix.
7933 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7935         * sem_ch3.adb (Find_Type_Name): Diagnose properly
7936         a private extension completion that is an interface definition
7937         with an interface list.
7939 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
7941         * gnatls.adb (Gnatls): Code clean ups.
7943 2014-07-16  Thomas Quinot  <quinot@adacore.com>
7945         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
7946         * sem.adb (Analyze): Handle N_Compound_Statement.
7947         * sprint.adb (Sprint_Node_Actual): Ditto.
7948         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
7949         procedure to handle N_Compound_Statement.
7950         * exp_aggr.adb (Collect_Initialization_Statements):
7951         Use a proper compound statement node, instead of a bogus
7952         expression-with-actions with a NULL statement as its expression,
7953         to wrap collected initialization statements.
7954         * freeze.ads, freeze.adb
7955         (Explode_Initialization_Compound_Statement): New public procedure,
7956         lifted from Freeze_Entity.
7957         (Freeze_Entity): When freezing
7958         an object with captured initialization statements and without
7959         delayed freezing, explode compount statement.
7960         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
7961         case that used to handle bogus EWAs with NULL statement as
7962         the expression.
7963         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
7964         delayed freezing and captured initialization statements, explode
7965         compound statement.
7967 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
7969         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
7971 2014-07-16  Doug Rupp  <rupp@adacore.com>
7973         * s-interr-hwint.adb: Casing error on parameter.
7975 2014-07-16  Pascal Obry  <obry@adacore.com>
7977         * Makefile.rtl: Add g-rewdat.o dependencies in
7978         GNATRTL_NONTASKING_OBJS.
7980 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
7982         * sem_case.adb: Code clean up.
7984 2014-07-16  Vincent Celier  <celier@adacore.com>
7986         * make.adb: Do not read gnat.adc when gnatmake is invoked
7987         with -gnatA.
7989 2014-07-16  Pascal Obry  <obry@adacore.com>
7991         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
7992         implementation of GNAT.Rewrite_Data.
7994 2014-07-16  Vincent Celier  <celier@adacore.com>
7996         * gnatls.adb (Normalize): New function.
7997         (Gnatls): Get the target parameters. On targets other than VMS,
7998         normalize the path names in the source search path, the object search
7999         path and the project search path.
8001 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8003         * sem_case.adb: Avoid self-checking of case expressions in
8004         dynamic predicates.
8006 2014-07-16  Robert Dewar  <dewar@adacore.com>
8008         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
8009         discriminants.
8011 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
8013         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
8015 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
8017         * gnat_ugn.texi: Fix typo.
8019 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8021         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
8022         expression if it is the specification of a subtype predicate:
8023         it will be expanded when the return statement is analyzed, or
8024         when a static predicate is transformed into a static expression
8025         for evaluation by the front-end.
8026         * sem_ch13.adb (Get_RList): If the expression for a static
8027         predicate is a case expression, extract the alternatives of the
8028         branches with a True value to create the required statically
8029         evaluable expression.
8031 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8033         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
8034         expression, not the location of the aspect, for all generated
8035         code, so that in particular the call to raise_assert_failure
8036         gets the sloc of the associated condition.
8037         * exp_ch6.adb
8038         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
8039         Set an explicit End_Label on the handled sequence of statements
8040         for the _Postconditions procedure so that the implicit return
8041         statement does not erroneously get associated with code generated
8042         for the last condition in postconditions.
8044 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8046         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
8047         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
8048         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
8049         -gnatw.Z.
8051 2014-07-16  Robert Dewar  <dewar@adacore.com>
8053         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
8054         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
8055         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
8056         not in Access_Kind.
8057         * par-ch4.adb (At_Start_Of_Attribute): New function
8058         (P_Simple_Expression): Better msg for bad attribute prefix.
8059         * scans.ads: Minor reformatting.
8061 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8063         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
8064         static constant, check that in belongs to the corresponding index
8065         subtype, to produce the proer warning when expansion is disabled.
8067 2014-07-16  Robert Dewar  <dewar@adacore.com>
8069         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
8070         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
8071         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
8072         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
8073         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
8074         -gnatw.z/-gnatw.Z
8075         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
8076         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
8077         reformatting.
8079 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8081         * exp_ch7.adb (Process_Declarations): Reinstate the check on
8082         a hook object to ensure that the related transient declaration
8083         is finalizable.
8084         * exp_util.adb (Is_Aliased): Do not consider expresison with
8085         actions as a special context.
8086         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
8087         ensure that the related transient declaration is finalizable.
8089 2014-07-16  Robert Dewar  <dewar@adacore.com>
8091         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
8092         * snames.ads-tmpl: Add Allocation_Check to list of check names.
8093         * types.ads: Add Allocation_Check to list of check names.
8095 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8097         * sem_util.adb (Enter_Name): replace bogus test for presence of
8098         Corresponding_Remote_Type with correct test on Ekind.
8099         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
8100         of calls to Corresponding_ Remote_Type (documentation fix).
8102 2014-07-16  Robert Dewar  <dewar@adacore.com>
8104         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
8105         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
8106         where it applies.
8107         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
8108         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
8110 2014-07-16  Robert Dewar  <dewar@adacore.com>
8112         * gnat_ugn.texi: Document binder switch -Ra.
8113         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
8114         (List_Closure_All).
8115         * opt.ads (List_Closure_All): New switch.
8116         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
8117         List_Closure_All.
8119 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
8121         * gnat_rm.texi: Minor edits, to make case consistent in names
8122         of types and fields.
8124 2014-07-16  Robert Dewar  <dewar@adacore.com>
8126         * gnat_rm.texi: Document erroneous mixing of thin pointers and
8127         unrestricted access
8128         * gnat_ugn.texi: Add note on size of access types about thin
8129         pointers and the use of attribute Unrestricted_Access.
8131 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8133         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
8134         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
8135         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
8136         machinery to detect tampering on bounded vectors.
8138 2014-07-16  Robert Dewar  <dewar@adacore.com>
8140         * gnat_rm.texi: Document that leading/trailing asterisks are
8141         now implied for the pattern match string for pragma Warnings
8142         and Warning_As_Error.
8143         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
8144         (Analyze_Pragma, case Warning_As_Error): Call
8145         Acquire_Warning_Match_String.
8146         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
8148 2014-07-16  Bob Duff  <duff@adacore.com>
8150         * gnat_ugn.texi: Document need for project file
8151         for --incremental switch for gnat2xml.
8153 2014-07-16  Robert Dewar  <dewar@adacore.com>
8155         * gnat_rm.texi: Fix example of non-packable components in packed
8156         records section.
8158 2014-07-16  Robert Dewar  <dewar@adacore.com>
8160         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
8161         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
8162         upper case in exception messages.
8164 2014-07-16  Robert Dewar  <dewar@adacore.com>
8166         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
8167         is renamed Has_Same_Storage.
8168         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
8169         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
8170         descriptions).
8172 2014-07-16  Robert Dewar  <dewar@adacore.com>
8174         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
8175         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
8177 2014-07-16  Robert Dewar  <dewar@adacore.com>
8179         * gnat_ugn.texi: Add note that integrated
8180         preprocessing cannot be applied to configuration pragma files.
8182 2014-07-16  Yannick Moy  <moy@adacore.com>
8184         * sem_attr.adb (Analyze_Attribute/cases Pred
8185         and Succ): Always enable range check on fixed-point types if
8186         not suppressed for the type.
8188 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8190         * sem_util.adb (State_Has_Enabled_Property):
8191         Account for an external property denoted by an others choice.
8193 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8195         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
8196         * exp_ch7.adb (Process_Declarations): There is no need to check
8197         that a transient object being hooked is controlled as it would
8198         not have been hooked in the first place.
8199         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
8200         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
8201         (Is_Aliased): A renaming of a transient controlled object is
8202         not considered aliasing when it occurs within an expression
8203         with actions.
8204         (Requires_Cleanup_Actions): There is no need to
8205         check that a transient object being hooked is controlled as it
8206         would not have been hooked in the first place.
8207         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
8209 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
8211         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
8212         the outer level of routine Analyze_Aspect_Specifications. Ensure
8213         that the corresponding pragmas of aspects Initial_Condition and
8214         Initializes are inserted after pragma SPARK_Mode.
8216 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8218         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
8219         properly a choice list with more than one choice, where each
8220         is an aggregate denoting a sequence of array indices for a
8221         multidimentional array. For SPARK use.
8223 2014-07-16  Vadim Godunko  <godunko@adacore.com>
8225         * a-coinho-shared.adb (Adjust): Create
8226         copy of internal shared object and element when source container
8227         is locked.
8228         (Copy): Likewise.
8229         (Query_Element): Likewise.
8230         (Update_Element): Likewise.
8231         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
8232         to get reference for empty holder.
8233         (Reference): Likewise.
8235 2014-07-16  Thomas Quinot  <quinot@adacore.com>
8237         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
8238         from Process_Transient_Oject.
8239         * exp_ch4.ads: Ditto.
8240         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
8241         declaration as an action on the topmost enclosing expression,
8242         not on a possibly conditional subexpreession.
8244 2014-07-16  Vadim Godunko  <godunko@adacore.com>
8246         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
8247         Fix parameter mode of Update_Element.
8249 2014-07-16  Robert Dewar  <dewar@adacore.com>
8251         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
8252         reformatting.
8254 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8256         * a-cohase.ads: Type Iterator must be controlled, so that the
8257         tampering bit is properly set through an iteration.
8258         * a-cohase.adb: Add Finalize operation for type Iterator.
8260 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8262         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
8263         tampering checks.
8265 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
8267         * a-coinho-shared.adb: Fix spurious accessibility check.
8269 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
8271         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
8273 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8275         PR ada/61505
8276         * gnat_rm.texi: Fix errors with makeinfo 5.1.
8278 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
8280         PR ada/61505
8281         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
8283 2014-06-13  Yannick Moy  <moy@adacore.com>
8285         * exp_attr.adb: Fix typo in comment.
8286         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
8287         checking in GNATprove_Mode.
8289 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8291         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
8293 2014-06-13  Robert Dewar  <dewar@adacore.com>
8295         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
8296         reformatting.
8298 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8300         * sem_prag.adb (Analyze_Pragma): Add local
8301         variable Missing_Parentheses. Emit an error when a state
8302         declaration with options appears without parentheses. Add a
8303         guard to prevent a bogus error when a state declaration may be
8304         interpreted as an option if a previous declaration with options
8305         was not parenthesized.
8307 2014-06-13  Robert Dewar  <dewar@adacore.com>
8309         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
8310         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
8311         * checks.ads (Alignment_Warnings_Record): New type.
8312         (Alignment_Warnings): New table
8313         (Validate_Alignment_Check_Warnings): New procedure.
8314         * errout.adb (Delete_Warning_And_Continuations): New procedure
8315         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
8316         Warnings_Treated_As_Errors (Finalize): Minor reformatting
8317         * errout.ads (Warning_Msg): New variable
8318         (Delete_Warning_And_Continuations): New procedure
8319         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
8320         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
8322 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8324         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
8326 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8328         * errout.adb (SPARK_Msg_N): New routine.
8329         (SPARK_Msg_NE): New routine.
8330         * errout.ads Add a section on SPARK-related error routines.
8331         (SPARK_Msg_N): New routine.
8332         (SPARK_Msg_NE): New routine.
8333         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
8334         pragma Abstract_State is always inserted after SPARK_Mode.
8335         (Insert_After_SPARK_Mode): New routine.
8336         * sem_prag.adb (Analyze_Abstract_State,
8337         Analyze_Constituent, Analyze_External_Property,
8338         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
8339         Analyze_Global_List, Analyze_Initialization_Item,
8340         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
8341         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
8342         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
8343         Analyze_Refined_Global_In_Decl_Part,
8344         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
8345         Check_Aspect_Specification_Order, Check_Constituent_Usage,
8346         Check_Declaration_Order, Check_Dependency_Clause,
8347         Check_Duplicate_Mode, Check_Duplicate_Option,
8348         Check_Duplicate_Property, Check_External_Properties,
8349         Check_External_Property, Check_Function_Return,
8350         Check_Matching_Constituent, Check_Matching_State,
8351         Check_Mode_Restriction_In_Enclosing_Context,
8352         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
8353         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
8354         Has_Extra_Parentheses, Inconsistent_Mode_Error,
8355         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
8356         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
8357         Report_Unrefined_States, Report_Unused_Constituents,
8358         Report_Unused_States, Role_Error, Usage_Error):
8359         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
8360         to report semantic errors only when SPARK_Mode is on.
8361         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
8362         pragma Depends explicitly, this is now done by the analysis.
8363         (Analyze_Global_In_Decl_List): Do not check the syntax of
8364         pragma Global explicitly, this is now done by the analysis.
8365         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
8366         pragma Initializes explicitly, this is now done by the analysis.
8367         (Analyze_Part_Of): Do not check the syntax of the encapsulating
8368         state, this is now done by the analysis.
8369         (Analyze_Pragma): Do
8370         not check the syntax of a state declaration, this is now done
8371         by the analysis.
8372         (Analyze_Refined_Depends_In_Decl_Part): Do not
8373         check the syntax of pragma Refined_Depends explicitly, this is now
8374         done by the analysis.
8375         (Analyze_Refined_Global_In_Decl_Part): Do
8376         not check the syntax of pragma Refined_Global explicitly, this is
8377         now done by the analysis.
8378         (Analyze_Refined_State_In_Decl_Part):
8379         Do not check the syntax of pragma Refined_State explicitly, this
8380         is now done by the analysis.
8381         (Check_Dependence_List_Syntax): Removed.
8382         (Check_Global_List_Syntax): Removed.
8383         (Check_Initialization_List_Syntax): Removed.
8384         (Check_Item_Syntax): Removed.
8385         (Check_Missing_Part_Of): Do not consider items from an instance.
8386         (Check_Refinement_List_Syntax): Removed.
8387         (Check_State_Declaration_Syntax): Removed.
8388         (Collect_Global_List): Do not raise Program_Error when the input is
8389         malformed.
8390         (Process_Global_List): Do not raise Program_Error when the input
8391         is malformed.
8392         * sem_ch13.adb: Minor reformatting.
8394 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8396         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
8397         that is an interface definition with an interface list.
8398         (Process_Full_View): Move error message on missmatched interfaces
8399         between views to the declaration of full view, for clarity.
8400         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
8401         for clarity.
8403 2014-06-13  Robert Dewar  <dewar@adacore.com>
8405         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
8406         reason to Overflow.
8408 2014-06-13  Robert Dewar  <dewar@adacore.com>
8410         * makeutl.adb: Minor reformatting.
8412 2014-06-13  Gail Schenker  <schenker@adacore.com>
8414         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
8415         associated flag (d.z), no longer needed.
8417 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8419         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
8420         Export aspects, do not check whether a corresponding Convention
8421         aspect has been specified. Convention is optional in Ada2012,
8422         and defaults to Convention_Ada.
8424 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
8426         * checks.adb (Apply_Address_Clause_Check): Only issue the new
8427         warning if the propagation warning is issued.
8429 2014-06-13  Thomas Quinot  <quinot@adacore.com>
8431         * exp_ch4.adb: Minor reformatting.
8433 2014-06-13  Robert Dewar  <dewar@adacore.com>
8435         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
8436         Handle float range check case (Expand_N_Attribute_Reference,
8437         case Succ): Handle float range check case.
8438         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
8439         range check case.
8441 2014-06-13  Vincent Celier  <celier@adacore.com>
8443         * makeutl.ads (Compute_Builder_Switches): Change name of
8444         parameter Root_Environment to Env.
8445         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
8446         Env parameter of procedure Get_Or_Create_Configuration_File.
8447         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
8448         of new parameter Env.
8449         * prj-conf.ads (Locate_Runtime): New parameter Env of type
8450         Prj.Tree.Environment.
8452 2014-06-13  Robert Dewar  <dewar@adacore.com>
8454         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
8456 2014-06-13  Robert Dewar  <dewar@adacore.com>
8458         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
8459         reformatting.
8460         * sem_attr.adb: Minor code reformatting and simplification.
8461         * checks.adb: Fix minor typo.
8463 2014-06-13  Emmanuel Briot  <briot@adacore.com>
8465         * g-comlin.adb (Get_Argument): fix expansion
8466         of command line arguments (e.g. "*.adb") when using a custom
8467         parser. The parser was not passed to the recursive call, and
8468         thus we were trying to do the expansion on the default command
8469         line parser.
8471 2014-06-13  Thomas Quinot  <quinot@adacore.com>
8473         * exp_ch9.adb: Minor reformatting.
8475 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8477         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
8478         To determine whether the attribute should be expanded, examine
8479         whether the enclosing postcondition pragma is to be checked,
8480         rather than using the internal flag Assertions_Enabled.
8482 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
8484         * gnat_rm.texi: Minor fixes.
8485         * gnat_ugn.texi: Added a missing "@itemize".
8487 2014-06-13  Robert Dewar  <dewar@adacore.com>
8489         * debug.adb: Remove -gnatd.1 flag documentation.
8490         * layout.adb (Layout_Type): Remove special handling of size
8491         for anonymous access type.
8492         * sem_ch3.adb (Replace_Type): Remove special handling of size
8493         for anonymous access type.
8495 2014-06-13  Robert Dewar  <dewar@adacore.com>
8497         * debug.adb: Document debug flag -gnatd.1.
8498         * layout.adb (Layout_Type): Size change for anonymous access
8499         types under -gnatd.1.
8500         * sem_ch3.adb (Replace_Type): Size change for anonymous access
8501         types under -gnatd.1.
8503 2014-06-13  Robert Dewar  <dewar@adacore.com>
8505         * layout.adb (Layout_Type): Anonymous access types designating
8506         unconstrained arrays are always thin pointers.
8507         * sem_ch3.adb (Replace_Type): Anonymous access types designating
8508         unconstrained arrays are always thin pointers.
8510 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8512         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
8513         to resolve the prefix of an attribute that is an entity name
8514         and may be a parameterless call.  Minor code reorganization.
8516 2014-06-13  Robert Dewar  <dewar@adacore.com>
8518         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
8519         Removed.
8520         * opt.ads (Compiler_Unit): New flag.
8521         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
8522         for null statement sequence (not allowed in compiler unit).
8523         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
8524         parsing.
8525         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
8526         calling sequence.
8527         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
8528         Check_Compiler_Unit.
8529         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
8530         Check_Compiler_Unit (this construct is not allowed in compiler
8531         units).
8532         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
8533         Set Opt.Compiler_Unit.
8535 2014-06-13  Geert Bosch  <bosch@adacore.com>
8537         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
8538         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
8539         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
8541 2014-06-13  Robert Dewar  <dewar@adacore.com>
8543         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
8545 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8547         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
8548         types in SPARK as it is poorly placed and poorly formulated. The
8549         check was flagging ALL volatile entities as illegal in SPARK.
8550         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
8551         types as illegal in SPARK.
8553 2014-06-13  Robert Dewar  <dewar@adacore.com>
8555         * sem_cat.adb: Minor reformatting.
8557 2014-06-13  Yannick Moy  <moy@adacore.com>
8559         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
8561 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
8563         * gnat_rm.texi: Add detail on SPARK_05 restriction.
8565 2014-06-13  Bob Duff  <duff@adacore.com>
8567         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
8568         Add assertions requiring the secondary stack to be initialized.
8569         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
8570         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
8571         secondary stack is initialized before calling Init_Tasking_Soft_Links,
8572         by adding pragmas Elaborate_Body.
8574 2014-06-13  Thomas Quinot  <quinot@adacore.com>
8576         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
8577         kludge disabling new legality check.
8579 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8581         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
8582         volatile types.
8583         (Freeze_Type): Volatile types are now illegal in SPARK.
8585 2014-06-13  Robert Dewar  <dewar@adacore.com>
8587         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
8588         * gnat_rm.texi: Document aspect Thread_Local_Storage.
8590 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8592         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
8593         value is a temporary that renames an aggregate is legal in a
8594         preelaborated unit. Illegalities, if any will be detected in
8595         the aggregate components.
8597 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
8599         * einfo.ads: Minor reformatting an comment expansion.
8601 2014-06-13  Robert Dewar  <dewar@adacore.com>
8603         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
8604         Tbuild.
8605         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
8606         Back_End.
8607         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
8608         * sem_warn.adb: Minor reformatting.
8610 2014-06-13  Doug Rupp  <rupp@adacore.com>
8612         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
8613         files with rfm=udf.
8615 2014-06-13  Yannick Moy  <moy@adacore.com>
8617         * sem_warn.adb (Check_Unset_References): Take
8618         case of Refined_Post into account in Within_Postcondition check.
8620 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
8622         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
8623         SPARK.
8625 2014-06-13  Yannick Moy  <moy@adacore.com>
8627         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
8628         Aspect_Export): Consider that variables may be set outside the program.
8630 2014-06-13  Robert Dewar  <dewar@adacore.com>
8632         * back_end.adb (Make_Id): New function.
8633         (Make_SC): New function.
8634         (Set_RND): New procedure.
8635         * back_end.ads (Make_Id): New function.
8636         (Make_SC): New function.
8637         (Set_RND): New procedure.
8638         * einfo.ads: Minor comment updates.
8639         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
8640         * gnat1drv.adb (Gnat1drv): New calling sequence for
8641         Get_Target_Parameters.
8642         (Gnat1drv): Move Atree.Initialize here from Frontend.
8643         * targparm.adb (Get_Target_Parameters): New calling
8644         sequence (Get_Target_Parameters): Handle pragma Restriction
8645         (No_Dependence,..)
8646         * targparm.ads (Get_Target_Parameters): New calling sequence.
8648 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
8650         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
8651         loop if the pragma does not come from source, so that an implicit
8652         pragma Import only applies to the first declaration, avoiding
8653         possible conflicts with earlier explicit and implicit declarations
8654         due to multiple Provide_Shift_Operators pragmas.
8655         (Set_Imported): Remove previous fix that bypassed pragma duplication
8656         error.
8657         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
8658         of Provide_Shift_Operators.
8660 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
8662         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
8663         string pointer directly to set_decl_section_name.
8665 2014-06-11  Robert Dewar  <dewar@adacore.com>
8667         * sem_ch13.adb: Minor reformatting.
8669 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8671         * sem_prag.adb (Check_Clause_Syntax): Add new
8672         local variable Outputs. Account for the case where multiple
8673         output items appear as an aggregate.
8675 2014-06-11  Robert Dewar  <dewar@adacore.com>
8677         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8678         with ?j? not ??.
8680 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8682         * einfo.ads: Minor reformatting.
8684 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8686         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8687         new variable First_Node. Update the position after all insertions have
8688         taken place to First_Node.
8690 2014-06-11  Robert Dewar  <dewar@adacore.com>
8692         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8693         * layout.adb (Layout_Type): Remove test of -gnatd.1.
8695 2014-06-11  Robert Dewar  <dewar@adacore.com>
8697         * sem_ch13.adb: Minor reformatting.
8699 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8701         * sem_prag.adb (Check_Clause_Syntax): Add new
8702         local variable Outputs. Account for the case where multiple
8703         output items appear as an aggregate.
8705 2014-06-11  Robert Dewar  <dewar@adacore.com>
8707         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
8708         with ?j? not ??.
8710 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8712         * einfo.ads: Minor reformatting.
8714 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8716         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
8717         new variable First_Node. Update the position after all insertions have
8718         taken place to First_Node.
8720 2014-06-11  Robert Dewar  <dewar@adacore.com>
8722         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
8723         * layout.adb (Layout_Type): Remove test of -gnatd.1.
8725 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8727         * freeze.ads: Minor reformatting.
8728         * checks.adb (Determine_Range): Do not attempt to determine
8729         the range of a deferred constant whose full view has not been
8730         seen yet.
8731         * sem_res.adb (Resolve): Remove undesirable guard against
8732         resolving expressions from expression functions.
8734 2014-06-11  Robert Dewar  <dewar@adacore.com>
8736         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
8737         access types.
8738         * layout.adb (Layout_Type): Make anonymous access types for
8739         subprogram formal types and return types always thin. For now
8740         only enabled if -gnatd.1 set.
8742 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8744         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8745         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
8746         subprogram must be a null procedure.
8748 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8750         * sem_prag.adb (Analyze_Input_Item): Allow formal
8751         parameters to appear as input_items in an initialization_list
8752         of pragma Initializes. Encapsulation now applies to states and
8753         variables only (as it should). Add RM references to key errors.
8754         * sem_prag.adb (Set_Imported): Suppress errors
8755         about preceding Imports when the pragma does not come from source,
8756         which can happen through use of pragma Provide_Shift_Operators.
8758 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8760         * sem_ch3.adb: Minor reformatting.
8761         * einfo.ads (Full_View): Minor comment update.
8763 2014-06-11  Robert Dewar  <dewar@adacore.com>
8765         * einfo.adb (Is_Independent): New flag.
8766         * einfo.ads (Is_Independent): New flag.
8767         (Has_Independent_Components): Clean up and fix comments.
8768         * sem_prag.adb (Fix_Error): Deal with changing argument
8769         [of] to entity [for].
8770         (Analyze_Pragma, case Independent): Set Is_Independent flag
8771         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
8772         in all components of specified record.
8774 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8776         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
8777         Set proper Etype on bounds of dummy type created for analysis
8778         of the generic.
8780 2014-06-11  Robert Dewar  <dewar@adacore.com>
8782         * debug.adb: Minor comment fix (add missing section of dot
8783         numeric flags).
8785 2014-06-11  Robert Dewar  <dewar@adacore.com>
8787         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
8788         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
8789         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
8790         * errout.adb (Output_Messages): Avoid duplicate output for
8791         library level instance.
8792         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
8793         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
8794         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
8795         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
8796         accomodate largest modulus value.
8797         * gnat_ugn.texi: Minor updates.
8799 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8801         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
8802         load body of generic package or its parent, if body is optional
8803         and the unit does not require a body.
8805 2014-06-11  Robert Dewar  <dewar@adacore.com>
8807         * gnat_rm.texi: Document System.Unsigned_Types.
8808         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
8809         * s-unstyp.ads: Update comments (this is now user available unit).
8811 2014-06-11  Robert Dewar  <dewar@adacore.com>
8813         * make.adb, sem_res.adb: Minor reformatting.
8815 2014-06-11  Thomas Quinot  <quinot@adacore.com>
8817         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
8818         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
8819         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
8820         Preelaborate_05 to just Preelaborate in runtime units, and similarly
8821         change Pure_05 to just Pure.
8823 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8825         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
8826         analysis if error has been posted on subprogram body.
8828 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8830         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
8831         rule given in RM 13.1 (8/1) for operational attributes to stream
8832         attributes: the attribute must apply to a first subtype. Fixes
8833         missing errors in ACATS test bdd2004.
8835 2014-06-11  Robert Dewar  <dewar@adacore.com>
8837         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
8838         record type if restriction No_Implicit_Conditionals is active.
8839         (Expand_N_Object_Declaration): Don't allow default initialization
8840         for variant record type if restriction No_Implicit_Condition is active.
8841         (Build_Variant_Record_Equality): Don't build for variant
8842         record type if restriction No_Implicit_Conditionals is active.
8843         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
8844         No_Implicit_Conditionals.
8845         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
8847 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
8849         * i-cstrin.ads: Update comments.
8851 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8853         * sem_res.adb (Resolve_Selected_Component): Handle properly a
8854         selected component whose prefix is overloaded, when none of the
8855         interpretations matches the expected type.
8857 2014-06-11  Bob Duff  <duff@adacore.com>
8859         * make.adb (Wait_For_Available_Slot): Give a more
8860         informative error message; if the ALI file is not found, print
8861         the full path of what it's looking for.
8863 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
8865         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
8866         option to specify the result file encoding.
8868 2014-06-11  Robert Dewar  <dewar@adacore.com>
8870         * errout.ads, sem_ch12.adb: Minor reformatting.
8871         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
8872         * lib-xref.adb: Minor reformatting.
8873         * restrict.adb: Minor code reorganization (put routines in
8874         alpha order).
8876 2014-06-11  Yannick Moy  <moy@adacore.com>
8878         * einfo.ads: Minor typo in comment
8880 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8882         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
8883         formal private types and private type extensions, to indicate
8884         variable in a generic unit whose uninitialized use suggest that
8885         actual type should be fully initialized.
8886         Needs_Initialized_Actual:  removed, functionaity replaced by
8887         the above.
8888         * lib-xref.adb (Generate_Reference): Generate a reference for
8889         variables of a formal type when the unit is not the main unit,
8890         to enable appropriate warnings in an instance.
8891         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
8892         of variable in a generic unit that suggests that actual type
8893         should be full initialized.
8894         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
8895         and do not emot warning, which now only appears in an instance.
8897 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
8899         * gnat_ugn.texi: Fix minor typo.
8901 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
8903         * sem_ch3.adb Add with and use clause for Sem_Ch10.
8904         (Analyze_Declarations): Code reformatting. Analyze the contract
8905         of a subprogram body stub at the end of the declarative region.
8906         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
8907         now a variable. Do not process the body if its contract is not
8908         available. Account for subprogram body stubs when extracting
8909         the corresponding spec.
8910         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
8911         on usage.
8912         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
8913         New routine.
8914         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
8915         Account for subprogram body stubs when extracting the
8916         corresponding spec.
8917         (Analyze_Global_In_Decl_List):
8918         Account for subprogram body stubs when extracting the
8919         corresponding spec.
8920         (Analyze_Refined_Depends_In_Decl_Part):
8921         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
8922         of the related body. Spec_Is now a variable. Account for
8923         subprogram body stubs when extracting the corresponding spec.
8924         (Analyze_Refined_Global_In_Decl_Part): Use
8925         Find_Related_Subprogram_Or_Body to retrieve the declaration
8926         of the related body. Spec_Is now a variable. Account for
8927         subprogram body stubs when extracting the corresponding spec.
8928         (Collect_Subprogram_Inputs_Output): Account for subprogram body
8929         stubs when extracting the corresponding spec.
8931 2014-06-11  Vincent Celier  <celier@adacore.com>
8933         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
8934         -lgnarl or -lgnat.
8936 2014-06-11  Robert Dewar  <dewar@adacore.com>
8938         * debug.adb: Add debug flag -gnatd.q.
8939         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
8940         -gnatd.q set.
8941         * styleg.adb (Check_Xtra_Parens): Message should be a style
8942         message.
8943         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
8944         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
8945         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
8946         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
8948 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
8950         * gnat_rm.texi: Revised chapter on Implementation Defined
8951         Characteristics.
8953 2014-06-11  Geert Bosch  <bosch@adacore.com>
8955         * s-exctab.adb: avoid race conditions in exception registration.
8957 2014-06-11  Robert Dewar  <dewar@adacore.com>
8959         * errout.adb (Warn_Insertion): New function.
8960         (Error_Msg): Use Warn_Insertion and Prescan_Message.
8961         (Error_Msg_Internal): Set Info field of error object.
8962         (Error_Msg_NEL): Use Prescan_Message.
8963         (Set_Msg_Text): Don't store info: at start of message.
8964         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
8965         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
8966         * errout.ads: Document new ?$? and >$> insertion sequences
8967         Document use of "(style)" and "info: "
8968         * erroutc.adb (dmsg): Print several missing fields
8969         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
8970         Deal with new tagging of info messages
8971         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
8972         Add field Info (Prescan_Message): New procedure, this procedure
8973         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
8974         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
8975         sem_elab.adb: Follow new rules for info message (info belongs
8976         only at the start of a message, and only in the first message,
8977         not in any of the continuations).
8978         * gnat_ugn.texi: Document full set of warning tags.
8980 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
8982         * sem_util.adb: Minor typo fix.
8984 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
8986         * sem_warn.adb (Check_References): Do not emit spurious warnings
8987         on uninitialzed variable of a formal private type if variable
8988         is not read.
8990 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
8992         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
8993         set_decl_section_name accessor.
8995 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
8997         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
8998         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
8999         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
9001 2014-05-21  Robert Dewar  <dewar@adacore.com>
9003         * layout.adb: Minor reformatting.
9004         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
9005         dummy procedure ip.
9007 2014-05-21  Robert Dewar  <dewar@adacore.com>
9009         * restrict.ads (Implementation_Restriction): Add entry for
9010         No_Fixed_IO.
9011         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
9012         Ada.[Wide_[Wide_]Text_IO.
9013         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
9014         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
9015         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
9016         Wide_Wide_Value if restriction No_Fixed_IO is set.
9017         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
9019 2014-05-21  Robert Dewar  <dewar@adacore.com>
9021         * gnatcmd.adb: Minor error msg changes (no upper case letter
9022         at start).
9023         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
9024         reformatting.
9026 2014-05-21  Robert Dewar  <dewar@adacore.com>
9028         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
9029         via generic formals.
9030         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
9031         -gnatd.G is set.
9033 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9035         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
9036         more accurately describe that this subprogram needs to come into
9037         play also in cases where no byte swapping is involved, because
9038         it also takes care of some required shifts (left-justification
9039         of values).
9041 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9043         * freeze.adb (Check_Component_Storage_Order): Indicate whether
9044         a Scalar_Storage_Order attribute definition is present for the
9045         component's type.
9046         (Freeze_Record_Type): Suppress junk warnings
9047         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
9048         definitions.
9050 2014-05-21  Robert Dewar  <dewar@adacore.com>
9052         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
9053         to Kill_Elaboration_Checks.
9055 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9057         * layout.adb (Assoc_Add): Suppress the optimization of the (E
9058         - C1) + C2 case, when the expression type is unsigned and C1 <
9059         C2, to avoid creating a negative literal when folding.
9061 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9063         * freeze.adb (Freeze_Record_Type): Update the use of
9064         Is_SPARK_Volatile.
9065         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
9066         Is_SPARK_Volatile.
9067         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
9068         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
9069         of Is_SPARK_Volatile.
9070         (Analyze_Loop_Parameter_Specification):
9071         Update the use of Is_SPARK_Volatile.
9072         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
9073         formal parameter when its type is volatile.
9074         * sem_prag.adb (Analyze_Global_Item): Update the use of
9075         Is_SPARK_Volatile.
9076         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
9077         determines whether an entity is a volatile source SPARK object.
9078         * sem_util.adb (Has_Enabled_Property): Accout for external
9079         properties being set on objects other than abstract states
9080         and variables. An example would be a formal parameter.
9081         (Is_SPARK_Volatile): New routine.
9082         (Is_SPARK_Volatile_Object):
9083         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
9084         when checking entities and/or types.
9085         * sem_util.ads (Is_SPARK_Volatile): New routine.
9087 2014-05-21  Robert Dewar  <dewar@adacore.com>
9089         * sem_warn.adb: Minor fix to warning messages (use ?? instead
9090         of ?).
9092 2014-05-21  Vincent Celier  <celier@adacore.com>
9094         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
9095         switch --version and --help.
9097 2014-05-21  Robert Dewar  <dewar@adacore.com>
9099         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
9101 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9103         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
9104         iterator variable when the domain of iteration is a formal
9105         container and this is an element iterator.
9107 2014-05-21  Bob Duff  <duff@adacore.com>
9109         * sem_ch12.adb: Minor reformatting.
9111 2014-05-21  Robert Dewar  <dewar@adacore.com>
9113         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
9115 2014-05-21  Robert Dewar  <dewar@adacore.com>
9117         * sem_elab.adb: Minor reformatting.
9118         * s-taprop.ads: Minor comment fix.
9119         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
9120         Kill_Elaboration_Checks.
9121         * errout.adb, erroutc.adb: Minor reformatting.
9123 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9125         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
9126         component. No byte swapping occurs, but this procedure also takes
9127         care of appropriately justifying the argument.
9129 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9131         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
9132         New routine.
9133         (Analyze_Subprogram_Body_Helper): Move the
9134         analysis of aspect specifications and the processing of the
9135         subprogram body contract after inlining has taken place.
9136         (Diagnose_Misplaced_Aspect_Specifications): Removed.
9138 2014-05-21  Javier Miranda  <miranda@adacore.com>
9140         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
9142 2014-05-21  Robert Dewar  <dewar@adacore.com>
9144         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
9145         continuations any more.
9147 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9149         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
9150         present in formal_Private_Definitions and on private extension
9151         declarations of a formal derived type. Set when the use of the
9152         formal type in a generic suggests that the actual should be a
9153         fully initialized type.
9154         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
9155         to indicate that an entity of a generic type has default
9156         initialization, and that the corresponing actual type in any
9157         subsequent instantiation should be fully initialized.
9158         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
9159         to emit a warning if the actual for a generic type on which
9160         Needs_Initialized_Actual is set is not a fully initialized type.
9162 2014-05-21  Robert Dewar  <dewar@adacore.com>
9164         * sem_elab.adb, prj-dect.adb: Minor reformatting.
9166 2014-05-21  Robert Dewar  <dewar@adacore.com>
9168         * erroutc.ads: Minor comment addition.
9170 2014-05-21  Robert Dewar  <dewar@adacore.com>
9172         * errout.ads: Add documentation for use of >*> tag.
9173         * restrict.adb: Make sure we use >*> tag for restriction warnings.
9175 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9177         * debug.adb: Add case of illegal overriding_indicator for a
9178         protected subprogram body to description of -gnatd.E switch.
9179         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
9180         for cases of giving overriding_indicators on protected subprogram
9181         bodies, but change this to a warning if -gnatd.E is enabled. No
9182         longer give a style warning about missing indicators on protected
9183         subprogram bodies.
9185 2014-05-21  Robert Dewar  <dewar@adacore.com>
9187         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
9188         sem_elab.ads: Minor reformatting.
9189         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
9190         parameter optional.
9192 2014-05-21  Pascal Obry  <obry@adacore.com>
9194         * prj-dect.adb: Allow package Install in aggregate project.
9196 2014-05-21  Robert Dewar  <dewar@adacore.com>
9198         * sem_ch13.adb (Analyze_Aspect_Specifications):
9199         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
9200         * sem_prag.adb: Minor comment improvements.
9202 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9204         * sem_ch12.adb (Install_Body): When checking whether freezing of
9205         instantiation must be delayed, verify that the common enclosing
9206         subprogram to generic and instance is in fact an overloadable
9207         entity.
9209 2014-05-21  Vincent Celier  <celier@adacore.com>
9211         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
9212         mains with the same name and fail if there is more than one.
9213         * prj.ads, prj.adb (Find_All_Sources): New function
9215 2014-05-21  Robert Dewar  <dewar@adacore.com>
9217         * sem_ch13.adb: Minor reformatting.
9218         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
9219         * sem_prag.adb: Minor error message improvement.
9221 2014-05-21  Yannick Moy  <moy@adacore.com>
9223         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
9224         (Enclosing_Subprogram_Or_Package): Only return a library-level
9225         package.
9227 2014-05-21  Javier Miranda  <miranda@adacore.com>
9229         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
9230         to the full view of the parent type when processing a derived type
9231         which is the full view of a private type not defined in a generic
9232         unit which is derived from a private type with discriminants
9233         whose full view is a non-tagged record type.
9235 2014-05-21  Javier Miranda  <miranda@adacore.com>
9237         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
9238         Complete previous patch.
9240 2014-05-21  Thomas Quinot  <quinot@adacore.com>
9242         PR ada/9535
9243         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
9244         Provide a behaviour more consistent with underlying datagram
9245         socket: do not attempt to loop over Send_Socket/Receive_Socket
9246         iterating along the buffer.
9248 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
9250         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
9251         or a tagged type is not labelled as volatile. Ensure that a
9252         non-volatile type has no volatile components.
9253         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
9254         Obj_Typ. Code reformatting.  Ensure that a discriminated or
9255         tagged object is not labelled as volatile.
9256         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
9257         pragma Volatile applies to a full type declaration or an object
9258         declaration when SPARK mode is on.
9260 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
9262         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
9263         providing options needed for compiling the argument source for
9264         the situation when a project file can be used as a tool parameter.
9266 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
9268         * gnat_rm.texi: Minor typo fix.
9270 2014-05-21  Robert Dewar  <dewar@adacore.com>
9272         * stand.adb (Tree_Read): Read missing entities.
9273         (Tree_Write): Write missing entities.
9275 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
9277         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
9278         section in gnatmetric chapter.
9280 2014-05-21  Robert Dewar  <dewar@adacore.com>
9282         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
9283         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
9284         post-call copy write back (see detailed comment in code).
9285         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
9286         Exp_Ch6.
9287         * tbuild.ads: Minor reformatting.
9289 2014-05-21  Robert Dewar  <dewar@adacore.com>
9291         * stand.ads: Add warning about adding new entities and
9292         Tree_Read/Tree_Write.
9294 2014-05-21  Robert Dewar  <dewar@adacore.com>
9296         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
9297         references to restricted entities within the units in which they
9298         are declared.
9300 2014-05-21  Robert Dewar  <dewar@adacore.com>
9302         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
9303         simplify the needed test, and also deal with failure to catch
9304         situations with non-standard names.
9305         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
9306         (Source_File_Is_Subunit): Removed, no longer used.
9308 2014-05-21  Javier Miranda  <miranda@adacore.com>
9310         * exp_ch4.adb
9311         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
9312         renaming of an access to interface object there is no need to
9313         generate extra code to reference the tag.
9315 2014-05-21  Robert Dewar  <dewar@adacore.com>
9317         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
9318         Warnings (Off, string).
9320 2014-05-21  Robert Dewar  <dewar@adacore.com>
9322         * osint.adb: Fix three error messages to say invalid instead
9323         of erroneous.
9324         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
9325         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
9326         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
9328 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9330         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
9331         sem_ch9.ads: Move discriminant manipulation routines for analysis of
9332         aspect specifications from sem_ch9 to sem_ch13, where they belong.
9334 2014-05-21  Robert Dewar  <dewar@adacore.com>
9336         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
9337         Clearly document -gnatyg (GNAT style switches).
9338         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
9339         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
9340         available for VMS after all.
9341         * warnsw.adb: Reorganize to eliminate duplicated code
9342         (Restore_Warnings): Add a couple of missing entries
9343         (Save_Warnings): Add a couple of missing entries.
9344         * warnsw.ads: Add missing entries to Warning_Record (not clear
9345         what the impact is).
9347 2014-05-21  Robert Dewar  <dewar@adacore.com>
9349         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
9350         warning) case.
9351         * errout.ads: Document ?*? (restriction warning) insertion.
9352         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
9353         warning) case.
9354         * erroutc.ads: Document use of * for restriction warning tag.
9355         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
9357 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9359         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
9360         make discriminants immediately visible when analyzing an aspect
9361         of a subtype declaration.
9362         (Uninstall_Discriminants): Do not apply to the entity in a
9363         subtype declaration.
9365 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9367         * sem_util.adb: Code clean up.
9369 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
9371         * gnat_ugn.texi: Document -Werror.
9373 2014-05-21  Bob Duff  <duff@adacore.com>
9375         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
9376         This was returning False if the Object is a constant view. Fix
9377         it to return True in that case, because it might be a view of
9378         a variable.
9379         (Has_Discriminant_Dependent_Constraint): Fix latent
9380         bug; this function was crashing when passed a discriminant.
9382 2014-05-21  Robert Dewar  <dewar@adacore.com>
9384         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
9385         * s-arit64.adb: Minor code reorganization.
9386         * sem_prag.adb: Minor comment fix (remove erroneous use of the
9387         term erroneous).
9389 2014-05-21  Robert Dewar  <dewar@adacore.com>
9391         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
9392         computing new table size.
9394 2014-05-21  Robert Dewar  <dewar@adacore.com>
9396         * einfo.ads: Minor reformatting.
9397         * ceinfo.adb: Deal with slight format change of einfo.ads.
9399 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9401         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
9402         implementation of the SPARK 2014 rule concerning private child
9403         units (LRM 7.2.6).
9405 2014-05-21  Vincent Celier  <celier@adacore.com>
9407         * makeusg.adb: Add switch -d to usage.
9409 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
9411         * sem_util.adb (Find_Actual): If an actual that is the prefix
9412         of an enclosing prefixed call has been rewritten, use Nkind
9413         and Sloc to identify the corresponding formal, when handling
9414         deferred references.
9416 2014-05-21  Robert Dewar  <dewar@adacore.com>
9418         * debug.adb: Document -gnatd.z switch.
9419         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
9421 2014-05-21  Robert Dewar  <dewar@adacore.com>
9423         * einfo.ads (Can_Never_Be_Null): Minor comment update.
9424         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
9425         error message change.
9426         * s-arit64.adb ("abs"): New function. Use expression functions
9427         for the simple conversions and arithmetic.
9429 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9431         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
9432         set function_start_locus.
9434 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9436         * utils.c (gnat_write_global_declarations): Adjust the flags put on
9437         dummy_global.
9439 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9441         * gcc-interface/decl.c (change_qualified_type): New static function.
9442         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
9443         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
9444         <E_Array_Subtype>: Likewise.
9445         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
9446         (gnat_to_gnu_component_type): Likewise.
9447         (gnat_to_gnu_param): Likewise.
9449 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9451         * fe.h (Set_Present_Expr): Move around.
9452         (End_Location): New macro.
9453         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
9455 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9457         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
9458         lieu of more verbose construct.
9459         * gcc-interface/trans.c (Call_to_gnu): Likewise.
9460         (gnat_to_gnu): Likewise.  Remove obsolete code.
9462 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
9464         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
9465         consider that regular packed arrays can never be superflat.
9467 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
9469         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
9470         annotation.
9471         * gcc-interface/decl.c (annotate_value): Adjust.
9472         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
9473         (push_range_check_info): Likewise.
9474         (Loop_Statement_to_gnu): Likewise.
9475         (Subprogram_Body_to_gnu): Likewise.
9476         (Compilation_Unit_to_gnu): Likewise.
9477         (start_stmt_group): Likewise.
9478         * gcc-interface/utils.c (init_gnat_utils): Likewise.
9479         (gnat_pushlevel): Likewise.
9480         (maybe_pad_type): Likewise.
9482 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
9484         * seh_init.c: Fix copyright year.
9486 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9488         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
9489         are defined.  Move include windows.h before system.h.
9490         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
9491         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
9493 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
9495         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
9496         to the appropriate type.
9497         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
9498         (pos_to_constructor): Likewise.
9500 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
9502         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
9504 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
9505             Mike Stump  <mikestump@comcast.net>
9506             Richard Sandiford  <rdsandiford@googlemail.com>
9508         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
9509         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
9510         (annotate_value): Use wide-int interfaces.
9511         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
9513 2014-04-28  Richard Henderson  <rth@redhat.com>
9515         * gcc-interface/Makefile.in: Support aarch64-linux.
9517 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
9519         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
9520         add 'Suffix' parameter and adjust comment.
9521         (Get_External_Name_With_Suffix): Delete.
9522         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
9523         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
9524         'Suffix' parameter.
9525         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
9526         Call Get_External_Name instead of Get_External_Name_With_Suffix.
9527         (Get_Secondary_DT_External_Name): Likewise.
9528         * exp_cg.adb (Write_Call_Info): Likewise.
9529         * exp_disp.adb (Export_DT): Likewise.
9530         (Import_DT): Likewise.
9531         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
9532         parameter with False default.
9533         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
9534         * types.h (Fat_Pointer): Rename into...
9535         (String_Pointer): ...this.  Add comment on interfacing rules.
9536         * fe.h (Compiler_Abort): Adjust for above renaming.
9537         (Error_Msg_N): Likewise.
9538         (Error_Msg_NE): Likewise.
9539         (Get_External_Name): Likewise.  Add third parameter.
9540         (Get_External_Name_With_Suffix): Delete.
9541         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
9542         (create_concat_name): Adjust call to Get_External_Name, remove call to
9543         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
9544         * gcc-interface/trans.c (post_error): Likewise.
9545         (post_error_ne): Likewise.
9546         * gcc-interface/misc.c (internal_error_function): Likewise.
9548 2014-04-28  Richard Biener  <rguenther@suse.de>
9550         PR middle-end/60092
9551         * gcc-interface/utils.c: Define flag_isoc11.
9553 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
9555         * gnatvsn.ads (Library_Version): Bump to 4.10.
9557 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
9559         Revert
9560         2014-04-22  Richard Henderson  <rth@redhat.com>
9562         * gcc-interface/Makefile.in: Support aarch64-linux.
9564         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9566         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9567         (Error_Msg_N): Likewise.
9568         (Error_Msg_NE): Likewise.
9569         (Get_External_Name_With_Suffix): Likewise.
9570         * types.h (Fat_Pointer): Delete.
9571         (String_Pointer): New type.
9572         (DECLARE_STRING_POINTER): New macro.
9573         * gcc-interface/decl.c (create_concat_name): Adjust.
9574         * gcc-interface/trans.c (post_error): Likewise.
9575         (post_error_ne): Likewise.
9576         * gcc-interface/misc.c (internal_error_function): Likewise.
9578 2014-04-22  Richard Henderson  <rth@redhat.com>
9580         * gcc-interface/Makefile.in: Support aarch64-linux.
9582         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
9583         (__gnat_alternate_stack): Enable for all linux except ia64.
9585 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
9587         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
9588         (Error_Msg_N): Likewise.
9589         (Error_Msg_NE): Likewise.
9590         (Get_External_Name_With_Suffix): Likewise.
9591         * types.h (Fat_Pointer): Delete.
9592         (String_Pointer): New type.
9593         (DECLARE_STRING_POINTER): New macro.
9594         * gcc-interface/decl.c (create_concat_name): Adjust.
9595         * gcc-interface/trans.c (post_error): Likewise.
9596         (post_error_ne): Likewise.
9597         * gcc-interface/misc.c (internal_error_function): Likewise.
9599 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9600             Pierre-Marie de Rodat  <derodat@adacore.com>
9602         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
9603         scalar constant instead of a reference for renaming of scalar literal.
9604         Do not create a new object for constant renaming except for a function
9605         call.  Make sure a VAR_DECL is created for the renaming pointer.
9606         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
9607         (fold_constant_decl_in_expr): New function.
9608         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
9609         For a constant renaming, try to fold a constant DECL in the result.
9610         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
9611         (Identifier_to_gnu): Reference the renamed object of constant renaming
9612         pointers directly.
9613         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
9614         invalidate constant renaming pointers.
9616 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9618         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
9619         (build_vector_type_for_size): New function.
9620         (build_vector_type_for_array): Likewise.
9621         (unchecked_convert): Build an intermediate vector type to convert
9622         from a generic array type to a vector type.
9623         (handle_vector_size_attribute): Reimplement.
9624         (handle_vector_type_attribute): Likewise.
9626 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9628         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
9629         Is_OK_Static_Expression in lieu of Is_Static_Expression to
9630         detect valid arguments.
9632 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
9634         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
9636 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
9638         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
9639         (components_to_record): Likewise.
9640         * gcc-interface/utils.c (make_aligning_type): Likewise.
9641         (maybe_pad_type): Likewise.
9642         (finish_record_type): Likewise.
9643         (rest_of_record_type_compilation): Likewise.
9645 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
9647         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
9648         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
9649         for Ivdep hint.
9650         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
9651         hint for Loop_Optimize.
9652         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
9653         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9654         with new Ivdep hint.
9655         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
9656         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
9657         with new Ivdep hint.
9658         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
9660 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
9661             Robert Dewar  <dewar@adacore.com>
9663         * opt.ads (Suppress_Back_Annotation): Remove as unused.
9664         * fe.h (Back_Annotate_Rep_Info): Likewise.
9665         (Global_Discard_Names): Likewise.
9666         (List_Representation_Info): Declare.
9667         * types.h (Uint_Minus_1): Likewise.
9668         * repinfo.ads: Document back-annotation change.
9669         * gcc-interface/gigi.h (init_gnat_decl): Declare.
9670         (destroy_gnat_decl): Likewise.
9671         * gcc-interface/decl.c (annotate_value): Do not create the cache of
9672         annotated values here but...
9673         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
9674         in ASIS mode.
9675         (init_gnat_decl): ...here instead.  New function.
9676         (destroy_gnat_decl): Likewise.
9677         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
9678         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
9680 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
9682         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
9683         offset for the field, if any.
9685 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
9686             Svante Signell  <svante.signell@gmail.com>
9688         PR ada/54040
9689         PR ada/59346
9690         * s-osinte-x32.adb: New file.
9691         * s-linux.ads (Time): New section.
9692         * s-linux-alpha.ads (Time): Likewise.
9693         * s-linux-android.ads (Time: Likewise.
9694         * s-linux-hppa.ads (Time): Likewise.
9695         * s-linux-mipsel.ads (Time): Likewise.
9696         * s-linux-sparc.ads (Time): Likewise.
9697         * s-linux-x32.ads (Time): Likewise.
9698         * s-osprim-x32.ads (timespec): Adjust.
9699         (Clock): Likewise.
9700         (To_Timespec): Likewise.
9701         * s-osinte-linux.ads (Time): Define local subtypes for those defined
9702         in System.Linux.
9703         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
9704         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
9705         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
9706         * s-osinte-solaris-posix.ads (timespec): Likewise.
9707         * s-osinte-posix.adb (To_Timespec): Likewise.
9708         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
9710 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
9712         PR ada/60411
9713         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
9714         * s-linux-android.ads: New file.
9715         * s-intman-android.adb: Likewise.
9716         * s-osinte-android.ads: Adjust.
9717         * sigtramp-armdroid.c: Likewise.
9718         * sigtramp.h: Add Android support.
9720 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
9722         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
9724 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
9726         PR ada/60703
9727         * system-linux-alpha.ads: Adjust for Ada 2005.
9728         * system-linux-mips.ads: Likewise.
9729         * system-linux-mips64el.ads: Likewise.
9730         * system-linux-mipsel.ads: Likewise.
9731         * system-linux-s390.ads: Likewise.
9732         * system-linux-s390x.ads: Likewise.
9733         * system-linux-sparc.ads: Likewise.
9734         * system-linux-sparcv9.ads: Likewise.
9735         * system-rtems.ads: Likewise.
9736         * system-vxworks-arm.ads: Likewise.
9738 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
9740         PR ada/39172
9741         * gcc-interface/Makefile.in (target_cpu_default): Revert
9742         2013-10-11 change.
9744 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9746         PR ada/51483
9747         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
9748         it to set the RM size.  Use directly 'size' for the Esize.
9749         (Create_Back_End_Float_Types): Adjust call to above.
9750         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
9751         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
9752         (Write_Target_Dependent_Values): Adjust comment.
9753         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
9754         deal with it.
9755         (Write_Target_Dependent_Values): Write the precision in lieu of size.
9756         (Initialization): Read the precision in lieu of size and compute the
9757         size from the precision and the alignment.
9758         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
9759         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
9760         types for vector modes, pass the size in addition to the precision.
9762 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
9764         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
9766 2014-03-07  Doug Rupp  <rupp@adacore.com>
9768         PR ada/60411
9769         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
9770         (Support_64_Bit_Divides): Removed, no longer used.
9771         (ZCX_By_Default): Enabled.
9773 2014-02-25  Doug Rupp  <rupp@adacore.com>
9775         * gcc-interface/Makefile.in (arm-linux):
9776         (EH_MECHANISM): Use ARM unwinder (-arm)
9777         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
9778         s-excmac-arm.ads.
9779         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
9780         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
9781         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
9782         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
9783         Add dependencies for sigtramp-armvxw.o.
9785 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9787         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
9789 2014-02-25  Robert Dewar  <dewar@adacore.com>
9791         * rtsfind.adb (Is_RTE): Protect against entity with no scope
9792         field (previously this call blew up on the Standard entity).
9793         * sem_attr.adb (Analyze_Attribute, case Access): Remove
9794         test for No_Abort_Statements, this is now handled in
9795         Set_Entity_With_Checks.
9796         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
9797         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
9798         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
9799         Set_Entity_With_Checks.
9800         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
9801         Add checks for No_Abort_Statements.
9803 2014-02-25  Robert Dewar  <dewar@adacore.com>
9805         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
9806         Check_Restriction is OK.
9808 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
9810         * sem_ch3.adb (Process_Full_View): Better error message when
9811         the full view of  a private type without discriminants is an
9812         unconstrained type.
9813         * sem_ch7.adb (Uninstall_Declarations): Ditto.
9815 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9817         * sigtramp-armvxw.c: Also restore r0.
9819 2014-02-25  Robert Dewar  <dewar@adacore.com>
9821         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
9822         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
9823         set unconditionally.
9824         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
9825         any more (Output_Msg_Text): Rewritten with new convention on
9826         output of warnings that are treated as errors.
9827         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
9828         if Warn is False.
9829         * gnat_rm.texi: Updates to documentation on pragma
9830         Warning_As_Error.
9831         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
9832         set Warning_Doc_Switch.
9833         * lib-writ.ads: Add documentation note on ALI file generation
9834         for C.
9835         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
9836         (belongs in Sem).
9837         * sem_attr.adb (Resolve_Attribute, case Access):
9838         Abort_Task'Access violates the No_Abort_Statements restriction.
9839         * sem_res.adb (Resolve_Call): Check restriction
9840         No_Abort_Statements for call to Abort_Task or a renaming of it.
9842 2014-02-25  Robert Dewar  <dewar@adacore.com>
9844         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
9845         type name as index.
9846         * lib.ads: Minor reformatting.
9847         * einfo.ads: Minor reformatting.
9849 2014-02-25  Doug Rupp  <rupp@adacore.com>
9851         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
9852         use Short_Descriptor(S) as the argument passing mechanism.
9854 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9856         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
9858 2014-02-25  Robert Dewar  <dewar@adacore.com>
9860         * atree.ads (Warnings_Treated_As_Errors): New variable.
9861         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
9862         error object (Initialize): Initialize Warnings_As_Errors_Count
9863         (Write_Error_Summary): Include count of warnings treated as errors.
9864         * erroutc.adb (Warning_Treated_As_Error): New function.
9865         (Matches): Function moved to outer level of package.
9866         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
9867         (Warning_Treated_As_Error): New function.
9868         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
9869         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
9870         * opt.ads (Config_Switches_Type): Add entry for
9871         Warnings_As_Errors_Count.
9872         (Warnings_As_Errors_Count): New variable.
9873         (Warnings_As_Errors): New array.
9874         * par-prag.adb: Add dummy entry for Warning_As_Error.
9875         * sem_prag.adb (Analyze_Pragma): Implement new pragma
9876         Warning_As_Error.
9877         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
9879 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
9881         * sigtramp.h: Fix minor inaccuracy.
9883 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
9885         * gnat_ugn.texi: Added description of kill command.
9887 2014-02-25  Robert Dewar  <dewar@adacore.com>
9889         * gnat_rm.texi (Address_Clauses): Add a section discussing the
9890         problem of address clauses causing unexpected initialization,
9891         including the effect of Initialize_Scalars.
9893 2014-02-25  Robert Dewar  <dewar@adacore.com>
9895         * errout.adb: Various changes for better msgs for anonmous access
9896         subprogram types.
9897         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
9898         argument.
9899         (Buffer_Remove): Version with character argument.
9900         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
9901         of mismatching conventions for access-to-subprogram case.
9902         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
9903         access types in record.
9904         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
9905         types, including in records.
9907 2014-02-25  Doug Rupp  <rupp@adacore.com>
9909         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
9910         enhancements and corrections.
9912 2014-02-25  Robert Dewar  <dewar@adacore.com>
9914         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
9916 2014-02-25  Robert Dewar  <dewar@adacore.com>
9918         * gnat_rm.texi: First set of documentation additions for
9919         predefined RM units.
9920         * checks.adb: Minor reformatting.
9921         * sem_elab.adb (Check_Task_Activation): Minor fix to error
9922         message.
9923         * sem_util.adb: Minor reformatting.
9925 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
9927         * usage.adb (Usage): Add help on -gnateC.
9928         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
9929         * opt.ads (Generate_CodePeer_Messages): New flag.
9930         * gnat_ugn.texi: Document new switch -gnateC.
9932 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
9934         * gnat_rm.texi: Corrected minor typos in Implementation Defined
9935         Aspects.
9936         * opt.ads: Minor reformatting.
9938 2014-02-25  Robert Dewar  <dewar@adacore.com>
9940         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
9941         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
9942         of -gnatel/-gnateL.
9943         * opt.ads (Warn_Info_Messages): New flag.
9944         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
9945         messages.
9946         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
9947         messages.
9948         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
9949         * usage.adb: Add documentation of -gnatel/-gnateL Update
9950         documentation of -gnatwl/-gnatwL.
9951         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
9952         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
9954 2014-02-25  Robert Dewar  <dewar@adacore.com>
9956         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
9957         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
9958         * interfac.ads: Minor code reorganization (add pragma
9959         Compiler_Unit_Warning).
9960         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
9961         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
9962         Has_Shift_Operator flag.
9963         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
9964         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
9965         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
9966         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
9967         Add entry for Name_Amount.
9968         * checks.adb (Selected_Range_Checks): When checking for a null
9969         range, make sure we use the base type, and not the subtype for
9970         deciding a range is null.
9971         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
9972         for suspicious loop bound which is outside the range of the
9973         loop subtype.
9974         * gnat_ugn.texi: Add documentation section "Determining the
9975         Chosen Elaboration Order"
9976         * sem_ch13.adb (UC_Entry): Add field Act_Unit
9977         (Validate_Unchecked_Conversion): Store Act_Unit
9978         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
9979         * treepr.adb: Minor reformatting.
9981 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
9983         * usage.adb: Minor: fix typo.
9985 2014-02-25  Robert Dewar  <dewar@adacore.com>
9987         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
9988         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
9989         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
9990         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
9991         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
9992         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
9993         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
9994         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
9995         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
9996         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
9997         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
9998         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
9999         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
10000         Compiler_Unit_Warning, change Compiler_Unit everywhere to
10001         Compiler_Unit_Warning.
10003 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
10005         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
10006         in ASIS mode aggregates that are used as aspect definitions.
10008 2014-02-25  Robert Dewar  <dewar@adacore.com>
10010         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
10011         reformatting.
10013 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10015         * freeze.adb (Freeze_Entity): If the return type of a function
10016         is a limited view, and the non-limited view has not been seen yet,
10017         defer freezing to some later point.
10019 2014-02-25  Robert Dewar  <dewar@adacore.com>
10021         * sem_ch3.adb: Minor reformatting.
10023 2014-02-25  Robert Dewar  <dewar@adacore.com>
10025         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
10026         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
10027         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
10028         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
10029         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
10030         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
10031         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
10032         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
10033         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
10034         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
10035         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
10036         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
10037         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
10038         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
10039         snames.ads-tmpl: Change Compiler_Unit everywhere to
10040         Compiler_Unit_Warning.
10042 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10044         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
10045         (Collect_Body_Postconditions_In_Decls): New routine.
10046         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
10047         postcondition aspects or pragmas that appear on a subprogram
10048         body stub.
10049         (Collect_Spec_Preconditions): Factor out code. Handle
10050         precondition aspects or pragmas that appear on a subprogram
10051         body stub.
10052         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
10053         aspects that apply to a subprogram body stub is no longer delayed,
10054         the aspects are analyzed on the spot.
10055         (SPARK_Aspect_Error):
10056         Aspects that apply to a subprogram declaration cannot appear in
10057         a subunit.
10058         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
10059         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
10060         is now a local variable. Code cleanup. Analysis related to
10061         the aspects of a subprogram body stub is now carried out by
10062         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
10063         and/or pragmas of a subprogram body stub to the proper body
10064         as this is no longer needed. Do not analyze the aspects of a
10065         subprogram stub when the corresponding source unit is missing.
10066         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
10067         on a stub.
10068         (Analyze_Task_Body_Stub): Flag the illegal use of
10069         aspects on a stub.
10070         (Optional_Subunit): Add local variable Unum.
10071         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
10072         pragma when it applies to a subprogram body stub.
10073         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
10074         Depends and Global can now apply to a subprogram body stub as
10075         long as it acts as its own spec.
10076         (Analyze_Refined_Pragma):
10077         Code reformatting. Refinement pragmas cannot apply to a subunit.
10079 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10081         * einfo.ads Update the usage of flag
10082         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
10083         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
10084         now starts with the letter 'C'. This makes reading expanded
10085         code easier.
10086         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
10087         Iter_Loop. Signal that an Ada 2012 iterator loop requires
10088         secondary stack management when creating a transient scope for
10089         an element reference.
10090         * exp_util.adb (Process_Statements_For_Controlled_Objects):
10091         When wrapping the statements of a loop, pass the E_Loop entity
10092         to the wrapping machinery.
10093         (Wrap_Statements_In_Block): Add
10094         formal parameter Scop along with comment on usage. Add local
10095         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
10096         block as requiring secondary stack management when the block is
10097         created inside an Ada 2012 iterator loop. This ensures that any
10098         reference objects are reclaimed on each iteration of the loop.
10099         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
10100         tasked with the handling of container iterators as requiring
10101         secondary stack management. This ensures that iterators are
10102         reclaimed when the loop terminates or is exited in any fashion.
10103         * sem_util.adb (Add_Block_Identifier): New routine.
10104         (Find_Enclosing_Iterator_Loop): New routine.
10105         * sem_util.ads (Add_Block_Identifier): New routine.
10106         (Find_Enclosing_Iterator_Loop): New routine.
10108 2014-02-25  Robert Dewar  <dewar@adacore.com>
10110         * sinfo.ads: Minor reformatting.
10112 2014-02-25  Tristan Gingold  <gingold@adacore.com>
10114         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
10116 2014-02-25  Pascal Obry  <obry@adacore.com>
10118         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
10120 2014-02-25  Tristan Gingold  <gingold@adacore.com>
10122         * sem_ch10.adb: Minor comment fix.
10124 2014-02-25  Bob Duff  <duff@adacore.com>
10126         * s-tasdeb.adb: Misc cleanup of this package,
10127         including printing addresses in hexadecimal.
10128         (Write): Fix minor bug when taking 'Address of an empty string.
10130 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10132         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
10133         public child unit when it does not refer to the abstract state
10134         of a public ancestor.
10136 2014-02-25  Yannick Moy  <moy@adacore.com>
10138         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
10139         Validity_Checks in GNATprove and CodePeer modes.
10141 2014-02-25  Pascal Obry  <obry@adacore.com>
10143         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
10144         Artifacts attribute.
10146 2014-02-25  Yannick Moy  <moy@adacore.com>
10148         * sem_prag.adb: Minor reformatting to get consistent messages.
10150 2014-02-25  Robert Dewar  <dewar@adacore.com>
10152         * checks.adb: Minor reformatting.
10153         * sinfo.ads (Do_Range_Check): Document that this flag is never
10154         passed to the back end.
10156 2014-02-25  Yannick Moy  <moy@adacore.com>
10158         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
10159         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
10161 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10163         * sem_res.adb (Appears_In_Check): New routine.
10164         (Resolve_Entity_Name): Remove local variables Prev and
10165         Usage_OK. Par is now a constant. Remove the parent chain traversal
10166         as the placement of a volatile object with enabled property
10167         Async_Writers and/or Effective_Reads must appear immediately
10168         within a legal construct.
10170 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
10172         * checks.adb (Apply_Selected_Range_Checks):
10173         Alphabetize local constants and variables. Add comments.
10174         Always insert a range check that requires runtime evaluation into
10175         the tree.
10177 2014-02-25  Robert Dewar  <dewar@adacore.com>
10179         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
10181 2014-02-25  Bob Duff  <duff@adacore.com>
10183         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
10184         iterations while waiting for independent tasks to terminate;
10185         if an independent task does not terminate, we do not want to
10186         hang here. In that case, the thread will be terminated when the
10187         process exits.
10188         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
10190 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10192         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
10193         used to perform pre-analysis of the expression for SPARK
10194         aspects that have a non-standard syntax, such as GLobal and
10195         Initializes. The procedure applies to the original expression
10196         in an aspect specification, prior to the analysis of the
10197         corresponding pragma, in order to provide semantic information
10198         for ASIS navigation purposes.
10199         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
10200         Call new subprogram.
10202 2014-02-25  Yannick Moy  <moy@adacore.com>
10204         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
10206 2014-02-25  Doug Rupp  <rupp@adacore.com>
10208         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
10209         (__gnat_adjust_context_for_raise): Bump the PC by 2.
10211 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10213         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
10214         misplaced IS, add a statement sequence to improper body only if
10215         one has not been parsed already.
10217 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
10219         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
10220         mismatch when multidimensional array is updated with a single
10221         index.
10223 2014-02-25  Yannick Moy  <moy@adacore.com>
10225         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
10226         sem_ch6.adb: Mark most references to SPARK RM in error messages
10227         for removal.
10229 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10231         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
10232         appears in a list of basic declarations, complete the tree with
10233         an empty statement list, to prevent cascaded errors and crashes
10234         if semantic analysis is attempted.
10236 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10238         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
10239         value.
10240         * erroutc.adb: Minor reformatting.
10242 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10244         * sem_prag.adb (Check_Clause_Syntax): Account
10245         for a solitary input item in a dependency list.
10247 2014-02-24  Yannick Moy  <moy@adacore.com>
10249         * gnat1drv.adb (Adjust_Global_Switches): Do not
10250         use validity checks at all in GNATprove_Mode.
10252 2014-02-24  Robert Dewar  <dewar@adacore.com>
10254         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
10255         atree.adb, atree.ads: Minor reformatting.
10257 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10259         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
10260         global and dependence refinement when SPARK_Mode is off.
10261         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
10262         state refinement when SPARK_Mode is off.
10263         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
10264         variable Decl. Insert the generated pragma for Refined_State
10265         after a potential pragma SPARK_Mode.
10266         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
10267         constant Deps. Remove local variable Expr. Check the syntax
10268         of pragma Depends when SPARK_Mode is off. Factor out the
10269         processing for extra parenthesis around individual clauses.
10270         (Analyze_Global_In_Decl_List): Items is now a constant. Check
10271         the syntax of pragma Global when SPARK_Mode is off.
10272         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
10273         Initializes when SPARK_Mode is off.
10274         (Analyze_Part_Of): Check
10275         the syntax of the encapsulating state when SPARK_Mode is off.
10276         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
10277         SPARK_Mode is off. Move the declaration order check with respect
10278         to pragma Initializes to the end of the processing. Do not verify
10279         the declaration order for pragma Initial_Condition when SPARK_Mode
10280         is off. Do not complain about a useless package refinement when
10281         SPARK_Mode is off.
10282         (Analyze_Refined_Depends_In_Decl_Part): Refs
10283         is now a constant. Check the syntax of pragma Refined_Depends
10284         when SPARK_Mode is off.
10285         (Analyze_Refined_Global_In_Decl_Part):
10286         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
10287         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
10288         Refined_State when SPARK_Mode is off.
10289         (Check_Dependence_List_Syntax): New routine.
10290         (Check_Global_List_Syntax): New routine.
10291         (Check_Initialization_List_Syntax): New routine.
10292         (Check_Item_Syntax): New routine.
10293         (Check_State_Declaration_Syntax): New routine.
10294         (Check_Refinement_List_Syntax): New routine.
10295         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
10297 2014-02-24  Robert Dewar  <dewar@adacore.com>
10299         * a-tags.adb, s-os_lib.adb: Minor reformatting.
10301 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10303         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
10304         strerror message, not just numeric errno value.
10306 2014-02-24  Doug Rupp  <rupp@adacore.com>
10308         * raise-gcc.c (exception_class_eq): Make endian neutral.
10310 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10312         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
10313         flag, and reset Etype and Analyzed attributes unconditionally
10314         when copying a tree that may be partly analyzed.
10315         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
10316         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
10317         within a subprogram body and applies to it, remove it from the
10318         body before making a copy of it, to prevent spurious errors when
10319         analyzing the copied body.
10321 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10323         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
10324         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
10325         vxWorks.h has been included.  Also ensure that file attributes
10326         related definitions are output even in cases where socket support
10327         is not enabled.
10328         * a-tags.adb: Code clean up.
10329         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
10330         instead of -I to add the main ada source directory to the header
10331         search path, in order to avoid conflict between our own "types.h"
10332         and VxWork's <types.h>.
10334 2014-02-24  Robert Dewar  <dewar@adacore.com>
10336         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
10337         * debug.adb: Remove documentation of -gnatd.X, no longer used.
10338         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
10340 2014-02-24  Bob Duff  <duff@adacore.com>
10342         * gnat_ugn.texi: Improve documentation of gnatpp.
10344 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10346         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
10347         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
10348         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
10349         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
10350         a chars_ptr, because on Windows this is a renaming of
10351         Socket_Error_Message.
10353 2014-02-24  Robert Dewar  <dewar@adacore.com>
10355         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
10356         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
10357         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
10358         reorganization.
10360 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10362         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
10363         that the source directory containing s-oscons-tmplt.c is on the
10364         include path, so that all internal header files are available.
10366 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10368         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
10369         domain of iteration is an attribute reference 'Old, this is an
10370         Ada 2012 iterator and the loop must be rewritten as such.
10372 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10374         * s-fileio.adb (Errno_Message): Remove, use shared version from
10375         s-os_lib instead.
10376         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
10377         * g-stseme (Socket_Error_Message): Reimplement in terms of new
10378         s-os_lib function.
10379         * g-socthi.ads, g-socthi.adb: Change profile of
10380         Socket_Error_Message to return String to allow the above.
10381         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
10382         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
10383         * g-socthi-vxworks.ads: Update to account for the above profile
10384         change.
10385         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
10386         * s-crtl.ads (strncpy): New procedure.
10387         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
10388         Use import from s-crtl.
10389         * a-envvar.adb, osint.adb: Use imports of C runtime functions
10390         from s-crtl instead of re-importing locally.
10392 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10394         * sem_prag.adb (Analyze_Global_Item): Emit the
10395         variable related checks concerning volatile objects only when
10396         SPARK_Mode is on.
10398 2014-02-24  Robert Dewar  <dewar@adacore.com>
10400         * sem_ch5.adb (Analyze_Iterator_Specification): use
10401         Error_Msg_Ada_2012_Feature.
10403 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
10405         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
10406         No_Local_Timing_Events and No_Specific_Termination_Handlers
10407         must be set, according to the Ravenscar profile definition
10408         in D.13(6/3).
10410 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10412         * sem_ch6.adb (Analyze_Expression_Function): If this is a
10413         completion, freeze return type and its designated type if needed.
10415 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10417         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10418         'Address): When moving initialization statements to a freeze
10419         entity, keep them under a single node (i.e. do not unwrap
10420         expressions with actions), and set the Initialization_Statements
10421         attribute again so that processing of a later pragma Import can
10422         still remove them.
10424 2014-02-24  Claire Dross  <dross@adacore.com>
10426         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
10427         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
10428         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
10429         Left/Right to First_To_Previous/Current_To_Last.
10431 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10433         * adaint.h (struct file_attributes): New component "error"
10434         (__gnat_error_attributes): Accessor for the above.
10435         * adaint.c (__gnat_error_attributes): New subprogram
10436         (__gnat_stat): Fix returned value (expect errno value)
10437         (__gnat_stat_to_attr): Add management of error component (set to
10438         stat errno value, except for missing files where it is set to 0,
10439         and exists is set to 0).
10440         * osint.ads (File_Attributes_Size): Update per change above,
10441         also clarify documentation.
10442         * s-filatt.ads: New file, binding to file attributes related
10443         functions.
10444         * Makefile.rtl (s-filatt): New runtime unit.
10445         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
10446         to library function if not available on target).
10447         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
10448         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
10449         SIZEOF_struct_dirent_alloc): New constants.
10450         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
10451         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
10452         Perform appropriate error checking if stat fails (do not just
10453         ignore existing files if stat fails)
10454         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
10455         dependencies.
10457 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10459         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
10460         the use of volatile objects as global items in a function to
10461         the variable related checks section.
10462         * sem_util.adb (Async_Readers_Enabled): Directly call
10463         Has_Enabled_Property.
10464         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
10465         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
10466         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
10467         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
10468         Update the comment on usage. State_Has_Enabled_Property how handles
10469         the original logic of the routine. Add processing for variables.
10470         (State_Has_Enabled_Property): New routine.
10471         (Variable_Has_Enabled_Property): New routine.
10473 2014-02-24  Robert Dewar  <dewar@adacore.com>
10475         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
10476         Minor reformatting.
10477         * atree.ads, atree.adb (Node35): New function.
10478         (Set_Node35): New procedure.
10479         * debug.adb: Define new debug flag -gnatd.X.
10480         * einfo.ads, einfo.adb (Import_Pragma): New field.
10481         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
10482         really active yet, has to be activated with -gnatd.X.
10483         * sem_prag.adb (Set_Imported): Set new Import_Pragma
10484         field (Set_Imported): Don't set Is_Public (see
10485         Freeze.Wrap_Imported_Subprogram)
10486         * par-ch3.adb (P_Component_List): Handle unexpected null component.
10488 2014-02-24  Yannick Moy  <moy@adacore.com>
10490         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
10491         * gnat_rm.texi: Correct documentation of attribute Update.
10493 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10495         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
10496         iterator in older versions of Ada.
10498 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
10500         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
10501         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
10503 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10505         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
10506         indexed_components that are instances of Ada 2012 container
10507         indexing operations. Analysis and resolution of such nodes
10508         is performed on the attribute, and the original source is
10509         preserved for ASIS operations. If expansion is enabled, the
10510         indexed component is replaced by the value of this attribute,
10511         which is in a call to an Indexing aspect, in most case wrapped
10512         in a dereference operation.
10513         * sem_ch4.adb (Analyze_Indexed_Component): Create
10514         Generalized_Indexing attribute when appropriate.
10515         (Analyze_Call): If prefix is not overloadable and has an indexing
10516         aspect, transform into an indexed component so it can be analyzed
10517         as a potential container indexing.
10518         (Analyze_Expression): If node is an indexed component with a
10519         Generalized_ Indexing, do not re-analyze.
10520         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
10521         of an indexed_component that has been transformed into a container
10522         indexing operation.
10523         (Resolve_Indexed_Component): Call the above when required.
10524         (Resolve): Do not insert an explicit dereference operation on
10525         an indexed_component whose type has an implicit dereference:
10526         the operation is inserted when resolving the related
10527         Generalized_Indexing.
10529 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
10531         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
10532         Environment.
10534 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10536         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
10537         error messages.
10538         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
10539         Merge the expected and available mode errors.
10540         (Report_Unused_Constituents): Remove leading spaces in error messages.
10541         (Report_Unused_States): Remove leading spaces in error messages.
10543 2014-02-24  Thomas Quinot  <quinot@adacore.com>
10545         * par_sco.adb (Traverse_One): Refine categorization of statement
10546         SCOs.
10548 2014-02-24  Robert Dewar  <dewar@adacore.com>
10550         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
10551         Pure_05, Pure_12 and Preelaborate_05.
10552         * gnat_rm.texi: Update accordingly.
10553         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
10554         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
10555         Recognize one argument form of these pragmas only in GNAT mode
10556         (-gnatg).
10558 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10560         * s-dimmks.ads: Replace symbol for temperature, previously the
10561         Greek letter Theta, by the ASCII @ sign.
10562         * s-diflio.ads: ditto.
10564 2014-02-24  Robert Dewar  <dewar@adacore.com>
10566         * exp_ch4.adb: Minor code reorganization (use OR for boolean
10567         variables).
10568         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
10570 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
10572         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
10573         so that references to gnatmem and ASIS tools do not appear in the FSF
10574         edition of the GNAT User's Guide.
10576 2014-02-24  Yannick Moy  <moy@adacore.com>
10578         * freeze.adb (Freeze_Entity): Do not issue warning
10579         for pre/post being ignored on imported subprogram in GNATprove
10580         mode.
10582 2014-02-24  Robert Dewar  <dewar@adacore.com>
10584         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
10585         stand.ads, sem_eval.adb: Minor reformatting.
10587 2014-02-24  Yannick Moy  <moy@adacore.com>
10589         * sem_prag.adb: Minor rewording in error message.
10591 2014-02-24  Johannes Kanig  <kanig@adacore.com>
10593         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
10594         GNATprove_mode, gnat2why doesn't need nor use these types.
10596 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
10598         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
10599         target, in the case of signed integer exponentiation that uses a
10600         run-time routine, always select the Exp_* versions, since overflow
10601         checking is automatically done by AAMP arithmetic instructions.
10603 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10605         * sem_ch13.adb (Analyze_Aspect_Specifications):
10606         When the related context is a package instace, insert pragma
10607         Abstract_State after all internally-generated renamings related
10608         to the instance "header".
10610 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
10612         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
10613         subprograms.
10614         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
10615         call to an abstract subprogram is legal if it appears in a
10616         pre/postcondition of another abstract operation.
10618 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
10620         * gnat_ugn.texi: Misc updates.
10622 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
10624         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
10626 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
10628         * layout.adb (Layout_Variant_Record): Instantiate
10629         Generic_Check_Choices and call Check_Choices before calling
10630         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
10631         set to prevent generating incorrect discriminant-checking
10632         functions for 'others' variants (functions that unconditionally
10633         return True rather than accounting for the values covered by the
10634         'others' choice).
10635         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
10636         Formal_Derived_Matching.
10637         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
10638         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
10639         Formal_Derived_Matching formal to Subtypes_Statically_Match.
10640         (Subtypes_Statically_Match): Suppress the Object_Size matching
10641         test in the case where Formal_Derived_Matching is True.
10642         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
10643         True for Formal_Derived_Matching_Formal on the call to
10644         Subtypes_Statically_Compatible.
10646 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
10648         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
10650 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
10652         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
10653         Look through a conversion between original and packable version to get
10654         the base object.
10655         (build_component_ref): Rework comment and fix formatting.
10657 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
10659         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
10660         project-specific options.
10662 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10664         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
10665         not Constraint_Error.
10666         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
10667         * sem_ch5.adb: Code clean up.
10669 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10671         * sem_prag.adb (Usage_Error): Remove local
10672         constant Typ. Remove the specialized diagnostics for unconstrained
10673         or tagged items as those are not part of the explicit input set
10674         of the related subprogram and should not be flagged.
10676 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10678         * sem_attr.adb: Add guard to preserve all errors.
10680 2014-02-20  Vincent Celier  <celier@adacore.com>
10682         * switch-m.adb (Normalize_Compiler_Switches): Take into account
10683         switches that are recorded in ALI files: -gnateA, -gnateE,
10684         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
10686 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10688         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
10689         of an element iterator form over a formal container with an
10690         Iterable aspect.
10691         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
10692         to create declaration and loop statements for both forms of
10693         container iterators.
10694         (Expand_Formal_Container_Element_Iterator): New procedure
10695         to handle loops of the form  "for E of C" when C is a formal
10696         container.
10697         (Expand_Formal_Container_Iterator): Code cleanup.
10699 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10701         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
10702         (Analyze_Contract_Case): Remove the use of
10703         "may". Replace "aspect Contract_Cases" to avoid categorization
10704         of aspect vs pragma.
10705         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
10706         (Analyze_Global_Item): Remove
10707         the use of "formal", specify the subprogram.  Split the
10708         error message about a state with visible refinement into
10709         two. Remove the use of "global" from "volatile global item".
10710         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
10711         is on one line.
10712         (Analyze_Input_Output): Update the call to
10713         Check_Mode. Specify the duplicated item. Reword the error
10714         message concerning an input of a null output list. Use "\"
10715         for error message continuation.
10716         (Analyze_Part_Of): Remove
10717         the use of "may". Use "\" for error message continuation.
10718         (Analyze_Refined_Depends_In_Decl_Part): Update the error
10719         message concerning a useless refinement to match the format
10720         of Refined_Global.
10721         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
10722         concerning a useless refinement.
10723         (Analyze_Refinement_Clause): Use "\" for error message continuation.
10724         (Check_Constituent_Usage): Use "\" for error message continuation.
10725         (Check_Dependency_Clause): Use "\" for error message continuation.
10726         (Check_Matching_Constituent): Use "\" for error message continuation.
10727         (Check_Missing_Part_Of): Use "\" for error message continuation.
10728         (Check_Mode): Renamed to
10729         Check_Role. Update the comment on usage. Redo the error reporting
10730         to use Role_Error.
10731         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
10732         message continuation.
10733         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
10734         with comment on usage. Update all occurrences of Is_Input and Is_Output.
10735         (Inconsistent_Mode_Error): Use "\" for error message continuation.
10736         (Input_Match): Use "\" for error message continuation.
10737         (Role_Error): New routine.
10738         (Set_Convention_From_Pragma): Use "\" for error message continuation.
10739         (Usage_Error): Add local variable Error_Msg. Build specialized error
10740         message showcasing the offending item kind. Redo the diagnostics for
10741         unconstrained types.
10743 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10745         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
10746         to determine whether a type is a container type, rather than
10747         examining only its type declaration, so that subtypes and derived
10748         types are handled properly.
10750 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
10752         * gnat_ugn.texi: gnatmetric: add description of project-specific
10753         options.
10755 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10757         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
10758         all choices in an association for a record type have the same
10759         type, as is done for record aggregates.
10761 2014-02-20  Robert Dewar  <dewar@adacore.com>
10763         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
10764         Unmodified rather than Warnings (Off). Make comments
10765         uniform in the four affected units.
10767 2014-02-20  Robert Dewar  <dewar@adacore.com>
10769         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
10770         Object_Size): For non-scalar types allow any value that is a
10771         multiple of 8.
10772         * gnat_rm.texi: Document Object_Size for composites more clearly.
10774 2014-02-20  Yannick Moy  <moy@adacore.com>
10776         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
10778 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10780         * stand.ads: Raise_Type: new predefined entity, used as the type
10781         of a Raise_Expression prior to resolution.
10782         * cstand.adb: Build entity for Raise_Type.
10783         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
10784         initial type of the node.
10785         * sem_type.adb (Covers): Raise_Type is compatible with all
10786         other types.
10787         * sem_res.adb (Resolve): Remove special handling of Any_Type on
10788         Raise_Expression nodes.
10789         (Resolve_Raise_Expression): Signal ambiguity if the type of the
10790         context is still Raise_Type.
10792 2014-02-20  Robert Dewar  <dewar@adacore.com>
10794         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
10795         mismatching predicates.
10796         * sem_ch6.adb (Check_Conformance): Give better messages on
10797         predicate mismatch.
10798         * sem_eval.adb (Predicates_Match): Move to spec.
10799         * sem_eval.ads (Predicates_Match): Moved here from body.
10801 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10803         * a-cbmutr.adb: Use default value in Insert_Child.
10805 2014-02-20  Vincent Celier  <celier@adacore.com>
10807         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
10808         Stringt.Initialize in all project aware tools.
10810 2014-02-20  Doug Rupp  <rupp@adacore.com>
10812         * gnat_ugn.texi: Document gnatbind -X option.
10813         * vms_data.ads: Minor warnings documentation reformatting.
10815 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10817         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
10818         procedure for a base type.
10820 2014-02-20  Robert Dewar  <dewar@adacore.com>
10822         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
10823         expression with type info.
10824         * sem_ch13.adb: Minor reformatting.
10825         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
10826         False if predicates do not match on the two types.
10828 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
10830         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
10831         In Relaxed_RM_Semantics mode, allow any static integer value,
10832         for compatibility with other compilers.
10834 2014-02-20  Vincent Celier  <celier@adacore.com>
10836         * errutil.adb (Initialize): Properly initialize entry in table
10837         Warnings when warnings are suppressed.
10839 2014-02-20  Robert Dewar  <dewar@adacore.com>
10841         * s-os_lib.ads: Add warning about non-portability of Rename_File.
10842         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
10843         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
10844         * gnat_ugn.texi: Document no warnings on junk variable names.
10845         * layout.adb: Minor code reorganization (use Ekind_In).
10846         * stringt.adb: Move initialization of Null_String_Id to Initialize
10847         routine.
10849 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10851         * sem_ch13.adb: Initialize optional Element_Id.
10853 2014-02-20  Robert Dewar  <dewar@adacore.com>
10855         * s-os_lib.ads (Rename_File): Minor commment addition.
10857 2014-02-20  Thomas Quinot  <quinot@adacore.com>
10859         * einfo.ads: Minor reformatting.
10861 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
10863         * aspects.adb (Exchange_Aspects): New routine.
10864         * aspects.ads (Exchange_Aspects): New routine.
10865         * atree.adb (Rewrite): Do not check whether the save node has
10866         aspects as it never will, instead check the node about to be clobbered.
10867         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
10868         entities of generic packages.
10869         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
10870         pointer of an aspect specification list after rewriting takes place.
10871         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
10872         specifications of the generic template and the copy used for analysis.
10873         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
10874         the aspect specifications of the generic template and the
10875         copy used for analysis.
10876         (Analyze_Package_Instantiation): Propagate the aspect specifications
10877         from the generic template to the instantiation.
10878         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
10879         specifications from the generic template to the instantiation.
10880         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
10881         Abstract_State, Initializes and Initial_Condition when they
10882         apply to a package instantiation.
10884 2014-02-20  Robert Dewar  <dewar@adacore.com>
10886         * stringt.adb: Add call to Initialize in package initialization.
10888 2014-02-20  Robert Dewar  <dewar@adacore.com>
10890         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
10891         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
10892         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
10893         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
10894         reformatting.
10896 2014-02-20  Bob Duff  <duff@adacore.com>
10898         * s-os_lib.ads: Minor: Remove incorrect comment.
10900 2014-02-20  Robert Dewar  <dewar@adacore.com>
10902         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
10904 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10906         * a-cborma.adb (Assign): When creating a node without a specified
10907         element, insert an uninitialized element in the map, because
10908         the instance may provide an element type with a default
10909         initialization, e.g a scalar with a Default_Value aspect.
10910         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
10911         (Insert): In the version without explicit element, provide an
10912         uninitialized element, as above.
10913         * a-cbdlli.adb (Append): In the version without explicit element,
10914         provide an uninitalized element, as above.
10915         (Allocate): Remove unused version.
10917 2014-02-20  Robert Dewar  <dewar@adacore.com>
10919         * sem_elab.adb: Minor code reorganization (use Nkind_In).
10920         * stringt.adb: Remove temporary pragma Warnings (Off).
10921         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
10922         of Null_String_Id.
10924 2014-02-20  Matthew Heaney  <heaney@adacore.com>
10926         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
10927         index.
10929 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
10931         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
10932         properly the cursor type for subsequent volatile testing in SPARK
10933         mode, when domain is a formal container with an Iterabe aspect.
10935 2014-02-20  Robert Dewar  <dewar@adacore.com>
10937         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
10938         (Set_Specific_Warning_Off): Add Reason argument.
10939         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
10940         (Set_Specific_Warning_Off): Add Reason argument.
10941         * erroutc.adb (Warnings_Entry): Add Reason field
10942         (Specific_Warning_Entry): Add Reason field.
10943         (Warnings_Suppressed): return String_Id for Reason.
10944         (Warning_Specifically_Suppressed): return String_Id for Reason.
10945         * erroutc.ads (Warnings_Entry): Add Reason field.
10946         (Specific_Warning_Entry): Add Reason field.
10947         (Set_Specific_Warning_Off): Add Reason argument.
10948         (Set_Warnings_Mode_Off): Add Reason argument.
10949         (Warnings_Suppressed): return String_Id for Reason.
10950         (Warning_Specifically_Suppressed): return String_Id for Reason.
10951         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
10952         (Warning_Specifically_Suppressed): returns String_Id for Reason
10953         * gnat_rm.texi: Document that Warning parameter is string literal
10954         or a concatenation of string literals.
10955         * par-prag.adb: New handling for Reason argument.
10956         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
10957         for Reason argument.
10958         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
10959         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
10960         * stringt.adb: Set Null_String_Id.
10961         * stringt.ads (Null_String_Id): New constant.
10963 2014-02-20  Robert Dewar  <dewar@adacore.com>
10965         * einfo.ads: Minor comment addition: Etype of package is
10966         Standard_Void_Type.
10967         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
10968         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
10969         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
10970         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
10971         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
10972         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
10973         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
10974         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
10975         Replace all calls with calls to New_Occurrence_Of.
10977 2014-02-20  Robert Dewar  <dewar@adacore.com>
10979         * par-util.adb (Ignore, case of right paren): Make this a
10980         serious error.
10982 2014-02-19  Robert Dewar  <dewar@adacore.com>
10984         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
10985         * debug.adb: Remove -gnatd.X switch, no longer used.
10986         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
10987         now always made.
10989 2014-02-19  Bob Duff  <duff@adacore.com>
10991         * g-socket.ads: Minor: Correct some comments.
10993 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
10995         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
10997 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
10999         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
11000         an error on out of range priorities if Relaxed_RM_Semantics.
11001         * sem_prag.adb (Analyze_Pragma): Ditto.
11003 2014-02-19  Bob Duff  <duff@adacore.com>
11005         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
11006         where F denotes the renaming of an enumeration literal, and
11007         issue a specialized error message.
11009 2014-02-19  Matthew Heaney  <heaney@adacore.com>
11011         * a-chtgop.ads (Checked_Index): New operation.
11012         (Next): Changed mode of hash table.
11013         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
11014         (Generic_Read, Reserve_Capacity): Ditto.
11015         (Generic_Equal): Detect tampering.
11016         (Next): Changed mode of hash table, detect tampering.
11017         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
11018         operation.
11019         (Find): Changed mode of hash table.
11020         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
11021         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
11022         tampering.
11023         (Find): Changed mode of hash table, check for tampering.
11024         (Generic_Replace_Element): Check for tampering.
11025         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
11026         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
11027         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
11028         Detect tampering.
11029         (Find, Generic_Replace_Element): Check for tampering.
11030         * a-chtgbo.ads (Checked_Index): New operation.
11031         * a-chtgbo.adb (Checked_Index): New operation
11032         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
11033         (Generic_Read, Next): Ditto.
11034         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
11035         table (Difference, Intersection): Use variable view of
11036         source, detect tampering (Find, Is_Subset, Overlap): Use
11037         variable view of container (Symmetric_Difference, Union):
11038         Detect tampering (Vet): Use Checked_Index to detect tampering
11039         (Constant_Reference, Element, Find): Use variable view of
11040         container.
11041         (Update_Element_Preserving_Key): Detect tampering.
11042         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
11043         of container.
11044         (Is_Subset): Ditto.
11045         (Equivalent_Sets, Overlap): Use Node's Next component.
11046         (Vet): Use Checked_Index to detect tampering.
11047         (Constant_Reference, Element, Find): Use variable view of container.
11048         (Update_Element_Preserving_Key): Detect tampering.
11049         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
11050         Element, Find): Use variable view of container.
11051         (Reference): Rename hash table component.
11052         (Vet): Use Checked_Index to detect tampering.
11054 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
11056         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
11057         of -nostdinc.
11059 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11061         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
11062         against calls without Def_Id.
11064 2014-02-19  Claire Dross  <dross@adacore.com>
11066         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
11067         a-cofove.ads: Add global annotations to subprograms.
11069 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11071         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
11072         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
11073         Initial_Condition no longer requires the presence of pragma
11074         Initialized. Do not try to diagnose whether all variables mentioned in
11075         pragma Initializes also appear in Initial_Condition.
11076         (Collect_Variables): Removed.
11077         (Match_Variable): Removed.
11078         (Match_Variables): Removed.
11079         (Report_Unused_Variables): Removed.
11081 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11083         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
11085 2014-02-19  Robert Dewar  <dewar@adacore.com>
11087         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
11088         reformatting.
11090 2014-02-19  Vincent Celier  <celier@adacore.com>
11092         * prj-part.adb (Parse_Single_Project): Use the fully resolved
11093         project path, with all symbolic links resolved, to check if the
11094         same project is imported with a different unresolved path.
11095         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
11096         changed to Resolved_Path to reflect that all symbolic links
11097         are resolved.
11099 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11101         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
11102         from sem_ch13, for use elsewhere.
11103         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
11104         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
11105         cursor type on the loop variable when the iteration is over o
11106         formal container.
11108 2014-02-19  Vincent Celier  <celier@adacore.com>
11110         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
11111         for an empty Target (Check_Target): Never fail when an empty
11112         target is declared in the configuration project.
11114 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11116         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
11117         the pragma comes fron a predicate aspect and the context is a
11118         record declaration within the scope that declares the type.
11120 2014-02-19  Robert Dewar  <dewar@adacore.com>
11122         * gnat_rm.texi: Minor clarifications.
11123         * expander.adb, sem_aggr.adb: Add comments.
11125 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11127         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
11128         applies to a subprogram body, the name is the current scope,
11129         rather than being declared in the current scope.
11130         (Analyze_Pragma, case No_Return): Handle properly a No_Return
11131         aspect applied to a subprogram body.
11133 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11135         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
11136         of overloaded subprograms, and fix bug in handling of primitive
11137         operation Element.
11139 2014-02-19  Pascal Obry  <obry@adacore.com>
11141         * s-os_lib.adb: Minor reformatting.
11143 2014-02-19  Yannick Moy  <moy@adacore.com>
11145         * expander.adb (Expand): Do nothing inside generics.
11146         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
11147         generics.
11149 2014-02-19  Yannick Moy  <moy@adacore.com>
11151         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
11153 2014-02-19  Robert Dewar  <dewar@adacore.com>
11155         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
11156         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
11157         longer needed).
11159 2014-02-19  Claire Dross  <dross@adacore.com>
11161         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
11162         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
11164 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11166         * sem_ch3.adb (Analyze_Declarations): Analyze
11167         a package contract at the end of the private declarations (if
11168         applicable), otherwise analyze it and the end of the visible
11169         declarations.
11171 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11173         * style.adb (Missing_Overriding): If subprogram is an
11174         instantiation, place warning on the instance node itself,
11175         without mention of the original generic. Do not emit message
11176         if explicit Ada version is older than the introduction of the
11177         overriding indicator.
11179 2014-02-19  Yannick Moy  <moy@adacore.com>
11181         * gnat_rm.texi: Doc clarifications.
11183 2014-02-19  Yannick Moy  <moy@adacore.com>
11185         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
11186         inside a generic.
11188 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11190         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
11191         specified First primitive, rather than by name.
11192         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
11193         and extend error checking for missing primitives and incorrect
11194         signatures.
11196 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11198         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
11199         errors when a Synchronization aspect on an overriding protected
11200         operation does not match the given aspect on the overridden
11201         operation of an ancestor interface.
11203 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11205         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
11206         (Check_Loop_Pragma_Placement): Update
11207         comment on usage. Remove local variables Orig_Stmt and
11208         Within_Same_Sequence. Check that the current Loop_Invariant or
11209         Loop_Variant pragma is grouped together with other such pragmas.
11210         (Is_Loop_Pragma): New routine.
11211         (Prev_In_Loop): Removed.
11213 2014-02-19  Robert Dewar  <dewar@adacore.com>
11215         * par-ch6.adb (P_Return): For extended return, end column lines
11216         up with RETURN.
11217         * par.adb: Minor documentation clarification.
11219 2014-02-19  Yannick Moy  <moy@adacore.com>
11221         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
11222         that Loop_Invariant and Loop_Variant appear consecutively.
11223         * gnat_rm.texi Update documentation of Loop_Invariant and
11224         Loop_Variant pragmas.
11226 2014-02-19  Robert Dewar  <dewar@adacore.com>
11228         * debug.adb: Document -gnatd.X.
11229         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
11230         first token
11231         (Check_Then_Column): Ditto.
11232         * styleg.adb (Check_Then): Allow THEN on line after IF.
11233         (Check_Then): Check THEN placement under control of -gnatd.X
11234         * styleg.ads (Check_Then): Now called even if THEN is not first
11235         token on line.
11236         * stylesw.ads (Style_Check_If_Then_Layout): Document new
11237         relaxed rules.
11238         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
11240 2014-02-19  Robert Dewar  <dewar@adacore.com>
11242         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
11243         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
11244         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
11245         vms_conv.adb: Fix bad layout of IF statements
11247 2014-02-19  Robert Dewar  <dewar@adacore.com>
11249         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
11251 2014-02-19  Robert Dewar  <dewar@adacore.com>
11253         * exp_util.adb: Update comments.
11255 2014-02-19  Doug Rupp  <rupp@adacore.com>
11257         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
11258         * init.c (__gl_float_format): [VMS] New global.
11259         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
11260         representation in effect.
11262 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11264         * exp_ch6.adb Add with and use clause for Exp_Prag.
11265         (Expand_Contract_Cases): Relocated to Exp_Prag.
11266         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
11267         * exp_prag.adb Add with and use clauses for Checks and Validsw.
11268         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
11269         structure of the expanded code to showcase the evaluation of
11270         attribute 'Old prefixes. Add local variable Old_Evals. Expand
11271         any attribute 'Old references found within a consequence. Add
11272         circuitry to evaluate the prefixes of attribute 'Old that
11273         belong to a selected consequence.
11274         (Expand_Old_In_Consequence): New routine.
11275         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
11276         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
11277         potentially unevaluated prefix is always evaluated.
11279 2014-02-19  Robert Dewar  <dewar@adacore.com>
11281         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
11282         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
11283         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
11284         handling for the case of Modify_Tree_For_C, this approach did
11285         not work.
11286         * exp_util.adb (Matching_Standard_Type): New function
11287         (Side_Effect_Free): New top level functions (from
11288         Remove_Side_Effects).
11289         * exp_util.ads (Side_Effect_Free): New top level functions
11290         (moved from body).
11291         * sinfo.ads: Minor comment updates.
11293 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11295         * exp_ch6.adb (Expand_Simple_Function_Return): If return
11296         type is unconstrained and uses the secondary stack, mark the
11297         enclosing function accordingly, to ensure that the value is not
11298         prematurely removed.
11300 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11302         * par.adb Alphabetize the routines in Par.Sync.
11303         (Resync_Past_Malformed_Aspect): New routine.
11304         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
11305         variables. Code and comment reformatting. Detect missing
11306         parentheses on aspects [Refined_]Global and [Refined_]Depends
11307         with a non-null definition.
11308         * par-sync.adb: Alphabetize all routines in this separate unit.
11309         (Resync_Past_Malformed_Aspect): New routine.
11311 2014-02-19  Robert Dewar  <dewar@adacore.com>
11313         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
11314         if Esize values do not match.
11316 2014-02-19  Yannick Moy  <moy@adacore.com>
11318         * sinfo.ads: Minor comment update.
11320 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11322         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
11324 2014-02-19  Thomas Quinot  <quinot@adacore.com>
11326         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
11327         that has the No_Ctrl_Actions flag is a suitable node to be
11328         wrapped if the assigned expression has no finalization actions.
11329         * sem_eval.adb (Eval_Entity_Name): For a compile time known
11330         boolean value, mark the corresponding condition SCO as constant.
11332 2014-02-19  Robert Dewar  <dewar@adacore.com>
11334         * exp_util.adb: Minor reformatting.
11335         * exp_util.ads (Matching_Standard_Type): New function.
11336         * exp_ch7.adb: Minor reformatting.
11338 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11340         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
11341         to find declaration for Cursor, to handle properly the case of
11342         a discriminated iterable type.
11344 2014-02-19  Vincent Celier  <celier@adacore.com>
11346         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
11347         imported library projects with the library ALI dirs, when setting
11348         the object paths.
11349         * prj-env.ads (Ada_Objects_Path): Correct comments about
11350         argument Including_Libraries.
11352 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
11354         * gnat_rm.texi: Minor spelling fixes.
11356 2014-02-19  Doug Rupp  <rupp@adacore.com>
11358         * init.c: Remove unneeded code.
11359         * fe.h (Float_Format): New macro
11360         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
11362 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11364         * sem_prag.adb (Check_Refined_Global_Item):
11365         A state or variable acts as a constituent only it is part of an
11366         encapsulating state and the state has visible refinement.
11368 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11370         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
11371         postcondition for a function when the expression does not mention
11372         'Result but the function has in-out parameters.
11374 2014-02-19  Robert Dewar  <dewar@adacore.com>
11376         * gnat_rm.texi: Add documentation on Value_Size forcing biased
11377         representation.
11379 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11381         * lib-xref.ads Remove the small table of letter and symbol usage as we
11382         already have one.
11384 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11386         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
11387         messages depending on the offending misplaced aspect specifications.
11388         (Diagnose_Misplaced_Aspect_Specifications): New routine.
11390 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11392         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
11393         for iterable aspect primitives.
11394         (Resolve_Iterable_Operation): Use expected signature of iterable
11395         aspect to resolve primitive when overloading is present.
11396         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
11397         (Check_Signature): Removed.
11399 2014-02-19  Yannick Moy  <moy@adacore.com>
11401         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
11402         subunit in GNATprove_Mode.
11403         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
11405 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11407         * lib-xref.ads Alphabetize the contents of table
11408         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
11409         for E_Abstract_State. List all letters and symbols in use.
11410         * sem_prag.adb (Analyze_Abstract_State): Update all calls
11411         to Create_Abstract_State to reflect the new signature.
11412         (Create_Abstract_State): Change subprogram profile and update
11413         the comment on usage. Use the proper location of the state
11414         declaration when creating a new abstract state entity. Do not
11415         generate an external name, but simply reuse the name coming from
11416         the state declaration.
11418 2014-02-19  Robert Dewar  <dewar@adacore.com>
11420         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
11421         declarations get properly inserted in Modify_Tree_For_C mode.
11422         * sinfo.ads: Minor comment addition.
11424 2014-02-19  Robert Dewar  <dewar@adacore.com>
11426         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
11427         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
11429 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11431         * style.adb (Missing_Overriding): Warning does not apply in
11432         language versions prior to Ada 2005.
11433         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
11434         * sem_attr.adb: Add Attribute_Iterable where needed.
11435         * exp_attr.adb: ditto.
11436         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
11437         handle loops and quantified expressions over types that have an
11438         iterable aspect.  Called from Expand_Iterator_Loop.
11439         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
11440         with Iterable aspect.
11441         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
11442         subprograms specified in the Iterable aspect have the proper
11443         signature involving container and cursor.
11444         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
11445         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
11446         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
11447         New procedure to retrieve one of the primitives First, Last,
11448         or Has_Element, from the value of the iterable aspect of a
11449         formal container.
11450         (Is_Container_Element): Predicate to recognize expressions
11451         that denote an element of one of the predefined containers,
11452         for possible optimization.  This subprogram is not currently
11453         used, pending ARG discussions on the legality of the proposed
11454         optimization. Worth preserving for eventual use.
11455         (Is_Iterator): Recognize formal container types.
11456         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
11458 2014-02-19  Robert Dewar  <dewar@adacore.com>
11460         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
11461         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
11462         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
11463         declarations from list of actions.
11464         * output.ads, output.adb (Delete_Last_Char): New procedure.
11465         * sinfo.ads: Document handling of Mod and expression with actions
11466         in Modify_Tree_For_C mode.
11468 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
11470         * par-ch9.adb (P_Task): Add a null statement to produce a
11471         well-formed task body when due to a previous syntax error the
11472         statement list is empty.
11474 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
11476         * sem_prag.adb (Check_Dependency_Clause): Account
11477         for the case where a state with a non-null refinement matches a
11478         null output list. Comment reformatting.
11479         (Inputs_Match): Copy a solitary input to avoid an assertion failure
11480         when trying to match the same input in multiple clauses.
11482 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
11484         * sem_attr.adb: Minor typo fix.
11486 2014-02-18  Robert Dewar  <dewar@adacore.com>
11488         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
11489         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
11490         (Create_Standard): Create new unsigned types.
11491         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
11492         mode (Expand_N_Reference): Removed, problematic and not needed
11493         for now.
11494         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
11495         not needed for now.
11496         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
11497         * expander.adb: Remove call to Expand_N_Reference (problematic,
11498         and not needed now).
11499         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
11500         * stand.adb: Read and write unsigned type entities.
11501         * stand.ads: Add new unsigned types.
11503 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
11505         * sem_ch4.adb (Analyze_Call): Do not mark a function call
11506         as being inside an assertion expression as the flag is now removed.
11507         (Check_Ghost_Subprogram_Call): Do not query the
11508         In_Assertion_Expression flag as it is now removed, instead use
11509         a predicate function.
11510         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
11511         In_Assertion_Expression flag as it is now removed, instead use
11512         a predicate function.
11513         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
11514         * sem_util.adb Add with and use clause for Sem_Prag.
11515         (In_Assertion_Expression_Pragma): New routine.
11516         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
11517         * sinfo.adb (In_Assertion_Expression): Removed.
11518         (Set_In_Assertion_Expression): Removed.
11519         * sinfo.ads Remove flag In_Assertion_Expression along with its
11520         use in nodes.
11521         (In_Assertion_Expression): Removed along with
11522         pragma Inline.  (Set_In_Assertion_Expression): Removed along
11523         with pragma Inline.
11525 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
11527         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
11528         used together with '-r', '-rf' or '-rnb' options.
11530 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
11532         * sem_attr.adb (Analyze_Attribute): Comment
11533         and code reformatting. Use separate routines to check the
11534         legality of attribute 'Old in certain pragmas. Verify
11535         the use of 'Old, 'Result and locally declared entities
11536         within the prefix of 'Old.
11537         (Check_References_In_Prefix): New routine.
11538         (Check_Use_In_Contract_Cases): New routine.
11539         (Check_Use_In_Test_Case): New routine.
11541 2014-02-18  Vincent Celier  <celier@adacore.com>
11543         * sem_aux.adb (Is_By_Reference_Type): For each components of
11544         a record type, check also if the component is volatile as it
11545         may have an aspect that makes it volatile. If it is, then the
11546         record type is a by reference type.
11548 2014-02-18  Robert Dewar  <dewar@adacore.com>
11550         * exp_attr.adb: Minor reformatting.
11551         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
11552         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
11553         as another case where we don't generate N_Reference nodes for
11554         primitive types.
11555         * expander.adb (Expand): Add call to Expand_N_Reference.
11557 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11559         * sem_prag.adb (Analyze_Refined_Pragma): Remove
11560         local variable Pack_Spec. Refinement pragmas may now apply to
11561         bodies of both visible and private subprograms.
11563 2014-02-06  Robert Dewar  <dewar@adacore.com>
11565         * exp_attr.adb (Expand_Loop_Entry_Attribute):
11566         Minor change (Attr => N) (Expand_Pred_Succ): New name
11567         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
11568         Max): Expand into if expression if Modify_Tree_For_C mode.
11569         (Expand_N_Attribute_Reference, case Min): ditto
11570         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
11571         Max attributes.
11573 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11575         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
11576         predicate check if this is an internal declaration with
11577         No_Initialization set, as for an expanded aggregate component.
11579 2014-02-06  Doug Rupp  <rupp@adacore.com>
11581         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
11582         conditions with severity of "SUCCESS" or "INFORMATIONAL".
11584 2014-02-06  Yannick Moy  <moy@adacore.com>
11586         * sem_prag.adb (Analyze_Pragma): Analyze pragma
11587         Debug rewritten node before rewriting it as a null statement in
11588         GNATprove mode.
11590 2014-02-06  Robert Dewar  <dewar@adacore.com>
11592         * sem_attr.adb (Min_Max): New procedure.
11593         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
11594         procedure.
11596 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
11598         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
11599         gnatmetric/gnatpp.
11601 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11603         * sem_prag.adb (Analyze_Abstract_State): Update
11604         all calls to Create_Abstract_State to pass the proper state
11605         "declaration".
11606         (Create_Abstract_State): Add new formal parameter
11607         State_Decl along with comment on usage. Establish a link between
11608         the abstract state entity and the state declaration.
11610 2014-02-06  Robert Dewar  <dewar@adacore.com>
11612         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
11613         comparison of unordered enumeration type.
11614         (Analyze_Attribute, case Max): Check for improper comparison of
11615         unordered enumeration type.
11616         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
11617         sem_util.adb.
11618         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
11619         Moved here from Sem_Res.
11621 2014-02-06  Robert Dewar  <dewar@adacore.com>
11623         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
11624         reformatting.
11626 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11628         * sem_ch6.adb (Process_Formals): Error message reformatting.
11630 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11632         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
11633         variable Spec. Do not inherit the null indicator from the
11634         subprogram body when generating the spec.
11636 2014-02-06  Robert Dewar  <dewar@adacore.com>
11638         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
11639         mixed case.
11641 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11643         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
11644         when the function has a foreign convention, but not if only the
11645         limited return type has such a convention.
11647 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11649         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
11650         variable Spec. Comment reformatting. Use Copy_Separate_Tree
11651         rather than New_Copy_Tree when building the corresponding
11652         subprogram declaration.
11654 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11656         * sem_prag.adb (Analyze_Global_Item): Remove
11657         the mode-related checks on abstract states with enabled external
11658         properties.
11659         (Property_Error): Removed.
11661 2014-02-06  Javier Miranda  <miranda@adacore.com>
11663         * lib-xref.adb (Generate_Reference): When
11664         generating the reference to the first private entity take care
11665         of handling swapped entities.
11667 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
11669         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11670         gnatmetric.
11672 2014-02-06  Robert Dewar  <dewar@adacore.com>
11674         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
11675         than the word size when operating in Modify_Tree_For_C mode.
11676         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
11678 2014-02-06  Robert Dewar  <dewar@adacore.com>
11680         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
11681         compare is case insensitive.
11682         * gnat_rm.texi: Document that string compare for Warnings Off
11683         is now case insensitive.
11685 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11687         * gnat_rm.texi: Small wording tweak.
11689 2014-02-06  Pascal Obry  <obry@adacore.com>
11691         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
11692         and Included_Artifact_Patterns attribute definitions.
11694 2014-02-06  Yannick Moy  <moy@adacore.com>
11696         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
11697         SPARK_Mode pragma component for all subprograms, including stubs.
11699 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11701         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
11702         the configuration options of the enclosing context in a
11703         stack-like fasion.
11704         (Analyze_Subprogram_Body_Stub): Maintain the
11705         configuration options of the enclosing context in a stack-like
11706         fashion.
11708 2014-02-06  Robert Dewar  <dewar@adacore.com>
11710         * debug.adb: -gnatd.u sets Modify_Tree_For C
11711         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
11712         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
11713         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
11714         * exp_intr.adb (Expand_Shift): Call expander so we do
11715         Modify_Tree_For_C expansions.
11716         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11717         if -gnatd.u set.
11719 2014-02-06  Fedor Rybin  <frybin@adacore.com>
11721         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
11722         after the phase 1 of the processing of each aggregated project
11723         to get access to project trees of aggregated projects.
11724         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
11725         If specified, On_New_Tree_Loaded is called after each aggregated
11726         project has been processed succesfully.
11727         (Process): new parameter On_New_Tree_Loaded.
11728         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
11729         callback added after processing of each aggregated project.
11730         (Recursive_Process): new parameter On_New_Tree_Loaded.
11731         (Process): new parameter On_New_Tree_Loaded.
11732         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
11733         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
11734         On_New_Tree_Loaded.
11735         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
11736         On_New_Tree_Loaded.
11738 2014-02-06  Bob Duff  <duff@adacore.com>
11740         * gnat_ugn.texi: Implement --insert-blank-lines and
11741         --preserve-blank-lines switches.
11743 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
11745         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
11746         gnatelim.
11748 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
11750         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
11751         of the pragma on individual objects.
11753 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11755         * einfo.adb Node29 is now used as BIP_Initialization_Call.
11756         (BIP_Initialization_Call): New routine.
11757         (Set_BIP_Initialization_Call): New routine.
11758         (Write_Field29_Name): Add an entry for constants and variables.
11759         * einfo.ads Add new attribute BIP_Initialization_Call and update
11760         its usage in nodes.
11761         (BIP_Initialization_Call): New routine along with pragma Inline.
11762         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
11763         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
11764         Add local declaration Res_Decl. Capture the build-in-place
11765         initialization call when the related object declaration has
11766         created a transient block.
11767         * exp_ch7.adb (Process_Transient_Objects): Add local variable
11768         Fin_Insrt. Recognize a scenario where an object declaration acts
11769         as a transient context and is initialized by a build-in-place
11770         function call.
11772 2014-02-06  Pascal Obry  <obry@adacore.com>
11774         * prj-util.adb (For_Interface_Sources): Fix handling of required
11775         bodies for aggregate libs.
11777 2014-02-06  Robert Dewar  <dewar@adacore.com>
11779         * nlists.ads: Minor comment clarifications.
11781 2014-02-06  Robert Dewar  <dewar@adacore.com>
11783         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
11784         if gnatd.V set.
11785         * opt.ads (Modify_Tree_For_C): New flag.
11786         * output.ads, output.adb (Last_Char): New function.
11788 2014-02-06  Pascal Obry  <obry@adacore.com>
11790         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
11791         share/gpr for cross-builds.
11793 2014-02-06  Robert Dewar  <dewar@adacore.com>
11795         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
11796         Minor reformatting and code clean ups.
11798 2014-02-06  Pascal Obry  <obry@adacore.com>
11800         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
11801         * prj.ads: Minor typo fix in comment.
11803 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11805         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
11806         local variable Expr. Flag clauses with extra parenthesis as this
11807         is not allowed by the syntax of the pragma. Code reformatting.
11809 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11811         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
11812         variables. Rename variabme Tnn to Temp. Do not create a temporary
11813         if assertions are disabled. Find enclosing routine _Postconditions
11814         and insert the temporary that captures the value of the prefix
11815         before the routine.
11816         * exp_ch6.adb (Build_Postconditions_Procedure):
11817         Insert the generated _Postconditions routine
11818         before the first source declaration of the related
11819         subprogram.
11820         (Insert_After_Last_Declaration): Removed.
11821         (Insert_Before_First_Source_Declaration): New routine.
11823 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11825         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
11826         Utility to determine whether current expansion is for the body
11827         of a predefined primitive operation.
11828         (Make_Predicate_Check): Use Within_Internal_Subpgram
11829         * checks.adb (Apply_Predicate_Check): Use
11830         Within_Internal_Subprogram
11831         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
11833 2014-02-06  Pascal Obry  <obry@adacore.com>
11835         * prj.ads, prj-util.adb: Minor reformatting.
11837 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11839         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
11840         Take into account the Split_PPC flag to ensure that conjuncts
11841         in a composite postcondition aspect are tested in source order.
11843 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11845         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
11846         use of SPARK_Mode.
11847         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
11848         illegal use of SPARK_Mode.
11849         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
11850         * sem_prag.adb (Analyze_Pragma): Code reformatting.
11851         * sem_util.adb Add with and use clause for Aspects.
11852         (Check_SPARK_Mode_In_Generic): New routine.
11853         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
11855 2014-02-06  Thomas Quinot  <quinot@adacore.com>
11857         * a-calend.adb (Formatting_Operations.Split): Ensure that
11858         Time_Error is raised for invalid time values.
11860 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
11862         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
11863         in GNATprove_Mode.
11865 2014-02-06  Robert Dewar  <dewar@adacore.com>
11867         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
11868         * exp_ch3.adb (Build_Dcheck_Function): Set
11869         Is_Discriminant_Check_Function.
11871 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11873         * exp_ch7.adb (Is_Subprogram_Call): Inspect
11874         the original tree in certain cases where a construct has been
11875         factored out and replaced by a reference to a temporary.
11877 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
11879         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
11880         parameters when propagating predicate function to full view.
11881         (Find_Type_Of_Object): Freeze base type of object type to catch
11882         premature use of discriminated private type without a full view.
11884 2014-02-06  Robert Dewar  <dewar@adacore.com>
11886         * sprint.adb: Minor reformatting.
11888 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11890         * exp_ch4.adb (Process_Transient_Object): Add local variable
11891         Temp_Ins. When the transient object is initialized by an
11892         aggregate, the hook must capture the object after the last
11893         component assignment takes place.
11894         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
11895         routine Is_Subprogram_Call.
11896         (Is_Subprogram_Call): Inspect an
11897         aggregate that has been heavily expanded for subprogram calls.
11898         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
11899         and Temp_Ins.  Remove the nested declare block and adjust the
11900         indentation. When the transient object is initialized by an
11901         aggregate, the hook must capture the object after the last
11902         component assignment takes place.
11904 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11906         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
11907         external states with enabled properties that do not match the
11908         global mode.
11909         (Property_Error): New routine.
11910         * sem_res.adb (Property_Error): New routine.
11911         (Resolve_Actuals): Detect illegal uses of external variables with
11912         enabled properties in procedure calls that do not match the mode of
11913         the corresponding formal parameter.
11915 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
11917         * sem_util.adb (Has_Enabled_Property): Rename
11918         formal parameter Prop_Nam to Property. Update the comment on usage
11919         and all occurrences in the body. Add local variable Prop_Nam. When
11920         inspecting a property with an expression, the property name
11921         appears as the first choice of the component association.
11923 2014-02-04  Robert Dewar  <dewar@adacore.com>
11925         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
11927 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11929         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
11930         for consistency with other messages.
11932 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11934         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
11935         iterator, indicate that the element is a constant if the container
11936         type does not have a variable indexing aspect.
11937         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
11938         marked as constant, do not reset its Ekind, to ensure that
11939         container elements in an element loop are not modified if the
11940         container (e.g. a hashed set) only has a constant indexing aspect.
11942 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
11944         * g-souinf.ads: Subprograms in this unit are actually not pure.
11945         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
11946         * einfo.ads (Is_Pure): Update doc to match implementation.
11948 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
11950         * exp_ch13.adb: Minor spelling fix.
11952 2014-02-04  Robert Dewar  <dewar@adacore.com>
11954         * opt.ads: Minor comment update.
11956 2014-02-04  Robert Dewar  <dewar@adacore.com>
11958         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
11959         instead of Replace.
11961 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11963         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
11964         on null expressions if component type is non-null, when the
11965         corresponding association covers an empty range of index values.
11967 2014-02-04  Robert Dewar  <dewar@adacore.com>
11969         * sinfo.ads: Further comments on N_Expression_With_Actions node.
11971 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
11973         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
11974         variables Out_Items and Ref_Global. Remove local constant
11975         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
11976         and D8. Remove the useless collection of global items as this
11977         was a leftover from an earlier version of the routine. Move
11978         several routines out to avoid deep nesting and indentation.
11979         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
11980         parameter Do_Checks to Post_Errors. Update the comment on usage.
11981         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
11982         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
11983         to Post_Errors. Update the comment on usage. Account for the
11984         case where a self referential state may have a null input_list.
11985         (Is_Self_Referential): New routine.
11987 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
11989         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
11990         entity renames an expression, as in the case of an object of
11991         an unconstrained type initialized by a function call, defer the
11992         rewriting of the expression to the expander.
11993         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
11994         'Alignment): If the entity renames an expression, introduce
11995         temporary to capture value, and rewrite original declaration to
11996         use temporary.
11998 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
12000         * g-comlin.adb: Minor typo fix.
12002 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
12004         * freeze.adb (Freeze_All): Types derived from a formal
12005         access_to_classwide type do not have a finalization master.
12007 2014-02-04  Robert Dewar  <dewar@adacore.com>
12009         * sprint.adb: Minor reformatting.
12011 2014-02-04  Robert Dewar  <dewar@adacore.com>
12013         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
12014         cases where Actions is a null list.
12015         * sinfo.ads (N_Expression_With_Actions): Actions can be
12016         temporarily empty during semantic analysis, but must be non-empty
12017         in the final expanded tree.
12019 2014-01-31  Robert Dewar  <dewar@adacore.com>
12021         * exp_ch9.adb: Minor reformatting.
12023 2014-01-31  Emmanuel Briot  <briot@adacore.com>
12025         * g-comlin.adb (Set_Command_Line): Take the switches
12026         configuration from the Command_Line_Config.
12028 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12030         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
12031         refinement clause.
12033 2014-01-31  Vincent Celier  <celier@adacore.com>
12035         * projects.texi: Add more documentation about others used as an
12036         index in indexed attributes.
12038 2014-01-31  Robert Dewar  <dewar@adacore.com>
12040         * gnat_ugn.texi: Minor update.
12041         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
12042         * exp_util.adb: Minor reformatting.
12044 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12046         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
12047         depends on data that is not private to the protected object,
12048         and potentially modifiable in unsynchronized fashion.
12050 2014-01-31  Yannick Moy  <moy@adacore.com>
12052         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
12053         GNATprove_Mode.
12055 2014-01-31  Robert Dewar  <dewar@adacore.com>
12057         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
12058         for Unknown_Package.
12059         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
12061 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12063         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
12064         the logic that generates a runtime check to determine the
12065         controlled status of the object about to be allocated or
12066         deallocated. Class-wide types now always use a runtime check
12067         even if they appear as generic actuals.
12068         (Find_Object): Detect
12069         a special case that involves interface class-wide types because
12070         the object appears as a complex expression.
12072 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12074         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
12075         subprogram with an incomplete untagged formals on the list of
12076         private dependents, to verify that the type is properly completed
12077         in the private part.
12078         * sem_attr.adb: Code clean up.
12080 2014-01-31  Robert Dewar  <dewar@adacore.com>
12082         * exp_ch6.adb: Minor reformatting.
12084 2014-01-31  Vincent Celier  <celier@adacore.com>
12086         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
12087         when Pkg is unknown.
12089 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
12091         * sem_res.adb (Resolve_Entity_Name): Comment
12092         reformatting. Allow volatile objects in various generated checks.
12094 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12096         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
12097         component association, set the etype of the identifier, for
12098         SPARK use.
12100 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
12102         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
12103         declared in a package, not checks can apply to the subprogram.
12105 2014-01-31  Robert Dewar  <dewar@adacore.com>
12107         * erroutc.adb (Validate_Specific_Warnings): Warnings are
12108         controlled -gnatw.W.
12109         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
12110         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
12112 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
12114         * exp_disp.adb: Update comments.
12116 2014-01-31  Yannick Moy  <moy@adacore.com>
12118         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
12119         Save_Global_References): Guard access to expression in aspect.
12121 2014-01-31  Yannick Moy  <moy@adacore.com>
12123         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
12124         Issue an error when the pragma is applied to a generic unit,
12125         a generic declaration, or inside a generic.
12127 2014-01-31  Yannick Moy  <moy@adacore.com>
12129         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
12130         entity.
12132 2014-01-31  Robert Dewar  <dewar@adacore.com>
12134         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
12135         reformatting.
12137 2014-01-31  Tristan Gingold  <gingold@adacore.com>
12139         * exp_disp.adb: Add a historic note.
12141 2014-01-31  Robert Dewar  <dewar@adacore.com>
12143         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
12144         Process_Deferred_References.
12146 2014-01-31  Yannick Moy  <moy@adacore.com>
12148         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
12149         ineffective pragma Warnings(Off) in GNATprove_Mode.
12151 2014-01-31  Bob Duff  <duff@adacore.com>
12153         * s-taskin.ads: Minor comment fix.
12154         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
12155         just direct dependents. If this is actually an abort, each task
12156         will take care of aborting its dependents, so all dependents will
12157         get aborted, as before. However, when this is called the second
12158         time from Vulnerable_Complete_Master "for convenience" (i.e. to
12159         kill off tasks waiting at terminate alternatives), aborting
12160         indirect dependents is wrong, because it causes some unrelated
12161         tasks to get aborted.
12163 2014-01-31  Robert Dewar  <dewar@adacore.com>
12165         * sem_ch4.adb: Minor reformatting.
12167 2014-01-31  Robert Dewar  <dewar@adacore.com>
12169         * exp_ch2.adb: New calling sequence for Is_LHS.
12170         * frontend.adb: Add call to Process_Deferred_References.
12171         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
12172         (Deferred_References): New table.
12173         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
12174         entries.
12175         (Find_Expanded_Name): Ditto.
12176         * sem_res.adb: New calling sequence for Is_LHS.
12177         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
12178         * sem_warn.adb: Call Process_Deferred_References before issuing
12179         warnings.
12181 2014-01-31  Tristan Gingold  <gingold@adacore.com>
12183         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
12184         use of System_Tasking_Protected_Objects_Single_Entry.
12185         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
12186         of Protected_Single_Entry_Call.
12187         (Expand_N_Timed_Entry_Call): Remove single_entry case.
12188         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
12189         single_entry case.
12190         (Make_Disp_Timed_Select_Body): Likewise.
12191         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
12192         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
12193         Self_Id parameter.
12194         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
12195         (Wait_For_Completion_With_Timeout): Remove.
12196         (Protected_Single_Entry_Call): Remove Mode parameter
12197         (always Simple_Call).
12198         (Service_Entry): Remove Self_Id constant (not used anymore).
12199         (Timed_Protected_Single_Entry_Call): Remove.
12200         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
12201         (Protected_Single_Entry_Call): Remove Mode parameter.
12203 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12205         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
12206         * einfo.ads (Get_Pragma): Update the comment on special pragmas
12207         handled by this routine.
12208         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
12209         to the contract of the related subprogram body.
12210         * sem_util.adb (Add_Contract_Item): Handle the insertion of
12211         pragma Refined_Post into the contract of a subprogram body.
12212         * sinfo.ads Update the documentation of node N_Contract.
12213         * sem_res.adb (Resolve_Entity_Name): Add a guard
12214         to detect abstract states and variables only when checking the
12215         SPARK 2014 rules concerning volatile object placement.
12217 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12219         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
12220         null is compatible with any access type.
12222 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12224         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
12225         placement is not in a package.
12227 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12229         * sem_util.adb (Has_Enabled_Property): Compare the character field of
12230         the sole property.
12232 2014-01-29  Robert Dewar  <dewar@adacore.com>
12234         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
12235         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
12236         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
12238 2014-01-29  Robert Dewar  <dewar@adacore.com>
12240         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
12241         * sem_warn.adb (Check_References): Suppress warnings if inside
12242         Initial_Condition pragma.
12244 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12246         * sem_prag.adb (Check_Missing_Part_Of): List all values of
12247         State_Space_Kind for readability reasons. Do not emit an error on
12248         a private item when the enclosing package lacks aspect/pragma
12249         Abstract_State. Do not emit an error on a private package
12250         instantiation when the corresponding generic template lacks
12251         visible state.
12252         (Has_Visible_State): New routine.
12253         * sem_util.adb (Find_Placement_In_State_Space): The visible
12254         declarations of any kind of child units in general act as proper
12255         placement location.
12257 2014-01-29  Robert Dewar  <dewar@adacore.com>
12259         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
12260         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
12261         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
12262         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
12263         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
12264         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
12265         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
12266         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
12267         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
12268         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
12269         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
12270         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
12271         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
12272         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
12273         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
12274         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
12275         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
12276         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
12277         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
12278         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
12279         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
12280         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
12281         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
12282         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
12283         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
12284         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
12285         s-regpat.adb, s-secsta.adb, s-stalib.ads,
12286         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
12287         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
12288         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
12289         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
12290         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
12292 2014-01-29  Robert Dewar  <dewar@adacore.com>
12294         * expander.adb: Minor reformatting.
12296 2014-01-29  Javier Miranda  <miranda@adacore.com>
12298         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
12299         previous patch.
12301 2014-01-29  Javier Miranda  <miranda@adacore.com>
12303         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
12304         that checks if an interface types defines the predefined "="
12305         function because the compiler was erroneously not generating the
12306         predefined "=" primitive as soon as the name of some interface
12307         primitive is "=" (formals were not checked).
12309 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12311         * expander.adb (Expander): In GNATprove mode, do not process
12312         transient scopes: they are in general not created in this mode,
12313         and an attempt to examine them will lead to constraint errors when
12314         processing configuration pragmas that have analyzable expressions.
12316 2014-01-29  Vincent Celier  <celier@adacore.com>
12318         * clean.adb (Gnatclean): Fail if main project is an aggregate
12319         project or if there is an aggregate library project in the
12320         project tree.
12321         * gnatcmd.adb: Fail if the main project is an aggregate project
12322         or if there is an aggegate library project in the project tree.
12323         * make.adb (Initialize): : Fail if main project is an aggregate
12324         project or if there is an aggregate library project in the
12325         project tree.
12326         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
12327         * prj-makr.adb (Initialize): Fail if the main project is an
12328         aggregate project or an aggregate library project.
12330 2014-01-29  Vincent Celier  <celier@adacore.com>
12332         * prj-part.adb (Check_Import_Aggregate): New procedure
12333         to check if an imported project is an aggregate project.
12334         (Parse_Single_Project): Call Check_Import_Aggregate
12335         * projects.texi: Document that aggregate projects cannot be
12336         extended or imported.
12338 2014-01-29  Robert Dewar  <dewar@adacore.com>
12340         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
12341         reformatting and code clean up.
12342         * gnat_ugn.texi: Add documentation section on Atomic Variables
12343         and Optimization.
12345 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12347         * einfo.adb Flag264 is now unused.
12348         (Has_Body_References): Removed.
12349         (Set_Has_Body_References): Removed.
12350         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
12351         * einfo.ads Update the comment on usage of attribute
12352         Body_References. Remove attribute Has_Body_References and its
12353         usage in nodes.
12354         (Has_Body_References): Removed along with pragma Inline.
12355         (Set_Has_Body_References): Removed along with pragma Inline.
12356         * sem_prag.adb (Analyze_Global_Item): Move the call to
12357         Record_Possible_Body_Reference in the state related checks
12358         section. Add a comment intended function.
12359         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
12360         in the state related checks section. Add a comment intended function.
12361         (Analyze_Refinement_Clause): Cleanup the illegal body reference
12362         reporting. Add a comment on timing of error reporting.
12363         (Record_Possible_Body_Reference): Reimplement the routine.
12365 2014-01-29  Vincent Celier  <celier@adacore.com>
12367         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
12368         unit-based languages.
12369         (Mains.Complete_Mains.Do_Complete): Use the source file project
12370         tree when calling Find_File_Add_Extension. Use the correct
12371         project name when reporting an error.
12373 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
12375         * aspects.adb Add an entry for aspect Part_Of in table
12376         Canonical_Aspect.
12377         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
12378         Aspect_Argument, Aspect_Names and Aspect_Delay.
12379         * atree.h Define Elist9.
12380         * atree.adb (Elist9): New routine.
12381         (Set_Elist9): New routine.
12382         * atree.ads (Elist9): New routine.
12383         (Set_Elist9): New routine.
12384         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
12385         the list of node usage.  Remove Refined_State from the list of
12386         node usage.
12387         (Encapsulating_State): New routine.
12388         (Get_Pragma):
12389         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
12390         (Refined_State): Removed.
12391         (Set_Encapsulating_State): New routine.
12392         (Set_Part_Of_Constituents): New routine.
12393         (Set_Refined_State): Removed.
12394         (Write_Field9_Name): Add an entry
12395         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
12396         Encapsulating_State. Remove the entry for Refined_State.
12397         * einfo.ads Add new attributes Encapsulating_State
12398         and Part_Of_Constituents alond with their usage in
12399         entities. Remove attribute Refined_State along with its
12400         usage in entities.
12401         (Encapsulating_State): New routine and
12402         pragma Inline.  (Get_Pragma): Update the comment on usage.
12403         (Part_Of_Constituents): New routine and pragma Inline.
12404         (Refined_State): Removed along with pragma Inline.
12405         (Set_Encapsulating_State): New routine and pragma Inline.
12406         (Set_Part_Of_Constituents): New routine and pragma Inline.
12407         (Set_Refined_State): Removed along with pragma Inline.
12408         * par-prag.adb Pragma Part_Of does not need any special processing
12409         by the parser.
12410         * sem_ch3.adb (Analyze_Declarations): Remove local variables
12411         Body_Id and Prag. Call separate routines to analyze the
12412         contract of a package [body].
12413         (Analyze_Object_Contract):
12414         Update the comment on usage. Remove local variables
12415         Items and Nam. Use Get_Pragma rather than traversing the
12416         classification list.  Verify whether the lack of indicator
12417         Part_Of agrees with the placement of the variable in state space.
12418         (Analyze_Object_Declaration): Initialize the encapsulating state
12419         of a variable.  (Requires_State_Refinement): Moved to sem_util.
12420         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
12421         (Analyze_Package_Contract): New routine.
12422         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
12423         (Analyze_Package_Contract): New routine.
12424         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
12425         state and Part_Of constituents.
12426         * sem_ch13.adb (Analyze_Aspect_Specifications):
12427         Add processing for aspect Part_Of. Update all
12428         calls to Decorate_Delayed_Aspect_And_Pragma.
12429         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
12430         not need any special processing at freeze time.
12431         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
12432         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
12433         update the associated comment.
12434         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
12435         (Analyze_Abstract_State): Add new global variable State_Id. Remove
12436         local constants Errors and Loc. Remove local variables Is_Null
12437         and State_Nam. Create the entity of the abstract state on the
12438         spot, before all remaining checks are performed. Verify that a
12439         missing Part_Of option agrees with the placement of the abstract
12440         state within the state space.
12441         (Analyze_Depends_In_Decl_Part):
12442         Add new global variables Constits_Seen and States_Seen. Check
12443         that a state and a corresponding constituent do not appear
12444         in pragma [Refined_]Depends.
12445         (Analyze_Global_In_Decl_Part):
12446         Add new global variables Constits_Seen and States_Seen. Check
12447         that a state and a corresponding constituent do not appear
12448         in pragma [Refined_]Global.
12449         (Analyze_Global_Item):
12450         Remove the now obsolete code that deals with Part_Of.
12451         Add the entity of the global item to the list of processed
12452         items.  (Analyze_Initializes_In_Decl_Part): Add new global
12453         variables Constits_Seen and States_Seen. Check that a state
12454         and a corresponding constituent do not appear in pragma
12455         Initializes.
12456         (Analyze_Initialization_Item): Add the entity
12457         of the initialization item to the list of processed items.
12458         (Analyze_Input_Item): Add the entity of the initialization
12459         item to the list of processed items.
12460         (Analyze_Input_Output):
12461         Remove the now obsolete code that deals with Part_Of.  Add the
12462         entity of the input/output to the list of processed items.
12463         (Analyze_Part_Of): New routine.
12464         (Analyze_Part_Of_Option): Remove
12465         local constant Par_State. Add local constant Encaps and local
12466         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
12467         the option. Turn the related state into a Part_Of constituent
12468         if the option is legal.
12469         (Analyze_Pragma): Add processing
12470         for pragma Part_Of.
12471         (Analyze_Refined_State_In_Decl_Part):
12472         Remove global constants Pack_Body and Spec_Id. Remove
12473         global variables Abstr_States and Hidden_States. Add new
12474         global variables Available_States, Body_Id, Body_States and
12475         Spec_Id. Add new local constant Body_Decl. Reimplement the
12476         logic that extracts the states available for refinement from
12477         the related package and the body hidden states of the said
12478         package.
12479         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
12480         (Check_Applicable_Policy): Alphabetize body.
12481         (Check_Dependency_Clause): Replace Refined_State
12482         with Encapsulating_State.
12483         (Check_Matching_Constituent):
12484         Reimplement the logic that determines whether an item is a valid
12485         / invalid constituent of the current refined state. Return when
12486         a construct does not denote a valid abstract state. Extract the
12487         list of Part_Of constituents for further analysis. Check that all
12488         Part_Of constituents of a state have been used in its refinement.
12489         (Check_Matching_State): Update the comment on usage. Operate
12490         on the list of available states.
12491         (Check_Missing_Part_Of): New routine.
12492         (Check_Refined_Global_Item): Replace Refined_State
12493         with Encapsulating_State.
12494         (Check_State_And_Constituent_Use): New routine.
12495         (Create_Abstract_State): New routine.
12496         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
12497         (Is_Part_Of): Removed.
12498         (Collect_Body_States): New routine.
12499         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
12500         (Collect_Hidden_States): Removed.
12501         (Report_Unrefined_States): Change the profile of the procedure along
12502         with the comment on usage.
12503         (Report_Unused_Constituents): New routine.
12504         (Report_Unused_Hidden_States): Removed.
12505         (Report_Unused_States): New routine.
12506         * sem_prag.ads (Check_Missing_Part_Of): New routine.
12507         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
12508         appear in the classification pragmas of a package instantiation
12509         or a variable.
12510         (Find_Placement_In_State_Space): New routine.
12511         (Is_Child): Removed.
12512         (Is_Child_Or_Sibling): Remove formal
12513         parameter Private_Child. Remove the private child checks.
12514         (Requires_State_Refinement): Moved from sem_ch3.
12515         * sem_util.ads Add new type State_Space_Kind along with
12516         comment on its usage and values.
12517         (Add_Contract_Item): Update the comment on usage.
12518         (Find_Body_Discriminal): Alphabetize spec.
12519         (Find_Placement_In_State_Space): New routine.
12520         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
12521         and update the comment on usage.
12522         (Requires_State_Refinement): Moved from sem_ch3.
12523         * sinfo.ads: Update the documentation of N_Contract.
12524         * snames.ads-tmpl The predefined name for Part_Of is now used
12525         to denote a pragma. Add Pragma_Id for Part_Of.
12527 2014-01-29  Emmanuel Briot  <briot@adacore.com>
12529         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
12530         machine as needed.
12531         (Dump): New subprogram.
12533 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12535         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
12536         Expand_Entry_Declaration to factorize code.
12538 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12540         * checks.adb: minor clarification.
12541         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
12542         search for primitive operations to the entities that immediately
12543         follow the type declaration.
12545 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12547         * exp_ch9.adb (Build_Protected_Entry): Do not call
12548         Complete_Entry_Body anymore.
12549         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
12550         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
12552 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
12554         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
12555         string when the Name input bigger than allowed. Adapt the function
12556         specification.
12558 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12560         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
12561         if expression is within a case_expression of if_expression.
12563 2014-01-29  Robert Dewar  <dewar@adacore.com>
12565         * exp_ch9.adb, inline.ads: Minor reformatting.
12567 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12569         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
12571 2014-01-29  Yannick Moy  <moy@adacore.com>
12573         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
12574         SPARK_Mode_Pragma components to be able to analyze generic
12575         instance.
12576         * sem_ch12.adb (Analyze_Package_Instantiation,
12577         Inline_Instance_Body, Need_Subprogram_Instance_Body,
12578         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
12579         for future analysis of the instance.
12580         (Instantiate_Package_Body,
12581         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
12582         from instantiation to analyze the instance.
12584 2014-01-29  Robert Dewar  <dewar@adacore.com>
12586         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
12587         reorganization.
12589 2014-01-29  Yannick Moy  <moy@adacore.com>
12591         * gnat_rm.texi: Update description of SPARK_Mode pragma.
12593 2014-01-29  Tristan Gingold  <gingold@adacore.com>
12595         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
12597 2014-01-29  Thomas Quinot  <quinot@adacore.com>
12599         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
12601 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
12603         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
12604         resulting string is an internal entity. and thus requires no
12605         initialization. This is relevant when Initialize_ Scalars is
12606         enabled, because the resultant spurious initialization may lead to
12607         secondary stack anomalies that produce a mangled name for a task.
12609 2014-01-29  Yannick Moy  <moy@adacore.com>
12611         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
12612         not inherited from spec anymore. Check consistency
12613         rules after processing of declarations.
12614         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
12615         from spec anymore. Check consistency rules after processing of
12616         declarations.
12617         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
12618         packages.
12619         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
12620         consistency rules.
12622 2014-01-27  Robert Dewar  <dewar@adacore.com>
12624         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
12625         to unordered msg.
12626         (Resolve_Range): Add type name/location to unordered msg.
12628 2014-01-27  Claire Dross  <dross@adacore.com>
12630         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
12631         Capacity) is only called with Capacity >= Length (Source) and
12632         Capacity in Capacity_Range.
12633         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
12634         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
12635         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
12636         in the code is this is not the case.
12638 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12640         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
12641         selected component in an instance where the component of the
12642         actual is not visibile at instantiation.
12644 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12646         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
12647         has a dynamic predicate, generate freeze node for Actual_Subtype
12648         at once, because the declaration of the corresponding predicate
12649         function will make reference to it.
12651 2014-01-27  Tristan Gingold  <gingold@adacore.com>
12653         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
12655 2014-01-27  Robert Dewar  <dewar@adacore.com>
12657         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
12658         for 2**X optimization.
12660 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12662         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
12663         explicitly whether value is in range of Character, because the
12664         library is typically compiled with range checks disabled, and
12665         we cannot rely on the implicit check on the argument of 'Val.
12667 2014-01-27  Vincent Celier  <celier@adacore.com>
12669         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
12670         not the Target to itself.
12672 2014-01-27  Robert Dewar  <dewar@adacore.com>
12674         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
12675         changes to avoid incorrect use of unordered enum types.
12677 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12679         * sem_ch4.adb: Minor reformatting.
12681 2014-01-27  Robert Dewar  <dewar@adacore.com>
12683         * scn.adb (Check_End_Of_Line): Removed.
12684         (Error_Long_Line): Removed.
12685         (Determine_License): Use versions of above routines from Scanner.
12686         * scng.adb (Check_End_Of_Line): Moved to spec.
12687         (Error_Long_Line): Removed, no longer used.
12688         * scng.ads (Check_End_Of_Line): Moved here from body.
12690 2014-01-27  Tristan Gingold  <gingold@adacore.com>
12692         * exp_ch7.adb (Build_Cleanup_Statements): Call
12693         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
12694         for protected body.
12695         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
12696          Remove Service_Name variable.
12697         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
12698         factorize code from the above subprograms.
12699         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
12701 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
12703         * einfo.adb (Has_Option): Reimplemented.
12704         * sem_prag.adb (Analyze_Refinement_Clause): Add global
12705         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
12706         External_Constit_Seen and State. Add local variables Body_Ref,
12707         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
12708         avoid a cumbersome while pool. Verify the legality of an external
12709         state and relevant properties.
12710         (Check_External_Property): New routine.
12711         (Check_Matching_State): Remove parameter profile
12712         and update comment on usage.
12713         (Collect_Constituent): Store the
12714         relevant external property of a constituent.
12715         * sem_util.adb (Async_Readers_Enabled): Update the call to
12716         Has_Enabled_Property.
12717         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
12718         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
12719         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
12720         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
12721         Update comment on usage. Reimplement the logic to recognize the various
12722         formats of properties.
12724 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12726         * par-ch5.adb: Minor reformatting.
12728 2014-01-27  Tristan Gingold  <gingold@adacore.com>
12730         * s-tposen.ads: Harmonize style and comments.
12732 2014-01-27  Vincent Celier  <celier@adacore.com>
12734         * projects.texi: Document that shared library projects, by
12735         default, cannot import projects that are not shared library
12736         projects.
12738 2014-01-27  Robert Dewar  <dewar@adacore.com>
12740         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
12741         of Rewrite.
12743 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12745         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
12746         any other exception is raised.
12747         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
12748         still necessary to perform a conversion in order to remove overlong
12749         encodings.
12751 2014-01-27  Robert Dewar  <dewar@adacore.com>
12753         * exp_smem.adb: Minor reformatting.
12755 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12757         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
12759 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12761         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
12762         nodes for operands to the original node for the call, to preserve
12763         Original_Node pointers within the resolved operands, given that
12764         they may have been rewritten as well. Previous approach copied
12765         the operands into a new tree and lost those pointers.
12767 2014-01-27  Claire Dross  <dross@adacore.com>
12770         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
12772 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12774         * sem_util.adb (Check_Internal_Protected_Use): A call through
12775         an anonymous access parameter of the current protected function
12776         is not a potential modification of the current object.
12778 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12780         * a-cobove.adb (Reserve_Capacity): Procedure raises
12781         Capacity_Error, not Constraint_Error, when request cannot be
12782         satisfied.
12784 2014-01-27  Vincent Celier  <celier@adacore.com>
12786         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
12787         not the Target to itself.
12789 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12791         * exp_ch4.adb (Expand_Concatenate): If the target of the
12792         concatenation is a library-level entity, always use the off-line
12793         version of concatenation, regardless of optimization level. This
12794         is space-efficient, and prevents linking problems when some
12795         units are compiled with different optimization levels.
12797 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12799         * sem_ch5.adb: Code clean up.
12801 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12803         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
12804         when an array or container iterator includes a subtype indication,
12805         which is only legal in an element iterator.
12807 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12809         * exp_ch7.adb: Minor reformatting.
12811 2014-01-27  Robert Dewar  <dewar@adacore.com>
12813         * opt.adb (SPARK_Mode): Default for library units is None rather
12814         than Off.
12815         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
12816         no longer ordered.
12817         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
12818         possibility.
12819         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
12821 2014-01-27  Robert Dewar  <dewar@adacore.com>
12823         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
12824         Suspicious_Labels table if we have identifier; followed by loop
12825         or block.
12826         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
12827         * par.adb (Suspicious_Labels): New table.
12829 2014-01-27  Robert Dewar  <dewar@adacore.com>
12831         * exp_aggr.adb (Check_Bounds): Reason is range check, not
12832         length check.
12834 2014-01-27  Yannick Moy  <moy@adacore.com>
12836         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
12837         reference.
12838         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
12839         function now.
12840         (Add_SPARK_Xrefs): Include references to constants.
12841         * spark_xrefs.ads Document new character 'c' for references to
12842         constants.
12844 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12846         * exp_smem.adb (Add_Write_After): For a function call, insert write as
12847         an after action in a transient scope.
12849 2014-01-27  Thomas Quinot  <quinot@adacore.com>
12851         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
12852         to a shared variable as an OUT formal in a call to an init proc,
12853         the 'Read call must be emitted after, not before, the call.
12855 2014-01-27  Robert Dewar  <dewar@adacore.com>
12857         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
12859 2014-01-27  Robert Dewar  <dewar@adacore.com>
12861         * a-wichha.adb (Character_Set_Version): Change to output proper
12862         value.
12864 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
12866         * einfo.adb (Is_Input_Only_State): Removed.
12867         (Is_Non_Volatile_State): Removed.
12868         (Is_Output_State): Removed.
12869         * einfo.ads (Is_Input_Only_State): Remove attribute and
12870         subprogram. Update related entity.
12871         (Is_Non_Volatile_State):
12872         Remove attribute and subprogram. Update related entity.
12873         (Is_Output_State): Removed attribute and subprogram. Update
12874         related entity.
12875         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
12876         generated code.
12877         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
12878         an object, not just variables.
12879         (Analyze_Object_Contract): New routine.
12880         (Analyze_Variable_Contract): Removed.
12881         (Process_Discriminants): Detect an illegal use of volatile
12882         discriminant in SPARK mode.
12883         * sem_ch5.adb (Analyze_Iterator_Specification):
12884         Detect an illegal use of volatile loop variable.
12885         (Analyze_Loop_Parameter_Specification): Detect an illegal use
12886         of volatile loop variable.
12887         * sem_ch6.adb (Process_Formals): Update the volatile object
12888         detection. Detect an illegal formal of mode IN OUT or OUT in
12889         SPARK mode. Enhance the error messages with references.
12890         * sem_ch12.adb (Instantiate_Object): Update the volatile object
12891         detection. Enhance the error messages with references.
12892         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
12893         messages with references.
12894         (Analyze_Contract_Case): Enhance the error messages with references.
12895         (Analyze_External_Property): Call Check_Duplicate_Property to process
12896         an external property.
12897         (Analyze_External_Property_In_Decl_Part): New routine.
12898         (Analyze_External_State_In_Decl_Part): Removed.
12899         (Analyze_Global_Item): Detect an illegal
12900         use of a volatile constant. Detect an illegal use
12901         of a variable with enabled Effective_Reads. Enhance
12902         the error messages with references. Remove obsolete
12903         checks concerning Input_Only and Output_Only states.
12904         (Analyze_Initialization_Item): Enhance the error messages
12905         with references.
12906         (Analyze_Initializes_In_Decl_Part): Do not
12907         collect the states and variables when the initialization list
12908         is null.
12909         (Analyze_Input_Item): Enhance the error messages with references.
12910         (Analyze_Input_Output): Enhance the error messages with references.
12911         (Analyze_Pragma): Enhance the error messages with references.
12912         (Analyze_Refinement_Clause): Code reformatting.
12913         (Analyze_Refined_Depends_In_Decl_Part):
12914         Rename global variable Global to Reg_Global and update all
12915         occurrences. Add local variables D7 and D8. Update the error
12916         messages with references. Update the call to Collect_Global_Items.
12917         (Analyze_Refined_Global_In_Decl_Part): Add local variables
12918         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
12919         the call to Collect_Global_Items.  Account for a Proof_In state
12920         in null / useless refinement checks. Verify the coverage of
12921         Proof_In states.
12922         (Check_Dependency_Clause): Remove local variable
12923         Out_Constits. Remove the retrieval and removal of constituents
12924         for an Output_Only state. Remove the reporting of unused
12925         Output_Only state constituents.
12926         (Check_Duplicate_Mode): Enhance
12927         the error message with a reference.
12928         (Check_Duplicate_Property): New routine.
12929         (Check_Duplicate_Option): Enhance the error message with a reference.
12930         (Check_External_Properties): Enhance the error message with a reference.
12931         (Check_Function_Return): Enhance the error message with a reference.
12932         (Check_In_Out_States): Update
12933         comment on usage. Add a specialized error message for Proof_In
12934         constituents. Enhance the error message with a reference.
12935         (Check_Input_States): Update comment on usage. Account for
12936         possible Proof_In constituents. Enhance the error message
12937         with a areference.
12938         (Check_Matching_Constituent): Enhance the error message with a
12939         reference.
12940         (Check_Matching_State): Enchance the error message with a reference.
12941         (Check_Mode): Add local variable From_Global. Update the call to
12942         Find_Mode.  Emit more precise error messages concerning extra items
12943         (Check_Mode_Restriction_In_Enclosing_Context): Consider
12944         pragma Refined_Global.  Enhance the error message with a
12945         reference.
12946         (Check_Mode_Restriction_In_Function): Enhance the error message with
12947         a reference.
12948         (Check_Output_States): Update comment on usage. Add local variable
12949         Posted.  Account for possible Proof_In constituents. Produce a detailed
12950         list of missing constituents.
12951         (Check_Proof_In_States): New routine.
12952         (Check_Refined_Global_Item): Handle Proof_In
12953         constituents. Enchance the error message with a reference.
12954         (Collect_Global_Items): Add formal parameters Proof_In_Items
12955         and Has_Proof_In_State. Update the comment on usage. Account
12956         for Proof_In items.
12957         (Create_Or_Modify_Clause): Enchance
12958         the error message with a reference.
12959         (Find_Mode): Add
12960         formal parameter From_Global. Update the comment on usage.
12961         Detect when the mode is governed by pragma [Refined_]Global.
12962         (Output_Constituents): Removed.
12963         (Report_Extra_Constituents):
12964         Report extra Proof_In constituents.
12965         (Report_Unused_Constituents): Removed.
12966         (Usage_Error): Code reformatting. Enhance the error
12967         messages with reference.
12968         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
12969         (Analyze_External_State_In_Decl_Part): Removed.
12970         * sem_res.adb (Resolve_Actuals): Update the volatile object
12971         detection. Enhance the error message with a reference.
12972         (Resolve_Entity_Name): Update the volatile object
12973         detection. Enhance the error message with a reference.
12974         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
12975         (Is_SPARK_Volatile_Object): New routine.
12976         (Has_Volatile_Component): New routine.
12977         * sem_util.ads (Is_Delegate): Alphabetized.
12978         (Is_SPARK_Volatile_Object): New routine.
12979         (Has_Volatile_Component): New routine.
12980         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
12982 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
12984         * sem_attr.adb: Resolve fully prefix of 'Update.
12986 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
12988         * gnat_rm.texi: Minor clarifications.
12990 2014-01-27  Robert Dewar  <dewar@adacore.com>
12992         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
12993         about call that is generated as part of an Initial_Condition
12994         check.
12995         * sem_prag.adb: Minor spelling correction.
12997 2014-01-27  Robert Dewar  <dewar@adacore.com>
12999         * sem_prag.adb (Set_Convention_From_Pragma): Check that
13000         convention Ghost can only apply to functions.
13001         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
13003 2014-01-27  Robert Dewar  <dewar@adacore.com>
13005         * gnat_ugn.texi: Add Short_Enums to documentation of
13006         -gnatet/-gnateT.
13008 2014-01-27  Robert Dewar  <dewar@adacore.com>
13010         * sem_prag.adb (Analyze_Input_Item): Correct check for input
13011         item in same package.
13012         * sem_util.ads, sem_util.adb (Within_Scope): New function.
13014 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
13016         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
13017         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
13018         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
13019         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
13020         maintained.
13022 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13024         * gcc-interface/Makefile.in: Fix oversight.
13026 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
13028         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
13029         conversion from a thin pointer with a shifted value.
13030         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
13031         read-only flag from the values onto the result.
13032         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
13034 2014-01-25  Tristan Gingold  <gingold@adacore.com>
13036         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
13037         for E_Variable with a pragma Linker_Section.
13039 2014-01-25  Robert Dewar  <dewar@adacore.com>
13041         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
13042         with Default_Value aspect is passed in by copy.
13044 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13046         * set_targ.adb: Set Short_Enums.
13047         * gcc-interface/lang.opt (fshort-enums): New option.
13048         * gcc-interface/misc.c (gnat_handle_option): Handle it.
13049         (gnat_post_options): Do not modify the global settings.
13051 2014-01-24  Robert Dewar  <dewar@adacore.com>
13053         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
13054         function.
13055         (Random_Decimal_Fixed): New generic function.
13056         * s-rannum.ads: Minor comment clarifications.
13058 2014-01-24  Robert Dewar  <dewar@adacore.com>
13060         * back_end.adb: Remove Short_Enums handling (handled in
13061         Ttypes/Get_Targ now) Minor added comments.
13062         * freeze.adb: Change name Short_Enums_On_Target to
13063         Target_Short_Enums.
13064         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
13065         * opt.ads: Minor comment updates.
13066         * sem_ch13.adb: Change name Short_Enums_On_Target to
13067         Target_Short_Enums.
13068         * set_targ.adb: Set Short_Enums from gcc back end.
13069         * set_targ.ads (Short_Enums): New variable.
13070         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
13071         Ttypes/Get_Targ now).
13072         * ttypes.ads (Target_Short_Enums): New constant boolean switch
13074 2014-01-24  Pascal Obry  <obry@adacore.com>
13076         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
13078 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
13080         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
13081         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
13082         stripped off.
13084 2014-01-24  Robert Dewar  <dewar@adacore.com>
13086         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
13088 2014-01-24  Vincent Celier  <celier@adacore.com>
13090         * prj.adb (Add_Aggregated_Project): Do not add a project in
13091         the list if it is already there.
13093 2014-01-24  Yannick Moy  <moy@adacore.com>
13095         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
13096         Correct the search for a subrogram declaration to which a pragma is
13097         attached.
13099 2014-01-24  Bob Duff  <duff@adacore.com>
13101         * gnat_ugn.texi: Document --decimal-grouping and
13102         --based-grouping switches in gnatpp.
13104 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13106         * sinfo.ads: Documentation update.
13108 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13110         * sem_ch3.adb (Constant_Redeclaration): New declaration is
13111         illegal if previous one has an initial expression that is an
13112         aggregate expanded into assignments.
13114 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13116         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
13117         code reorganization to remove spurious warning on a loop with
13118         an array element iterator that has a null range.
13120 2014-01-24  Vincent Celier  <celier@adacore.com>
13122         * make.adb (Binding_Phase): When setting the Ada paths, use
13123         the library ALI dir, not the object dir in libraries.
13125 2014-01-24  Yannick Moy  <moy@adacore.com>
13127         * sinfo.ads: Add documentation of check flag fields.
13129 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13131         * sem_res.adb (Resolve_Actuals): If an actual is a view
13132         conversion of a discriminated object, and the formal type is
13133         discriminated and constrained, apply a discriminant check to
13134         the object itself.
13136 2014-01-24  Robert Dewar  <dewar@adacore.com>
13138         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
13140 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13142         * sem_ch3.adb (Analyze_Declarations): At the end of an
13143         appropriate declarative part, call Freeze_All from the first
13144         declaration in the scope, not from the first unfrozen one. This
13145         is necessary to apply visibility checks to entities with delayed
13146         aspects. Otherwise, in the presence of instantiations and cleanups
13147         that they may generate, the delayed aspects may be analyzed too
13148         late and produce spurious visibility errors.
13149         * sem_attr.adb: Place etype on range.
13150         * sem_ch6.adb: Documentation expression functions.
13152 2014-01-24  Robert Dewar  <dewar@adacore.com>
13154         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
13155         terminology in compiler).
13157 2014-01-24  Robert Dewar  <dewar@adacore.com>
13159         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
13160         categories, now that Ada 95 supports raise expressions.
13162 2014-01-24  Robert Dewar  <dewar@adacore.com>
13164         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
13165         Short_Enums_On_Target.
13166         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
13167         into account.
13168         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
13170 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13172         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
13173         indication is given explicity, check that it matches the array
13174         component type or the container element type of the domain
13175         of iteration.
13177 2014-01-24  Tristan Gingold  <gingold@adacore.com>
13179         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
13180         * gcc-interface/misc.c (flag_short_enums): Declare.
13181         (gnat_post_options): Set it.
13183 2014-01-24  Vincent Celier  <celier@adacore.com>
13185         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
13186         to cache the result when Including_Libraries is False.
13187         * prj-env.ads (Ada_Objects_Path): Update documentation
13188         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
13189         (Get_Object_Directory): Return the Library_Ali_Dir only when
13190         when Including_Libraries is True.
13191         * prj.ads (Get_Object_Directory): Fix and complete documentation
13192         (Project_Data): New component Ada_Objects_Path_No_Libs
13194 2014-01-24  Robert Dewar  <dewar@adacore.com>
13196         * checks.adb (Expr_Known_Valid): Result of fpt operator never
13197         considered valid.
13199 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13201         * back_end.adb: Minor fix in comment.
13203 2014-01-24  Javier Miranda  <miranda@adacore.com>
13205         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
13206         required to report the error in case of task types.
13208 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13210         * sem_attr.adb: Additional index checking.
13212 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13214         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
13215         expressions in each component association, and for records note
13216         the entity in each association choice, for subsequent resolution.
13217         (Resolve_Attribute, case 'Update): Complete resolution of
13218         expressions in each component association.
13220 2014-01-24  Robert Dewar  <dewar@adacore.com>
13222         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
13223         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
13224         leading to wrong handling of SPARK_Mode for library units).
13226 2014-01-24  Robert Dewar  <dewar@adacore.com>
13228         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
13229         on generic instances (do not consider them to be internally
13230         generated)
13232 2014-01-24  Doug Rupp  <rupp@adacore.com>
13234         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
13235         vice pthread_sigmask.
13237 2014-01-24  Vincent Celier  <celier@adacore.com>
13239         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
13240         not default.
13242 2014-01-24  Vincent Celier  <celier@adacore.com>
13244         * prj-ext.adb (Add): Do not output anything when Silent is True,
13245         whatever the verbosity. When Source is From_External_Attribute,
13246         set the corresponding environment variable if it is not already set.
13247         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
13248         to False
13249         * prj-proc.adb (Process_Expression_For_Associative_Array):
13250         For attribute External, call Prj.Ext.Add with Silent set to
13251         True for the child environment, to avoid useless output in non
13252         default verbosity.
13254 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13256         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
13257         range given by a subtype indication, and force evaluation of
13258         the bounds, as for a simple range.
13259         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
13260         of bounds of slice for various kinds of discrete ranges.
13261         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
13262         Evaluate_Slice_Bounds.
13264 2014-01-24  Bob Duff  <duff@adacore.com>
13266         * s-taskin.ads (Activator): Make this Atomic, because
13267         Activation_Is_Complete reads it, and that can be called
13268         from any task. Previously, this component was only
13269         modified by the activator before activation, and by
13270         Self after activation.
13271         * a-taside.ads, a-taside.adb (Environment_Task,
13272         Activation_Is_Complete): Implement these missing functions.
13274 2014-01-24  Doug Rupp  <rupp@adacore.com>
13276         * init.c: Add a handler section for Android.
13278 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
13280         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
13282 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13284         * sem_ch4.adb (Operator_Check): If one operand is a
13285         Raise_Expression, set its type to that of the other operand.
13286         * sem_res.adb (Resolve_Raise_Expression): new procedure.
13287         (Resolve_Actuals): For an actual that is a Raise_Expression,
13288         set the type to that of the formal.
13289         * sem_type.adb (Find_Unique_Type): If one of the operands is a
13290         Raise_Expression, return type of the other operand.
13292 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13294         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
13295         component of the record has a type with a default aspect, and
13296         the corresponding aggregate component is initiaized with a box,
13297         use the default value in the rewritten aggregate.
13299 2014-01-24  Tristan Gingold  <gingold@adacore.com>
13301         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
13302         s-interr-sigaction.adb,
13303         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
13304         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
13305         to the call to Install_Restricted_Handlers.
13307 2014-01-24  Emmanuel Briot  <briot@adacore.com>
13309         * prj-nmsc.adb (Check_File): Add protection when the source is
13310         not fully initialized.
13312 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
13314         * sem_util.adb (Is_Post_State): In a postcondition, a selected
13315         component that denotes an implicit dereference is a reference
13316         to the post state of the subprogram.
13318 2014-01-24  Robert Dewar  <dewar@adacore.com>
13320         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
13321         for generated subprograms.
13322         (Analyze_Subprogram_Specification): Ditto.
13324 2014-01-24  Vincent Celier  <celier@adacore.com>
13326         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
13327         attributes in package Builder of aggregate and aggregate library
13328         projects.
13329         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
13330         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
13331         Remove parameters.  Change error message from "... externally
13332         build library ..." to "... externally built project ...".
13333         (Process_Naming_Scheme.Check): Do not do any check in aggregate
13334         project, as attribute Library_Dir and Library_Name have already
13335         been detected as forbidden.
13337 2014-01-24  Vincent Celier  <celier@adacore.com>
13339         * prj-env.adb (Find_Project): If cached project path is not in
13340         project directory, look in current directory first and use cached
13341         project path only if project is not found in project directory.
13343 2014-01-24  Robert Dewar  <dewar@adacore.com>
13345         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
13347 2014-01-24  Vincent Celier  <celier@adacore.com>
13349         * projects.texi: Document that aggregate projects are only
13350         supported by gprbuild, but not by gnatmake.  Document that the
13351         only attribute Switches in package Binder of aggregate projects
13352         will be ignored if its index is not others.  Document that
13353         attribute Global_Config_File is allowed in package Binder of
13354         aggregate projects.
13356 2014-01-24  Robert Dewar  <dewar@adacore.com>
13358         * sem_prag.adb: Minor code reorganization.
13359         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
13361 2014-01-24  Pascal Obry  <obry@adacore.com>
13363         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
13364         attribute definition.
13366 2014-01-24  Vincent Celier  <celier@adacore.com>
13368         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
13369         in the Queue the same source (same path, same multi-source index)
13370         from the same project file, to avoid compiling several times
13371         the same source.
13373 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
13375         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
13376         (Has_Gigi_Rep_Item): Likewise.
13377         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
13378         Has_Gigi_Rep_Item for objects.
13379         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
13380         (prepend_one_attribute): ...this.
13381         (prepend_one_attribute_pragma): New function extracted from...
13382         (prepend_attributes): ...here.  Swap the parameters for consistency.
13383         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
13384         prepend_attributes.
13385         <object>: Deal with a pragma Linker_Section on a constant
13386         or variable.  <E_Function>: Deal with a pragma Linker_Section
13387         on a subprogram.
13388         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
13390 2014-01-24  Vincent Celier  <celier@adacore.com>
13392         * opt.ads: Minor comment update.
13394 2014-01-24  Robert Dewar  <dewar@adacore.com>
13396         * sem_prag.adb (Analyze_Input_Output): Add missing error check
13397         for junk operand.
13398         * sem_util.adb (Is_Refined_State): Add defense against junk
13399         tree from error.
13401 2014-01-24  Pascal Obry  <obry@adacore.com>
13403         * projects.texi: Removes Build_Slaves attribute documentation.
13405 2014-01-23  Robert Dewar  <dewar@adacore.com>
13407         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
13408         setting.
13410 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13412         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
13413         applies to expressions that come from source.
13414         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
13415         message.
13416         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
13417         rule regarding potentially unevaluated expressions, to prefix
13418         of attribute.
13420 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13422         * exp_util.adb (Make_Invqriant_Call): If type of expression is
13423         a private extension, get invariant from base type.
13425 2014-01-23  Robert Dewar  <dewar@adacore.com>
13427         * sem_util.adb, sem_attr.adb: Minor reformatting.
13429 2014-01-23  Robert Dewar  <dewar@adacore.com>
13431         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
13432         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
13433         * sem.adb (Semantics): Remove save/restore of
13434         SPARK_Mode[_Pragma]. Not needed since already done in
13435         Save/Restore_Opt_Config_Switches.
13437 2014-01-23  Robert Dewar  <dewar@adacore.com>
13439         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
13440         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
13441         Linker_Section enhancements.
13443 2014-01-23  Tristan Gingold  <gingold@adacore.com>
13445         * gnat_rm.texi: Minor editing.
13447 2014-01-23  Robert Dewar  <dewar@adacore.com>
13449         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
13450         with'ed internal units.
13451         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
13453 2014-01-23  Javier Miranda  <miranda@adacore.com>
13455         * lib-xref.adb (Generate_Reference): As part of processing the
13456         "end-of-spec" reference generate an extra reference to the first
13457         private entity of the package.
13458         * xr_tabls.adb (Add_Reference): No action needed for the extra
13459         'E' reference associated; similar to the processing of the
13460         'e' reference.
13462 2014-01-23  Bob Duff  <duff@adacore.com>
13464         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
13466 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13468         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
13469         predicate to implement rule given in 6.1.1 (20/3).
13470         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
13471         'Old in a postcondition, if it is potentially unevaluated and
13472         it is not an entity name.
13474 2014-01-23  Bob Duff  <duff@adacore.com>
13476         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
13478 2014-01-23  Robert Dewar  <dewar@adacore.com>
13480         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
13481         msg on VMS.
13483 2014-01-23  Bob Duff  <duff@adacore.com>
13485         * g-dynhta.ads: Minor comment fix.
13487 2014-01-23  Yannick Moy  <moy@adacore.com>
13489         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
13490         from spec on body only when not already inherited on spec. Set
13491         SPARK_Mode from context on body without previous spec.  *
13492         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
13493         library-level entities.  Correct retrieval of entity from
13494         declaration, for cases where the declaration is not a unit.
13495         * sem_ch12.adb (Instantiate_Object): Avoid
13496         calling Is_Volatile_Object on an empty node.
13498 2014-01-23  Robert Dewar  <dewar@adacore.com>
13500         * gnatlink.adb (Gnatlink): Check for suspicious executable file
13501         names on windows.
13503 2014-01-23  Robert Dewar  <dewar@adacore.com>
13505         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
13506         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
13507         style errors in instances.
13508         * g-dynhta.ads (Static_HTable): Comment updates.
13510 2014-01-23  Vincent Celier  <celier@adacore.com>
13512         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
13513         to find a configuration project file when Config_File_Name is
13514         No_Configuration_File.
13515         * prj-conf.ads (No_Configuration_File): New constant String.
13516         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
13517         with Config_File_Name set to No_Configuration_File, so that
13518         no existing configuration project file will be used, and the
13519         configuration project will be only created in memory when
13520         Add_Default_GNAT_Naming_Scheme is called.
13521         * projects.texi: Minor reformatting.
13523 2014-01-23  Vincent Celier  <celier@adacore.com>
13525         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
13526         a config project file if On_Load_Config is not null.
13527         * prj-pars.adb: Minor comment changes.
13529 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
13531         * lib-xref.adb (Output_References): Output progenitors of
13532         synchronized tagged types, for source navigation.
13534 2014-01-23  Robert Dewar  <dewar@adacore.com>
13536         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
13537         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
13538         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
13540 2014-01-23  Emmanuel Briot  <briot@adacore.com>
13542         * prj-conf.adb (Get_Or_Create_Configuration_File): call
13543         On_Load_Config later.
13545 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
13547         * sem_ch3.adb (Analyze_Declarations): Do not
13548         generate the spec of the late primitive in ASIS mode. Add two
13549         comments to explain the special cases when the expansion is
13550         not performed.
13552 2014-01-23  Robert Dewar  <dewar@adacore.com>
13554         * sem_util.adb (Note_Possible_Modification): Fix error of
13555         misbehaving for implicit dereference cases in -gnatc mode.
13557 2014-01-23  Emmanuel Briot  <briot@adacore.com>
13559         * prj-pars.adb: Minor reformatting.
13561 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13563         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
13564         body generated for an expression function within a protected body
13565         needs a set of renaming declarations if the expression function
13566         comes from source.
13568 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13570         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
13571         list interface progenitor of a tagged concurrent type, for better
13572         source navigation.
13574 2014-01-22  Robert Dewar  <dewar@adacore.com>
13576         * lib.adb (In_Extended_Main_Code_Unit): Return False for
13577         Standard_Location.
13578         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
13579         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
13580         treatment of Slocs No_Location and Standard_Location.
13581         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
13582         check for entity with Standard_Location Sloc, rather than relying
13583         on Lib routines to do that.
13584         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
13585         that a call cannot occur before a later occuring body within
13586         the same unit.
13588 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13590         * rtsfind.adb: Update comment.
13592 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
13594         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
13595         * sem_ch3.adb (Analyze_Declarations): Add local variable
13596         Body_Seen. Generate the spec of a late controlled
13597         primitive body that is about to freeze its related type.
13598         (Handle_Late_Controlled_Primitive): New routine.
13600 2014-01-22  Robert Dewar  <dewar@adacore.com>
13602         * a-stream.adb: Minor reformatting.
13604 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13606         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
13607         sub-procedure Declared_In_Actual to handle properly the visibility
13608         of actuals in actual packages, that are themselves actuals to a
13609         actual package of the current instance. This mimics properly the
13610         visibility of formals of formal packages declared with a box,
13611         within the corresponding generic unit.
13613 2014-01-22  Robert Dewar  <dewar@adacore.com>
13615         * checks.adb: Do not assume that a volatile variable is valid.
13617 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13619         * g-catiio.ads (Image, Value): Clarify that these functions
13620         operate in the local time zone.  Minor documentation update.
13622 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13624         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
13626 2014-01-22  Robert Dewar  <dewar@adacore.com>
13628         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
13629         Moved to sem_aux.adb.
13631 2014-01-22  Robert Dewar  <dewar@adacore.com>
13633         * vms_data.ads: Minor reformatting.
13635 2014-01-22  Robert Dewar  <dewar@adacore.com>
13637         * debug.adb: Document messages affected by -gnatd.E including
13638         the new ones that relate to late definition of equality.
13639         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
13640         debug flag -gnatd.E is set, then generate warnings rather than
13641         errors.
13642         (Check_Untagged_Equality): In earlier versions of Ada,
13643         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
13645 2014-01-22  Robert Dewar  <dewar@adacore.com>
13647         * sem_prag.adb (Usage_Error): Output additional messages for
13648         unconstrained OUT parameters lacking an input dependency.
13650 2014-01-22  Robert Dewar  <dewar@adacore.com>
13652         * sem_ch4.adb: Minor reformatting.
13654 2014-01-22  Robert Dewar  <dewar@adacore.com>
13656         * restrict.ads: Minor reformatting.
13657         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
13658         forbids a call from within a subprogram to the same subprogram.
13660 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13662         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
13663         stream attributes for Stream_Element_Array.
13664         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
13665         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
13666         defined in the current scope.
13668 2014-01-22  Robert Dewar  <dewar@adacore.com>
13670         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
13672 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13674         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
13676 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13678         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
13679         declaration initialized with a function call, whose type
13680         has variable size, need to remove side effects so that the
13681         initialization expression becomes a dereference of a temporary
13682         reference to the function result.
13684 2014-01-22  Yannick Moy  <moy@adacore.com>
13686         * errout.adb (Initialize): Remove trick to add dummy entry
13687         in Warnings table.
13688         * erroutc.adb (Set_Warnings_Mode_Off,
13689         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
13690         command line switch.
13691         * opt.ads (Warning_Mode): Document behavior
13692         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
13694 2014-01-22  Robert Dewar  <dewar@adacore.com>
13696         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
13698 2014-01-22  Robert Dewar  <dewar@adacore.com>
13700         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
13701         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
13702         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
13703         case Storage_Size): call Check_Pool_Size_Clash.
13705 2014-01-22  Robert Dewar  <dewar@adacore.com>
13707         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
13708         sem_eval.ads: Minor reformatting.
13710 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13712         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
13713         Any_Composite to prevent cascaded errors.
13715 2014-01-22  Yannick Moy  <moy@adacore.com>
13717         * errout.adb (Initialize): Do not insert special entry in Warnings
13718         table in GNATprove_Mode.
13719         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
13720         GNATprove_Mode.
13721         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
13722         warnings anymore.
13724 2014-01-22  Robert Dewar  <dewar@adacore.com>
13726         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
13727         initializes case.
13729 2014-01-22  Robert Dewar  <dewar@adacore.com>
13731         * snames.ads-tmpl: Update header.
13733 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13735         * exp_util.adb (Insert_Actions): When inserting actions on a
13736         short circuit operator that has already been analyzed, do not park
13737         actions in node; instead introduce an N_Expression_With_Actions
13738         and insert actions immediately.
13739         Add guard for unexpected case of climbing up through statement
13740         in Actions list of an N_Expression_With_Actions.
13741         * sem_elab.adb (Insert_Elab_Check): Remove complex
13742         specialized circuitry for the case where the context is already
13743         analyzed, as it is not needed and introduces irregularities in
13744         finalization. Instead rely on the above change to Insert_Actions
13745         to ensure that late insertion on short circuit operators works
13746         as expected.
13748 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13750         * sem_ch4.adb (Operator_Check): Improve error message when an
13751         operand of concatenation is an access type.
13753 2014-01-22  Thomas Quinot  <quinot@adacore.com>
13755         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
13756         cascaded error.
13758 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
13760         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
13761         of an expanded name in a proper body, whose prefix is a package
13762         in the context of the proper body, when there is a homonym of
13763         the package declared in the parent unit.
13765 2014-01-22  Robert Dewar  <dewar@adacore.com>
13767         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
13768         msg if errors found.
13769         (Check_One_Unit): Same change.
13771 2014-01-22  Robert Dewar  <dewar@adacore.com>
13773         * ug_words: Add missing/wrong entries for VMS warning switches.
13774         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
13776 2014-01-22  Jerome Guitton  <guitton@adacore.com>
13778         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
13779         arm.
13781 2014-01-22  Robert Dewar  <dewar@adacore.com>
13783         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
13785 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
13787         * gcc-interface/Makefile.in: Minor fixes.
13789 2014-01-21  Robert Dewar  <dewar@adacore.com>
13791         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
13792         * par-ch5.adb (P_Condition): New version with expression prescanned.
13793         * par.adb (P_Condition): New version with expression prescanned.
13795 2014-01-21  Robert Dewar  <dewar@adacore.com>
13797         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
13798         if Address is not a private type.
13799         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
13800         Ignore pragma if System.Address is not a private type.
13802 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13804         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
13805         uninitialized value.
13807 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13809         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
13811 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13813         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
13814         the value of Assertions_Enabled flag when compiling an instance of
13815         an internal unit. This facilitates the use of pre/postconditions
13816         in generic internal units, such as the new elementary function
13817         libraries.
13819 2014-01-21  Robert Dewar  <dewar@adacore.com>
13821         * exp_aggr.adb: Minor reformatting.
13822         * sem_attr.adb: Minor reformatting.
13823         * sem_res.adb: Minor comment addition.
13824         * einfo.adb: Minor comment updates.
13825         * freeze.adb: Minor reformatting and code reorganization.
13827 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13829         * par-ch4.adb (P_If_Expression): Handle more gracefully an
13830         elsif clause that does not have an else part.
13832 2014-01-21  Robert Dewar  <dewar@adacore.com>
13834         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
13835         * gcc-interface/Makefile.in: clean up target pairs.
13837 2014-01-21  Pascal Obry  <obry@adacore.com>
13839         * projects.texi: Minor typo fix.
13841 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13843         * freeze.adb (Check_Component_Storage_Order): If a record type
13844         has an explicit Scalar_Storage_Order attribute definition clause,
13845         reject any component that itself is of a composite type and does
13846         not have one.
13848 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13850         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
13851         can be used to generate proper cross-reference information for
13852         the parent units of proper bodies.
13854 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13856         * exp_pakd.adb (Expand_Packed_Element_Set,
13857         Expand_Packed_Element_Reference): No byte swapping required in
13858         the front-end for the case of a reverse storage order array,
13859         as this is now handled uniformly in the back-end.  However we
13860         still need to swap back an extracted element if it is itself a
13861         nested composite with reverse storage order.
13863 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13865         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
13866         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
13867         include "others".
13869 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
13871         * gnat_ugn.texi: Minor updates.
13873 2014-01-21  Thomas Quinot  <quinot@adacore.com>
13875         * exp_pakd.adb: Update comment, minor reformatting.
13877 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13879         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
13880         object check when SPARK_Mode is on.
13881         * sem_ch6.adb (Process_Formals): Trigger the volatile object
13882         check when SPARK_Mode is on.
13883         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
13884         check when SPARK_Mode is on.
13885         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
13886         corresponding pragma of aspect SPARK_Mode in the visible
13887         declarations of a package declaration.
13888         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
13889         check when SPARK_Mode is on.
13890         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
13891         check when SPARK_Mode is on.
13892         (Resolve_Entity_Name): Trigger
13893         the volatile object check when SPARK_Mode is on.
13895 2014-01-21  Robert Dewar  <dewar@adacore.com>
13897         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
13898         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
13900 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
13902         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
13903         object is declared, it is rewritten as a renaming of an dynamic
13904         expression that wraps the initial value.  The renaming declaration
13905         is first given an internal name, to prevent collisions with the
13906         entity already declared, and then the name is modified to reflect
13907         the original one. the modification of the name must preserve
13908         the source location of the original, to prevent spurious errors
13909         when compiling with style checks if the declaration involves
13910         more than one entity.
13912 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
13914         * aspects.adb Add entries for Async_Readers, Async_Writers,
13915         Effective_Reads and Effective_Writes in table Canonical_Aspect.
13916         * aspects.ads Add entries for Async_Readers, Async_Writers,
13917         Effective_Reads and Effective_Writes in tables Aspect_Id,
13918         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
13919         * atree.adb (Ekind_In): New version with 8 parameters.
13920         (Node34): New routine.
13921         (Set_Node34): New routine.
13922         * atree.ads (Ekind_In): New version with 8 parameters.
13923         (Node34): New routine.
13924         (Set_Node34): New routine.
13925         * einfo.adb Contract is now Node34.
13926         (Contract): Update the assertion and node usage.
13927         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
13928         Effective_Reads and Effective_Writes.
13929         (Set_Contract): Update the assertion and node usage.
13930         (Write_Field24_Name): Remove the output for a contract.
13931         (Write_Field34_Name): Add output for a contract.
13932         * einfo.ads Contract is now Node34. Update the comment on
13933         attribute usage and related node structures.
13934         (Get_Pragma): Update the comment on usage.
13935         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
13936         Effective_Reads and Effective_Writes do not require special
13937         processing by the parser.
13938         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
13939         (Analyze_Declarations): Analyze the contract of a variable at
13940         the end of the declarative region.
13941         (Analyze_Object_Declaration): Create a contract for a variable.
13942         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
13943         of classification pragmas.
13944         (Process_Formals): Detect an illegal
13945         use of a volatile object as a formal in a function.
13946         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
13947         a volatile object as an actual in generic instantiation.
13948         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
13949         Effective_Reads and Effective_Writes in table Sig_Flags.
13950         (Analyze_External_State_In_Decl_Part): New routine.
13951         (Analyze_Global_Item): Detect an illegal use of a volatile object
13952         as a global item of a function.
13953         (Analyze_Pragma): Reimplement
13954         pragma Abstract_State. Add support for pragmas Async_Readers,
13955         Async_Writers, Effective_Reads and Effective_Writes.
13956         (Check_External_Properties): New routine.
13957         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
13958         (Check_External_Properties): New routine.
13959         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
13960         volatile object as an actual in a call.
13961         (Resolve_Entity_Name):
13962         Add local variables Par, Prev and Usage_OK. Detect illegal
13963         contexts of volatile objects.
13964         * sem_util.adb (Add_Contract_Item): Add support for
13965         pragmas associated with the contract of a variable.
13966         (Async_Readers_Enabled): New routine.
13967         (Async_Writers_Enabled): New routine.
13968         (Effective_Reads_Enabled): New routine.
13969         (Effective_Writes_Enabled): New routine.
13970         (Has_Enabled_Property):
13971         New routine.
13972         (Is_Unchecked_Conversion_Instance): New routine.
13973         (Is_Volatile_Object): Add support for entities that may denote
13974         a volatile object.
13975         * sem_util.ads (Add_Contract_Item): Update the
13976         comment on usage.
13977         (Async_Readers_Enabled): New routine.
13978         (Async_Writers_Enabled): New routine.
13979         (Effective_Reads_Enabled): New routine.
13980         (Effective_Writes_Enabled): New routine.
13981         (Is_Unchecked_Conversion_Instance): New routine.
13982         * sinfo.ads Update the comment on the structure of N_Contract.
13983         * snames.ads-tmpl Add predefined names for Async_Readers,
13984         Async_Writers, Effective_Reads and Effective_Writes. Add
13985         pragma ids for Async_Readers, Async_Writers, Effective_Reads
13986         and Effective_Writes.
13988 2014-01-21  Robert Dewar  <dewar@adacore.com>
13990         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
13991         * sem_eval.adb (Compile_Time_Known_Value): Remove special
13992         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
13993         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
13994         (Test_Foldable): Add CRT_Safe parameter
13995         * sem_eval.ads (Compile_Time_Known_Value): Remove special
13996         handling of CRT mode.
13997         (CRT_Safe_Compile_Time_Known_Value): New function.
13999 2014-01-21  Robert Dewar  <dewar@adacore.com>
14001         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
14002         with pragma or aspect that applies to package spec or subprogram
14003         spec.
14005 2014-01-21  Robert Dewar  <dewar@adacore.com>
14007         * exp_aggr.adb: Minor reformatting.
14009 2014-01-21  Johannes Kanig  <kanig@adacore.com>
14011         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
14013 2014-01-21  Bob Duff  <duff@adacore.com>
14015         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
14017 2014-01-21  Steve Baird  <baird@adacore.com>
14019         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
14021 2014-01-21  Vincent Celier  <celier@adacore.com>
14023         * prj-part.adb (Parse_Single_Project): Accept to extend a project
14024         if it has only be imported by an project being extended. When a
14025         project that has only been imported by a project being extended
14026         is imported by another project that is not being extended,
14027         reset the previous indication, so that it will be an error if
14028         this project is extended later.
14029         * prj-tree.adb (Create_Project): Include component From_Extended
14030         in table Projects_HT
14031         * prj-tree.ads (Project_Name_And_Node): New Boolean component
14032         From_Extended
14034 2014-01-21  Robert Dewar  <dewar@adacore.com>
14036         * atree.ads, atree.adb: Add Node33 and Set_Node33.
14037         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
14038         New field (SPARK_Pragma_Inherited): New flag
14039         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
14040         Removed.
14041         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
14042         * opt.ads (SPARK_Mode_Pragma): New global variable.
14043         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
14044         * sem_ch3.adb: Use new SPARK_Mode data structures.
14045         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
14046         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
14047         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
14048         (Pop_Scope): Restore SPARK_Mode_Pragma.
14049         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
14050         new data structures.
14052 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14054         * back_end.adb: Undo previous change, not needed. Minor reformatting.
14056 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14058         * exp_ch5.adb: Fix comment.
14059         * switch-c.adb: Minor comment update.
14060         * exp_ch3.adb: Minor reformatting.
14062 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14064         * back_end.adb (Scan_Compiler_Arguments): Do not store object
14065         filename in gnatprove mode.
14067 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14069         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
14070         suppresses usage of primitive _assign for tagged types).
14071         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
14072         No_Ctrl_Actions for a tagged type that does not require
14073         finalization, as we want to disable usage of _assign (which
14074         may cause undesirable discriminant checks on an uninitialized,
14075         invalid target).
14077 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14079         * sem_prag.adb: Reject invariant'class on completion.
14081 2014-01-21  Javier Miranda  <miranda@adacore.com>
14083         * exp_ch3.adb (Build_Init_Procedure): For
14084         derivations of interfaces, do not move the the initialization
14085         of the _parent field since such assignment is not generated.
14087 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14089         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
14090         with the operator it renames if we are within an expression of
14091         a pre/postcondition, because the expression will be reanalyzed
14092         at a later point, and the analysis of the renaming may affect
14093         the visibility of the operator when in an instance.
14095 2014-01-21  Robert Dewar  <dewar@adacore.com>
14097         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
14098         Add this flag to type conversion nodes and assignment nodes.
14099         * treepr.adb: Deal properly with Flag 1,2,3.
14100         * treeprs.adt: Minor comment update.
14102 2014-01-21  Robert Dewar  <dewar@adacore.com>
14104         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
14105         parameter.
14106         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
14107         parameter, completely rewrite spec.
14109 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14111         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
14112         instance that is inlined, it may have been rewritten as a wrapper
14113         package. In that case the unit that must be made visible is the
14114         related instance of the package.
14116 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14118         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
14119         previous change in codepeer mode.
14121 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14123         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
14124         call to Abort_Undefer, as expected by the runtime.
14125         * s-tasren.adb (Local_Complete_Rendezvous): Replace
14126         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
14127         deferred at this point. Update comments.
14129 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14131         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
14133 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14135         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
14136         remove from doc.
14138 2014-01-21  Robert Dewar  <dewar@adacore.com>
14140         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
14142 2014-01-21  Thomas Quinot  <quinot@adacore.com>
14144         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
14145         this is value is used in Node_Id arithmetic operations.
14146         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
14147         instead of hard-coded unrolled code.
14149 2014-01-21  Yannick Moy  <moy@adacore.com>
14151         * gnat1drv.adb: Minor code cleanup, removing useless code.
14153 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
14155         * opt.ads (SPARK_Switches_File_Name): New.
14156         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
14157         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
14158         * gnat_ugn.texi: Document -gnates.
14160 2014-01-21  Yannick Moy  <moy@adacore.com>
14162         * errout.adb (Special_Msg_Delete): Update comment. Remove
14163         special case for GNATprove which should not ignore mismatch
14164         in sizes for representation clauses.
14165         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
14166         which should not ignore pragma Pack.
14168 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14170         * sem_ch4.adb: Code clean up.
14172 2014-01-21  Steve Baird  <baird@adacore.com>
14174         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
14176 2014-01-21  Robert Dewar  <dewar@adacore.com>
14178         * gcc-interface/gigi.h: Get Flags array address.
14179         * gcc-interface/trans.c: Acquire Flags array address.
14180         * atree.adb: Add support for Flags array and Flag0,1,2,3.
14181         * atree.ads: Add support for Flags array and Flag0,1,2,3.
14182         * atree.h: Add support for Flags array and Flag0,1,2,3.
14183         * back_end.adb: Pass Flags array address to gigi.
14185 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14187         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
14188         reference to generated body so that legality checks on stream
14189         attributes are properly applied. If type is tagged and already
14190         frozen, insert generated body at the point of the renaming
14191         declaration.
14193 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
14195         * sem_ch12.adb: Code clean up.
14196         * sem_ch8.adb: Minor reformatting
14198 2014-01-20  Robert Dewar  <dewar@adacore.com>
14200         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
14201         converting warnings on inevitable exceptions to errors.
14202         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14203         converting warnings on inevitable exceptions to errors.
14204         * opt.adb (SPARK_Mode_Config): Handled like other config flags
14205         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
14206         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
14207         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
14208         New flag (Config_Switches_Type): Add SPARK_Mode field
14209         * sem.adb: Minor code reorganization (remove unnecessary with)
14210         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
14211         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14212         converting warnings on inevitable exceptions to errors.
14213         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
14214         converting warnings on inevitable exceptions to errors.
14215         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
14216         converting warnings on inevitable exceptions to errors.
14217         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
14218         converting warnings on inevitable exceptions to errors.
14219         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
14220         from spec if needed
14221         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
14222         from spec if needed
14223         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
14224         Restore SPARK_Mode
14225         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
14226         converting warnings on inevitable exceptions to errors.
14227         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
14228         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
14229         of Get_SPARK_Mode_Id
14230         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
14231         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
14232         converting warnings on inevitable exceptions to errors.
14233         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
14234         converting warnings on inevitable exceptions to errors.
14235         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
14236         SPARK_Mode_Type
14238 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14240         * sem_ch13.adb: Add semantic information to rewritten type
14241         reference.
14243 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14245         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
14246         are of a type with unknown discriminants, convert both to the
14247         underlying view of the type, so that the proper constraint check
14248         can be applied to the right-hand side.
14250 2014-01-20  Robert Dewar  <dewar@adacore.com>
14252         * atree.adb (Copy_Node): Fix failure to copy last component
14253         (Exchange_Entities): Fix failure to exchange last entity
14255 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14257         * sem_ch12.adb: Code clean up.
14259 2014-01-20  Robert Dewar  <dewar@adacore.com>
14261         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
14263 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14265         * sem_ch4.adb (Analyze_Quantified_Expression): If after
14266         pre-analysis  the loop parameter specification has been
14267         rewritten as a iterator specification, propagate the change to
14268         the quantified expression, for ASIS navigtion needs.
14270 2014-01-20  Vincent Celier  <celier@adacore.com>
14272         * par-ch10.adb: Minor error message change: escape [ and ].
14274 2014-01-20  Robert Dewar  <dewar@adacore.com>
14276         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
14277         * errout.adb: Implement [ and ] insertion characters.
14278         * errout.ads: Document new [ and ] insertion characters.
14279         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
14280         addition of ??? comment.
14281         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
14282         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
14283         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
14284         Make warnings on exceptions into errors in GNATprove mode.
14285         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
14286         in error messages.
14288 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14290         * sem_ch13.adb: Code clean up.
14292 2014-01-20  Robert Dewar  <dewar@adacore.com>
14294         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
14295         messages.
14296         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
14297         error in GNATprove mode.
14299 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14301         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
14302         reference 'Old takes no parameters, and thus can appear as a
14303         prefix of a slice.
14305 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14307         * exp_aggr.adb: Fix minor typos.
14309 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14311         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
14312         instance the attribute is legal, and its value is determined
14313         statically if the type has no discriminants. This choice is
14314         more useful than rechecking the legality rule in the instance,
14315         is consistent with older usage, and is also consistent with all
14316         existing tests.
14318 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14320         * sem_cat.adb (Validate_Static_Object_Name): Change error into
14321         warning in Relaxed_Semantic_Mode.
14323 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14325         * sem_attr.adb: Code and comments cleanup.
14327 2014-01-20  Yannick Moy  <moy@adacore.com>
14329         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
14330         * errout.adb (Compilation_Errors): Remove special handling in
14331         GNATprove mode.
14332         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
14333         removed debug flags.
14334         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
14335         Global, Initial_Condition, Initializes and Refined_State pragmas and
14336         aspects.
14337         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
14338         SPARK_Strict_Mode): Remove global flags.
14339         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
14340         always performed now, on packages declaring a null state.
14341         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
14342         at providing pedantic mode for bounds of integer types.
14343         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
14344         "some" quantified expression now issued under control of -gnatw.t,
14345         like the other warning on unused bound variable.
14346         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
14347         on removed flag.
14348         (Analyze_Pragma): Remove tests for SPARK 2014
14349         pragmas, not officially allowed by GNAT.
14351 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14353         * sem_prag.adb (Analyze_Pragma): Ensure that
14354         the sole argument of pragmas Abstract_State, Contract_Cases,
14355         Depends, Global and Initializes in in aggregate form.
14356         (Analyze_Refined_Pragma): Ensure that the sole argument of
14357         pragmas Refined_Depends, Refined_Global and Refined_State is in
14358         aggregate form.
14359         (Ensure_Aggregate_Form): New routine.
14361 2014-01-20  Doug Rupp  <rupp@adacore.com>
14363         * sem_attr.adb (Analyze_Attribute): case
14364         Attribute_Constrained => treat all prefixes as legal for Declib
14365         compatibility.
14367 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14369         * sem_prag.adb (Check_Mode): Reimplement the routine.
14370         (Find_Mode): New routine.
14372 2014-01-20  Robert Dewar  <dewar@adacore.com>
14374         * sem_ch4.adb (Operator_Check): Handle additional
14375         Allow_Integer_Address cases.
14377 2014-01-20  Robert Dewar  <dewar@adacore.com>
14379         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
14380         allowed if address is non-private, no longer true.
14381         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14382         Remove check for address being private, causes difficulty when
14383         pragma used in gnat.adc file and is not needed, since we guard
14384         this in Address_Integer_Convert_OK.
14385         * exp_ch7.adb: Minor reformatting.
14386         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
14388 2014-01-20  Robert Dewar  <dewar@adacore.com>
14390         * checks.adb (Apply_Range_Check): Remove gnatprove special
14391         casing of exponentiation.
14392         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
14393         operand for integer case to check range against Natural.
14395 2014-01-20  Robert Dewar  <dewar@adacore.com>
14397         * s-tataat.adb: Minor reformatting.
14399 2014-01-20  Robert Dewar  <dewar@adacore.com>
14401         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
14402         entities, and also fix documentation to remove mention of visible
14403         integer type, since this is not what the implementation does.
14404         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
14405         entities, and also fix documentation to remove mention of visible
14406         integer type, since this is not what the implementation does.
14407         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
14408         function.
14409         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
14410         case for parameter type check.
14411         * sem_res.adb (Resolve): Use new function
14412         Address_Integer_Convert_OK.
14413         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
14414         reformatting throughout.
14415         * sem_util.adb (Address_Integer_Convert_OK): New function.
14416         * sem_util.ads: Minor reformatting (put specs in alpha order)
14417         (Address_Integer_Convert_OK): New function.
14419 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14421         * exp_ch7.adb (Wrap_Transient_Expression):
14422         Insertion extra conditional expression only if
14423         Opt.Suppress_Control_Flow_Optimizations is set.
14425 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14427         * s-tataat.adb (Initialize_Attributes): Abort might already be
14428         deferred in Create_Task.
14430 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14432         * checks.adb (Apply_Scalar_Range_Check): Flag
14433         the exponent as requiring a range check when the expression is
14434         an exponentiation.
14436 2014-01-20  Fedor Rybin  <frybin@adacore.com>
14438         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
14440 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14442         * sem_util.adb (Default_Initialization): New routine.
14443         * sem_util.ads: Add new type Default_Initialization_Kind.
14444         (Default_Initialization): New routine.
14446 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14448         * sem_prag.adb (Check_Mode): Correct all error
14449         message logic dealing with in/in out parameters that may appear
14450         as inputs or have a self reference.
14452 2014-01-20  Robert Dewar  <dewar@adacore.com>
14454         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
14455         * sem_res.adb (Resolve): Fix error causing infinite loop for
14456         integer used as address. Allow addresses as integers.
14458 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14460         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
14462 2014-01-20  Bob Duff  <duff@adacore.com>
14464         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
14465         error when "use all" is not followed by "type".
14467 2014-01-20  Bob Duff  <duff@adacore.com>
14469         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
14470         followed by free.
14472 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14474         * checks.adb (Apply_Address_Clause_Check): If there is an
14475         alignment check on the expression in an address clause, and there
14476         is no local exception propagation, add an additional explanatory
14477         message to clarify the cause of previous warning.
14479 2014-01-20  Robert Dewar  <dewar@adacore.com>
14481         * exp_ch7.adb: Minor reformatting.
14482         * opt.ads: Minor comment updates.
14483         * sem.adb: Minor name change Is_Main_Unit =>
14484         Is_Main_Unit_Or_Main_Unit_Spec.
14485         * sem_ch6.adb: Minor reformatting and code reorganization.
14487 2014-01-20  Bob Duff  <duff@adacore.com>
14489         * gnat_ugn.texi: Update gnatpp switches.
14491 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14493         * exp_ch9.adb: Minor comment edit.
14495 2014-01-20  Robert Dewar  <dewar@adacore.com>
14497         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
14498         only if System.Address is a private type.
14499         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
14500         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
14501         Allowed only if type System.Address is private, since otherwise
14502         it makes no sense.
14503         * sem_res.adb: Fix failure to properly Analyze unchecked
14504         conversions that were introduced by Allow_Integer_Address.
14505         * switch-c.adb: Remove -gnates switch.
14506         * usage.adb: Remove -gnates switch.
14507         * gnat_ugn.texi: Remove documentation of -gnates flag.
14509 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14511         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
14512         resolve expression to perform proper name capture.
14514 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14516         * sem.adb (Semantics): When saving/restoring configuration
14517         switches, the spec of a pre- defined unit that is the main unit
14518         must be treated as a predefined unit as well.
14520 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14522         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
14523         expression, insert an extra conditional expression when saving
14524         the value of the expression, for the benefit of control flow
14525         graph based coverage analysis.
14526         * exp_ch3.adb: Minor reformatting.
14528 2014-01-20  Robert Dewar  <dewar@adacore.com>
14530         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
14531         * gnat_rm.texi: Document pragma Allow_Integer_Address.
14532         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
14533         * opt.ads: New flag Allow_Integer_Address.
14534         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
14535         * sem_ch5.adb: Minor reformatting.
14536         * sem_prag.adb: Implement pragma Allow_Integer_Address.
14537         * sem_res.adb (Resolve): Allow integer address value if
14538         switch set.
14539         * sem_util.adb: Minor reformatting.
14540         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
14541         * switch-c.adb: Recognize flag -gnates.
14542         * usage.adb: Document flag -gnates.
14544 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14546         * s-tadeca.adb: Fix minor typos in comment.
14548 2014-01-20  Pascal Obry  <obry@adacore.com>
14550         * s-win32.ads (FreeLibrary): New import.
14552 2014-01-20  Robert Dewar  <dewar@adacore.com>
14554         * sem_res.adb, sem_cat.adb: Minor reformatting.
14555         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
14556         assigning to OUT parameters for the current subprogram scope.
14557         * exp_ch4.adb: Minor reformatting.
14559 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14561         * exp_ch4.adb (Process_Transient_Object,
14562         Find_Enclosing_Contexts): If the top-level if-expression that
14563         generated the transient object is an actual in a call, the proper
14564         Hook_Context is a construct enclosing the call.
14565         * einfo.ads: Indicate that Related_Expression is used to link a
14566         loop variable to the container expression over which the loop
14567         takes place.
14568         (Analyze_Iterator_Specification): Set the Related_Expression of
14569         the loop variable in a container element iterator.
14570         (Note_Possible_Modification): If the variable is the loop
14571         variable in a container element iterator, indicate that the
14572         enclosing container is also modified.
14574 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14576         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
14578 2014-01-20  Robert Dewar  <dewar@adacore.com>
14580         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
14581         Minor reformatting and code clean up.
14583 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14585         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
14586         of objects of private type if Relaxed_RM_Semantics.
14588 2014-01-20  Claire Dross  <dross@adacore.com>
14590         * a-cofove.ads (Vector): Capacity discriminant
14591         should be in range of the index.
14593 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14595         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
14596         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
14597         possible difference between epoch of Ada.Calendar clock and Ada
14598         real-time/tasking clock.
14599         * s-taprop-posix.adb: Minor comment fix.
14601 2014-01-20  Doug Rupp  <rupp@adacore.com>
14603         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
14605 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14607         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
14608         checks on the prefix of attribute 'Old.
14609         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
14610         generation of validity checks on a range that belongs to the
14611         iteration scheme of a quantified expression.
14612         * sem_ch5.adb (One_Bound): Suppress the generation of validity
14613         checks on a bound that belongs to the iteration scheme of a
14614         quantified expression, generate the check in all other cases.
14616 2014-01-20  Bob Duff  <duff@adacore.com>
14618         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
14620 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14622         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
14623         interpretations that do not come from other predefined units,
14624         to prevent spurious ambiguities in the presence of user-defined
14625         operators in the context of (an instance of) a predefined unit.
14627 2014-01-20  Robert Dewar  <dewar@adacore.com>
14629         * gnat_rm.texi: Document that Loop_Variant is included in
14630         Statement_Assertions.
14631         * sem_prag.adb (Check_Kind): Add Loop_Variant to
14632         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
14633         to Statement_Assertions.
14635 2014-01-20  Doug Rupp  <rupp@adacore.com>
14637         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
14638         for errno ENOENT from RTP on NFS mounted file system.
14640 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
14642         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
14643         examine code that does not come from source. The check does not
14644         apply to code generated for constraint checks, and such code may
14645         generate spurious error messages when compiled with expansion
14646         disabled (as in a generic unit) because side effects may not
14647         have been removed.
14648         2) Make error messages more explicit: indicate the component
14649         of the  construct whose value is indeterminate because of a
14650         call to a function with in-out parameter in another component,
14651         when there is no mandated order of execution between the two
14652         components (actuals, aggregate components, alternatives).
14654 2014-01-20  Robert Dewar  <dewar@adacore.com>
14656         * gnat_rm.texi: Minor cleanup.
14658 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14660         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
14661         can now apply to a refined postcondition.
14662         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
14663         variable Result_Seen. Add variables Case_Prag, Post_Prag,
14664         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
14665         whether postconditions and/or constract-cases mention attribute
14666         'Result and introduce a post-state when applied to functions.
14667         (Check_Result_And_Post_State): Removed.
14668         * sem_prag.adb (Analyze_Pragma): Add local variable
14669         Result_Seen. Verify that the expression of pragma Refined_Post
14670         mentions attribute 'Result and introduces a post-state.
14671         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
14673 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14675         * exp_ch7.adb (Is_Subprogram_Call): New routine.
14676         (Process_Transient_Objects): Make variable Must_Hook global with
14677         respect to all locally declared subprograms. Search the context
14678         for at least one subprogram call.
14679         (Requires_Hooking): Removed.
14681 2014-01-20  Claire Dross  <dross@adacore.com>
14683         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
14684         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
14685         External_Axiomatization);
14687 2014-01-20  Robert Dewar  <dewar@adacore.com>
14689         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
14690         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
14691         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
14692         Allow Loop_Entry to be used in these pragmas if they appear in
14693         an appropriate context.
14694         (Placement_Error): Specialize error
14695         message for pragma Assert[_And_Cut] or pragma Assume containing
14696         Loop_Entry attribute.
14697         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
14698         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
14699         and code clean ups.
14701 2014-01-20  Robert Dewar  <dewar@adacore.com>
14703         * gnat1drv.adb: Minor comment update.
14705 2014-01-20  Tristan Gingold  <gingold@adacore.com>
14707         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
14708         variables, comment out unused code.
14709         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
14710         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
14711         * s-excmac-arm.ads: New file.
14713 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14715         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
14716         Drange and Index_Typ. Remove the circuitry which creates a
14717         range check to compare the index type of the array against the
14718         discrete_range.
14719         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
14720         the circuitry which creates a range check to handle a
14721         discrete_range denoted by a subtype indication.
14723 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
14725         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
14726         nodes to get the original sloc range.
14728 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14730         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
14731         entity of a [library level] package.
14733 2014-01-20  Tristan Gingold  <gingold@adacore.com>
14735         * raise-gcc.c (exception_class_eq): New function.
14736         (is_handled_by): Use it to compare exception classes.
14737         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
14738         be called to return URC_CONTINUE_UNWIND.
14739         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
14740         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
14742 2014-01-20  Robert Dewar  <dewar@adacore.com>
14744         * opt.ads: Minor comment update.
14746 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14748         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
14749         constants to the "Local variables" area. Add new constant D. Add
14750         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
14751         to Pref_Typ and update all occurrences. Add circuitry to extract
14752         the discrete_range and the index type and build a range check.
14754 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14756         * gnat1drv.adb (Adjust_Global_Switches): Enable
14757         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
14758         is set.
14760 2014-01-20  Thomas Quinot  <quinot@adacore.com>
14762         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
14764 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14766         * sem_ch13.adb (Analyze_Aspect_Specifications):
14767         When aspect SPARK_Mode appears on a package body, insert the
14768         generated pragma at the top of the body declarations.
14770 2014-01-20  Robert Dewar  <dewar@adacore.com>
14772         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
14773         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
14774         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
14775         sem_ch8.adb, exp_dist.adb: Minor reformatting.
14777 2014-01-20  Yannick Moy  <moy@adacore.com>
14779         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
14780         mode.
14782 2014-01-20  Pascal Obry  <obry@adacore.com>
14784         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
14785         write scheme).
14786         * g-arrspl.adb: Adapt all routine to this new implementation.
14787         (Set): Copy the Slice_Set definition before reusing it.
14789 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
14791         * sem_prag.adb (Process_Import_Or_Interface): In
14792         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
14793         (Analyze_Pragma): Ditto for pragma Export.
14794         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
14795         Import style.
14797 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14799         * einfo.ads: E_Abstract_State is now part of the entities that
14800         can be overloaded. Update type Overloadable_Kind to reflect the
14801         inclusion of abstract states.
14802         * sem_ch6.adb (New_Overloaded_Entity): A function can now
14803         overload an abstract state.
14804         * sem_prag.adb (Analyze_Constituent): Handle the overloading
14805         of states by functions. Use Entity_Of to obtain the entity of
14806         a constituent.  (Analyze_Global_Item): Handle the overloading of
14807         states by functions.
14808         (Analyze_Initialization_Item): Handle the
14809         overloading of states by functions.  Use Entity_Of to obtain the
14810         entity of an item.
14811         (Analyze_Input_Item): Handle the overloading
14812         of states by functions. Use Entity_Of to obtain the entity of an item.
14813         (Analyze_Input_Output): Handle the overloading of states by functions.
14814         (Analyze_Refinement_Clause): Handle the overloading
14815         of states by functions.  Use Entity_Of to obtain the entity of an item.
14816         (Appears_In): Use Entity_Of to obtain the entity of an element.
14817         (Check_Usage): Use Entity_Of to obtain the entity of
14818         an item. Add a guard to prevent a crash due to a previous error.
14819         (Resolve_State): New routine.
14821 2014-01-20  Yannick Moy  <moy@adacore.com>
14823         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
14824         opt.ads: Minor comments updates.
14826 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
14828         * einfo.adb (Non_Limited_View): Applies to abstract states.
14829         (Set_From_Limited_With): Applies to abstract states.
14830         (Set_Non_Limited_View): Applies to abstract states.
14831         (Write_Field17): Output the non-limited view of an abstract state.
14832         * einfo.ads: Update the comment on usage and occurrences in
14833         nodes for attributes From_Limited_With and Non_Limited_View.
14834         * sem_aux.adb (Available_View): This routine can now handle
14835         abstract states.
14836         * sem_aux.ads (Available_View): This routine can now handle
14837         abstract states. Update the comment on usage.
14838         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
14839         of states and variables.
14840         (In_Pragmas_Depends_Or_Global): New routine.
14841         * sem_ch10.adb (Build_Limited_Views): Implement
14842         abstract (limited) views of variables and states.
14843         (Build_Shadow_Entity): This routine is now a procedure. Add
14844         formal parameter Shadow. Update the comment on usage. Add
14845         context-specific decoration for states and variables.
14846         (Decorate_State): New routine.  (Decorate_Variable): New routine.
14847         (Find_And_Process_States): New routine.
14848         (Process_Declarations): Renamed to Process_Declarations_And_States.
14849         (Process_Declarations_And_States): Add formal parameters
14850         Pack and Create_Abstract_Views. Update the comment on usage.
14851         (Process_States): New routine.
14852         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
14853         views of states and variables. Match the abstract view of a state
14854         against its corresponding non-abstract view.
14855         (Is_Matching_Input):
14856         Handle abstract views of states and variables. Match the abstract
14857         view of a state against its corresponding non-abstract view.
14858         (Process_Global_Item): Handle abstract views of states and
14859         variables.
14861 2014-01-20  Bob Duff  <duff@adacore.com>
14863         * sem_ch10.adb (Expand_With_Clause): Don't
14864         recurse on the prefix if the current with-ed name refers to a
14865         package that renames its own parent, eg "package P.Q renames P;".
14867 2014-01-20  Yannick Moy  <moy@adacore.com>
14869         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
14870         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
14871         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
14872         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
14873         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
14874         Expander_Active.
14876 2014-01-20  Yannick Moy  <moy@adacore.com>
14878         * sinfo.ads Update documentation of GNATprove mode.
14880 2014-01-20  Yannick Moy  <moy@adacore.com>
14882         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
14883         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
14884         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
14885         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
14886         GNATprove_Mode.
14887         * sem_ch13.adb: Remove blank.
14888         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
14889         subprograms by alias for renamings, not for inherited primitive
14890         operations.
14891         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
14892         in GNATprove mode.
14893         (Remove_Side_Effects): Apply the removal in
14894         GNATprove mode, for the full analysis of expressions.
14895         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
14896         mode.
14897         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
14898         save/restore actions for Expander_Active flag in GNATprove mode,
14899         similar to what is done in ASIS mode.
14900         * frontend.adb (Frontend): Generic bodies are instantiated in
14901         GNATprove mode.
14902         * gnat1drv.adb (Adjust_Global_Switches): Set operating
14903         mode to Check_Semantics in GNATprove mode, although a light
14904         expansion is still performed.
14905         (Gnat1drv): Set Back_End_Mode to
14906         Declarations_Only in GNATprove mode, and later on special case
14907         the GNATprove mode to continue analysis anyway.
14908         * lib-writ.adb (Write_ALI): Always generate ALI files in
14909         GNATprove mode.
14910         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
14911         Expander_Active.
14912         (SPARK_Mode): Renamed as GNATprove_Mode.
14913         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
14914         tree in GNATprove_Mode.
14915         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
14916         body in GNATprove mode.
14917         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
14918         mode.
14919         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
14920         Make sure side effects are removed in GNATprove mode.
14922 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14924         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
14925         for aliased objects with an unconstrained nominal subtype.
14926         * gcc-interface/trans.c (Call_to_gnu): Likewise.
14927         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
14928         <case N_Op_Minus>: Remove useless code.
14929         (Exception_Handler_to_gnu_zcx): Minor tweaks.
14931 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14933         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
14934         Tidy up.  For a subtype with discriminants and variant part, if a
14935         variant is statically selected and the fields all have a constant
14936         position, put them in order of increasing position.  Likewise if
14937         no variant part but representation clause is present.
14938         * gcc-interface/utils.c (make_packable_type): Robustify.
14939         (maybe_pad_type): Use local variable and tidy up condition.  If no
14940         alignment is specified, use the original one.
14941         (create_type_stub_decl): Minor tweak.
14942         (convert) <case VECTOR_CST>: Fix typo.
14943         <case CONSTRUCTOR>: Deal with padding types around the same type.
14944         Do not punt on missing fields.
14945         (unchecked_convert): Call finish_record_type to lay out the special
14946         record types made for conversions from/to problematic integer types.
14947         Bump the alignment of CONSTRUCTORs before converting them to a more
14948         aligned type.
14950 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
14952         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
14953         obsolete code for type_annotate_only mode, simplify code and slightly
14954         improve wording of comments.
14956 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
14958         PR ada/59772
14959         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
14960         as intermediate type.
14961         (UI_To_gnu): Likewise.
14963 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
14965         * gnatvsn.ads (Current_Year): Bump to 2014.
14967 2014-01-02  Tobias Burnus  <burnus@net-b.de>
14969         * gnat_ugn.texi: Bump @copying's copyright year.
14971 Copyright (C) 2014 Free Software Foundation, Inc.
14973 Copying and distribution of this file, with or without modification,
14974 are permitted in any medium without royalty provided the copyright
14975 notice and this notice are preserved.