* gnat_rm.texi: Clean up for makeinfo 5.2.
[official-gcc.git] / gcc / ada / ChangeLog
blob613d2db5528dab3e159aa6b5c18848f345c94198
1 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
3         * gnat_rm.texi: Clean up for makeinfo 5.2.
5 2014-07-19  David Wohlferd  <dw@LimeGreenSocks.com>
7         * gnat_rm.texi (Machine Code Insertions): Clean up.
9 2014-07-18  Robert Dewar  <dewar@adacore.com>
11         * exp_ch7.adb: Minor reformatting.
13 2014-07-18  Claire Dross  <dross@adacore.com>
15         * sem_aux.ads (Get_Binary_Nkind): New function that returns
16         the Node_Kind value of an entity defining a binary operator.
17         (Get_Unary_Nkind): New function that returns the Node_Kind value
18         of an entity defining a unary operator.
20 2014-07-18  Pascal Obry  <obry@adacore.com>
22         * sysdep.c: comment update.
23         * adaint.c (__gnat_fputwc): Use wchar_t on a limited set of
24         platforms where it is known to be supported.
26 2014-07-18  Thomas Quinot  <quinot@adacore.com>
28         * sem_dist.adb (Process_Remote_AST_Declaration): Need
29         to set Fat_Type's Ekind in order to be able to use its
30         Corresponding_Remote_Type attribute.
32 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
34         * einfo.adb Last_Aggregate_Assignment is now Node 30.
35         (Last_Aggregate_Assignment): Include
36         constants in the assertion. Update the underlying node.
37         (Set_Last_Aggregate_Assignment): Include constants in the
38         assertion. Update the underlying node.  (Write_Field11_Name):
39         Remove the entry for Last_Aggregate_Assignment.
40         (Write_Field30_Name): Add an entry for Last_Aggregate_Assignment.
41         * einfo.ads Update the node designation and usage of attribute
42         Last_Aggregate_Assignment.
43         * exp_aggr.adb (Expand_Array_Aggregate): Store the last
44         assignment statement used to initialize a controlled object.
45         (Late_Expansion): Store the last assignment statement used to
46         initialize a controlled record or an array of controlled objects.
47         * exp_ch3.adb (Expand_N_Object_Declaration): Default
48         initialization of objects is now performed in a separate routine.
49         (Default_Initialize_Object): New routine.
50         * exp_ch7.adb (Build_BIP_Cleanup_Stmts): Add formal parameter
51         Obj_Id. Update the comment on usage.
52         (Find_Last_Init): Remove formal parameter Typ. Update comment on usage.
53         Reimplement the logic.  (Find_Last_Init_In_Block): New routine.
54         (Is_Init_Call): Add formal parameter Init_Typ. Update the
55         comment on usage.  Account for the type init proc when trying
56         to determine whether a statement is an initialization call.
57         (Make_Adjust_Call): Rename formal parameter For_Parent to
58         Skip_Self. Update all occurrences of For_Parent. Account for
59         non-tagged types. Update the call to Make_Call.
60         (Make_Call): Rename formal parameter For_Parent to Skip_Self. Update
61         comment on usage. Update all occurrences of For_Parent.
62         (Make_Final_Call): Rename formal parameter For_Parent to
63         Skip_Self. Update all occurrences of For_Parent. Account
64         for non-tagged types. Update the call to Make_Call.
65         (Process_Object_Declaration): Most variables and constants are
66         now local to the routine.
67         * exp_ch7.ads (Make_Adjust_Call): Rename formal parameter
68         For_Parent to Skip_Self. Update the comment on usage.
69         (Make_Final_Call): Rename formal parameter For_Parent to
70         Skip_Self. Update the comment on usage.
72 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
74         * sem_ch9.adb (Analyze_Requeue): The entry being referenced
75         can be a procedure that is implemented by entry, and have a
76         formal that is a synchronized interface.  It does not have to
77         be declared as a protected operation.
79 2014-07-18  Robert Dewar  <dewar@adacore.com>
81         * gnat_rm.texi: Remove mention of obsolete attributes
82         Max[_Interrupt]_Priority, which have never been implemented
83         (or at the very least were removed long ago if they ever were
84         implemented.  Add documentation of Max[_Interrupt]_Priority
85         constants in package System.
86         * ttypes.ads: Document actual handling of package System,
87         rather than a historical fantasy version.  Remove mention of
88         non-existent attributes Max[_Interrupt]_Priority.
90 2014-07-18  Pascal Obry  <obry@adacore.com>
92         * a-witeio.adb (Put): No 16-bit character output when text
93         translation is disabled.
94         * i-cstrea.ads: Code clean up.
95 2014-07-18  Robert Dewar  <dewar@adacore.com>
97         * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
98         static attributes.
100 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
102         * a-witeio.adb, initialize.c: Update comments. Minor clean ups.
104 2014-07-18  Pascal Obry  <obry@adacore.com>
106         * adaint.c: Do not include wchar.h on VxWorks.
107         * mingw32.h: Remove obsolete definition.
109 2014-07-18  Pascal Obry  <obry@adacore.com>
111         * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text.
112         * i-cstrea.ads (Content_Encoding): Moved here, add convention C.
113         * s-ficobl.ads (Content_Encoding): Moved to C_Streams.
114         * s-fileio.adb (Open): Adjust to use Content_Encoding from C_Streams.
116 2014-07-18  Pascal Obry  <obry@adacore.com>
118         * a-textio.adb: Rename Is_Text_File to Text_Encoding.
119         * a-ztexio.adb: Likewise.
120         * a-witeio.adb: Likewise.
121         (Open): Pass file's translation mode to set_text_mode.
122         * s-ficobl.ads (Content_Encoding): New type.
123         (Text_Content_Encoding): New subtype.
124         (AFCB): Rename Is_Text_File to Text_Encoding.
125         * s-fileio.adb (Open): Handles new text_translation
126         values. Remove Is_Text_File which is equivalent to Text_Encoding
127         in Text_Content_Encoding.
128         * adaint.h (__gnat_set_mode): New routine.
129         * sysdep.c (__gnat_set_wide_text_mode): Removed.
130         (__gnat_set_mode): New routine.
132 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
134         * gcc-interface/decl.c, gcc-interface/trans.c,
135         gcc-interface/utils.c (Is_Packed_Array_Type): Renamed 
136         Is_Packed_Array_Impl_Type.
138 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
140         * sem_util.adb: Minor typo correction.
142 2014-07-18  Ben Brosgol  <brosgol@adacore.com>
144         * gnat_rm.texi: Complete previous change.
146 2014-07-18  Pascal Obry  <obry@adacore.com>
148         * s-fileio.adb: Minor style fix.
150 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
152         * sem_ch13.adb (Analyze_Aspect_Specifications): Detect improper
153         specification of stream attributes for subtypes that are not
154         first subtypes, to prevent malformed rep_item chains in the case
155         of such illegal specifications for discriminated private subtypes.
156         (Check_Overloaded_Name): Verify that the name is an entity name
157         before other checks.
159 2014-07-18  Pascal Obry  <obry@adacore.com>
161         * adaint.c (__gnat_fputwc) Do not disable on cross-build.
163 2014-07-18  Robert Dewar  <dewar@adacore.com>
165         * sem_prag.adb, sem_attr.adb,
166         sem_aggr.adb, sinfo.ads, sem_eval.ads: Minor reformatting.
168 2014-07-18  Pascal Obry  <obry@adacore.com>
170         * sysdep.c (__gnat_wide_text_translation_required): Removed from here.
171         * initialize.c (__gnat_wide_text_translation_required): Defined here.
173 2014-07-18  Pascal Obry  <obry@adacore.com>
175         * adaint.c (__gnat_fputwc): New routine.
176         * s-crtl.ads (fputwc): Now imported as __gnat_fputwc.
178 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
180         * einfo.adb: Flag 270 is now used as Stores_Attribute_Old_Prefix.
181         (Set_Stores_Attribute_Old_Prefix): New routine.
182         (Stores_Attribute_Old_Prefix): New routine.
183         (Write_Entity_Flags):
184         Output flag Stores_Attribute_Old_Prefix.
185         * einfo.ads Add new flag Stores_Attribute_Old_Prefix along with
186         comment on usage.
187         (Set_Stores_Attribute_Old_Prefix): New routine
188         along with pragma Inline.
189         (Stores_Attribute_Old_Prefix): New
190         routine along with pragma Inline.
191         * exp_attr.adb (Expand_N_Attribute_Reference): Mark the generated
192         constant which captures the result of attribute 'Old's prefix.
193         * sem_util.adb (In_Assertion_Expression_Pragma): Recognize a
194         relocated expression which acted as a prefix of attribute 'Old.
196 2014-07-18  Bob Duff  <duff@adacore.com>
198         * s-spsufi.adb (Finalize_And_Deallocate): Set Subpool.Owner to
199         null before dispatching to Deallocate_Subpool.
200         * s-stposu.ads (Default_Subpool_For_Pool): Change mode of
201         parameter of Default_Subpool_For_Pool to 'in out'.
202         * s-stposu.adb (Set_Pool_Of_Subpool): Use raise expression. Add
203         a message to the raise.
204         * sem_util.adb: Minor reformatting.
206 2014-07-18  Robert Dewar  <dewar@adacore.com>
208         * sem_util.adb (Check_Expression_Against_Static_Predicate):
209         Mark expression as non-static if it fails static predicate check,
210         and issue additional warning.
212 2014-07-18  Pascal Obry  <obry@adacore.com>
214         * a-witeio.adb (Put): Control translation based on
215         wide_text_translation_required.
216         * adaint.c (CurrentCCSEncoding): New variable.
217         * initialize.c (__gnat_initialize): On Windows initialize
218         CurrentCCSEncoding based on values in GNAT_CCS_ENCODING
219         environment variable.
220         * mingw32.h (CurrentCCSEncoding): New external.
221         (__gnat_wide_text_translation_required): Likewise.
222         * sysdep.c (wide_text_translation_required): New variable.
223         (__gnat_set_wide_text_mode): Set mode based on CurrentCCSEncoding.
225 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
227         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
228         variable Refined_States.  Add global variable Matched_Items.
229         (Check_Dependency_Clause): Account for dependency
230         clauses utilizing states with visible null refinements.
231         (Is_Null_Refined_State): New routine.
232         (Match_Items): Record each successfully matched item of pragma Depends.
233         (Record_Item): New routine.
235 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
237         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
238         Do_Range_Check flag on a dynamic index expression used in a
239         component association in the argument of Update.
241 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
243         * einfo.ads, sem_eval.ads, sem_ch13.adb: Minor reformatting.
245 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
247         * exp_ch6.adb (Expand_Simple_Function_Return): Redo the marking
248         of enclosing blocks, loops and the enclosing function using a
249         parent-based traversal.
250         * exp_util.adb (Wrap_Statements_In_Block): Suppress the secondary
251         stack reclamation if the iterator loop contains a return statement
252         that uses the stack.
253         * sem_ch5.adb (Analyze_Loop_Statement): There is no need to
254         patch up the scope stack as the secondary stack management now
255         takes into account the enclosing function of the iterator loop.
257 2014-07-18  Robert Dewar  <dewar@adacore.com>
259         * sem_ch3.adb, g-memdum.ads, i-cstrea.ads: Minor reformatting.
261 2014-07-18  Robert Dewar  <dewar@adacore.com>
263         * einfo.adb (Has_Static_Predicate): New function.
264         (Set_Has_Static_Predicate): New procedure.
265         * einfo.ads (Has_Static_Predicate): New flag.
266         * sem_ch13.adb (Is_Predicate_Static): New function
267         (Build_Predicate_Functions): Use Is_Predicate_Static to reorganize
268         (Add_Call): Minor change in Sloc of generated expression
269         (Add_Predicates): Remove setting of Static_Pred, no longer used.
270         * sem_ch4.adb (Has_Static_Predicate): Removed this function,
271         replace by use of the entity flag Has_Static_Predicate_Aspect.
272         * sem_eval.adb (Eval_Static_Predicate_Check): Check real case
273         and issue warning that predicate is not checked for now.
274         * sem_eval.ads (Eval_Static_Predicate_Check): Fix comments in
275         spec.
276         * sem_util.adb (Check_Expression_Against_Static_Predicate):
277         Carry out check for any case where there is a static predicate,
278         and output appropriate message.
279         * sinfo.ads: Minor comment corrections.
281 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
283         * exp_ch3.adb (Expand_Freeze_Record_Type): If the type is derived
284         from an untagged private type whose full view is tagged, the type
285         is marked tagged for layout reasons, but it has no dispatch table,
286         so Set_All_DT_Position must not be called.
287         * exp_ch13.adb: If the freeze node is for a type internal to a
288         record declaration, as is the case for a class-wide subtype
289         of a parent component, the relevant scope is the scope of the
290         enclosing record.
292 2014-07-18  Thomas Quinot  <quinot@adacore.com>
294         * g-memdum.adb, g-memdum.ads: Code clean ups.
296 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
298         * sem_prag.adb (Check_Dependency_Clause):
299         Update the comment on usage. Reimplement the mechanism which
300         attempts to match a single clause of Depends against one or
301         more clauses of Refined_Depends.
302         (Input_Match): Removed.
303         (Inputs_Match): Removed.
304         (Is_Self_Referential): Removed.
305         (Normalize_Clause): Update the call to Split_Multiple_Outputs.
306         (Normalize_Outputs): Rename variable Split to New_Claue and update
307         all its occurrences.
308         (Report_Extra_Clauses): Update the comment on usage.
309         (Split_Multiple_Outputs): Renamed to Normalize_Outputs.
311 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
313         * i-cstrea.ads: Minor reformatting.
315 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
317         * exp_util.adb (Wrap_Statements_In_Block): Propagate both
318         secondary stack-related flags to the generated block.
319         * sem_ch5.adb (Analyze_Loop_Statement): Update the scope chain
320         once the loop is relocated in a block.
322 2014-07-18  Robert Dewar  <dewar@adacore.com>
324         * repinfo.ads: Add documentation on handling of back annotation
325         for dynamic case.
327 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
329         * sinfo.ads, sinfo.adb (Incomplete_View): New semantic attribute
330         of full type declaration, denotes previous declaration for
331         incomplete view of the type.
332         * sem_ch3.adb (Analyze_Full_Type_Declaration): Set Incomplete_View
333         of declaration if one is present.
334         (Replace_Type): When constructing the signature of an inherited
335         operation, handle properly the case where the operation has a
336         formal whose type is an incomplete view.
337         * sem_util.adb (Collect_Primitive_Operations): Handle properly
338         the case of an operation declared after an incomplete declaration
339         for a type T and before the full declaration of T.
341 2014-07-18  Pascal Obry  <obry@adacore.com>
343         * i-cstrea.ads: Add documentation for set_wide_text_mode.
345 2014-07-18  Robert Dewar  <dewar@adacore.com>
347         * a-witeio.adb: Minor code reorganization.
348         * i-cstrea.ads: Add comment.
350 2014-07-18  Thomas Quinot  <quinot@adacore.com>
352         * s-oscons-tmplt.c (NAME_MAX): Minor cleaup and comment
353         clarifications.
355 2014-07-18  Robert Dewar  <dewar@adacore.com>
357         * g-memdum.adb, g-memdum.ads, exp_strm.adb: Minor reformatting.
359 2014-07-18  Pascal Obry  <obry@adacore.com>
361         * s-crtl.ads, i-cstrea.ads (fputwc): New routine.
362         * a-witeio.adb (Put): On platforms where there is translation
363         done by the OS output the raw text.
364         (New_Line): Use Put above to properly handle the LM wide characters.
366 2014-07-18  Thomas Quinot  <quinot@adacore.com>
368         * g-memdum.adb, g-memdum.ads (Dump): New parameter Prefix, defaulted
369         to Absolute_Address.
371 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
373         * opt.ads (Suppress_Back_Annotation): Remove as unused.
374         * fe.h (Back_Annotate_Rep_Info): Likewise.
375         (Global_Discard_Names): Likewise.
377 2014-07-18  Robert Dewar  <dewar@adacore.com>
379         * sem_ch13.adb (Is_Type_Ref): Check that type name is not
380         parenthesized.
382 2014-07-18  Vincent Celier  <celier@adacore.com>
384         * s-osinte-vms.ads: Fix style errors.
386 2014-07-18  Thomas Quinot  <quinot@adacore.com>
388         * s-oscons-tmplt.c (_POSIX_SOURCE): Define in order to get
389         NAME_MAX and PATH_MAX.
391 2014-07-18  Bob Duff  <duff@adacore.com>
393         * exp_strm.adb (Build_Record_Or_Elementary_Input_Function,
394         Build_Record_Or_Elementary_Output_Procedure): For Input and
395         Output attributes, do not read/write the discriminants if they
396         have default values; that will be done by Read/Write.
398 2014-07-18  Robert Dewar  <dewar@adacore.com>
400         * sem_aggr.adb, exp_ch5.adb, sem_ch3.adb, layout.adb, sem_type.adb,
401         exp_util.adb, exp_attr.adb, einfo.adb, einfo.ads, exp_pakd.adb,
402         checks.adb, exp_pakd.ads, freeze.adb, sem_util.adb, exp_dbug.adb,
403         exp_dbug.ads, exp_ch4.adb, sem_ch8.adb, exp_aggr.adb, sem_eval.adb,
404         sem_ch13.adb: Change name Packed_Array_Type to Packed_Array_Impl_Type.
406 2014-07-18  Robert Dewar  <dewar@adacore.com>
408         * lib-writ.adb, makeutl.adb, ali.ads: Minor reformatting.
410 2014-07-18  Vincent Celier  <celier@adacore.com>
412         * lib-writ.ads: Update documentation about the D lines.
414 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
416         * sem_ch13.adb (Replace_Type_References_Generic): Use type entity
417         as a parameter, rather than its Chars field, in order to locate
418         freeze node of type. If the predicate or invariant has references
419         to types other than the one to which the contract applies, these
420         types must be frozen, and the corresponding predicate functions
421         created, before that freeze node.
423 2014-07-18  Robert Dewar  <dewar@adacore.com>
425         * freeze.adb, einfo.ads, einfo.adb: Minor code reorganization.
426         * par_sco.adb: Minor reformatting.
428 2014-07-18  Gary Dismukes  <dismukes@adacore.com>
430         * exp_ch4.adb (Real_Range_Check): Turn off
431         the Do_Range_Check flag on the conversion's current Expression
432         argument rather than on the originally captured Operand node,
433         as Expression may reflect a rewriting (as in conversions to a
434         fixed-point type).
436 2014-07-18  Vincent Celier  <celier@adacore.com>
438         * ali.adb (Scan_ALI): Set Sdep_Record.Unit_Name, when the unit
439         is not a subunit.
440         * ali.ads (Sdep_Record): New component Unit_Name.
441         * lib-writ.adb (Write_ALI): Write the unit name in D lines.
442         * makeutl.adb (Check_Source_Info_In_ALI): Return False if a
443         dependent unit is in a project and the source file name is not
444         one of its sources.
446 2014-07-18  Bob Duff  <duff@adacore.com>
448         * s-addima.ads: Minor: add comment.
450 2014-07-18  Thomas Quinot  <quinot@adacore.com>
452         * freeze.adb (Check_Component_Storage_Order): Fix enforcement
453         of nesting rules for composites with different SSOs.
455 2014-07-18  Thomas Quinot  <quinot@adacore.com>
457         * par_sco.adb (Is_Logical_Operator): An If_Expression is not
458         a proper logical operator.
459         (Has_Decision): An If_Expression indicates the presence of a decision
460         although it is not a logical operator.
462 2014-07-18  Robert Dewar  <dewar@adacore.com>
464         * gnat_ugn.texi: Remove note that -gnatR not allowed with -gnatc.
465         * switch-c.adb: Remove prohibition of -gnatR and -gnatc together.
467 2014-07-18  Eric Botcazou  <ebotcazou@adacore.com>
469         * sem_ch13.adb (Kill_Rep_Clause): Clear Comes_From_Source flag
470         on the null statement.
472 2014-07-18  Thomas Quinot  <quinot@adacore.com>
474         * adaint.c: Minor comment rewording.
475         * socket.c: Define macros _REENTRANT and _THREAD_SAFE so that
476         use of errno in this file is thread safe.
478 2014-07-18  Arnaud Charlet  <charlet@adacore.com>
480         * gnat_ugn.texi: Doc clarification.
481         * sem_ch13.adb (Kill_Rep_Clause): Use Replace not Rewrite.
482         * sem_ch13.ads: Minor comment update.
484 2014-07-18  Robert Dewar  <dewar@adacore.com>
486         * repinfo.ads: Minor comment fix.
488 2014-07-18  Robert Dewar  <dewar@adacore.com>
490         * par-prag.adb: Add dummy entry for Default_Scalar_Storage_Order.
491         * sem_prag.adb: Add dummy implementation of
492         Default_Scalar_Storage_Order.
493         * snames.ads-tmpl: Add dummy entry for
494         Default_Scalar_Storage_Order pragma.
496 2014-07-18  Robert Dewar  <dewar@adacore.com>
498         * opt.adb (Tree_Read): Read Address_Is_Private,
499         Ignore_Rep_Clauses, Ignore_Style_Check_Pragmas, Multiple_Unit_Index.
500         (Tree_Write): Corresponding writes
501         * opt.ads: Minor comment reformatting and fixes.
502         * tree_io.ads: Increment ASIS_Version_Number.
504 2014-07-18  Robert Dewar  <dewar@adacore.com>
506         * sem_attr.adb, s-os_lib.ads, prj-tree.adb: Minor reformatting.
507         * types.h: Fix typo.
509 2014-07-18  Robert Dewar  <dewar@adacore.com>
511         * freeze.adb (Check_Address_Clause): Use Kill_Rep_Clause (no
512         functional change).
513         * gnat_ugn.texi: Document that -gnatI removes rep clauses from
514         ASIS trees.
515         * sem_ch13.adb (Kill_Rep_Clause): New procedure
516         (Analyze_Attribute_Definition_Clause): Use
517         Kill_Rep_Clause. This is just a cleanup, no functional effect.
518         (Analyze_Enumeration_Representation_Clause):
519         Use Kill_Rep_Clause. This means that enum rep
520         clauses are now properly removed from -gnatct trees.
521         (Analyze_Record_Representation_Clause): Same change.
522         * sem_ch13.ads (Kill_Rep_Clause): New procedure.
524 2014-07-18  Pascal Obry  <obry@adacore.com>
526         * s-os_lib.ads, s-os_lib.adb (GM_Time_Of): New routine to create an
527         OS_Time from time parts.
528         * adaint.h, adaint.c (__gnat_to_os_time): New routine.
530 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
532         * sem_ch4.adb (Try_Container_Indexing): Refine previous patch for
533         indexing over containers that are derived types: check whether
534         signature of found operation has the correct first parameter
535         before retrieving directly a primitive operation.
537 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
539         * sem_attr.adb (Analyze_Attribute, case 'Update): Set
540         Do_Range_Check flag on dynamic bounds of a range used in a
541         component association in the argument of Update.
543 2014-07-18  Thomas Quinot  <quinot@adacore.com>
545         * adaint.c: #define _REENTRANT and _THREAD_SAFE in order for
546         accesses to errno(3) to be thread safe.
548 2014-07-18  Vincent Celier  <celier@adacore.com>
550         * prj-tree.adb (Imported_Or_Extended_Project_Of): For each non
551         limited imported project that is an extending project, return
552         a project being extended if it has the expected name.
554 2014-07-18  Pascal Obry  <obry@adacore.com>
556         * s-os_lib.ads, s-os_lib.adb (Set_File_Last_Modify_Time_Stamp): New
557         routine to set the last modification time stamp for the given file.
558         * gnatchop.adb (File_Time_Stamp): Removed.
559         (Write_Unit): Use
560         Set_File_Last_Modify_Time_Stamp instead of ad-hoc implementation.
562 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
564         * sem_aggr.adb (Aggregate_Constraint_Checks): Moved to sem_util.
565         * sem_util.ads, sem_util.adb (Aggregate_Constraint_Checks):
566         Moved here, so it can be shared with the resolution of 'Update,
567         whose argument shares some features with aggregates.
568         * sem_attr.adb (Resolve_Attribute, case 'Update): Apply
569         Aggregate_Constraint_Checks with the expression of each
570         association, so that the Do_Range_Check flag is set when needed.
572 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
574         * sem_ch4.adb (Try_Container_Indexing):  If the container
575         type is a derived type, the value of the inherited  aspect is
576         the Reference operation declared for the parent type. However,
577         Reference is also a primitive operation of the new type, and
578         the inherited operation has a different signature. We retrieve
579         the right one from the list of primitive operations of the
580         derived type.
582 2014-07-18  Vincent Celier  <celier@adacore.com>
584         * debug.adb: Update comment.
586 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
588         * exp_util.adb (Needs_Finalization): There is no reason why a
589         C type should not benefit from finalization actions.
591 2014-07-18  Thomas Quinot  <quinot@adacore.com>
593         * s-oscons-tmplt.c (NAME_MAX): Fix definition for Solaris
594         (FILENAME_MAX): Remove unneeded definition.
596 2014-07-18  Robert Dewar  <dewar@adacore.com>
598         * exp_attr.adb, debug.adb: Update comments.
600 2014-07-18  Vincent Celier  <celier@adacore.com>
602         * par-ch4.adb (Simple_Expression): Add missing style check
603         for binary adding operators.
604         (Term): Add missing style check for multiplying operators.
606 2014-07-18  Robert Dewar  <dewar@adacore.com>
608         * impunit.adb: Minor comment correction.
609         * widechar.adb, s-wchcon.ads: Minor comment corrections.
611 2014-07-18  Robert Dewar  <dewar@adacore.com>
613         * sem_ch13.adb (Build_Discrete_Static_Predicate): New name
614         for Build_Static_Predicate (Build_Predicate_Functions):
615         Don't try to build discrete predicate for real type.
616         (Build_Predicate_Functions): Report attempt to use
617         Static_Predicate function on real type as unimplemented.
618         * sem_util.adb (Check_Expression_Against_Static_Predicate):
619         Add guard to prevent blow up on predicate for real type.
621 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
623         * einfo.adb (Set_Static_Predicate): Simplify assertion to handle
624         properly static predicate on enumeration types and modular types
625         (not subtypes).
627 2014-07-18  Pierre-Marie Derodat  <derodat@adacore.com>
629         * scos.ads (SCO_Unit_Table_Entry): Add a field to keep track of
630         the corresponding source file index.
631         * get_scos.ads (Get_SCOs): Add a default value for it.
632         * par_sco.adb (SCO_Record): Fill the corresponding value.
633         * scos.h: New.
635 2014-07-18  Vincent Celier  <celier@adacore.com>
637         * a-strunb-shared.adb, s-auxdec.ads, s-rannum.adb, atree.ads,
638         urealp.adb, vms_data.ads, lib.ads, s-auxdec-vms_64.ads: Minor
639         reformatting.
640         * gnat_ugn.texi: Add documentation for new gnatmem switch -t.
642 2014-07-18  Thomas Quinot  <quinot@adacore.com>
644         * g-sercom.ads (Set): document possible data loss.
646 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
648         * exp_attr.adb (Expand_N_Attribute_Reference, cases Input,
649         Output, Read, Write): If the restriction No_Streams is active,
650         replace each occurrence of a stream attribute by an explicit
651         Raise statement.
653 2014-07-18  Robert Dewar  <dewar@adacore.com>
655         * par_sco.adb, a-reatim.ads, exp_attr.adb, sem_util.adb: Minor
656         reformatting.
658 2014-07-18  Robert Dewar  <dewar@adacore.com>
660         * einfo.ads, einfo.adb (Has_Out_Or_In_Out_Parameter): New flag and
661         function.
662         (Set_Has_Out_Or_In_Out_Parameter): New procedure.
663         * sem_ch6.adb (Set_Formal_Mode): Set Has_Out_Or_In_Out_Parameter flag.
664         * sem_res.adb (Resolve_Call): Error if call of Ada 2012 function
665         with OUT or IN OUT from earlier Ada mode (e.g. Ada 2005)
667 2014-07-18  Robert Dewar  <dewar@adacore.com>
669         * bcheck.adb (Check_Consistent_Restrictions):
670         Remove obsolete code checking for violation of
671         No_Standard_Allocators_After_Elaboration (main program)
672         * bindgen.adb (Gen_Adainit): Handle
673         No_Standard_Allocators_After_Elaboration
674         (Gen_Output_File_Ada): ditto.
675         * exp_ch4.adb (Expand_N_Allocator): Handle
676         No_Standard_Allocators_After_Elaboration.
677         * Makefile.rtl: Add entry for s-elaall
678         * rtsfind.ads: Add entry for Check_Standard_Allocator.
679         * s-elaall.ads, s-elaall.adb: New files.
680         * sem_ch4.adb (Analyze_Allocator): Handle
681         No_Standard_Allocators_After_Elaboration.
683 2014-07-18  Robert Dewar  <dewar@adacore.com>
685         * lib.adb, lib.ads, lib-writ.adb, lib-writ.ads, ali.adb,
686         ali.ads, lib-load.adb: Remove Lib.Has_Allocator and all uses.
687         Remove AB parameter from ali files and all uses.
688         Remove Allocator_In_Body and all uses.
690 2014-07-18  Robert Dewar  <dewar@adacore.com>
692         * g-expect-vms.adb: Add comment.
694 2014-07-18  Thomas Quinot  <quinot@adacore.com>
696         * par_sco.adb (Is_Logical_Operation): return True for
697         N_If_Expression.
699 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
701         * sem_attr.adb (Resolve_Attribute, case 'Update): Do full
702         analysis and resolution of each choice in the associations within
703         the argument of Update, because they may be variable names.
705 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
707         * exp_attr.adb (Expand_Loop_Entry_Attribute): Insert any condition
708         actions before the generated if statement.
710 2014-07-18  Hristian Kirtchev  <kirtchev@adacore.com>
712         * gnat_ugn.texi Enhance the documentation of
713         switches -gnateA and -gnateV.
715 2014-07-18  Ed Schonberg  <schonberg@adacore.com>
717         * sem_util.adb (Build_Default_Subtype): Add missing condition
718         so that code matches description: use the full view of the base
719         only if the base is private and the subtype is not.
721 2014-07-17  Gary Dismukes  <dismukes@adacore.com>
723         * exp_disp.adb: Minor reformatting.
724         * exp_disp.adb: Minor code reorganization.
726 2014-07-17  Thomas Quinot  <quinot@adacore.com>
728         * gnat_rm.texi, freeze.adb (Check_Component_Storage_Order): Do not
729         require an explicit SSO attribute definition clause on a composite type
730         just because one of its components has one.
732 2014-07-17  Robert Dewar  <dewar@adacore.com>
734         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Rewrite
735         attribute out of existence if the enclosing pragma is ignored.
736         * sem_util.adb: Minor reformatting.
738 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
740         * exp_aggr.adb (Expand_Array_Aggregate): Handle properly an
741         array aggregate expanded into assignments when it appears as a
742         local declaration in an inlined body.
744 2014-07-17  Doug Rupp  <rupp@adacore.com>
746         * init.c [__ANDROID__]: Modify for ZCX.
747         * exp_aggr.adb: Minor reformatting
748         * sigtramp-armvxw.c, sigtramp-ppcvxw.c: Update comments.
750 2014-07-17  Robert Dewar  <dewar@adacore.com>
752         * a-strunb-shared.ads, a-stwiun-shared.ads, a-stzunb-shared.ads,
753         exp_ch7.adb, g-pehage.ads, g-socket.ads, gnat_ugn.texi, gnat_ugx.texi,
754         scng.adb: Remove incorrect usage "allow to" and "allows to".
756 2014-07-17  Robert Dewar  <dewar@adacore.com>
758         * exp_dist.adb: Minor reformatting.
760 2014-07-17  Bob Duff  <duff@adacore.com>
762         * gnat_ugn.texi: Improve documentation of Unrestricted_Access.
764 2014-07-17  Robert Dewar  <dewar@adacore.com>
766         * sem_ch13.adb (Build_Invariant_Procedure): Add variable Nam
767         (Add_Invariants): Set Nam to Name_Type_Invariant if from aspect.
769 2014-07-17  Thomas Quinot  <quinot@adacore.com>
771         * exp_pakd.adb (Create_Packed_Array_Type.Install_PAT): For a
772         non-bit-packed array, propagate Reverse_Storage_Order to the
773         packed array type.
775 2014-07-17  Javier Miranda  <miranda@adacore.com>
777         * exp_disp.adb: Fix comment.
778         * exp_pakd.adb: Minor reformatting.
780 2014-07-17  Robert Dewar  <dewar@adacore.com>
782         * bindgen.adb (Gen_Elab_Calls): Skip reference to elab
783         entity if none exists (Gen_Elab_Calls): Complain if clash with
784         No_Multiple_Elaboration.
785         * s-rident.ads, restrict.ads: Add restriction No_Multiple_Elaboration.
786         * sem_util.adb (Build_Elaboration_Entity): Skip building entity
787         if not needed.
788         * gnat_rm.texi: Document restriction No_Multiple_Elaboration.
789         * sem_ch4.adb: Minor comment updates.
791 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
793         * exp_ch9.adb (Buid_Protected_Subprogram_Call): Preserve type
794         of function call for later use when shared passive objects
795         are involved.
797 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
799         * par-ch13.adb (Get_Aspect_Specifications):
800         Catch a case where the argument of SPARK aspect Refined_State
801         is not properly parenthesized.
803 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
805         * exp_ch6.adb (Expand_Ctrl_Function_Call): Do not extend
806         the lifetime of a reference to an Ada 2012 container element.
807         (Is_Element_Reference): New routine.
809 2014-07-17  Robert Dewar  <dewar@adacore.com>
811         * ali.ads: Minor comment fix.
812         * lib-writ.adb: Minor reformatting.
814 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
816         * sem_ch10.adb (Analyze_Proper_Body): When analyzing a subunit
817         in ASIS mode, load another subunit only if it a subunit of the
818         current one, not a sibling that has been reached through the
819         analysis of an ancestor. This allows the construction of the
820         ASIS tree for the subunit even when sibling subunits have errors.
822 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
824         * sem_ch3.adb (Analyze_Declarations): Remove the guard which
825         prevents the analysis of various contracts when the associated
826         construct is erroneous.
827         * sem_util.adb (Save_SPARK_Mode_And_Set): Do not query the
828         SPARK_Pragma of an illegal or a partially decorated construct.
830 2014-07-17  Robert Dewar  <dewar@adacore.com>
832         * s-imguns.ads: Minor reformatting.
834 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
836         * exp_ch7.adb (Build_Finalization_Master): Move all local
837         variables to the proper code section. When looking for an existing
838         finalization master, inspect the ultimate ancestor type of the
839         full view.
840         * sem_util.ads, sem_util.adb (Root_Type_Of_Full_View): New routine.
842 2014-07-17  Robert Dewar  <dewar@adacore.com>
844         * aspects.ads, aspects.adb: Add entries for aspect Annotate.
845         * gnat_rm.texi: Document Entity argument for pragma Annotate and
846         Annotate aspect.
847         * sem_ch13.adb (Analyze_Aspect_Specification): Add processing
848         for Annotate aspect.
849         * sem_prag.adb (Analyze_Pragma, case Annotate): Allow optional
850         Entity argument at end.
851         * sinfo.ads (N_Aspect_Specification): Add note on Annotate aspect.
853 2014-07-17  Tristan Gingold  <gingold@adacore.com>
855         * s-imguns.ads: Fix minor typo.
857 2014-07-17  Thomas Quinot  <quinot@adacore.com>
859         * sprint.adb: Minor reformatting.
861 2014-07-17  Robert Dewar  <dewar@adacore.com>
863         * sprint.adb (Write_Itype): Print proper header for string
864         literal subtype.
866 2014-07-17  Steve Baird  <baird@adacore.com>
868         * sinfo.ads, sem_scil.ads: Improve comments, minor reformatting.
870 2014-07-17  Vincent Celier  <celier@adacore.com>
872         * gnatbind.adb: Change in message "try ... for more information".
874 2014-07-17  Robert Dewar  <dewar@adacore.com>
876         * sprint.adb: Code clean up.
878 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
880         * exp_ch7.adb (Find_Last_Init): Relocate local variables to
881         the relevant code section. Add new local constant Obj_Id. When
882         a limited controlled object is initialized by a function call,
883         the build-in-place object access function call acts as the last
884         initialization statement.
885         * exp_util.adb (Is_Object_Access_BIP_Func_Call): New routine.
886         (Is_Secondary_Stack_BIP_Func_Call): Code reformatting.
887         * exp_util.ads (Is_Object_Access_BIP_Func_Call): New routine.
889 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
891         * sem_ch8.adb (Analyze_Generic_Renaming): For generic subprograms,
892         propagate intrinsic flag to renamed entity, to allow e.g. renaming
893         of Unchecked_Conversion.
894         * sem_ch3.adb (Analyze_Declarations): Do not analyze contracts
895         if the declaration has errors.
897 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
899         * a-rbtgbk.adb: a-rbtgbk.adb (Generic_Insert_Post): Check whether
900         container is busy before checking whether capacity allows for
901         a further insertion. Insertion in a busy container that is full
902         raises Program_Error rather than Capacity_Error. Previous to that
903         patch which exception was raised varied among container types.
905 2014-07-17  Robert Dewar  <dewar@adacore.com>
907         * g-comlin.ads, g-comlin.adb: Minor clean up.
909 2014-07-17  Bob Duff  <duff@adacore.com>
911         * gnat_ugn.texi: Update gnatpp doc.
913 2014-07-17  Robert Dewar  <dewar@adacore.com>
915         * gnat_rm.texi: Document new restriction No_Long_Long_Integers.
916         * exp_ch4.adb (Make_Array_Comparison_Op): Add note that we
917         could do this by actually expanding a real generic.
918         * a-tags.ads: Add comments about performance.
919         * sprint.adb (Sprint_Node_Actual, case N_Object_Declaration):
920         Print Etype of defining identifier, rather than the object
921         definition. More information.
923 2014-07-17  Thomas Quinot  <quinot@adacore.com>
925         * exp_dist.adb: Minor documentation clarification.
927 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
929         * exp_util.adb (Is_Aliased): Revert previous change.
931 2014-07-17  Vincent Celier  <celier@adacore.com>
933         * g-comlin.adb (Try_Help): New procedure.
934         (Getopt): Use new procedure Try_Help.
935         * g-comlin.ads (Try_Help): New procedure.
937 2014-07-17  Bob Duff  <duff@adacore.com>
939         * gnat_ugn.texi: Minor update.
941 2014-07-17  Robert Dewar  <dewar@adacore.com>
943         * gnat_rm.texi: Improve documentation of Unrestricted_Access.
944         * sinfo.ads: Document restriction on aggregates (must expand to
945         assignments if one or more assignments needs expansion, e.g. for
946         controlled types).
947         * sem_ch13.adb: All warning messages regarding bit order should
948         be info: messages.
949         * gnat_ugn.texi: Minor correction of missing @ on @code
951 2014-07-17  Robert Dewar  <dewar@adacore.com>
953         * restrict.ads (Implementation_Restriction): Add No_Long_Long_Integer.
954         * s-rident.ads (Partition_Boolean_Restrictions): Add
955         No_Long_Long_Integer.
956         * sem_ch3.adb (Modular_Type_Declaration): Size must be <=
957         Long_Integer'Size if restriction No_Long_Long_Integer is active.
958         (Signed_Integer_Type_Declaration): Do not allow Long_Long_Integer
959         as the implicit base type for a signed integer type declaration
960         if restriction No_Long_Long_Integer is active.
961         * sem_util.ads, sem_util.adb (Set_Entity_With_Checks): Include check for
962         No_Long_Long_Integer.
964 2014-07-17  Robert Dewar  <dewar@adacore.com>
966         * sem_ch3.adb, a-ztexio.ads, exp_imgv.adb, casing.adb, casing.ads,
967         einfo.ads, checks.adb, sem_ch12.adb, a-textio.ads, freeze.adb,
968         repinfo.adb, exp_ch6.adb, sem_ch4.adb, a-witeio.ads, sem_ch8.adb,
969         sem_warn.adb, exp_aggr.adb, exp_dist.adb, par-tchk.adb, s-fatgen.adb,
970         treepr.adb, lib-xref.adb: Remove the word kludge from ada sources.
972 2014-07-17  Robert Dewar  <dewar@adacore.com>
974         * debug.adb: Remove -gnatdQ.
975         * exp_disp.adb: Remove -gnatdQ.
976         * a-ztenio.ads, a-wtinio.ads, a-wtmoio.ads, a-ztcoau.ads, a-tiinio.ads,
977         a-wtfiio.ads, a-timoio.ads, sem_ch12.adb, a-tifiio.ads, a-ztinio.ads,
978         rtsfind.adb, rtsfind.ads, a-ztmoio.ads, a-wtdeio.ads, a-ztfiio.ads,
979         a-tideio.ads, a-wtflio.ads, a-ztdeio.ads, sem_ch8.adb, a-tiflio.ads,
980         sprint.adb, a-ztflio.ads, snames.ads-tmpl, a-wtenio.ads,
981         a-tienio.ads: Rename Text_IO_Kludge to Text_IO_Special_Unit.
983 2014-07-17  Robert Dewar  <dewar@adacore.com>
985         * back_end.adb: Minor reformatting and comment additions.
986         * checks.ads, checks.adb (Duplicated_Tag_Checks_Suppressed): New
987         function.
988         * exp_disp.adb (Make_DT): Use Duplicated_Tag_Checks_Suppressed.
989         (Make_VM_TSD): Use Duplicated_Tag_Checks_Suppressed.
990         * gnat_rm.texi: Document new check Duplicated_Tag_Checks_Suppressed.
991         * gnat_ugn.texi: Additional documentation for Duplicated_Tag_Check.
992         * snames.ads-tmpl (Duplicated_Tag_Checks_Suppressed): New check.
993         * types.ads (Duplicated_Tag_Checks_Suppressed): New check.
995 2014-07-17  Robert Dewar  <dewar@adacore.com>
997         * gnat_rm.texi: Minor comment updates.
999 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
1001         * sem_util.adb (Make_Explicit_Dereference): If the expression
1002         being dereferenced is a generalized indexing, reset the overloaded
1003         flag on the generalized indexing call, consistent with the
1004         resetting of the flag on the original indexed component.
1006 2014-07-17  Robert Dewar  <dewar@adacore.com>
1008         * gnat_ugn.texi: Document advise not to mix -gnatV? and
1009         optimization.
1011 2014-07-17  Robert Dewar  <dewar@adacore.com>
1013         * checks.adb (Insert_Valid_Check): Don't insist on a name
1014         for the prefix when we make calls to Force_Evaluation and
1015         Duplicate_Subexpr_No_Checks.
1016         * exp_util.adb (Is_Volatile_Reference): Handle all cases properly
1017         (Remove_Side_Effects): Handle all volatile references right
1018         (Side_Effect_Free): Volatile reference is never side effect free
1019         * sinfo.ads (N_Attribute_Reference): Add comments explaining
1020         that in the tree, the prefix can be a general expression.
1022 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
1024         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
1025         Analyze_Subprogram_Contract): Add comments on SPARK_Mode save/restore.
1026         * sem_ch7.adb (Analyze_Package_Body_Contract,
1027         Analyze_Package_Contract): Add comments on SPARK_Mode save/restore.
1029 2014-07-17  Robert Dewar  <dewar@adacore.com>
1031         * exp_ch7.ads, exp_util.ads: Document Insert_Action_After,
1032         Store_After_Actions_In_Scope.
1034 2014-07-17  Robert Dewar  <dewar@adacore.com>
1036         * sem_aux.ads: Minor comment addition.
1038 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
1040         * sem_res.adb (Make_Call_Into_Operator): If the call is already
1041         a rewriting of an operator node, there are no actuals to be
1042         propagated from original node to rewritten node when in ASIS mode.
1044 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
1046         * sem_ch6.adb (Analyze_Subprogram_Body_Contract,
1047         Analyze_Subprogram_Contract): Add new local variable Mode. Save
1048         and restore the SPARK mode of the related construct in a
1049         stack-like fashion.
1050         * sem_ch7.adb (Analyze_Package_Body_Contract,
1051         Analyze_Package_Contract): Add new local variable Mode. Save and
1052         restore the SPARK mode of the related construct in a stack-like fashion.
1053         * sem_util.adb Remove with and use clause for Opt.
1054         (Restore_SPARK_Mode): New routine.
1055         (Save_SPARK_Mode_And_Set): New routine.
1056         * sem_util.ads Add with and use clause for Opt.
1057         (Restore_SPARK_Mode): New routine.
1058         (Save_SPARK_Mode_And_Set): New routine.
1060 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
1062         * exp_util.adb (Is_Aliased): Transient objects
1063         within an expression with actions cannot be considered aliased.
1065 2014-07-17  Thomas Quinot  <quinot@adacore.com>
1067         * sem.ads (Scope_Stack_Entry): Reorganize storage of action lists;
1068         introduce a new list (cleanup actions) for each (transient) scope.
1069         * sinfo.ads, sinfo.adb (Cleanup_Actions): New attribute for
1070         N_Block_Statement
1071         * exp_ch7.ads (Store_Cleanup_Actions_In_Scope): New subprogram.
1072         * exp_ch7.adb (Store_Actions_In_Scope): New subprogram, common
1073         processing for Store_xxx_Actions_In_Scope.
1074         (Build_Cleanup_Statements): Allow for a list of additional
1075         cleanup statements to be passed by the caller.
1076         (Expand_Cleanup_Actions): Take custom cleanup actions associated
1077         with an N_Block_Statement into account.
1078         (Insert_Actions_In_Scope_Around): Account for Scope_Stack_Entry
1079         reorganization (refactoring only, no behaviour change).
1080         (Make_Transient_Block): Add assertion to ensure that the current
1081         scope is indeed a block (namely, the entity for the transient
1082         block being constructed syntactically, which has already been
1083         established as a scope).  If cleanup actions are present in the
1084         transient scope, transfer them now to the transient block.
1085         * exp_ch6.adb (Expand_Protected_Subprogram_Call): Freeze the
1086         called function while it is still present as the name in a call
1087         in the tree. This may not be the case later on if the call is
1088         rewritten into a transient block.
1089         * exp_smem.adb (Add_Shared_Var_Lock_Procs): The post-actions
1090         inserted after calling a protected operation on a shared passive
1091         protected must be performed in a block finalizer, not just
1092         inserted in the tree, so that they are executed even in case of
1093         a normal (RETURN) or abnormal (exception) transfer of control
1094         outside of the current scope.
1095         * exp_smem.ads (Add_Shared_Var_Lock_Procs): Update documentation
1096         * sem_ch8.adb, expander.adb, exp_ch11.adb: Adjust for
1097         Scope_Stack_Entry reorganization.
1099 2014-07-17  Thomas Quinot  <quinot@adacore.com>
1101         * exp_disp.adb (Make_DT, Make_VM_TSD): Do not omit Check_TSD
1102         call for types that do not have an explicit attribute definition
1103         clause for External_Tag, as their default tag may clash with an
1104         explicit tag defined for some other type.
1106 2014-07-17  Hristian Kirtchev  <kirtchev@adacore.com>
1108         * exp_util.adb (Is_Controlled_Function_Call): Recognize a
1109         controlled function call with multiple actual parameters that
1110         appears in Object.Operation form.
1112 2014-07-17  Thomas Quinot  <quinot@adacore.com>
1114         * einfo.ads, einfo.adb (Has_External_Tag_Rep_Clause): Remove
1115         entity flag.
1116         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
1117         External_Tag): No need to set entity flag.
1118         * sem_aux.ads, sem_aux.adb (Has_External_Tag_Rep_Clause):
1119         Reimplement correctly in terms of Has_Rep_Item.
1121 2014-07-17  Thomas Quinot  <quinot@adacore.com>
1123         * exp_ch7.adb (Establish_Transient_Scope.Find_Node_To_Be_Wrapped):
1124         Start examining the tree at the node passed to
1125         Establish_Transient_Scope (not its parent).
1126         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
1127         The access type for the variable storing the reference to
1128         the call must be declared and frozen prior to establishing a
1129         transient scope.
1130         * exp_ch9.adb: Minor reformatting.
1132 2014-07-17  Pascal Obry  <obry@adacore.com>
1134         * s-os_lib.ads: Minor comment update.
1136 2014-07-17  Tristan Gingold  <gingold@adacore.com>
1138         * sysdep.c: Add ATTRIBUTE_UNUSED to avoid warnings.  Fix some
1139         indentation.
1140         * socket.c: Remove #warning to avoid warning.
1141         * expect.c: Indent some preprocessor directives to clarify
1142         nested if.  Do not use wait.h on PikeOS.  Add ATTRIBUTE_UNUSED
1143         to remove warnings.
1144         * env.c: Fix indentation.  Port to PikeOS.
1145         * gsocket.h: Port to PikeOS.  Remove #warning.
1146         * terminals.c: Port to PikeOS.  Fix indentation of the stubs.
1147         Add ATTRIBUTE_UNUSED to stubs arguments.  Fix return statement
1148         of stubbed __gnat_setup_parent_communication.
1149         * adaint.c: Port to PikeOS.  Reindent some preprocessor
1150         directives to clarify nested if.  Fix indentation.  Add missing
1151         ATTRIBUTE_UNUSED.
1153 2014-07-17  Robert Dewar  <dewar@adacore.com>
1155         * sem_attr.adb: Minor reformatting.
1157 2014-07-17  Robert Dewar  <dewar@adacore.com>
1159         * exp_ch7.adb, exp_ch7.ads, sinfo.ads: Minor reformatting.
1161 2014-07-17  Ed Schonberg  <schonberg@adacore.com>
1163         * sem_case.adb (Check_Choice_Set): If the case expression is the
1164         expression in a predicate, do not recheck coverage against itself,
1165         to prevent spurious errors.
1166         * sem_ch13.adb (Check_Aspect_At_End_Of_Declarations): Indicate that
1167         expression comes from an aspect specification, to prevent spurious
1168         errors when expression is a case expression in a predicate.
1170 2014-07-17  Pascal Obry  <obry@adacore.com>
1172         * adaint.c, adaint.h (__gnat_set_executable): Add mode parameter.
1173         * s-os_lib.ads, s-os_lib.adb (Set_Executable): Add Mode parameter.
1175 2014-07-17  Vincent Celier  <celier@adacore.com>
1177         * gnatchop.adb, make.adb, gnatbind.adb, clean.adb, gprep.adb,
1178         gnatxref.adb, gnatls.adb, gnatfind.adb, gnatname.adb: Do not output
1179         the usage for an erroneous invocation of a gnat tool.
1181 2014-07-16  Vincent Celier  <celier@adacore.com>
1183         * gnatls.adb: Get the target parameters only if -nostdinc was
1184         not specified.
1186 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1188         * checks.adb (Insert_Valid_Check): If the expression is a packed
1189         component of a modular type of the right size the data is always
1190         valid. This os particularly useful if the component is part of
1191         a volatile variable.
1193 2014-07-16  Robert Dewar  <dewar@adacore.com>
1195         * gnat_rm.texi, sinfo.ads, freeze.adb, exp_aggr.adb: Minor reformatting
1197 2014-07-16  Thomas Quinot  <quinot@adacore.com>
1199         * exp_ch7.ads: Minor documentation fix.
1201 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1203         * sem_ch3.adb (Find_Type_Name): Diagnose properly
1204         a private extension completion that is an interface definition
1205         with an interface list.
1207 2014-07-16  Arnaud Charlet  <charlet@adacore.com>
1209         * gnatls.adb (Gnatls): Code clean ups.
1211 2014-07-16  Thomas Quinot  <quinot@adacore.com>
1213         * sinfo.ads, sinfo.adb (N_Compound_Statement): New node kind.
1214         * sem.adb (Analyze): Handle N_Compound_Statement.
1215         * sprint.adb (Sprint_Node_Actual): Ditto.
1216         * sem_ch5.ads, sem_ch5.adb (Analyze_Compound_Statement): New
1217         procedure to handle N_Compound_Statement.
1218         * exp_aggr.adb (Collect_Initialization_Statements):
1219         Use a proper compound statement node, instead of a bogus
1220         expression-with-actions with a NULL statement as its expression,
1221         to wrap collected initialization statements.
1222         * freeze.ads, freeze.adb
1223         (Explode_Initialization_Compound_Statement): New public procedure,
1224         lifted from Freeze_Entity.
1225         (Freeze_Entity): When freezing
1226         an object with captured initialization statements and without
1227         delayed freezing, explode compount statement.
1228         * sem_ch4.adb (Analyze_Expression_With_Actions): Remove special
1229         case that used to handle bogus EWAs with NULL statement as
1230         the expression.
1231         * exp_ch13.adb (Expand_N_Freeze_Entity): For an object with
1232         delayed freezing and captured initialization statements, explode
1233         compound statement.
1235 2014-07-16  Gary Dismukes  <dismukes@adacore.com>
1237         * g-rewdat.adb, g-rewdat.ads: Minor reformatting.
1239 2014-07-16  Doug Rupp  <rupp@adacore.com>
1241         * s-interr-hwint.adb: Casing error on parameter.
1243 2014-07-16  Pascal Obry  <obry@adacore.com>
1245         * Makefile.rtl: Add g-rewdat.o dependencies in
1246         GNATRTL_NONTASKING_OBJS.
1248 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1250         * sem_case.adb: Code clean up.
1252 2014-07-16  Vincent Celier  <celier@adacore.com>
1254         * make.adb: Do not read gnat.adc when gnatmake is invoked
1255         with -gnatA.
1257 2014-07-16  Pascal Obry  <obry@adacore.com>
1259         * gnat_rm.texi, impunit.adb, g-rewdat.adb, g-rewdat.ads: Initial
1260         implementation of GNAT.Rewrite_Data.
1262 2014-07-16  Vincent Celier  <celier@adacore.com>
1264         * gnatls.adb (Normalize): New function.
1265         (Gnatls): Get the target parameters. On targets other than VMS,
1266         normalize the path names in the source search path, the object search
1267         path and the project search path.
1269 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1271         * sem_case.adb: Avoid self-checking of case expressions in
1272         dynamic predicates.
1274 2014-07-16  Robert Dewar  <dewar@adacore.com>
1276         * gnat_rm.texi: Document effect of Suppress_Initialization on tags and
1277         discriminants.
1279 2014-07-16  Eric Botcazou  <ebotcazou@adacore.com>
1281         * switch-b.adb (Scan_Binder_Switches): Add missing guard.
1283 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
1285         * gnat_ugn.texi: Fix typo.
1287 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1289         * exp_ch4.adb (Expand_N_Case_Expression): Do not expand case
1290         expression if it is the specification of a subtype predicate:
1291         it will be expanded when the return statement is analyzed, or
1292         when a static predicate is transformed into a static expression
1293         for evaluation by the front-end.
1294         * sem_ch13.adb (Get_RList): If the expression for a static
1295         predicate is a case expression, extract the alternatives of the
1296         branches with a True value to create the required statically
1297         evaluable expression.
1299 2014-07-16  Thomas Quinot  <quinot@adacore.com>
1301         * exp_prag.adb (Expand_Pragma_Check): Use the location of the
1302         expression, not the location of the aspect, for all generated
1303         code, so that in particular the call to raise_assert_failure
1304         gets the sloc of the associated condition.
1305         * exp_ch6.adb
1306         (Expand_Subprogram_Contract.Build_Postconditions_Procedure):
1307         Set an explicit End_Label on the handled sequence of statements
1308         for the _Postconditions procedure so that the implicit return
1309         statement does not erroneously get associated with code generated
1310         for the last condition in postconditions.
1312 2014-07-16  Thomas Quinot  <quinot@adacore.com>
1314         * ug_words: Fix name of VMS synonym for -gnatw.z (SIZE_ALIGNMENT,
1315         not SIZE_ALIGN) and -gnatw.Z (NOSIZE_ALIGNMENT, not NOSIZE_ALIGN).
1316         * vms_data.ads: Add missing spaces in VMS synonyms for -gnatw.z /
1317         -gnatw.Z.
1319 2014-07-16  Robert Dewar  <dewar@adacore.com>
1321         * sem_ch3.adb, sem_prag.adb, sem_util.adb, sem_res.adb, sem_ch13.adb:
1322         Minor code reorganization (use Is_Access_Type, not in Access_Kind).
1323         * exp_ch3.adb: Minor code reorganization, use Is_Access_Type,
1324         not in Access_Kind.
1325         * par-ch4.adb (At_Start_Of_Attribute): New function
1326         (P_Simple_Expression): Better msg for bad attribute prefix.
1327         * scans.ads: Minor reformatting.
1329 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1331         * sem_attr.adb (Resolve_Attribute, case 'Update): If choice is a
1332         static constant, check that in belongs to the corresponding index
1333         subtype, to produce the proer warning when expansion is disabled.
1335 2014-07-16  Robert Dewar  <dewar@adacore.com>
1337         * freeze.adb (Freeze_Entity): Warn on incompatible size/alignment.
1338         * gnat_ugn.texi: Document -gnatw.z and -gnatw.Z.
1339         * ug_words: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for -gnatw.z/-gnatw.Z
1340         * usage.adb: Add lines for -gnatw.z/-gnatw.Z.
1341         * vms_data.ads: VMS synonyms (WARNINGS=[NO]SIZE_ALIGN) for
1342         -gnatw.z/-gnatw.Z
1343         * warnsw.adb: Set Warn_On_Size_Alignment appropriately.
1344         * warnsw.ads (Warn_On_Size_Alignment): New flag Minor
1345         reformatting.
1347 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
1349         * exp_ch7.adb (Process_Declarations): Reinstate the check on
1350         a hook object to ensure that the related transient declaration
1351         is finalizable.
1352         * exp_util.adb (Is_Aliased): Do not consider expresison with
1353         actions as a special context.
1354         (Requires_Cleanup_Actions): Reinstate the check on a hook object to
1355         ensure that the related transient declaration is finalizable.
1357 2014-07-16  Robert Dewar  <dewar@adacore.com>
1359         * checks.ads, checks.adb (Allocation_Checks_Suppressed): New function.
1360         * snames.ads-tmpl: Add Allocation_Check to list of check names.
1361         * types.ads: Add Allocation_Check to list of check names.
1363 2014-07-16  Thomas Quinot  <quinot@adacore.com>
1365         * sem_util.adb (Enter_Name): replace bogus test for presence of
1366         Corresponding_Remote_Type with correct test on Ekind.
1367         * sem_res.adb (Valid_Conversion): ditto; also clarify validity
1368         of calls to Corresponding_ Remote_Type (documentation fix).
1370 2014-07-16  Robert Dewar  <dewar@adacore.com>
1372         * gnat_rm.texi: Document illegal case of Unrestricted_Access.
1373         * sem_attr.adb (Analyze_Access_Attribute): Set_Non_Aliased_Prefix
1374         where it applies.
1375         (Resolve_Attribute, case Access): Flag illegal Unrestricted_Access use.
1376         * sinfo.ads, sinfo.adb (Non_Aliased_Prefix): New flag.
1378 2014-07-16  Robert Dewar  <dewar@adacore.com>
1380         * gnat_ugn.texi: Document binder switch -Ra.
1381         * gnatbind.adb (List_Closure_Display): Implement -Ra switch
1382         (List_Closure_All).
1383         * opt.ads (List_Closure_All): New switch.
1384         * switch-b.adb (Scan_Binder_Switches): Recognize -Ra to set
1385         List_Closure_All.
1387 2014-07-16  Ben Brosgol  <brosgol@adacore.com>
1389         * gnat_rm.texi: Minor edits, to make case consistent in names
1390         of types and fields.
1392 2014-07-16  Robert Dewar  <dewar@adacore.com>
1394         * gnat_rm.texi: Document erroneous mixing of thin pointers and
1395         unrestricted access
1396         * gnat_ugn.texi: Add note on size of access types about thin
1397         pointers and the use of attribute Unrestricted_Access.
1399 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1401         * a-cbdlli.ads, a-cbdlli.adb, a-cbhama.ads, a-cbhama.adb,
1402         * a-cbhase.ads, a-cbhase.adb, a-cborma.ads, a-cborma.adb,
1403         * a-cborse.ads, a-cborse.adb, a-cobove.ads a-cobove.adb: Add Control
1404         machinery to detect tampering on bounded vectors.
1406 2014-07-16  Robert Dewar  <dewar@adacore.com>
1408         * gnat_rm.texi: Document that leading/trailing asterisks are
1409         now implied for the pattern match string for pragma Warnings
1410         and Warning_As_Error.
1411         * sem_prag.adb (Acquire_Warning_Match_String): New procedure.
1412         (Analyze_Pragma, case Warning_As_Error): Call
1413         Acquire_Warning_Match_String.
1414         (Analyze_Pragma, case Warnings): Call Acquire_Warning_Match_String.
1416 2014-07-16  Bob Duff  <duff@adacore.com>
1418         * gnat_ugn.texi: Document need for project file
1419         for --incremental switch for gnat2xml.
1421 2014-07-16  Robert Dewar  <dewar@adacore.com>
1423         * gnat_rm.texi: Fix example of non-packable components in packed
1424         records section.
1426 2014-07-16  Robert Dewar  <dewar@adacore.com>
1428         * s-tpoben.adb, s-tasren.adb, s-interr.adb, s-interr-hwint.adb,
1429         s-shasto.adb, s-interr-vms.adb, s-interr-sigaction.adb: Avoid use of
1430         upper case in exception messages.
1432 2014-07-16  Robert Dewar  <dewar@adacore.com>
1434         * snames.ads-tmpl, sem_attr.adb, exp_attr.adb: Same_Storage attribute
1435         is renamed Has_Same_Storage.
1436         * gnat_rm.texi: Document missing SPARK pragmas and attributes.
1437         * sem_prag.adb: Minor comment fix (use LOCAL_NAME in syntax
1438         descriptions).
1440 2014-07-16  Robert Dewar  <dewar@adacore.com>
1442         * exp_util.adb, sem_attr.adb, exp_ch4.adb, a-cohase.ads,
1443         a-coinho-shared.adb, a-coinho-shared.ads: Minor reformatting.
1445 2014-07-16  Robert Dewar  <dewar@adacore.com>
1447         * gnat_ugn.texi: Add note that integrated
1448         preprocessing cannot be applied to configuration pragma files.
1450 2014-07-16  Yannick Moy  <moy@adacore.com>
1452         * sem_attr.adb (Analyze_Attribute/cases Pred
1453         and Succ): Always enable range check on fixed-point types if
1454         not suppressed for the type.
1456 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
1458         * sem_util.adb (State_Has_Enabled_Property):
1459         Account for an external property denoted by an others choice.
1461 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
1463         * exp_ch4.ads, exp_ch4.adb (Find_Hook_Context): Relocated to Exp_Util.
1464         * exp_ch7.adb (Process_Declarations): There is no need to check
1465         that a transient object being hooked is controlled as it would
1466         not have been hooked in the first place.
1467         * exp_ch9.adb Remove with and use clause for Exp_Ch4.
1468         * exp_util.adb (Find_Hook_Context): Relocated from Exp_Ch4.
1469         (Is_Aliased): A renaming of a transient controlled object is
1470         not considered aliasing when it occurs within an expression
1471         with actions.
1472         (Requires_Cleanup_Actions): There is no need to
1473         check that a transient object being hooked is controlled as it
1474         would not have been hooked in the first place.
1475         * exp_util.ads (Find_Hook_Context): Relocated from Exp_Ch4.
1477 2014-07-16  Hristian Kirtchev  <kirtchev@adacore.com>
1479         * sem_ch13.adb (Insert_After_SPARK_Mode): Moved to
1480         the outer level of routine Analyze_Aspect_Specifications. Ensure
1481         that the corresponding pragmas of aspects Initial_Condition and
1482         Initializes are inserted after pragma SPARK_Mode.
1484 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1486         * sem_attr.adb (Analyze_Attribute, case 'Update): Handle
1487         properly a choice list with more than one choice, where each
1488         is an aggregate denoting a sequence of array indices for a
1489         multidimentional array. For SPARK use.
1491 2014-07-16  Vadim Godunko  <godunko@adacore.com>
1493         * a-coinho-shared.adb (Adjust): Create
1494         copy of internal shared object and element when source container
1495         is locked.
1496         (Copy): Likewise.
1497         (Query_Element): Likewise.
1498         (Update_Element): Likewise.
1499         (Constant_Reference): Likewise. Raise Constraint_Error on attempt
1500         to get reference for empty holder.
1501         (Reference): Likewise.
1503 2014-07-16  Thomas Quinot  <quinot@adacore.com>
1505         * exp_ch4.adb (Find_Hook_Context): New subprogram, extracted
1506         from Process_Transient_Oject.
1507         * exp_ch4.ads: Ditto.
1508         * exp_ch9.adb (Build_Class_Wide_Master): Insert the _master
1509         declaration as an action on the topmost enclosing expression,
1510         not on a possibly conditional subexpreession.
1512 2014-07-16  Vadim Godunko  <godunko@adacore.com>
1514         * a-coinho.adb, a-coinho-shared.adb, a-coinho.ads, a-coinho-shared.ads:
1515         Fix parameter mode of Update_Element.
1517 2014-07-16  Robert Dewar  <dewar@adacore.com>
1519         * a-coinho.adb, a-coinho-shared.adb, a-coinho-shared.ads: Minor
1520         reformatting.
1522 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1524         * a-cohase.ads: Type Iterator must be controlled, so that the
1525         tampering bit is properly set through an iteration.
1526         * a-cohase.adb: Add Finalize operation for type Iterator.
1528 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1530         * a-coinho-shared.adb, a-coinho-shared.ads: Proper structures for
1531         tampering checks.
1533 2014-07-16  Ed Schonberg  <schonberg@adacore.com>
1535         * a-coinho-shared.adb: Fix spurious accessibility check.
1537 2014-06-15  Jan Hubicka  <hubicka@ucw.cz>
1539         * gcc-interface/utils.c (process_attributes): Use set_decl_tls_model.
1541 2014-06-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1543         PR ada/61505
1544         * gnat_rm.texi: Fix errors with makeinfo 5.1.
1546 2014-06-14  Arnaud Charlet  <charlet@adacore.com>
1548         PR ada/61505
1549         * gnat_rm.texi: Attempt to fix error with makeinfo 5.1.
1551 2014-06-13  Yannick Moy  <moy@adacore.com>
1553         * exp_attr.adb: Fix typo in comment.
1554         * gnat1drv.adb (Adjust_Global_Switches): Force float overflow
1555         checking in GNATprove_Mode.
1557 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1559         * a-coinho-shared.adb, a-coinho-shared.ads: Update shared version.
1561 2014-06-13  Robert Dewar  <dewar@adacore.com>
1563         * sem_ch3.adb, sem_ch9.adb, a-coinho.adb, a-coinho.ads: Minor
1564         reformatting.
1566 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
1568         * sem_prag.adb (Analyze_Pragma): Add local
1569         variable Missing_Parentheses. Emit an error when a state
1570         declaration with options appears without parentheses. Add a
1571         guard to prevent a bogus error when a state declaration may be
1572         interpreted as an option if a previous declaration with options
1573         was not parenthesized.
1575 2014-06-13  Robert Dewar  <dewar@adacore.com>
1577         * checks.adb: Validate_Alignment_Check_Warnings: New procedure
1578         (Apply_Address_Clause_Check): Make Aligment_Warnings table entry.
1579         * checks.ads (Alignment_Warnings_Record): New type.
1580         (Alignment_Warnings): New table
1581         (Validate_Alignment_Check_Warnings): New procedure.
1582         * errout.adb (Delete_Warning_And_Continuations): New procedure
1583         (Error_Msg_Internal): Set Warning_Msg (Delete_Warning): Handle
1584         Warnings_Treated_As_Errors (Finalize): Minor reformatting
1585         * errout.ads (Warning_Msg): New variable
1586         (Delete_Warning_And_Continuations): New procedure
1587         * erroutc.adb (Delete_Msg): Handle Warnings_Treated_As_Errors count.
1588         * gnat1drv.adb (Post_Compilation_Validation_Checks): New procedure.
1590 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1592         * a-coinho.adb, a-coinho.ads: Add Reference machinery.
1594 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
1596         * errout.adb (SPARK_Msg_N): New routine.
1597         (SPARK_Msg_NE): New routine.
1598         * errout.ads Add a section on SPARK-related error routines.
1599         (SPARK_Msg_N): New routine.
1600         (SPARK_Msg_NE): New routine.
1601         * sem_ch13.adb (Analyze_Aspect_Specifications): Ensure that
1602         pragma Abstract_State is always inserted after SPARK_Mode.
1603         (Insert_After_SPARK_Mode): New routine.
1604         * sem_prag.adb (Analyze_Abstract_State,
1605         Analyze_Constituent, Analyze_External_Property,
1606         Analyze_External_Property_In_Decl_Part, Analyze_Global_Item,
1607         Analyze_Global_List, Analyze_Initialization_Item,
1608         Analyze_Initialization_Item_With_Inputs, Analyze_Input_Item,
1609         Analyze_Input_List, Analyze_Input_Output, Analyze_Part_Of,
1610         Analyze_Pragma, Analyze_Refined_Depends_In_Decl_Part,
1611         Analyze_Refined_Global_In_Decl_Part,
1612         Analyze_Refined_State_In_Decl_Part, Analyze_Refinement_Clause,
1613         Check_Aspect_Specification_Order, Check_Constituent_Usage,
1614         Check_Declaration_Order, Check_Dependency_Clause,
1615         Check_Duplicate_Mode, Check_Duplicate_Option,
1616         Check_Duplicate_Property, Check_External_Properties,
1617         Check_External_Property, Check_Function_Return,
1618         Check_Matching_Constituent, Check_Matching_State,
1619         Check_Mode_Restriction_In_Enclosing_Context,
1620         Check_Mode_Restriction_In_Function, Check_Refined_Global_Item,
1621         Check_State_And_Constituent_Use, Create_Or_Modify_Clause,
1622         Has_Extra_Parentheses, Inconsistent_Mode_Error,
1623         Match_Error, Propagate_Part_Of, Report_Extra_Clauses,
1624         Report_Extra_Constituents_In_List, Report_Extra_Inputs,
1625         Report_Unrefined_States, Report_Unused_Constituents,
1626         Report_Unused_States, Role_Error, Usage_Error):
1627         Convert Error_Msg_XXX calls to SPARK_Msg_XXX calls
1628         to report semantic errors only when SPARK_Mode is on.
1629         (Analyze_Depends_In_Decl_Part): Do not check the syntax of
1630         pragma Depends explicitly, this is now done by the analysis.
1631         (Analyze_Global_In_Decl_List): Do not check the syntax of
1632         pragma Global explicitly, this is now done by the analysis.
1633         (Analyze_Initializes_In_Decl_Part): Do not check the syntax of
1634         pragma Initializes explicitly, this is now done by the analysis.
1635         (Analyze_Part_Of): Do not check the syntax of the encapsulating
1636         state, this is now done by the analysis.
1637         (Analyze_Pragma): Do
1638         not check the syntax of a state declaration, this is now done
1639         by the analysis.
1640         (Analyze_Refined_Depends_In_Decl_Part): Do not
1641         check the syntax of pragma Refined_Depends explicitly, this is now
1642         done by the analysis.
1643         (Analyze_Refined_Global_In_Decl_Part): Do
1644         not check the syntax of pragma Refined_Global explicitly, this is
1645         now done by the analysis.
1646         (Analyze_Refined_State_In_Decl_Part):
1647         Do not check the syntax of pragma Refined_State explicitly, this
1648         is now done by the analysis.
1649         (Check_Dependence_List_Syntax): Removed.
1650         (Check_Global_List_Syntax): Removed.
1651         (Check_Initialization_List_Syntax): Removed.
1652         (Check_Item_Syntax): Removed.
1653         (Check_Missing_Part_Of): Do not consider items from an instance.
1654         (Check_Refinement_List_Syntax): Removed.
1655         (Check_State_Declaration_Syntax): Removed.
1656         (Collect_Global_List): Do not raise Program_Error when the input is
1657         malformed.
1658         (Process_Global_List): Do not raise Program_Error when the input
1659         is malformed.
1660         * sem_ch13.adb: Minor reformatting.
1662 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1664         * sem_ch3.adb (Find_Type_Name): Diagnose a private type completion
1665         that is an interface definition with an interface list.
1666         (Process_Full_View): Move error message on missmatched interfaces
1667         between views to the declaration of full view, for clarity.
1668         * sem_ch9.adb (Check_Interfaces): Move error message to full view,
1669         for clarity.
1671 2014-06-13  Robert Dewar  <dewar@adacore.com>
1673         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred/Succ): Change
1674         reason to Overflow.
1676 2014-06-13  Robert Dewar  <dewar@adacore.com>
1678         * makeutl.adb: Minor reformatting.
1680 2014-06-13  Gail Schenker  <schenker@adacore.com>
1682         * debug.adb, sem_eval.adb (Why_Not_Static): Remove temporary code and
1683         associated flag (d.z), no longer needed.
1685 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1687         * sem_ch13.adb (Analyze_Aspect_Specifications): For Import and
1688         Export aspects, do not check whether a corresponding Convention
1689         aspect has been specified. Convention is optional in Ada2012,
1690         and defaults to Convention_Ada.
1692 2014-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1694         * checks.adb (Apply_Address_Clause_Check): Only issue the new
1695         warning if the propagation warning is issued.
1697 2014-06-13  Thomas Quinot  <quinot@adacore.com>
1699         * exp_ch4.adb: Minor reformatting.
1701 2014-06-13  Robert Dewar  <dewar@adacore.com>
1703         * exp_attr.adb (Expand_N_Attribute_Reference, case Pred):
1704         Handle float range check case (Expand_N_Attribute_Reference,
1705         case Succ): Handle float range check case.
1706         * sem_attr.adb (Analyze_Attribute, case Pred/Succ): Handle float
1707         range check case.
1709 2014-06-13  Vincent Celier  <celier@adacore.com>
1711         * makeutl.ads (Compute_Builder_Switches): Change name of
1712         parameter Root_Environment to Env.
1713         * prj-conf.adb (Check_Switches): Call Locate_Runtime with the
1714         Env parameter of procedure Get_Or_Create_Configuration_File.
1715         (Locate_Runtime): Call Find_Rts_In_Path with the Project_Path
1716         of new parameter Env.
1717         * prj-conf.ads (Locate_Runtime): New parameter Env of type
1718         Prj.Tree.Environment.
1720 2014-06-13  Robert Dewar  <dewar@adacore.com>
1722         * gnat_rm.texi: Minor comment clarification for Check_Float_Overflow.
1724 2014-06-13  Robert Dewar  <dewar@adacore.com>
1726         * exp_attr.adb, exp_ch9.adb, lib-writ.adb, g-comlin.adb: Minor
1727         reformatting.
1728         * sem_attr.adb: Minor code reformatting and simplification.
1729         * checks.adb: Fix minor typo.
1731 2014-06-13  Emmanuel Briot  <briot@adacore.com>
1733         * g-comlin.adb (Get_Argument): fix expansion
1734         of command line arguments (e.g. "*.adb") when using a custom
1735         parser. The parser was not passed to the recursive call, and
1736         thus we were trying to do the expansion on the default command
1737         line parser.
1739 2014-06-13  Thomas Quinot  <quinot@adacore.com>
1741         * exp_ch9.adb: Minor reformatting.
1743 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1745         * exp_attr.adb (Expand_N_Attribute_Reference, case 'Old):
1746         To determine whether the attribute should be expanded, examine
1747         whether the enclosing postcondition pragma is to be checked,
1748         rather than using the internal flag Assertions_Enabled.
1750 2014-06-13  Ben Brosgol  <brosgol@adacore.com>
1752         * gnat_rm.texi: Minor fixes.
1753         * gnat_ugn.texi: Added a missing "@itemize".
1755 2014-06-13  Robert Dewar  <dewar@adacore.com>
1757         * debug.adb: Remove -gnatd.1 flag documentation.
1758         * layout.adb (Layout_Type): Remove special handling of size
1759         for anonymous access type.
1760         * sem_ch3.adb (Replace_Type): Remove special handling of size
1761         for anonymous access type.
1763 2014-06-13  Robert Dewar  <dewar@adacore.com>
1765         * debug.adb: Document debug flag -gnatd.1.
1766         * layout.adb (Layout_Type): Size change for anonymous access
1767         types under -gnatd.1.
1768         * sem_ch3.adb (Replace_Type): Size change for anonymous access
1769         types under -gnatd.1.
1771 2014-06-13  Robert Dewar  <dewar@adacore.com>
1773         * layout.adb (Layout_Type): Anonymous access types designating
1774         unconstrained arrays are always thin pointers.
1775         * sem_ch3.adb (Replace_Type): Anonymous access types designating
1776         unconstrained arrays are always thin pointers.
1778 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1780         * sem_attr.adb (Analyze_Attribute): Use Check_Parameterless_Call
1781         to resolve the prefix of an attribute that is an entity name
1782         and may be a parameterless call.  Minor code reorganization.
1784 2014-06-13  Robert Dewar  <dewar@adacore.com>
1786         * lib.ads, lib.adb, lib-writ.adb, lib-load.adb (Is_Compiler_Unit):
1787         Removed.
1788         * opt.ads (Compiler_Unit): New flag.
1789         * par-ch5.adb (Test_Statement_Required): Call Check_Compiler_Unit
1790         for null statement sequence (not allowed in compiler unit).
1791         * par-prag.adb (Prag): Handle Compiler_Unit[_Warning] during
1792         parsing.
1793         * restrict.ads, restrict.adb (Check_Compiler_Unit): New version and new
1794         calling sequence.
1795         * sem_ch11.adb, sem_ch3.adb, sem_ch4.adb: New calling sequence for
1796         Check_Compiler_Unit.
1797         * sem_ch6.adb (Analyze_Extended_Return_Statement): Call
1798         Check_Compiler_Unit (this construct is not allowed in compiler
1799         units).
1800         * sem_prag.adb (Analyze_Pragma, case Compiler_Unit[_Warning]):
1801         Set Opt.Compiler_Unit.
1803 2014-06-13  Geert Bosch  <bosch@adacore.com>
1805         * gnat_rm.texi, s-tasinf-solaris.ads, sem_prag.adb, gnat_ugn.texi,
1806         s-tasinf-mingw.ads, s-tasinf.ads, s-tasinf-linux.ads,
1807         s-tasinf-vxworks.ads: Make Task_Info pragma and package obsolescent.
1809 2014-06-13  Robert Dewar  <dewar@adacore.com>
1811         * s-tasini.adb, s-tarest.adb, s-taprob.adb: Minor reformatting.
1813 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
1815         * freeze.adb (Freeze_Entity): Remove the check concerning volatile
1816         types in SPARK as it is poorly placed and poorly formulated. The
1817         check was flagging ALL volatile entities as illegal in SPARK.
1818         * sem_prag.adb (Process_Atomic_Shared_Volatile): Flag volatile
1819         types as illegal in SPARK.
1821 2014-06-13  Robert Dewar  <dewar@adacore.com>
1823         * sem_cat.adb: Minor reformatting.
1825 2014-06-13  Yannick Moy  <moy@adacore.com>
1827         * sem_prag.adb (Analyze_Pragma/Post_Class): Fix typo.
1829 2014-06-13  Arnaud Charlet  <charlet@adacore.com>
1831         * gnat_rm.texi: Add detail on SPARK_05 restriction.
1833 2014-06-13  Bob Duff  <duff@adacore.com>
1835         * s-solita.adb (Get_Sec_Stack_Addr, Init_Tasking_Soft_Links):
1836         Add assertions requiring the secondary stack to be initialized.
1837         * s-solita.ads (Init_Tasking_Soft_Links): Comment.
1838         * s-taprob.adb, s-tarest.adb, s-tasini.adb (elab code): Make sure the
1839         secondary stack is initialized before calling Init_Tasking_Soft_Links,
1840         by adding pragmas Elaborate_Body.
1842 2014-06-13  Thomas Quinot  <quinot@adacore.com>
1844         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Remove temporary
1845         kludge disabling new legality check.
1847 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
1849         * freeze.adb (Freeze_Record_Type): Remove checks related to SPARK
1850         volatile types.
1851         (Freeze_Type): Volatile types are now illegal in SPARK.
1853 2014-06-13  Robert Dewar  <dewar@adacore.com>
1855         * aspects.ads, aspects.adb: Add aspect Thread_Local_Storage.
1856         * gnat_rm.texi: Document aspect Thread_Local_Storage.
1858 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1860         * sem_cat.adb (Validate_Static_Object_Name): A constant whose
1861         value is a temporary that renames an aggregate is legal in a
1862         preelaborated unit. Illegalities, if any will be detected in
1863         the aggregate components.
1865 2014-06-13  Ed Schonberg  <schonberg@adacore.com>
1867         * einfo.ads: Minor reformatting an comment expansion.
1869 2014-06-13  Robert Dewar  <dewar@adacore.com>
1871         * back_end.ads, back_end.adb: Make_Id, Make_SC, Set_RND are moved to
1872         Tbuild.
1873         * tbuild.ads, tbuild.adb: Make_Id, Make_SC, Set_RND are moved here from
1874         Back_End.
1875         * gnat1drv.adb: Make_Id, Make_SC, Set_RND are moved to Tbuild
1876         * sem_warn.adb: Minor reformatting.
1878 2014-06-13  Doug Rupp  <rupp@adacore.com>
1880         * adaint.c (__gnat_open_new_temp) [VMS]: Open binary
1881         files with rfm=udf.
1883 2014-06-13  Yannick Moy  <moy@adacore.com>
1885         * sem_warn.adb (Check_Unset_References): Take
1886         case of Refined_Post into account in Within_Postcondition check.
1888 2014-06-13  Hristian Kirtchev  <kirtchev@adacore.com>
1890         * freeze.adb (Freeze_Record_Type): Volatile types are not allowed in
1891         SPARK.
1893 2014-06-13  Yannick Moy  <moy@adacore.com>
1895         * sem_ch13.adb (Analyze_Aspect_Specifications/Aspect_Import,
1896         Aspect_Export): Consider that variables may be set outside the program.
1898 2014-06-13  Robert Dewar  <dewar@adacore.com>
1900         * back_end.adb (Make_Id): New function.
1901         (Make_SC): New function.
1902         (Set_RND): New procedure.
1903         * back_end.ads (Make_Id): New function.
1904         (Make_SC): New function.
1905         (Set_RND): New procedure.
1906         * einfo.ads: Minor comment updates.
1907         * frontend.adb: Move Atree.Initialize call to Gnat1drv.
1908         * gnat1drv.adb (Gnat1drv): New calling sequence for
1909         Get_Target_Parameters.
1910         (Gnat1drv): Move Atree.Initialize here from Frontend.
1911         * targparm.adb (Get_Target_Parameters): New calling
1912         sequence (Get_Target_Parameters): Handle pragma Restriction
1913         (No_Dependence,..)
1914         * targparm.ads (Get_Target_Parameters): New calling sequence.
1916 2014-06-13  Gary Dismukes  <dismukes@adacore.com>
1918         * sem_prag.adb (Process_Import_Or_Interface): Exit the homonym
1919         loop if the pragma does not come from source, so that an implicit
1920         pragma Import only applies to the first declaration, avoiding
1921         possible conflicts with earlier explicit and implicit declarations
1922         due to multiple Provide_Shift_Operators pragmas.
1923         (Set_Imported): Remove previous fix that bypassed pragma duplication
1924         error.
1925         * gnat_rm.texi: Change 'equivalent' to 'similar' in description
1926         of Provide_Shift_Operators.
1928 2014-06-12  Jan Hubicka  <hubicka@ucw.cz>
1930         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Pass
1931         string pointer directly to set_decl_section_name.
1933 2014-06-11  Robert Dewar  <dewar@adacore.com>
1935         * sem_ch13.adb: Minor reformatting.
1937 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
1939         * sem_prag.adb (Check_Clause_Syntax): Add new
1940         local variable Outputs. Account for the case where multiple
1941         output items appear as an aggregate.
1943 2014-06-11  Robert Dewar  <dewar@adacore.com>
1945         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1946         with ?j? not ??.
1948 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
1950         * einfo.ads: Minor reformatting.
1952 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
1954         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1955         new variable First_Node. Update the position after all insertions have
1956         taken place to First_Node.
1958 2014-06-11  Robert Dewar  <dewar@adacore.com>
1960         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1961         * layout.adb (Layout_Type): Remove test of -gnatd.1.
1963 2014-06-11  Robert Dewar  <dewar@adacore.com>
1965         * sem_ch13.adb: Minor reformatting.
1967 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
1969         * sem_prag.adb (Check_Clause_Syntax): Add new
1970         local variable Outputs. Account for the case where multiple
1971         output items appear as an aggregate.
1973 2014-06-11  Robert Dewar  <dewar@adacore.com>
1975         * sem_warn.adb (Output_Obsolescent_Entity_Warnings): Tag warning
1976         with ?j? not ??.
1978 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
1980         * einfo.ads: Minor reformatting.
1982 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
1984         * a-cbdlli.adb, a-cdlili.adb, a-cidlli.adb, a-crdlli.adb (Insert): Add
1985         new variable First_Node. Update the position after all insertions have
1986         taken place to First_Node.
1988 2014-06-11  Robert Dewar  <dewar@adacore.com>
1990         * debug.adb: Remove debug flag -gnatd.1, no longer needed.
1991         * layout.adb (Layout_Type): Remove test of -gnatd.1.
1993 2014-06-11  Thomas Quinot  <quinot@adacore.com>
1995         * freeze.ads: Minor reformatting.
1996         * checks.adb (Determine_Range): Do not attempt to determine
1997         the range of a deferred constant whose full view has not been
1998         seen yet.
1999         * sem_res.adb (Resolve): Remove undesirable guard against
2000         resolving expressions from expression functions.
2002 2014-06-11  Robert Dewar  <dewar@adacore.com>
2004         * debug.adb (Debug_Flag_Dot_1): Set to enable fix for anonymous
2005         access types.
2006         * layout.adb (Layout_Type): Make anonymous access types for
2007         subprogram formal types and return types always thin. For now
2008         only enabled if -gnatd.1 set.
2010 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2012         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
2013         rule for stream attributes of interface types (RM 13.13.2 (38/3)):
2014         subprogram must be a null procedure.
2016 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
2018         * sem_prag.adb (Analyze_Input_Item): Allow formal
2019         parameters to appear as input_items in an initialization_list
2020         of pragma Initializes. Encapsulation now applies to states and
2021         variables only (as it should). Add RM references to key errors.
2022         * sem_prag.adb (Set_Imported): Suppress errors
2023         about preceding Imports when the pragma does not come from source,
2024         which can happen through use of pragma Provide_Shift_Operators.
2026 2014-06-11  Thomas Quinot  <quinot@adacore.com>
2028         * sem_ch3.adb: Minor reformatting.
2029         * einfo.ads (Full_View): Minor comment update.
2031 2014-06-11  Robert Dewar  <dewar@adacore.com>
2033         * einfo.adb (Is_Independent): New flag.
2034         * einfo.ads (Is_Independent): New flag.
2035         (Has_Independent_Components): Clean up and fix comments.
2036         * sem_prag.adb (Fix_Error): Deal with changing argument
2037         [of] to entity [for].
2038         (Analyze_Pragma, case Independent): Set Is_Independent flag
2039         (Analyze_Pragma, case Independent_Components): Set Is_Independent flag
2040         in all components of specified record.
2042 2014-06-11  Thomas Quinot  <quinot@adacore.com>
2044         * sem_ch12.adb (Analyze_Formal_Decimal_Fixed_Point_Type):
2045         Set proper Etype on bounds of dummy type created for analysis
2046         of the generic.
2048 2014-06-11  Robert Dewar  <dewar@adacore.com>
2050         * debug.adb: Minor comment fix (add missing section of dot
2051         numeric flags).
2053 2014-06-11  Robert Dewar  <dewar@adacore.com>
2055         * gnat_rm.texi, switch-c.adb, sem_prag.adb, a-tgdico.ads, par-prag.adb,
2056         opt.ads, a-finali.ads, snames.ads-tmpl: Remove all traces of
2057         pragma/aspects Pure_05 Pure_12 Preelaborate_05.
2058         * errout.adb (Output_Messages): Avoid duplicate output for
2059         library level instance.
2060         * sem_elab.adb (Is_Call_Of_Generic_Formal): Moved to outer level
2061         (Check_Elab_Call): Add call to Is_Call_Of_Generic_Formal
2062         * exp_ch4.adb (Expand_N_Op_Expon): New interface for Exp_Modular.
2063         * s-expmod.ads, s-expmod.adb (Exp_Modular): Change interface to
2064         accomodate largest modulus value.
2065         * gnat_ugn.texi: Minor updates.
2067 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2069         * sem_ch12.adb (Instantiate_Package_Body): Do not attempt to
2070         load body of generic package or its parent, if body is optional
2071         and the unit does not require a body.
2073 2014-06-11  Robert Dewar  <dewar@adacore.com>
2075         * gnat_rm.texi: Document System.Unsigned_Types.
2076         * impunit.adb: System.Unsigned_Types (s-unstyp.ads) is user accessible.
2077         * s-unstyp.ads: Update comments (this is now user available unit).
2079 2014-06-11  Robert Dewar  <dewar@adacore.com>
2081         * make.adb, sem_res.adb: Minor reformatting.
2083 2014-06-11  Thomas Quinot  <quinot@adacore.com>
2085         * a-astaco.ads, a-tags.ads, s-excdeb.ads, a-tgdico.ads, a-stmaco.ads,
2086         a-except-2005.ads, s-except.ads, a-taside.ads, a-dynpri.ads,
2087         a-chahan.ads, a-sytaco.ads, s-stalib.ads, a-strmap.ads: Change pragmas
2088         Preelaborate_05 to just Preelaborate in runtime units, and similarly
2089         change Pure_05 to just Pure.
2091 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2093         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not attempt
2094         analysis if error has been posted on subprogram body.
2096 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2098         * sem_ch13.adb (Analyze_Stream_TSS_Definition): Apply legality
2099         rule given in RM 13.1 (8/1) for operational attributes to stream
2100         attributes: the attribute must apply to a first subtype. Fixes
2101         missing errors in ACATS test bdd2004.
2103 2014-06-11  Robert Dewar  <dewar@adacore.com>
2105         * exp_ch3.adb (Build_Record_Init_Proc): Don't build for variant
2106         record type if restriction No_Implicit_Conditionals is active.
2107         (Expand_N_Object_Declaration): Don't allow default initialization
2108         for variant record type if restriction No_Implicit_Condition is active.
2109         (Build_Variant_Record_Equality): Don't build for variant
2110         record type if restriction No_Implicit_Conditionals is active.
2111         * exp_ch4.adb (Expand_N_Op_Eq): Error if variant records with
2112         No_Implicit_Conditionals.
2113         * sem_aux.ads, sem_aux.adb (Has_Variant_Part): New function.
2115 2014-06-11  Ramon Fernandez  <fernandez@adacore.com>
2117         * i-cstrin.ads: Update comments.
2119 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2121         * sem_res.adb (Resolve_Selected_Component): Handle properly a
2122         selected component whose prefix is overloaded, when none of the
2123         interpretations matches the expected type.
2125 2014-06-11  Bob Duff  <duff@adacore.com>
2127         * make.adb (Wait_For_Available_Slot): Give a more
2128         informative error message; if the ALI file is not found, print
2129         the full path of what it's looking for.
2131 2014-06-11  Sergey Rybin  <rybin@adacore.com frybin>
2133         * gnat_ugn.texi, vms_data.ads: add description of gnatstub -W<par>
2134         option to specify the result file encoding.
2136 2014-06-11  Robert Dewar  <dewar@adacore.com>
2138         * errout.ads, sem_ch12.adb: Minor reformatting.
2139         * debug.adb, erroutc.adb: Remove -gnatd.q debug switch.
2140         * lib-xref.adb: Minor reformatting.
2141         * restrict.adb: Minor code reorganization (put routines in
2142         alpha order).
2144 2014-06-11  Yannick Moy  <moy@adacore.com>
2146         * einfo.ads: Minor typo in comment
2148 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2150         * sinfo.ads, sinfo.adb: New attribute Uninitialized_Variable, for
2151         formal private types and private type extensions, to indicate
2152         variable in a generic unit whose uninitialized use suggest that
2153         actual type should be fully initialized.
2154         Needs_Initialized_Actual:  removed, functionaity replaced by
2155         the above.
2156         * lib-xref.adb (Generate_Reference): Generate a reference for
2157         variables of a formal type when the unit is not the main unit,
2158         to enable appropriate warnings in an instance.
2159         * sem_ch12.adb (Check_Ininialized_Type): Improve warning on use
2160         of variable in a generic unit that suggests that actual type
2161         should be full initialized.
2162         * sem_warn.adb; (May_Need_Initialized_Actual): Make into procedure
2163         and do not emot warning, which now only appears in an instance.
2165 2014-06-11  Eric Botcazou  <ebotcazou@adacore.com>
2167         * gnat_ugn.texi: Fix minor typo.
2169 2014-06-11  Hristian Kirtchev  <kirtchev@adacore.com>
2171         * sem_ch3.adb Add with and use clause for Sem_Ch10.
2172         (Analyze_Declarations): Code reformatting. Analyze the contract
2173         of a subprogram body stub at the end of the declarative region.
2174         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Spec_Id is
2175         now a variable. Do not process the body if its contract is not
2176         available. Account for subprogram body stubs when extracting
2177         the corresponding spec.
2178         * sem_ch6.ads (Analyze_Subprogram_Contract): Update the comment
2179         on usage.
2180         * sem_ch10.ads, sem_ch10.adb (Analyze_Subprogram_Body_Stub_Contract):
2181         New routine.
2182         * sem_prag.adb (Analyze_Depends_In_Decl_Part):
2183         Account for subprogram body stubs when extracting the
2184         corresponding spec.
2185         (Analyze_Global_In_Decl_List):
2186         Account for subprogram body stubs when extracting the
2187         corresponding spec.
2188         (Analyze_Refined_Depends_In_Decl_Part):
2189         Use Find_Related_Subprogram_Or_Body to retrieve the declaration
2190         of the related body. Spec_Is now a variable. Account for
2191         subprogram body stubs when extracting the corresponding spec.
2192         (Analyze_Refined_Global_In_Decl_Part): Use
2193         Find_Related_Subprogram_Or_Body to retrieve the declaration
2194         of the related body. Spec_Is now a variable. Account for
2195         subprogram body stubs when extracting the corresponding spec.
2196         (Collect_Subprogram_Inputs_Output): Account for subprogram body
2197         stubs when extracting the corresponding spec.
2199 2014-06-11  Vincent Celier  <celier@adacore.com>
2201         * gnatcmd.adb (Process_Link): Do not invoke gnatlink with
2202         -lgnarl or -lgnat.
2204 2014-06-11  Robert Dewar  <dewar@adacore.com>
2206         * debug.adb: Add debug flag -gnatd.q.
2207         * erroutc.adb (Prescan_Message): Bomb if untagged warning with
2208         -gnatd.q set.
2209         * styleg.adb (Check_Xtra_Parens): Message should be a style
2210         message.
2211         * sem_aggr.adb, sem_ch3.adb, exp_ch9.adb, checks.adb, sem_prag.adb,
2212         par-endh.adb, eval_fat.adb, freeze.adb, sem_util.adb, sem_attr.adb,
2213         sem_elab.adb, sem_ch6.adb, sem_warn.adb, sem_cat.adb,
2214         sem_ch13.adb, lib-xref.adb: Add remaining warning tags.
2216 2014-06-11  Ben Brosgol  <brosgol@adacore.com>
2218         * gnat_rm.texi: Revised chapter on Implementation Defined
2219         Characteristics.
2221 2014-06-11  Geert Bosch  <bosch@adacore.com>
2223         * s-exctab.adb: avoid race conditions in exception registration.
2225 2014-06-11  Robert Dewar  <dewar@adacore.com>
2227         * errout.adb (Warn_Insertion): New function.
2228         (Error_Msg): Use Warn_Insertion and Prescan_Message.
2229         (Error_Msg_Internal): Set Info field of error object.
2230         (Error_Msg_NEL): Use Prescan_Message.
2231         (Set_Msg_Text): Don't store info: at start of message.
2232         (Skip_Msg_Insertion_Warning): New name for Set_Msg_Insertion_Warning.
2233         (Skip_Msg_Insertion_Warning): Now just skips warning insertion.
2234         * errout.ads: Document new ?$? and >$> insertion sequences
2235         Document use of "(style)" and "info: "
2236         * erroutc.adb (dmsg): Print several missing fields
2237         (Get_Warning_Tag): Handle -gnatel case (?$?)  (Output_Msg_Text):
2238         Deal with new tagging of info messages
2239         * erroutc.ads: Is_Info_Msg: New global (Error_Msg_Object):
2240         Add field Info (Prescan_Message): New procedure, this procedure
2241         replaces the old Test_Style_Warning_Serious_Unconditional_Msg
2242         * errutil.adb, exp_util.adb, par-ch7.adb, sem_ch13.adb, sem_ch7.adb,
2243         sem_elab.adb: Follow new rules for info message (info belongs
2244         only at the start of a message, and only in the first message,
2245         not in any of the continuations).
2246         * gnat_ugn.texi: Document full set of warning tags.
2248 2014-06-11  Gary Dismukes  <dismukes@adacore.com>
2250         * sem_util.adb: Minor typo fix.
2252 2014-06-11  Ed Schonberg  <schonberg@adacore.com>
2254         * sem_warn.adb (Check_References): Do not emit spurious warnings
2255         on uninitialzed variable of a formal private type if variable
2256         is not read.
2258 2014-06-09  Jan Hubicka  <hubicka@ucw.cz>
2260         * gcc-interface/utils.c (process_attributes) <ATTR_LINK_SECTION>: Use
2261         set_decl_section_name accessor.
2263 2014-05-22  Thomas Schwinge  <thomas@codesourcery.com>
2265         * gcc-interface/utils.c (DEF_FUNCTION_TYPE_0, DEF_FUNCTION_TYPE_6)
2266         (DEF_FUNCTION_TYPE_7, DEF_FUNCTION_TYPE_8)
2267         (DEF_FUNCTION_TYPE_VAR_5): Cosmetic fixes.
2269 2014-05-21  Robert Dewar  <dewar@adacore.com>
2271         * layout.adb: Minor reformatting.
2272         * sem_prag.adb (Analyze_Pragma, case Inspection_Point): Call
2273         dummy procedure ip.
2275 2014-05-21  Robert Dewar  <dewar@adacore.com>
2277         * restrict.ads (Implementation_Restriction): Add entry for
2278         No_Fixed_IO.
2279         * rtsfind.ads: Add entries for Fixed_IO and Decimal_IO in
2280         Ada.[Wide_[Wide_]Text_IO.
2281         * s-rident.ads (Restriction_Id): Add entry for No_Fixed_IO.
2282         * sem_attr.adb (Analyze_Attribute): Disallow fixed point types
2283         for Img, Image, Value, Wide_Image, Wide_Value, Wide_Wide_Image,
2284         Wide_Wide_Value if restriction No_Fixed_IO is set.
2285         * sem_util.adb (Set_Entity_Checks): Check restriction No_Fixed_IO.
2287 2014-05-21  Robert Dewar  <dewar@adacore.com>
2289         * gnatcmd.adb: Minor error msg changes (no upper case letter
2290         at start).
2291         * sem_ch12.adb, sem_ch5.adb, sem_res.adb, sem_util.adb: Minor
2292         reformatting.
2294 2014-05-21  Robert Dewar  <dewar@adacore.com>
2296         * debug.adb: Debug flag -gnatd.G inhibits static elab tracing
2297         via generic formals.
2298         * sem_elab.adb (Is_Call_Of_Generic_Formal): Return False if
2299         -gnatd.G is set.
2301 2014-05-21  Thomas Quinot  <quinot@adacore.com>
2303         * exp_pakd.adb (Revert_Storage_Order): Renamed from Byte_Swap to
2304         more accurately describe that this subprogram needs to come into
2305         play also in cases where no byte swapping is involved, because
2306         it also takes care of some required shifts (left-justification
2307         of values).
2309 2014-05-21  Thomas Quinot  <quinot@adacore.com>
2311         * freeze.adb (Check_Component_Storage_Order): Indicate whether
2312         a Scalar_Storage_Order attribute definition is present for the
2313         component's type.
2314         (Freeze_Record_Type): Suppress junk warnings
2315         about purportedly junk Bit_Order / Scalar_Storage_Order attribute
2316         definitions.
2318 2014-05-21  Robert Dewar  <dewar@adacore.com>
2320         * sem_ch8.adb (Analyze_Subprogram_Renaming): Put back call
2321         to Kill_Elaboration_Checks.
2323 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
2325         * layout.adb (Assoc_Add): Suppress the optimization of the (E
2326         - C1) + C2 case, when the expression type is unsigned and C1 <
2327         C2, to avoid creating a negative literal when folding.
2329 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
2331         * freeze.adb (Freeze_Record_Type): Update the use of
2332         Is_SPARK_Volatile.
2333         * sem_ch3.adb (Analyze_Object_Contract): Update the use of
2334         Is_SPARK_Volatile.
2335         (Process_Discriminants): Update the use of Is_SPARK_Volatile.
2336         * sem_ch5.adb (Analyze_Iterator_Specification): Update the use
2337         of Is_SPARK_Volatile.
2338         (Analyze_Loop_Parameter_Specification):
2339         Update the use of Is_SPARK_Volatile.
2340         * sem_ch6.adb (Process_Formals): Catch an illegal use of an IN
2341         formal parameter when its type is volatile.
2342         * sem_prag.adb (Analyze_Global_Item): Update the use of
2343         Is_SPARK_Volatile.
2344         * sem_res.adb (Resolve_Entity_Name): Correct the guard which
2345         determines whether an entity is a volatile source SPARK object.
2346         * sem_util.adb (Has_Enabled_Property): Accout for external
2347         properties being set on objects other than abstract states
2348         and variables. An example would be a formal parameter.
2349         (Is_SPARK_Volatile): New routine.
2350         (Is_SPARK_Volatile_Object):
2351         Remove the entity-specific tests. Call routine Is_SPARK_Volatile
2352         when checking entities and/or types.
2353         * sem_util.ads (Is_SPARK_Volatile): New routine.
2355 2014-05-21  Robert Dewar  <dewar@adacore.com>
2357         * sem_warn.adb: Minor fix to warning messages (use ?? instead
2358         of ?).
2360 2014-05-21  Vincent Celier  <celier@adacore.com>
2362         * gnatcmd.adb (GNATCmd): For platforms other than VMS, recognize
2363         switch --version and --help.
2365 2014-05-21  Robert Dewar  <dewar@adacore.com>
2367         * sem_elab.adb (Is_Call_Of_Generic_Formal): New function.
2369 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2371         * sem_ch5.adb (Analyze_Iterator_Specification): Set type of
2372         iterator variable when the domain of iteration is a formal
2373         container and this is an element iterator.
2375 2014-05-21  Bob Duff  <duff@adacore.com>
2377         * sem_ch12.adb: Minor reformatting.
2379 2014-05-21  Robert Dewar  <dewar@adacore.com>
2381         * sinfo.ads, sem_ch12.adb, sem_warn.adb: Minor reformatting.
2383 2014-05-21  Robert Dewar  <dewar@adacore.com>
2385         * sem_elab.adb: Minor reformatting.
2386         * s-taprop.ads: Minor comment fix.
2387         * sem_ch8.adb (Analyze_Subprogram_Renaming): Remove call to
2388         Kill_Elaboration_Checks.
2389         * errout.adb, erroutc.adb: Minor reformatting.
2391 2014-05-21  Thomas Quinot  <quinot@adacore.com>
2393         * exp_pakd.adb (Byte_Swap): Handle the case of a sub-byte
2394         component. No byte swapping occurs, but this procedure also takes
2395         care of appropriately justifying the argument.
2397 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
2399         * sem_ch6.adb: sem_ch6.adb (Analyze_Aspects_On_Body_Or_Stub):
2400         New routine.
2401         (Analyze_Subprogram_Body_Helper): Move the
2402         analysis of aspect specifications and the processing of the
2403         subprogram body contract after inlining has taken place.
2404         (Diagnose_Misplaced_Aspect_Specifications): Removed.
2406 2014-05-21  Javier Miranda  <miranda@adacore.com>
2408         * sem_ch3.adb (Build_Derived_Record_Type): Revert previous change.
2410 2014-05-21  Robert Dewar  <dewar@adacore.com>
2412         * sem_eval.ads, sem_eval.adb (Why_Not_Static): Messages are not
2413         continuations any more.
2415 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2417         * sinfo.ads, sinfo.adb: New flag Needs_Initialized_Actual,
2418         present in formal_Private_Definitions and on private extension
2419         declarations of a formal derived type. Set when the use of the
2420         formal type in a generic suggests that the actual should be a
2421         fully initialized type.
2422         * sem_warn.adb (May_Need_Initialized_Actual): new subprogram
2423         to indicate that an entity of a generic type has default
2424         initialization, and that the corresponing actual type in any
2425         subsequent instantiation should be fully initialized.
2426         * sem_ch12.adb (Check_Initialized_Type): new subprogram,
2427         to emit a warning if the actual for a generic type on which
2428         Needs_Initialized_Actual is set is not a fully initialized type.
2430 2014-05-21  Robert Dewar  <dewar@adacore.com>
2432         * sem_elab.adb, prj-dect.adb: Minor reformatting.
2434 2014-05-21  Robert Dewar  <dewar@adacore.com>
2436         * erroutc.ads: Minor comment addition.
2438 2014-05-21  Robert Dewar  <dewar@adacore.com>
2440         * errout.ads: Add documentation for use of >*> tag.
2441         * restrict.adb: Make sure we use >*> tag for restriction warnings.
2443 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
2445         * debug.adb: Add case of illegal overriding_indicator for a
2446         protected subprogram body to description of -gnatd.E switch.
2447         * sem_ch6.adb (Verify_Overriding_Indicator): Issue error message
2448         for cases of giving overriding_indicators on protected subprogram
2449         bodies, but change this to a warning if -gnatd.E is enabled. No
2450         longer give a style warning about missing indicators on protected
2451         subprogram bodies.
2453 2014-05-21  Robert Dewar  <dewar@adacore.com>
2455         * prj.ads, sem_ch12.adb, prj.adb, exp_pakd.adb,
2456         sem_elab.ads: Minor reformatting.
2457         * erroutc.adb, erroutc.ads (Warning_Specifically_Suppressed): Make Tag
2458         parameter optional.
2460 2014-05-21  Pascal Obry  <obry@adacore.com>
2462         * prj-dect.adb: Allow package Install in aggregate project.
2464 2014-05-21  Robert Dewar  <dewar@adacore.com>
2466         * sem_ch13.adb (Analyze_Aspect_Specifications):
2467         Insert_Delayed_Pragma is now used for the case of Attach_Handler.
2468         * sem_prag.adb: Minor comment improvements.
2470 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2472         * sem_ch12.adb (Install_Body): When checking whether freezing of
2473         instantiation must be delayed, verify that the common enclosing
2474         subprogram to generic and instance is in fact an overloadable
2475         entity.
2477 2014-05-21  Vincent Celier  <celier@adacore.com>
2479         * makeutl.adb (Mains.Complete_Mains.Do_Complete): Look for all
2480         mains with the same name and fail if there is more than one.
2481         * prj.ads, prj.adb (Find_All_Sources): New function
2483 2014-05-21  Robert Dewar  <dewar@adacore.com>
2485         * sem_ch13.adb: Minor reformatting.
2486         * lib-xref-spark_specific.adb, sem_util.adb: Minor reformatting.
2487         * sem_prag.adb: Minor error message improvement.
2489 2014-05-21  Yannick Moy  <moy@adacore.com>
2491         * lib-xref-spark_specific.adb, lib-xref.ads, lib-xref.adb
2492         (Enclosing_Subprogram_Or_Package): Only return a library-level
2493         package.
2495 2014-05-21  Javier Miranda  <miranda@adacore.com>
2497         * sem_ch3.adb (Build_Derived_Record_Type): Initialize Parent_Base
2498         to the full view of the parent type when processing a derived type
2499         which is the full view of a private type not defined in a generic
2500         unit which is derived from a private type with discriminants
2501         whose full view is a non-tagged record type.
2503 2014-05-21  Javier Miranda  <miranda@adacore.com>
2505         * exp_ch4.adb (Expand_Allocator_Expression.Apply_Accessibility_Check):
2506         Complete previous patch.
2508 2014-05-21  Thomas Quinot  <quinot@adacore.com>
2510         PR ada/9535
2511         * g-socket.adb (Read and Write for Datagram_Socket_Stream_Type):
2512         Provide a behaviour more consistent with underlying datagram
2513         socket: do not attempt to loop over Send_Socket/Receive_Socket
2514         iterating along the buffer.
2516 2014-05-21  Hristian Kirtchev  <kirtchev@adacore.com>
2518         * freeze.adb (Freeze_Record_Type): Ensure that a discriminated
2519         or a tagged type is not labelled as volatile. Ensure that a
2520         non-volatile type has no volatile components.
2521         * sem_ch3.adb (Analyze_Object_Contract): Add local constant
2522         Obj_Typ. Code reformatting.  Ensure that a discriminated or
2523         tagged object is not labelled as volatile.
2524         * sem_prag.adb (Process_Atomic_Shared_Volatile): Ensure that
2525         pragma Volatile applies to a full type declaration or an object
2526         declaration when SPARK mode is on.
2528 2014-05-21  Sergey Rybin  <rybin@adacore.com frybin>
2530         * gnat_ugn.texi: For ASIS tools, reword the paragraph about
2531         providing options needed for compiling the argument source for
2532         the situation when a project file can be used as a tool parameter.
2534 2014-05-21  Gary Dismukes  <dismukes@adacore.com>
2536         * gnat_rm.texi: Minor typo fix.
2538 2014-05-21  Robert Dewar  <dewar@adacore.com>
2540         * stand.adb (Tree_Read): Read missing entities.
2541         (Tree_Write): Write missing entities.
2543 2014-05-21  Ben Brosgol  <brosgol@adacore.com>
2545         * gnat_ugn.texi: Wordsmithing edits to Coupling Metrics Control
2546         section in gnatmetric chapter.
2548 2014-05-21  Robert Dewar  <dewar@adacore.com>
2550         * exp_ch6.adb (Expand_Actuals): Spec moved here, since not used
2551         outside Exp_Ch6 (Expand_Actuals): Deal with proper insertion of
2552         post-call copy write back (see detailed comment in code).
2553         * exp_ch6.ads (Expand_Actuals): Moved to body, not used outside
2554         Exp_Ch6.
2555         * tbuild.ads: Minor reformatting.
2557 2014-05-21  Robert Dewar  <dewar@adacore.com>
2559         * stand.ads: Add warning about adding new entities and
2560         Tree_Read/Tree_Write.
2562 2014-05-21  Robert Dewar  <dewar@adacore.com>
2564         * sem_util.adb (Set_Entity_With_Checks): Don't complain about
2565         references to restricted entities within the units in which they
2566         are declared.
2568 2014-05-21  Robert Dewar  <dewar@adacore.com>
2570         * gnat1drv.adb (Check_Bad_Body): Use Source_File_Is_Body to
2571         simplify the needed test, and also deal with failure to catch
2572         situations with non-standard names.
2573         * sinput-l.ads, sinput-l.adb (Source_File_Is_No_Body): New function
2574         (Source_File_Is_Subunit): Removed, no longer used.
2576 2014-05-21  Javier Miranda  <miranda@adacore.com>
2578         * exp_ch4.adb
2579         (Expand_Allocator_Expression.Apply_Accessibility_Check): for a
2580         renaming of an access to interface object there is no need to
2581         generate extra code to reference the tag.
2583 2014-05-21  Robert Dewar  <dewar@adacore.com>
2585         * errout.adb, erroutc.adb, erroutc.ads: Allow warning tag in pragma
2586         Warnings (Off, string).
2588 2014-05-21  Robert Dewar  <dewar@adacore.com>
2590         * osint.adb: Fix three error messages to say invalid instead
2591         of erroneous.
2592         * par-ch4.adb, exp_aggr.adb, sem_attr.adb, sem_aux.adb, sem_ch3.adb,
2593         sem_ch5.adb, sem_ch6.adb, sem_ch7.adb, sem_dim.adb, sem_res.adb,
2594         sem_util.adb, sem_util.ads: Fix incorrect use of erroneous in comments.
2596 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2598         * freeze.adb, sem_ch13.adb, sem_ch13.ads, sem_ch9.adb,
2599         sem_ch9.ads: Move discriminant manipulation routines for analysis of
2600         aspect specifications from sem_ch9 to sem_ch13, where they belong.
2602 2014-05-21  Robert Dewar  <dewar@adacore.com>
2604         * gnat_ugn.texi: Clearly document -gnatw.g (GNAT warnings).
2605         Clearly document -gnatyg (GNAT style switches).
2606         * usage.adb: Add line line for -gnatw.g (GNAT warnings) More
2607         detail for line for -gnatyg (GNAT style switches) -gnatw.d/D is
2608         available for VMS after all.
2609         * warnsw.adb: Reorganize to eliminate duplicated code
2610         (Restore_Warnings): Add a couple of missing entries
2611         (Save_Warnings): Add a couple of missing entries.
2612         * warnsw.ads: Add missing entries to Warning_Record (not clear
2613         what the impact is).
2615 2014-05-21  Robert Dewar  <dewar@adacore.com>
2617         * errout.adb (Set_Msg_Insertion_Warning): Handle ?*? (restriction
2618         warning) case.
2619         * errout.ads: Document ?*? (restriction warning) insertion.
2620         * erroutc.adb (Get_Warning_Tag): Deal with ?*? (restriction
2621         warning) case.
2622         * erroutc.ads: Document use of * for restriction warning tag.
2623         * restrict.adb (Restriction_Msg): Tag with ?*? instead of ??.
2625 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2627         * sem_ch9.adb (Push_Scope_And_Install_Discriminants): Do not
2628         make discriminants immediately visible when analyzing an aspect
2629         of a subtype declaration.
2630         (Uninstall_Discriminants): Do not apply to the entity in a
2631         subtype declaration.
2633 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2635         * sem_util.adb: Code clean up.
2637 2014-05-21  Eric Botcazou  <ebotcazou@adacore.com>
2639         * gnat_ugn.texi: Document -Werror.
2641 2014-05-21  Bob Duff  <duff@adacore.com>
2643         * sem_util.adb (Is_Dependent_Component_Of_Mutable_Object):
2644         This was returning False if the Object is a constant view. Fix
2645         it to return True in that case, because it might be a view of
2646         a variable.
2647         (Has_Discriminant_Dependent_Constraint): Fix latent
2648         bug; this function was crashing when passed a discriminant.
2650 2014-05-21  Robert Dewar  <dewar@adacore.com>
2652         * gnat_ugn.texi: Remove misplaced section that is now obsolete.
2653         * s-arit64.adb: Minor code reorganization.
2654         * sem_prag.adb: Minor comment fix (remove erroneous use of the
2655         term erroneous).
2657 2014-05-21  Robert Dewar  <dewar@adacore.com>
2659         * g-table.adb, g-dyntab.adb (Reallocate): Fix possible overflow in
2660         computing new table size.
2662 2014-05-21  Robert Dewar  <dewar@adacore.com>
2664         * einfo.ads: Minor reformatting.
2665         * ceinfo.adb: Deal with slight format change of einfo.ads.
2667 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2669         * sem_prag.adb (Analyze_Part_Of): Further work on the proper
2670         implementation of the SPARK 2014 rule concerning private child
2671         units (LRM 7.2.6).
2673 2014-05-21  Vincent Celier  <celier@adacore.com>
2675         * makeusg.adb: Add switch -d to usage.
2677 2014-05-21  Ed Schonberg  <schonberg@adacore.com>
2679         * sem_util.adb (Find_Actual): If an actual that is the prefix
2680         of an enclosing prefixed call has been rewritten, use Nkind
2681         and Sloc to identify the corresponding formal, when handling
2682         deferred references.
2684 2014-05-21  Robert Dewar  <dewar@adacore.com>
2686         * debug.adb: Document -gnatd.z switch.
2687         * sem_eval.adb (Why_Non_Static): Test -gnatd.z switch.
2689 2014-05-21  Robert Dewar  <dewar@adacore.com>
2691         * einfo.ads (Can_Never_Be_Null): Minor comment update.
2692         * sem_prag.adb (Check_Arg_Is_Task_Dispatching_Policy): Minor
2693         error message change.
2694         * s-arit64.adb ("abs"): New function. Use expression functions
2695         for the simple conversions and arithmetic.
2697 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2699         * gcc-interface/trans.c (Subprogram_Body_to_gnu): Rework comment and
2700         set function_start_locus.
2702 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2704         * utils.c (gnat_write_global_declarations): Adjust the flags put on
2705         dummy_global.
2707 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2709         * gcc-interface/decl.c (change_qualified_type): New static function.
2710         (gnat_to_gnu_entity): Use it throughout to add qualifiers on types.
2711         <E_Array_Type>: Set TYPE_VOLATILE on the array type directly.
2712         <E_Array_Subtype>: Likewise.
2713         Do not set flags on an UNCONSTRAINED_ARRAY_TYPE directly.
2714         (gnat_to_gnu_component_type): Likewise.
2715         (gnat_to_gnu_param): Likewise.
2717 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2719         * fe.h (Set_Present_Expr): Move around.
2720         (End_Location): New macro.
2721         * gcc-interface/trans.c (Case_Statement_to_gnu): Use End_Location.
2723 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2725         * gcc-interface/decl.c (gnat_to_gnu_entity): Use Underlying_Type in
2726         lieu of more verbose construct.
2727         * gcc-interface/trans.c (Call_to_gnu): Likewise.
2728         (gnat_to_gnu): Likewise.  Remove obsolete code.
2730 2014-05-18  Eric Botcazou  <ebotcazou@adacore.com>
2732         * gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: Do not
2733         consider that regular packed arrays can never be superflat.
2735 2014-05-17  Trevor Saunders  <tsaunders@mozilla.com>
2737         * gcc-interface/ada-tree.h: Remove usage of variable_size gty
2738         annotation.
2739         * gcc-interface/decl.c (annotate_value): Adjust.
2740         * gcc-interface/trans.c (Attribute_to_gnu): Likewise.
2741         (push_range_check_info): Likewise.
2742         (Loop_Statement_to_gnu): Likewise.
2743         (Subprogram_Body_to_gnu): Likewise.
2744         (Compilation_Unit_to_gnu): Likewise.
2745         (start_stmt_group): Likewise.
2746         * gcc-interface/utils.c (init_gnat_utils): Likewise.
2747         (gnat_pushlevel): Likewise.
2748         (maybe_pad_type): Likewise.
2750 2014-05-14  Eric Botcazou  <ebotcazou@adacore.com>
2752         * seh_init.c: Fix copyright year.
2754 2014-05-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2756         * seh_init.c (__gnat_map_SEH): Compile also when __CYGWIN__ and __SEH__
2757         are defined.  Move include windows.h before system.h.
2758         * s-oscons-tmplt.c (DTR_CONTROL_ENABLE, RTS_CONTROL_ENABLE): Compile
2759         also when __CYGWIN__ is defined.  Include windef.h before winbase.h.
2761 2014-05-14  Richard Sandiford  <r.sandiford@uk.ibm.com>
2763         * gcc-interface/decl.c (gnat_to_gnu_entity): Convert integer_one_node
2764         to the appropriate type.
2765         * gcc-interface/trans.c (gnat_to_gnu): Likewise.
2766         (pos_to_constructor): Likewise.
2768 2014-05-13  Eric Botcazou  <ebotcazou@adacore.com>
2770         * gcc-interface/decl.c (annotate_value): Fix thinko in latest change.
2772 2014-05-06  Kenneth Zadeck  <zadeck@naturalbridge.com>
2773             Mike Stump  <mikestump@comcast.net>
2774             Richard Sandiford  <rdsandiford@googlemail.com>
2776         * gcc-interface/cuintp.c (UI_From_gnu): Use wide-int interfaces.
2777         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_SIGN.
2778         (annotate_value): Use wide-int interfaces.
2779         * gcc-interface/utils.c (get_nonnull_operand): Use tree_fits_uhwi_p.
2781 2014-04-28  Richard Henderson  <rth@redhat.com>
2783         * gcc-interface/Makefile.in: Support aarch64-linux.
2785 2014-04-28  Eric Botcazou  <ebotcazou@adacore.com>
2787         * exp_dbug.ads (Get_External_Name): Add 'False' default to Has_Suffix,
2788         add 'Suffix' parameter and adjust comment.
2789         (Get_External_Name_With_Suffix): Delete.
2790         * exp_dbug.adb (Get_External_Name_With_Suffix): Merge into...
2791         (Get_External_Name): ...here.  Add 'False' default to Has_Suffix, add
2792         'Suffix' parameter.
2793         (Get_Encoded_Name): Remove 2nd argument in call to Get_External_Name.
2794         Call Get_External_Name instead of Get_External_Name_With_Suffix.
2795         (Get_Secondary_DT_External_Name): Likewise.
2796         * exp_cg.adb (Write_Call_Info): Likewise.
2797         * exp_disp.adb (Export_DT): Likewise.
2798         (Import_DT): Likewise.
2799         * comperr.ads (Compiler_Abort): Remove Code parameter and add From_GCC
2800         parameter with False default.
2801         * comperr.adb (Compiler_Abort): Likewise.  Adjust accordingly.
2802         * types.h (Fat_Pointer): Rename into...
2803         (String_Pointer): ...this.  Add comment on interfacing rules.
2804         * fe.h (Compiler_Abort): Adjust for above renaming.
2805         (Error_Msg_N): Likewise.
2806         (Error_Msg_NE): Likewise.
2807         (Get_External_Name): Likewise.  Add third parameter.
2808         (Get_External_Name_With_Suffix): Delete.
2809         * gcc-interface/decl.c (STDCALL_PREFIX): Define.
2810         (create_concat_name): Adjust call to Get_External_Name, remove call to
2811         Get_External_Name_With_Suffix, use STDCALL_PREFIX, adjust for renaming.
2812         * gcc-interface/trans.c (post_error): Likewise.
2813         (post_error_ne): Likewise.
2814         * gcc-interface/misc.c (internal_error_function): Likewise.
2816 2014-04-28  Richard Biener  <rguenther@suse.de>
2818         PR middle-end/60092
2819         * gcc-interface/utils.c: Define flag_isoc11.
2821 2014-04-26  Eric Botcazou  <ebotcazou@adacore.com>
2823         * gnatvsn.ads (Library_Version): Bump to 4.10.
2825 2014-04-23  Eric Botcazou  <ebotcazou@adacore.com>
2827         Revert
2828         2014-04-22  Richard Henderson  <rth@redhat.com>
2830         * gcc-interface/Makefile.in: Support aarch64-linux.
2832         2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
2834         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2835         (Error_Msg_N): Likewise.
2836         (Error_Msg_NE): Likewise.
2837         (Get_External_Name_With_Suffix): Likewise.
2838         * types.h (Fat_Pointer): Delete.
2839         (String_Pointer): New type.
2840         (DECLARE_STRING_POINTER): New macro.
2841         * gcc-interface/decl.c (create_concat_name): Adjust.
2842         * gcc-interface/trans.c (post_error): Likewise.
2843         (post_error_ne): Likewise.
2844         * gcc-interface/misc.c (internal_error_function): Likewise.
2846 2014-04-22  Richard Henderson  <rth@redhat.com>
2848         * gcc-interface/Makefile.in: Support aarch64-linux.
2850         * init.c [__linux__] (HAVE_GNAT_ALTERNATE_STACK): New define.
2851         (__gnat_alternate_stack): Enable for all linux except ia64.
2853 2014-04-22  Eric Botcazou  <ebotcazou@adacore.com>
2855         * fe.h (Compiler_Abort): Replace Fat_Pointer with String_Pointer.
2856         (Error_Msg_N): Likewise.
2857         (Error_Msg_NE): Likewise.
2858         (Get_External_Name_With_Suffix): Likewise.
2859         * types.h (Fat_Pointer): Delete.
2860         (String_Pointer): New type.
2861         (DECLARE_STRING_POINTER): New macro.
2862         * gcc-interface/decl.c (create_concat_name): Adjust.
2863         * gcc-interface/trans.c (post_error): Likewise.
2864         (post_error_ne): Likewise.
2865         * gcc-interface/misc.c (internal_error_function): Likewise.
2867 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
2868             Pierre-Marie de Rodat  <derodat@adacore.com>
2870         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Create a mere
2871         scalar constant instead of a reference for renaming of scalar literal.
2872         Do not create a new object for constant renaming except for a function
2873         call.  Make sure a VAR_DECL is created for the renaming pointer.
2874         * gcc-interface/trans.c (constant_decl_with_initializer_p): New.
2875         (fold_constant_decl_in_expr): New function.
2876         (Identifier_to_gnu): Use constant_decl_with_initializer_p.
2877         For a constant renaming, try to fold a constant DECL in the result.
2878         (lvalue_required_p) <N_Object_Renaming_Declaration>: Always return 1.
2879         (Identifier_to_gnu): Reference the renamed object of constant renaming
2880         pointers directly.
2881         * gcc-interface/utils.c (invalidate_global_renaming_pointers): Do not
2882         invalidate constant renaming pointers.
2884 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
2886         * gcc-interface/utils.c (type_for_vector_element_p): New predicate.
2887         (build_vector_type_for_size): New function.
2888         (build_vector_type_for_array): Likewise.
2889         (unchecked_convert): Build an intermediate vector type to convert
2890         from a generic array type to a vector type.
2891         (handle_vector_size_attribute): Reimplement.
2892         (handle_vector_type_attribute): Likewise.
2894 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
2896         * gcc-interface/decl.c (prepend_one_attribute_pragma): Call
2897         Is_OK_Static_Expression in lieu of Is_Static_Expression to
2898         detect valid arguments.
2900 2014-04-15  Eric Botcazou  <ebotcazou@adacore.com>
2902         * gcc-interface/trans.c (gnat_gimplify_stmt): Propagate loop hints.
2904 2014-04-14  Paolo Carlini  <paolo.carlini@oracle.com>
2906         * gcc-interface/decl.c (gnat_to_gnu_entity): Use TYPE_IDENTIFIER.
2907         (components_to_record): Likewise.
2908         * gcc-interface/utils.c (make_aligning_type): Likewise.
2909         (maybe_pad_type): Likewise.
2910         (finish_record_type): Likewise.
2911         (rest_of_record_type_compilation): Likewise.
2913 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
2915         * snames.ads-tmpl (Name_Ivdep): New pragma-related name.
2916         * sem_prag.adb (Analyze_Pragma) <Pragma_Loop_Optimize>: Add support
2917         for Ivdep hint.
2918         * gnat_rm.texi (Implementation Defined Pragmas): Document new Ivdep
2919         hint for Loop_Optimize.
2920         * gnat_ugn.texi (Vectorization of loops): Mention new Ivdep hint.
2921         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2922         with new Ivdep hint.
2923         * gcc-interface/ada-tree.h (LOOP_STMT_IVDEP): New macro.
2924         * gcc-interface/trans.c (Pragma_to_gnu) <Pragma_Loop_Optimize>: Deal
2925         with new Ivdep hint.
2926         (gnat_gimplify_stmt) <LOOP_STMT>: Propagate loop hints.
2928 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
2929             Robert Dewar  <dewar@adacore.com>
2931         * opt.ads (Suppress_Back_Annotation): Remove as unused.
2932         * fe.h (Back_Annotate_Rep_Info): Likewise.
2933         (Global_Discard_Names): Likewise.
2934         (List_Representation_Info): Declare.
2935         * types.h (Uint_Minus_1): Likewise.
2936         * repinfo.ads: Document back-annotation change.
2937         * gcc-interface/gigi.h (init_gnat_decl): Declare.
2938         (destroy_gnat_decl): Likewise.
2939         * gcc-interface/decl.c (annotate_value): Do not create the cache of
2940         annotated values here but...
2941         <CALL_EXPR>: Only inline the call if -gnatR3 is specified or we are
2942         in ASIS mode.
2943         (init_gnat_decl): ...here instead.  New function.
2944         (destroy_gnat_decl): Likewise.
2945         * gcc-interface/trans.c (gigi): Call {init|destroy}_gnat_decl.
2946         * gcc-interface/utils.c (init_gnat_utils): Minor reformatting.
2948 2014-04-14  Eric Botcazou  <ebotcazou@adacore.com>
2950         * gcc-interface/decl.c (create_field_decl_from): Finalize non-constant
2951         offset for the field, if any.
2953 2014-04-09  Eric Botcazou  <ebotcazou@adacore.com>
2954             Svante Signell  <svante.signell@gmail.com>
2956         PR ada/54040
2957         PR ada/59346
2958         * s-osinte-x32.adb: New file.
2959         * s-linux.ads (Time): New section.
2960         * s-linux-alpha.ads (Time): Likewise.
2961         * s-linux-android.ads (Time: Likewise.
2962         * s-linux-hppa.ads (Time): Likewise.
2963         * s-linux-mipsel.ads (Time): Likewise.
2964         * s-linux-sparc.ads (Time): Likewise.
2965         * s-linux-x32.ads (Time): Likewise.
2966         * s-osprim-x32.ads (timespec): Adjust.
2967         (Clock): Likewise.
2968         (To_Timespec): Likewise.
2969         * s-osinte-linux.ads (Time): Define local subtypes for those defined
2970         in System.Linux.
2971         * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval.
2972         * s-osinte-hpux.ads (timespec): Revert POSIX breakage.
2973         * s-osinte-kfreebsd-gnu.ads (timespec): Likewise.
2974         * s-osinte-solaris-posix.ads (timespec): Likewise.
2975         * s-osinte-posix.adb (To_Timespec): Likewise.
2976         * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb.
2978 2014-04-08  Eric Botcazou  <ebotcazou@adacore.com>
2980         PR ada/60411
2981         * gcc-interface/Makefile.in (arm% linux-android): Switch to EHABI.
2982         * s-linux-android.ads: New file.
2983         * s-intman-android.adb: Likewise.
2984         * s-osinte-android.ads: Adjust.
2985         * sigtramp-armdroid.c: Likewise.
2986         * sigtramp.h: Add Android support.
2988 2014-04-07  Eric Botcazou  <ebotcazou@adacore.com>
2990         * gcc-interface/Makefile.in (alpha-vms): Add missing line.
2992 2014-03-30  Eric Botcazou  <ebotcazou@adacore.com>
2994         PR ada/60703
2995         * system-linux-alpha.ads: Adjust for Ada 2005.
2996         * system-linux-mips.ads: Likewise.
2997         * system-linux-mips64el.ads: Likewise.
2998         * system-linux-mipsel.ads: Likewise.
2999         * system-linux-s390.ads: Likewise.
3000         * system-linux-s390x.ads: Likewise.
3001         * system-linux-sparc.ads: Likewise.
3002         * system-linux-sparcv9.ads: Likewise.
3003         * system-rtems.ads: Likewise.
3004         * system-vxworks-arm.ads: Likewise.
3006 2014-03-16  Andreas Schwab  <schwab@linux-m68k.org>
3008         PR ada/39172
3009         * gcc-interface/Makefile.in (target_cpu_default): Revert
3010         2013-10-11 change.
3012 2014-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3014         PR ada/51483
3015         * cstand.adb (Register_Float_Type): Add 'precision' parameter and use
3016         it to set the RM size.  Use directly 'size' for the Esize.
3017         (Create_Back_End_Float_Types): Adjust call to above.
3018         * get_targ.ads (Register_Type_Proc): Add 'precision' parameter.
3019         * set_targ.ads (FPT_Mode_Entry): Add 'precision' component.
3020         (Write_Target_Dependent_Values): Adjust comment.
3021         * set_targ.adb (Register_Float_Type): Add 'precision' parameter and
3022         deal with it.
3023         (Write_Target_Dependent_Values): Write the precision in lieu of size.
3024         (Initialization): Read the precision in lieu of size and compute the
3025         size from the precision and the alignment.
3026         * gcc-interface/gigi.h (enumerate_modes): Add integer parameter.
3027         * gcc-interface/misc.c (enumerate_modes): Likewise.  Do not register
3028         types for vector modes, pass the size in addition to the precision.
3030 2014-03-10  Eric Botcazou  <ebotcazou@adacore.com>
3032         * gcc-interface/Make-lang.in (ADA_DEPFILES): Fix typo.
3034 2014-03-07  Doug Rupp  <rupp@adacore.com>
3036         PR ada/60411
3037         * system-linux-armel.ads (Backend_Overflow_Checks): Set to True.
3038         (Support_64_Bit_Divides): Removed, no longer used.
3039         (ZCX_By_Default): Enabled.
3041 2014-02-25  Doug Rupp  <rupp@adacore.com>
3043         * gcc-interface/Makefile.in (arm-linux):
3044         (EH_MECHANISM): Use ARM unwinder (-arm)
3045         (LIBGNAT_TARGET_PAIRS: Override defaults with a-exexpr-gcc.adb and
3046         s-excmac-arm.ads.
3047         (EXTRA_LIBGNAT_OBJS): Add raise-gcc.o
3048         (EXTRA_GNATRTL_NONTASKING_OBJS): Add g-cppexc.o s-excmac.o.
3049         (arm-wrs-vxworks): Add EH_MECHANISM=-gcc for kernel mode.
3050         (EXTRA_LIBGNAT_OBJS): Add sigtramp-armvxw.o
3051         Add dependencies for sigtramp-armvxw.o.
3053 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
3055         * gcc-interface/trans.c (Pragma_to_gnu): Deal with Warning_As_Error.
3057 2014-02-25  Robert Dewar  <dewar@adacore.com>
3059         * rtsfind.adb (Is_RTE): Protect against entity with no scope
3060         field (previously this call blew up on the Standard entity).
3061         * sem_attr.adb (Analyze_Attribute, case Access): Remove
3062         test for No_Abort_Statements, this is now handled in
3063         Set_Entity_With_Checks.
3064         * exp_ch6.adb, sem_ch10.adb, sem_ch4.adb, sem_ch8.adb, sem_res.adb:
3065         Change name Set_Entity_With_Style_Check => Set_Entity_With_Checks.
3066         * sem_util.ads, sem_util.adb: Change name Set_Entity_With_Style_Check =>
3067         Set_Entity_With_Checks.
3068         (Set_Entity_With_Checks): Add checks for No_Dynamic_Attachment,
3069         Add checks for No_Abort_Statements.
3071 2014-02-25  Robert Dewar  <dewar@adacore.com>
3073         * exp_ch9.adb (Expand_Entry_Barrier): Add comment that call to
3074         Check_Restriction is OK.
3076 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
3078         * sem_ch3.adb (Process_Full_View): Better error message when
3079         the full view of  a private type without discriminants is an
3080         unconstrained type.
3081         * sem_ch7.adb (Uninstall_Declarations): Ditto.
3083 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
3085         * sigtramp-armvxw.c: Also restore r0.
3087 2014-02-25  Robert Dewar  <dewar@adacore.com>
3089         * errout.adb (Error_Msg_Internal): Warning_Msg_Char set
3090         unconditionally (Set_Msg_Insertion_Warning): Warning_Msg_Char
3091         set unconditionally.
3092         * erroutc.adb (Get_Warning_Tag): Does not give a leading space
3093         any more (Output_Msg_Text): Rewritten with new convention on
3094         output of warnings that are treated as errors.
3095         * erroutc.ads (Error_Msg_Object): Warn_Chr is always set even
3096         if Warn is False.
3097         * gnat_rm.texi: Updates to documentation on pragma
3098         Warning_As_Error.
3099         * warnsw.adb (Set_Dot_Warning_Switch): -gnatw.e should not
3100         set Warning_Doc_Switch.
3101         * lib-writ.ads: Add documentation note on ALI file generation
3102         for C.
3103         * exp_ch6.adb (Expand_Call): Remove check for No_Abort_Statements
3104         (belongs in Sem).
3105         * sem_attr.adb (Resolve_Attribute, case Access):
3106         Abort_Task'Access violates the No_Abort_Statements restriction.
3107         * sem_res.adb (Resolve_Call): Check restriction
3108         No_Abort_Statements for call to Abort_Task or a renaming of it.
3110 2014-02-25  Robert Dewar  <dewar@adacore.com>
3112         * sem_ch3.adb (Array_Type_Declaration): Check for case of using
3113         type name as index.
3114         * lib.ads: Minor reformatting.
3115         * einfo.ads: Minor reformatting.
3117 2014-02-25  Doug Rupp  <rupp@adacore.com>
3119         * sem_mech.adb (Set_Mechanisms): For convention Fortran on VMS
3120         use Short_Descriptor(S) as the argument passing mechanism.
3122 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
3124         * sigtramp-ppcvxw.c (CFI_COMMON_REGS): Also include r0.
3126 2014-02-25  Robert Dewar  <dewar@adacore.com>
3128         * atree.ads (Warnings_Treated_As_Errors): New variable.
3129         * errout.adb (Error_Msg_Internal): Set Warn_Err flag in
3130         error object (Initialize): Initialize Warnings_As_Errors_Count
3131         (Write_Error_Summary): Include count of warnings treated as errors.
3132         * erroutc.adb (Warning_Treated_As_Error): New function.
3133         (Matches): Function moved to outer level of package.
3134         * erroutc.ads (Error_Msg_Object): Add Warn_Err flag.
3135         (Warning_Treated_As_Error): New function.
3136         * gnat_rm.texi: Document pragma Treat_Warning_As_Error.
3137         * opt.adb: Add handling of Warnings_As_Errors_Count[_Config].
3138         * opt.ads (Config_Switches_Type): Add entry for
3139         Warnings_As_Errors_Count.
3140         (Warnings_As_Errors_Count): New variable.
3141         (Warnings_As_Errors): New array.
3142         * par-prag.adb: Add dummy entry for Warning_As_Error.
3143         * sem_prag.adb (Analyze_Pragma): Implement new pragma
3144         Warning_As_Error.
3145         * snames.ads-tmpl: Add entries for Warning_As_Error pragma.
3147 2014-02-25  Eric Botcazou  <ebotcazou@adacore.com>
3149         * sigtramp.h: Fix minor inaccuracy.
3151 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
3153         * gnat_ugn.texi: Added description of kill command.
3155 2014-02-25  Robert Dewar  <dewar@adacore.com>
3157         * gnat_rm.texi (Address_Clauses): Add a section discussing the
3158         problem of address clauses causing unexpected initialization,
3159         including the effect of Initialize_Scalars.
3161 2014-02-25  Robert Dewar  <dewar@adacore.com>
3163         * errout.adb: Various changes for better msgs for anonmous access
3164         subprogram types.
3165         * erroutc.ads, erroutc.adb (Buffer_Ends_With): Version with character
3166         argument.
3167         (Buffer_Remove): Version with character argument.
3168         * sem_attr.adb (Resolve_Attribute, case Access): Better handling
3169         of mismatching conventions for access-to-subprogram case.
3170         * sem_prag.adb (Set_Convention_From_Pragma): Deal with anonymous
3171         access types in record.
3172         * sem_util.ads, sem_util.adb (Set_Convention): Handle anonymous access
3173         types, including in records.
3175 2014-02-25  Doug Rupp  <rupp@adacore.com>
3177         * sigtramp-ppcvxw.c, sigtramp.h, sigtramp-armvxw.c: Comment
3178         enhancements and corrections.
3180 2014-02-25  Robert Dewar  <dewar@adacore.com>
3182         * gnat_rm.texi: New section "Conventions and Anonymous Access Types"
3184 2014-02-25  Robert Dewar  <dewar@adacore.com>
3186         * gnat_rm.texi: First set of documentation additions for
3187         predefined RM units.
3188         * checks.adb: Minor reformatting.
3189         * sem_elab.adb (Check_Task_Activation): Minor fix to error
3190         message.
3191         * sem_util.adb: Minor reformatting.
3193 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
3195         * usage.adb (Usage): Add help on -gnateC.
3196         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnateC.
3197         * opt.ads (Generate_CodePeer_Messages): New flag.
3198         * gnat_ugn.texi: Document new switch -gnateC.
3200 2014-02-25  Ben Brosgol  <brosgol@adacore.com>
3202         * gnat_rm.texi: Corrected minor typos in Implementation Defined
3203         Aspects.
3204         * opt.ads: Minor reformatting.
3206 2014-02-25  Robert Dewar  <dewar@adacore.com>
3208         * binde.adb: Change messages to mention -gnatel instead of -gnatwl.
3209         * gnat_ugn.texi: Update documentation of -gnatwl Add documentation
3210         of -gnatel/-gnateL.
3211         * opt.ads (Warn_Info_Messages): New flag.
3212         * sem_elab.adb: Use Elab_Warnings, Elab_Info_Messages to control
3213         messages.
3214         * sem_prag.adb: Use Elab_Warnings, Elab_Info_Messages to control
3215         messages.
3216         * switch-m.ad, switch-c.adb: Recognize new -gnatel/EL switches.
3217         * usage.adb: Add documentation of -gnatel/-gnateL Update
3218         documentation of -gnatwl/-gnatwL.
3219         * warnsw.adb: New handling of Elab_Warnings, Elab_Info_Messages
3220         * warnsw.ads (Elab_Info_Messages): New field in Warning_Record
3222 2014-02-25  Robert Dewar  <dewar@adacore.com>
3224         * einfo.ads, einfo.adb (Has_Shift_Operator): New flag.
3225         * gnat_rm.texi: Document pragma Provide_Shift_Operators.
3226         * interfac.ads: Minor code reorganization (add pragma
3227         Compiler_Unit_Warning).
3228         * par-prag.adb: Add dummy entry for Provide_Shift_Operators.
3229         * sem_ch3.adb (Build_Derived_Numeric_Type): Copy
3230         Has_Shift_Operator flag.
3231         * sem_intr.adb (Check_Intrinsic_Subprogram): Make sure
3232         Check_Shift is always called (Check_Shift): Set Has_Shift_Operator.
3233         * sem_prag.adb: Implement pragma Provide_Shift_Operators.
3234         * snames.ads-tmpl: Add entries for pragma Provide_Shift_Operators
3235         Add entry for Name_Amount.
3236         * checks.adb (Selected_Range_Checks): When checking for a null
3237         range, make sure we use the base type, and not the subtype for
3238         deciding a range is null.
3239         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Check
3240         for suspicious loop bound which is outside the range of the
3241         loop subtype.
3242         * gnat_ugn.texi: Add documentation section "Determining the
3243         Chosen Elaboration Order"
3244         * sem_ch13.adb (UC_Entry): Add field Act_Unit
3245         (Validate_Unchecked_Conversion): Store Act_Unit
3246         (Validate_Unchecked_Conversions): Test Warnings_Off in Act_Unit
3247         * treepr.adb: Minor reformatting.
3249 2014-02-25  Arnaud Charlet  <charlet@adacore.com>
3251         * usage.adb: Minor: fix typo.
3253 2014-02-25  Robert Dewar  <dewar@adacore.com>
3255         * lib.ads, s-bitops.adb, s-bitops.ads, s-conca5.adb, gnat_rm.texi,
3256         s-conca5.ads, s-conca7.adb, s-conca7.ads, s-crc32.adb, s-crc32.ads,
3257         s-conca9.adb, s-conca9.ads, g-dyntab.adb, s-crtl.ads, g-dyntab.ads,
3258         s-excdeb.adb, s-addope.adb, s-addope.ads, s-carun8.adb, s-carun8.ads,
3259         g-htable.adb, g-htable.ads, g-hesora.adb, g-hesora.ads, s-conca2.adb,
3260         s-conca2.ads, a-comlin.adb, a-chlat1.ads, a-comlin.ads, errout.ads,
3261         a-except.adb, s-conca4.adb, a-except.ads, s-conca4.ads, s-conca6.adb,
3262         s-conca6.ads, g-spchge.adb, g-spchge.ads, g-u3spch.adb, g-u3spch.ads,
3263         a-strhas.ads, restrict.adb, aspects.adb, aspects.ads, s-conca8.adb,
3264         s-conca8.ads, back_end.adb, par-prag.adb, g-byorma.adb, g-byorma.ads,
3265         a-elchha.adb, a-elchha.ads, g-speche.adb, g-speche.ads, s-casuti.adb,
3266         s-assert.adb, s-casuti.ads, s-assert.ads, a-clrefi.adb, a-clrefi.ads,
3267         s-conca3.adb, s-conca3.ads, a-ioexce.ads: Implement pragma
3268         Compiler_Unit_Warning, change Compiler_Unit everywhere to
3269         Compiler_Unit_Warning.
3271 2014-02-25  Sergey Rybin  <rybin@adacore.com frybin>
3273         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Do not normalize
3274         in ASIS mode aggregates that are used as aspect definitions.
3276 2014-02-25  Robert Dewar  <dewar@adacore.com>
3278         * exp_ch7.adb, sem_util.adb, sem_util.ads, exp_ch6.adb: Minor
3279         reformatting.
3281 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
3283         * freeze.adb (Freeze_Entity): If the return type of a function
3284         is a limited view, and the non-limited view has not been seen yet,
3285         defer freezing to some later point.
3287 2014-02-25  Robert Dewar  <dewar@adacore.com>
3289         * sem_ch3.adb: Minor reformatting.
3291 2014-02-25  Robert Dewar  <dewar@adacore.com>
3293         * s-excdeb.ads, s-except.ads, s-exctab.adb, s-exctab.ads, s-finmas.ads,
3294         s-htable.adb, s-htable.ads, s-imenne.adb, s-imenne.ads, s-imgenu.adb,
3295         s-imgenu.ads, s-mastop.adb, s-mastop.ads, s-memory-vms_64.adb,
3296         s-memory-vms_64.ads, s-memory.adb, s-memory.ads, s-os_lib.adb,
3297         s-os_lib.ads, s-parame.adb, s-parame.ads, s-purexc.ads, s-restri.adb,
3298         s-restri.ads, s-rident.ads, s-secsta.adb, s-secsta.ads, s-soflin.adb,
3299         s-soflin.ads, s-sopco3.adb, s-sopco3.ads, s-sopco4.adb, s-sopco4.ads,
3300         s-sopco5.adb, s-sopco5.ads, s-spsufi.ads, s-stache.adb, s-stache.ads,
3301         s-stalib.adb, s-stalib.ads, s-stoele.adb, s-stoele.ads, s-strcom.adb,
3302         s-strcom.ads, s-strhas.adb, s-string.adb, s-string.ads, s-strops.adb,
3303         s-strops.ads, s-ststop.adb, s-ststop.ads, s-traceb.adb, s-traceb.ads,
3304         s-traent.adb, s-traent.ads, s-unstyp.ads, s-utf_32.adb, s-utf_32.ads,
3305         s-wchcnv.adb, s-wchcnv.ads, s-wchcon.adb, s-wchcon.ads, s-wchjis.adb,
3306         s-wchjis.ads, sem_ch11.adb, sem_ch4.adb, sem_ch5.adb, sem_prag.adb,
3307         snames.ads-tmpl: Change Compiler_Unit everywhere to
3308         Compiler_Unit_Warning.
3310 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
3312         * exp_ch6.adb (Add_Or_Save_Precondition): New routine.
3313         (Collect_Body_Postconditions_In_Decls): New routine.
3314         (Collect_Body_Postconditions_Of_Kind): Factor out code. Handle
3315         postcondition aspects or pragmas that appear on a subprogram
3316         body stub.
3317         (Collect_Spec_Preconditions): Factor out code. Handle
3318         precondition aspects or pragmas that appear on a subprogram
3319         body stub.
3320         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): The analysis of
3321         aspects that apply to a subprogram body stub is no longer delayed,
3322         the aspects are analyzed on the spot.
3323         (SPARK_Aspect_Error):
3324         Aspects that apply to a subprogram declaration cannot appear in
3325         a subunit.
3326         * sem_ch10.adb Remove with and use clause for Sem_Ch13.
3327         (Analyze_Proper_Body): Add local variable Comp_Unit. Unum
3328         is now a local variable. Code cleanup. Analysis related to
3329         the aspects of a subprogram body stub is now carried out by
3330         Analyze_Subprogram_Body_Helper. Do not propagate the aspects
3331         and/or pragmas of a subprogram body stub to the proper body
3332         as this is no longer needed. Do not analyze the aspects of a
3333         subprogram stub when the corresponding source unit is missing.
3334         (Analyze_Protected_Body_Stub): Flag the illegal use of aspects
3335         on a stub.
3336         (Analyze_Task_Body_Stub): Flag the illegal use of
3337         aspects on a stub.
3338         (Optional_Subunit): Add local variable Unum.
3339         * sem_ch13.adb (Insert_Delayed_Pragma): Do not analyze a generated
3340         pragma when it applies to a subprogram body stub.
3341         * sem_prag.adb (Analyze_Pragma): Pragmas Contract_Cases,
3342         Depends and Global can now apply to a subprogram body stub as
3343         long as it acts as its own spec.
3344         (Analyze_Refined_Pragma):
3345         Code reformatting. Refinement pragmas cannot apply to a subunit.
3347 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
3349         * einfo.ads Update the usage of flag
3350         Uses_Sec_Stack. Uses_Sec_Stack now applies to E_Loop entities.
3351         * exp_ch5.adb (Expand_Iterator_Loop): The temporary for a cursor
3352         now starts with the letter 'C'. This makes reading expanded
3353         code easier.
3354         * exp_ch7.adb (Establish_Transient_Scope): Add local variable
3355         Iter_Loop. Signal that an Ada 2012 iterator loop requires
3356         secondary stack management when creating a transient scope for
3357         an element reference.
3358         * exp_util.adb (Process_Statements_For_Controlled_Objects):
3359         When wrapping the statements of a loop, pass the E_Loop entity
3360         to the wrapping machinery.
3361         (Wrap_Statements_In_Block): Add
3362         formal parameter Scop along with comment on usage. Add local
3363         variables Block_Id, Block_Nod and Iter_Loop. Mark the generated
3364         block as requiring secondary stack management when the block is
3365         created inside an Ada 2012 iterator loop. This ensures that any
3366         reference objects are reclaimed on each iteration of the loop.
3367         * sem_ch5.adb (Analyze_Loop_Statement): Mark the generated block
3368         tasked with the handling of container iterators as requiring
3369         secondary stack management. This ensures that iterators are
3370         reclaimed when the loop terminates or is exited in any fashion.
3371         * sem_util.adb (Add_Block_Identifier): New routine.
3372         (Find_Enclosing_Iterator_Loop): New routine.
3373         * sem_util.ads (Add_Block_Identifier): New routine.
3374         (Find_Enclosing_Iterator_Loop): New routine.
3376 2014-02-25  Robert Dewar  <dewar@adacore.com>
3378         * sinfo.ads: Minor reformatting.
3380 2014-02-25  Tristan Gingold  <gingold@adacore.com>
3382         * s-expllu.ads, s-expuns.ads, s-expmod.ads: Minor comment fix.
3384 2014-02-25  Pascal Obry  <obry@adacore.com>
3386         * sinput-l.adb, osint.adb, osint.ads: Add Prep_Suffix to factorize code.
3388 2014-02-25  Tristan Gingold  <gingold@adacore.com>
3390         * sem_ch10.adb: Minor comment fix.
3392 2014-02-25  Bob Duff  <duff@adacore.com>
3394         * s-tasdeb.adb: Misc cleanup of this package,
3395         including printing addresses in hexadecimal.
3396         (Write): Fix minor bug when taking 'Address of an empty string.
3398 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
3400         * sem_prag.adb (Analyze_Part_Of): Reject state refinement in a
3401         public child unit when it does not refer to the abstract state
3402         of a public ancestor.
3404 2014-02-25  Yannick Moy  <moy@adacore.com>
3406         * sem_prag.adb (Analyze_Pragma/Pragma_Validity_Checks): Ignore pragma
3407         Validity_Checks in GNATprove and CodePeer modes.
3409 2014-02-25  Pascal Obry  <obry@adacore.com>
3411         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add package Install's
3412         Artifacts attribute.
3414 2014-02-25  Yannick Moy  <moy@adacore.com>
3416         * sem_prag.adb: Minor reformatting to get consistent messages.
3418 2014-02-25  Robert Dewar  <dewar@adacore.com>
3420         * checks.adb: Minor reformatting.
3421         * sinfo.ads (Do_Range_Check): Document that this flag is never
3422         passed to the back end.
3424 2014-02-25  Yannick Moy  <moy@adacore.com>
3426         * sem_ch3.adb, sem_ch5.adb, sem_ch9.adb, sem_prag.adb, sem_attr.adb,
3427         sem_ch6.adb: Remove useless references to SPARK RM in error messages.
3429 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
3431         * sem_res.adb (Appears_In_Check): New routine.
3432         (Resolve_Entity_Name): Remove local variables Prev and
3433         Usage_OK. Par is now a constant. Remove the parent chain traversal
3434         as the placement of a volatile object with enabled property
3435         Async_Writers and/or Effective_Reads must appear immediately
3436         within a legal construct.
3438 2014-02-25  Hristian Kirtchev  <kirtchev@adacore.com>
3440         * checks.adb (Apply_Selected_Range_Checks):
3441         Alphabetize local constants and variables. Add comments.
3442         Always insert a range check that requires runtime evaluation into
3443         the tree.
3445 2014-02-25  Robert Dewar  <dewar@adacore.com>
3447         * sem_attr.adb, sem_ch6.adb, par-ch3.adb: Minor reformatting.
3449 2014-02-25  Bob Duff  <duff@adacore.com>
3451         * s-tassta.adb (Finalize_Global_Tasks): Limit the number of loop
3452         iterations while waiting for independent tasks to terminate;
3453         if an independent task does not terminate, we do not want to
3454         hang here. In that case, the thread will be terminated when the
3455         process exits.
3456         * s-taprop-linux.adb (Abort_Task): Fix Assert to allow for ESRCH.
3458 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
3460         * sem_prag.adb (Check_SPARK_Aspect_For_ASIS): New subprogram,
3461         used to perform pre-analysis of the expression for SPARK
3462         aspects that have a non-standard syntax, such as GLobal and
3463         Initializes. The procedure applies to the original expression
3464         in an aspect specification, prior to the analysis of the
3465         corresponding pragma, in order to provide semantic information
3466         for ASIS navigation purposes.
3467         (Analyze_Global_In_Decl_List, Analyze_Initializes_In_Decl_Part):
3468         Call new subprogram.
3470 2014-02-25  Yannick Moy  <moy@adacore.com>
3472         * sem_prag.adb: Remove obsolete reference to SPARK RM in error message.
3474 2014-02-25  Doug Rupp  <rupp@adacore.com>
3476         * init.c (HAVE_GNAT_ADJUST_CONTEXT_FOR_RAISE): Enable for ARM.
3477         (__gnat_adjust_context_for_raise): Bump the PC by 2.
3479 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
3481         * par-ch3.adb (P_Basic_Declarative_Items): In the case of a
3482         misplaced IS, add a statement sequence to improper body only if
3483         one has not been parsed already.
3485 2014-02-25  Ed Schonberg  <schonberg@adacore.com>
3487         * sem_attr.adb (Analyze_Attribute, case 'Update): Check for
3488         mismatch when multidimensional array is updated with a single
3489         index.
3491 2014-02-25  Yannick Moy  <moy@adacore.com>
3493         * sem_ch3.adb, sem_ch5.adb, sem_prag.adb, sem_attr.adb, errout.ads,
3494         sem_ch6.adb: Mark most references to SPARK RM in error messages
3495         for removal.
3497 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3499         * par-ch3.adb (P_Basic_Declarative_Items): If an improper body
3500         appears in a list of basic declarations, complete the tree with
3501         an empty statement list, to prevent cascaded errors and crashes
3502         if semantic analysis is attempted.
3504 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3506         * g-sercom-mingw.adb (Open): Fix incorrect test for error return
3507         value.
3508         * erroutc.adb: Minor reformatting.
3510 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3512         * sem_prag.adb (Check_Clause_Syntax): Account
3513         for a solitary input item in a dependency list.
3515 2014-02-24  Yannick Moy  <moy@adacore.com>
3517         * gnat1drv.adb (Adjust_Global_Switches): Do not
3518         use validity checks at all in GNATprove_Mode.
3520 2014-02-24  Robert Dewar  <dewar@adacore.com>
3522         * g-sercom-mingw.adb, g-sercom-linux.adb, sem_prag.adb, freeze.adb,
3523         atree.adb, atree.ads: Minor reformatting.
3525 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3527         * sem_ch6.adb (Analyze_Subprogram_Body_Contract): Do not enforce
3528         global and dependence refinement when SPARK_Mode is off.
3529         * sem_ch7.adb (Analyze_Package_Body_Contract): Do not enforce
3530         state refinement when SPARK_Mode is off.
3531         * sem_ch13.adb (Analyze_Aspect_Specifications): Add local
3532         variable Decl. Insert the generated pragma for Refined_State
3533         after a potential pragma SPARK_Mode.
3534         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add local
3535         constant Deps. Remove local variable Expr. Check the syntax
3536         of pragma Depends when SPARK_Mode is off. Factor out the
3537         processing for extra parenthesis around individual clauses.
3538         (Analyze_Global_In_Decl_List): Items is now a constant. Check
3539         the syntax of pragma Global when SPARK_Mode is off.
3540         (Analyze_Initializes_In_Decl_Part): Check the syntax of pragma
3541         Initializes when SPARK_Mode is off.
3542         (Analyze_Part_Of): Check
3543         the syntax of the encapsulating state when SPARK_Mode is off.
3544         (Analyze_Pragma): Check the syntax of pragma Abstract_State when
3545         SPARK_Mode is off. Move the declaration order check with respect
3546         to pragma Initializes to the end of the processing. Do not verify
3547         the declaration order for pragma Initial_Condition when SPARK_Mode
3548         is off. Do not complain about a useless package refinement when
3549         SPARK_Mode is off.
3550         (Analyze_Refined_Depends_In_Decl_Part): Refs
3551         is now a constant. Check the syntax of pragma Refined_Depends
3552         when SPARK_Mode is off.
3553         (Analyze_Refined_Global_In_Decl_Part):
3554         Check the syntax of pragma Refined_Global when SPARK_Mode is off.
3555         (Analyze_Refined_State_In_Decl_Part): Check the syntax of pragma
3556         Refined_State when SPARK_Mode is off.
3557         (Check_Dependence_List_Syntax): New routine.
3558         (Check_Global_List_Syntax): New routine.
3559         (Check_Initialization_List_Syntax): New routine.
3560         (Check_Item_Syntax): New routine.
3561         (Check_State_Declaration_Syntax): New routine.
3562         (Check_Refinement_List_Syntax): New routine.
3563         (Has_Extra_Parentheses): Moved to the top level of Sem_Prag.
3565 2014-02-24  Robert Dewar  <dewar@adacore.com>
3567         * a-tags.adb, s-os_lib.adb: Minor reformatting.
3569 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3571         * g-sercom-mingw.adb, g-sercom-linux.adb (Raise_Error): Include
3572         strerror message, not just numeric errno value.
3574 2014-02-24  Doug Rupp  <rupp@adacore.com>
3576         * raise-gcc.c (exception_class_eq): Make endian neutral.
3578 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3580         * atree.ads, atree,adb (Copy_Separate_Tree): Remove Syntax_Only
3581         flag, and reset Etype and Analyzed attributes unconditionally
3582         when copying a tree that may be partly analyzed.
3583         * freeze.adb: Change calls to Copy_Separate_Tree accordingly.
3584         * sem_ch6.adb (Check_Inline_Pragma): If the Inline pragma appears
3585         within a subprogram body and applies to it, remove it from the
3586         body before making a copy of it, to prevent spurious errors when
3587         analyzing the copied body.
3589 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3591         * s-os_lib.adb (Errno_Message): Do not depend on Integer'Image.
3592         * s-oscons-tmplt.c: On VxWorks, include adaint.h only after
3593         vxWorks.h has been included.  Also ensure that file attributes
3594         related definitions are output even in cases where socket support
3595         is not enabled.
3596         * a-tags.adb: Code clean up.
3597         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Use -iquote
3598         instead of -I to add the main ada source directory to the header
3599         search path, in order to avoid conflict between our own "types.h"
3600         and VxWork's <types.h>.
3602 2014-02-24  Robert Dewar  <dewar@adacore.com>
3604         * atree.ads, atree.adb (Copy_Separate_Tree): Add Syntax_Only parameter.
3605         * debug.adb: Remove documentation of -gnatd.X, no longer used.
3606         * freeze.adb (Wrap_Imported_Subprogram): Fixed and activated.
3608 2014-02-24  Bob Duff  <duff@adacore.com>
3610         * gnat_ugn.texi: Improve documentation of gnatpp.
3612 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3614         * g-stheme.adb, g-socthi-vms.adb, g-socthi-vms.ads,
3615         g-socthi-vxworks.adb, g-socthi-vxworks.ads, g-stseme.adb,
3616         g-socthi-mingw.adb, g-socthi-mingw.ads, g-socthi.adb,
3617         g-socthi.ads, g-socket.adb (Host_Error_Message): Return a string, not
3618         a chars_ptr, because on Windows this is a renaming of
3619         Socket_Error_Message.
3621 2014-02-24  Robert Dewar  <dewar@adacore.com>
3623         * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb,
3624         s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb,
3625         a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code
3626         reorganization.
3628 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3630         * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure
3631         that the source directory containing s-oscons-tmplt.c is on the
3632         include path, so that all internal header files are available.
3634 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3636         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): If the
3637         domain of iteration is an attribute reference 'Old, this is an
3638         Ada 2012 iterator and the loop must be rewritten as such.
3640 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3642         * s-fileio.adb (Errno_Message): Remove, use shared version from
3643         s-os_lib instead.
3644         * s-crtrun.ads, Makefile.rtl: Remove now unused unit.
3645         * g-stseme (Socket_Error_Message): Reimplement in terms of new
3646         s-os_lib function.
3647         * g-socthi.ads, g-socthi.adb: Change profile of
3648         Socket_Error_Message to return String to allow the above.
3649         * g-socket.adb, g-socthi-mingw.adb, g-socthi-mingw.ads,
3650         * g-socthi-vms.adb, g-socthi-vms.ads, g-socthi-vxworks.adb,
3651         * g-socthi-vxworks.ads: Update to account for the above profile
3652         change.
3653         * a-tags.adb: Use strlen builtin binding provided by s-crtl.
3654         * s-crtl.ads (strncpy): New procedure.
3655         * s-os_lib.adb (Copy_Attributes): Import just once (strncpy):
3656         Use import from s-crtl.
3657         * a-envvar.adb, osint.adb: Use imports of C runtime functions
3658         from s-crtl instead of re-importing locally.
3660 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3662         * sem_prag.adb (Analyze_Global_Item): Emit the
3663         variable related checks concerning volatile objects only when
3664         SPARK_Mode is on.
3666 2014-02-24  Robert Dewar  <dewar@adacore.com>
3668         * sem_ch5.adb (Analyze_Iterator_Specification): use
3669         Error_Msg_Ada_2012_Feature.
3671 2014-02-24  Jose Ruiz  <ruiz@adacore.com>
3673         * s-rident.ads (Profile_Info): For Ravenscar, the restrictions
3674         No_Local_Timing_Events and No_Specific_Termination_Handlers
3675         must be set, according to the Ravenscar profile definition
3676         in D.13(6/3).
3678 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3680         * sem_ch6.adb (Analyze_Expression_Function): If this is a
3681         completion, freeze return type and its designated type if needed.
3683 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3685         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
3686         'Address): When moving initialization statements to a freeze
3687         entity, keep them under a single node (i.e. do not unwrap
3688         expressions with actions), and set the Initialization_Statements
3689         attribute again so that processing of a later pragma Import can
3690         still remove them.
3692 2014-02-24  Claire Dross  <dross@adacore.com>
3694         * a-cfdlli.adb, a-cfdlli.ads, a-cfhama.adb, a-cfhama.ads,
3695         a-cfhase.adb, a-cfhase.ads, a-cforma.adb, a-cforma.ads,
3696         a-cforse.adb, a-cforse.ads, a-cofove.adb, a-cofove.ads: Rename
3697         Left/Right to First_To_Previous/Current_To_Last.
3699 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3701         * adaint.h (struct file_attributes): New component "error"
3702         (__gnat_error_attributes): Accessor for the above.
3703         * adaint.c (__gnat_error_attributes): New subprogram
3704         (__gnat_stat): Fix returned value (expect errno value)
3705         (__gnat_stat_to_attr): Add management of error component (set to
3706         stat errno value, except for missing files where it is set to 0,
3707         and exists is set to 0).
3708         * osint.ads (File_Attributes_Size): Update per change above,
3709         also clarify documentation.
3710         * s-filatt.ads: New file, binding to file attributes related
3711         functions.
3712         * Makefile.rtl (s-filatt): New runtime unit.
3713         * s-crtl.ads (strlen): Expose binding to GCC builtin (falls back
3714         to library function if not available on target).
3715         * s-os_lib.ads, s-os_lib.adb (Errno_Message): New subprogram.
3716         * s-oscons-tmplt.c (SIZEOF_struct_file_attributes,
3717         SIZEOF_struct_dirent_alloc): New constants.
3718         * Make-generated.in (s-oscons.ads): Now requires adaint.h.
3719         * a-direct.adb (Fetch_Next_Entry): Fix incorrect buffer sizes.
3720         Perform appropriate error checking if stat fails (do not just
3721         ignore existing files if stat fails)
3722         * gcc-interface/Make-lang.in (GNAT_ADA_OBJS, GNATBIND_OBJS): Update
3723         dependencies.
3725 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3727         * sem_prag.adb (Analyze_Global_Item): Move the check concerning
3728         the use of volatile objects as global items in a function to
3729         the variable related checks section.
3730         * sem_util.adb (Async_Readers_Enabled): Directly call
3731         Has_Enabled_Property.
3732         (Async_Writers_Enabled): Directly call Has_Enabled_Property.
3733         (Effective_Reads_Enabled): Directly call Has_Enabled_Property.
3734         (Effective_Writes_Enabled): Directly call Has_Enabled_Property.
3735         (Has_Enabled_Property): Rename formal parameter State_Id to Item_Id.
3736         Update the comment on usage. State_Has_Enabled_Property how handles
3737         the original logic of the routine. Add processing for variables.
3738         (State_Has_Enabled_Property): New routine.
3739         (Variable_Has_Enabled_Property): New routine.
3741 2014-02-24  Robert Dewar  <dewar@adacore.com>
3743         * sinfo.ads, sem_ch12.adb, sem_res.adb, sem_ch4.adb, par-ch12.adb:
3744         Minor reformatting.
3745         * atree.ads, atree.adb (Node35): New function.
3746         (Set_Node35): New procedure.
3747         * debug.adb: Define new debug flag -gnatd.X.
3748         * einfo.ads, einfo.adb (Import_Pragma): New field.
3749         * freeze.adb (Wrap_Imported_Procedure): New procedure (not
3750         really active yet, has to be activated with -gnatd.X.
3751         * sem_prag.adb (Set_Imported): Set new Import_Pragma
3752         field (Set_Imported): Don't set Is_Public (see
3753         Freeze.Wrap_Imported_Subprogram)
3754         * par-ch3.adb (P_Component_List): Handle unexpected null component.
3756 2014-02-24  Yannick Moy  <moy@adacore.com>
3758         * sem_ch3.adb: Correct reference to SPARK RM in error messages.
3759         * gnat_rm.texi: Correct documentation of attribute Update.
3761 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3763         * sem_ch5.adb (Analyze_Iterator_Specification): Reject container
3764         iterator in older versions of Ada.
3766 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
3768         * sem_ch5.adb, sem_aux.ads, sem_ch12.adb, gnat_ugn.texi, par.adb,
3769         par-ch12.adb: Change spelling 'parametrization' to 'parameterization'.
3771 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3773         * sinfo.ads, sinfo.adb: New attribute Generalized_Indexing, for
3774         indexed_components that are instances of Ada 2012 container
3775         indexing operations. Analysis and resolution of such nodes
3776         is performed on the attribute, and the original source is
3777         preserved for ASIS operations. If expansion is enabled, the
3778         indexed component is replaced by the value of this attribute,
3779         which is in a call to an Indexing aspect, in most case wrapped
3780         in a dereference operation.
3781         * sem_ch4.adb (Analyze_Indexed_Component): Create
3782         Generalized_Indexing attribute when appropriate.
3783         (Analyze_Call): If prefix is not overloadable and has an indexing
3784         aspect, transform into an indexed component so it can be analyzed
3785         as a potential container indexing.
3786         (Analyze_Expression): If node is an indexed component with a
3787         Generalized_ Indexing, do not re-analyze.
3788         * sem_res.adb (Resolve_Generalized_Indexing): Complete resolution
3789         of an indexed_component that has been transformed into a container
3790         indexing operation.
3791         (Resolve_Indexed_Component): Call the above when required.
3792         (Resolve): Do not insert an explicit dereference operation on
3793         an indexed_component whose type has an implicit dereference:
3794         the operation is inserted when resolving the related
3795         Generalized_Indexing.
3797 2014-02-24  Olivier Ramonat  <ramonat@adacore.com>
3799         * gnat_rm.texi, gnat_ugn.texi: Replace Ada Compiler by Ada Development
3800         Environment.
3802 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3804         * sem_prag.adb (Check_Constituent_Usage): Remove leading spaces in
3805         error messages.
3806         (Inconsistent_Mode_Error): Remove leading spaces in error messages.
3807         Merge the expected and available mode errors.
3808         (Report_Unused_Constituents): Remove leading spaces in error messages.
3809         (Report_Unused_States): Remove leading spaces in error messages.
3811 2014-02-24  Thomas Quinot  <quinot@adacore.com>
3813         * par_sco.adb (Traverse_One): Refine categorization of statement
3814         SCOs.
3816 2014-02-24  Robert Dewar  <dewar@adacore.com>
3818         * aspects.ads, aspects.adb: Remove aspects Ada_2005 and Ada_2012,
3819         Pure_05, Pure_12 and Preelaborate_05.
3820         * gnat_rm.texi: Update accordingly.
3821         * sem_prag.adb: Document one argument form of Ada_05/Ada_2005
3822         pragmas Document one argument form of Ada_12/Ada_2012 pragmas
3823         Recognize one argument form of these pragmas only in GNAT mode
3824         (-gnatg).
3826 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3828         * s-dimmks.ads: Replace symbol for temperature, previously the
3829         Greek letter Theta, by the ASCII @ sign.
3830         * s-diflio.ads: ditto.
3832 2014-02-24  Robert Dewar  <dewar@adacore.com>
3834         * exp_ch4.adb: Minor code reorganization (use OR for boolean
3835         variables).
3836         * sem_ch3.adb, sem_prag.adb, freeze.adb: Minor reformatting.
3838 2014-02-24  Ben Brosgol  <brosgol@adacore.com>
3840         * gnat_ugn.texi, projects.texi: Added the necessary conditionalization
3841         so that references to gnatmem and ASIS tools do not appear in the FSF
3842         edition of the GNAT User's Guide.
3844 2014-02-24  Yannick Moy  <moy@adacore.com>
3846         * freeze.adb (Freeze_Entity): Do not issue warning
3847         for pre/post being ignored on imported subprogram in GNATprove
3848         mode.
3850 2014-02-24  Robert Dewar  <dewar@adacore.com>
3852         * exp_ch5.adb, sem_ch5.adb, sem_type.adb, sem_res.adb, sem_attr.adb,
3853         stand.ads, sem_eval.adb: Minor reformatting.
3855 2014-02-24  Yannick Moy  <moy@adacore.com>
3857         * sem_prag.adb: Minor rewording in error message.
3859 2014-02-24  Johannes Kanig  <kanig@adacore.com>
3861         * exp_util.adb (Expand_Subtype_From_Expr): Do not expand subtypes in
3862         GNATprove_mode, gnat2why doesn't need nor use these types.
3864 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
3866         * exp_ch4.adb (Expand_N_Op_Expon): On the AAMP
3867         target, in the case of signed integer exponentiation that uses a
3868         run-time routine, always select the Exp_* versions, since overflow
3869         checking is automatically done by AAMP arithmetic instructions.
3871 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3873         * sem_ch13.adb (Analyze_Aspect_Specifications):
3874         When the related context is a package instace, insert pragma
3875         Abstract_State after all internally-generated renamings related
3876         to the instance "header".
3878 2014-02-24  Ed Schonberg  <schonberg@adacore.com>
3880         * sem_ch3.adb (Analyze_Declarations): Analyze Contract of abstract
3881         subprograms.
3882         * sem_disp.adb (Check_Dispatching_Context): A non-dispatching
3883         call to an abstract subprogram is legal if it appears in a
3884         pre/postcondition of another abstract operation.
3886 2014-02-24  Sergey Rybin  <rybin@adacore.com frybin>
3888         * gnat_ugn.texi: Misc updates.
3890 2014-02-24  Hristian Kirtchev  <kirtchev@adacore.com>
3892         * exp_prag.adb (Expand_Old): Set the type of the generated temporary.
3894 2014-02-24  Gary Dismukes  <dismukes@adacore.com>
3896         * layout.adb (Layout_Variant_Record): Instantiate
3897         Generic_Check_Choices and call Check_Choices before calling
3898         Build_Discr_Checking_Funcs, since we need Others_Discrete_Choices
3899         set to prevent generating incorrect discriminant-checking
3900         functions for 'others' variants (functions that unconditionally
3901         return True rather than accounting for the values covered by the
3902         'others' choice).
3903         * sem_eval.ads (Subtypes_Statically_Compatible): Add formal
3904         Formal_Derived_Matching.
3905         (Subtypes_Statically_Match): Add formal Formal_Derived_Matching.
3906         * sem_eval.adb (Subtypes_Statically_Compatible): Pass new
3907         Formal_Derived_Matching formal to Subtypes_Statically_Match.
3908         (Subtypes_Statically_Match): Suppress the Object_Size matching
3909         test in the case where Formal_Derived_Matching is True.
3910         * sem_ch12.adb (Validate_Derived_Type_Instance): Pass
3911         True for Formal_Derived_Matching_Formal on the call to
3912         Subtypes_Statically_Compatible.
3914 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
3916         * gcc-interface/Make-lang.in (ADA_TOOLS_FLAGS_TO_PASS): Robustify.
3918 2014-02-23  Eric Botcazou  <ebotcazou@adacore.com>
3920         * gcc-interface/utils2.c (build_simple_component_ref): Fix formatting.
3921         Look through a conversion between original and packable version to get
3922         the base object.
3923         (build_component_ref): Rework comment and fix formatting.
3925 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
3927         * gnat_ugn.texi, vms_data.ads (gnatelim): Add description of
3928         project-specific options.
3930 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
3932         * a-cbdlli.adb (Insert): When capacity exceeded, raise Capacity_Error,
3933         not Constraint_Error.
3934         * a-cbmutr.adb (Append_Child, Insert_Child, Prepend_Child): Ditto.
3935         * sem_ch5.adb: Code clean up.
3937 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
3939         * sem_prag.adb (Usage_Error): Remove local
3940         constant Typ. Remove the specialized diagnostics for unconstrained
3941         or tagged items as those are not part of the explicit input set
3942         of the related subprogram and should not be flagged.
3944 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
3946         * sem_attr.adb: Add guard to preserve all errors.
3948 2014-02-20  Vincent Celier  <celier@adacore.com>
3950         * switch-m.adb (Normalize_Compiler_Switches): Take into account
3951         switches that are recorded in ALI files: -gnateA, -gnateE,
3952         -gnateF, -gnateinn, -gnateu, -gnateV and -gnateY.
3954 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
3956         * sem_ch5.adb (Analyze_Iterator_Specification): Check legality
3957         of an element iterator form over a formal container with an
3958         Iterable aspect.
3959         * exp_ch5.adb (Build_Formal_Container_Iteration): Utility
3960         to create declaration and loop statements for both forms of
3961         container iterators.
3962         (Expand_Formal_Container_Element_Iterator): New procedure
3963         to handle loops of the form  "for E of C" when C is a formal
3964         container.
3965         (Expand_Formal_Container_Iterator): Code cleanup.
3967 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
3969         * sem_prag.adb (Add_Item_To_Name_Buffer): New routine.
3970         (Analyze_Contract_Case): Remove the use of
3971         "may". Replace "aspect Contract_Cases" to avoid categorization
3972         of aspect vs pragma.
3973         (Analyze_External_Property_In_Decl_Part): Remove the use of "formal".
3974         (Analyze_Global_Item): Remove
3975         the use of "formal", specify the subprogram.  Split the
3976         error message about a state with visible refinement into
3977         two. Remove the use of "global" from "volatile global item".
3978         (Analyze_Initialization_Item): Ensure that the SPARK RM reference
3979         is on one line.
3980         (Analyze_Input_Output): Update the call to
3981         Check_Mode. Specify the duplicated item. Reword the error
3982         message concerning an input of a null output list. Use "\"
3983         for error message continuation.
3984         (Analyze_Part_Of): Remove
3985         the use of "may". Use "\" for error message continuation.
3986         (Analyze_Refined_Depends_In_Decl_Part): Update the error
3987         message concerning a useless refinement to match the format
3988         of Refined_Global.
3989         (Analyze_Refined_Global_In_Decl_Part): Reword the error message
3990         concerning a useless refinement.
3991         (Analyze_Refinement_Clause): Use "\" for error message continuation.
3992         (Check_Constituent_Usage): Use "\" for error message continuation.
3993         (Check_Dependency_Clause): Use "\" for error message continuation.
3994         (Check_Matching_Constituent): Use "\" for error message continuation.
3995         (Check_Missing_Part_Of): Use "\" for error message continuation.
3996         (Check_Mode): Renamed to
3997         Check_Role. Update the comment on usage. Redo the error reporting
3998         to use Role_Error.
3999         (Check_Mode_Restriction_In_Enclosing_Context): Use "\" for error
4000         message continuation.
4001         (Find_Mode): Renamed to Find_Role. Update the parameter profile along
4002         with comment on usage. Update all occurrences of Is_Input and Is_Output.
4003         (Inconsistent_Mode_Error): Use "\" for error message continuation.
4004         (Input_Match): Use "\" for error message continuation.
4005         (Role_Error): New routine.
4006         (Set_Convention_From_Pragma): Use "\" for error message continuation.
4007         (Usage_Error): Add local variable Error_Msg. Build specialized error
4008         message showcasing the offending item kind. Redo the diagnostics for
4009         unconstrained types.
4011 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4013         * exp_util.adb (Is_Iterated_Container): Use high-level primitives
4014         to determine whether a type is a container type, rather than
4015         examining only its type declaration, so that subtypes and derived
4016         types are handled properly.
4018 2014-02-20  Sergey Rybin  <rybin@adacore.com frybin>
4020         * gnat_ugn.texi: gnatmetric: add description of project-specific
4021         options.
4023 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4025         * sem_attr.adb (Analyze_Attribute, case 'Update): Verify that
4026         all choices in an association for a record type have the same
4027         type, as is done for record aggregates.
4029 2014-02-20  Robert Dewar  <dewar@adacore.com>
4031         * a-cborma.adb, a-cbhama.adb, a-cbdlli.adb, a-cbmutr.adb: Use pragma
4032         Unmodified rather than Warnings (Off). Make comments
4033         uniform in the four affected units.
4035 2014-02-20  Robert Dewar  <dewar@adacore.com>
4037         * sem_ch13.adb (Analyze_Attribute_Definition_Clause, case
4038         Object_Size): For non-scalar types allow any value that is a
4039         multiple of 8.
4040         * gnat_rm.texi: Document Object_Size for composites more clearly.
4042 2014-02-20  Yannick Moy  <moy@adacore.com>
4044         * sem_util.ads, sem_util.adb (Default_Initialization): Remove function.
4046 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4048         * stand.ads: Raise_Type: new predefined entity, used as the type
4049         of a Raise_Expression prior to resolution.
4050         * cstand.adb: Build entity for Raise_Type.
4051         * sem_ch11.adb (Analyze_Raise_Expression): use Raise_Type as the
4052         initial type of the node.
4053         * sem_type.adb (Covers): Raise_Type is compatible with all
4054         other types.
4055         * sem_res.adb (Resolve): Remove special handling of Any_Type on
4056         Raise_Expression nodes.
4057         (Resolve_Raise_Expression): Signal ambiguity if the type of the
4058         context is still Raise_Type.
4060 2014-02-20  Robert Dewar  <dewar@adacore.com>
4062         * sem_ch12.adb (Validate_Access_Type_Instance): Add message if
4063         mismatching predicates.
4064         * sem_ch6.adb (Check_Conformance): Give better messages on
4065         predicate mismatch.
4066         * sem_eval.adb (Predicates_Match): Move to spec.
4067         * sem_eval.ads (Predicates_Match): Moved here from body.
4069 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4071         * a-cbmutr.adb: Use default value in Insert_Child.
4073 2014-02-20  Vincent Celier  <celier@adacore.com>
4075         * gnatcmd.adb, make.adb, prj-makr.adb, clean.adb: Call
4076         Stringt.Initialize in all project aware tools.
4078 2014-02-20  Doug Rupp  <rupp@adacore.com>
4080         * gnat_ugn.texi: Document gnatbind -X option.
4081         * vms_data.ads: Minor warnings documentation reformatting.
4083 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4085         * exp_ch3.adb (Expand_Freeze_Array_Type): Only create invariant
4086         procedure for a base type.
4088 2014-02-20  Robert Dewar  <dewar@adacore.com>
4090         * sem_ch4.adb (Analyze_Case_Expression): Get type from first
4091         expression with type info.
4092         * sem_ch13.adb: Minor reformatting.
4093         * sem_eval.adb (Subtypes_Statically_Match): Make sure we return
4094         False if predicates do not match on the two types.
4096 2014-02-20  Arnaud Charlet  <charlet@adacore.com>
4098         * sem_prag.adb (Analyze_Pragma [pragma Attach_Handler]):
4099         In Relaxed_RM_Semantics mode, allow any static integer value,
4100         for compatibility with other compilers.
4102 2014-02-20  Vincent Celier  <celier@adacore.com>
4104         * errutil.adb (Initialize): Properly initialize entry in table
4105         Warnings when warnings are suppressed.
4107 2014-02-20  Robert Dewar  <dewar@adacore.com>
4109         * s-os_lib.ads: Add warning about non-portability of Rename_File.
4110         * sem_util.ads, sem_util.adb (Is_Junk_Name): New function.
4111         * sem_warn.adb: Use Is_Junk_Name to suppress some warnings.
4112         * gnat_ugn.texi: Document no warnings on junk variable names.
4113         * layout.adb: Minor code reorganization (use Ekind_In).
4114         * stringt.adb: Move initialization of Null_String_Id to Initialize
4115         routine.
4117 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4119         * sem_ch13.adb: Initialize optional Element_Id.
4121 2014-02-20  Robert Dewar  <dewar@adacore.com>
4123         * s-os_lib.ads (Rename_File): Minor commment addition.
4125 2014-02-20  Thomas Quinot  <quinot@adacore.com>
4127         * einfo.ads: Minor reformatting.
4129 2014-02-20  Hristian Kirtchev  <kirtchev@adacore.com>
4131         * aspects.adb (Exchange_Aspects): New routine.
4132         * aspects.ads (Exchange_Aspects): New routine.
4133         * atree.adb (Rewrite): Do not check whether the save node has
4134         aspects as it never will, instead check the node about to be clobbered.
4135         * einfo.adb (Write_Field25_Name): Abstract_States can appear in
4136         entities of generic packages.
4137         * sem_ch6.adb (Analyze_Expression_Function): Fix the parent
4138         pointer of an aspect specification list after rewriting takes place.
4139         * sem_ch7.adb (Analyze_Package_Body_Helper): Swap the aspect
4140         specifications of the generic template and the copy used for analysis.
4141         * sem_ch12.adb (Analyze_Generic_Package_Declaration): Swap
4142         the aspect specifications of the generic template and the
4143         copy used for analysis.
4144         (Analyze_Package_Instantiation): Propagate the aspect specifications
4145         from the generic template to the instantiation.
4146         (Build_Instance_Compilation_Unit_Nodes): Propagate the aspect
4147         specifications from the generic template to the instantiation.
4148         * sem_ch13.adb (Analyze_Aspect_Specifications): Handle aspects
4149         Abstract_State, Initializes and Initial_Condition when they
4150         apply to a package instantiation.
4152 2014-02-20  Robert Dewar  <dewar@adacore.com>
4154         * stringt.adb: Add call to Initialize in package initialization.
4156 2014-02-20  Robert Dewar  <dewar@adacore.com>
4158         * a-crbtgk.adb, a-cihama.adb, a-coinve.adb, a-ciorse.adb, a-crbtgo.adb,
4159         a-cidlli.adb, a-cimutr.adb, a-cihase.adb, a-cohama.adb, a-coorse.adb,
4160         a-chtgke.adb, a-chtgop.adb, a-comutr.adb, a-ciorma.adb, a-cobove.adb,
4161         a-convec.adb, a-cohase.adb, a-chtgbk.adb, a-chtgbo.adb: Minor
4162         reformatting.
4164 2014-02-20  Bob Duff  <duff@adacore.com>
4166         * s-os_lib.ads: Minor: Remove incorrect comment.
4168 2014-02-20  Robert Dewar  <dewar@adacore.com>
4170         * sem_elab.adb (Check_Elab_Assign): Clearer warning message.
4172 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4174         * a-cborma.adb (Assign): When creating a node without a specified
4175         element, insert an uninitialized element in the map, because
4176         the instance may provide an element type with a default
4177         initialization, e.g a scalar with a Default_Value aspect.
4178         * a-cbhama.adb (Assign_Key): Remove useless Allocate procedure.
4179         (Insert): In the version without explicit element, provide an
4180         uninitialized element, as above.
4181         * a-cbdlli.adb (Append): In the version without explicit element,
4182         provide an uninitalized element, as above.
4183         (Allocate): Remove unused version.
4185 2014-02-20  Robert Dewar  <dewar@adacore.com>
4187         * sem_elab.adb: Minor code reorganization (use Nkind_In).
4188         * stringt.adb: Remove temporary pragma Warnings (Off).
4189         * stringt.ads: Add pragma Elaborate_Body to ensure initialization
4190         of Null_String_Id.
4192 2014-02-20  Matthew Heaney  <heaney@adacore.com>
4194         * a-chtgbk.adb (Replace): Use correct offset when calculating bucket
4195         index.
4197 2014-02-20  Ed Schonberg  <schonberg@adacore.com>
4199         * sem_ch5.adb (Analyze_Iterator_Specification): Initialize
4200         properly the cursor type for subsequent volatile testing in SPARK
4201         mode, when domain is a formal container with an Iterabe aspect.
4203 2014-02-20  Robert Dewar  <dewar@adacore.com>
4205         * errout.adb (Set_Warnings_Mode_Off): Add Reason argument.
4206         (Set_Specific_Warning_Off): Add Reason argument.
4207         * errout.ads (Set_Warnings_Mode_Off): Add Reason argument.
4208         (Set_Specific_Warning_Off): Add Reason argument.
4209         * erroutc.adb (Warnings_Entry): Add Reason field
4210         (Specific_Warning_Entry): Add Reason field.
4211         (Warnings_Suppressed): return String_Id for Reason.
4212         (Warning_Specifically_Suppressed): return String_Id for Reason.
4213         * erroutc.ads (Warnings_Entry): Add Reason field.
4214         (Specific_Warning_Entry): Add Reason field.
4215         (Set_Specific_Warning_Off): Add Reason argument.
4216         (Set_Warnings_Mode_Off): Add Reason argument.
4217         (Warnings_Suppressed): return String_Id for Reason.
4218         (Warning_Specifically_Suppressed): return String_Id for Reason.
4219         * errutil.adb (Warnings_Suppressed): returns String_Id for Reason
4220         (Warning_Specifically_Suppressed): returns String_Id for Reason
4221         * gnat_rm.texi: Document that Warning parameter is string literal
4222         or a concatenation of string literals.
4223         * par-prag.adb: New handling for Reason argument.
4224         * sem_prag.adb (Analyze_Pragma, case Warning): New handling
4225         for Reason argument.
4226         * sem_util.ads, sem_util.adb (Get_Reason_String): New procedure.
4227         * sem_warn.ads (Warnings_Off_Entry): Add reason field.
4228         * stringt.adb: Set Null_String_Id.
4229         * stringt.ads (Null_String_Id): New constant.
4231 2014-02-20  Robert Dewar  <dewar@adacore.com>
4233         * einfo.ads: Minor comment addition: Etype of package is
4234         Standard_Void_Type.
4235         * checks.adb, exp_aggr.adb, exp_atag.adb, exp_attr.adb, exp_ch13.adb,
4236         exp_ch2.adb, exp_ch3.adb, exp_ch4.adb, exp_ch5.adb, exp_ch6.adb,
4237         exp_ch7.adb, exp_ch9.adb, exp_dbug.adb, exp_disp.adb, exp_imgv.adb,
4238         exp_intr.adb, exp_prag.adb, exp_sel.adb, exp_strm.adb, exp_util.adb,
4239         freeze.adb, rtsfind.adb, sem_aggr.adb, sem_attr.adb, sem_ch10.adb,
4240         sem_ch12.adb, sem_ch13.adb, sem_ch3.adb, sem_ch4.adb, sem_ch5.adb,
4241         sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_prag.adb, sem_res.adb,
4242         sem_util.adb, tbuild.adb, tbuild.ads: Remove New_Reference_To.
4243         Replace all calls with calls to New_Occurrence_Of.
4245 2014-02-20  Robert Dewar  <dewar@adacore.com>
4247         * par-util.adb (Ignore, case of right paren): Make this a
4248         serious error.
4250 2014-02-19  Robert Dewar  <dewar@adacore.com>
4252         * sem_ch5.adb, sem_prag.adb, sem_attr.adb: Minor reformatting.
4253         * debug.adb: Remove -gnatd.X switch, no longer used.
4254         * styleg.adb (Check_Then): Remove check of -gnatd.X, check is
4255         now always made.
4257 2014-02-19  Bob Duff  <duff@adacore.com>
4259         * g-socket.ads: Minor: Correct some comments.
4261 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4263         * sem_ch5.adb: Inhibit iterator rewriting in ASIS mode.
4265 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
4267         * sem_ch13.adb (Analyze_Aspect_Specifications): Do not generate
4268         an error on out of range priorities if Relaxed_RM_Semantics.
4269         * sem_prag.adb (Analyze_Pragma): Ditto.
4271 2014-02-19  Bob Duff  <duff@adacore.com>
4273         * sem_attr.adb (Resolve_Attribute): Detect the case of F'Access
4274         where F denotes the renaming of an enumeration literal, and
4275         issue a specialized error message.
4277 2014-02-19  Matthew Heaney  <heaney@adacore.com>
4279         * a-chtgop.ads (Checked_Index): New operation.
4280         (Next): Changed mode of hash table.
4281         * a-chtgop.adb (Adjust, Delete_Node_Sans_Free): Detect tampering
4282         (Generic_Read, Reserve_Capacity): Ditto.
4283         (Generic_Equal): Detect tampering.
4284         (Next): Changed mode of hash table, detect tampering.
4285         * a-chtgke.ads (Checked_Index, Checked_Equivalent_Keys): New
4286         operation.
4287         (Find): Changed mode of hash table.
4288         * a-chtgke.adb (Checked_Equivalent_Keys): New operation
4289         (Delete_Key_Sans_Free, Generic_Conditional_Insert): Detect
4290         tampering.
4291         (Find): Changed mode of hash table, check for tampering.
4292         (Generic_Replace_Element): Check for tampering.
4293         * a-chtgbk.ads (Checked_Index, Checked_Equivalent_Keys): New operation.
4294         * a-chtgbk.adb (Checked_Index, Checked_Equivalent_Keys): New
4295         operation (Delete_Key_Sans_Free, Generic_Conditional_Insert):
4296         Detect tampering.
4297         (Find, Generic_Replace_Element): Check for tampering.
4298         * a-chtgbo.ads (Checked_Index): New operation.
4299         * a-chtgbo.adb (Checked_Index): New operation
4300         (Delete_Node_Sans_Free, Generic_Equal): Detect tampering.
4301         (Generic_Read, Next): Ditto.
4302         * a-cohase.adb, a-cihase.adb (Is_In): Changed mode of hash
4303         table (Difference, Intersection): Use variable view of
4304         source, detect tampering (Find, Is_Subset, Overlap): Use
4305         variable view of container (Symmetric_Difference, Union):
4306         Detect tampering (Vet): Use Checked_Index to detect tampering
4307         (Constant_Reference, Element, Find): Use variable view of
4308         container.
4309         (Update_Element_Preserving_Key): Detect tampering.
4310         * a-cbhase.adb (Difference, Find, Is_In): Use variable view
4311         of container.
4312         (Is_Subset): Ditto.
4313         (Equivalent_Sets, Overlap): Use Node's Next component.
4314         (Vet): Use Checked_Index to detect tampering.
4315         (Constant_Reference, Element, Find): Use variable view of container.
4316         (Update_Element_Preserving_Key): Detect tampering.
4317         * a-cohama.adb, a-cihama.adb, a-cbhama.adb (Constant_Reference,
4318         Element, Find): Use variable view of container.
4319         (Reference): Rename hash table component.
4320         (Vet): Use Checked_Index to detect tampering.
4322 2014-02-19  Arnaud Charlet  <charlet@adacore.com>
4324         * adabkend.adb (Scan_Compiler_Arguments): Add missing handling
4325         of -nostdinc.
4327 2014-02-19  Thomas Quinot  <quinot@adacore.com>
4329         * tbuild.adb (New_Occurrence_Of, New_Rerefence_To): Guard
4330         against calls without Def_Id.
4332 2014-02-19  Claire Dross  <dross@adacore.com>
4334         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads, a-cforse.ads,
4335         a-cofove.ads: Add global annotations to subprograms.
4337 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4339         * sem_prag.adb (Analyze_Initial_Condition_In_Decl_Part): Remove
4340         constants Errors, Pack_Id and Pack_Init. Remove variable Vars.
4341         Initial_Condition no longer requires the presence of pragma
4342         Initialized. Do not try to diagnose whether all variables mentioned in
4343         pragma Initializes also appear in Initial_Condition.
4344         (Collect_Variables): Removed.
4345         (Match_Variable): Removed.
4346         (Match_Variables): Removed.
4347         (Report_Unused_Variables): Removed.
4349 2014-02-19  Thomas Quinot  <quinot@adacore.com>
4351         * gnat_rm.texi (pragma Stream_Convert): Minor rewording.
4353 2014-02-19  Robert Dewar  <dewar@adacore.com>
4355         * sem_util.adb, sem_util.ads, prj-conf.adb, s-os_lib.adb: Minor
4356         reformatting.
4358 2014-02-19  Vincent Celier  <celier@adacore.com>
4360         * prj-part.adb (Parse_Single_Project): Use the fully resolved
4361         project path, with all symbolic links resolved, to check if the
4362         same project is imported with a different unresolved path.
4363         * prj-tree.ads (Project_Name_And_Node): Component Canonical_Path
4364         changed to Resolved_Path to reflect that all symbolic links
4365         are resolved.
4367 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4369         * sem_util.ads, sem_util.adb (Get_Cursor_Type): Moved to sem_util
4370         from sem_ch13, for use elsewhere.
4371         * sem_ch13.adb (Get_Cursor_Type): Moved to sem_util.
4372         * sem_ch5.adb (Analyze_Iterator_Specification): Set properly the
4373         cursor type on the loop variable when the iteration is over o
4374         formal container.
4376 2014-02-19  Vincent Celier  <celier@adacore.com>
4378         * prj-conf.adb (Add_Default_GNAT_Naming_Scheme): Add declaration
4379         for an empty Target (Check_Target): Never fail when an empty
4380         target is declared in the configuration project.
4382 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4384         * sem_prag.adb (Check_Arg_Is_Local_Name): Argument is local if
4385         the pragma comes fron a predicate aspect and the context is a
4386         record declaration within the scope that declares the type.
4388 2014-02-19  Robert Dewar  <dewar@adacore.com>
4390         * gnat_rm.texi: Minor clarifications.
4391         * expander.adb, sem_aggr.adb: Add comments.
4393 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4395         * sem_prag.adb (Check_Arg_Is_Local_Name): For an aspect that
4396         applies to a subprogram body, the name is the current scope,
4397         rather than being declared in the current scope.
4398         (Analyze_Pragma, case No_Return): Handle properly a No_Return
4399         aspect applied to a subprogram body.
4401 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4403         * sem_ch13.adb (Resolve_Iterable_Operation): Improve resolution
4404         of overloaded subprograms, and fix bug in handling of primitive
4405         operation Element.
4407 2014-02-19  Pascal Obry  <obry@adacore.com>
4409         * s-os_lib.adb: Minor reformatting.
4411 2014-02-19  Yannick Moy  <moy@adacore.com>
4413         * expander.adb (Expand): Do nothing inside generics.
4414         * sem_aggr.adb (Aggregate_Constraint_Checks): Do nothing inside
4415         generics.
4417 2014-02-19  Yannick Moy  <moy@adacore.com>
4419         * exp_ch2.adb: Remove useless 'with' of unit Uintp.
4421 2014-02-19  Robert Dewar  <dewar@adacore.com>
4423         * sem_ch3.adb, style.adb, sem_prag.adb, sem_ch13.adb: Minor reformatting
4424         * a-sequio.adb: Remove useless pragma Extensions_Allowed (no
4425         longer needed).
4427 2014-02-19  Claire Dross  <dross@adacore.com>
4429         * a-cfdlli.ads, a-cfhase.ads, a-cforma.ads, a-cfhama.ads,
4430         a-cforse.ads, a-cofove.ads: Add Iterable aspect to formal containers.
4432 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4434         * sem_ch3.adb (Analyze_Declarations): Analyze
4435         a package contract at the end of the private declarations (if
4436         applicable), otherwise analyze it and the end of the visible
4437         declarations.
4439 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4441         * style.adb (Missing_Overriding): If subprogram is an
4442         instantiation, place warning on the instance node itself,
4443         without mention of the original generic. Do not emit message
4444         if explicit Ada version is older than the introduction of the
4445         overriding indicator.
4447 2014-02-19  Yannick Moy  <moy@adacore.com>
4449         * gnat_rm.texi: Doc clarifications.
4451 2014-02-19  Yannick Moy  <moy@adacore.com>
4453         * exp_util.adb (Remove_Side_Effects): Do not remove side-effects
4454         inside a generic.
4456 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4458         * sem_ch13.adb (Get_Cursor_Type): Obtain cursor type from
4459         specified First primitive, rather than by name.
4460         (Validate_Iterable_Aspect, Resolve_Iterable_Operation): Use it,
4461         and extend error checking for missing primitives and incorrect
4462         signatures.
4464 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4466         * sem_ch3.adb (Check_Pragma_Implemented): Detect additional
4467         errors when a Synchronization aspect on an overriding protected
4468         operation does not match the given aspect on the overridden
4469         operation of an ancestor interface.
4471 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4473         * sem_prag.adb (Check_Loop_Pragma_Grouping): New routine.
4474         (Check_Loop_Pragma_Placement): Update
4475         comment on usage. Remove local variables Orig_Stmt and
4476         Within_Same_Sequence. Check that the current Loop_Invariant or
4477         Loop_Variant pragma is grouped together with other such pragmas.
4478         (Is_Loop_Pragma): New routine.
4479         (Prev_In_Loop): Removed.
4481 2014-02-19  Robert Dewar  <dewar@adacore.com>
4483         * par-ch6.adb (P_Return): For extended return, end column lines
4484         up with RETURN.
4485         * par.adb: Minor documentation clarification.
4487 2014-02-19  Yannick Moy  <moy@adacore.com>
4489         * sem_prag.adb (Check_Loop_Pragma_Placement): Add check
4490         that Loop_Invariant and Loop_Variant appear consecutively.
4491         * gnat_rm.texi Update documentation of Loop_Invariant and
4492         Loop_Variant pragmas.
4494 2014-02-19  Robert Dewar  <dewar@adacore.com>
4496         * debug.adb: Document -gnatd.X.
4497         * par-ch5.adb (P_If_Statement): Always check THEN, even if not
4498         first token
4499         (Check_Then_Column): Ditto.
4500         * styleg.adb (Check_Then): Allow THEN on line after IF.
4501         (Check_Then): Check THEN placement under control of -gnatd.X
4502         * styleg.ads (Check_Then): Now called even if THEN is not first
4503         token on line.
4504         * stylesw.ads (Style_Check_If_Then_Layout): Document new
4505         relaxed rules.
4506         * gnat_ugn.texi: For -gnatyi, THEN can now be on line after IF.
4508 2014-02-19  Robert Dewar  <dewar@adacore.com>
4510         * a-cfhama.adb, a-cfhase.adb, a-cforse.adb, a-cofove.adb, a-ngcefu.adb,
4511         a-teioed.adb, a-wtedit.adb, a-ztedit.adb, exp_ch5.adb, inline.adb,
4512         prj-pp.adb, prj-tree.adb, sem_ch12.adb, sem_ch8.adb,
4513         vms_conv.adb: Fix bad layout of IF statements
4515 2014-02-19  Robert Dewar  <dewar@adacore.com>
4517         * exp_util.adb (Side_Effect_Free): Scalar if expressions can be SEF.
4519 2014-02-19  Robert Dewar  <dewar@adacore.com>
4521         * exp_util.adb: Update comments.
4523 2014-02-19  Doug Rupp  <rupp@adacore.com>
4525         * bindgen.adb (Gen_Adainit) [VMS] New global Float_Format.
4526         * init.c (__gl_float_format): [VMS] New global.
4527         (__gnat_set_features): Call FP_CONTROL to set FPSR for the float
4528         representation in effect.
4530 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4532         * exp_ch6.adb Add with and use clause for Exp_Prag.
4533         (Expand_Contract_Cases): Relocated to Exp_Prag.
4534         * exp_ch6.ads (Expand_Contract_Cases): Relocated to Exp_Prag.
4535         * exp_prag.adb Add with and use clauses for Checks and Validsw.
4536         (Expand_Contract_Cases): Relocated from Exp_Ch6. Update the
4537         structure of the expanded code to showcase the evaluation of
4538         attribute 'Old prefixes. Add local variable Old_Evals. Expand
4539         any attribute 'Old references found within a consequence. Add
4540         circuitry to evaluate the prefixes of attribute 'Old that
4541         belong to a selected consequence.
4542         (Expand_Old_In_Consequence): New routine.
4543         * exp_prag.ads (Expand_Contract_Cases): Relocated from Exp_Ch6.
4544         * sem_attr.adb (Check_Use_In_Contract_Cases): Warn that a
4545         potentially unevaluated prefix is always evaluated.
4547 2014-02-19  Robert Dewar  <dewar@adacore.com>
4549         * exp_attr.adb (Expand_Min_Max_Attribute): Use Insert_Declaration
4550         (Expand_Min_Max_Attribute): Use Matching_Standard_Type.
4551         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove special
4552         handling for the case of Modify_Tree_For_C, this approach did
4553         not work.
4554         * exp_util.adb (Matching_Standard_Type): New function
4555         (Side_Effect_Free): New top level functions (from
4556         Remove_Side_Effects).
4557         * exp_util.ads (Side_Effect_Free): New top level functions
4558         (moved from body).
4559         * sinfo.ads: Minor comment updates.
4561 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4563         * exp_ch6.adb (Expand_Simple_Function_Return): If return
4564         type is unconstrained and uses the secondary stack, mark the
4565         enclosing function accordingly, to ensure that the value is not
4566         prematurely removed.
4568 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4570         * par.adb Alphabetize the routines in Par.Sync.
4571         (Resync_Past_Malformed_Aspect): New routine.
4572         * par-ch13.adb (Get_Aspect_Specifications): Alphabetize local
4573         variables. Code and comment reformatting. Detect missing
4574         parentheses on aspects [Refined_]Global and [Refined_]Depends
4575         with a non-null definition.
4576         * par-sync.adb: Alphabetize all routines in this separate unit.
4577         (Resync_Past_Malformed_Aspect): New routine.
4579 2014-02-19  Robert Dewar  <dewar@adacore.com>
4581         * sem_eval.ads, sem_eval.adb (Subtypes_Statically_Match): Return False
4582         if Esize values do not match.
4584 2014-02-19  Yannick Moy  <moy@adacore.com>
4586         * sinfo.ads: Minor comment update.
4588 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4590         * atree.ads: Minor reformatting (change Entity_Info to Einfo).
4592 2014-02-19  Thomas Quinot  <quinot@adacore.com>
4594         * exp_ch7.adb (Find_Node_To_Be_Wrapped): An assignment statement
4595         that has the No_Ctrl_Actions flag is a suitable node to be
4596         wrapped if the assigned expression has no finalization actions.
4597         * sem_eval.adb (Eval_Entity_Name): For a compile time known
4598         boolean value, mark the corresponding condition SCO as constant.
4600 2014-02-19  Robert Dewar  <dewar@adacore.com>
4602         * exp_util.adb: Minor reformatting.
4603         * exp_util.ads (Matching_Standard_Type): New function.
4604         * exp_ch7.adb: Minor reformatting.
4606 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4608         * sem_ch13.adb (Get_Cursor_Type): Use scope of iterable type
4609         to find declaration for Cursor, to handle properly the case of
4610         a discriminated iterable type.
4612 2014-02-19  Vincent Celier  <celier@adacore.com>
4614         * gnatcmd.adb (GNATCmd): Always replace the object dirs of
4615         imported library projects with the library ALI dirs, when setting
4616         the object paths.
4617         * prj-env.ads (Ada_Objects_Path): Correct comments about
4618         argument Including_Libraries.
4620 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
4622         * gnat_rm.texi: Minor spelling fixes.
4624 2014-02-19  Doug Rupp  <rupp@adacore.com>
4626         * init.c: Remove unneeded code.
4627         * fe.h (Float_Format): New macro
4628         * gcc-interface/trans.c (gigi): On VMS, set vms_float_format.
4630 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4632         * sem_prag.adb (Check_Refined_Global_Item):
4633         A state or variable acts as a constituent only it is part of an
4634         encapsulating state and the state has visible refinement.
4636 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4638         * sem_ch6.adb (Analyze_Subprogram_Contract): Do not warn on a
4639         postcondition for a function when the expression does not mention
4640         'Result but the function has in-out parameters.
4642 2014-02-19  Robert Dewar  <dewar@adacore.com>
4644         * gnat_rm.texi: Add documentation on Value_Size forcing biased
4645         representation.
4647 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4649         * lib-xref.ads Remove the small table of letter and symbol usage as we
4650         already have one.
4652 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4654         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Emit specific error
4655         messages depending on the offending misplaced aspect specifications.
4656         (Diagnose_Misplaced_Aspect_Specifications): New routine.
4658 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4660         * sem_ch13.adb (Get_Cursor): Utility to retrieve cursor type
4661         for iterable aspect primitives.
4662         (Resolve_Iterable_Operation): Use expected signature of iterable
4663         aspect to resolve primitive when overloading is present.
4664         (Validate_Iterable_Aspect, Analyze_Aspects_At_Freeze_Point): use it.
4665         (Check_Signature): Removed.
4667 2014-02-19  Yannick Moy  <moy@adacore.com>
4669         * sem_ch10.adb (Analyze_Proper_Body): Issue error on missing
4670         subunit in GNATprove_Mode.
4671         * sinfo.ads (GNATprove_Mode): Document error issued in GNATprove_Mode.
4673 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4675         * lib-xref.ads Alphabetize the contents of table
4676         Xref_Entity_Letters. Add an entry in table Xref_Entity_Letters
4677         for E_Abstract_State. List all letters and symbols in use.
4678         * sem_prag.adb (Analyze_Abstract_State): Update all calls
4679         to Create_Abstract_State to reflect the new signature.
4680         (Create_Abstract_State): Change subprogram profile and update
4681         the comment on usage. Use the proper location of the state
4682         declaration when creating a new abstract state entity. Do not
4683         generate an external name, but simply reuse the name coming from
4684         the state declaration.
4686 2014-02-19  Robert Dewar  <dewar@adacore.com>
4688         * exp_ch4.adb (Expand_N_Expression_With_Actions): Make sure
4689         declarations get properly inserted in Modify_Tree_For_C mode.
4690         * sinfo.ads: Minor comment addition.
4692 2014-02-19  Robert Dewar  <dewar@adacore.com>
4694         * par-ch9.adb, exp_ch5.adb, sem_ch5.adb, exp_attr.adb, sem_util.adb,
4695         sem_util.ads, sem_ch13.adb, sem_ch13.ads: Minor reformatting.
4697 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4699         * style.adb (Missing_Overriding): Warning does not apply in
4700         language versions prior to Ada 2005.
4701         * snames.ads-tmpl: Add Name_Iterable and Attribute_Iterable.
4702         * sem_attr.adb: Add Attribute_Iterable where needed.
4703         * exp_attr.adb: ditto.
4704         * exp_ch5.adb (Expand_Formal_Container_Loop): New procedure to
4705         handle loops and quantified expressions over types that have an
4706         iterable aspect.  Called from Expand_Iterator_Loop.
4707         * sem_ch5.adb (Analyze_Iterator_Specification): Recognize types
4708         with Iterable aspect.
4709         * sem_ch13.adb (Validate_Iterable_Aspect): Verify that the
4710         subprograms specified in the Iterable aspect have the proper
4711         signature involving container and cursor.
4712         (Check_Aspect_At_Freeze_Point): Analyze value of iterable aspect.
4713         * sem_ch13.ads (Validate_Iterable_Aspect): New subprogram.
4714         * sem_util.ads, sem_util.adb (Get_Iterable_Type_Primitive):
4715         New procedure to retrieve one of the primitives First, Last,
4716         or Has_Element, from the value of the iterable aspect of a
4717         formal container.
4718         (Is_Container_Element): Predicate to recognize expressions
4719         that denote an element of one of the predefined containers,
4720         for possible optimization.  This subprogram is not currently
4721         used, pending ARG discussions on the legality of the proposed
4722         optimization. Worth preserving for eventual use.
4723         (Is_Iterator): Recognize formal container types.
4724         * aspects.ads, aspects.adb: Add Aspect_Iterable where needed.
4726 2014-02-19  Robert Dewar  <dewar@adacore.com>
4728         * exp_attr.adb (Expand_Min_Max_Attribute): New procedure
4729         (Expand_N_Attribute_Reference): Use this procedure for Min and Max.
4730         * exp_ch4.adb (Expand_N_Expression_With_Actions): Remove object
4731         declarations from list of actions.
4732         * output.ads, output.adb (Delete_Last_Char): New procedure.
4733         * sinfo.ads: Document handling of Mod and expression with actions
4734         in Modify_Tree_For_C mode.
4736 2014-02-19  Ed Schonberg  <schonberg@adacore.com>
4738         * par-ch9.adb (P_Task): Add a null statement to produce a
4739         well-formed task body when due to a previous syntax error the
4740         statement list is empty.
4742 2014-02-19  Hristian Kirtchev  <kirtchev@adacore.com>
4744         * sem_prag.adb (Check_Dependency_Clause): Account
4745         for the case where a state with a non-null refinement matches a
4746         null output list. Comment reformatting.
4747         (Inputs_Match): Copy a solitary input to avoid an assertion failure
4748         when trying to match the same input in multiple clauses.
4750 2014-02-19  Gary Dismukes  <dismukes@adacore.com>
4752         * sem_attr.adb: Minor typo fix.
4754 2014-02-18  Robert Dewar  <dewar@adacore.com>
4756         * cstand.adb (Build_Signed_Integer_Type): Minor change of formal
4757         from Int to Nat (Build_Unsigned_Integer_Type): New procedure
4758         (Create_Standard): Create new unsigned types.
4759         * exp_ch4.adb (Expand_N_Op_Mod): Expand mod in Modify_Tree_For_C
4760         mode (Expand_N_Reference): Removed, problematic and not needed
4761         for now.
4762         * exp_ch4.ads (Expand_N_Reference): Removed, problematic and
4763         not needed for now.
4764         * exp_util.ads, exp_util.adb (Power_Of_Two): New function.
4765         * expander.adb: Remove call to Expand_N_Reference (problematic,
4766         and not needed now).
4767         * sem_aux.ads, sem_aux.adb (Corresponding_Unsigned_Type): New function.
4768         * stand.adb: Read and write unsigned type entities.
4769         * stand.ads: Add new unsigned types.
4771 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
4773         * sem_ch4.adb (Analyze_Call): Do not mark a function call
4774         as being inside an assertion expression as the flag is now removed.
4775         (Check_Ghost_Subprogram_Call): Do not query the
4776         In_Assertion_Expression flag as it is now removed, instead use
4777         a predicate function.
4778         * sem_elab.adb (Check_Internal_Call_Continue): Do not query the
4779         In_Assertion_Expression flag as it is now removed, instead use
4780         a predicate function.
4781         * sem_prag.ads: Add new table Assertion_Expression_Pragma.
4782         * sem_util.adb Add with and use clause for Sem_Prag.
4783         (In_Assertion_Expression_Pragma): New routine.
4784         * sem_util.ads (In_Assertion_Expression_Pragma): New routine.
4785         * sinfo.adb (In_Assertion_Expression): Removed.
4786         (Set_In_Assertion_Expression): Removed.
4787         * sinfo.ads Remove flag In_Assertion_Expression along with its
4788         use in nodes.
4789         (In_Assertion_Expression): Removed along with
4790         pragma Inline.  (Set_In_Assertion_Expression): Removed along
4791         with pragma Inline.
4793 2014-02-18  Sergey Rybin  <rybin@adacore.com frybin>
4795         * gnat_ugn.texi: gnatpp section: add note that '-j' cannot be
4796         used together with '-r', '-rf' or '-rnb' options.
4798 2014-02-18  Hristian Kirtchev  <kirtchev@adacore.com>
4800         * sem_attr.adb (Analyze_Attribute): Comment
4801         and code reformatting. Use separate routines to check the
4802         legality of attribute 'Old in certain pragmas. Verify
4803         the use of 'Old, 'Result and locally declared entities
4804         within the prefix of 'Old.
4805         (Check_References_In_Prefix): New routine.
4806         (Check_Use_In_Contract_Cases): New routine.
4807         (Check_Use_In_Test_Case): New routine.
4809 2014-02-18  Vincent Celier  <celier@adacore.com>
4811         * sem_aux.adb (Is_By_Reference_Type): For each components of
4812         a record type, check also if the component is volatile as it
4813         may have an aspect that makes it volatile. If it is, then the
4814         record type is a by reference type.
4816 2014-02-18  Robert Dewar  <dewar@adacore.com>
4818         * exp_attr.adb: Minor reformatting.
4819         * exp_ch4.ads, exp_ch4.adb (Expand_N_Reference): New procedure.
4820         * exp_util.adb (Remove_Side_Effects): Add conditional expressions
4821         as another case where we don't generate N_Reference nodes for
4822         primitive types.
4823         * expander.adb (Expand): Add call to Expand_N_Reference.
4825 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4827         * sem_prag.adb (Analyze_Refined_Pragma): Remove
4828         local variable Pack_Spec. Refinement pragmas may now apply to
4829         bodies of both visible and private subprograms.
4831 2014-02-06  Robert Dewar  <dewar@adacore.com>
4833         * exp_attr.adb (Expand_Loop_Entry_Attribute):
4834         Minor change (Attr => N) (Expand_Pred_Succ): New name
4835         Expand_Pred_Succ_Attribute (Expand_N_Attribute_Reference, case
4836         Max): Expand into if expression if Modify_Tree_For_C mode.
4837         (Expand_N_Attribute_Reference, case Min): ditto
4838         * sinfo.ads: Modify_Tree_For_C takes care of expanding Min and
4839         Max attributes.
4841 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
4843         * sem_ch3.adb (Analyze_Object_Declaration): Do not generate
4844         predicate check if this is an internal declaration with
4845         No_Initialization set, as for an expanded aggregate component.
4847 2014-02-06  Doug Rupp  <rupp@adacore.com>
4849         * init.c (__gnat_default_resignal_p) [VMS]: Test for and resignal
4850         conditions with severity of "SUCCESS" or "INFORMATIONAL".
4852 2014-02-06  Yannick Moy  <moy@adacore.com>
4854         * sem_prag.adb (Analyze_Pragma): Analyze pragma
4855         Debug rewritten node before rewriting it as a null statement in
4856         GNATprove mode.
4858 2014-02-06  Robert Dewar  <dewar@adacore.com>
4860         * sem_attr.adb (Min_Max): New procedure.
4861         (Max_Alignment_For_Allocation_Max_Size_In_Storage_Elements): New
4862         procedure.
4864 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
4866         * gnat_ugn.texi, vms_data.ads: Add documentation of '-t' option for
4867         gnatmetric/gnatpp.
4869 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4871         * sem_prag.adb (Analyze_Abstract_State): Update
4872         all calls to Create_Abstract_State to pass the proper state
4873         "declaration".
4874         (Create_Abstract_State): Add new formal parameter
4875         State_Decl along with comment on usage. Establish a link between
4876         the abstract state entity and the state declaration.
4878 2014-02-06  Robert Dewar  <dewar@adacore.com>
4880         * sem_attr.adb (Analyze_Attribute, case Max): Check for improper
4881         comparison of unordered enumeration type.
4882         (Analyze_Attribute, case Max): Check for improper comparison of
4883         unordered enumeration type.
4884         * sem_res.adb (Bad_Unordered_Enumeration_Reference): Moved to
4885         sem_util.adb.
4886         * sem_util.ads, sem_util.adb (Bad_Unordered_Enumeration_Reference):
4887         Moved here from Sem_Res.
4889 2014-02-06  Robert Dewar  <dewar@adacore.com>
4891         * sem_ch3.adb, sem_prag.adb, sem_res.adb, lib-xref.adb: Minor
4892         reformatting.
4894 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4896         * sem_ch6.adb (Process_Formals): Error message reformatting.
4898 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4900         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Add local
4901         variable Spec. Do not inherit the null indicator from the
4902         subprogram body when generating the spec.
4904 2014-02-06  Robert Dewar  <dewar@adacore.com>
4906         * casing.adb (Determine_Casing): Consider SPARK_Mode to be
4907         mixed case.
4909 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
4911         * exp_ch6.adb (Is_Build_In_Place_Function): Predicate is false
4912         when the function has a foreign convention, but not if only the
4913         limited return type has such a convention.
4915 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4917         * sem_ch3.adb (Handle_Late_Controlled_Primitive): Remove local
4918         variable Spec. Comment reformatting. Use Copy_Separate_Tree
4919         rather than New_Copy_Tree when building the corresponding
4920         subprogram declaration.
4922 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4924         * sem_prag.adb (Analyze_Global_Item): Remove
4925         the mode-related checks on abstract states with enabled external
4926         properties.
4927         (Property_Error): Removed.
4929 2014-02-06  Javier Miranda  <miranda@adacore.com>
4931         * lib-xref.adb (Generate_Reference): When
4932         generating the reference to the first private entity take care
4933         of handling swapped entities.
4935 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
4937         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
4938         gnatmetric.
4940 2014-02-06  Robert Dewar  <dewar@adacore.com>
4942         * exp_ch4.adb (Expand_N_Shift_Left): Handle shift counts greater
4943         than the word size when operating in Modify_Tree_For_C mode.
4944         * sinfo.ads: Add documentation section on Modify_Tree_For_C mode.
4946 2014-02-06  Robert Dewar  <dewar@adacore.com>
4948         * erroutc.adb (Warning_Specifically_Suppressed.Matches):
4949         compare is case insensitive.
4950         * gnat_rm.texi: Document that string compare for Warnings Off
4951         is now case insensitive.
4953 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
4955         * gnat_rm.texi: Small wording tweak.
4957 2014-02-06  Pascal Obry  <obry@adacore.com>
4959         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Included_Patterns
4960         and Included_Artifact_Patterns attribute definitions.
4962 2014-02-06  Yannick Moy  <moy@adacore.com>
4964         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set
4965         SPARK_Mode pragma component for all subprograms, including stubs.
4967 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
4969         * sem_ch10.adb (Analyze_Package_Body_Stub): Maintain
4970         the configuration options of the enclosing context in a
4971         stack-like fasion.
4972         (Analyze_Subprogram_Body_Stub): Maintain the
4973         configuration options of the enclosing context in a stack-like
4974         fashion.
4976 2014-02-06  Robert Dewar  <dewar@adacore.com>
4978         * debug.adb: -gnatd.u sets Modify_Tree_For C
4979         * exp_ch4.adb (Expand_N_Op_Rotate_Left): Expand out
4980         if Modify_Tree_For_C (Expand_N_Op_Rotate_Right): ditto.
4981         (Expand_N_Op_Arithmetic_Right_Shift): ditto.
4982         * exp_intr.adb (Expand_Shift): Call expander so we do
4983         Modify_Tree_For_C expansions.
4984         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
4985         if -gnatd.u set.
4987 2014-02-06  Fedor Rybin  <frybin@adacore.com>
4989         * prj-proc.ads (Tree_Loaded_Callback): new type Callback used
4990         after the phase 1 of the processing of each aggregated project
4991         to get access to project trees of aggregated projects.
4992         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded
4993         If specified, On_New_Tree_Loaded is called after each aggregated
4994         project has been processed succesfully.
4995         (Process): new parameter On_New_Tree_Loaded.
4996         * prj-proc.adb (Process_Aggregated_Projects): On_New_Tree_Loaded
4997         callback added after processing of each aggregated project.
4998         (Recursive_Process): new parameter On_New_Tree_Loaded.
4999         (Process): new parameter On_New_Tree_Loaded.
5000         (Process_Project_Tree_Phase_1): new parameter On_New_Tree_Loaded.
5001         * prj-conf.ads (Parse_Project_And_Apply_Config): new parameter
5002         On_New_Tree_Loaded.
5003         * prj-conf.adb (Parse_Project_And_Apply_Config): new parameter
5004         On_New_Tree_Loaded.
5006 2014-02-06  Bob Duff  <duff@adacore.com>
5008         * gnat_ugn.texi: Implement --insert-blank-lines and
5009         --preserve-blank-lines switches.
5011 2014-02-06  Sergey Rybin  <rybin@adacore.com frybin>
5013         * gnat_ugn.texi, vms_data.ads: Add documentation of -j option for
5014         gnatelim.
5016 2014-02-06  Eric Botcazou  <ebotcazou@adacore.com>
5018         * gnat_rm.texi (Pragma Optimize_Alignment): Document the effect
5019         of the pragma on individual objects.
5021 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5023         * einfo.adb Node29 is now used as BIP_Initialization_Call.
5024         (BIP_Initialization_Call): New routine.
5025         (Set_BIP_Initialization_Call): New routine.
5026         (Write_Field29_Name): Add an entry for constants and variables.
5027         * einfo.ads Add new attribute BIP_Initialization_Call and update
5028         its usage in nodes.
5029         (BIP_Initialization_Call): New routine along with pragma Inline.
5030         (Set_BIP_Initialization_Call): New routine along with pragma Inline.
5031         * exp_ch6.adb (Make_Build_In_Place_Call_In_Object_Declaration):
5032         Add local declaration Res_Decl. Capture the build-in-place
5033         initialization call when the related object declaration has
5034         created a transient block.
5035         * exp_ch7.adb (Process_Transient_Objects): Add local variable
5036         Fin_Insrt. Recognize a scenario where an object declaration acts
5037         as a transient context and is initialized by a build-in-place
5038         function call.
5040 2014-02-06  Pascal Obry  <obry@adacore.com>
5042         * prj-util.adb (For_Interface_Sources): Fix handling of required
5043         bodies for aggregate libs.
5045 2014-02-06  Robert Dewar  <dewar@adacore.com>
5047         * nlists.ads: Minor comment clarifications.
5049 2014-02-06  Robert Dewar  <dewar@adacore.com>
5051         * gnat1drv.adb (Adjust_Global_Switches): Set Modify_Tree_For_C
5052         if gnatd.V set.
5053         * opt.ads (Modify_Tree_For_C): New flag.
5054         * output.ads, output.adb (Last_Char): New function.
5056 2014-02-06  Pascal Obry  <obry@adacore.com>
5058         * projects.texi, prj-env.adb (Initialize_Default_Project_Path): Add
5059         share/gpr for cross-builds.
5061 2014-02-06  Robert Dewar  <dewar@adacore.com>
5063         * exp_util.ads, checks.adb, sem_prag.adb, prj-util.adb, sem_ch13.adb:
5064         Minor reformatting and code clean ups.
5066 2014-02-06  Pascal Obry  <obry@adacore.com>
5068         * prj-util.adb (For_Interface_Sources): Skip non compilable languages.
5069         * prj.ads: Minor typo fix in comment.
5071 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5073         * sem_prag.adb (Analyze_Depends_In_Decl_Part): Add
5074         local variable Expr. Flag clauses with extra parenthesis as this
5075         is not allowed by the syntax of the pragma. Code reformatting.
5077 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5079         * exp_attr.adb (Expand_N_Attribute_Reference): Alphabetize
5080         variables. Rename variabme Tnn to Temp. Do not create a temporary
5081         if assertions are disabled. Find enclosing routine _Postconditions
5082         and insert the temporary that captures the value of the prefix
5083         before the routine.
5084         * exp_ch6.adb (Build_Postconditions_Procedure):
5085         Insert the generated _Postconditions routine
5086         before the first source declaration of the related
5087         subprogram.
5088         (Insert_After_Last_Declaration): Removed.
5089         (Insert_Before_First_Source_Declaration): New routine.
5091 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
5093         * exp_util.adb, exp_util.ads (Within_Internal_Subprogram):
5094         Utility to determine whether current expansion is for the body
5095         of a predefined primitive operation.
5096         (Make_Predicate_Check): Use Within_Internal_Subpgram
5097         * checks.adb (Apply_Predicate_Check): Use
5098         Within_Internal_Subprogram
5099         * sem_ch13.adb (Freeze_Entity_Checks): Ditto.
5101 2014-02-06  Pascal Obry  <obry@adacore.com>
5103         * prj.ads, prj-util.adb: Minor reformatting.
5105 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
5107         * exp_ch6.adb (Expand_Subprogram_Contract, Append_Enabled_Item):
5108         Take into account the Split_PPC flag to ensure that conjuncts
5109         in a composite postcondition aspect are tested in source order.
5111 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5113         * sem_ch6.adb (Analyze_Generic_Subprogram_Body): Flag illegal
5114         use of SPARK_Mode.
5115         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration): Flag
5116         illegal use of SPARK_Mode.
5117         (Instantiate_Subprogram_Body): Flag illegal use of SPARK_Mode.
5118         * sem_prag.adb (Analyze_Pragma): Code reformatting.
5119         * sem_util.adb Add with and use clause for Aspects.
5120         (Check_SPARK_Mode_In_Generic): New routine.
5121         * sem_util.ads (Check_SPARK_Mode_In_Generic): New routine.
5123 2014-02-06  Thomas Quinot  <quinot@adacore.com>
5125         * a-calend.adb (Formatting_Operations.Split): Ensure that
5126         Time_Error is raised for invalid time values.
5128 2014-02-06  Arnaud Charlet  <charlet@adacore.com>
5130         * sem_prag.adb (Analyze_Pragma): Rewrite as a null statement
5131         in GNATprove_Mode.
5133 2014-02-06  Robert Dewar  <dewar@adacore.com>
5135         * einfo.ads, einfo.adb (Is_Discriminant_Check_Function): New flag.
5136         * exp_ch3.adb (Build_Dcheck_Function): Set
5137         Is_Discriminant_Check_Function.
5139 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5141         * exp_ch7.adb (Is_Subprogram_Call): Inspect
5142         the original tree in certain cases where a construct has been
5143         factored out and replaced by a reference to a temporary.
5145 2014-02-06  Ed Schonberg  <schonberg@adacore.com>
5147         * sem_ch3.adb (Process_Full_View): Fix typo in the order of
5148         parameters when propagating predicate function to full view.
5149         (Find_Type_Of_Object): Freeze base type of object type to catch
5150         premature use of discriminated private type without a full view.
5152 2014-02-06  Robert Dewar  <dewar@adacore.com>
5154         * sprint.adb: Minor reformatting.
5156 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5158         * exp_ch4.adb (Process_Transient_Object): Add local variable
5159         Temp_Ins. When the transient object is initialized by an
5160         aggregate, the hook must capture the object after the last
5161         component assignment takes place.
5162         * exp_ch7.adb (Detect_Subprogram_Call): Expose the subprogram to
5163         routine Is_Subprogram_Call.
5164         (Is_Subprogram_Call): Inspect an
5165         aggregate that has been heavily expanded for subprogram calls.
5166         (Process_Transient_Objects): Add local variables Expr, Ptr_Id
5167         and Temp_Ins.  Remove the nested declare block and adjust the
5168         indentation. When the transient object is initialized by an
5169         aggregate, the hook must capture the object after the last
5170         component assignment takes place.
5172 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5174         * sem_prag.adb (Analyze_Global_Item): Detect illegal uses of
5175         external states with enabled properties that do not match the
5176         global mode.
5177         (Property_Error): New routine.
5178         * sem_res.adb (Property_Error): New routine.
5179         (Resolve_Actuals): Detect illegal uses of external variables with
5180         enabled properties in procedure calls that do not match the mode of
5181         the corresponding formal parameter.
5183 2014-02-06  Hristian Kirtchev  <kirtchev@adacore.com>
5185         * sem_util.adb (Has_Enabled_Property): Rename
5186         formal parameter Prop_Nam to Property. Update the comment on usage
5187         and all occurrences in the body. Add local variable Prop_Nam. When
5188         inspecting a property with an expression, the property name
5189         appears as the first choice of the component association.
5191 2014-02-04  Robert Dewar  <dewar@adacore.com>
5193         * exp_ch5.adb, einfo.ads, freeze.adb, sem_ch8.adb: Minor reformatting.
5195 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
5197         * sem_aggr.adb: Change "runtime" to "run time" in warning message,
5198         for consistency with other messages.
5200 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
5202         * exp_ch5.adb  (Expand_Iterator_Loop):  For a container element
5203         iterator, indicate that the element is a constant if the container
5204         type does not have a variable indexing aspect.
5205         * sem_ch8.adb (Analyze_Object_Renaming): If the entity is already
5206         marked as constant, do not reset its Ekind, to ensure that
5207         container elements in an element loop are not modified if the
5208         container (e.g. a hashed set) only has a constant indexing aspect.
5210 2014-02-04  Arnaud Charlet  <charlet@adacore.com>
5212         * g-souinf.ads: Subprograms in this unit are actually not pure.
5213         * freeze.adb (Freeze_Subprogram): Do not reset Is_Pure for Intrinsics.
5214         * einfo.ads (Is_Pure): Update doc to match implementation.
5216 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
5218         * exp_ch13.adb: Minor spelling fix.
5220 2014-02-04  Robert Dewar  <dewar@adacore.com>
5222         * opt.ads: Minor comment update.
5224 2014-02-04  Robert Dewar  <dewar@adacore.com>
5226         * exp_ch4.adb (Expand_N_Expression_With_Actions): Use Rewrite
5227         instead of Replace.
5229 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
5231         * sem_aggr.adb (Resolve_Array_Aggregate): Suppress warnings
5232         on null expressions if component type is non-null, when the
5233         corresponding association covers an empty range of index values.
5235 2014-02-04  Robert Dewar  <dewar@adacore.com>
5237         * sinfo.ads: Further comments on N_Expression_With_Actions node.
5239 2014-02-04  Hristian Kirtchev  <kirtchev@adacore.com>
5241         * sem_prag.adb (Analyze_Refined_Depends_In_Decl_Part): Remove global
5242         variables Out_Items and Ref_Global. Remove local constant
5243         Body_Id along with dummy variables D1, D2, D3, D4, D5, D6, D7
5244         and D8. Remove the useless collection of global items as this
5245         was a leftover from an earlier version of the routine. Move
5246         several routines out to avoid deep nesting and indentation.
5247         (Inputs_Match): Add formal parameter Dep_Clause. Rename formal
5248         parameter Do_Checks to Post_Errors. Update the comment on usage.
5249         (Is_Matching_Input): Renamed to Input_Match. Add formal parameters
5250         Ref_Inputs and Do_Checks. Rename formal parameter Do_Checks
5251         to Post_Errors. Update the comment on usage. Account for the
5252         case where a self referential state may have a null input_list.
5253         (Is_Self_Referential): New routine.
5255 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
5257         * sem_ch13.adb (Analyze_Attribute_Definition_Clause): If the
5258         entity renames an expression, as in the case of an object of
5259         an unconstrained type initialized by a function call, defer the
5260         rewriting of the expression to the expander.
5261         * exp_ch13.adb (Expand_N_Attribute_Definition_Clause, case
5262         'Alignment): If the entity renames an expression, introduce
5263         temporary to capture value, and rewrite original declaration to
5264         use temporary.
5266 2014-02-04  Gary Dismukes  <dismukes@adacore.com>
5268         * g-comlin.adb: Minor typo fix.
5270 2014-02-04  Ed Schonberg  <schonberg@adacore.com>
5272         * freeze.adb (Freeze_All): Types derived from a formal
5273         access_to_classwide type do not have a finalization master.
5275 2014-02-04  Robert Dewar  <dewar@adacore.com>
5277         * sprint.adb: Minor reformatting.
5279 2014-02-04  Robert Dewar  <dewar@adacore.com>
5281         * exp_ch4.adb (Expand_N_Expression_With_Actions): Eliminate
5282         cases where Actions is a null list.
5283         * sinfo.ads (N_Expression_With_Actions): Actions can be
5284         temporarily empty during semantic analysis, but must be non-empty
5285         in the final expanded tree.
5287 2014-01-31  Robert Dewar  <dewar@adacore.com>
5289         * exp_ch9.adb: Minor reformatting.
5291 2014-01-31  Emmanuel Briot  <briot@adacore.com>
5293         * g-comlin.adb (Set_Command_Line): Take the switches
5294         configuration from the Command_Line_Config.
5296 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
5298         * sem_prag.adb (Analyze_Refinement_Clause): Guard against a malformed
5299         refinement clause.
5301 2014-01-31  Vincent Celier  <celier@adacore.com>
5303         * projects.texi: Add more documentation about others used as an
5304         index in indexed attributes.
5306 2014-01-31  Robert Dewar  <dewar@adacore.com>
5308         * gnat_ugn.texi: Minor update.
5309         * gnat_rm.texi: Add example to Restriction_Warnings documentation.
5310         * exp_util.adb: Minor reformatting.
5312 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
5314         * exp_ch9.adb (Expand_Entry_Barrier): Warn if the barrier
5315         depends on data that is not private to the protected object,
5316         and potentially modifiable in unsynchronized fashion.
5318 2014-01-31  Yannick Moy  <moy@adacore.com>
5320         * erroutc.adb (Validate_Specific_Warnings): Remove special case for
5321         GNATprove_Mode.
5323 2014-01-31  Robert Dewar  <dewar@adacore.com>
5325         * prj-attr.ads (First_Attribute_Of): Returns Empty_Attribute
5326         for Unknown_Package.
5327         * sem_ch6.adb, sem_attr.adb: Minor comment addition.
5329 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
5331         * exp_util.adb (Build_Allocate_Deallocate_Proc): Rewrite
5332         the logic that generates a runtime check to determine the
5333         controlled status of the object about to be allocated or
5334         deallocated. Class-wide types now always use a runtime check
5335         even if they appear as generic actuals.
5336         (Find_Object): Detect
5337         a special case that involves interface class-wide types because
5338         the object appears as a complex expression.
5340 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
5342         * sem_ch6.adb (Process_Formals): In Ada2012 mode, place
5343         subprogram with an incomplete untagged formals on the list of
5344         private dependents, to verify that the type is properly completed
5345         in the private part.
5346         * sem_attr.adb: Code clean up.
5348 2014-01-31  Robert Dewar  <dewar@adacore.com>
5350         * exp_ch6.adb: Minor reformatting.
5352 2014-01-31  Vincent Celier  <celier@adacore.com>
5354         * prj-attr.adb (First_Attribute_Of): Return Unknown_Attribute
5355         when Pkg is unknown.
5357 2014-01-31  Hristian Kirtchev  <kirtchev@adacore.com>
5359         * sem_res.adb (Resolve_Entity_Name): Comment
5360         reformatting. Allow volatile objects in various generated checks.
5362 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
5364         * sem_attr.adb (Analyze_Attribute, case 'Update): For a record
5365         component association, set the etype of the identifier, for
5366         SPARK use.
5368 2014-01-31  Ed Schonberg  <schonberg@adacore.com>
5370         * exp_ch6.adb (Has_Visibility_Of_Subprogram): If type is not
5371         declared in a package, not checks can apply to the subprogram.
5373 2014-01-31  Robert Dewar  <dewar@adacore.com>
5375         * erroutc.adb (Validate_Specific_Warnings): Warnings are
5376         controlled -gnatw.W.
5377         * gnat_ugn.texi: Document new warnings controlled by -gnatw.w.
5378         * opt.ads (Warn_On_Warnings_Off): Now controls more cases.
5380 2014-01-31  Arnaud Charlet  <charlet@adacore.com>
5382         * exp_disp.adb: Update comments.
5384 2014-01-31  Yannick Moy  <moy@adacore.com>
5386         * sem_ch12.adb (Analyze_Generic_Subprogram_Declaration,
5387         Save_Global_References): Guard access to expression in aspect.
5389 2014-01-31  Yannick Moy  <moy@adacore.com>
5391         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode):
5392         Issue an error when the pragma is applied to a generic unit,
5393         a generic declaration, or inside a generic.
5395 2014-01-31  Yannick Moy  <moy@adacore.com>
5397         * sem_ch8.adb (Analyze_Subprogram_Renaming): Set SPARK_Mode on renaming
5398         entity.
5400 2014-01-31  Robert Dewar  <dewar@adacore.com>
5402         * exp_ch9.adb, s-tassta.adb, s-tposen.adb, s-tposen.ads: Minor
5403         reformatting.
5405 2014-01-31  Tristan Gingold  <gingold@adacore.com>
5407         * exp_disp.adb: Add a historic note.
5409 2014-01-31  Robert Dewar  <dewar@adacore.com>
5411         * sem_warn.adb (Warn_On_Useless_Assignments): Add call to
5412         Process_Deferred_References.
5414 2014-01-31  Yannick Moy  <moy@adacore.com>
5416         * erroutc.adb (Validate_Specific_Warnings): Do not issue a message for
5417         ineffective pragma Warnings(Off) in GNATprove_Mode.
5419 2014-01-31  Bob Duff  <duff@adacore.com>
5421         * s-taskin.ads: Minor comment fix.
5422         * s-tassta.adb (Abort_Dependents): Don't abort all dependents;
5423         just direct dependents. If this is actually an abort, each task
5424         will take care of aborting its dependents, so all dependents will
5425         get aborted, as before. However, when this is called the second
5426         time from Vulnerable_Complete_Master "for convenience" (i.e. to
5427         kill off tasks waiting at terminate alternatives), aborting
5428         indirect dependents is wrong, because it causes some unrelated
5429         tasks to get aborted.
5431 2014-01-31  Robert Dewar  <dewar@adacore.com>
5433         * sem_ch4.adb: Minor reformatting.
5435 2014-01-31  Robert Dewar  <dewar@adacore.com>
5437         * exp_ch2.adb: New calling sequence for Is_LHS.
5438         * frontend.adb: Add call to Process_Deferred_References.
5439         * lib-xref.ads, lib-xref.adb (Process_Deferred_References): New.
5440         (Deferred_References): New table.
5441         * sem_ch8.adb (Find_Direct_Name): Make deferred reference table
5442         entries.
5443         (Find_Expanded_Name): Ditto.
5444         * sem_res.adb: New calling sequence for Is_LHS.
5445         * sem_util.ads, sem_util.adb (Is_LHS): New calling sequence.
5446         * sem_warn.adb: Call Process_Deferred_References before issuing
5447         warnings.
5449 2014-01-31  Tristan Gingold  <gingold@adacore.com>
5451         * exp_util.adb (Corresponding_Runtime_Package): Restrict the
5452         use of System_Tasking_Protected_Objects_Single_Entry.
5453         * exp_ch9.adb (Build_Simple_Entry_Call): Remove Mode parameter
5454         of Protected_Single_Entry_Call.
5455         (Expand_N_Timed_Entry_Call): Remove single_entry case.
5456         * exp_disp.adb (Make_Disp_Asynchronous_Select_Body): Remove
5457         single_entry case.
5458         (Make_Disp_Timed_Select_Body): Likewise.
5459         * rtsfind.ads (RE_Timed_Protected_Single_Entry_Call): Remove.
5460         * s-tposen.adb (Send_Program_Error, PO_Do_Or_Queue): Remove
5461         Self_Id parameter.
5462         (Wakeup_Entry_Caller): Remove Self_ID and New_State parameters.
5463         (Wait_For_Completion_With_Timeout): Remove.
5464         (Protected_Single_Entry_Call): Remove Mode parameter
5465         (always Simple_Call).
5466         (Service_Entry): Remove Self_Id constant (not used anymore).
5467         (Timed_Protected_Single_Entry_Call): Remove.
5468         * s-tposen.ads (Timed_Protected_Single_Entry_Call): Remove.
5469         (Protected_Single_Entry_Call): Remove Mode parameter.
5471 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
5473         * einfo.adb (Get_Pragma): Handle the retrieval of pragma Refined_Post.
5474         * einfo.ads (Get_Pragma): Update the comment on special pragmas
5475         handled by this routine.
5476         * sem_prag.adb (Analyze_Pragma): Add a legal pragma Refined_Post
5477         to the contract of the related subprogram body.
5478         * sem_util.adb (Add_Contract_Item): Handle the insertion of
5479         pragma Refined_Post into the contract of a subprogram body.
5480         * sinfo.ads Update the documentation of node N_Contract.
5481         * sem_res.adb (Resolve_Entity_Name): Add a guard
5482         to detect abstract states and variables only when checking the
5483         SPARK 2014 rules concerning volatile object placement.
5485 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
5487         * sem_ch4.adb (Find_Equality_Types, Try_One_Interp): within an instance,
5488         null is compatible with any access type.
5490 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
5492         * sem_util.adb (Find_Placement_In_State_Space): Assume that the default
5493         placement is not in a package.
5495 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
5497         * sem_util.adb (Has_Enabled_Property): Compare the character field of
5498         the sole property.
5500 2014-01-29  Robert Dewar  <dewar@adacore.com>
5502         * sem_intr.adb, a-ztexio.ads, sinfo.ads, sem_res.adb, gnatlink.adb,
5503         vms_conv.adb, a-except.ads, a-except-2005.ads, a-teioed.adb,
5504         sem_warn.ads, treepr.ads, erroutc.ads, a-excach.adb: Minor reformatting.
5506 2014-01-29  Robert Dewar  <dewar@adacore.com>
5508         * sem_util.ads, sem_util.adb (In_Pragma_Expression): New function.
5509         * sem_warn.adb (Check_References): Suppress warnings if inside
5510         Initial_Condition pragma.
5512 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
5514         * sem_prag.adb (Check_Missing_Part_Of): List all values of
5515         State_Space_Kind for readability reasons. Do not emit an error on
5516         a private item when the enclosing package lacks aspect/pragma
5517         Abstract_State. Do not emit an error on a private package
5518         instantiation when the corresponding generic template lacks
5519         visible state.
5520         (Has_Visible_State): New routine.
5521         * sem_util.adb (Find_Placement_In_State_Space): The visible
5522         declarations of any kind of child units in general act as proper
5523         placement location.
5525 2014-01-29  Robert Dewar  <dewar@adacore.com>
5527         * a-except-2005.adb, a-except.adb, a-excpol-abort.adb, a-exstat.adb,
5528         ali.adb, a-numaux.ads, a-numaux-darwin.ads, a-numaux-libc-x86.ads,
5529         a-numaux-vms.ads, a-numaux-vxworks.ads, a-numaux-x86.ads, aspects.ads,
5530         a-taside.adb, a-teioed.adb, a-textio.adb, a-textio.ads, atree.adb,
5531         atree.ads, a-witeio.adb, a-witeio.ads, a-wtedit.adb, a-ztedit.adb,
5532         a-ztexio.adb, bcheck.adb, binde.adb, checks.adb, comperr.adb,
5533         cstand.adb, debug_a.adb, einfo.ads, errout.adb, erroutc.adb,
5534         eval_fat.adb, exp_aggr.adb, exp_attr.adb, exp_ch11.adb, exp_ch3.adb,
5535         exp_ch4.adb, exp_ch5.adb, exp_ch6.adb, exp_ch9.adb, exp_dbug.adb,
5536         exp_disp.adb, exp_fixd.adb, exp_imgv.adb, exp_intr.adb, exp_util.adb,
5537         freeze.adb, frontend.adb, g-comlin.ads, g-mbdira.adb, gnat1drv.adb,
5538         gprep.adb, g-spipat.adb, i-cpp.ads, i-vxwork.ads, i-vxwork-x86.ads,
5539         krunch.ads, layout.adb, lib-load.adb, lib-writ.adb, lib-writ.ads,
5540         live.adb, namet.ads, osint.adb, osint-c.adb, output.ads, par.adb,
5541         par-ch10.adb, par-ch13.adb, par-ch3.adb, par-ch4.adb, par-ch5.adb,
5542         par-ch6.adb, par-ch9.adb, par-endh.adb, par-labl.adb, par-prag.adb,
5543         par-sync.adb, par-tchk.adb, par-util.adb, prj.adb, repinfo.adb,
5544         rtsfind.adb, s-arit64.adb, s-asthan-vms-alpha.adb,
5545         s-asthan-vms-ia64.adb, s-bignum.adb, scans.adb, scng.adb, s-dimmks.ads,
5546         sem_aggr.adb, sem_attr.adb, sem_aux.adb, sem_cat.adb, sem_ch10.adb,
5547         sem_ch12.adb, sem_ch13.adb, sem_ch13.ads, sem_ch3.adb, sem_ch4.adb,
5548         sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_disp.adb, sem_elab.adb,
5549         sem_elim.adb, sem_eval.adb, sem_intr.adb, sem_prag.adb, sem_res.adb,
5550         sem_type.adb, sem_util.adb, sem_warn.adb, set_targ.adb, s-fatgen.adb,
5551         s-fatgen.ads, s-fileio.adb, s-imgcha.adb, s-imgrea.adb, sinfo.ads,
5552         sinput-c.adb, snames.ads-tmpl, s-os_lib.adb, sprint.adb,
5553         s-regpat.adb, s-secsta.adb, s-stalib.ads,
5554         s-stchop.adb, s-stoele.ads, stand.ads, s-taprop-solaris.adb,
5555         s-tasdeb-vms.adb, s-tasini.adb, s-tassta.adb, s-valdec.adb,
5556         s-valuti.adb, s-wchjis.adb, s-wchwts.adb, system.ads, system-vms_64.ads,
5557         system-vms-ia64.ads, treepr.adb, types.ads, uintp.adb, uname.adb,
5558         urealp.adb, usage.adb, vxaddr2line.adb: Minor reformatting.
5560 2014-01-29  Robert Dewar  <dewar@adacore.com>
5562         * expander.adb: Minor reformatting.
5564 2014-01-29  Javier Miranda  <miranda@adacore.com>
5566         * exp_ch3.adb (Predefined_Primitive_Bodies): Adding documentation to
5567         previous patch.
5569 2014-01-29  Javier Miranda  <miranda@adacore.com>
5571         * exp_ch3.adb (Predefined_Primitive_Bodies): Complete the code
5572         that checks if an interface types defines the predefined "="
5573         function because the compiler was erroneously not generating the
5574         predefined "=" primitive as soon as the name of some interface
5575         primitive is "=" (formals were not checked).
5577 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
5579         * expander.adb (Expander): In GNATprove mode, do not process
5580         transient scopes: they are in general not created in this mode,
5581         and an attempt to examine them will lead to constraint errors when
5582         processing configuration pragmas that have analyzable expressions.
5584 2014-01-29  Vincent Celier  <celier@adacore.com>
5586         * clean.adb (Gnatclean): Fail if main project is an aggregate
5587         project or if there is an aggregate library project in the
5588         project tree.
5589         * gnatcmd.adb: Fail if the main project is an aggregate project
5590         or if there is an aggegate library project in the project tree.
5591         * make.adb (Initialize): : Fail if main project is an aggregate
5592         project or if there is an aggregate library project in the
5593         project tree.
5594         * makeutl.ads (Aggregate_Libraries_In): New Boolean function.
5595         * prj-makr.adb (Initialize): Fail if the main project is an
5596         aggregate project or an aggregate library project.
5598 2014-01-29  Vincent Celier  <celier@adacore.com>
5600         * prj-part.adb (Check_Import_Aggregate): New procedure
5601         to check if an imported project is an aggregate project.
5602         (Parse_Single_Project): Call Check_Import_Aggregate
5603         * projects.texi: Document that aggregate projects cannot be
5604         extended or imported.
5606 2014-01-29  Robert Dewar  <dewar@adacore.com>
5608         * exp_ch9.adb, sem_ch7.ads, s-regexp.adb, sem_ch13.adb: Minor
5609         reformatting and code clean up.
5610         * gnat_ugn.texi: Add documentation section on Atomic Variables
5611         and Optimization.
5613 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
5615         * einfo.adb Flag264 is now unused.
5616         (Has_Body_References): Removed.
5617         (Set_Has_Body_References): Removed.
5618         (Write_Entity_Flags): Remove the output for flag Has_Body_References.
5619         * einfo.ads Update the comment on usage of attribute
5620         Body_References. Remove attribute Has_Body_References and its
5621         usage in nodes.
5622         (Has_Body_References): Removed along with pragma Inline.
5623         (Set_Has_Body_References): Removed along with pragma Inline.
5624         * sem_prag.adb (Analyze_Global_Item): Move the call to
5625         Record_Possible_Body_Reference in the state related checks
5626         section. Add a comment intended function.
5627         (Analyze_Input_Output): Move the call to Record_Possible_Body_Reference
5628         in the state related checks section. Add a comment intended function.
5629         (Analyze_Refinement_Clause): Cleanup the illegal body reference
5630         reporting. Add a comment on timing of error reporting.
5631         (Record_Possible_Body_Reference): Reimplement the routine.
5633 2014-01-29  Vincent Celier  <celier@adacore.com>
5635         * makeutl.adb (Mains.Find_File_Add_Extension): Only look for specs for
5636         unit-based languages.
5637         (Mains.Complete_Mains.Do_Complete): Use the source file project
5638         tree when calling Find_File_Add_Extension. Use the correct
5639         project name when reporting an error.
5641 2014-01-29  Hristian Kirtchev  <kirtchev@adacore.com>
5643         * aspects.adb Add an entry for aspect Part_Of in table
5644         Canonical_Aspect.
5645         * aspects.ads Add an entry for aspect Part_Of in tables Aspect_Id,
5646         Aspect_Argument, Aspect_Names and Aspect_Delay.
5647         * atree.h Define Elist9.
5648         * atree.adb (Elist9): New routine.
5649         (Set_Elist9): New routine.
5650         * atree.ads (Elist9): New routine.
5651         (Set_Elist9): New routine.
5652         * einfo.adb Add Part_Of_Constituents and Encapsulating_State to
5653         the list of node usage.  Remove Refined_State from the list of
5654         node usage.
5655         (Encapsulating_State): New routine.
5656         (Get_Pragma):
5657         Handle pragma Part_Of; (Part_Of_Constituents): New routine.
5658         (Refined_State): Removed.
5659         (Set_Encapsulating_State): New routine.
5660         (Set_Part_Of_Constituents): New routine.
5661         (Set_Refined_State): Removed.
5662         (Write_Field9_Name): Add an entry
5663         for Part_Of_Constituents (Write_Field10_Name): Add an entry for
5664         Encapsulating_State. Remove the entry for Refined_State.
5665         * einfo.ads Add new attributes Encapsulating_State
5666         and Part_Of_Constituents alond with their usage in
5667         entities. Remove attribute Refined_State along with its
5668         usage in entities.
5669         (Encapsulating_State): New routine and
5670         pragma Inline.  (Get_Pragma): Update the comment on usage.
5671         (Part_Of_Constituents): New routine and pragma Inline.
5672         (Refined_State): Removed along with pragma Inline.
5673         (Set_Encapsulating_State): New routine and pragma Inline.
5674         (Set_Part_Of_Constituents): New routine and pragma Inline.
5675         (Set_Refined_State): Removed along with pragma Inline.
5676         * par-prag.adb Pragma Part_Of does not need any special processing
5677         by the parser.
5678         * sem_ch3.adb (Analyze_Declarations): Remove local variables
5679         Body_Id and Prag. Call separate routines to analyze the
5680         contract of a package [body].
5681         (Analyze_Object_Contract):
5682         Update the comment on usage. Remove local variables
5683         Items and Nam. Use Get_Pragma rather than traversing the
5684         classification list.  Verify whether the lack of indicator
5685         Part_Of agrees with the placement of the variable in state space.
5686         (Analyze_Object_Declaration): Initialize the encapsulating state
5687         of a variable.  (Requires_State_Refinement): Moved to sem_util.
5688         * sem_ch7.adb (Analyze_Package_Body_Contract): New routine.
5689         (Analyze_Package_Contract): New routine.
5690         * sem_ch7.ads (Analyze_Package_Body_Contract): New routine.
5691         (Analyze_Package_Contract): New routine.
5692         * sem_ch10.adb (Decorate_State): Initialize the encapsulating
5693         state and Part_Of constituents.
5694         * sem_ch13.adb (Analyze_Aspect_Specifications):
5695         Add processing for aspect Part_Of. Update all
5696         calls to Decorate_Delayed_Aspect_And_Pragma.
5697         (Check_Aspect_At_Freeze_Point): Aspect Part_Of does
5698         not need any special processing at freeze time.
5699         (Decorate_Delayed_Aspect_And_Pragma): Renamed to
5700         Decorate_Aspect_And_Pragma.  Add formal parameter Delayed and
5701         update the associated comment.
5702         * sem_prag.adb Add an entry for pragma Part_Of in table Sig_Flags.
5703         (Analyze_Abstract_State): Add new global variable State_Id. Remove
5704         local constants Errors and Loc. Remove local variables Is_Null
5705         and State_Nam. Create the entity of the abstract state on the
5706         spot, before all remaining checks are performed. Verify that a
5707         missing Part_Of option agrees with the placement of the abstract
5708         state within the state space.
5709         (Analyze_Depends_In_Decl_Part):
5710         Add new global variables Constits_Seen and States_Seen. Check
5711         that a state and a corresponding constituent do not appear
5712         in pragma [Refined_]Depends.
5713         (Analyze_Global_In_Decl_Part):
5714         Add new global variables Constits_Seen and States_Seen. Check
5715         that a state and a corresponding constituent do not appear
5716         in pragma [Refined_]Global.
5717         (Analyze_Global_Item):
5718         Remove the now obsolete code that deals with Part_Of.
5719         Add the entity of the global item to the list of processed
5720         items.  (Analyze_Initializes_In_Decl_Part): Add new global
5721         variables Constits_Seen and States_Seen. Check that a state
5722         and a corresponding constituent do not appear in pragma
5723         Initializes.
5724         (Analyze_Initialization_Item): Add the entity
5725         of the initialization item to the list of processed items.
5726         (Analyze_Input_Item): Add the entity of the initialization
5727         item to the list of processed items.
5728         (Analyze_Input_Output):
5729         Remove the now obsolete code that deals with Part_Of.  Add the
5730         entity of the input/output to the list of processed items.
5731         (Analyze_Part_Of): New routine.
5732         (Analyze_Part_Of_Option): Remove
5733         local constant Par_State. Add local constant Encaps and local
5734         variables Encaps_Id and Legal. Use Analyze_Part of to analyze
5735         the option. Turn the related state into a Part_Of constituent
5736         if the option is legal.
5737         (Analyze_Pragma): Add processing
5738         for pragma Part_Of.
5739         (Analyze_Refined_State_In_Decl_Part):
5740         Remove global constants Pack_Body and Spec_Id. Remove
5741         global variables Abstr_States and Hidden_States. Add new
5742         global variables Available_States, Body_Id, Body_States and
5743         Spec_Id. Add new local constant Body_Decl. Reimplement the
5744         logic that extracts the states available for refinement from
5745         the related package and the body hidden states of the said
5746         package.
5747         (Analyze_Refinement_Clause): Add local variable Part_Of_Constits.
5748         (Check_Applicable_Policy): Alphabetize body.
5749         (Check_Dependency_Clause): Replace Refined_State
5750         with Encapsulating_State.
5751         (Check_Matching_Constituent):
5752         Reimplement the logic that determines whether an item is a valid
5753         / invalid constituent of the current refined state. Return when
5754         a construct does not denote a valid abstract state. Extract the
5755         list of Part_Of constituents for further analysis. Check that all
5756         Part_Of constituents of a state have been used in its refinement.
5757         (Check_Matching_State): Update the comment on usage. Operate
5758         on the list of available states.
5759         (Check_Missing_Part_Of): New routine.
5760         (Check_Refined_Global_Item): Replace Refined_State
5761         with Encapsulating_State.
5762         (Check_State_And_Constituent_Use): New routine.
5763         (Create_Abstract_State): New routine.
5764         (Is_Matching_Input): Replace Refined_State with Encapsulating_State.
5765         (Is_Part_Of): Removed.
5766         (Collect_Body_States): New routine.
5767         (Collect_Constituent): Replace Refined_State with Encapsulating_State.
5768         (Collect_Hidden_States): Removed.
5769         (Report_Unrefined_States): Change the profile of the procedure along
5770         with the comment on usage.
5771         (Report_Unused_Constituents): New routine.
5772         (Report_Unused_Hidden_States): Removed.
5773         (Report_Unused_States): New routine.
5774         * sem_prag.ads (Check_Missing_Part_Of): New routine.
5775         * sem_util.adb (Add_Contract_Item): Pragma Part_Of can now
5776         appear in the classification pragmas of a package instantiation
5777         or a variable.
5778         (Find_Placement_In_State_Space): New routine.
5779         (Is_Child): Removed.
5780         (Is_Child_Or_Sibling): Remove formal
5781         parameter Private_Child. Remove the private child checks.
5782         (Requires_State_Refinement): Moved from sem_ch3.
5783         * sem_util.ads Add new type State_Space_Kind along with
5784         comment on its usage and values.
5785         (Add_Contract_Item): Update the comment on usage.
5786         (Find_Body_Discriminal): Alphabetize spec.
5787         (Find_Placement_In_State_Space): New routine.
5788         (Is_Child_Or_Sibling): Remove formal parameter Private_Child
5789         and update the comment on usage.
5790         (Requires_State_Refinement): Moved from sem_ch3.
5791         * sinfo.ads: Update the documentation of N_Contract.
5792         * snames.ads-tmpl The predefined name for Part_Of is now used
5793         to denote a pragma. Add Pragma_Id for Part_Of.
5795 2014-01-29  Emmanuel Briot  <briot@adacore.com>
5797         * s-regexp.adb (Create_Secondary_Table): Automatically grow the state
5798         machine as needed.
5799         (Dump): New subprogram.
5801 2014-01-29  Tristan Gingold  <gingold@adacore.com>
5803         * exp_ch9.adb (Expand_N_Protected_Type_Declaration): Add
5804         Expand_Entry_Declaration to factorize code.
5806 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
5808         * checks.adb: minor clarification.
5809         * sem_ch7.adb (Declare_Inherited_Private_Subprograms): Limit
5810         search for primitive operations to the entities that immediately
5811         follow the type declaration.
5813 2014-01-29  Tristan Gingold  <gingold@adacore.com>
5815         * exp_ch9.adb (Build_Protected_Entry): Do not call
5816         Complete_Entry_Body anymore.
5817         * rtsfind.ads (RE_Complete_Single_Entry_Body): Remove.
5818         * s-tposen.ads, s-tposen.adb (Complete_Single_Entry_Body): Remove.
5820 2014-01-29  Pierre-Marie Derodat  <derodat@adacore.com>
5822         * s-os_lib.adb, s-os_lib.ads (Normalize_Pathname): Return an empty
5823         string when the Name input bigger than allowed. Adapt the function
5824         specification.
5826 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
5828         * checks.adb (Install_Null_Excluding_Check): Do not emit warning
5829         if expression is within a case_expression of if_expression.
5831 2014-01-29  Robert Dewar  <dewar@adacore.com>
5833         * exp_ch9.adb, inline.ads: Minor reformatting.
5835 2014-01-29  Tristan Gingold  <gingold@adacore.com>
5837         * exp_ch9.adb (Is_Exception_Safe): Return true if no exceptions.
5839 2014-01-29  Yannick Moy  <moy@adacore.com>
5841         * inline.ads (Pending_Body_Info): Add SPARK_Mode and
5842         SPARK_Mode_Pragma components to be able to analyze generic
5843         instance.
5844         * sem_ch12.adb (Analyze_Package_Instantiation,
5845         Inline_Instance_Body, Need_Subprogram_Instance_Body,
5846         Load_Parent_Of_Generic): Pass in SPARK_Mode from instantiation
5847         for future analysis of the instance.
5848         (Instantiate_Package_Body,
5849         Instantiate_Subprogram_Body, Set_Instance_Inv): Set SPARK_Mode
5850         from instantiation to analyze the instance.
5852 2014-01-29  Robert Dewar  <dewar@adacore.com>
5854         * sem_ch7.adb, sem_prag.adb, sem_ch4.adb, sem_ch6.adb: Minor code
5855         reorganization.
5857 2014-01-29  Yannick Moy  <moy@adacore.com>
5859         * gnat_rm.texi: Update description of SPARK_Mode pragma.
5861 2014-01-29  Tristan Gingold  <gingold@adacore.com>
5863         * exp_ch9.adb (Expand_N_Protected_Body): Remove Num_Entries.
5865 2014-01-29  Thomas Quinot  <quinot@adacore.com>
5867         * sem_ch4.adb (Find_Component_In_Instance): Update comment.
5869 2014-01-29  Ed Schonberg  <schonberg@adacore.com>
5871         * exp_util.adb (Build_Task_Image_Prefix): Indicate that the
5872         resulting string is an internal entity. and thus requires no
5873         initialization. This is relevant when Initialize_ Scalars is
5874         enabled, because the resultant spurious initialization may lead to
5875         secondary stack anomalies that produce a mangled name for a task.
5877 2014-01-29  Yannick Moy  <moy@adacore.com>
5879         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode
5880         not inherited from spec anymore. Check consistency
5881         rules after processing of declarations.
5882         * sem_ch7.adb (Analyze_Package_Body_Helper): SPARK_Mode not inherited
5883         from spec anymore. Check consistency rules after processing of
5884         declarations.
5885         (Analyze_Package_Declaration): Set SPARK_Mode only for non-generic
5886         packages.
5887         * sem_prag.adb (Analyze_Pragma/Pragma_SPARK_Mode): Implement new
5888         consistency rules.
5890 2014-01-27  Robert Dewar  <dewar@adacore.com>
5892         * sem_res.adb (Resolve_Comparison_Op): Add type name/location
5893         to unordered msg.
5894         (Resolve_Range): Add type name/location to unordered msg.
5896 2014-01-27  Claire Dross  <dross@adacore.com>
5898         * a-cofove.adb/s (Copy): Add precondition so that Copy (Source,
5899         Capacity) is only called with Capacity >= Length (Source) and
5900         Capacity in Capacity_Range.
5901         * a-cfdlli.adb/s, a-cfhase.adb/s, a-cfhama.adb/s, a-cforse.adb/s,
5902         a-cforma.adb/s (Copy): Add precondition so that Copy (Source, Capacity)
5903         is only called with Capacity >= Source.Capacity. Raise Capacity_Error
5904         in the code is this is not the case.
5906 2014-01-27  Thomas Quinot  <quinot@adacore.com>
5908         * sem_ch4.adb (Analyze_Selected_Component): Fix handling of
5909         selected component in an instance where the component of the
5910         actual is not visibile at instantiation.
5912 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
5914         * sem_ch6.adb: sem_ch6.adb (Set_Actual_Subtypes): If the type
5915         has a dynamic predicate, generate freeze node for Actual_Subtype
5916         at once, because the declaration of the corresponding predicate
5917         function will make reference to it.
5919 2014-01-27  Tristan Gingold  <gingold@adacore.com>
5921         * exp_ch7.adb, exp_ch9.adb: Adjust comments.
5923 2014-01-27  Robert Dewar  <dewar@adacore.com>
5925         * exp_ch4.adb (Expand_N_Op_Expon): Remove unsigned type test
5926         for 2**X optimization.
5928 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
5930         * a-suenst.adb: strings.utf_encoding.strings (Decode): Check
5931         explicitly whether value is in range of Character, because the
5932         library is typically compiled with range checks disabled, and
5933         we cannot rely on the implicit check on the argument of 'Val.
5935 2014-01-27  Vincent Celier  <celier@adacore.com>
5937         * a-ciorma.adb, a-cihama.adb (Assign): Copy the Source to the Target,
5938         not the Target to itself.
5940 2014-01-27  Robert Dewar  <dewar@adacore.com>
5942         * vms_conv.ads, ali.adb, sem_ch6.ads, opt.ads, vms_cmds.ads: Minor
5943         changes to avoid incorrect use of unordered enum types.
5945 2014-01-27  Thomas Quinot  <quinot@adacore.com>
5947         * sem_ch4.adb: Minor reformatting.
5949 2014-01-27  Robert Dewar  <dewar@adacore.com>
5951         * scn.adb (Check_End_Of_Line): Removed.
5952         (Error_Long_Line): Removed.
5953         (Determine_License): Use versions of above routines from Scanner.
5954         * scng.adb (Check_End_Of_Line): Moved to spec.
5955         (Error_Long_Line): Removed, no longer used.
5956         * scng.ads (Check_End_Of_Line): Moved here from body.
5958 2014-01-27  Tristan Gingold  <gingold@adacore.com>
5960         * exp_ch7.adb (Build_Cleanup_Statements): Call
5961         Build_Protected_Subprogram_Call_Cleanup to insert the cleanup
5962         for protected body.
5963         * exp_ch9.adb (Build_Protected_Subprogram_Body): Likewise.
5964          Remove Service_Name variable.
5965         (Build_Protected_SUbprogam_Call_Cleanup): New procedure that
5966         factorize code from the above subprograms.
5967         * exp_ch9.ads (Build_Protected_Subprogram_Call_Cleanup): New procedure.
5969 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
5971         * einfo.adb (Has_Option): Reimplemented.
5972         * sem_prag.adb (Analyze_Refinement_Clause): Add global
5973         variables AR_Constit, AW_Constit, ER_Constit, EW_Constit,
5974         External_Constit_Seen and State. Add local variables Body_Ref,
5975         Body_Ref_Elmt and Extra_State. Reimplement part of the logic to
5976         avoid a cumbersome while pool. Verify the legality of an external
5977         state and relevant properties.
5978         (Check_External_Property): New routine.
5979         (Check_Matching_State): Remove parameter profile
5980         and update comment on usage.
5981         (Collect_Constituent): Store the
5982         relevant external property of a constituent.
5983         * sem_util.adb (Async_Readers_Enabled): Update the call to
5984         Has_Enabled_Property.
5985         (Async_Writers_Enabled): Update the call to Has_Enabled_Property.
5986         (Effective_Reads_Enabled): Update the call to Has_Enabled_Property.
5987         (Effective_Writes_Enabled): Update the call to Has_Enabled_Property.
5988         (Has_Enabled_Property): Rename formal parameter Extern to State_Id.
5989         Update comment on usage. Reimplement the logic to recognize the various
5990         formats of properties.
5992 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
5994         * par-ch5.adb: Minor reformatting.
5996 2014-01-27  Tristan Gingold  <gingold@adacore.com>
5998         * s-tposen.ads: Harmonize style and comments.
6000 2014-01-27  Vincent Celier  <celier@adacore.com>
6002         * projects.texi: Document that shared library projects, by
6003         default, cannot import projects that are not shared library
6004         projects.
6006 2014-01-27  Robert Dewar  <dewar@adacore.com>
6008         * sem_ch8.adb (Find_Selected_Component): Use Replace instead
6009         of Rewrite.
6011 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6013         * a-suenco.adb, a-suenst.adb (Decode): Raise encoding error if
6014         any other exception is raised.
6015         (Convert): If both Input_Scheme and Output_Scheme are UTF_8 it is
6016         still necessary to perform a conversion in order to remove overlong
6017         encodings.
6019 2014-01-27  Robert Dewar  <dewar@adacore.com>
6021         * exp_smem.adb: Minor reformatting.
6023 2014-01-27  Thomas Quinot  <quinot@adacore.com>
6025         * a-calfor.ads: Fix incorrect reference to operator "-" in comment.
6027 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6029         * sem_res.adb (Make_Call_Into_Operator): In ASIS mode, relocate
6030         nodes for operands to the original node for the call, to preserve
6031         Original_Node pointers within the resolved operands, given that
6032         they may have been rewritten as well. Previous approach copied
6033         the operands into a new tree and lost those pointers.
6035 2014-01-27  Claire Dross  <dross@adacore.com>
6038         * a-cofove.adb, a-cofove.ads: Add Strict_Equal function to the API.
6040 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6042         * sem_util.adb (Check_Internal_Protected_Use): A call through
6043         an anonymous access parameter of the current protected function
6044         is not a potential modification of the current object.
6046 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6048         * a-cobove.adb (Reserve_Capacity): Procedure raises
6049         Capacity_Error, not Constraint_Error, when request cannot be
6050         satisfied.
6052 2014-01-27  Vincent Celier  <celier@adacore.com>
6054         * a-coorma.adb, a-cohama.adb (Assign): Copy the Source to the Target,
6055         not the Target to itself.
6057 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6059         * exp_ch4.adb (Expand_Concatenate): If the target of the
6060         concatenation is a library-level entity, always use the off-line
6061         version of concatenation, regardless of optimization level. This
6062         is space-efficient, and prevents linking problems when some
6063         units are compiled with different optimization levels.
6065 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6067         * sem_ch5.adb: Code clean up.
6069 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6071         * par-ch5.adb (P_Iterator_Specification): Improve error recovery
6072         when an array or container iterator includes a subtype indication,
6073         which is only legal in an element iterator.
6075 2014-01-27  Thomas Quinot  <quinot@adacore.com>
6077         * exp_ch7.adb: Minor reformatting.
6079 2014-01-27  Robert Dewar  <dewar@adacore.com>
6081         * opt.adb (SPARK_Mode): Default for library units is None rather
6082         than Off.
6083         * opt.ads: Remove AUTO from SPARK_Mode_Type SPARK_Mode_Type is
6084         no longer ordered.
6085         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Remove AUTO
6086         possibility.
6087         * snames.ads-tmpl (Name_Auto): Removed, no longer used.
6089 2014-01-27  Robert Dewar  <dewar@adacore.com>
6091         * par-ch5.adb (P_Sequence_Of_Statements): Make entry in
6092         Suspicious_Labels table if we have identifier; followed by loop
6093         or block.
6094         * par-endh.adb (Evaluate_End_Entry): Search Suspicious_Labels table.
6095         * par.adb (Suspicious_Labels): New table.
6097 2014-01-27  Robert Dewar  <dewar@adacore.com>
6099         * exp_aggr.adb (Check_Bounds): Reason is range check, not
6100         length check.
6102 2014-01-27  Yannick Moy  <moy@adacore.com>
6104         * get_spark_xrefs.adb (Get_SPARK_Xrefs): Accept new type 'c' for
6105         reference.
6106         * lib-xref-spark_specific.adb (Is_Global_Constant): Remove useless
6107         function now.
6108         (Add_SPARK_Xrefs): Include references to constants.
6109         * spark_xrefs.ads Document new character 'c' for references to
6110         constants.
6112 2014-01-27  Thomas Quinot  <quinot@adacore.com>
6114         * exp_smem.adb (Add_Write_After): For a function call, insert write as
6115         an after action in a transient scope.
6117 2014-01-27  Thomas Quinot  <quinot@adacore.com>
6119         * exp_smem.adb (Expand_Shared_Passive_Variable): For a reference
6120         to a shared variable as an OUT formal in a call to an init proc,
6121         the 'Read call must be emitted after, not before, the call.
6123 2014-01-27  Robert Dewar  <dewar@adacore.com>
6125         * gnat_rm.texi: Remove mention of AUTO mode for SPARK_Mode pragma.
6127 2014-01-27  Robert Dewar  <dewar@adacore.com>
6129         * a-wichha.adb (Character_Set_Version): Change to output proper
6130         value.
6132 2014-01-27  Hristian Kirtchev  <kirtchev@adacore.com>
6134         * einfo.adb (Is_Input_Only_State): Removed.
6135         (Is_Non_Volatile_State): Removed.
6136         (Is_Output_State): Removed.
6137         * einfo.ads (Is_Input_Only_State): Remove attribute and
6138         subprogram. Update related entity.
6139         (Is_Non_Volatile_State):
6140         Remove attribute and subprogram. Update related entity.
6141         (Is_Output_State): Removed attribute and subprogram. Update
6142         related entity.
6143         * exp_ch6.adb (Expand_Subprogram_Contract): Update comment on
6144         generated code.
6145         * sem_ch3.adb (Analyze_Declarations): Analyze the contract of
6146         an object, not just variables.
6147         (Analyze_Object_Contract): New routine.
6148         (Analyze_Variable_Contract): Removed.
6149         (Process_Discriminants): Detect an illegal use of volatile
6150         discriminant in SPARK mode.
6151         * sem_ch5.adb (Analyze_Iterator_Specification):
6152         Detect an illegal use of volatile loop variable.
6153         (Analyze_Loop_Parameter_Specification): Detect an illegal use
6154         of volatile loop variable.
6155         * sem_ch6.adb (Process_Formals): Update the volatile object
6156         detection. Detect an illegal formal of mode IN OUT or OUT in
6157         SPARK mode. Enhance the error messages with references.
6158         * sem_ch12.adb (Instantiate_Object): Update the volatile object
6159         detection. Enhance the error messages with references.
6160         * sem_prag.adb (Analyze_Abstract_State): Enhance the error
6161         messages with references.
6162         (Analyze_Contract_Case): Enhance the error messages with references.
6163         (Analyze_External_Property): Call Check_Duplicate_Property to process
6164         an external property.
6165         (Analyze_External_Property_In_Decl_Part): New routine.
6166         (Analyze_External_State_In_Decl_Part): Removed.
6167         (Analyze_Global_Item): Detect an illegal
6168         use of a volatile constant. Detect an illegal use
6169         of a variable with enabled Effective_Reads. Enhance
6170         the error messages with references. Remove obsolete
6171         checks concerning Input_Only and Output_Only states.
6172         (Analyze_Initialization_Item): Enhance the error messages
6173         with references.
6174         (Analyze_Initializes_In_Decl_Part): Do not
6175         collect the states and variables when the initialization list
6176         is null.
6177         (Analyze_Input_Item): Enhance the error messages with references.
6178         (Analyze_Input_Output): Enhance the error messages with references.
6179         (Analyze_Pragma): Enhance the error messages with references.
6180         (Analyze_Refinement_Clause): Code reformatting.
6181         (Analyze_Refined_Depends_In_Decl_Part):
6182         Rename global variable Global to Reg_Global and update all
6183         occurrences. Add local variables D7 and D8. Update the error
6184         messages with references. Update the call to Collect_Global_Items.
6185         (Analyze_Refined_Global_In_Decl_Part): Add local variables
6186         Has_Proof_In_State, Proof_In_Constits and Proof_In_Items. Update
6187         the call to Collect_Global_Items.  Account for a Proof_In state
6188         in null / useless refinement checks. Verify the coverage of
6189         Proof_In states.
6190         (Check_Dependency_Clause): Remove local variable
6191         Out_Constits. Remove the retrieval and removal of constituents
6192         for an Output_Only state. Remove the reporting of unused
6193         Output_Only state constituents.
6194         (Check_Duplicate_Mode): Enhance
6195         the error message with a reference.
6196         (Check_Duplicate_Property): New routine.
6197         (Check_Duplicate_Option): Enhance the error message with a reference.
6198         (Check_External_Properties): Enhance the error message with a reference.
6199         (Check_Function_Return): Enhance the error message with a reference.
6200         (Check_In_Out_States): Update
6201         comment on usage. Add a specialized error message for Proof_In
6202         constituents. Enhance the error message with a reference.
6203         (Check_Input_States): Update comment on usage. Account for
6204         possible Proof_In constituents. Enhance the error message
6205         with a areference.
6206         (Check_Matching_Constituent): Enhance the error message with a
6207         reference.
6208         (Check_Matching_State): Enchance the error message with a reference.
6209         (Check_Mode): Add local variable From_Global. Update the call to
6210         Find_Mode.  Emit more precise error messages concerning extra items
6211         (Check_Mode_Restriction_In_Enclosing_Context): Consider
6212         pragma Refined_Global.  Enhance the error message with a
6213         reference.
6214         (Check_Mode_Restriction_In_Function): Enhance the error message with
6215         a reference.
6216         (Check_Output_States): Update comment on usage. Add local variable
6217         Posted.  Account for possible Proof_In constituents. Produce a detailed
6218         list of missing constituents.
6219         (Check_Proof_In_States): New routine.
6220         (Check_Refined_Global_Item): Handle Proof_In
6221         constituents. Enchance the error message with a reference.
6222         (Collect_Global_Items): Add formal parameters Proof_In_Items
6223         and Has_Proof_In_State. Update the comment on usage. Account
6224         for Proof_In items.
6225         (Create_Or_Modify_Clause): Enchance
6226         the error message with a reference.
6227         (Find_Mode): Add
6228         formal parameter From_Global. Update the comment on usage.
6229         Detect when the mode is governed by pragma [Refined_]Global.
6230         (Output_Constituents): Removed.
6231         (Report_Extra_Constituents):
6232         Report extra Proof_In constituents.
6233         (Report_Unused_Constituents): Removed.
6234         (Usage_Error): Code reformatting. Enhance the error
6235         messages with reference.
6236         * sem_prag.ads (Analyze_External_Property_In_Decl_Part): New routine.
6237         (Analyze_External_State_In_Decl_Part): Removed.
6238         * sem_res.adb (Resolve_Actuals): Update the volatile object
6239         detection. Enhance the error message with a reference.
6240         (Resolve_Entity_Name): Update the volatile object
6241         detection. Enhance the error message with a reference.
6242         * sem_util.adb (Is_Refined_State): Add a guard to avoid a crash.
6243         (Is_SPARK_Volatile_Object): New routine.
6244         (Has_Volatile_Component): New routine.
6245         * sem_util.ads (Is_Delegate): Alphabetized.
6246         (Is_SPARK_Volatile_Object): New routine.
6247         (Has_Volatile_Component): New routine.
6248         * snames.ads-tmpl: Remove names Name_Input_Only and Name_Output_Only.
6250 2014-01-27  Ed Schonberg  <schonberg@adacore.com>
6252         * sem_attr.adb: Resolve fully prefix of 'Update.
6254 2014-01-27  Ben Brosgol  <brosgol@adacore.com>
6256         * gnat_rm.texi: Minor clarifications.
6258 2014-01-27  Robert Dewar  <dewar@adacore.com>
6260         * sem_elab.adb (Check_Internal_Call_Continue): Avoid complaining
6261         about call that is generated as part of an Initial_Condition
6262         check.
6263         * sem_prag.adb: Minor spelling correction.
6265 2014-01-27  Robert Dewar  <dewar@adacore.com>
6267         * sem_prag.adb (Set_Convention_From_Pragma): Check that
6268         convention Ghost can only apply to functions.
6269         * einfo.ads, einfo.adb (Is_Ghost_Subprogram): Add clarifying comment.
6271 2014-01-27  Robert Dewar  <dewar@adacore.com>
6273         * gnat_ugn.texi: Add Short_Enums to documentation of
6274         -gnatet/-gnateT.
6276 2014-01-27  Robert Dewar  <dewar@adacore.com>
6278         * sem_prag.adb (Analyze_Input_Item): Correct check for input
6279         item in same package.
6280         * sem_util.ads, sem_util.adb (Within_Scope): New function.
6282 2014-01-26  Arnaud Charlet  <charlet@adacore.com>
6284         * a-intnam-lynxos.ads, mlib-tgt-specific-lynxos.adb,
6285         s-osinte-lynxos-3.adb, s-osinte-lynxos-3.ads, s-osinte-lynxos.adb,
6286         s-osinte-lynxos.ads, s-taprop-lynxos.adb, s-tpopsp-lynxos.adb,
6287         system-lynxos-ppc.ads, system-lynxos-x86.ads: Removed, no longer
6288         maintained.
6290 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
6292         * gcc-interface/Makefile.in: Fix oversight.
6294 2014-01-25  Eric Botcazou  <ebotcazou@adacore.com>
6296         * gcc-interface/utils.c (convert_to_fat_pointer): Un-obfuscate the
6297         conversion from a thin pointer with a shifted value.
6298         * gcc-interface/utils2.c (gnat_build_constructor): Propagate the
6299         read-only flag from the values onto the result.
6300         (gnat_invariant_expr): Accept read-only CONSTRUCTORs.
6302 2014-01-25  Tristan Gingold  <gingold@adacore.com>
6304         * gcc-interface/decl.c (gnat_to_gnu_entity): Always build a variable
6305         for E_Variable with a pragma Linker_Section.
6307 2014-01-25  Robert Dewar  <dewar@adacore.com>
6309         * gcc-interface/decl.c (gnat_to_gnu_param): Make sure an Out parameter
6310         with Default_Value aspect is passed in by copy.
6312 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
6314         * set_targ.adb: Set Short_Enums.
6315         * gcc-interface/lang.opt (fshort-enums): New option.
6316         * gcc-interface/misc.c (gnat_handle_option): Handle it.
6317         (gnat_post_options): Do not modify the global settings.
6319 2014-01-24  Robert Dewar  <dewar@adacore.com>
6321         * g-rannum.ads, g-rannum.adb (Random_Ordinary_Fixed): New generic
6322         function.
6323         (Random_Decimal_Fixed): New generic function.
6324         * s-rannum.ads: Minor comment clarifications.
6326 2014-01-24  Robert Dewar  <dewar@adacore.com>
6328         * back_end.adb: Remove Short_Enums handling (handled in
6329         Ttypes/Get_Targ now) Minor added comments.
6330         * freeze.adb: Change name Short_Enums_On_Target to
6331         Target_Short_Enums.
6332         * get_targ.ads, get_targ.adb (Get_Short_Enums): New function.
6333         * opt.ads: Minor comment updates.
6334         * sem_ch13.adb: Change name Short_Enums_On_Target to
6335         Target_Short_Enums.
6336         * set_targ.adb: Set Short_Enums from gcc back end.
6337         * set_targ.ads (Short_Enums): New variable.
6338         * targparm.ads, targparm.adb: Remove Short_Enums entries (handled in
6339         Ttypes/Get_Targ now).
6340         * ttypes.ads (Target_Short_Enums): New constant boolean switch
6342 2014-01-24  Pascal Obry  <obry@adacore.com>
6344         * g-sercom-mingw.adb: Fix serial port name for port number > 10.
6346 2014-01-24  Gary Dismukes  <dismukes@adacore.com>
6348         * exp_disp.adb (Expand_Dispatching_Call): Call Unqualify on Param when
6349         comparing it with Ctrl_Arg, since Ctrl_Arg may have had qualification
6350         stripped off.
6352 2014-01-24  Robert Dewar  <dewar@adacore.com>
6354         * sinfo.ads, make.adb, prj-env.adb: Minor reformatting.
6356 2014-01-24  Vincent Celier  <celier@adacore.com>
6358         * prj.adb (Add_Aggregated_Project): Do not add a project in
6359         the list if it is already there.
6361 2014-01-24  Yannick Moy  <moy@adacore.com>
6363         * lib-xref-spark_specific.adb (Enclosing_Subprogram_Or_Package):
6364         Correct the search for a subrogram declaration to which a pragma is
6365         attached.
6367 2014-01-24  Bob Duff  <duff@adacore.com>
6369         * gnat_ugn.texi: Document --decimal-grouping and
6370         --based-grouping switches in gnatpp.
6372 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6374         * sinfo.ads: Documentation update.
6376 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6378         * sem_ch3.adb (Constant_Redeclaration): New declaration is
6379         illegal if previous one has an initial expression that is an
6380         aggregate expanded into assignments.
6382 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6384         * sem_ch5.adb (Analyze_Loop_Parameter_Specification): Small
6385         code reorganization to remove spurious warning on a loop with
6386         an array element iterator that has a null range.
6388 2014-01-24  Vincent Celier  <celier@adacore.com>
6390         * make.adb (Binding_Phase): When setting the Ada paths, use
6391         the library ALI dir, not the object dir in libraries.
6393 2014-01-24  Yannick Moy  <moy@adacore.com>
6395         * sinfo.ads: Add documentation of check flag fields.
6397 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6399         * sem_res.adb (Resolve_Actuals): If an actual is a view
6400         conversion of a discriminated object, and the formal type is
6401         discriminated and constrained, apply a discriminant check to
6402         the object itself.
6404 2014-01-24  Robert Dewar  <dewar@adacore.com>
6406         * prj.adb, prj-env.adb, back_end.adb: Add comment, minor code clean ups.
6408 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6410         * sem_ch3.adb (Analyze_Declarations): At the end of an
6411         appropriate declarative part, call Freeze_All from the first
6412         declaration in the scope, not from the first unfrozen one. This
6413         is necessary to apply visibility checks to entities with delayed
6414         aspects. Otherwise, in the presence of instantiations and cleanups
6415         that they may generate, the delayed aspects may be analyzed too
6416         late and produce spurious visibility errors.
6417         * sem_attr.adb: Place etype on range.
6418         * sem_ch6.adb: Documentation expression functions.
6420 2014-01-24  Robert Dewar  <dewar@adacore.com>
6422         * exp_ch7.adb: Minor change of Indices to Indexes (preferred
6423         terminology in compiler).
6425 2014-01-24  Robert Dewar  <dewar@adacore.com>
6427         * scans.ads: Remove Tok_Raise from Sterm, Eterm, After_SM
6428         categories, now that Ada 95 supports raise expressions.
6430 2014-01-24  Robert Dewar  <dewar@adacore.com>
6432         * freeze.adb (Freeze_Enumeration_Type): Use new target parameter
6433         Short_Enums_On_Target.
6434         * sem_ch13.adb (Set_Enum_Esize): Take Short_Enums_On_Target
6435         into account.
6436         * targparm.ads, targparm.adb: Add new target parameter Short_Enums.
6438 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6440         * sem_ch5.adb (Analyze_Iterator_Specification): If subtype
6441         indication is given explicity, check that it matches the array
6442         component type or the container element type of the domain
6443         of iteration.
6445 2014-01-24  Tristan Gingold  <gingold@adacore.com>
6447         * back_end.adb (Scan_Compiler_Arguments): Set Short_Enums_On_Target.
6448         * gcc-interface/misc.c (flag_short_enums): Declare.
6449         (gnat_post_options): Set it.
6451 2014-01-24  Vincent Celier  <celier@adacore.com>
6453         * prj-env.adb (Ada_Objects_Path): Use Ada_Objects_Path_No_Libs
6454         to cache the result when Including_Libraries is False.
6455         * prj-env.ads (Ada_Objects_Path): Update documentation
6456         * prj.adb (Free (Project_Id)): Also free Ada_Objects_Path_No_Libs
6457         (Get_Object_Directory): Return the Library_Ali_Dir only when
6458         when Including_Libraries is True.
6459         * prj.ads (Get_Object_Directory): Fix and complete documentation
6460         (Project_Data): New component Ada_Objects_Path_No_Libs
6462 2014-01-24  Robert Dewar  <dewar@adacore.com>
6464         * checks.adb (Expr_Known_Valid): Result of fpt operator never
6465         considered valid.
6467 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
6469         * back_end.adb: Minor fix in comment.
6471 2014-01-24  Javier Miranda  <miranda@adacore.com>
6473         * sem_ch3.adb (Check_Abstract_Overriding): Code reestructuration
6474         required to report the error in case of task types.
6476 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6478         * sem_attr.adb: Additional index checking.
6480 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6482         * sem_attr.adb (Analyze_Attribute, case 'Update): Analyze
6483         expressions in each component association, and for records note
6484         the entity in each association choice, for subsequent resolution.
6485         (Resolve_Attribute, case 'Update): Complete resolution of
6486         expressions in each component association.
6488 2014-01-24  Robert Dewar  <dewar@adacore.com>
6490         * sem.adb (Sem): Avoid premature reference to Current_Sem_Unit
6491         (this was causing Is_Main_Unit_Or_Main_Unit_Spec to be set wrong,
6492         leading to wrong handling of SPARK_Mode for library units).
6494 2014-01-24  Robert Dewar  <dewar@adacore.com>
6496         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Set SPARK_Mode
6497         on generic instances (do not consider them to be internally
6498         generated)
6500 2014-01-24  Doug Rupp  <rupp@adacore.com>
6502         * s-osinte-android.ads (pthread_sigmask): Import sigprocmask
6503         vice pthread_sigmask.
6505 2014-01-24  Vincent Celier  <celier@adacore.com>
6507         * prj.adb (Debug_Output (Str, Str2)): Output if verbosity is
6508         not default.
6510 2014-01-24  Vincent Celier  <celier@adacore.com>
6512         * prj-ext.adb (Add): Do not output anything when Silent is True,
6513         whatever the verbosity. When Source is From_External_Attribute,
6514         set the corresponding environment variable if it is not already set.
6515         * prj-ext.ads (Add): New Boolean parameter Silent, defaulted
6516         to False
6517         * prj-proc.adb (Process_Expression_For_Associative_Array):
6518         For attribute External, call Prj.Ext.Add with Silent set to
6519         True for the child environment, to avoid useless output in non
6520         default verbosity.
6522 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6524         * sem_res.adb (Set_Slice_Subtype): Handle properly a discrete
6525         range given by a subtype indication, and force evaluation of
6526         the bounds, as for a simple range.
6527         * exp_util.adb (Evaluate_Slice_Bounds): Utility to force evaluation
6528         of bounds of slice for various kinds of discrete ranges.
6529         (Evaluate_Name, Evaluate_Subtype_From_Expr): use
6530         Evaluate_Slice_Bounds.
6532 2014-01-24  Bob Duff  <duff@adacore.com>
6534         * s-taskin.ads (Activator): Make this Atomic, because
6535         Activation_Is_Complete reads it, and that can be called
6536         from any task. Previously, this component was only
6537         modified by the activator before activation, and by
6538         Self after activation.
6539         * a-taside.ads, a-taside.adb (Environment_Task,
6540         Activation_Is_Complete): Implement these missing functions.
6542 2014-01-24  Doug Rupp  <rupp@adacore.com>
6544         * init.c: Add a handler section for Android.
6546 2014-01-24  Arnaud Charlet  <charlet@adacore.com>
6548         * i-cexten.ads (Unsigned_33..64, Unsigned_33..64): New types.
6550 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6552         * sem_ch4.adb (Operator_Check): If one operand is a
6553         Raise_Expression, set its type to that of the other operand.
6554         * sem_res.adb (Resolve_Raise_Expression): new procedure.
6555         (Resolve_Actuals): For an actual that is a Raise_Expression,
6556         set the type to that of the formal.
6557         * sem_type.adb (Find_Unique_Type): If one of the operands is a
6558         Raise_Expression, return type of the other operand.
6560 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6562         * sem_aggr.adb (Resolve_Record_Aggregate): If a scalar
6563         component of the record has a type with a default aspect, and
6564         the corresponding aggregate component is initiaized with a box,
6565         use the default value in the rewritten aggregate.
6567 2014-01-24  Tristan Gingold  <gingold@adacore.com>
6569         * s-interr.ads, s-interr.adb, s-interr-hwint.adb, s-interr-vms.adb,
6570         s-interr-sigaction.adb,
6571         s-interr-dummy.adb (Install_Restricted_Handlers): Add Prio parameter.
6572         * exp_ch9.adb (Make_Initialize_Protection): Add Prio parameter
6573         to the call to Install_Restricted_Handlers.
6575 2014-01-24  Emmanuel Briot  <briot@adacore.com>
6577         * prj-nmsc.adb (Check_File): Add protection when the source is
6578         not fully initialized.
6580 2014-01-24  Ed Schonberg  <schonberg@adacore.com>
6582         * sem_util.adb (Is_Post_State): In a postcondition, a selected
6583         component that denotes an implicit dereference is a reference
6584         to the post state of the subprogram.
6586 2014-01-24  Robert Dewar  <dewar@adacore.com>
6588         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): SPARK_Mode OFF
6589         for generated subprograms.
6590         (Analyze_Subprogram_Specification): Ditto.
6592 2014-01-24  Vincent Celier  <celier@adacore.com>
6594         * prj-dect.adb (Check_Attribute_Allowed): Detect more forbidden
6595         attributes in package Builder of aggregate and aggregate library
6596         projects.
6597         * prj-nmsc.adb (Process_Naming_Scheme.Check.Check_Aggregate):
6598         Remove procedure (Process_Naming_Scheme.Check.Check_Aggregated):
6599         Remove parameters.  Change error message from "... externally
6600         build library ..." to "... externally built project ...".
6601         (Process_Naming_Scheme.Check): Do not do any check in aggregate
6602         project, as attribute Library_Dir and Library_Name have already
6603         been detected as forbidden.
6605 2014-01-24  Vincent Celier  <celier@adacore.com>
6607         * prj-env.adb (Find_Project): If cached project path is not in
6608         project directory, look in current directory first and use cached
6609         project path only if project is not found in project directory.
6611 2014-01-24  Robert Dewar  <dewar@adacore.com>
6613         * sem_util.adb, lib-xref.adb: Correct false positive warnings.
6615 2014-01-24  Vincent Celier  <celier@adacore.com>
6617         * projects.texi: Document that aggregate projects are only
6618         supported by gprbuild, but not by gnatmake.  Document that the
6619         only attribute Switches in package Binder of aggregate projects
6620         will be ignored if its index is not others.  Document that
6621         attribute Global_Config_File is allowed in package Binder of
6622         aggregate projects.
6624 2014-01-24  Robert Dewar  <dewar@adacore.com>
6626         * sem_prag.adb: Minor code reorganization.
6627         * sem_util.adb: Minor fix of potential latent bug in Is_LHS.
6629 2014-01-24  Pascal Obry  <obry@adacore.com>
6631         * prj-attr.adb, projects.texi, snames.ads-tmpl: Add Excluded_Patterns
6632         attribute definition.
6634 2014-01-24  Vincent Celier  <celier@adacore.com>
6636         * makeutl.adb (Queue.Insert_No_Roots): In gprbuild, do not put
6637         in the Queue the same source (same path, same multi-source index)
6638         from the same project file, to avoid compiling several times
6639         the same source.
6641 2014-01-24  Eric Botcazou  <ebotcazou@adacore.com>
6643         * einfo.ads (First_Rep_Item): Remove obsolete stuff.
6644         (Has_Gigi_Rep_Item): Likewise.
6645         * sem_prag.adb (Analyze_Pragma) <Pragma_Linker_Section>: Do not set
6646         Has_Gigi_Rep_Item for objects.
6647         * gcc-interface/decl.c (prepend_one_attribute_to): Rename into...
6648         (prepend_one_attribute): ...this.
6649         (prepend_one_attribute_pragma): New function extracted from...
6650         (prepend_attributes): ...here.  Swap the parameters for consistency.
6651         (gnat_to_gnu_entity): Adjust calls to prepend_one_attribute_to and to
6652         prepend_attributes.
6653         <object>: Deal with a pragma Linker_Section on a constant
6654         or variable.  <E_Function>: Deal with a pragma Linker_Section
6655         on a subprogram.
6656         (get_minimal_subprog_decl): Adjust calls to prepend_one_attribute_to.
6658 2014-01-24  Vincent Celier  <celier@adacore.com>
6660         * opt.ads: Minor comment update.
6662 2014-01-24  Robert Dewar  <dewar@adacore.com>
6664         * sem_prag.adb (Analyze_Input_Output): Add missing error check
6665         for junk operand.
6666         * sem_util.adb (Is_Refined_State): Add defense against junk
6667         tree from error.
6669 2014-01-24  Pascal Obry  <obry@adacore.com>
6671         * projects.texi: Removes Build_Slaves attribute documentation.
6673 2014-01-23  Robert Dewar  <dewar@adacore.com>
6675         * opt.adb (Register_Opt_Config_Switches): Save SPARK_Mode_Pragma
6676         setting.
6678 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
6680         * sem_util.adb (Is_Potentially_Unevaluated): Predicate only
6681         applies to expressions that come from source.
6682         * sem_attr.adb (Analyze_Attribute, case 'Old): Improve error
6683         message.
6684         (Analyze_Attribute, case 'Loop_Entry): Apply SPARK 2014 legality
6685         rule regarding potentially unevaluated expressions, to prefix
6686         of attribute.
6688 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
6690         * exp_util.adb (Make_Invqriant_Call): If type of expression is
6691         a private extension, get invariant from base type.
6693 2014-01-23  Robert Dewar  <dewar@adacore.com>
6695         * sem_util.adb, sem_attr.adb: Minor reformatting.
6697 2014-01-23  Robert Dewar  <dewar@adacore.com>
6699         * opt.adb (Save_Opt_Config_Switches): Save SPARK_Mode_Pragma
6700         (Restore_Opt_Config_Switches): Restore SPARK_Mode_Pragma.
6701         * sem.adb (Semantics): Remove save/restore of
6702         SPARK_Mode[_Pragma]. Not needed since already done in
6703         Save/Restore_Opt_Config_Switches.
6705 2014-01-23  Robert Dewar  <dewar@adacore.com>
6707         * gnat_rm.texi, einfo.adb, einfo.ads, sem_prag.adb, gnat_ugn.texi,
6708         freeze.adb, repinfo.adb, aspects.adb, aspects.ads, sem_ch13.adb:
6709         Linker_Section enhancements.
6711 2014-01-23  Tristan Gingold  <gingold@adacore.com>
6713         * gnat_rm.texi: Minor editing.
6715 2014-01-23  Robert Dewar  <dewar@adacore.com>
6717         * opt.adb (Set_Opt_Config_Switches): Reset SPARK mode for
6718         with'ed internal units.
6719         * sem.adb (Semantics): Save and restore SPARK_Mode[_Pragma].
6721 2014-01-23  Javier Miranda  <miranda@adacore.com>
6723         * lib-xref.adb (Generate_Reference): As part of processing the
6724         "end-of-spec" reference generate an extra reference to the first
6725         private entity of the package.
6726         * xr_tabls.adb (Add_Reference): No action needed for the extra
6727         'E' reference associated; similar to the processing of the
6728         'e' reference.
6730 2014-01-23  Bob Duff  <duff@adacore.com>
6732         * gnat_ugn.texi: Change "--&pp off" to "--!pp off".
6734 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
6736         * sem_util.ads, sem_util.adb (Is_Potentially_Unevaluated): new
6737         predicate to implement rule given in 6.1.1 (20/3).
6738         * sem_attr.adb (Analyze_Attribute, case 'Old): Reject prefix of
6739         'Old in a postcondition, if it is potentially unevaluated and
6740         it is not an entity name.
6742 2014-01-23  Bob Duff  <duff@adacore.com>
6744         * gnat_ugn.texi: Document the new "--&pp off" feature of gnatpp.
6746 2014-01-23  Robert Dewar  <dewar@adacore.com>
6748         * gnatlink.adb (Gnatlink): Fix problem of generating bad name
6749         msg on VMS.
6751 2014-01-23  Bob Duff  <duff@adacore.com>
6753         * g-dynhta.ads: Minor comment fix.
6755 2014-01-23  Yannick Moy  <moy@adacore.com>
6757         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Inherit SPARK_Mode
6758         from spec on body only when not already inherited on spec. Set
6759         SPARK_Mode from context on body without previous spec.  *
6760         * sem_prag.adb (Analyze_Pragma): Check placement of pragma on
6761         library-level entities.  Correct retrieval of entity from
6762         declaration, for cases where the declaration is not a unit.
6763         * sem_ch12.adb (Instantiate_Object): Avoid
6764         calling Is_Volatile_Object on an empty node.
6766 2014-01-23  Robert Dewar  <dewar@adacore.com>
6768         * gnatlink.adb (Gnatlink): Check for suspicious executable file
6769         names on windows.
6771 2014-01-23  Robert Dewar  <dewar@adacore.com>
6773         * a-ngelfu.ads: Remove bad uses of AND which should be AND THEN.
6774         * sem_res.adb (Check_No_Direct_Boolean_Operators): Don't give
6775         style errors in instances.
6776         * g-dynhta.ads (Static_HTable): Comment updates.
6778 2014-01-23  Vincent Celier  <celier@adacore.com>
6780         * prj-conf.adb (Get_Or_Create_Configuration_File): Do not attempt
6781         to find a configuration project file when Config_File_Name is
6782         No_Configuration_File.
6783         * prj-conf.ads (No_Configuration_File): New constant String.
6784         * prj-pars.adb (Parse): Call Get_Or_Create_Configuration_File
6785         with Config_File_Name set to No_Configuration_File, so that
6786         no existing configuration project file will be used, and the
6787         configuration project will be only created in memory when
6788         Add_Default_GNAT_Naming_Scheme is called.
6789         * projects.texi: Minor reformatting.
6791 2014-01-23  Vincent Celier  <celier@adacore.com>
6793         * prj-conf.adb (Get_Or_Create_Configuration_File): Never parse
6794         a config project file if On_Load_Config is not null.
6795         * prj-pars.adb: Minor comment changes.
6797 2014-01-23  Ed Schonberg  <schonberg@adacore.com>
6799         * lib-xref.adb (Output_References): Output progenitors of
6800         synchronized tagged types, for source navigation.
6802 2014-01-23  Robert Dewar  <dewar@adacore.com>
6804         * exp_util.adb, sinfo.adb, sinfo.ads, sem.adb, sem_res.adb,
6805         expander.adb, exp_ch11.adb, exp_ch11.ads, sem_ch11.adb, sem_ch11.ads,
6806         sprint.adb, sprint.ads: Remove unused node N_Subprogram_Info.
6808 2014-01-23  Emmanuel Briot  <briot@adacore.com>
6810         * prj-conf.adb (Get_Or_Create_Configuration_File): call
6811         On_Load_Config later.
6813 2014-01-23  Hristian Kirtchev  <kirtchev@adacore.com>
6815         * sem_ch3.adb (Analyze_Declarations): Do not
6816         generate the spec of the late primitive in ASIS mode. Add two
6817         comments to explain the special cases when the expansion is
6818         not performed.
6820 2014-01-23  Robert Dewar  <dewar@adacore.com>
6822         * sem_util.adb (Note_Possible_Modification): Fix error of
6823         misbehaving for implicit dereference cases in -gnatc mode.
6825 2014-01-23  Emmanuel Briot  <briot@adacore.com>
6827         * prj-pars.adb: Minor reformatting.
6829 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
6831         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): A subprogram
6832         body generated for an expression function within a protected body
6833         needs a set of renaming declarations if the expression function
6834         comes from source.
6836 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
6838         * lib-xref.adb (Get_Type_Reference): In semantics-only mode,
6839         list interface progenitor of a tagged concurrent type, for better
6840         source navigation.
6842 2014-01-22  Robert Dewar  <dewar@adacore.com>
6844         * lib.adb (In_Extended_Main_Code_Unit): Return False for
6845         Standard_Location.
6846         (In_Extended_Main_Source_Unit): Return False for Standard_Location.
6847         * lib.ads (In_Extended_Main_Code_Unit): Add documentation on
6848         treatment of Slocs No_Location and Standard_Location.
6849         * restrict.adb (Check_Restriction_No_Dependence): Explicitly
6850         check for entity with Standard_Location Sloc, rather than relying
6851         on Lib routines to do that.
6852         * sem_res.adb (Resolve_Call): Implement SPARK_05 restriction
6853         that a call cannot occur before a later occuring body within
6854         the same unit.
6856 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6858         * rtsfind.adb: Update comment.
6860 2014-01-22  Hristian Kirtchev  <kirtchev@adacore.com>
6862         * sem_aux.ads, sem_aux.adb (Is_Body): New routine.
6863         * sem_ch3.adb (Analyze_Declarations): Add local variable
6864         Body_Seen. Generate the spec of a late controlled
6865         primitive body that is about to freeze its related type.
6866         (Handle_Late_Controlled_Primitive): New routine.
6868 2014-01-22  Robert Dewar  <dewar@adacore.com>
6870         * a-stream.adb: Minor reformatting.
6872 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
6874         * sem_ch8.adb (From_Actual_Package): Introduce a recursive
6875         sub-procedure Declared_In_Actual to handle properly the visibility
6876         of actuals in actual packages, that are themselves actuals to a
6877         actual package of the current instance. This mimics properly the
6878         visibility of formals of formal packages declared with a box,
6879         within the corresponding generic unit.
6881 2014-01-22  Robert Dewar  <dewar@adacore.com>
6883         * checks.adb: Do not assume that a volatile variable is valid.
6885 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6887         * g-catiio.ads (Image, Value): Clarify that these functions
6888         operate in the local time zone.  Minor documentation update.
6890 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6892         * csets.adb, csets.ads, opt.ads: Minor documentation fixes.
6894 2014-01-22  Robert Dewar  <dewar@adacore.com>
6896         * sem_aux.adb, sem_aux.ads, sem_ch3.adb (Has_Unconstrained_Elements):
6897         Moved to sem_aux.adb.
6899 2014-01-22  Robert Dewar  <dewar@adacore.com>
6901         * vms_data.ads: Minor reformatting.
6903 2014-01-22  Robert Dewar  <dewar@adacore.com>
6905         * debug.adb: Document messages affected by -gnatd.E including
6906         the new ones that relate to late definition of equality.
6907         * sem_ch6.adb (Check_Untagged_Equality): In Ada 2012 mode, if
6908         debug flag -gnatd.E is set, then generate warnings rather than
6909         errors.
6910         (Check_Untagged_Equality): In earlier versions of Ada,
6911         generate warnings if Warn_On_Ada_2012_Incompatibility flag is set.
6913 2014-01-22  Robert Dewar  <dewar@adacore.com>
6915         * sem_prag.adb (Usage_Error): Output additional messages for
6916         unconstrained OUT parameters lacking an input dependency.
6918 2014-01-22  Robert Dewar  <dewar@adacore.com>
6920         * sem_ch4.adb: Minor reformatting.
6922 2014-01-22  Robert Dewar  <dewar@adacore.com>
6924         * restrict.ads: Minor reformatting.
6925         * sem_res.adb (Resolve_Call): Check for SPARK_05 restriction that
6926         forbids a call from within a subprogram to the same subprogram.
6928 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6930         * a-stream.ads (Read_SEA, Write_SEA): New subprograms, optimized
6931         stream attributes for Stream_Element_Array.
6932         * a-stream.adb (Read_SEA, Write_SEA): Bodies for the above.
6933         * rtsfind.adb (Check_CRT): Do not reject a reference to an entity
6934         defined in the current scope.
6936 2014-01-22  Robert Dewar  <dewar@adacore.com>
6938         * debug.adb, exp_ch4.adb, erroutc.adb: Minor reformatting.
6940 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6942         * sem_ch7.adb, sem_ch8.adb, exp_ch3.adb: Minor reformatting.
6944 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6946         * sem_ch3.adb (Analyze_Object_Declaration): For a constant
6947         declaration initialized with a function call, whose type
6948         has variable size, need to remove side effects so that the
6949         initialization expression becomes a dereference of a temporary
6950         reference to the function result.
6952 2014-01-22  Yannick Moy  <moy@adacore.com>
6954         * errout.adb (Initialize): Remove trick to add dummy entry
6955         in Warnings table.
6956         * erroutc.adb (Set_Warnings_Mode_Off,
6957         Set_Warnings_Mode_On): Do nothing if warnings are suppressed by
6958         command line switch.
6959         * opt.ads (Warning_Mode): Document behavior
6960         wrt pragma Warnings, in normal mode and in GNATprove_Mode.
6962 2014-01-22  Robert Dewar  <dewar@adacore.com>
6964         * sem_ch3.adb, errout.adb, erroutc.adb: Minor reformatting.
6966 2014-01-22  Robert Dewar  <dewar@adacore.com>
6968         * sem_ch13.adb (Check_Pool_Size_Clash): New procedure
6969         (Analyze_Attribute_Definition_Clause, case Storage_Pool): call
6970         Check_Pool_Size_Clash (Analyze_Attribute_Definition_Clause,
6971         case Storage_Size): call Check_Pool_Size_Clash.
6973 2014-01-22  Robert Dewar  <dewar@adacore.com>
6975         * sem_ch3.adb, exp_util.adb, sem_dim.adb, sem_elab.adb, sem_ch8.adb,
6976         sem_eval.ads: Minor reformatting.
6978 2014-01-22  Thomas Quinot  <quinot@adacore.com>
6980         * sem_eval.adb (Compile_Time_Known_Bounds): Return False for
6981         Any_Composite to prevent cascaded errors.
6983 2014-01-22  Yannick Moy  <moy@adacore.com>
6985         * errout.adb (Initialize): Do not insert special entry in Warnings
6986         table in GNATprove_Mode.
6987         * erroutc.adb (Set_Warnings_Mode_On): Add info in Warnings table in
6988         GNATprove_Mode.
6989         * gnat1drv.adb (Adjust_Global_Switches): Do not suppress frontend
6990         warnings anymore.
6992 2014-01-22  Robert Dewar  <dewar@adacore.com>
6994         * sem_prag.adb (Analyze_Initializes_In_Decl_Part): Handle null
6995         initializes case.
6997 2014-01-22  Robert Dewar  <dewar@adacore.com>
6999         * snames.ads-tmpl: Update header.
7001 2014-01-22  Thomas Quinot  <quinot@adacore.com>
7003         * exp_util.adb (Insert_Actions): When inserting actions on a
7004         short circuit operator that has already been analyzed, do not park
7005         actions in node; instead introduce an N_Expression_With_Actions
7006         and insert actions immediately.
7007         Add guard for unexpected case of climbing up through statement
7008         in Actions list of an N_Expression_With_Actions.
7009         * sem_elab.adb (Insert_Elab_Check): Remove complex
7010         specialized circuitry for the case where the context is already
7011         analyzed, as it is not needed and introduces irregularities in
7012         finalization. Instead rely on the above change to Insert_Actions
7013         to ensure that late insertion on short circuit operators works
7014         as expected.
7016 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
7018         * sem_ch4.adb (Operator_Check): Improve error message when an
7019         operand of concatenation is an access type.
7021 2014-01-22  Thomas Quinot  <quinot@adacore.com>
7023         * sem_dim.adb (Analyze_Dimension_Identifier): Add guard against
7024         cascaded error.
7026 2014-01-22  Ed Schonberg  <schonberg@adacore.com>
7028         * sem_ch8.adb (Find_Selected_Component): Handle properly the case
7029         of an expanded name in a proper body, whose prefix is a package
7030         in the context of the proper body, when there is a homonym of
7031         the package declared in the parent unit.
7033 2014-01-22  Robert Dewar  <dewar@adacore.com>
7035         * sem_warn.adb (Check_Use_Clause): Don't give no entities used
7036         msg if errors found.
7037         (Check_One_Unit): Same change.
7039 2014-01-22  Robert Dewar  <dewar@adacore.com>
7041         * ug_words: Add missing/wrong entries for VMS warning switches.
7042         * sem_prag.adb (Check_Duplicate_Pragma): Avoid flagging parent type.
7044 2014-01-22  Jerome Guitton  <guitton@adacore.com>
7046         * mlib-tgt-specific-vxworks.adb (Get_Target_Suffix): Replace xscale by
7047         arm.
7049 2014-01-22  Robert Dewar  <dewar@adacore.com>
7051         * gnat_rm.texi, gnat_ugn.texi: Document passive task optimization
7053 2014-01-22  Eric Botcazou  <ebotcazou@adacore.com>
7055         * gcc-interface/Makefile.in: Minor fixes.
7057 2014-01-21  Robert Dewar  <dewar@adacore.com>
7059         * par-ch4.adb (P_If_Expression): Rewritten to improve error recovery.
7060         * par-ch5.adb (P_Condition): New version with expression prescanned.
7061         * par.adb (P_Condition): New version with expression prescanned.
7063 2014-01-21  Robert Dewar  <dewar@adacore.com>
7065         * gnat_rm.texi: Document that Allow_Integer_Address is ignored
7066         if Address is not a private type.
7067         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7068         Ignore pragma if System.Address is not a private type.
7070 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7072         * namet.ads (Name_Len): Initialize to 0 to avoid accessing an
7073         uninitialized value.
7075 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7077         * gnat_rm.texi (Scalar_Storage_Order): Update documentation.
7079 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7081         * sem_ch12.adb (Set_Instance_Env): In Ada 2012 mode, preserve
7082         the value of Assertions_Enabled flag when compiling an instance of
7083         an internal unit. This facilitates the use of pre/postconditions
7084         in generic internal units, such as the new elementary function
7085         libraries.
7087 2014-01-21  Robert Dewar  <dewar@adacore.com>
7089         * exp_aggr.adb: Minor reformatting.
7090         * sem_attr.adb: Minor reformatting.
7091         * sem_res.adb: Minor comment addition.
7092         * einfo.adb: Minor comment updates.
7093         * freeze.adb: Minor reformatting and code reorganization.
7095 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7097         * par-ch4.adb (P_If_Expression): Handle more gracefully an
7098         elsif clause that does not have an else part.
7100 2014-01-21  Robert Dewar  <dewar@adacore.com>
7102         * checks.adb, sem_util.ads, sem_ch4.adb: Minor reformatting.
7103         * gcc-interface/Makefile.in: clean up target pairs.
7105 2014-01-21  Pascal Obry  <obry@adacore.com>
7107         * projects.texi: Minor typo fix.
7109 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7111         * freeze.adb (Check_Component_Storage_Order): If a record type
7112         has an explicit Scalar_Storage_Order attribute definition clause,
7113         reject any component that itself is of a composite type and does
7114         not have one.
7116 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7118         * sem_ch10.adb (Generate_Parent_Reference): Make public so it
7119         can be used to generate proper cross-reference information for
7120         the parent units of proper bodies.
7122 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7124         * exp_pakd.adb (Expand_Packed_Element_Set,
7125         Expand_Packed_Element_Reference): No byte swapping required in
7126         the front-end for the case of a reverse storage order array,
7127         as this is now handled uniformly in the back-end.  However we
7128         still need to swap back an extracted element if it is itself a
7129         nested composite with reverse storage order.
7131 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
7133         * sem_prag.adb (Analyze_External_Property): Add processing for "others".
7134         (Analyze_Pragma): Update the grammar of pragma Abstract_State to
7135         include "others".
7137 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7139         * gnat_ugn.texi: Minor updates.
7141 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7143         * exp_pakd.adb: Update comment, minor reformatting.
7145 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
7147         * sem_ch3.adb (Analyze_Variable_Contract): Trigger the volatile
7148         object check when SPARK_Mode is on.
7149         * sem_ch6.adb (Process_Formals): Trigger the volatile object
7150         check when SPARK_Mode is on.
7151         * sem_ch12.adb (Instantiate_Object): Trigger the volatile object
7152         check when SPARK_Mode is on.
7153         * sem_ch13.adb (Analyze_Aspect_Specifications): Insert the
7154         corresponding pragma of aspect SPARK_Mode in the visible
7155         declarations of a package declaration.
7156         * sem_prag.adb (Analyze_Pragma): Trigger the volatile object
7157         check when SPARK_Mode is on.
7158         * sem_res.adb (Resolve_Actuals): Trigger the volatile object
7159         check when SPARK_Mode is on.
7160         (Resolve_Entity_Name): Trigger
7161         the volatile object check when SPARK_Mode is on.
7163 2014-01-21  Robert Dewar  <dewar@adacore.com>
7165         * sem_ch3.adb, sem_prag.adb, sem_prag.ads, sem_ch12.adb, sem_res.adb,
7166         sem_ch6.adb, a-except-2005.adb: Minor reformatting.
7168 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7170         * exp_ch3.adb (Expand_N_Object_Declaration): When a class-wide
7171         object is declared, it is rewritten as a renaming of an dynamic
7172         expression that wraps the initial value.  The renaming declaration
7173         is first given an internal name, to prevent collisions with the
7174         entity already declared, and then the name is modified to reflect
7175         the original one. the modification of the name must preserve
7176         the source location of the original, to prevent spurious errors
7177         when compiling with style checks if the declaration involves
7178         more than one entity.
7180 2014-01-21  Hristian Kirtchev  <kirtchev@adacore.com>
7182         * aspects.adb Add entries for Async_Readers, Async_Writers,
7183         Effective_Reads and Effective_Writes in table Canonical_Aspect.
7184         * aspects.ads Add entries for Async_Readers, Async_Writers,
7185         Effective_Reads and Effective_Writes in tables Aspect_Id,
7186         Aspect_Names, Aspect_Delay and Implementation_Defined_Aspect.
7187         * atree.adb (Ekind_In): New version with 8 parameters.
7188         (Node34): New routine.
7189         (Set_Node34): New routine.
7190         * atree.ads (Ekind_In): New version with 8 parameters.
7191         (Node34): New routine.
7192         (Set_Node34): New routine.
7193         * einfo.adb Contract is now Node34.
7194         (Contract): Update the assertion and node usage.
7195         (Get_Pragma): Include pragmas Async_Readers, Async_Writers,
7196         Effective_Reads and Effective_Writes.
7197         (Set_Contract): Update the assertion and node usage.
7198         (Write_Field24_Name): Remove the output for a contract.
7199         (Write_Field34_Name): Add output for a contract.
7200         * einfo.ads Contract is now Node34. Update the comment on
7201         attribute usage and related node structures.
7202         (Get_Pragma): Update the comment on usage.
7203         * par-prag.adb (Prag): Pragmas Async_Readers, Async_Writers,
7204         Effective_Reads and Effective_Writes do not require special
7205         processing by the parser.
7206         * sem_ch3.adb (Analyze_Variable_Contract): New routine.
7207         (Analyze_Declarations): Analyze the contract of a variable at
7208         the end of the declarative region.
7209         (Analyze_Object_Declaration): Create a contract for a variable.
7210         * sem_ch6.adb (Analyze_Subprogram_Contract): Update the retrieval
7211         of classification pragmas.
7212         (Process_Formals): Detect an illegal
7213         use of a volatile object as a formal in a function.
7214         * sem_ch12.adb (Instantiate_Object): Detect an illegal use of
7215         a volatile object as an actual in generic instantiation.
7216         * sem_prag.adb Add entries for Async_Readers, Async_Writers,
7217         Effective_Reads and Effective_Writes in table Sig_Flags.
7218         (Analyze_External_State_In_Decl_Part): New routine.
7219         (Analyze_Global_Item): Detect an illegal use of a volatile object
7220         as a global item of a function.
7221         (Analyze_Pragma): Reimplement
7222         pragma Abstract_State. Add support for pragmas Async_Readers,
7223         Async_Writers, Effective_Reads and Effective_Writes.
7224         (Check_External_Properties): New routine.
7225         * sem_prag.ads (Analyze_External_State_In_Decl_Part): New routine.
7226         (Check_External_Properties): New routine.
7227         * sem_res.adb (Resolve_Actuals): Detect an illegal use of a
7228         volatile object as an actual in a call.
7229         (Resolve_Entity_Name):
7230         Add local variables Par, Prev and Usage_OK. Detect illegal
7231         contexts of volatile objects.
7232         * sem_util.adb (Add_Contract_Item): Add support for
7233         pragmas associated with the contract of a variable.
7234         (Async_Readers_Enabled): New routine.
7235         (Async_Writers_Enabled): New routine.
7236         (Effective_Reads_Enabled): New routine.
7237         (Effective_Writes_Enabled): New routine.
7238         (Has_Enabled_Property):
7239         New routine.
7240         (Is_Unchecked_Conversion_Instance): New routine.
7241         (Is_Volatile_Object): Add support for entities that may denote
7242         a volatile object.
7243         * sem_util.ads (Add_Contract_Item): Update the
7244         comment on usage.
7245         (Async_Readers_Enabled): New routine.
7246         (Async_Writers_Enabled): New routine.
7247         (Effective_Reads_Enabled): New routine.
7248         (Effective_Writes_Enabled): New routine.
7249         (Is_Unchecked_Conversion_Instance): New routine.
7250         * sinfo.ads Update the comment on the structure of N_Contract.
7251         * snames.ads-tmpl Add predefined names for Async_Readers,
7252         Async_Writers, Effective_Reads and Effective_Writes. Add
7253         pragma ids for Async_Readers, Async_Writers, Effective_Reads
7254         and Effective_Writes.
7256 2014-01-21  Robert Dewar  <dewar@adacore.com>
7258         * exp_ch4.adb (Eval_Op_Expon): Use CRT_Safe_Compile_Time_Known_Value
7259         * sem_eval.adb (Compile_Time_Known_Value): Remove special
7260         handling of CRT mode (CRT_Safe_Compile_Time_Known_Value): New
7261         function (Eval_Op_Expon): Add CRT_Safe in call to Test_Foldable
7262         (Test_Foldable): Add CRT_Safe parameter
7263         * sem_eval.ads (Compile_Time_Known_Value): Remove special
7264         handling of CRT mode.
7265         (CRT_Safe_Compile_Time_Known_Value): New function.
7267 2014-01-21  Robert Dewar  <dewar@adacore.com>
7269         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Fix problem
7270         with pragma or aspect that applies to package spec or subprogram
7271         spec.
7273 2014-01-21  Robert Dewar  <dewar@adacore.com>
7275         * exp_aggr.adb: Minor reformatting.
7277 2014-01-21  Johannes Kanig  <kanig@adacore.com>
7279         * gnat1drv.adb (Gnat1drv) remove obsolete reference to -gnatd.H.
7281 2014-01-21  Bob Duff  <duff@adacore.com>
7283         * gnat_ugn.texi: Document the "checks" attribute in gnat2xml.
7285 2014-01-21  Steve Baird  <baird@adacore.com>
7287         * gnat_rm.texi: Improve description of SPARK_Mode pragma.
7289 2014-01-21  Vincent Celier  <celier@adacore.com>
7291         * prj-part.adb (Parse_Single_Project): Accept to extend a project
7292         if it has only be imported by an project being extended. When a
7293         project that has only been imported by a project being extended
7294         is imported by another project that is not being extended,
7295         reset the previous indication, so that it will be an error if
7296         this project is extended later.
7297         * prj-tree.adb (Create_Project): Include component From_Extended
7298         in table Projects_HT
7299         * prj-tree.ads (Project_Name_And_Node): New Boolean component
7300         From_Extended
7302 2014-01-21  Robert Dewar  <dewar@adacore.com>
7304         * atree.ads, atree.adb: Add Node33 and Set_Node33.
7305         * einfo.ads, einfo.adb (SPARK_Pragma): New field (SPARK_Aux_Pragma):
7306         New field (SPARK_Pragma_Inherited): New flag
7307         (SPARK_Aux_Pragma_Inherited): New flag (SPARK_Mode_Pragmas):
7308         Removed.
7309         * lib.ads, lib.adb: Remove SPARK_Mode_Pragma, no longer used.
7310         * opt.ads (SPARK_Mode_Pragma): New global variable.
7311         * sem.ads: Add Save_SPARK_Mode_Pragma field to Scope_Stack_Entry.
7312         * sem_ch3.adb: Use new SPARK_Mode data structures.
7313         * sem_ch6.adb: Set SPARK_Mode fields in subprogram specs and bodies.
7314         * sem_ch7.adb: Set SPARK_Mode fields in package spec and body entities.
7315         * sem_ch8.adb (Push_Scope): Save SPARK_Mode_Pragma.
7316         (Pop_Scope): Restore SPARK_Mode_Pragma.
7317         * sem_prag.adb (Analyze_Pragma, case SPARK_Mode): Rewrite for
7318         new data structures.
7320 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7322         * back_end.adb: Undo previous change, not needed. Minor reformatting.
7324 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7326         * exp_ch5.adb: Fix comment.
7327         * switch-c.adb: Minor comment update.
7328         * exp_ch3.adb: Minor reformatting.
7330 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7332         * back_end.adb (Scan_Compiler_Arguments): Do not store object
7333         filename in gnatprove mode.
7335 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7337         * sinfo.ads (No_Ctrl_Actions): Clarify documentation (flag also
7338         suppresses usage of primitive _assign for tagged types).
7339         * exp_aggr.adb (Build_Array_Aggr_Code.Gen_Assign): Set
7340         No_Ctrl_Actions for a tagged type that does not require
7341         finalization, as we want to disable usage of _assign (which
7342         may cause undesirable discriminant checks on an uninitialized,
7343         invalid target).
7345 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7347         * sem_prag.adb: Reject invariant'class on completion.
7349 2014-01-21  Javier Miranda  <miranda@adacore.com>
7351         * exp_ch3.adb (Build_Init_Procedure): For
7352         derivations of interfaces, do not move the the initialization
7353         of the _parent field since such assignment is not generated.
7355 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7357         * sem_res.adb (Rewrite_Renamed_Operator): Do not replace entity
7358         with the operator it renames if we are within an expression of
7359         a pre/postcondition, because the expression will be reanalyzed
7360         at a later point, and the analysis of the renaming may affect
7361         the visibility of the operator when in an instance.
7363 2014-01-21  Robert Dewar  <dewar@adacore.com>
7365         * sinfo.ads, sinfo.adb: Change Do_Discriminant_Check to use new Flag1.
7366         Add this flag to type conversion nodes and assignment nodes.
7367         * treepr.adb: Deal properly with Flag 1,2,3.
7368         * treeprs.adt: Minor comment update.
7370 2014-01-21  Robert Dewar  <dewar@adacore.com>
7372         * sem_eval.adb (Compile_Time_Known_Value): Add Ignore_CRT
7373         parameter.
7374         * sem_eval.ads (Compile_Time_Known_Value): Add Ignore_CRT
7375         parameter, completely rewrite spec.
7377 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7379         * sem_ch10.adb (Install_Withed_Unit): If the unit is a subprogram
7380         instance that is inlined, it may have been rewritten as a wrapper
7381         package. In that case the unit that must be made visible is the
7382         related instance of the package.
7384 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7386         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Refine
7387         previous change in codepeer mode.
7389 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7391         * exp_ch9.adb (Expand_N_Selective_Accept.Add_Accept): Always add
7392         call to Abort_Undefer, as expected by the runtime.
7393         * s-tasren.adb (Local_Complete_Rendezvous): Replace
7394         Defer_Abort_Nestable by Defer_Abort, since we do not expect abort to be
7395         deferred at this point. Update comments.
7397 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7399         * exp_ch4.adb, exp_ch5.adb, checks.adb: Minor reformatting.
7401 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7403         * switch-c.adb, usage.adb, gnat_ugn.texi: Mark -gnates as internal,
7404         remove from doc.
7406 2014-01-21  Robert Dewar  <dewar@adacore.com>
7408         * switch-c.adb, usage.adb, atree.adb, atree.ads: Minor reformatting.
7410 2014-01-21  Thomas Quinot  <quinot@adacore.com>
7412         * atree.adb, atree.ads (Num_Extension_Nodes): Switch to Node_Id, since
7413         this is value is used in Node_Id arithmetic operations.
7414         (Copy_Node, Exchange_Entities): Use loops indexed by Num_Extension_Nodes
7415         instead of hard-coded unrolled code.
7417 2014-01-21  Yannick Moy  <moy@adacore.com>
7419         * gnat1drv.adb: Minor code cleanup, removing useless code.
7421 2014-01-21  Arnaud Charlet  <charlet@adacore.com>
7423         * opt.ads (SPARK_Switches_File_Name): New.
7424         * switch-c.adb (Scan_Front_End_Switches): Add handling of -gnates=xxx *
7425         * usage.adb (Usage): Document -gnates, in gnatprove mode only.
7426         * gnat_ugn.texi: Document -gnates.
7428 2014-01-21  Yannick Moy  <moy@adacore.com>
7430         * errout.adb (Special_Msg_Delete): Update comment. Remove
7431         special case for GNATprove which should not ignore mismatch
7432         in sizes for representation clauses.
7433         * sem_prag.adb (Analyze_Pragma): Remove special case for GNATprove
7434         which should not ignore pragma Pack.
7436 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7438         * sem_ch4.adb: Code clean up.
7440 2014-01-21  Steve Baird  <baird@adacore.com>
7442         * gnat_rm.texi: Improve GNAT RM description of SPARK_Mode pragma.
7444 2014-01-21  Robert Dewar  <dewar@adacore.com>
7446         * gcc-interface/gigi.h: Get Flags array address.
7447         * gcc-interface/trans.c: Acquire Flags array address.
7448         * atree.adb: Add support for Flags array and Flag0,1,2,3.
7449         * atree.ads: Add support for Flags array and Flag0,1,2,3.
7450         * atree.h: Add support for Flags array and Flag0,1,2,3.
7451         * back_end.adb: Pass Flags array address to gigi.
7453 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7455         * sem_ch8.adb (Attribute_Renaming): Transfer original attribute
7456         reference to generated body so that legality checks on stream
7457         attributes are properly applied. If type is tagged and already
7458         frozen, insert generated body at the point of the renaming
7459         declaration.
7461 2014-01-21  Ed Schonberg  <schonberg@adacore.com>
7463         * sem_ch12.adb: Code clean up.
7464         * sem_ch8.adb: Minor reformatting
7466 2014-01-20  Robert Dewar  <dewar@adacore.com>
7468         * checks.adb: Check SPARK_Mode instead of GNATProve_Mode for
7469         converting warnings on inevitable exceptions to errors.
7470         * exp_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
7471         converting warnings on inevitable exceptions to errors.
7472         * opt.adb (SPARK_Mode_Config): Handled like other config flags
7473         * opt.ads (SPARK_Mode_Type): Moved here from types (renamed from
7474         SPARK_Mode_Id) (SPARK_Mode_Type): Add pragma Ordered, remove
7475         SPARK_ from names (SPARK_Mode): New flag (SPARK_Mode_Config):
7476         New flag (Config_Switches_Type): Add SPARK_Mode field
7477         * sem.adb: Minor code reorganization (remove unnecessary with)
7478         * sem.ads (Scope_Stack_Entry): Add Save_SPARK_Mode field
7479         * sem_aggr.adb: Check SPARK_Mode instead of GNATProve_Mode for
7480         converting warnings on inevitable exceptions to errors.
7481         * sem_attr.adb: Check SPARK_Mode instead of GNATProve_Mode for
7482         converting warnings on inevitable exceptions to errors.
7483         * sem_ch3.adb: Check SPARK_Mode instead of GNATProve_Mode for
7484         converting warnings on inevitable exceptions to errors.
7485         * sem_ch4.adb: Check SPARK_Mode instead of GNATProve_Mode for
7486         converting warnings on inevitable exceptions to errors.
7487         * sem_ch6.adb (Analyze_Subprogram_Body_Helper): Reset SPARK_Mode
7488         from spec if needed
7489         * sem_ch7.adb (Analyze_Package_Body_Helper): Reset SPARK_Mode
7490         from spec if needed
7491         * sem_ch8.adb (Push_Scope): Save SPARK_Mode (Pop_Scope):
7492         Restore SPARK_Mode
7493         * sem_elab.adb: Check SPARK_Mode instead of GNATProve_Mode for
7494         converting warnings on inevitable exceptions to errors.
7495         * sem_prag.adb (Get_SPARK_Mode_From_Pragma): New function
7496         (Get_SPARK_Mode_Id): Removed (Get_SPARK_Mode_Type): New name
7497         of Get_SPARK_Mode_Id
7498         * sem_prag.ads (Get_SPARK_Mode_From_Pragma): New function
7499         * sem_res.adb: Check SPARK_Mode instead of GNATProve_Mode for
7500         converting warnings on inevitable exceptions to errors.
7501         * sem_util.adb: Check SPARK_Mode instead of GNATProve_Mode for
7502         converting warnings on inevitable exceptions to errors.
7503         * types.ads (SPARK_Mode_Id): Moved to opt.ads and renamed
7504         SPARK_Mode_Type
7506 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7508         * sem_ch13.adb: Add semantic information to rewritten type
7509         reference.
7511 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7513         * exp_ch5.adb (Expand_N_Assignment_Statement): If both sides
7514         are of a type with unknown discriminants, convert both to the
7515         underlying view of the type, so that the proper constraint check
7516         can be applied to the right-hand side.
7518 2014-01-20  Robert Dewar  <dewar@adacore.com>
7520         * atree.adb (Copy_Node): Fix failure to copy last component
7521         (Exchange_Entities): Fix failure to exchange last entity
7523 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7525         * sem_ch12.adb: Code clean up.
7527 2014-01-20  Robert Dewar  <dewar@adacore.com>
7529         * gnat_rm.texi, sem_ch4.adb: Minor reformatting.
7531 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7533         * sem_ch4.adb (Analyze_Quantified_Expression): If after
7534         pre-analysis  the loop parameter specification has been
7535         rewritten as a iterator specification, propagate the change to
7536         the quantified expression, for ASIS navigtion needs.
7538 2014-01-20  Vincent Celier  <celier@adacore.com>
7540         * par-ch10.adb: Minor error message change: escape [ and ].
7542 2014-01-20  Robert Dewar  <dewar@adacore.com>
7544         * checks.adb: Make warnings on exceptions into errors in GNATprove mode.
7545         * errout.adb: Implement [ and ] insertion characters.
7546         * errout.ads: Document new [ and ] insertion characters.
7547         * sem_ch12.adb, restrict.adb, frontend.adb, exp_ch7.adb: Minor
7548         addition of ??? comment.
7549         * lib-xref.adb, exp_util.adb, gnat1drv.adb: Minor reformatting
7550         * exp_ch4.adb, sem_ch3.adb, sem_ch4.adb, sem_ch6.adb, sem_elab.adb,
7551         sem_eval.adb, sem_res.adb, sem_util.adb, sem_attr.adb, sem_aggr.adb:
7552         Make warnings on exceptions into errors in GNATprove mode.
7553         * sem_dim.adb: Minor reformatting throughout Quote [ and ]
7554         in error messages.
7556 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7558         * sem_ch13.adb: Code clean up.
7560 2014-01-20  Robert Dewar  <dewar@adacore.com>
7562         * errout.ads, errout.adb: Implement >? >x? >X? sequences in error
7563         messages.
7564         * sem_ch6.adb (Check_Statement_Sequence): Missing return is an
7565         error in GNATprove mode.
7567 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7569         * par-ch4.adb (Is_Parameterless_Attribute): The Ada2012 attribute
7570         reference 'Old takes no parameters, and thus can appear as a
7571         prefix of a slice.
7573 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
7575         * exp_aggr.adb: Fix minor typos.
7577 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7579         * sem_attr.adb (Analyze_Attribute, case 'Constrained): In an
7580         instance the attribute is legal, and its value is determined
7581         statically if the type has no discriminants. This choice is
7582         more useful than rechecking the legality rule in the instance,
7583         is consistent with older usage, and is also consistent with all
7584         existing tests.
7586 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
7588         * sem_cat.adb (Validate_Static_Object_Name): Change error into
7589         warning in Relaxed_Semantic_Mode.
7591 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7593         * sem_attr.adb: Code and comments cleanup.
7595 2014-01-20  Yannick Moy  <moy@adacore.com>
7597         * debug.adb Free debug flags -gnatd.D, -gnatd.G and -gnatd.V *
7598         * errout.adb (Compilation_Errors): Remove special handling in
7599         GNATprove mode.
7600         * gnat1drv.adb (Adjust_Global_Switches): Remove handling of the
7601         removed debug flags.
7602         * gnat_rm.texi: Initial documentation for Abstract_State, Depends,
7603         Global, Initial_Condition, Initializes and Refined_State pragmas and
7604         aspects.
7605         * opt.ads (Frame_Condition_Mode, Formal_Extensions,
7606         SPARK_Strict_Mode): Remove global flags.
7607         * sem_ch3.adb (Analyze_Object_Declaration): Check of no hidden state
7608         always performed now, on packages declaring a null state.
7609         (Signed_Integer_Type_Declaration): Remove ill-designed attempt
7610         at providing pedantic mode for bounds of integer types.
7611         * sem_ch4.adb (Analyze_Quantified_Expression): Warning on suspicious
7612         "some" quantified expression now issued under control of -gnatw.t,
7613         like the other warning on unused bound variable.
7614         * sem_prag.adb (Check_Precondition_Postcondition): Remove useless test
7615         on removed flag.
7616         (Analyze_Pragma): Remove tests for SPARK 2014
7617         pragmas, not officially allowed by GNAT.
7619 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7621         * sem_prag.adb (Analyze_Pragma): Ensure that
7622         the sole argument of pragmas Abstract_State, Contract_Cases,
7623         Depends, Global and Initializes in in aggregate form.
7624         (Analyze_Refined_Pragma): Ensure that the sole argument of
7625         pragmas Refined_Depends, Refined_Global and Refined_State is in
7626         aggregate form.
7627         (Ensure_Aggregate_Form): New routine.
7629 2014-01-20  Doug Rupp  <rupp@adacore.com>
7631         * sem_attr.adb (Analyze_Attribute): case
7632         Attribute_Constrained => treat all prefixes as legal for Declib
7633         compatibility.
7635 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7637         * sem_prag.adb (Check_Mode): Reimplement the routine.
7638         (Find_Mode): New routine.
7640 2014-01-20  Robert Dewar  <dewar@adacore.com>
7642         * sem_ch4.adb (Operator_Check): Handle additional
7643         Allow_Integer_Address cases.
7645 2014-01-20  Robert Dewar  <dewar@adacore.com>
7647         * gnat_rm.texi (Allow_Integer_Address): Remove note about not
7648         allowed if address is non-private, no longer true.
7649         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7650         Remove check for address being private, causes difficulty when
7651         pragma used in gnat.adc file and is not needed, since we guard
7652         this in Address_Integer_Convert_OK.
7653         * exp_ch7.adb: Minor reformatting.
7654         * sem_ch4.adb: Handle operator operands in Allow_Integer_Address mode.
7656 2014-01-20  Robert Dewar  <dewar@adacore.com>
7658         * checks.adb (Apply_Range_Check): Remove gnatprove special
7659         casing of exponentiation.
7660         * sem_res.adb (Resolve_Op_Expon): Apply range check to right
7661         operand for integer case to check range against Natural.
7663 2014-01-20  Robert Dewar  <dewar@adacore.com>
7665         * s-tataat.adb: Minor reformatting.
7667 2014-01-20  Robert Dewar  <dewar@adacore.com>
7669         * einfo.adb (Is_Descendent_Of_Address): Now applies to all
7670         entities, and also fix documentation to remove mention of visible
7671         integer type, since this is not what the implementation does.
7672         * einfo.ads (Is_Descendent_Of_Address): Now applies to all
7673         entities, and also fix documentation to remove mention of visible
7674         integer type, since this is not what the implementation does.
7675         * gnat_rm.texi: Minor clarification of Allow_Integer_Address
7676         function.
7677         * sem_ch4.adb (Analyze_One_Call): Handle Allow_Integer_Address
7678         case for parameter type check.
7679         * sem_res.adb (Resolve): Use new function
7680         Address_Integer_Convert_OK.
7681         * sem_type.adb: Minor code reorganization (use Ekind_In) Minor
7682         reformatting throughout.
7683         * sem_util.adb (Address_Integer_Convert_OK): New function.
7684         * sem_util.ads: Minor reformatting (put specs in alpha order)
7685         (Address_Integer_Convert_OK): New function.
7687 2014-01-20  Thomas Quinot  <quinot@adacore.com>
7689         * exp_ch7.adb (Wrap_Transient_Expression):
7690         Insertion extra conditional expression only if
7691         Opt.Suppress_Control_Flow_Optimizations is set.
7693 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
7695         * s-tataat.adb (Initialize_Attributes): Abort might already be
7696         deferred in Create_Task.
7698 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7700         * checks.adb (Apply_Scalar_Range_Check): Flag
7701         the exponent as requiring a range check when the expression is
7702         an exponentiation.
7704 2014-01-20  Fedor Rybin  <frybin@adacore.com>
7706         * gnat_ugn.texi: Documenting --passed-tests option for gnattest.
7708 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7710         * sem_util.adb (Default_Initialization): New routine.
7711         * sem_util.ads: Add new type Default_Initialization_Kind.
7712         (Default_Initialization): New routine.
7714 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7716         * sem_prag.adb (Check_Mode): Correct all error
7717         message logic dealing with in/in out parameters that may appear
7718         as inputs or have a self reference.
7720 2014-01-20  Robert Dewar  <dewar@adacore.com>
7722         * exp_ch9.adb, checks.adb, exp_intr.adb: Minor reformatting.
7723         * sem_res.adb (Resolve): Fix error causing infinite loop for
7724         integer used as address. Allow addresses as integers.
7726 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
7728         * s-osinte-linux.ads (struct_sigaction): Fix rep clause.
7730 2014-01-20  Bob Duff  <duff@adacore.com>
7732         * par-ch8.adb (P_Use_Type_Clause): Detect syntax
7733         error when "use all" is not followed by "type".
7735 2014-01-20  Bob Duff  <duff@adacore.com>
7737         * exp_intr.adb (Expand_Unc_Deallocation): Remove warning on abort
7738         followed by free.
7740 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7742         * checks.adb (Apply_Address_Clause_Check): If there is an
7743         alignment check on the expression in an address clause, and there
7744         is no local exception propagation, add an additional explanatory
7745         message to clarify the cause of previous warning.
7747 2014-01-20  Robert Dewar  <dewar@adacore.com>
7749         * exp_ch7.adb: Minor reformatting.
7750         * opt.ads: Minor comment updates.
7751         * sem.adb: Minor name change Is_Main_Unit =>
7752         Is_Main_Unit_Or_Main_Unit_Spec.
7753         * sem_ch6.adb: Minor reformatting and code reorganization.
7755 2014-01-20  Bob Duff  <duff@adacore.com>
7757         * gnat_ugn.texi: Update gnatpp switches.
7759 2014-01-20  Thomas Quinot  <quinot@adacore.com>
7761         * exp_ch9.adb: Minor comment edit.
7763 2014-01-20  Robert Dewar  <dewar@adacore.com>
7765         * gnat_rm.texi: Document that Allow_Integer_Address is permitted
7766         only if System.Address is a private type.
7767         * opt.ads (Allow_Integer_Address): No longer set by -gnates.
7768         * sem_prag.adb (Analyze_Pragma, case Allow_Integer_Address):
7769         Allowed only if type System.Address is private, since otherwise
7770         it makes no sense.
7771         * sem_res.adb: Fix failure to properly Analyze unchecked
7772         conversions that were introduced by Allow_Integer_Address.
7773         * switch-c.adb: Remove -gnates switch.
7774         * usage.adb: Remove -gnates switch.
7775         * gnat_ugn.texi: Remove documentation of -gnates flag.
7777 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7779         * sem_ch6.adb (Analyze_Expression_Function): Pre-analyze and
7780         resolve expression to perform proper name capture.
7782 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7784         * sem.adb (Semantics): When saving/restoring configuration
7785         switches, the spec of a pre- defined unit that is the main unit
7786         must be treated as a predefined unit as well.
7788 2014-01-20  Thomas Quinot  <quinot@adacore.com>
7790         * exp_ch7.adb (Wrap_Transient_Expression): For a Boolean
7791         expression, insert an extra conditional expression when saving
7792         the value of the expression, for the benefit of control flow
7793         graph based coverage analysis.
7794         * exp_ch3.adb: Minor reformatting.
7796 2014-01-20  Robert Dewar  <dewar@adacore.com>
7798         * gnat1drv.adb: Set Allow_Integer_Address in relaxed semantics mode.
7799         * gnat_rm.texi: Document pragma Allow_Integer_Address.
7800         * gnat_ugn.texi: Document pragma Allow_Integer_Address, -gnates.
7801         * opt.ads: New flag Allow_Integer_Address.
7802         * par-prag.adb: Dummy entry for pragma Allow_Integer_Address.
7803         * sem_ch5.adb: Minor reformatting.
7804         * sem_prag.adb: Implement pragma Allow_Integer_Address.
7805         * sem_res.adb (Resolve): Allow integer address value if
7806         switch set.
7807         * sem_util.adb: Minor reformatting.
7808         * snames.ads-tmpl: Add entry for pragma Allow_Integer_Address.
7809         * switch-c.adb: Recognize flag -gnates.
7810         * usage.adb: Document flag -gnates.
7812 2014-01-20  Thomas Quinot  <quinot@adacore.com>
7814         * s-tadeca.adb: Fix minor typos in comment.
7816 2014-01-20  Pascal Obry  <obry@adacore.com>
7818         * s-win32.ads (FreeLibrary): New import.
7820 2014-01-20  Robert Dewar  <dewar@adacore.com>
7822         * sem_res.adb, sem_cat.adb: Minor reformatting.
7823         * sem_ch11.adb (Analyze_Raise_Statement): Only give warning about
7824         assigning to OUT parameters for the current subprogram scope.
7825         * exp_ch4.adb: Minor reformatting.
7827 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7829         * exp_ch4.adb (Process_Transient_Object,
7830         Find_Enclosing_Contexts): If the top-level if-expression that
7831         generated the transient object is an actual in a call, the proper
7832         Hook_Context is a construct enclosing the call.
7833         * einfo.ads: Indicate that Related_Expression is used to link a
7834         loop variable to the container expression over which the loop
7835         takes place.
7836         (Analyze_Iterator_Specification): Set the Related_Expression of
7837         the loop variable in a container element iterator.
7838         (Note_Possible_Modification): If the variable is the loop
7839         variable in a container element iterator, indicate that the
7840         enclosing container is also modified.
7842 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7844         * aspects.adb (Move_Or_Merge_Aspects): Reimplemented.
7846 2014-01-20  Robert Dewar  <dewar@adacore.com>
7848         * s-taasde.ads, gnat_ugn.texi, s-tadeca.adb, sem_res.adb, s-tadeca.ads:
7849         Minor reformatting and code clean up.
7851 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
7853         * sem_cat.adb (Validate_Object_Declaration): Relax semantics
7854         of objects of private type if Relaxed_RM_Semantics.
7856 2014-01-20  Claire Dross  <dross@adacore.com>
7858         * a-cofove.ads (Vector): Capacity discriminant
7859         should be in range of the index.
7861 2014-01-20  Thomas Quinot  <quinot@adacore.com>
7863         * a-caldel.ads(To_Duration), s-taasde.ads(Time_Enqueue):
7864         Clarify specs s-tadeca.adb(Enqueue_Calendar): Compensate for
7865         possible difference between epoch of Ada.Calendar clock and Ada
7866         real-time/tasking clock.
7867         * s-taprop-posix.adb: Minor comment fix.
7869 2014-01-20  Doug Rupp  <rupp@adacore.com>
7871         * sysdep.c [vxworks]: Remove Vxworks version noise for RTP.
7873 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7875         * exp_attr.adb (Expand_N_Attribute_Reference): Generate validity
7876         checks on the prefix of attribute 'Old.
7877         * sem_ch3.adb (Process_Range_Expr_In_Decl): Suppress the
7878         generation of validity checks on a range that belongs to the
7879         iteration scheme of a quantified expression.
7880         * sem_ch5.adb (One_Bound): Suppress the generation of validity
7881         checks on a bound that belongs to the iteration scheme of a
7882         quantified expression, generate the check in all other cases.
7884 2014-01-20  Bob Duff  <duff@adacore.com>
7886         * gnat_ugn.texi: Enable --pp-new by default. Minor reorganization.
7888 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7890         * sem_res.adb (Resolve): When compiling a predefined unit, ignore
7891         interpretations that do not come from other predefined units,
7892         to prevent spurious ambiguities in the presence of user-defined
7893         operators in the context of (an instance of) a predefined unit.
7895 2014-01-20  Robert Dewar  <dewar@adacore.com>
7897         * gnat_rm.texi: Document that Loop_Variant is included in
7898         Statement_Assertions.
7899         * sem_prag.adb (Check_Kind): Add Loop_Variant to
7900         Statement_Assertions (Check_Applicable_Policy): Add Loop_Variant
7901         to Statement_Assertions.
7903 2014-01-20  Doug Rupp  <rupp@adacore.com>
7905         * sysdep.c (__gnat_is_file_not_found_error) [vxworks6]: Add case
7906         for errno ENOENT from RTP on NFS mounted file system.
7908 2014-01-20  Ed Schonberg  <schonberg@adacore.com>
7910         * sem_util.adb (Check_Function_Writable_Actuals): 1) Do not
7911         examine code that does not come from source. The check does not
7912         apply to code generated for constraint checks, and such code may
7913         generate spurious error messages when compiled with expansion
7914         disabled (as in a generic unit) because side effects may not
7915         have been removed.
7916         2) Make error messages more explicit: indicate the component
7917         of the  construct whose value is indeterminate because of a
7918         call to a function with in-out parameter in another component,
7919         when there is no mandated order of execution between the two
7920         components (actuals, aggregate components, alternatives).
7922 2014-01-20  Robert Dewar  <dewar@adacore.com>
7924         * gnat_rm.texi: Minor cleanup.
7926 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7928         * sem_attr.adb (Analyze_Attribute): Attributes 'Old and 'Result
7929         can now apply to a refined postcondition.
7930         * sem_ch6.adb (Analyze_Subprogram_Contract): Remove local
7931         variable Result_Seen. Add variables Case_Prag, Post_Prag,
7932         Seen_In_Case and Seen_In_Post. Update the mechanism that detects
7933         whether postconditions and/or constract-cases mention attribute
7934         'Result and introduce a post-state when applied to functions.
7935         (Check_Result_And_Post_State): Removed.
7936         * sem_prag.adb (Analyze_Pragma): Add local variable
7937         Result_Seen. Verify that the expression of pragma Refined_Post
7938         mentions attribute 'Result and introduces a post-state.
7939         * sem_util.ads, sem_util.adb (Check_Result_And_Post_State): New routine.
7941 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7943         * exp_ch7.adb (Is_Subprogram_Call): New routine.
7944         (Process_Transient_Objects): Make variable Must_Hook global with
7945         respect to all locally declared subprograms. Search the context
7946         for at least one subprogram call.
7947         (Requires_Hooking): Removed.
7949 2014-01-20  Claire Dross  <dross@adacore.com>
7951         * a-cfdlli.ads a-cfhama.ads a-cfhase.ads a-cforma.ads
7952         * a-cforse.ads a-cofove.ads: Add pragma Annotate (GNATprove,
7953         External_Axiomatization);
7955 2014-01-20  Robert Dewar  <dewar@adacore.com>
7957         * sem_attr.adb (Analyze_Attribute, case Loop_Entry): Allow
7958         Loop_Entry in Assert, Assert_And_Cut, and Assume pragmas.
7959         * sem_prag.adb (Analyze_Pragma, case Assert[_And_Cut], Assume):
7960         Allow Loop_Entry to be used in these pragmas if they appear in
7961         an appropriate context.
7962         (Placement_Error): Specialize error
7963         message for pragma Assert[_And_Cut] or pragma Assume containing
7964         Loop_Entry attribute.
7965         * a-exexpr-gcc.adb, sinput.adb: Minor reformatting.
7966         * s-excmac-arm.ads, s-except.ads, s-excmac-gcc.ads: Minor reformatting
7967         and code clean ups.
7969 2014-01-20  Robert Dewar  <dewar@adacore.com>
7971         * gnat1drv.adb: Minor comment update.
7973 2014-01-20  Tristan Gingold  <gingold@adacore.com>
7975         * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused
7976         variables, comment out unused code.
7977         * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads
7978         * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb
7979         * s-excmac-arm.ads: New file.
7981 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7983         * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables
7984         Drange and Index_Typ. Remove the circuitry which creates a
7985         range check to compare the index type of the array against the
7986         discrete_range.
7987         * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update
7988         the circuitry which creates a range check to handle a
7989         discrete_range denoted by a subtype indication.
7991 2014-01-20  Pierre-Marie Derodat  <derodat@adacore.com>
7993         * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original
7994         nodes to get the original sloc range.
7996 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
7998         * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the
7999         entity of a [library level] package.
8001 2014-01-20  Tristan Gingold  <gingold@adacore.com>
8003         * raise-gcc.c (exception_class_eq): New function.
8004         (is_handled_by): Use it to compare exception classes.
8005         (PERSONALITY_STORAGE): Define.  (continue_unwind): New function to
8006         be called to return URC_CONTINUE_UNWIND.
8007         (personality_body): New function, extracted from PERSONALITY_ROUTINE.
8008         (PERSONALITY_ROUTINE): Add an implementation for the ARM unwinder.
8010 2014-01-20  Robert Dewar  <dewar@adacore.com>
8012         * opt.ads: Minor comment update.
8014 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8016         * exp_ch4.adb (Expand_N_Slice): Relocate some variables and
8017         constants to the "Local variables" area. Add new constant D. Add
8018         new variables Drange and Index_Typ.  Rename Pfx to Rep and Ptp
8019         to Pref_Typ and update all occurrences. Add circuitry to extract
8020         the discrete_range and the index type and build a range check.
8022 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
8024         * gnat1drv.adb (Adjust_Global_Switches): Enable
8025         Treat_Categorization_Errors_As_Warnings when Relaxed_RM_Semantics
8026         is set.
8028 2014-01-20  Thomas Quinot  <quinot@adacore.com>
8030         * sem_ch5.adb, sem_ch4.adb: Minor reformatting.
8032 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8034         * sem_ch13.adb (Analyze_Aspect_Specifications):
8035         When aspect SPARK_Mode appears on a package body, insert the
8036         generated pragma at the top of the body declarations.
8038 2014-01-20  Robert Dewar  <dewar@adacore.com>
8040         * sem_aggr.adb, exp_prag.adb, sem_aux.adb, sinfo.ads, sem_ch10.adb,
8041         checks.adb, sem_prag.adb, sem_ch12.adb, freeze.adb, g-arrspl.adb,
8042         expander.adb, gnat1drv.adb, exp_ch4.adb, sem_ch6.adb,
8043         sem_ch8.adb, exp_dist.adb: Minor reformatting.
8045 2014-01-20  Yannick Moy  <moy@adacore.com>
8047         * gnat1drv.adb (Gnat1drv): Call Write_ALI with Object=True in GNATprove
8048         mode.
8050 2014-01-20  Pascal Obry  <obry@adacore.com>
8052         * g-arrspl.ads (Slice_Set): New definition (will use a copy on
8053         write scheme).
8054         * g-arrspl.adb: Adapt all routine to this new implementation.
8055         (Set): Copy the Slice_Set definition before reusing it.
8057 2014-01-20  Arnaud Charlet  <charlet@adacore.com>
8059         * sem_prag.adb (Process_Import_Or_Interface): In
8060         Relaxed_RM_Semantics, support old Ada 83 style of pragma Import.
8061         (Analyze_Pragma): Ditto for pragma Export.
8062         * exp_prag.adb (Expand_Pragma_Import_Or_Interface): Handle old pragma
8063         Import style.
8065 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8067         * einfo.ads: E_Abstract_State is now part of the entities that
8068         can be overloaded. Update type Overloadable_Kind to reflect the
8069         inclusion of abstract states.
8070         * sem_ch6.adb (New_Overloaded_Entity): A function can now
8071         overload an abstract state.
8072         * sem_prag.adb (Analyze_Constituent): Handle the overloading
8073         of states by functions. Use Entity_Of to obtain the entity of
8074         a constituent.  (Analyze_Global_Item): Handle the overloading of
8075         states by functions.
8076         (Analyze_Initialization_Item): Handle the
8077         overloading of states by functions.  Use Entity_Of to obtain the
8078         entity of an item.
8079         (Analyze_Input_Item): Handle the overloading
8080         of states by functions. Use Entity_Of to obtain the entity of an item.
8081         (Analyze_Input_Output): Handle the overloading of states by functions.
8082         (Analyze_Refinement_Clause): Handle the overloading
8083         of states by functions.  Use Entity_Of to obtain the entity of an item.
8084         (Appears_In): Use Entity_Of to obtain the entity of an element.
8085         (Check_Usage): Use Entity_Of to obtain the entity of
8086         an item. Add a guard to prevent a crash due to a previous error.
8087         (Resolve_State): New routine.
8089 2014-01-20  Yannick Moy  <moy@adacore.com>
8091         * spark_xrefs.ads, debug.adb, gnat1drv.adb, errout.adb, errout.ads,
8092         opt.ads: Minor comments updates.
8094 2014-01-20  Hristian Kirtchev  <kirtchev@adacore.com>
8096         * einfo.adb (Non_Limited_View): Applies to abstract states.
8097         (Set_From_Limited_With): Applies to abstract states.
8098         (Set_Non_Limited_View): Applies to abstract states.
8099         (Write_Field17): Output the non-limited view of an abstract state.
8100         * einfo.ads: Update the comment on usage and occurrences in
8101         nodes for attributes From_Limited_With and Non_Limited_View.
8102         * sem_aux.adb (Available_View): This routine can now handle
8103         abstract states.
8104         * sem_aux.ads (Available_View): This routine can now handle
8105         abstract states. Update the comment on usage.
8106         * sem_ch8.adb (Find_Expanded_Name): Handle abstract views
8107         of states and variables.
8108         (In_Pragmas_Depends_Or_Global): New routine.
8109         * sem_ch10.adb (Build_Limited_Views): Implement
8110         abstract (limited) views of variables and states.
8111         (Build_Shadow_Entity): This routine is now a procedure. Add
8112         formal parameter Shadow. Update the comment on usage. Add
8113         context-specific decoration for states and variables.
8114         (Decorate_State): New routine.  (Decorate_Variable): New routine.
8115         (Find_And_Process_States): New routine.
8116         (Process_Declarations): Renamed to Process_Declarations_And_States.
8117         (Process_Declarations_And_States): Add formal parameters
8118         Pack and Create_Abstract_Views. Update the comment on usage.
8119         (Process_States): New routine.
8120         * sem_prag.adb (Check_Dependency_Clause): Handle abstract
8121         views of states and variables. Match the abstract view of a state
8122         against its corresponding non-abstract view.
8123         (Is_Matching_Input):
8124         Handle abstract views of states and variables. Match the abstract
8125         view of a state against its corresponding non-abstract view.
8126         (Process_Global_Item): Handle abstract views of states and
8127         variables.
8129 2014-01-20  Bob Duff  <duff@adacore.com>
8131         * sem_ch10.adb (Expand_With_Clause): Don't
8132         recurse on the prefix if the current with-ed name refers to a
8133         package that renames its own parent, eg "package P.Q renames P;".
8135 2014-01-20  Yannick Moy  <moy@adacore.com>
8137         * exp_spark.adb (Expand_SPARK_Call): Remove procedure.
8138         * opt.adb, opt.ads (Full_Expander_Active): Remove function.
8139         * checks.adb, exp_ch6.adb, exp_ch9.adb, exp_disp.adb, sem_aggr.adb,
8140         * sem_ch10.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb, sem_ch9.adb,
8141         * sem_disp.adb, sem_res.adb Replace Full_Expander_Active by
8142         Expander_Active.
8144 2014-01-20  Yannick Moy  <moy@adacore.com>
8146         * sinfo.ads Update documentation of GNATprove mode.
8148 2014-01-20  Yannick Moy  <moy@adacore.com>
8150         * adabkend.adb, ali-util.adb, errout.adb, exp_ch7.adb,
8151         * exp_dbug.adb, freeze.adb, lib-xref.adb, restrict.adb,
8152         * sem_attr.adb, sem_ch4.adb, sem_ch5.adb, sem_ch6.adb, sem_ch8.adb,
8153         * sem_prag.adb, sem_res.adb, sem_util.adb Rename SPARK_Mode into
8154         GNATprove_Mode.
8155         * sem_ch13.adb: Remove blank.
8156         * exp_spark.adb, exp_spark.ads (Expand_SPARK_Call): Only replace
8157         subprograms by alias for renamings, not for inherited primitive
8158         operations.
8159         * exp_util.adb (Expand_Subtype_From_Expr): Apply the expansion
8160         in GNATprove mode.
8161         (Remove_Side_Effects): Apply the removal in
8162         GNATprove mode, for the full analysis of expressions.
8163         * expander.adb (Expand): Call the light SPARK expansion in GNATprove
8164         mode.
8165         (Expander_Mode_Restore, Expander_Mode_Save_And_Set): Ignore
8166         save/restore actions for Expander_Active flag in GNATprove mode,
8167         similar to what is done in ASIS mode.
8168         * frontend.adb (Frontend): Generic bodies are instantiated in
8169         GNATprove mode.
8170         * gnat1drv.adb (Adjust_Global_Switches): Set operating
8171         mode to Check_Semantics in GNATprove mode, although a light
8172         expansion is still performed.
8173         (Gnat1drv): Set Back_End_Mode to
8174         Declarations_Only in GNATprove mode, and later on special case
8175         the GNATprove mode to continue analysis anyway.
8176         * lib-writ.adb (Write_ALI): Always generate ALI files in
8177         GNATprove mode.
8178         * opt.adb, opt.ads (Full_Expander_Active): Make it equivalent to
8179         Expander_Active.
8180         (SPARK_Mode): Renamed as GNATprove_Mode.
8181         * sem_aggr.adb (Aggregate_Constraint_Checks): Add checks in the
8182         tree in GNATprove_Mode.
8183         * sem_ch12.adb (Analyze_Package_Instantiation): Always instantiate
8184         body in GNATprove mode.
8185         (Need_Subprogram_Instance_Body): Always instantiate body in GNATprove
8186         mode.
8187         * sem_ch3.adb (Constrain_Index, Process_Range_Expr_In_Decl):
8188         Make sure side effects are removed in GNATprove mode.
8190 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
8192         * gcc-interface/decl.c (gnat_to_gnu_entity) <object>: Robustify tests
8193         for aliased objects with an unconstrained nominal subtype.
8194         * gcc-interface/trans.c (Call_to_gnu): Likewise.
8195         (gnat_to_gnu) <case N_Op_Not>: Robustify test for private type.
8196         <case N_Op_Minus>: Remove useless code.
8197         (Exception_Handler_to_gnu_zcx): Minor tweaks.
8199 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
8201         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Record_Subtype>:
8202         Tidy up.  For a subtype with discriminants and variant part, if a
8203         variant is statically selected and the fields all have a constant
8204         position, put them in order of increasing position.  Likewise if
8205         no variant part but representation clause is present.
8206         * gcc-interface/utils.c (make_packable_type): Robustify.
8207         (maybe_pad_type): Use local variable and tidy up condition.  If no
8208         alignment is specified, use the original one.
8209         (create_type_stub_decl): Minor tweak.
8210         (convert) <case VECTOR_CST>: Fix typo.
8211         <case CONSTRUCTOR>: Deal with padding types around the same type.
8212         Do not punt on missing fields.
8213         (unchecked_convert): Call finish_record_type to lay out the special
8214         record types made for conversions from/to problematic integer types.
8215         Bump the alignment of CONSTRUCTORs before converting them to a more
8216         aligned type.
8218 2014-01-20  Eric Botcazou  <ebotcazou@adacore.com>
8220         * gcc-interface/decl.c (gnat_to_gnu_entity) <case E_Component>: Remove
8221         obsolete code for type_annotate_only mode, simplify code and slightly
8222         improve wording of comments.
8224 2014-01-12  Eric Botcazou  <ebotcazou@adacore.com>
8226         PR ada/59772
8227         * gcc-interface/cuintp.c (build_cst_from_int): Use 32-bit integer type
8228         as intermediate type.
8229         (UI_To_gnu): Likewise.
8231 2014-01-03  Eric Botcazou  <ebotcazou@adacore.com>
8233         * gnatvsn.ads (Current_Year): Bump to 2014.
8235 2014-01-02  Tobias Burnus  <burnus@net-b.de>
8237         * gnat_ugn.texi: Bump @copying's copyright year.
8239 Copyright (C) 2014 Free Software Foundation, Inc.
8241 Copying and distribution of this file, with or without modification,
8242 are permitted in any medium without royalty provided the copyright
8243 notice and this notice are preserved.